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

xml_parsebuffer_fuzzer.c:sip_tokey:
  148|  18.6k|sip_tokey(struct sipkey *key, const void *src) {
  149|  18.6k|  key->k[0] = SIP_U8TO64_LE((const unsigned char *)src);
  ------------------
  |  |  124|  18.6k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  18.6k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  18.6k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  18.6k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  150|  18.6k|  key->k[1] = SIP_U8TO64_LE((const unsigned char *)src + 8);
  ------------------
  |  |  124|  18.6k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  18.6k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  18.6k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  18.6k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  151|  18.6k|  return key;
  152|  18.6k|} /* sip_tokey() */
xml_parsebuffer_fuzzer.c:siphash24:
  271|  18.6k|siphash24(const void *src, size_t len, const struct sipkey *key) {
  272|  18.6k|  struct siphash state = SIPHASH_INITIALIZER;
  ------------------
  |  |  130|  18.6k|  { 0, 0, 0, 0, {0}, 0, 0 }
  ------------------
  273|  18.6k|  return sip24_final(sip24_update(sip24_init(&state, key), src, len));
  274|  18.6k|} /* siphash24() */
xml_parsebuffer_fuzzer.c:sip24_final:
  231|  18.6k|sip24_final(struct siphash *H) {
  232|  18.6k|  const char left = (char)(H->p - H->buf);
  233|  18.6k|  uint64_t b = (H->c + left) << 56;
  234|       |
  235|  18.6k|  switch (left) {
  ------------------
  |  Branch (235:11): [True: 0, False: 18.6k]
  ------------------
  236|  1.39k|  case 7:
  ------------------
  |  Branch (236:3): [True: 1.39k, False: 17.2k]
  ------------------
  237|  1.39k|    b |= (uint64_t)H->buf[6] << 48;
  238|       |    /* fall through */
  239|  4.73k|  case 6:
  ------------------
  |  Branch (239:3): [True: 3.34k, False: 15.3k]
  ------------------
  240|  4.73k|    b |= (uint64_t)H->buf[5] << 40;
  241|       |    /* fall through */
  242|  6.02k|  case 5:
  ------------------
  |  Branch (242:3): [True: 1.28k, False: 17.3k]
  ------------------
  243|  6.02k|    b |= (uint64_t)H->buf[4] << 32;
  244|       |    /* fall through */
  245|  9.38k|  case 4:
  ------------------
  |  Branch (245:3): [True: 3.35k, False: 15.2k]
  ------------------
  246|  9.38k|    b |= (uint64_t)H->buf[3] << 24;
  247|       |    /* fall through */
  248|  10.7k|  case 3:
  ------------------
  |  Branch (248:3): [True: 1.39k, False: 17.2k]
  ------------------
  249|  10.7k|    b |= (uint64_t)H->buf[2] << 16;
  250|       |    /* fall through */
  251|  13.9k|  case 2:
  ------------------
  |  Branch (251:3): [True: 3.14k, False: 15.5k]
  ------------------
  252|  13.9k|    b |= (uint64_t)H->buf[1] << 8;
  253|       |    /* fall through */
  254|  15.3k|  case 1:
  ------------------
  |  Branch (254:3): [True: 1.44k, False: 17.2k]
  ------------------
  255|  15.3k|    b |= (uint64_t)H->buf[0] << 0;
  256|       |    /* fall through */
  257|  18.6k|  case 0:
  ------------------
  |  Branch (257:3): [True: 3.28k, False: 15.3k]
  ------------------
  258|  18.6k|    break;
  259|  18.6k|  }
  260|       |
  261|  18.6k|  H->v3 ^= b;
  262|  18.6k|  sip_round(H, 2);
  263|  18.6k|  H->v0 ^= b;
  264|  18.6k|  H->v2 ^= 0xff;
  265|  18.6k|  sip_round(H, 4);
  266|       |
  267|  18.6k|  return H->v0 ^ H->v1 ^ H->v2 ^ H->v3;
  268|  18.6k|} /* sip24_final() */
xml_parsebuffer_fuzzer.c:sip_round:
  167|  38.4M|sip_round(struct siphash *H, const int rounds) {
  168|  38.4M|  int i;
  169|       |
  170|   115M|  for (i = 0; i < rounds; i++) {
  ------------------
  |  Branch (170:15): [True: 76.8M, False: 38.4M]
  ------------------
  171|  76.8M|    H->v0 += H->v1;
  172|  76.8M|    H->v1 = SIP_ROTL(H->v1, 13);
  ------------------
  |  |  111|  76.8M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  173|  76.8M|    H->v1 ^= H->v0;
  174|  76.8M|    H->v0 = SIP_ROTL(H->v0, 32);
  ------------------
  |  |  111|  76.8M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  175|       |
  176|  76.8M|    H->v2 += H->v3;
  177|  76.8M|    H->v3 = SIP_ROTL(H->v3, 16);
  ------------------
  |  |  111|  76.8M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  178|  76.8M|    H->v3 ^= H->v2;
  179|       |
  180|  76.8M|    H->v0 += H->v3;
  181|  76.8M|    H->v3 = SIP_ROTL(H->v3, 21);
  ------------------
  |  |  111|  76.8M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  182|  76.8M|    H->v3 ^= H->v0;
  183|       |
  184|  76.8M|    H->v2 += H->v1;
  185|  76.8M|    H->v1 = SIP_ROTL(H->v1, 17);
  ------------------
  |  |  111|  76.8M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  186|  76.8M|    H->v1 ^= H->v2;
  187|  76.8M|    H->v2 = SIP_ROTL(H->v2, 32);
  ------------------
  |  |  111|  76.8M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  188|  76.8M|  }
  189|  38.4M|} /* sip_round() */
xml_parsebuffer_fuzzer.c:sip24_update:
  207|  18.6k|sip24_update(struct siphash *H, const void *src, size_t len) {
  208|  18.6k|  const unsigned char *p = (const unsigned char *)src, *pe = p + len;
  209|  18.6k|  uint64_t m;
  210|       |
  211|  38.3M|  do {
  212|   345M|    while (p < pe && H->p < sip_endof(H->buf))
  ------------------
  |  |  204|   345M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (212:12): [True: 345M, False: 18.6k]
  |  Branch (212:22): [True: 307M, False: 38.3M]
  ------------------
  213|   307M|      *H->p++ = *p++;
  214|       |
  215|  38.3M|    if (H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  38.3M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (215:9): [True: 15.3k, False: 38.3M]
  ------------------
  216|  15.3k|      break;
  217|       |
  218|  38.3M|    m = SIP_U8TO64_LE(H->buf);
  ------------------
  |  |  124|  38.3M|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  38.3M|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  38.3M|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  38.3M|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  219|  38.3M|    H->v3 ^= m;
  220|  38.3M|    sip_round(H, 2);
  221|  38.3M|    H->v0 ^= m;
  222|       |
  223|  38.3M|    H->p = H->buf;
  224|  38.3M|    H->c += 8;
  225|  38.3M|  } while (p < pe);
  ------------------
  |  Branch (225:12): [True: 38.3M, False: 3.28k]
  ------------------
  226|       |
  227|      0|  return H;
  228|  18.6k|} /* sip24_update() */
xml_parsebuffer_fuzzer.c:sip24_init:
  192|  18.6k|sip24_init(struct siphash *H, const struct sipkey *key) {
  193|  18.6k|  H->v0 = SIP_ULL(0x736f6d65U, 0x70736575U) ^ key->k[0];
  ------------------
  |  |  109|  18.6k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  194|  18.6k|  H->v1 = SIP_ULL(0x646f7261U, 0x6e646f6dU) ^ key->k[1];
  ------------------
  |  |  109|  18.6k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  195|  18.6k|  H->v2 = SIP_ULL(0x6c796765U, 0x6e657261U) ^ key->k[0];
  ------------------
  |  |  109|  18.6k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  196|  18.6k|  H->v3 = SIP_ULL(0x74656462U, 0x79746573U) ^ key->k[1];
  ------------------
  |  |  109|  18.6k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  197|       |
  198|  18.6k|  H->p = H->buf;
  199|  18.6k|  H->c = 0;
  200|       |
  201|  18.6k|  return H;
  202|  18.6k|} /* sip24_init() */
xmlparse.c:sip24_init:
  192|  6.34M|sip24_init(struct siphash *H, const struct sipkey *key) {
  193|  6.34M|  H->v0 = SIP_ULL(0x736f6d65U, 0x70736575U) ^ key->k[0];
  ------------------
  |  |  109|  6.34M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  194|  6.34M|  H->v1 = SIP_ULL(0x646f7261U, 0x6e646f6dU) ^ key->k[1];
  ------------------
  |  |  109|  6.34M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  195|  6.34M|  H->v2 = SIP_ULL(0x6c796765U, 0x6e657261U) ^ key->k[0];
  ------------------
  |  |  109|  6.34M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  196|  6.34M|  H->v3 = SIP_ULL(0x74656462U, 0x79746573U) ^ key->k[1];
  ------------------
  |  |  109|  6.34M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  197|       |
  198|  6.34M|  H->p = H->buf;
  199|  6.34M|  H->c = 0;
  200|       |
  201|  6.34M|  return H;
  202|  6.34M|} /* sip24_init() */
xmlparse.c:sip24_update:
  207|  6.34M|sip24_update(struct siphash *H, const void *src, size_t len) {
  208|  6.34M|  const unsigned char *p = (const unsigned char *)src, *pe = p + len;
  209|  6.34M|  uint64_t m;
  210|       |
  211|  6.94M|  do {
  212|  20.9M|    while (p < pe && H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  14.6M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (212:12): [True: 14.6M, False: 6.34M]
  |  Branch (212:22): [True: 14.0M, False: 601k]
  ------------------
  213|  14.0M|      *H->p++ = *p++;
  214|       |
  215|  6.94M|    if (H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  6.94M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (215:9): [True: 6.30M, False: 646k]
  ------------------
  216|  6.30M|      break;
  217|       |
  218|   646k|    m = SIP_U8TO64_LE(H->buf);
  ------------------
  |  |  124|   646k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|   646k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|   646k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|   646k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  219|   646k|    H->v3 ^= m;
  220|   646k|    sip_round(H, 2);
  221|   646k|    H->v0 ^= m;
  222|       |
  223|   646k|    H->p = H->buf;
  224|   646k|    H->c += 8;
  225|   646k|  } while (p < pe);
  ------------------
  |  Branch (225:12): [True: 601k, False: 45.1k]
  ------------------
  226|       |
  227|      0|  return H;
  228|  6.34M|} /* sip24_update() */
xmlparse.c:sip_round:
  167|  13.3M|sip_round(struct siphash *H, const int rounds) {
  168|  13.3M|  int i;
  169|       |
  170|  52.7M|  for (i = 0; i < rounds; i++) {
  ------------------
  |  Branch (170:15): [True: 39.3M, False: 13.3M]
  ------------------
  171|  39.3M|    H->v0 += H->v1;
  172|  39.3M|    H->v1 = SIP_ROTL(H->v1, 13);
  ------------------
  |  |  111|  39.3M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  173|  39.3M|    H->v1 ^= H->v0;
  174|  39.3M|    H->v0 = SIP_ROTL(H->v0, 32);
  ------------------
  |  |  111|  39.3M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  175|       |
  176|  39.3M|    H->v2 += H->v3;
  177|  39.3M|    H->v3 = SIP_ROTL(H->v3, 16);
  ------------------
  |  |  111|  39.3M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  178|  39.3M|    H->v3 ^= H->v2;
  179|       |
  180|  39.3M|    H->v0 += H->v3;
  181|  39.3M|    H->v3 = SIP_ROTL(H->v3, 21);
  ------------------
  |  |  111|  39.3M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  182|  39.3M|    H->v3 ^= H->v0;
  183|       |
  184|  39.3M|    H->v2 += H->v1;
  185|  39.3M|    H->v1 = SIP_ROTL(H->v1, 17);
  ------------------
  |  |  111|  39.3M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  186|  39.3M|    H->v1 ^= H->v2;
  187|  39.3M|    H->v2 = SIP_ROTL(H->v2, 32);
  ------------------
  |  |  111|  39.3M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  188|  39.3M|  }
  189|  13.3M|} /* sip_round() */
xmlparse.c:sip24_final:
  231|  6.34M|sip24_final(struct siphash *H) {
  232|  6.34M|  const char left = (char)(H->p - H->buf);
  233|  6.34M|  uint64_t b = (H->c + left) << 56;
  234|       |
  235|  6.34M|  switch (left) {
  ------------------
  |  Branch (235:11): [True: 0, False: 6.34M]
  ------------------
  236|  46.4k|  case 7:
  ------------------
  |  Branch (236:3): [True: 46.4k, False: 6.30M]
  ------------------
  237|  46.4k|    b |= (uint64_t)H->buf[6] << 48;
  238|       |    /* fall through */
  239|   370k|  case 6:
  ------------------
  |  Branch (239:3): [True: 323k, False: 6.02M]
  ------------------
  240|   370k|    b |= (uint64_t)H->buf[5] << 40;
  241|       |    /* fall through */
  242|   380k|  case 5:
  ------------------
  |  Branch (242:3): [True: 10.0k, False: 6.33M]
  ------------------
  243|   380k|    b |= (uint64_t)H->buf[4] << 32;
  244|       |    /* fall through */
  245|   434k|  case 4:
  ------------------
  |  Branch (245:3): [True: 53.9k, False: 6.29M]
  ------------------
  246|   434k|    b |= (uint64_t)H->buf[3] << 24;
  247|       |    /* fall through */
  248|   582k|  case 3:
  ------------------
  |  Branch (248:3): [True: 148k, False: 6.19M]
  ------------------
  249|   582k|    b |= (uint64_t)H->buf[2] << 16;
  250|       |    /* fall through */
  251|   715k|  case 2:
  ------------------
  |  Branch (251:3): [True: 132k, False: 6.21M]
  ------------------
  252|   715k|    b |= (uint64_t)H->buf[1] << 8;
  253|       |    /* fall through */
  254|  6.30M|  case 1:
  ------------------
  |  Branch (254:3): [True: 5.58M, False: 760k]
  ------------------
  255|  6.30M|    b |= (uint64_t)H->buf[0] << 0;
  256|       |    /* fall through */
  257|  6.34M|  case 0:
  ------------------
  |  Branch (257:3): [True: 45.4k, False: 6.30M]
  ------------------
  258|  6.34M|    break;
  259|  6.34M|  }
  260|       |
  261|  6.34M|  H->v3 ^= b;
  262|  6.34M|  sip_round(H, 2);
  263|  6.34M|  H->v0 ^= b;
  264|  6.34M|  H->v2 ^= 0xff;
  265|  6.34M|  sip_round(H, 4);
  266|       |
  267|  6.34M|  return H->v0 ^ H->v1 ^ H->v2 ^ H->v3;
  268|  6.34M|} /* sip24_final() */

XML_ParserCreate:
  719|  18.6k|XML_ParserCreate(const XML_Char *encodingName) {
  720|  18.6k|  return XML_ParserCreate_MM(encodingName, NULL, NULL);
  721|  18.6k|}
XML_ParserCreate_MM:
  970|  18.6k|                    const XML_Char *nameSep) {
  971|  18.6k|  return parserCreate(encodingName, memsuite, nameSep, NULL);
  972|  18.6k|}
XML_ParserFree:
 1441|  18.6k|XML_ParserFree(XML_Parser parser) {
 1442|  18.6k|  TAG *tagList;
 1443|  18.6k|  OPEN_INTERNAL_ENTITY *entityList;
 1444|  18.6k|  if (parser == NULL)
  ------------------
  |  Branch (1444:7): [True: 0, False: 18.6k]
  ------------------
 1445|      0|    return;
 1446|       |  /* free m_tagStack and m_freeTagList */
 1447|  18.6k|  tagList = parser->m_tagStack;
 1448|  2.23M|  for (;;) {
 1449|  2.23M|    TAG *p;
 1450|  2.23M|    if (tagList == NULL) {
  ------------------
  |  Branch (1450:9): [True: 18.9k, False: 2.21M]
  ------------------
 1451|  18.9k|      if (parser->m_freeTagList == NULL)
  ------------------
  |  Branch (1451:11): [True: 18.6k, False: 271]
  ------------------
 1452|  18.6k|        break;
 1453|    271|      tagList = parser->m_freeTagList;
 1454|    271|      parser->m_freeTagList = NULL;
 1455|    271|    }
 1456|  2.21M|    p = tagList;
 1457|  2.21M|    tagList = tagList->parent;
 1458|  2.21M|    FREE(parser, p->buf);
  ------------------
  |  |  716|  2.21M|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1459|  2.21M|    destroyBindings(p->bindings, parser);
 1460|  2.21M|    FREE(parser, p);
  ------------------
  |  |  716|  2.21M|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1461|  2.21M|  }
 1462|       |  /* free m_openInternalEntities and m_freeInternalEntities */
 1463|  18.6k|  entityList = parser->m_openInternalEntities;
 1464|  20.6k|  for (;;) {
 1465|  20.6k|    OPEN_INTERNAL_ENTITY *openEntity;
 1466|  20.6k|    if (entityList == NULL) {
  ------------------
  |  Branch (1466:9): [True: 19.2k, False: 1.37k]
  ------------------
 1467|  19.2k|      if (parser->m_freeInternalEntities == NULL)
  ------------------
  |  Branch (1467:11): [True: 18.6k, False: 627]
  ------------------
 1468|  18.6k|        break;
 1469|    627|      entityList = parser->m_freeInternalEntities;
 1470|    627|      parser->m_freeInternalEntities = NULL;
 1471|    627|    }
 1472|  2.00k|    openEntity = entityList;
 1473|  2.00k|    entityList = entityList->next;
 1474|  2.00k|    FREE(parser, openEntity);
  ------------------
  |  |  716|  2.00k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1475|  2.00k|  }
 1476|       |
 1477|  18.6k|  destroyBindings(parser->m_freeBindingList, parser);
 1478|  18.6k|  destroyBindings(parser->m_inheritedBindings, parser);
 1479|  18.6k|  poolDestroy(&parser->m_tempPool);
 1480|  18.6k|  poolDestroy(&parser->m_temp2Pool);
 1481|  18.6k|  FREE(parser, (void *)parser->m_protocolEncodingName);
  ------------------
  |  |  716|  18.6k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1482|  18.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|  18.6k|  if (! parser->m_isParamEntity && parser->m_dtd)
  ------------------
  |  Branch (1486:7): [True: 18.6k, False: 0]
  |  Branch (1486:36): [True: 18.6k, False: 0]
  ------------------
 1487|       |#else
 1488|       |  if (parser->m_dtd)
 1489|       |#endif /* XML_DTD */
 1490|  18.6k|    dtdDestroy(parser->m_dtd, (XML_Bool)! parser->m_parentParser,
 1491|  18.6k|               &parser->m_mem);
 1492|  18.6k|  FREE(parser, (void *)parser->m_atts);
  ------------------
  |  |  716|  18.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|  18.6k|  FREE(parser, parser->m_groupConnector);
  ------------------
  |  |  716|  18.6k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1497|  18.6k|  FREE(parser, parser->m_buffer);
  ------------------
  |  |  716|  18.6k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1498|  18.6k|  FREE(parser, parser->m_dataBuf);
  ------------------
  |  |  716|  18.6k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1499|  18.6k|  FREE(parser, parser->m_nsAtts);
  ------------------
  |  |  716|  18.6k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1500|  18.6k|  FREE(parser, parser->m_unknownEncodingMem);
  ------------------
  |  |  716|  18.6k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1501|  18.6k|  if (parser->m_unknownEncodingRelease)
  ------------------
  |  Branch (1501:7): [True: 0, False: 18.6k]
  ------------------
 1502|      0|    parser->m_unknownEncodingRelease(parser->m_unknownEncodingData);
 1503|  18.6k|  FREE(parser, parser);
  ------------------
  |  |  716|  18.6k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1504|  18.6k|}
XML_SetElementHandler:
 1596|  18.6k|                      XML_EndElementHandler end) {
 1597|  18.6k|  if (parser == NULL)
  ------------------
  |  Branch (1597:7): [True: 0, False: 18.6k]
  ------------------
 1598|      0|    return;
 1599|  18.6k|  parser->m_startElementHandler = start;
 1600|  18.6k|  parser->m_endElementHandler = end;
 1601|  18.6k|}
XML_SetHashSalt:
 1816|  18.6k|XML_SetHashSalt(XML_Parser parser, unsigned long hash_salt) {
 1817|  18.6k|  if (parser == NULL)
  ------------------
  |  Branch (1817:7): [True: 0, False: 18.6k]
  ------------------
 1818|      0|    return 0;
 1819|  18.6k|  if (parser->m_parentParser)
  ------------------
  |  Branch (1819:7): [True: 0, False: 18.6k]
  ------------------
 1820|      0|    return XML_SetHashSalt(parser->m_parentParser, hash_salt);
 1821|       |  /* block after XML_Parse()/XML_ParseBuffer() has been called */
 1822|  18.6k|  if (parser->m_parsingStatus.parsing == XML_PARSING
  ------------------
  |  Branch (1822:7): [True: 0, False: 18.6k]
  ------------------
 1823|  18.6k|      || parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (1823:10): [True: 0, False: 18.6k]
  ------------------
 1824|      0|    return 0;
 1825|  18.6k|  parser->m_hash_secret_salt = hash_salt;
 1826|  18.6k|  return 1;
 1827|  18.6k|}
XML_ParseBuffer:
 1984|  18.6k|XML_ParseBuffer(XML_Parser parser, int len, int isFinal) {
 1985|  18.6k|  const char *start;
 1986|  18.6k|  enum XML_Status result = XML_STATUS_OK;
  ------------------
  |  |   75|  18.6k|#define XML_STATUS_OK XML_STATUS_OK
  ------------------
 1987|       |
 1988|  18.6k|  if (parser == NULL)
  ------------------
  |  Branch (1988:7): [True: 0, False: 18.6k]
  ------------------
 1989|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1990|  18.6k|  switch (parser->m_parsingStatus.parsing) {
 1991|      0|  case XML_SUSPENDED:
  ------------------
  |  Branch (1991:3): [True: 0, False: 18.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: 18.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|  18.6k|  case XML_INITIALIZED:
  ------------------
  |  Branch (1997:3): [True: 18.6k, False: 0]
  ------------------
 1998|       |    /* Has someone called XML_GetBuffer successfully before? */
 1999|  18.6k|    if (! parser->m_bufferPtr) {
  ------------------
  |  Branch (1999:9): [True: 0, False: 18.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|  18.6k|    if (parser->m_parentParser == NULL && ! startParsing(parser)) {
  ------------------
  |  Branch (2004:9): [True: 18.6k, False: 0]
  |  Branch (2004:43): [True: 0, False: 18.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|  18.6k|  default:
  ------------------
  |  Branch (2009:3): [True: 0, False: 18.6k]
  ------------------
 2010|  18.6k|    parser->m_parsingStatus.parsing = XML_PARSING;
 2011|  18.6k|  }
 2012|       |
 2013|  18.6k|  start = parser->m_bufferPtr;
 2014|  18.6k|  parser->m_positionPtr = start;
 2015|  18.6k|  parser->m_bufferEnd += len;
 2016|  18.6k|  parser->m_parseEndPtr = parser->m_bufferEnd;
 2017|  18.6k|  parser->m_parseEndByteIndex += len;
 2018|  18.6k|  parser->m_parsingStatus.finalBuffer = (XML_Bool)isFinal;
 2019|       |
 2020|  18.6k|  parser->m_errorCode = parser->m_processor(
 2021|  18.6k|      parser, start, parser->m_parseEndPtr, &parser->m_bufferPtr);
 2022|       |
 2023|  18.6k|  if (parser->m_errorCode != XML_ERROR_NONE) {
  ------------------
  |  Branch (2023:7): [True: 8.02k, False: 10.6k]
  ------------------
 2024|  8.02k|    parser->m_eventEndPtr = parser->m_eventPtr;
 2025|  8.02k|    parser->m_processor = errorProcessor;
 2026|  8.02k|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|  8.02k|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2027|  10.6k|  } else {
 2028|  10.6k|    switch (parser->m_parsingStatus.parsing) {
 2029|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (2029:5): [True: 0, False: 10.6k]
  ------------------
 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: 10.6k]
  ------------------
 2033|  10.6k|    case XML_PARSING:
  ------------------
  |  Branch (2033:5): [True: 10.6k, False: 0]
  ------------------
 2034|  10.6k|      if (isFinal) {
  ------------------
  |  Branch (2034:11): [True: 0, False: 10.6k]
  ------------------
 2035|      0|        parser->m_parsingStatus.parsing = XML_FINISHED;
 2036|      0|        return result;
 2037|      0|      }
 2038|  10.6k|    default:; /* should not happen */
  ------------------
  |  Branch (2038:5): [True: 0, False: 10.6k]
  ------------------
 2039|  10.6k|    }
 2040|  10.6k|  }
 2041|       |
 2042|  10.6k|  XmlUpdatePosition(parser->m_encoding, parser->m_positionPtr,
  ------------------
  |  |  270|  10.6k|  (((enc)->updatePosition)(enc, ptr, end, pos))
  ------------------
 2043|  10.6k|                    parser->m_bufferPtr, &parser->m_position);
 2044|  10.6k|  parser->m_positionPtr = parser->m_bufferPtr;
 2045|  10.6k|  return result;
 2046|  18.6k|}
XML_GetBuffer:
 2049|  18.6k|XML_GetBuffer(XML_Parser parser, int len) {
 2050|  18.6k|  if (parser == NULL)
  ------------------
  |  Branch (2050:7): [True: 0, False: 18.6k]
  ------------------
 2051|      0|    return NULL;
 2052|  18.6k|  if (len < 0) {
  ------------------
  |  Branch (2052:7): [True: 0, False: 18.6k]
  ------------------
 2053|      0|    parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2054|      0|    return NULL;
 2055|      0|  }
 2056|  18.6k|  switch (parser->m_parsingStatus.parsing) {
 2057|      0|  case XML_SUSPENDED:
  ------------------
  |  Branch (2057:3): [True: 0, False: 18.6k]
  ------------------
 2058|      0|    parser->m_errorCode = XML_ERROR_SUSPENDED;
 2059|      0|    return NULL;
 2060|      0|  case XML_FINISHED:
  ------------------
  |  Branch (2060:3): [True: 0, False: 18.6k]
  ------------------
 2061|      0|    parser->m_errorCode = XML_ERROR_FINISHED;
 2062|      0|    return NULL;
 2063|  18.6k|  default:;
  ------------------
  |  Branch (2063:3): [True: 18.6k, False: 0]
  ------------------
 2064|  18.6k|  }
 2065|       |
 2066|  18.6k|  if (len > EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_bufferEnd)) {
  ------------------
  |  |  200|  18.6k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 18.6k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2066:7): [True: 18.6k, False: 0]
  ------------------
 2067|  18.6k|#ifdef XML_CONTEXT_BYTES
 2068|  18.6k|    int keep;
 2069|  18.6k|#endif /* defined XML_CONTEXT_BYTES */
 2070|       |    /* Do not invoke signed arithmetic overflow: */
 2071|  18.6k|    int neededSize = (int)((unsigned)len
 2072|  18.6k|                           + (unsigned)EXPAT_SAFE_PTR_DIFF(
  ------------------
  |  |  200|  18.6k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 18.6k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2073|  18.6k|                               parser->m_bufferEnd, parser->m_bufferPtr));
 2074|  18.6k|    if (neededSize < 0) {
  ------------------
  |  Branch (2074:9): [True: 0, False: 18.6k]
  ------------------
 2075|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2076|      0|      return NULL;
 2077|      0|    }
 2078|  18.6k|#ifdef XML_CONTEXT_BYTES
 2079|  18.6k|    keep = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer);
  ------------------
  |  |  200|  18.6k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 18.6k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2080|  18.6k|    if (keep > XML_CONTEXT_BYTES)
  ------------------
  |  |   98|  18.6k|#define XML_CONTEXT_BYTES 1024
  ------------------
  |  Branch (2080:9): [True: 0, False: 18.6k]
  ------------------
 2081|      0|      keep = XML_CONTEXT_BYTES;
  ------------------
  |  |   98|      0|#define XML_CONTEXT_BYTES 1024
  ------------------
 2082|       |    /* Detect and prevent integer overflow */
 2083|  18.6k|    if (keep > INT_MAX - neededSize) {
  ------------------
  |  Branch (2083:9): [True: 0, False: 18.6k]
  ------------------
 2084|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2085|      0|      return NULL;
 2086|      0|    }
 2087|  18.6k|    neededSize += keep;
 2088|  18.6k|#endif /* defined XML_CONTEXT_BYTES */
 2089|  18.6k|    if (neededSize
  ------------------
  |  Branch (2089:9): [True: 0, False: 18.6k]
  ------------------
 2090|  18.6k|        <= EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_buffer)) {
  ------------------
  |  |  200|  18.6k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 18.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|  18.6k|    } else {
 2114|  18.6k|      char *newBuf;
 2115|  18.6k|      int bufferSize
 2116|  18.6k|          = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_bufferPtr);
  ------------------
  |  |  200|  18.6k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 18.6k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2117|  18.6k|      if (bufferSize == 0)
  ------------------
  |  Branch (2117:11): [True: 18.6k, False: 0]
  ------------------
 2118|  18.6k|        bufferSize = INIT_BUFFER_SIZE;
  ------------------
  |  |  247|  18.6k|#define INIT_BUFFER_SIZE 1024
  ------------------
 2119|  29.3k|      do {
 2120|       |        /* Do not invoke signed arithmetic overflow: */
 2121|  29.3k|        bufferSize = (int)(2U * (unsigned)bufferSize);
 2122|  29.3k|      } while (bufferSize < neededSize && bufferSize > 0);
  ------------------
  |  Branch (2122:16): [True: 10.7k, False: 18.6k]
  |  Branch (2122:43): [True: 10.7k, False: 0]
  ------------------
 2123|  18.6k|      if (bufferSize <= 0) {
  ------------------
  |  Branch (2123:11): [True: 0, False: 18.6k]
  ------------------
 2124|      0|        parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2125|      0|        return NULL;
 2126|      0|      }
 2127|  18.6k|      newBuf = (char *)MALLOC(parser, bufferSize);
  ------------------
  |  |  714|  18.6k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2128|  18.6k|      if (newBuf == 0) {
  ------------------
  |  Branch (2128:11): [True: 0, False: 18.6k]
  ------------------
 2129|      0|        parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2130|      0|        return NULL;
 2131|      0|      }
 2132|  18.6k|      parser->m_bufferLim = newBuf + bufferSize;
 2133|  18.6k|#ifdef XML_CONTEXT_BYTES
 2134|  18.6k|      if (parser->m_bufferPtr) {
  ------------------
  |  Branch (2134:11): [True: 0, False: 18.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|  18.6k|      } else {
 2146|       |        /* This must be a brand new buffer with no data in it yet */
 2147|  18.6k|        parser->m_bufferEnd = newBuf;
 2148|  18.6k|        parser->m_bufferPtr = parser->m_buffer = newBuf;
 2149|  18.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|  18.6k|    }
 2165|  18.6k|    parser->m_eventPtr = parser->m_eventEndPtr = NULL;
 2166|  18.6k|    parser->m_positionPtr = NULL;
 2167|  18.6k|  }
 2168|  18.6k|  return parser->m_bufferEnd;
 2169|  18.6k|}
xmlparse.c:parserCreate:
  977|  18.6k|             DTD *dtd) {
  978|  18.6k|  XML_Parser parser;
  979|       |
  980|  18.6k|  if (memsuite) {
  ------------------
  |  Branch (980:7): [True: 0, False: 18.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|  18.6k|  } else {
  990|  18.6k|    XML_Memory_Handling_Suite *mtemp;
  991|  18.6k|    parser = (XML_Parser)malloc(sizeof(struct XML_ParserStruct));
  992|  18.6k|    if (parser != NULL) {
  ------------------
  |  Branch (992:9): [True: 18.6k, False: 0]
  ------------------
  993|  18.6k|      mtemp = (XML_Memory_Handling_Suite *)&(parser->m_mem);
  994|  18.6k|      mtemp->malloc_fcn = malloc;
  995|  18.6k|      mtemp->realloc_fcn = realloc;
  996|  18.6k|      mtemp->free_fcn = free;
  997|  18.6k|    }
  998|  18.6k|  }
  999|       |
 1000|  18.6k|  if (! parser)
  ------------------
  |  Branch (1000:7): [True: 0, False: 18.6k]
  ------------------
 1001|      0|    return parser;
 1002|       |
 1003|  18.6k|  parser->m_buffer = NULL;
 1004|  18.6k|  parser->m_bufferLim = NULL;
 1005|       |
 1006|  18.6k|  parser->m_attsSize = INIT_ATTS_SIZE;
  ------------------
  |  |  244|  18.6k|#define INIT_ATTS_SIZE 16
  ------------------
 1007|  18.6k|  parser->m_atts
 1008|  18.6k|      = (ATTRIBUTE *)MALLOC(parser, parser->m_attsSize * sizeof(ATTRIBUTE));
  ------------------
  |  |  714|  18.6k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 1009|  18.6k|  if (parser->m_atts == NULL) {
  ------------------
  |  Branch (1009:7): [True: 0, False: 18.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|  18.6k|  parser->m_dataBuf
 1023|  18.6k|      = (XML_Char *)MALLOC(parser, INIT_DATA_BUF_SIZE * sizeof(XML_Char));
  ------------------
  |  |  714|  18.6k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 1024|  18.6k|  if (parser->m_dataBuf == NULL) {
  ------------------
  |  Branch (1024:7): [True: 0, False: 18.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|  18.6k|  parser->m_dataBufEnd = parser->m_dataBuf + INIT_DATA_BUF_SIZE;
  ------------------
  |  |  243|  18.6k|#define INIT_DATA_BUF_SIZE 1024
  ------------------
 1033|       |
 1034|  18.6k|  if (dtd)
  ------------------
  |  Branch (1034:7): [True: 0, False: 18.6k]
  ------------------
 1035|      0|    parser->m_dtd = dtd;
 1036|  18.6k|  else {
 1037|  18.6k|    parser->m_dtd = dtdCreate(&parser->m_mem);
 1038|  18.6k|    if (parser->m_dtd == NULL) {
  ------------------
  |  Branch (1038:9): [True: 0, False: 18.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|  18.6k|  }
 1048|       |
 1049|  18.6k|  parser->m_freeBindingList = NULL;
 1050|  18.6k|  parser->m_freeTagList = NULL;
 1051|  18.6k|  parser->m_freeInternalEntities = NULL;
 1052|       |
 1053|  18.6k|  parser->m_groupSize = 0;
 1054|  18.6k|  parser->m_groupConnector = NULL;
 1055|       |
 1056|  18.6k|  parser->m_unknownEncodingHandler = NULL;
 1057|  18.6k|  parser->m_unknownEncodingHandlerData = NULL;
 1058|       |
 1059|  18.6k|  parser->m_namespaceSeparator = ASCII_EXCL;
  ------------------
  |  |  103|  18.6k|#define ASCII_EXCL 0x21
  ------------------
 1060|  18.6k|  parser->m_ns = XML_FALSE;
  ------------------
  |  |   56|  18.6k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1061|  18.6k|  parser->m_ns_triplets = XML_FALSE;
  ------------------
  |  |   56|  18.6k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1062|       |
 1063|  18.6k|  parser->m_nsAtts = NULL;
 1064|  18.6k|  parser->m_nsAttsVersion = 0;
 1065|  18.6k|  parser->m_nsAttsPower = 0;
 1066|       |
 1067|  18.6k|  parser->m_protocolEncodingName = NULL;
 1068|       |
 1069|  18.6k|  poolInit(&parser->m_tempPool, &(parser->m_mem));
 1070|  18.6k|  poolInit(&parser->m_temp2Pool, &(parser->m_mem));
 1071|  18.6k|  parserInit(parser, encodingName);
 1072|       |
 1073|  18.6k|  if (encodingName && ! parser->m_protocolEncodingName) {
  ------------------
  |  Branch (1073:7): [True: 18.6k, False: 0]
  |  Branch (1073:23): [True: 0, False: 18.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|  18.6k|  if (nameSep) {
  ------------------
  |  Branch (1086:7): [True: 0, False: 18.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|  18.6k|  } else {
 1091|  18.6k|    parser->m_internalEncoding = XmlGetInternalEncoding();
  ------------------
  |  |  162|  18.6k|#  define XmlGetInternalEncoding XmlGetUtf8InternalEncoding
  ------------------
 1092|  18.6k|  }
 1093|       |
 1094|  18.6k|  return parser;
 1095|  18.6k|}
xmlparse.c:dtdCreate:
 6716|  18.6k|dtdCreate(const XML_Memory_Handling_Suite *ms) {
 6717|  18.6k|  DTD *p = ms->malloc_fcn(sizeof(DTD));
 6718|  18.6k|  if (p == NULL)
  ------------------
  |  Branch (6718:7): [True: 0, False: 18.6k]
  ------------------
 6719|      0|    return p;
 6720|  18.6k|  poolInit(&(p->pool), ms);
 6721|  18.6k|  poolInit(&(p->entityValuePool), ms);
 6722|  18.6k|  hashTableInit(&(p->generalEntities), ms);
 6723|  18.6k|  hashTableInit(&(p->elementTypes), ms);
 6724|  18.6k|  hashTableInit(&(p->attributeIds), ms);
 6725|  18.6k|  hashTableInit(&(p->prefixes), ms);
 6726|  18.6k|#ifdef XML_DTD
 6727|  18.6k|  p->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|  18.6k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6728|  18.6k|  hashTableInit(&(p->paramEntities), ms);
 6729|  18.6k|#endif /* XML_DTD */
 6730|  18.6k|  p->defaultPrefix.name = NULL;
 6731|  18.6k|  p->defaultPrefix.binding = NULL;
 6732|       |
 6733|  18.6k|  p->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|  18.6k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6734|  18.6k|  p->scaffIndex = NULL;
 6735|  18.6k|  p->scaffold = NULL;
 6736|  18.6k|  p->scaffLevel = 0;
 6737|  18.6k|  p->scaffSize = 0;
 6738|  18.6k|  p->scaffCount = 0;
 6739|  18.6k|  p->contentStringLen = 0;
 6740|       |
 6741|  18.6k|  p->keepProcessing = XML_TRUE;
  ------------------
  |  |   55|  18.6k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6742|  18.6k|  p->hasParamEntityRefs = XML_FALSE;
  ------------------
  |  |   56|  18.6k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6743|  18.6k|  p->standalone = XML_FALSE;
  ------------------
  |  |   56|  18.6k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6744|  18.6k|  return p;
 6745|  18.6k|}
xmlparse.c:hashTableInit:
 7150|  93.2k|hashTableInit(HASH_TABLE *p, const XML_Memory_Handling_Suite *ms) {
 7151|  93.2k|  p->power = 0;
 7152|  93.2k|  p->size = 0;
 7153|  93.2k|  p->used = 0;
 7154|  93.2k|  p->v = NULL;
 7155|  93.2k|  p->mem = ms;
 7156|  93.2k|}
xmlparse.c:poolInit:
 7175|  74.6k|poolInit(STRING_POOL *pool, const XML_Memory_Handling_Suite *ms) {
 7176|  74.6k|  pool->blocks = NULL;
 7177|  74.6k|  pool->freeBlocks = NULL;
 7178|  74.6k|  pool->start = NULL;
 7179|  74.6k|  pool->ptr = NULL;
 7180|  74.6k|  pool->end = NULL;
 7181|  74.6k|  pool->mem = ms;
 7182|  74.6k|}
xmlparse.c:parserInit:
 1098|  18.6k|parserInit(XML_Parser parser, const XML_Char *encodingName) {
 1099|  18.6k|  parser->m_processor = prologInitProcessor;
 1100|  18.6k|  XmlPrologStateInit(&parser->m_prologState);
 1101|  18.6k|  if (encodingName != NULL) {
  ------------------
  |  Branch (1101:7): [True: 18.6k, False: 0]
  ------------------
 1102|  18.6k|    parser->m_protocolEncodingName = copyString(encodingName, &(parser->m_mem));
 1103|  18.6k|  }
 1104|  18.6k|  parser->m_curBase = NULL;
 1105|  18.6k|  XmlInitEncoding(&parser->m_initEncoding, &parser->m_encoding, 0);
 1106|  18.6k|  parser->m_userData = NULL;
 1107|  18.6k|  parser->m_handlerArg = NULL;
 1108|  18.6k|  parser->m_startElementHandler = NULL;
 1109|  18.6k|  parser->m_endElementHandler = NULL;
 1110|  18.6k|  parser->m_characterDataHandler = NULL;
 1111|  18.6k|  parser->m_processingInstructionHandler = NULL;
 1112|  18.6k|  parser->m_commentHandler = NULL;
 1113|  18.6k|  parser->m_startCdataSectionHandler = NULL;
 1114|  18.6k|  parser->m_endCdataSectionHandler = NULL;
 1115|  18.6k|  parser->m_defaultHandler = NULL;
 1116|  18.6k|  parser->m_startDoctypeDeclHandler = NULL;
 1117|  18.6k|  parser->m_endDoctypeDeclHandler = NULL;
 1118|  18.6k|  parser->m_unparsedEntityDeclHandler = NULL;
 1119|  18.6k|  parser->m_notationDeclHandler = NULL;
 1120|  18.6k|  parser->m_startNamespaceDeclHandler = NULL;
 1121|  18.6k|  parser->m_endNamespaceDeclHandler = NULL;
 1122|  18.6k|  parser->m_notStandaloneHandler = NULL;
 1123|  18.6k|  parser->m_externalEntityRefHandler = NULL;
 1124|  18.6k|  parser->m_externalEntityRefHandlerArg = parser;
 1125|  18.6k|  parser->m_skippedEntityHandler = NULL;
 1126|  18.6k|  parser->m_elementDeclHandler = NULL;
 1127|  18.6k|  parser->m_attlistDeclHandler = NULL;
 1128|  18.6k|  parser->m_entityDeclHandler = NULL;
 1129|  18.6k|  parser->m_xmlDeclHandler = NULL;
 1130|  18.6k|  parser->m_bufferPtr = parser->m_buffer;
 1131|  18.6k|  parser->m_bufferEnd = parser->m_buffer;
 1132|  18.6k|  parser->m_parseEndByteIndex = 0;
 1133|  18.6k|  parser->m_parseEndPtr = NULL;
 1134|  18.6k|  parser->m_declElementType = NULL;
 1135|  18.6k|  parser->m_declAttributeId = NULL;
 1136|  18.6k|  parser->m_declEntity = NULL;
 1137|  18.6k|  parser->m_doctypeName = NULL;
 1138|  18.6k|  parser->m_doctypeSysid = NULL;
 1139|  18.6k|  parser->m_doctypePubid = NULL;
 1140|  18.6k|  parser->m_declAttributeType = NULL;
 1141|  18.6k|  parser->m_declNotationName = NULL;
 1142|  18.6k|  parser->m_declNotationPublicId = NULL;
 1143|  18.6k|  parser->m_declAttributeIsCdata = XML_FALSE;
  ------------------
  |  |   56|  18.6k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1144|  18.6k|  parser->m_declAttributeIsId = XML_FALSE;
  ------------------
  |  |   56|  18.6k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1145|  18.6k|  memset(&parser->m_position, 0, sizeof(POSITION));
 1146|  18.6k|  parser->m_errorCode = XML_ERROR_NONE;
 1147|  18.6k|  parser->m_eventPtr = NULL;
 1148|  18.6k|  parser->m_eventEndPtr = NULL;
 1149|  18.6k|  parser->m_positionPtr = NULL;
 1150|  18.6k|  parser->m_openInternalEntities = NULL;
 1151|  18.6k|  parser->m_defaultExpandInternalEntities = XML_TRUE;
  ------------------
  |  |   55|  18.6k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 1152|  18.6k|  parser->m_tagLevel = 0;
 1153|  18.6k|  parser->m_tagStack = NULL;
 1154|  18.6k|  parser->m_inheritedBindings = NULL;
 1155|  18.6k|  parser->m_nSpecifiedAtts = 0;
 1156|  18.6k|  parser->m_unknownEncodingMem = NULL;
 1157|  18.6k|  parser->m_unknownEncodingRelease = NULL;
 1158|  18.6k|  parser->m_unknownEncodingData = NULL;
 1159|  18.6k|  parser->m_parentParser = NULL;
 1160|  18.6k|  parser->m_parsingStatus.parsing = XML_INITIALIZED;
 1161|  18.6k|#ifdef XML_DTD
 1162|  18.6k|  parser->m_isParamEntity = XML_FALSE;
  ------------------
  |  |   56|  18.6k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1163|  18.6k|  parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|  18.6k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1164|  18.6k|  parser->m_paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER;
 1165|  18.6k|#endif
 1166|  18.6k|  parser->m_hash_secret_salt = 0;
 1167|       |
 1168|  18.6k|#ifdef XML_DTD
 1169|  18.6k|  memset(&parser->m_accounting, 0, sizeof(ACCOUNTING));
 1170|  18.6k|  parser->m_accounting.debugLevel = getDebugLevel("EXPAT_ACCOUNTING_DEBUG", 0u);
 1171|  18.6k|  parser->m_accounting.maximumAmplificationFactor
 1172|  18.6k|      = EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_MAXIMUM_AMPLIFICATION_DEFAULT;
  ------------------
  |  |  143|  18.6k|  100.0f
  ------------------
 1173|  18.6k|  parser->m_accounting.activationThresholdBytes
 1174|  18.6k|      = EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_ACTIVATION_THRESHOLD_DEFAULT;
  ------------------
  |  |  145|  18.6k|  8388608 // 8 MiB, 2^23
  ------------------
 1175|       |
 1176|  18.6k|  memset(&parser->m_entity_stats, 0, sizeof(ENTITY_STATS));
 1177|  18.6k|  parser->m_entity_stats.debugLevel = getDebugLevel("EXPAT_ENTITY_DEBUG", 0u);
 1178|  18.6k|#endif
 1179|  18.6k|}
xmlparse.c:prologInitProcessor:
 4406|  18.6k|                    const char **nextPtr) {
 4407|  18.6k|  enum XML_Error result = initializeEncoding(parser);
 4408|  18.6k|  if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4408:7): [True: 0, False: 18.6k]
  ------------------
 4409|      0|    return result;
 4410|  18.6k|  parser->m_processor = prologProcessor;
 4411|  18.6k|  return prologProcessor(parser, s, end, nextPtr);
 4412|  18.6k|}
xmlparse.c:initializeEncoding:
 4249|  18.6k|initializeEncoding(XML_Parser parser) {
 4250|  18.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|  18.6k|  s = parser->m_protocolEncodingName;
 4271|  18.6k|#endif
 4272|  18.6k|  if ((parser->m_ns ? XmlInitEncodingNS : XmlInitEncoding)(
  ------------------
  |  Branch (4272:7): [True: 18.6k, False: 0]
  |  Branch (4272:8): [True: 0, False: 18.6k]
  ------------------
 4273|  18.6k|          &parser->m_initEncoding, &parser->m_encoding, s))
 4274|  18.6k|    return XML_ERROR_NONE;
 4275|      0|  return handleUnknownEncoding(parser, parser->m_protocolEncodingName);
 4276|  18.6k|}
xmlparse.c:prologProcessor:
 4606|  18.6k|                const char **nextPtr) {
 4607|  18.6k|  const char *next = s;
 4608|  18.6k|  int tok = XmlPrologTok(parser->m_encoding, s, end, &next);
  ------------------
  |  |  227|  18.6k|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  18.6k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 4609|  18.6k|  return doProlog(parser, parser->m_encoding, s, end, tok, next, nextPtr,
 4610|  18.6k|                  (XML_Bool)! parser->m_parsingStatus.finalBuffer, XML_TRUE,
  ------------------
  |  |   55|  18.6k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4611|  18.6k|                  XML_ACCOUNT_DIRECT);
 4612|  18.6k|}
xmlparse.c:doProlog:
 4617|  18.6k|         XML_Bool allowClosingDoctype, enum XML_Account account) {
 4618|  18.6k|#ifdef XML_DTD
 4619|  18.6k|  static const XML_Char externalSubsetName[] = {ASCII_HASH, '\0'};
  ------------------
  |  |  121|  18.6k|#define ASCII_HASH 0x23
  ------------------
 4620|  18.6k|#endif /* XML_DTD */
 4621|  18.6k|  static const XML_Char atypeCDATA[]
 4622|  18.6k|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   38|  18.6k|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   39|  18.6k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   36|  18.6k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   55|  18.6k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   36|  18.6k|#define ASCII_A 0x41
  ------------------
 4623|  18.6k|  static const XML_Char atypeID[] = {ASCII_I, ASCII_D, '\0'};
  ------------------
  |  |   44|  18.6k|#define ASCII_I 0x49
  ------------------
                static const XML_Char atypeID[] = {ASCII_I, ASCII_D, '\0'};
  ------------------
  |  |   39|  18.6k|#define ASCII_D 0x44
  ------------------
 4624|  18.6k|  static const XML_Char atypeIDREF[]
 4625|  18.6k|      = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   44|  18.6k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   39|  18.6k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   53|  18.6k|#define ASCII_R 0x52
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   40|  18.6k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   41|  18.6k|#define ASCII_F 0x46
  ------------------
 4626|  18.6k|  static const XML_Char atypeIDREFS[]
 4627|  18.6k|      = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   44|  18.6k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   39|  18.6k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   53|  18.6k|#define ASCII_R 0x52
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   40|  18.6k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   41|  18.6k|#define ASCII_F 0x46
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   54|  18.6k|#define ASCII_S 0x53
  ------------------
 4628|  18.6k|  static const XML_Char atypeENTITY[]
 4629|  18.6k|      = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   40|  18.6k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   49|  18.6k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   55|  18.6k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   44|  18.6k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   55|  18.6k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   60|  18.6k|#define ASCII_Y 0x59
  ------------------
 4630|  18.6k|  static const XML_Char atypeENTITIES[]
 4631|  18.6k|      = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   40|  18.6k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   49|  18.6k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   55|  18.6k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   44|  18.6k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   55|  18.6k|#define ASCII_T 0x54
  ------------------
 4632|  18.6k|         ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   44|  18.6k|#define ASCII_I 0x49
  ------------------
                       ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   40|  18.6k|#define ASCII_E 0x45
  ------------------
                       ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   54|  18.6k|#define ASCII_S 0x53
  ------------------
 4633|  18.6k|  static const XML_Char atypeNMTOKEN[]
 4634|  18.6k|      = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   49|  18.6k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   48|  18.6k|#define ASCII_M 0x4D
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   55|  18.6k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   50|  18.6k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   46|  18.6k|#define ASCII_K 0x4B
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   40|  18.6k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   49|  18.6k|#define ASCII_N 0x4E
  ------------------
 4635|  18.6k|  static const XML_Char atypeNMTOKENS[]
 4636|  18.6k|      = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   49|  18.6k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   48|  18.6k|#define ASCII_M 0x4D
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   55|  18.6k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   50|  18.6k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   46|  18.6k|#define ASCII_K 0x4B
  ------------------
 4637|  18.6k|         ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   40|  18.6k|#define ASCII_E 0x45
  ------------------
                       ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   49|  18.6k|#define ASCII_N 0x4E
  ------------------
                       ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   54|  18.6k|#define ASCII_S 0x53
  ------------------
 4638|  18.6k|  static const XML_Char notationPrefix[]
 4639|  18.6k|      = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   49|  18.6k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   50|  18.6k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   55|  18.6k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   36|  18.6k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   55|  18.6k|#define ASCII_T 0x54
  ------------------
 4640|  18.6k|         ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   44|  18.6k|#define ASCII_I 0x49
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   50|  18.6k|#define ASCII_O 0x4F
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   49|  18.6k|#define ASCII_N 0x4E
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |  117|  18.6k|#define ASCII_LPAREN 0x28
  ------------------
 4641|  18.6k|  static const XML_Char enumValueSep[] = {ASCII_PIPE, '\0'};
  ------------------
  |  |  122|  18.6k|#define ASCII_PIPE 0x7C
  ------------------
 4642|  18.6k|  static const XML_Char enumValueStart[] = {ASCII_LPAREN, '\0'};
  ------------------
  |  |  117|  18.6k|#define ASCII_LPAREN 0x28
  ------------------
 4643|       |
 4644|       |#ifndef XML_DTD
 4645|       |  UNUSED_P(account);
 4646|       |#endif
 4647|       |
 4648|       |  /* save one level of indirection */
 4649|  18.6k|  DTD *const dtd = parser->m_dtd;
 4650|       |
 4651|  18.6k|  const char **eventPP;
 4652|  18.6k|  const char **eventEndPP;
 4653|  18.6k|  enum XML_Content_Quant quant;
 4654|       |
 4655|  18.6k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (4655:7): [True: 18.6k, False: 0]
  ------------------
 4656|  18.6k|    eventPP = &parser->m_eventPtr;
 4657|  18.6k|    eventEndPP = &parser->m_eventEndPtr;
 4658|  18.6k|  } else {
 4659|      0|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 4660|      0|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 4661|      0|  }
 4662|       |
 4663|  5.44M|  for (;;) {
 4664|  5.44M|    int role;
 4665|  5.44M|    XML_Bool handleDefault = XML_TRUE;
  ------------------
  |  |   55|  5.44M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4666|  5.44M|    *eventPP = s;
 4667|  5.44M|    *eventEndPP = next;
 4668|  5.44M|    if (tok <= 0) {
  ------------------
  |  Branch (4668:9): [True: 6.07k, False: 5.44M]
  ------------------
 4669|  6.07k|      if (haveMore && tok != XML_TOK_INVALID) {
  ------------------
  |  |   57|  6.07k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4669:11): [True: 6.07k, False: 0]
  |  Branch (4669:23): [True: 4.06k, False: 2.01k]
  ------------------
 4670|  4.06k|        *nextPtr = s;
 4671|  4.06k|        return XML_ERROR_NONE;
 4672|  4.06k|      }
 4673|  2.01k|      switch (tok) {
 4674|  2.01k|      case XML_TOK_INVALID:
  ------------------
  |  |   57|  2.01k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4674:7): [True: 2.01k, False: 0]
  ------------------
 4675|  2.01k|        *eventPP = next;
 4676|  2.01k|        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.01k]
  ------------------
 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.01k]
  ------------------
 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.01k]
  ------------------
 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.01k]
  ------------------
 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.01k]
  ------------------
 4706|      0|        tok = -tok;
 4707|      0|        next = end;
 4708|      0|        break;
 4709|  2.01k|      }
 4710|  2.01k|    }
 4711|  5.44M|    role = XmlTokenRole(&parser->m_prologState, tok, s, next, enc);
  ------------------
  |  |  136|  5.44M|  (((state)->handler)(state, tok, ptr, end, enc))
  ------------------
 4712|  5.44M|#ifdef XML_DTD
 4713|  5.44M|    switch (role) {
 4714|  10.9k|    case XML_ROLE_INSTANCE_START: // bytes accounted in contentProcessor
  ------------------
  |  Branch (4714:5): [True: 10.9k, False: 5.43M]
  ------------------
 4715|  11.2k|    case XML_ROLE_XML_DECL:       // bytes accounted in processXmlDecl
  ------------------
  |  Branch (4715:5): [True: 304, False: 5.44M]
  ------------------
 4716|  11.2k|    case XML_ROLE_TEXT_DECL:      // bytes accounted in processXmlDecl
  ------------------
  |  Branch (4716:5): [True: 0, False: 5.44M]
  ------------------
 4717|  11.2k|      break;
 4718|  5.42M|    default:
  ------------------
  |  Branch (4718:5): [True: 5.42M, False: 11.2k]
  ------------------
 4719|  5.42M|      if (! accountingDiffTolerated(parser, tok, s, next, __LINE__, account)) {
  ------------------
  |  Branch (4719:11): [True: 1, False: 5.42M]
  ------------------
 4720|      1|        accountingOnAbort(parser);
 4721|      1|        return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4722|      1|      }
 4723|  5.44M|    }
 4724|  5.44M|#endif
 4725|  5.44M|    switch (role) {
  ------------------
  |  Branch (4725:13): [True: 0, False: 5.44M]
  ------------------
 4726|    304|    case XML_ROLE_XML_DECL: {
  ------------------
  |  Branch (4726:5): [True: 304, False: 5.44M]
  ------------------
 4727|    304|      enum XML_Error result = processXmlDecl(parser, 0, s, next);
 4728|    304|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4728:11): [True: 224, False: 80]
  ------------------
 4729|    224|        return result;
 4730|     80|      enc = parser->m_encoding;
 4731|     80|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|     80|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4732|     80|    } break;
 4733|  5.66k|    case XML_ROLE_DOCTYPE_NAME:
  ------------------
  |  Branch (4733:5): [True: 5.66k, False: 5.43M]
  ------------------
 4734|  5.66k|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4734:11): [True: 0, False: 5.66k]
  ------------------
 4735|      0|        parser->m_doctypeName
 4736|      0|            = poolStoreString(&parser->m_tempPool, enc, s, next);
 4737|      0|        if (! parser->m_doctypeName)
  ------------------
  |  Branch (4737:13): [True: 0, False: 0]
  ------------------
 4738|      0|          return XML_ERROR_NO_MEMORY;
 4739|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4740|      0|        parser->m_doctypePubid = NULL;
 4741|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4742|      0|      }
 4743|  5.66k|      parser->m_doctypeSysid = NULL; /* always initialize to NULL */
 4744|  5.66k|      break;
 4745|  4.87k|    case XML_ROLE_DOCTYPE_INTERNAL_SUBSET:
  ------------------
  |  Branch (4745:5): [True: 4.87k, False: 5.43M]
  ------------------
 4746|  4.87k|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4746:11): [True: 0, False: 4.87k]
  ------------------
 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.87k|      break;
 4755|      0|#ifdef XML_DTD
 4756|      0|    case XML_ROLE_TEXT_DECL: {
  ------------------
  |  Branch (4756:5): [True: 0, False: 5.44M]
  ------------------
 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|    859|    case XML_ROLE_DOCTYPE_PUBLIC_ID:
  ------------------
  |  Branch (4764:5): [True: 859, False: 5.44M]
  ------------------
 4765|    859|#ifdef XML_DTD
 4766|    859|      parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|    859|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4767|    859|      parser->m_declEntity = (ENTITY *)lookup(
 4768|    859|          parser, &dtd->paramEntities, externalSubsetName, sizeof(ENTITY));
 4769|    859|      if (! parser->m_declEntity)
  ------------------
  |  Branch (4769:11): [True: 0, False: 859]
  ------------------
 4770|      0|        return XML_ERROR_NO_MEMORY;
 4771|    859|#endif /* XML_DTD */
 4772|    859|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|    859|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4773|    859|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4773:11): [True: 0, False: 859]
  ------------------
 4774|      0|        XML_Char *pubId;
 4775|      0|        if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|      0|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (4775:13): [True: 0, False: 0]
  ------------------
 4776|      0|          return XML_ERROR_PUBLICID;
 4777|      0|        pubId = poolStoreString(&parser->m_tempPool, enc,
 4778|      0|                                s + enc->minBytesPerChar,
 4779|      0|                                next - enc->minBytesPerChar);
 4780|      0|        if (! pubId)
  ------------------
  |  Branch (4780:13): [True: 0, False: 0]
  ------------------
 4781|      0|          return XML_ERROR_NO_MEMORY;
 4782|      0|        normalizePublicId(pubId);
 4783|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4784|      0|        parser->m_doctypePubid = pubId;
 4785|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4786|      0|        goto alreadyChecked;
 4787|      0|      }
 4788|       |      /* fall through */
 4789|  3.61k|    case XML_ROLE_ENTITY_PUBLIC_ID:
  ------------------
  |  Branch (4789:5): [True: 2.75k, False: 5.43M]
  ------------------
 4790|  3.61k|      if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|  3.61k|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (4790:11): [True: 127, False: 3.48k]
  ------------------
 4791|    127|        return XML_ERROR_PUBLICID;
 4792|  3.48k|    alreadyChecked:
 4793|  3.48k|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (4793:11): [True: 2.93k, False: 552]
  |  Branch (4793:34): [True: 962, False: 1.96k]
  ------------------
 4794|    962|        XML_Char *tem
 4795|    962|            = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 4796|    962|                              next - enc->minBytesPerChar);
 4797|    962|        if (! tem)
  ------------------
  |  Branch (4797:13): [True: 0, False: 962]
  ------------------
 4798|      0|          return XML_ERROR_NO_MEMORY;
 4799|    962|        normalizePublicId(tem);
 4800|    962|        parser->m_declEntity->publicId = tem;
 4801|    962|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|    962|#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|    962|        if (parser->m_entityDeclHandler && role == XML_ROLE_ENTITY_PUBLIC_ID)
  ------------------
  |  Branch (4805:13): [True: 0, False: 962]
  |  Branch (4805:44): [True: 0, False: 0]
  ------------------
 4806|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4807|    962|      }
 4808|  3.48k|      break;
 4809|  3.48k|    case XML_ROLE_DOCTYPE_CLOSE:
  ------------------
  |  Branch (4809:5): [True: 2.31k, False: 5.43M]
  ------------------
 4810|  2.31k|      if (allowClosingDoctype != XML_TRUE) {
  ------------------
  |  |   55|  2.31k|#define XML_TRUE ((XML_Bool)1)
  ------------------
  |  Branch (4810:11): [True: 0, False: 2.31k]
  ------------------
 4811|       |        /* Must not close doctype from within expanded parameter entities */
 4812|      0|        return XML_ERROR_INVALID_TOKEN;
 4813|      0|      }
 4814|       |
 4815|  2.31k|      if (parser->m_doctypeName) {
  ------------------
  |  Branch (4815:11): [True: 0, False: 2.31k]
  ------------------
 4816|      0|        parser->m_startDoctypeDeclHandler(
 4817|      0|            parser->m_handlerArg, parser->m_doctypeName, parser->m_doctypeSysid,
 4818|      0|            parser->m_doctypePubid, 0);
 4819|      0|        poolClear(&parser->m_tempPool);
 4820|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4821|      0|      }
 4822|       |      /* parser->m_doctypeSysid will be non-NULL in the case of a previous
 4823|       |         XML_ROLE_DOCTYPE_SYSTEM_ID, even if parser->m_startDoctypeDeclHandler
 4824|       |         was not set, indicating an external subset
 4825|       |      */
 4826|  2.31k|#ifdef XML_DTD
 4827|  2.31k|      if (parser->m_doctypeSysid || parser->m_useForeignDTD) {
  ------------------
  |  Branch (4827:11): [True: 170, False: 2.14k]
  |  Branch (4827:37): [True: 0, False: 2.14k]
  ------------------
 4828|    170|        XML_Bool hadParamEntityRefs = dtd->hasParamEntityRefs;
 4829|    170|        dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|    170|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4830|    170|        if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4830:13): [True: 0, False: 170]
  ------------------
 4831|    170|            && 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|    170|        parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|    170|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4862|    170|      }
 4863|  2.31k|#endif /* XML_DTD */
 4864|  2.31k|      if (parser->m_endDoctypeDeclHandler) {
  ------------------
  |  Branch (4864:11): [True: 0, False: 2.31k]
  ------------------
 4865|      0|        parser->m_endDoctypeDeclHandler(parser->m_handlerArg);
 4866|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4867|      0|      }
 4868|  2.31k|      break;
 4869|  10.9k|    case XML_ROLE_INSTANCE_START:
  ------------------
  |  Branch (4869:5): [True: 10.9k, False: 5.43M]
  ------------------
 4870|  10.9k|#ifdef XML_DTD
 4871|       |      /* if there is no DOCTYPE declaration then now is the
 4872|       |         last chance to read the foreign DTD
 4873|       |      */
 4874|  10.9k|      if (parser->m_useForeignDTD) {
  ------------------
  |  Branch (4874:11): [True: 0, False: 10.9k]
  ------------------
 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|  10.9k|#endif /* XML_DTD */
 4903|  10.9k|      parser->m_processor = contentProcessor;
 4904|  10.9k|      return contentProcessor(parser, s, end, nextPtr);
 4905|  10.6k|    case XML_ROLE_ATTLIST_ELEMENT_NAME:
  ------------------
  |  Branch (4905:5): [True: 10.6k, False: 5.43M]
  ------------------
 4906|  10.6k|      parser->m_declElementType = getElementType(parser, enc, s, next);
 4907|  10.6k|      if (! parser->m_declElementType)
  ------------------
  |  Branch (4907:11): [True: 0, False: 10.6k]
  ------------------
 4908|      0|        return XML_ERROR_NO_MEMORY;
 4909|  10.6k|      goto checkAttListDeclHandler;
 4910|  38.4k|    case XML_ROLE_ATTRIBUTE_NAME:
  ------------------
  |  Branch (4910:5): [True: 38.4k, False: 5.40M]
  ------------------
 4911|  38.4k|      parser->m_declAttributeId = getAttributeId(parser, enc, s, next);
 4912|  38.4k|      if (! parser->m_declAttributeId)
  ------------------
  |  Branch (4912:11): [True: 0, False: 38.4k]
  ------------------
 4913|      0|        return XML_ERROR_NO_MEMORY;
 4914|  38.4k|      parser->m_declAttributeIsCdata = XML_FALSE;
  ------------------
  |  |   56|  38.4k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4915|  38.4k|      parser->m_declAttributeType = NULL;
 4916|  38.4k|      parser->m_declAttributeIsId = XML_FALSE;
  ------------------
  |  |   56|  38.4k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4917|  38.4k|      goto checkAttListDeclHandler;
 4918|  2.47k|    case XML_ROLE_ATTRIBUTE_TYPE_CDATA:
  ------------------
  |  Branch (4918:5): [True: 2.47k, False: 5.43M]
  ------------------
 4919|  2.47k|      parser->m_declAttributeIsCdata = XML_TRUE;
  ------------------
  |  |   55|  2.47k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4920|  2.47k|      parser->m_declAttributeType = atypeCDATA;
 4921|  2.47k|      goto checkAttListDeclHandler;
 4922|  5.37k|    case XML_ROLE_ATTRIBUTE_TYPE_ID:
  ------------------
  |  Branch (4922:5): [True: 5.37k, False: 5.43M]
  ------------------
 4923|  5.37k|      parser->m_declAttributeIsId = XML_TRUE;
  ------------------
  |  |   55|  5.37k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4924|  5.37k|      parser->m_declAttributeType = atypeID;
 4925|  5.37k|      goto checkAttListDeclHandler;
 4926|    806|    case XML_ROLE_ATTRIBUTE_TYPE_IDREF:
  ------------------
  |  Branch (4926:5): [True: 806, False: 5.44M]
  ------------------
 4927|    806|      parser->m_declAttributeType = atypeIDREF;
 4928|    806|      goto checkAttListDeclHandler;
 4929|    171|    case XML_ROLE_ATTRIBUTE_TYPE_IDREFS:
  ------------------
  |  Branch (4929:5): [True: 171, False: 5.44M]
  ------------------
 4930|    171|      parser->m_declAttributeType = atypeIDREFS;
 4931|    171|      goto checkAttListDeclHandler;
 4932|    300|    case XML_ROLE_ATTRIBUTE_TYPE_ENTITY:
  ------------------
  |  Branch (4932:5): [True: 300, False: 5.44M]
  ------------------
 4933|    300|      parser->m_declAttributeType = atypeENTITY;
 4934|    300|      goto checkAttListDeclHandler;
 4935|     74|    case XML_ROLE_ATTRIBUTE_TYPE_ENTITIES:
  ------------------
  |  Branch (4935:5): [True: 74, False: 5.44M]
  ------------------
 4936|     74|      parser->m_declAttributeType = atypeENTITIES;
 4937|     74|      goto checkAttListDeclHandler;
 4938|     75|    case XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN:
  ------------------
  |  Branch (4938:5): [True: 75, False: 5.44M]
  ------------------
 4939|     75|      parser->m_declAttributeType = atypeNMTOKEN;
 4940|     75|      goto checkAttListDeclHandler;
 4941|     66|    case XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS:
  ------------------
  |  Branch (4941:5): [True: 66, False: 5.44M]
  ------------------
 4942|     66|      parser->m_declAttributeType = atypeNMTOKENS;
 4943|  58.3k|    checkAttListDeclHandler:
 4944|  58.3k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler)
  ------------------
  |  Branch (4944:11): [True: 56.2k, False: 2.13k]
  |  Branch (4944:34): [True: 0, False: 56.2k]
  ------------------
 4945|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4946|  58.3k|      break;
 4947|  34.1k|    case XML_ROLE_ATTRIBUTE_ENUM_VALUE:
  ------------------
  |  Branch (4947:5): [True: 34.1k, False: 5.40M]
  ------------------
 4948|  35.2k|    case XML_ROLE_ATTRIBUTE_NOTATION_VALUE:
  ------------------
  |  Branch (4948:5): [True: 1.10k, False: 5.43M]
  ------------------
 4949|  35.2k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler) {
  ------------------
  |  Branch (4949:11): [True: 32.9k, False: 2.35k]
  |  Branch (4949:34): [True: 0, False: 32.9k]
  ------------------
 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|  35.2k|      break;
 4965|  35.2k|    case XML_ROLE_IMPLIED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4965:5): [True: 25.2k, False: 5.41M]
  ------------------
 4966|  28.3k|    case XML_ROLE_REQUIRED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4966:5): [True: 3.09k, False: 5.43M]
  ------------------
 4967|  28.3k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (4967:11): [True: 27.9k, False: 349]
  ------------------
 4968|  27.9k|        if (! defineAttribute(parser->m_declElementType,
  ------------------
  |  Branch (4968:13): [True: 0, False: 27.9k]
  ------------------
 4969|  27.9k|                              parser->m_declAttributeId,
 4970|  27.9k|                              parser->m_declAttributeIsCdata,
 4971|  27.9k|                              parser->m_declAttributeIsId, 0, parser))
 4972|      0|          return XML_ERROR_NO_MEMORY;
 4973|  27.9k|        if (parser->m_attlistDeclHandler && parser->m_declAttributeType) {
  ------------------
  |  Branch (4973:13): [True: 0, False: 27.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|  27.9k|      }
 4992|  28.3k|      poolClear(&parser->m_tempPool);
 4993|  28.3k|      break;
 4994|  8.36k|    case XML_ROLE_DEFAULT_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4994:5): [True: 8.36k, False: 5.43M]
  ------------------
 4995|  9.58k|    case XML_ROLE_FIXED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4995:5): [True: 1.22k, False: 5.43M]
  ------------------
 4996|  9.58k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (4996:11): [True: 8.90k, False: 679]
  ------------------
 4997|  8.90k|        const XML_Char *attVal;
 4998|  8.90k|        enum XML_Error result = storeAttributeValue(
 4999|  8.90k|            parser, enc, parser->m_declAttributeIsCdata,
 5000|  8.90k|            s + enc->minBytesPerChar, next - enc->minBytesPerChar, &dtd->pool,
 5001|  8.90k|            XML_ACCOUNT_NONE);
 5002|  8.90k|        if (result)
  ------------------
  |  Branch (5002:13): [True: 26, False: 8.87k]
  ------------------
 5003|     26|          return result;
 5004|  8.87k|        attVal = poolStart(&dtd->pool);
  ------------------
  |  |  596|  8.87k|#define poolStart(pool) ((pool)->start)
  ------------------
 5005|  8.87k|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|  8.87k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5006|       |        /* ID attributes aren't allowed to have a default */
 5007|  8.87k|        if (! defineAttribute(
  ------------------
  |  Branch (5007:13): [True: 0, False: 8.87k]
  ------------------
 5008|  8.87k|                parser->m_declElementType, parser->m_declAttributeId,
 5009|  8.87k|                parser->m_declAttributeIsCdata, XML_FALSE, attVal, parser))
  ------------------
  |  |   56|  8.87k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5010|      0|          return XML_ERROR_NO_MEMORY;
 5011|  8.87k|        if (parser->m_attlistDeclHandler && parser->m_declAttributeType) {
  ------------------
  |  Branch (5011:13): [True: 0, False: 8.87k]
  |  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.87k|      }
 5031|  9.55k|      break;
 5032|  9.55k|    case XML_ROLE_ENTITY_VALUE:
  ------------------
  |  Branch (5032:5): [True: 6.91k, False: 5.43M]
  ------------------
 5033|  6.91k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5033:11): [True: 6.68k, False: 233]
  ------------------
 5034|  6.68k|        enum XML_Error result
 5035|  6.68k|            = storeEntityValue(parser, enc, s + enc->minBytesPerChar,
 5036|  6.68k|                               next - enc->minBytesPerChar, XML_ACCOUNT_NONE);
 5037|  6.68k|        if (parser->m_declEntity) {
  ------------------
  |  Branch (5037:13): [True: 3.82k, False: 2.85k]
  ------------------
 5038|  3.82k|          parser->m_declEntity->textPtr = poolStart(&dtd->entityValuePool);
  ------------------
  |  |  596|  3.82k|#define poolStart(pool) ((pool)->start)
  ------------------
 5039|  3.82k|          parser->m_declEntity->textLen
 5040|  3.82k|              = (int)(poolLength(&dtd->entityValuePool));
  ------------------
  |  |  597|  3.82k|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
 5041|  3.82k|          poolFinish(&dtd->entityValuePool);
  ------------------
  |  |  601|  3.82k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5042|  3.82k|          if (parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5042:15): [True: 0, False: 3.82k]
  ------------------
 5043|      0|            *eventEndPP = s;
 5044|      0|            parser->m_entityDeclHandler(
 5045|      0|                parser->m_handlerArg, parser->m_declEntity->name,
 5046|      0|                parser->m_declEntity->is_param, parser->m_declEntity->textPtr,
 5047|      0|                parser->m_declEntity->textLen, parser->m_curBase, 0, 0, 0);
 5048|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5049|      0|          }
 5050|  3.82k|        } else
 5051|  2.85k|          poolDiscard(&dtd->entityValuePool);
  ------------------
  |  |  600|  2.85k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5052|  6.68k|        if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5052:13): [True: 62, False: 6.62k]
  ------------------
 5053|     62|          return result;
 5054|  6.68k|      }
 5055|  6.85k|      break;
 5056|  6.85k|    case XML_ROLE_DOCTYPE_SYSTEM_ID:
  ------------------
  |  Branch (5056:5): [True: 216, False: 5.44M]
  ------------------
 5057|    216|#ifdef XML_DTD
 5058|    216|      parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|    216|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5059|    216|#endif /* XML_DTD */
 5060|    216|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|    216|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5061|    216|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (5061:11): [True: 0, False: 216]
  ------------------
 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|    216|#ifdef XML_DTD
 5071|    216|      else
 5072|       |        /* use externalSubsetName to make parser->m_doctypeSysid non-NULL
 5073|       |           for the case where no parser->m_startDoctypeDeclHandler is set */
 5074|    216|        parser->m_doctypeSysid = externalSubsetName;
 5075|    216|#endif /* XML_DTD */
 5076|    216|      if (! dtd->standalone
  ------------------
  |  Branch (5076:11): [True: 215, False: 1]
  ------------------
 5077|    216|#ifdef XML_DTD
 5078|    216|          && ! parser->m_paramEntityParsing
  ------------------
  |  Branch (5078:14): [True: 215, False: 0]
  ------------------
 5079|    216|#endif /* XML_DTD */
 5080|    216|          && parser->m_notStandaloneHandler
  ------------------
  |  Branch (5080:14): [True: 0, False: 215]
  ------------------
 5081|    216|          && ! 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|    216|      if (! parser->m_declEntity) {
  ------------------
  |  Branch (5086:11): [True: 10, False: 206]
  ------------------
 5087|     10|        parser->m_declEntity = (ENTITY *)lookup(
 5088|     10|            parser, &dtd->paramEntities, externalSubsetName, sizeof(ENTITY));
 5089|     10|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5089:13): [True: 0, False: 10]
  ------------------
 5090|      0|          return XML_ERROR_NO_MEMORY;
 5091|     10|        parser->m_declEntity->publicId = NULL;
 5092|     10|      }
 5093|    216|#endif /* XML_DTD */
 5094|       |      /* fall through */
 5095|  3.32k|    case XML_ROLE_ENTITY_SYSTEM_ID:
  ------------------
  |  Branch (5095:5): [True: 3.10k, False: 5.43M]
  ------------------
 5096|  3.32k|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (5096:11): [True: 2.75k, False: 571]
  |  Branch (5096:34): [True: 554, False: 2.19k]
  ------------------
 5097|    554|        parser->m_declEntity->systemId
 5098|    554|            = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 5099|    554|                              next - enc->minBytesPerChar);
 5100|    554|        if (! parser->m_declEntity->systemId)
  ------------------
  |  Branch (5100:13): [True: 0, False: 554]
  ------------------
 5101|      0|          return XML_ERROR_NO_MEMORY;
 5102|    554|        parser->m_declEntity->base = parser->m_curBase;
 5103|    554|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|    554|#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|    554|        if (parser->m_entityDeclHandler && role == XML_ROLE_ENTITY_SYSTEM_ID)
  ------------------
  |  Branch (5107:13): [True: 0, False: 554]
  |  Branch (5107:44): [True: 0, False: 0]
  ------------------
 5108|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5109|    554|      }
 5110|  3.32k|      break;
 5111|  3.32k|    case XML_ROLE_ENTITY_COMPLETE:
  ------------------
  |  Branch (5111:5): [True: 2.52k, False: 5.43M]
  ------------------
 5112|  2.52k|      if (dtd->keepProcessing && parser->m_declEntity
  ------------------
  |  Branch (5112:11): [True: 2.40k, False: 125]
  |  Branch (5112:34): [True: 288, False: 2.11k]
  ------------------
 5113|  2.52k|          && parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5113:14): [True: 0, False: 288]
  ------------------
 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.52k|      break;
 5122|    558|    case XML_ROLE_ENTITY_NOTATION_NAME:
  ------------------
  |  Branch (5122:5): [True: 558, False: 5.44M]
  ------------------
 5123|    558|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (5123:11): [True: 114, False: 444]
  |  Branch (5123:34): [True: 39, False: 75]
  ------------------
 5124|     39|        parser->m_declEntity->notation
 5125|     39|            = poolStoreString(&dtd->pool, enc, s, next);
 5126|     39|        if (! parser->m_declEntity->notation)
  ------------------
  |  Branch (5126:13): [True: 0, False: 39]
  ------------------
 5127|      0|          return XML_ERROR_NO_MEMORY;
 5128|     39|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|     39|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5129|     39|        if (parser->m_unparsedEntityDeclHandler) {
  ------------------
  |  Branch (5129:13): [True: 0, False: 39]
  ------------------
 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|     39|        } else if (parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5136:20): [True: 0, False: 39]
  ------------------
 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|     39|      }
 5145|    558|      break;
 5146|  5.50k|    case XML_ROLE_GENERAL_ENTITY_NAME: {
  ------------------
  |  Branch (5146:5): [True: 5.50k, False: 5.43M]
  ------------------
 5147|  5.50k|      if (XmlPredefinedEntityName(enc, s, next)) {
  ------------------
  |  |  267|  5.50k|  (((enc)->predefinedEntityName)(enc, ptr, end))
  |  |  ------------------
  |  |  |  Branch (267:3): [True: 81, False: 5.42k]
  |  |  ------------------
  ------------------
 5148|     81|        parser->m_declEntity = NULL;
 5149|     81|        break;
 5150|     81|      }
 5151|  5.42k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5151:11): [True: 4.80k, False: 619]
  ------------------
 5152|  4.80k|        const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next);
 5153|  4.80k|        if (! name)
  ------------------
  |  Branch (5153:13): [True: 0, False: 4.80k]
  ------------------
 5154|      0|          return XML_ERROR_NO_MEMORY;
 5155|  4.80k|        parser->m_declEntity = (ENTITY *)lookup(parser, &dtd->generalEntities,
 5156|  4.80k|                                                name, sizeof(ENTITY));
 5157|  4.80k|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5157:13): [True: 0, False: 4.80k]
  ------------------
 5158|      0|          return XML_ERROR_NO_MEMORY;
 5159|  4.80k|        if (parser->m_declEntity->name != name) {
  ------------------
  |  Branch (5159:13): [True: 1.12k, False: 3.68k]
  ------------------
 5160|  1.12k|          poolDiscard(&dtd->pool);
  ------------------
  |  |  600|  1.12k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5161|  1.12k|          parser->m_declEntity = NULL;
 5162|  3.68k|        } else {
 5163|  3.68k|          poolFinish(&dtd->pool);
  ------------------
  |  |  601|  3.68k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5164|  3.68k|          parser->m_declEntity->publicId = NULL;
 5165|  3.68k|          parser->m_declEntity->is_param = XML_FALSE;
  ------------------
  |  |   56|  3.68k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5166|       |          /* if we have a parent parser or are reading an internal parameter
 5167|       |             entity, then the entity declaration is not considered "internal"
 5168|       |          */
 5169|  3.68k|          parser->m_declEntity->is_internal
 5170|  3.68k|              = ! (parser->m_parentParser || parser->m_openInternalEntities);
  ------------------
  |  Branch (5170:20): [True: 0, False: 3.68k]
  |  Branch (5170:46): [True: 0, False: 3.68k]
  ------------------
 5171|  3.68k|          if (parser->m_entityDeclHandler)
  ------------------
  |  Branch (5171:15): [True: 0, False: 3.68k]
  ------------------
 5172|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5173|  3.68k|        }
 5174|  4.80k|      } else {
 5175|    619|        poolDiscard(&dtd->pool);
  ------------------
  |  |  600|    619|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5176|    619|        parser->m_declEntity = NULL;
 5177|    619|      }
 5178|  5.42k|    } break;
 5179|  5.42k|    case XML_ROLE_PARAM_ENTITY_NAME:
  ------------------
  |  Branch (5179:5): [True: 4.68k, False: 5.43M]
  ------------------
 5180|  4.68k|#ifdef XML_DTD
 5181|  4.68k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5181:11): [True: 4.48k, False: 202]
  ------------------
 5182|  4.48k|        const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next);
 5183|  4.48k|        if (! name)
  ------------------
  |  Branch (5183:13): [True: 0, False: 4.48k]
  ------------------
 5184|      0|          return XML_ERROR_NO_MEMORY;
 5185|  4.48k|        parser->m_declEntity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 5186|  4.48k|                                                name, sizeof(ENTITY));
 5187|  4.48k|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5187:13): [True: 0, False: 4.48k]
  ------------------
 5188|      0|          return XML_ERROR_NO_MEMORY;
 5189|  4.48k|        if (parser->m_declEntity->name != name) {
  ------------------
  |  Branch (5189:13): [True: 3.91k, False: 568]
  ------------------
 5190|  3.91k|          poolDiscard(&dtd->pool);
  ------------------
  |  |  600|  3.91k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5191|  3.91k|          parser->m_declEntity = NULL;
 5192|  3.91k|        } else {
 5193|    568|          poolFinish(&dtd->pool);
  ------------------
  |  |  601|    568|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5194|    568|          parser->m_declEntity->publicId = NULL;
 5195|    568|          parser->m_declEntity->is_param = XML_TRUE;
  ------------------
  |  |   55|    568|#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|    568|          parser->m_declEntity->is_internal
 5200|    568|              = ! (parser->m_parentParser || parser->m_openInternalEntities);
  ------------------
  |  Branch (5200:20): [True: 0, False: 568]
  |  Branch (5200:46): [True: 0, False: 568]
  ------------------
 5201|    568|          if (parser->m_entityDeclHandler)
  ------------------
  |  Branch (5201:15): [True: 0, False: 568]
  ------------------
 5202|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5203|    568|        }
 5204|  4.48k|      } else {
 5205|    202|        poolDiscard(&dtd->pool);
  ------------------
  |  |  600|    202|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5206|    202|        parser->m_declEntity = NULL;
 5207|    202|      }
 5208|       |#else  /* not XML_DTD */
 5209|       |      parser->m_declEntity = NULL;
 5210|       |#endif /* XML_DTD */
 5211|  4.68k|      break;
 5212|  4.68k|    case XML_ROLE_NOTATION_NAME:
  ------------------
  |  Branch (5212:5): [True: 1.61k, False: 5.43M]
  ------------------
 5213|  1.61k|      parser->m_declNotationPublicId = NULL;
 5214|  1.61k|      parser->m_declNotationName = NULL;
 5215|  1.61k|      if (parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5215:11): [True: 0, False: 1.61k]
  ------------------
 5216|      0|        parser->m_declNotationName
 5217|      0|            = poolStoreString(&parser->m_tempPool, enc, s, next);
 5218|      0|        if (! parser->m_declNotationName)
  ------------------
  |  Branch (5218:13): [True: 0, False: 0]
  ------------------
 5219|      0|          return XML_ERROR_NO_MEMORY;
 5220|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5221|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5222|      0|      }
 5223|  1.61k|      break;
 5224|  1.61k|    case XML_ROLE_NOTATION_PUBLIC_ID:
  ------------------
  |  Branch (5224:5): [True: 1.06k, False: 5.43M]
  ------------------
 5225|  1.06k|      if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|  1.06k|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (5225:11): [True: 2, False: 1.06k]
  ------------------
 5226|      2|        return XML_ERROR_PUBLICID;
 5227|  1.06k|      if (parser
  ------------------
  |  Branch (5227:11): [True: 0, False: 1.06k]
  ------------------
 5228|  1.06k|              ->m_declNotationName) { /* means m_notationDeclHandler != NULL */
 5229|      0|        XML_Char *tem = poolStoreString(&parser->m_tempPool, enc,
 5230|      0|                                        s + enc->minBytesPerChar,
 5231|      0|                                        next - enc->minBytesPerChar);
 5232|      0|        if (! tem)
  ------------------
  |  Branch (5232:13): [True: 0, False: 0]
  ------------------
 5233|      0|          return XML_ERROR_NO_MEMORY;
 5234|      0|        normalizePublicId(tem);
 5235|      0|        parser->m_declNotationPublicId = tem;
 5236|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5237|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5238|      0|      }
 5239|  1.06k|      break;
 5240|  1.06k|    case XML_ROLE_NOTATION_SYSTEM_ID:
  ------------------
  |  Branch (5240:5): [True: 779, False: 5.44M]
  ------------------
 5241|    779|      if (parser->m_declNotationName && parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5241:11): [True: 0, False: 779]
  |  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|    779|      poolClear(&parser->m_tempPool);
 5254|    779|      break;
 5255|    804|    case XML_ROLE_NOTATION_NO_SYSTEM_ID:
  ------------------
  |  Branch (5255:5): [True: 804, False: 5.44M]
  ------------------
 5256|    804|      if (parser->m_declNotationPublicId && parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5256:11): [True: 0, False: 804]
  |  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|    804|      poolClear(&parser->m_tempPool);
 5264|    804|      break;
 5265|  1.22k|    case XML_ROLE_ERROR:
  ------------------
  |  Branch (5265:5): [True: 1.22k, False: 5.43M]
  ------------------
 5266|  1.22k|      switch (tok) {
 5267|      4|      case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|      4|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (5267:7): [True: 4, False: 1.22k]
  ------------------
 5268|       |        /* PE references in internal subset are
 5269|       |           not allowed within declarations. */
 5270|      4|        return XML_ERROR_PARAM_ENTITY_REF;
 5271|      1|      case XML_TOK_XML_DECL:
  ------------------
  |  |   77|      1|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (5271:7): [True: 1, False: 1.22k]
  ------------------
 5272|      1|        return XML_ERROR_MISPLACED_XML_PI;
 5273|  1.22k|      default:
  ------------------
  |  Branch (5273:7): [True: 1.22k, False: 5]
  ------------------
 5274|  1.22k|        return XML_ERROR_SYNTAX;
 5275|  1.22k|      }
 5276|      0|#ifdef XML_DTD
 5277|      0|    case XML_ROLE_IGNORE_SECT: {
  ------------------
  |  Branch (5277:5): [True: 0, False: 5.44M]
  ------------------
 5278|      0|      enum XML_Error result;
 5279|      0|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (5279:11): [True: 0, False: 0]
  ------------------
 5280|      0|        reportDefault(parser, enc, s, next);
 5281|      0|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5282|      0|      result = doIgnoreSection(parser, enc, &next, end, nextPtr, haveMore);
 5283|      0|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5283:11): [True: 0, False: 0]
  ------------------
 5284|      0|        return result;
 5285|      0|      else if (! next) {
  ------------------
  |  Branch (5285:16): [True: 0, False: 0]
  ------------------
 5286|      0|        parser->m_processor = ignoreSectionProcessor;
 5287|      0|        return result;
 5288|      0|      }
 5289|      0|    } break;
 5290|      0|#endif /* XML_DTD */
 5291|  4.59M|    case XML_ROLE_GROUP_OPEN:
  ------------------
  |  Branch (5291:5): [True: 4.59M, False: 845k]
  ------------------
 5292|  4.59M|      if (parser->m_prologState.level >= parser->m_groupSize) {
  ------------------
  |  Branch (5292:11): [True: 1.05k, False: 4.59M]
  ------------------
 5293|  1.05k|        if (parser->m_groupSize) {
  ------------------
  |  Branch (5293:13): [True: 440, False: 619]
  ------------------
 5294|    440|          {
 5295|       |            /* Detect and prevent integer overflow */
 5296|    440|            if (parser->m_groupSize > (unsigned int)(-1) / 2u) {
  ------------------
  |  Branch (5296:17): [True: 0, False: 440]
  ------------------
 5297|      0|              return XML_ERROR_NO_MEMORY;
 5298|      0|            }
 5299|       |
 5300|    440|            char *const new_connector = (char *)REALLOC(
  ------------------
  |  |  715|    440|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 5301|    440|                parser, parser->m_groupConnector, parser->m_groupSize *= 2);
 5302|    440|            if (new_connector == NULL) {
  ------------------
  |  Branch (5302:17): [True: 0, False: 440]
  ------------------
 5303|      0|              parser->m_groupSize /= 2;
 5304|      0|              return XML_ERROR_NO_MEMORY;
 5305|      0|            }
 5306|    440|            parser->m_groupConnector = new_connector;
 5307|    440|          }
 5308|       |
 5309|    440|          if (dtd->scaffIndex) {
  ------------------
  |  Branch (5309:15): [True: 0, False: 440]
  ------------------
 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|    619|        } else {
 5327|    619|          parser->m_groupConnector
 5328|    619|              = (char *)MALLOC(parser, parser->m_groupSize = 32);
  ------------------
  |  |  714|    619|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5329|    619|          if (! parser->m_groupConnector) {
  ------------------
  |  Branch (5329:15): [True: 0, False: 619]
  ------------------
 5330|      0|            parser->m_groupSize = 0;
 5331|      0|            return XML_ERROR_NO_MEMORY;
 5332|      0|          }
 5333|    619|        }
 5334|  1.05k|      }
 5335|  4.59M|      parser->m_groupConnector[parser->m_prologState.level] = 0;
 5336|  4.59M|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5336:11): [True: 0, False: 4.59M]
  ------------------
 5337|      0|        int myindex = nextScaffoldPart(parser);
 5338|      0|        if (myindex < 0)
  ------------------
  |  Branch (5338:13): [True: 0, False: 0]
  ------------------
 5339|      0|          return XML_ERROR_NO_MEMORY;
 5340|      0|        assert(dtd->scaffIndex != NULL);
 5341|      0|        dtd->scaffIndex[dtd->scaffLevel] = myindex;
 5342|      0|        dtd->scaffLevel++;
 5343|      0|        dtd->scaffold[myindex].type = XML_CTYPE_SEQ;
 5344|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5344:13): [True: 0, False: 0]
  ------------------
 5345|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5346|      0|      }
 5347|  4.59M|      break;
 5348|  4.59M|    case XML_ROLE_GROUP_SEQUENCE:
  ------------------
  |  Branch (5348:5): [True: 5.80k, False: 5.43M]
  ------------------
 5349|  5.80k|      if (parser->m_groupConnector[parser->m_prologState.level] == ASCII_PIPE)
  ------------------
  |  |  122|  5.80k|#define ASCII_PIPE 0x7C
  ------------------
  |  Branch (5349:11): [True: 1, False: 5.80k]
  ------------------
 5350|      1|        return XML_ERROR_SYNTAX;
 5351|  5.80k|      parser->m_groupConnector[parser->m_prologState.level] = ASCII_COMMA;
  ------------------
  |  |  123|  5.80k|#define ASCII_COMMA 0x2C
  ------------------
 5352|  5.80k|      if (dtd->in_eldecl && parser->m_elementDeclHandler)
  ------------------
  |  Branch (5352:11): [True: 0, False: 5.80k]
  |  Branch (5352:29): [True: 0, False: 0]
  ------------------
 5353|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5354|  5.80k|      break;
 5355|  79.2k|    case XML_ROLE_GROUP_CHOICE:
  ------------------
  |  Branch (5355:5): [True: 79.2k, False: 5.36M]
  ------------------
 5356|  79.2k|      if (parser->m_groupConnector[parser->m_prologState.level] == ASCII_COMMA)
  ------------------
  |  |  123|  79.2k|#define ASCII_COMMA 0x2C
  ------------------
  |  Branch (5356:11): [True: 1, False: 79.2k]
  ------------------
 5357|      1|        return XML_ERROR_SYNTAX;
 5358|  79.2k|      if (dtd->in_eldecl
  ------------------
  |  Branch (5358:11): [True: 0, False: 79.2k]
  ------------------
 5359|  79.2k|          && ! parser->m_groupConnector[parser->m_prologState.level]
  ------------------
  |  Branch (5359:14): [True: 0, False: 0]
  ------------------
 5360|  79.2k|          && (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|  79.2k|      parser->m_groupConnector[parser->m_prologState.level] = ASCII_PIPE;
  ------------------
  |  |  122|  79.2k|#define ASCII_PIPE 0x7C
  ------------------
 5368|  79.2k|      break;
 5369|  2.93k|    case XML_ROLE_PARAM_ENTITY_REF:
  ------------------
  |  Branch (5369:5): [True: 2.93k, False: 5.43M]
  ------------------
 5370|  2.93k|#ifdef XML_DTD
 5371|  2.93k|    case XML_ROLE_INNER_PARAM_ENTITY_REF:
  ------------------
  |  Branch (5371:5): [True: 0, False: 5.44M]
  ------------------
 5372|  2.93k|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|  2.93k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5373|  2.93k|      if (! parser->m_paramEntityParsing)
  ------------------
  |  Branch (5373:11): [True: 2.93k, False: 0]
  ------------------
 5374|  2.93k|        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|  2.93k|#endif /* XML_DTD */
 5462|  2.93k|      if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (5462:11): [True: 2.73k, False: 202]
  |  Branch (5462:32): [True: 0, False: 2.73k]
  ------------------
 5463|  2.93k|          && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (5463:14): [True: 0, False: 0]
  ------------------
 5464|      0|        return XML_ERROR_NOT_STANDALONE;
 5465|  2.93k|      break;
 5466|       |
 5467|       |      /* Element declaration stuff */
 5468|       |
 5469|  3.74k|    case XML_ROLE_ELEMENT_NAME:
  ------------------
  |  Branch (5469:5): [True: 3.74k, False: 5.43M]
  ------------------
 5470|  3.74k|      if (parser->m_elementDeclHandler) {
  ------------------
  |  Branch (5470:11): [True: 0, False: 3.74k]
  ------------------
 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.74k|      break;
 5480|       |
 5481|  3.74k|    case XML_ROLE_CONTENT_ANY:
  ------------------
  |  Branch (5481:5): [True: 1, False: 5.44M]
  ------------------
 5482|     19|    case XML_ROLE_CONTENT_EMPTY:
  ------------------
  |  Branch (5482:5): [True: 18, False: 5.44M]
  ------------------
 5483|     19|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5483:11): [True: 0, False: 19]
  ------------------
 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|     19|      break;
 5503|       |
 5504|  1.56k|    case XML_ROLE_CONTENT_PCDATA:
  ------------------
  |  Branch (5504:5): [True: 1.56k, False: 5.43M]
  ------------------
 5505|  1.56k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5505:11): [True: 0, False: 1.56k]
  ------------------
 5506|      0|        dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type
 5507|      0|            = XML_CTYPE_MIXED;
 5508|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5508:13): [True: 0, False: 0]
  ------------------
 5509|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5510|      0|      }
 5511|  1.56k|      break;
 5512|       |
 5513|  69.2k|    case XML_ROLE_CONTENT_ELEMENT:
  ------------------
  |  Branch (5513:5): [True: 69.2k, False: 5.37M]
  ------------------
 5514|  69.2k|      quant = XML_CQUANT_NONE;
 5515|  69.2k|      goto elementContent;
 5516|  14.9k|    case XML_ROLE_CONTENT_ELEMENT_OPT:
  ------------------
  |  Branch (5516:5): [True: 14.9k, False: 5.42M]
  ------------------
 5517|  14.9k|      quant = XML_CQUANT_OPT;
 5518|  14.9k|      goto elementContent;
 5519|  1.40k|    case XML_ROLE_CONTENT_ELEMENT_REP:
  ------------------
  |  Branch (5519:5): [True: 1.40k, False: 5.43M]
  ------------------
 5520|  1.40k|      quant = XML_CQUANT_REP;
 5521|  1.40k|      goto elementContent;
 5522|  2.40k|    case XML_ROLE_CONTENT_ELEMENT_PLUS:
  ------------------
  |  Branch (5522:5): [True: 2.40k, False: 5.43M]
  ------------------
 5523|  2.40k|      quant = XML_CQUANT_PLUS;
 5524|  87.9k|    elementContent:
 5525|  87.9k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5525:11): [True: 0, False: 87.9k]
  ------------------
 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|  87.9k|      break;
 5555|       |
 5556|  87.9k|    case XML_ROLE_GROUP_CLOSE:
  ------------------
  |  Branch (5556:5): [True: 27.7k, False: 5.41M]
  ------------------
 5557|  27.7k|      quant = XML_CQUANT_NONE;
 5558|  27.7k|      goto closeGroup;
 5559|  4.39k|    case XML_ROLE_GROUP_CLOSE_OPT:
  ------------------
  |  Branch (5559:5): [True: 4.39k, False: 5.43M]
  ------------------
 5560|  4.39k|      quant = XML_CQUANT_OPT;
 5561|  4.39k|      goto closeGroup;
 5562|  3.73k|    case XML_ROLE_GROUP_CLOSE_REP:
  ------------------
  |  Branch (5562:5): [True: 3.73k, False: 5.43M]
  ------------------
 5563|  3.73k|      quant = XML_CQUANT_REP;
 5564|  3.73k|      goto closeGroup;
 5565|  8.67k|    case XML_ROLE_GROUP_CLOSE_PLUS:
  ------------------
  |  Branch (5565:5): [True: 8.67k, False: 5.43M]
  ------------------
 5566|  8.67k|      quant = XML_CQUANT_PLUS;
 5567|  44.5k|    closeGroup:
 5568|  44.5k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5568:11): [True: 0, False: 44.5k]
  ------------------
 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|  44.5k|      break;
 5587|       |      /* End element declaration stuff */
 5588|       |
 5589|  44.5k|    case XML_ROLE_PI:
  ------------------
  |  Branch (5589:5): [True: 6.81k, False: 5.43M]
  ------------------
 5590|  6.81k|      if (! reportProcessingInstruction(parser, enc, s, next))
  ------------------
  |  Branch (5590:11): [True: 0, False: 6.81k]
  ------------------
 5591|      0|        return XML_ERROR_NO_MEMORY;
 5592|  6.81k|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|  6.81k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5593|  6.81k|      break;
 5594|    890|    case XML_ROLE_COMMENT:
  ------------------
  |  Branch (5594:5): [True: 890, False: 5.44M]
  ------------------
 5595|    890|      if (! reportComment(parser, enc, s, next))
  ------------------
  |  Branch (5595:11): [True: 0, False: 890]
  ------------------
 5596|      0|        return XML_ERROR_NO_MEMORY;
 5597|    890|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|    890|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5598|    890|      break;
 5599|  6.53k|    case XML_ROLE_NONE:
  ------------------
  |  Branch (5599:5): [True: 6.53k, False: 5.43M]
  ------------------
 5600|  6.53k|      switch (tok) {
  ------------------
  |  Branch (5600:15): [True: 5.19k, False: 1.34k]
  ------------------
 5601|  1.34k|      case XML_TOK_BOM:
  ------------------
  |  |   79|  1.34k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
  |  Branch (5601:7): [True: 1.34k, False: 5.19k]
  ------------------
 5602|  1.34k|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|  1.34k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5603|  1.34k|        break;
 5604|  6.53k|      }
 5605|  6.53k|      break;
 5606|  17.1k|    case XML_ROLE_DOCTYPE_NONE:
  ------------------
  |  Branch (5606:5): [True: 17.1k, False: 5.42M]
  ------------------
 5607|  17.1k|      if (parser->m_startDoctypeDeclHandler)
  ------------------
  |  Branch (5607:11): [True: 0, False: 17.1k]
  ------------------
 5608|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5609|  17.1k|      break;
 5610|  58.6k|    case XML_ROLE_ENTITY_NONE:
  ------------------
  |  Branch (5610:5): [True: 58.6k, False: 5.38M]
  ------------------
 5611|  58.6k|      if (dtd->keepProcessing && parser->m_entityDeclHandler)
  ------------------
  |  Branch (5611:11): [True: 51.9k, False: 6.64k]
  |  Branch (5611:34): [True: 0, False: 51.9k]
  ------------------
 5612|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5613|  58.6k|      break;
 5614|  10.1k|    case XML_ROLE_NOTATION_NONE:
  ------------------
  |  Branch (5614:5): [True: 10.1k, False: 5.43M]
  ------------------
 5615|  10.1k|      if (parser->m_notationDeclHandler)
  ------------------
  |  Branch (5615:11): [True: 0, False: 10.1k]
  ------------------
 5616|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5617|  10.1k|      break;
 5618|   219k|    case XML_ROLE_ATTLIST_NONE:
  ------------------
  |  Branch (5618:5): [True: 219k, False: 5.22M]
  ------------------
 5619|   219k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler)
  ------------------
  |  Branch (5619:11): [True: 209k, False: 9.79k]
  |  Branch (5619:34): [True: 0, False: 209k]
  ------------------
 5620|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5621|   219k|      break;
 5622|   112k|    case XML_ROLE_ELEMENT_NONE:
  ------------------
  |  Branch (5622:5): [True: 112k, False: 5.32M]
  ------------------
 5623|   112k|      if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5623:11): [True: 0, False: 112k]
  ------------------
 5624|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5625|   112k|      break;
 5626|  5.44M|    } /* end of big switch */
 5627|       |
 5628|  5.42M|    if (handleDefault && parser->m_defaultHandler)
  ------------------
  |  Branch (5628:9): [True: 5.41M, False: 9.12k]
  |  Branch (5628:26): [True: 0, False: 5.41M]
  ------------------
 5629|      0|      reportDefault(parser, enc, s, next);
 5630|       |
 5631|  5.42M|    switch (parser->m_parsingStatus.parsing) {
 5632|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (5632:5): [True: 0, False: 5.42M]
  ------------------
 5633|      0|      *nextPtr = next;
 5634|      0|      return XML_ERROR_NONE;
 5635|      0|    case XML_FINISHED:
  ------------------
  |  Branch (5635:5): [True: 0, False: 5.42M]
  ------------------
 5636|      0|      return XML_ERROR_ABORTED;
 5637|  5.42M|    default:
  ------------------
  |  Branch (5637:5): [True: 5.42M, False: 0]
  ------------------
 5638|  5.42M|      s = next;
 5639|  5.42M|      tok = XmlPrologTok(enc, s, end, &next);
  ------------------
  |  |  227|  5.42M|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  5.42M|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5640|  5.42M|    }
 5641|  5.42M|  }
 5642|       |  /* not reached */
 5643|  18.6k|}
xmlparse.c:accountingDiffTolerated:
 7737|  42.2M|                        enum XML_Account account) {
 7738|       |  /* Note: We need to check the token type *first* to be sure that
 7739|       |   *       we can even access variable <after>, safely.
 7740|       |   *       E.g. for XML_TOK_NONE <after> may hold an invalid pointer. */
 7741|  42.2M|  switch (tok) {
  ------------------
  |  Branch (7741:11): [True: 38.5M, False: 3.66M]
  ------------------
 7742|  2.68k|  case XML_TOK_INVALID:
  ------------------
  |  |   57|  2.68k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (7742:3): [True: 2.68k, False: 42.2M]
  ------------------
 7743|  5.11k|  case XML_TOK_PARTIAL:
  ------------------
  |  |   56|  5.11k|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (7743:3): [True: 2.42k, False: 42.2M]
  ------------------
 7744|  5.51k|  case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|  5.51k|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (7744:3): [True: 404, False: 42.2M]
  ------------------
 7745|  3.66M|  case XML_TOK_NONE:
  ------------------
  |  |   51|  3.66M|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (7745:3): [True: 3.65M, False: 38.5M]
  ------------------
 7746|  3.66M|    return XML_TRUE;
  ------------------
  |  |   55|  3.66M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7747|  42.2M|  }
 7748|       |
 7749|  38.5M|  if (account == XML_ACCOUNT_NONE)
  ------------------
  |  Branch (7749:7): [True: 1.26M, False: 37.3M]
  ------------------
 7750|  1.26M|    return XML_TRUE; /* because these bytes have been accounted for, already */
  ------------------
  |  |   55|  1.26M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7751|       |
 7752|  37.3M|  unsigned int levelsAwayFromRootParser;
 7753|  37.3M|  const XML_Parser rootParser
 7754|  37.3M|      = getRootParserOf(originParser, &levelsAwayFromRootParser);
 7755|  37.3M|  assert(! rootParser->m_parentParser);
 7756|       |
 7757|      0|  const int isDirect
 7758|  37.3M|      = (account == XML_ACCOUNT_DIRECT) && (originParser == rootParser);
  ------------------
  |  Branch (7758:9): [True: 7.78M, False: 29.5M]
  |  Branch (7758:44): [True: 7.78M, False: 0]
  ------------------
 7759|  37.3M|  const ptrdiff_t bytesMore = after - before;
 7760|       |
 7761|  37.3M|  XmlBigCount *const additionTarget
 7762|  37.3M|      = isDirect ? &rootParser->m_accounting.countBytesDirect
  ------------------
  |  Branch (7762:9): [True: 7.78M, False: 29.5M]
  ------------------
 7763|  37.3M|                 : &rootParser->m_accounting.countBytesIndirect;
 7764|       |
 7765|       |  /* Detect and avoid integer overflow */
 7766|  37.3M|  if (*additionTarget > (XmlBigCount)(-1) - (XmlBigCount)bytesMore)
  ------------------
  |  Branch (7766:7): [True: 0, False: 37.3M]
  ------------------
 7767|      0|    return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7768|  37.3M|  *additionTarget += bytesMore;
 7769|       |
 7770|  37.3M|  const XmlBigCount countBytesOutput
 7771|  37.3M|      = rootParser->m_accounting.countBytesDirect
 7772|  37.3M|        + rootParser->m_accounting.countBytesIndirect;
 7773|  37.3M|  const float amplificationFactor
 7774|  37.3M|      = accountingGetCurrentAmplification(rootParser);
 7775|  37.3M|  const XML_Bool tolerated
 7776|  37.3M|      = (countBytesOutput < rootParser->m_accounting.activationThresholdBytes)
  ------------------
  |  Branch (7776:9): [True: 18.5M, False: 18.8M]
  ------------------
 7777|  37.3M|        || (amplificationFactor
  ------------------
  |  Branch (7777:12): [True: 18.8M, False: 66]
  ------------------
 7778|  18.8M|            <= rootParser->m_accounting.maximumAmplificationFactor);
 7779|       |
 7780|  37.3M|  if (rootParser->m_accounting.debugLevel >= 2u) {
  ------------------
  |  Branch (7780:7): [True: 0, False: 37.3M]
  ------------------
 7781|      0|    accountingReportStats(rootParser, "");
 7782|      0|    accountingReportDiff(rootParser, levelsAwayFromRootParser, before, after,
 7783|      0|                         bytesMore, source_line, account);
 7784|      0|  }
 7785|       |
 7786|  37.3M|  return tolerated;
 7787|  37.3M|}
xmlparse.c:getRootParserOf:
 7852|  44.5M|getRootParserOf(XML_Parser parser, unsigned int *outLevelDiff) {
 7853|  44.5M|  XML_Parser rootParser = parser;
 7854|  44.5M|  unsigned int stepsTakenUpwards = 0;
 7855|  44.5M|  while (rootParser->m_parentParser) {
  ------------------
  |  Branch (7855:10): [True: 0, False: 44.5M]
  ------------------
 7856|      0|    rootParser = rootParser->m_parentParser;
 7857|      0|    stepsTakenUpwards++;
 7858|      0|  }
 7859|  44.5M|  assert(! rootParser->m_parentParser);
 7860|  44.5M|  if (outLevelDiff != NULL) {
  ------------------
  |  Branch (7860:7): [True: 37.3M, False: 7.25M]
  ------------------
 7861|  37.3M|    *outLevelDiff = stepsTakenUpwards;
 7862|  37.3M|  }
 7863|  44.5M|  return rootParser;
 7864|  44.5M|}
xmlparse.c:accountingGetCurrentAmplification:
 7660|  37.3M|accountingGetCurrentAmplification(XML_Parser rootParser) {
 7661|  37.3M|  const XmlBigCount countBytesOutput
 7662|  37.3M|      = rootParser->m_accounting.countBytesDirect
 7663|  37.3M|        + rootParser->m_accounting.countBytesIndirect;
 7664|  37.3M|  const float amplificationFactor
 7665|  37.3M|      = rootParser->m_accounting.countBytesDirect
  ------------------
  |  Branch (7665:9): [True: 37.3M, False: 0]
  ------------------
 7666|  37.3M|            ? (countBytesOutput
 7667|  37.3M|               / (float)(rootParser->m_accounting.countBytesDirect))
 7668|  37.3M|            : 1.0f;
 7669|  37.3M|  assert(! rootParser->m_parentParser);
 7670|      0|  return amplificationFactor;
 7671|  37.3M|}
xmlparse.c:accountingReportStats:
 7674|     66|accountingReportStats(XML_Parser originParser, const char *epilog) {
 7675|     66|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7676|     66|  assert(! rootParser->m_parentParser);
 7677|       |
 7678|     66|  if (rootParser->m_accounting.debugLevel == 0u) {
  ------------------
  |  Branch (7678:7): [True: 66, False: 0]
  ------------------
 7679|     66|    return;
 7680|     66|  }
 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|     66|accountingOnAbort(XML_Parser originParser) {
 7694|     66|  accountingReportStats(originParser, " ABORTING\n");
 7695|     66|}
xmlparse.c:processXmlDecl:
 4280|    304|               const char *next) {
 4281|    304|  const char *encodingName = NULL;
 4282|    304|  const XML_Char *storedEncName = NULL;
 4283|    304|  const ENCODING *newEncoding = NULL;
 4284|    304|  const char *version = NULL;
 4285|    304|  const char *versionend = NULL;
 4286|    304|  const XML_Char *storedversion = NULL;
 4287|    304|  int standalone = -1;
 4288|       |
 4289|    304|#ifdef XML_DTD
 4290|    304|  if (! accountingDiffTolerated(parser, XML_TOK_XML_DECL, s, next, __LINE__,
  ------------------
  |  |   77|    304|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (4290:7): [True: 0, False: 304]
  ------------------
 4291|    304|                                XML_ACCOUNT_DIRECT)) {
 4292|      0|    accountingOnAbort(parser);
 4293|      0|    return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4294|      0|  }
 4295|    304|#endif
 4296|       |
 4297|    304|  if (! (parser->m_ns ? XmlParseXmlDeclNS : XmlParseXmlDecl)(
  ------------------
  |  Branch (4297:7): [True: 224, False: 80]
  |  Branch (4297:10): [True: 0, False: 304]
  ------------------
 4298|    304|          isGeneralTextEntity, parser->m_encoding, s, next, &parser->m_eventPtr,
 4299|    304|          &version, &versionend, &encodingName, &newEncoding, &standalone)) {
 4300|    224|    if (isGeneralTextEntity)
  ------------------
  |  Branch (4300:9): [True: 0, False: 224]
  ------------------
 4301|      0|      return XML_ERROR_TEXT_DECL;
 4302|    224|    else
 4303|    224|      return XML_ERROR_XML_DECL;
 4304|    224|  }
 4305|     80|  if (! isGeneralTextEntity && standalone == 1) {
  ------------------
  |  Branch (4305:7): [True: 80, False: 0]
  |  Branch (4305:32): [True: 26, False: 54]
  ------------------
 4306|     26|    parser->m_dtd->standalone = XML_TRUE;
  ------------------
  |  |   55|     26|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4307|     26|#ifdef XML_DTD
 4308|     26|    if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4308:9): [True: 0, False: 26]
  ------------------
 4309|     26|        == XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE)
 4310|      0|      parser->m_paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER;
 4311|     26|#endif /* XML_DTD */
 4312|     26|  }
 4313|     80|  if (parser->m_xmlDeclHandler) {
  ------------------
  |  Branch (4313:7): [True: 0, False: 80]
  ------------------
 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|     80|  } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4331:14): [True: 0, False: 80]
  ------------------
 4332|      0|    reportDefault(parser, parser->m_encoding, s, next);
 4333|     80|  if (parser->m_protocolEncodingName == NULL) {
  ------------------
  |  Branch (4333:7): [True: 0, False: 80]
  ------------------
 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|     80|  if (storedEncName || storedversion)
  ------------------
  |  Branch (4364:7): [True: 0, False: 80]
  |  Branch (4364:24): [True: 0, False: 80]
  ------------------
 4365|      0|    poolClear(&parser->m_temp2Pool);
 4366|       |
 4367|     80|  return XML_ERROR_NONE;
 4368|     80|}
xmlparse.c:poolStoreString:
 7284|  4.02M|                const char *end) {
 7285|  4.02M|  if (! poolAppend(pool, enc, ptr, end))
  ------------------
  |  Branch (7285:7): [True: 0, False: 4.02M]
  ------------------
 7286|      0|    return NULL;
 7287|  4.02M|  if (pool->ptr == pool->end && ! poolGrow(pool))
  ------------------
  |  Branch (7287:7): [True: 361, False: 4.02M]
  |  Branch (7287:33): [True: 0, False: 361]
  ------------------
 7288|      0|    return NULL;
 7289|  4.02M|  *(pool->ptr)++ = 0;
 7290|  4.02M|  return pool->start;
 7291|  4.02M|}
xmlparse.c:lookup:
 7043|  6.35M|lookup(XML_Parser parser, HASH_TABLE *table, KEY name, size_t createSize) {
 7044|  6.35M|  size_t i;
 7045|  6.35M|  if (table->size == 0) {
  ------------------
  |  Branch (7045:7): [True: 46.6k, False: 6.31M]
  ------------------
 7046|  46.6k|    size_t tsize;
 7047|  46.6k|    if (! createSize)
  ------------------
  |  Branch (7047:9): [True: 29.4k, False: 17.1k]
  ------------------
 7048|  29.4k|      return NULL;
 7049|  17.1k|    table->power = INIT_POWER;
  ------------------
  |  | 7007|  17.1k|#define INIT_POWER 6
  ------------------
 7050|       |    /* table->size is a power of 2 */
 7051|  17.1k|    table->size = (size_t)1 << INIT_POWER;
  ------------------
  |  | 7007|  17.1k|#define INIT_POWER 6
  ------------------
 7052|  17.1k|    tsize = table->size * sizeof(NAMED *);
 7053|  17.1k|    table->v = table->mem->malloc_fcn(tsize);
 7054|  17.1k|    if (! table->v) {
  ------------------
  |  Branch (7054:9): [True: 0, False: 17.1k]
  ------------------
 7055|      0|      table->size = 0;
 7056|      0|      return NULL;
 7057|      0|    }
 7058|  17.1k|    memset(table->v, 0, tsize);
 7059|  17.1k|    i = hash(parser, name) & ((unsigned long)table->size - 1);
 7060|  6.31M|  } else {
 7061|  6.31M|    unsigned long h = hash(parser, name);
 7062|  6.31M|    unsigned long mask = (unsigned long)table->size - 1;
 7063|  6.31M|    unsigned char step = 0;
 7064|  6.31M|    i = h & mask;
 7065|  6.35M|    while (table->v[i]) {
  ------------------
  |  Branch (7065:12): [True: 6.09M, False: 254k]
  ------------------
 7066|  6.09M|      if (keyeq(name, table->v[i]->name))
  ------------------
  |  Branch (7066:11): [True: 6.05M, False: 39.5k]
  ------------------
 7067|  6.05M|        return table->v[i];
 7068|  39.5k|      if (! step)
  ------------------
  |  Branch (7068:11): [True: 32.4k, False: 7.14k]
  ------------------
 7069|  32.4k|        step = PROBE_STEP(h, mask, table->power);
  ------------------
  |  |  235|  32.4k|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  233|  32.4k|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7070|  39.5k|      i < step ? (i += table->size - step) : (i -= step);
  ------------------
  |  Branch (7070:7): [True: 4.16k, False: 35.4k]
  ------------------
 7071|  39.5k|    }
 7072|   254k|    if (! createSize)
  ------------------
  |  Branch (7072:9): [True: 231k, False: 22.5k]
  ------------------
 7073|   231k|      return NULL;
 7074|       |
 7075|       |    /* check for overflow (table is half full) */
 7076|  22.5k|    if (table->used >> (table->power - 1)) {
  ------------------
  |  Branch (7076:9): [True: 284, False: 22.2k]
  ------------------
 7077|    284|      unsigned char newPower = table->power + 1;
 7078|       |
 7079|       |      /* Detect and prevent invalid shift */
 7080|    284|      if (newPower >= sizeof(unsigned long) * 8 /* bits per byte */) {
  ------------------
  |  Branch (7080:11): [True: 0, False: 284]
  ------------------
 7081|      0|        return NULL;
 7082|      0|      }
 7083|       |
 7084|    284|      size_t newSize = (size_t)1 << newPower;
 7085|    284|      unsigned long newMask = (unsigned long)newSize - 1;
 7086|       |
 7087|       |      /* Detect and prevent integer overflow */
 7088|    284|      if (newSize > (size_t)(-1) / sizeof(NAMED *)) {
  ------------------
  |  Branch (7088:11): [True: 0, False: 284]
  ------------------
 7089|      0|        return NULL;
 7090|      0|      }
 7091|       |
 7092|    284|      size_t tsize = newSize * sizeof(NAMED *);
 7093|    284|      NAMED **newV = table->mem->malloc_fcn(tsize);
 7094|    284|      if (! newV)
  ------------------
  |  Branch (7094:11): [True: 0, False: 284]
  ------------------
 7095|      0|        return NULL;
 7096|    284|      memset(newV, 0, tsize);
 7097|  35.5k|      for (i = 0; i < table->size; i++)
  ------------------
  |  Branch (7097:19): [True: 35.2k, False: 284]
  ------------------
 7098|  35.2k|        if (table->v[i]) {
  ------------------
  |  Branch (7098:13): [True: 17.6k, False: 17.6k]
  ------------------
 7099|  17.6k|          unsigned long newHash = hash(parser, table->v[i]->name);
 7100|  17.6k|          size_t j = newHash & newMask;
 7101|  17.6k|          step = 0;
 7102|  20.5k|          while (newV[j]) {
  ------------------
  |  Branch (7102:18): [True: 2.91k, False: 17.6k]
  ------------------
 7103|  2.91k|            if (! step)
  ------------------
  |  Branch (7103:17): [True: 2.36k, False: 558]
  ------------------
 7104|  2.36k|              step = PROBE_STEP(newHash, newMask, newPower);
  ------------------
  |  |  235|  2.36k|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  233|  2.36k|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7105|  2.91k|            j < step ? (j += newSize - step) : (j -= step);
  ------------------
  |  Branch (7105:13): [True: 367, False: 2.55k]
  ------------------
 7106|  2.91k|          }
 7107|  17.6k|          newV[j] = table->v[i];
 7108|  17.6k|        }
 7109|    284|      table->mem->free_fcn(table->v);
 7110|    284|      table->v = newV;
 7111|    284|      table->power = newPower;
 7112|    284|      table->size = newSize;
 7113|    284|      i = h & newMask;
 7114|    284|      step = 0;
 7115|    444|      while (table->v[i]) {
  ------------------
  |  Branch (7115:14): [True: 160, False: 284]
  ------------------
 7116|    160|        if (! step)
  ------------------
  |  Branch (7116:13): [True: 95, False: 65]
  ------------------
 7117|     95|          step = PROBE_STEP(h, newMask, newPower);
  ------------------
  |  |  235|     95|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  233|     95|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7118|    160|        i < step ? (i += newSize - step) : (i -= step);
  ------------------
  |  Branch (7118:9): [True: 24, False: 136]
  ------------------
 7119|    160|      }
 7120|    284|    }
 7121|  22.5k|  }
 7122|  39.6k|  table->v[i] = table->mem->malloc_fcn(createSize);
 7123|  39.6k|  if (! table->v[i])
  ------------------
  |  Branch (7123:7): [True: 0, False: 39.6k]
  ------------------
 7124|      0|    return NULL;
 7125|  39.6k|  memset(table->v[i], 0, createSize);
 7126|  39.6k|  table->v[i]->name = name;
 7127|  39.6k|  (table->used)++;
 7128|  39.6k|  return table->v[i];
 7129|  39.6k|}
xmlparse.c:hash:
 7032|  6.34M|hash(XML_Parser parser, KEY s) {
 7033|  6.34M|  struct siphash state;
 7034|  6.34M|  struct sipkey key;
 7035|  6.34M|  (void)sip24_valid;
 7036|  6.34M|  copy_salt_to_sipkey(parser, &key);
 7037|  6.34M|  sip24_init(&state, &key);
 7038|  6.34M|  sip24_update(&state, s, keylen(s) * sizeof(XML_Char));
 7039|  6.34M|  return (unsigned long)sip24_final(&state);
 7040|  6.34M|}
xmlparse.c:copy_salt_to_sipkey:
 7026|  6.34M|copy_salt_to_sipkey(XML_Parser parser, struct sipkey *key) {
 7027|  6.34M|  key->k[0] = 0;
 7028|  6.34M|  key->k[1] = get_hash_secret_salt(parser);
 7029|  6.34M|}
xmlparse.c:get_hash_secret_salt:
  947|  6.34M|get_hash_secret_salt(XML_Parser parser) {
  948|  6.34M|  if (parser->m_parentParser != NULL)
  ------------------
  |  Branch (948:7): [True: 0, False: 6.34M]
  ------------------
  949|      0|    return get_hash_secret_salt(parser->m_parentParser);
  950|  6.34M|  return parser->m_hash_secret_salt;
  951|  6.34M|}
xmlparse.c:keylen:
 7018|  6.34M|keylen(KEY s) {
 7019|  6.34M|  size_t len = 0;
 7020|  20.3M|  for (; *s; s++, len++)
  ------------------
  |  Branch (7020:10): [True: 14.0M, False: 6.34M]
  ------------------
 7021|  14.0M|    ;
 7022|  6.34M|  return len;
 7023|  6.34M|}
xmlparse.c:keyeq:
 7010|  6.09M|keyeq(KEY s1, KEY s2) {
 7011|  17.0M|  for (; *s1 == *s2; s1++, s2++)
  ------------------
  |  Branch (7011:10): [True: 16.9M, False: 39.5k]
  ------------------
 7012|  16.9M|    if (*s1 == 0)
  ------------------
  |  Branch (7012:9): [True: 6.05M, False: 10.9M]
  ------------------
 7013|  6.05M|      return XML_TRUE;
  ------------------
  |  |   55|  6.05M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7014|  39.5k|  return XML_FALSE;
  ------------------
  |  |   56|  39.5k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7015|  6.09M|}
xmlparse.c:normalizePublicId:
 6695|    962|normalizePublicId(XML_Char *publicId) {
 6696|    962|  XML_Char *p = publicId;
 6697|    962|  XML_Char *s;
 6698|  26.2k|  for (s = publicId; *s; s++) {
  ------------------
  |  Branch (6698:22): [True: 25.2k, False: 962]
  ------------------
 6699|  25.2k|    switch (*s) {
 6700|  2.20k|    case 0x20:
  ------------------
  |  Branch (6700:5): [True: 2.20k, False: 23.0k]
  ------------------
 6701|  3.54k|    case 0xD:
  ------------------
  |  Branch (6701:5): [True: 1.34k, False: 23.9k]
  ------------------
 6702|  5.19k|    case 0xA:
  ------------------
  |  Branch (6702:5): [True: 1.64k, False: 23.6k]
  ------------------
 6703|  5.19k|      if (p != publicId && p[-1] != 0x20)
  ------------------
  |  Branch (6703:11): [True: 4.32k, False: 870]
  |  Branch (6703:28): [True: 2.73k, False: 1.59k]
  ------------------
 6704|  2.73k|        *p++ = 0x20;
 6705|  5.19k|      break;
 6706|  20.0k|    default:
  ------------------
  |  Branch (6706:5): [True: 20.0k, False: 5.19k]
  ------------------
 6707|  20.0k|      *p++ = *s;
 6708|  25.2k|    }
 6709|  25.2k|  }
 6710|    962|  if (p != publicId && p[-1] == 0x20)
  ------------------
  |  Branch (6710:7): [True: 612, False: 350]
  |  Branch (6710:24): [True: 127, False: 485]
  ------------------
 6711|    127|    --p;
 6712|    962|  *p = XML_T('\0');
  ------------------
  |  |  191|    962|#  define XML_T(x) x
  ------------------
 6713|    962|}
xmlparse.c:contentProcessor:
 2622|  10.9k|                 const char **endPtr) {
 2623|  10.9k|  enum XML_Error result = doContent(
 2624|  10.9k|      parser, 0, parser->m_encoding, start, end, endPtr,
 2625|  10.9k|      (XML_Bool)! parser->m_parsingStatus.finalBuffer, XML_ACCOUNT_DIRECT);
 2626|  10.9k|  if (result == XML_ERROR_NONE) {
  ------------------
  |  Branch (2626:7): [True: 6.56k, False: 4.34k]
  ------------------
 2627|  6.56k|    if (! storeRawNames(parser))
  ------------------
  |  Branch (2627:9): [True: 0, False: 6.56k]
  ------------------
 2628|      0|      return XML_ERROR_NO_MEMORY;
 2629|  6.56k|  }
 2630|  10.9k|  return result;
 2631|  10.9k|}
xmlparse.c:doContent:
 2752|   349k|          XML_Bool haveMore, enum XML_Account account) {
 2753|       |  /* save one level of indirection */
 2754|   349k|  DTD *const dtd = parser->m_dtd;
 2755|       |
 2756|   349k|  const char **eventPP;
 2757|   349k|  const char **eventEndPP;
 2758|   349k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (2758:7): [True: 10.9k, False: 338k]
  ------------------
 2759|  10.9k|    eventPP = &parser->m_eventPtr;
 2760|  10.9k|    eventEndPP = &parser->m_eventEndPtr;
 2761|   338k|  } else {
 2762|   338k|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 2763|   338k|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 2764|   338k|  }
 2765|   349k|  *eventPP = s;
 2766|       |
 2767|  4.73M|  for (;;) {
 2768|  4.73M|    const char *next = s; /* XmlContentTok doesn't always set the last arg */
 2769|  4.73M|    int tok = XmlContentTok(enc, s, end, &next);
  ------------------
  |  |  230|  4.73M|  XmlTok(enc, XML_CONTENT_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  4.73M|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 2770|  4.73M|#ifdef XML_DTD
 2771|  4.73M|    const char *accountAfter
 2772|  4.73M|        = ((tok == XML_TOK_TRAILING_RSQB) || (tok == XML_TOK_TRAILING_CR))
  ------------------
  |  |   46|  4.73M|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
                      = ((tok == XML_TOK_TRAILING_RSQB) || (tok == XML_TOK_TRAILING_CR))
  ------------------
  |  |   53|  4.73M|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (2772:12): [True: 693, False: 4.73M]
  |  Branch (2772:46): [True: 43, False: 4.73M]
  ------------------
 2773|  4.73M|              ? (haveMore ? s /* i.e. 0 bytes */ : end)
  ------------------
  |  Branch (2773:18): [True: 74, False: 662]
  ------------------
 2774|  4.73M|              : next;
 2775|  4.73M|    if (! accountingDiffTolerated(parser, tok, s, accountAfter, __LINE__,
  ------------------
  |  Branch (2775:9): [True: 7, False: 4.73M]
  ------------------
 2776|  4.73M|                                  account)) {
 2777|      7|      accountingOnAbort(parser);
 2778|      7|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 2779|      7|    }
 2780|  4.73M|#endif
 2781|  4.73M|    *eventEndPP = next;
 2782|  4.73M|    switch (tok) {
 2783|     43|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|     43|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (2783:5): [True: 43, False: 4.73M]
  ------------------
 2784|     43|      if (haveMore) {
  ------------------
  |  Branch (2784:11): [True: 43, False: 0]
  ------------------
 2785|     43|        *nextPtr = s;
 2786|     43|        return XML_ERROR_NONE;
 2787|     43|      }
 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|   340k|    case XML_TOK_NONE:
  ------------------
  |  |   51|   340k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (2803:5): [True: 340k, False: 4.39M]
  ------------------
 2804|   340k|      if (haveMore) {
  ------------------
  |  Branch (2804:11): [True: 3.36k, False: 337k]
  ------------------
 2805|  3.36k|        *nextPtr = s;
 2806|  3.36k|        return XML_ERROR_NONE;
 2807|  3.36k|      }
 2808|   337k|      if (startTagLevel > 0) {
  ------------------
  |  Branch (2808:11): [True: 337k, False: 0]
  ------------------
 2809|   337k|        if (parser->m_tagLevel != startTagLevel)
  ------------------
  |  Branch (2809:13): [True: 69, False: 337k]
  ------------------
 2810|     69|          return XML_ERROR_ASYNC_ENTITY;
 2811|   337k|        *nextPtr = s;
 2812|   337k|        return XML_ERROR_NONE;
 2813|   337k|      }
 2814|      0|      return XML_ERROR_NO_ELEMENTS;
 2815|  2.44k|    case XML_TOK_INVALID:
  ------------------
  |  |   57|  2.44k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (2815:5): [True: 2.44k, False: 4.73M]
  ------------------
 2816|  2.44k|      *eventPP = next;
 2817|  2.44k|      return XML_ERROR_INVALID_TOKEN;
 2818|  2.30k|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|  2.30k|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (2818:5): [True: 2.30k, False: 4.73M]
  ------------------
 2819|  2.30k|      if (haveMore) {
  ------------------
  |  Branch (2819:11): [True: 2.20k, False: 106]
  ------------------
 2820|  2.20k|        *nextPtr = s;
 2821|  2.20k|        return XML_ERROR_NONE;
 2822|  2.20k|      }
 2823|    106|      return XML_ERROR_UNCLOSED_TOKEN;
 2824|    292|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|    292|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (2824:5): [True: 292, False: 4.73M]
  ------------------
 2825|    292|      if (haveMore) {
  ------------------
  |  Branch (2825:11): [True: 292, False: 0]
  ------------------
 2826|    292|        *nextPtr = s;
 2827|    292|        return XML_ERROR_NONE;
 2828|    292|      }
 2829|      0|      return XML_ERROR_PARTIAL_CHAR;
 2830|   367k|    case XML_TOK_ENTITY_REF: {
  ------------------
  |  |   70|   367k|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (2830:5): [True: 367k, False: 4.37M]
  ------------------
 2831|   367k|      const XML_Char *name;
 2832|   367k|      ENTITY *entity;
 2833|   367k|      XML_Char ch = (XML_Char)XmlPredefinedEntityName(
  ------------------
  |  |  267|   367k|  (((enc)->predefinedEntityName)(enc, ptr, end))
  ------------------
 2834|   367k|          enc, s + enc->minBytesPerChar, next - enc->minBytesPerChar);
 2835|   367k|      if (ch) {
  ------------------
  |  Branch (2835:11): [True: 4.83k, False: 362k]
  ------------------
 2836|  4.83k|#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|  4.83k|        accountingDiffTolerated(parser, tok, (char *)&ch,
 2841|  4.83k|                                ((char *)&ch) + sizeof(XML_Char), __LINE__,
 2842|  4.83k|                                XML_ACCOUNT_ENTITY_EXPANSION);
 2843|  4.83k|#endif /* XML_DTD */
 2844|  4.83k|        if (parser->m_characterDataHandler)
  ------------------
  |  Branch (2844:13): [True: 0, False: 4.83k]
  ------------------
 2845|      0|          parser->m_characterDataHandler(parser->m_handlerArg, &ch, 1);
 2846|  4.83k|        else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2846:18): [True: 0, False: 4.83k]
  ------------------
 2847|      0|          reportDefault(parser, enc, s, next);
 2848|  4.83k|        break;
 2849|  4.83k|      }
 2850|   362k|      name = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 2851|   362k|                             next - enc->minBytesPerChar);
 2852|   362k|      if (! name)
  ------------------
  |  Branch (2852:11): [True: 0, False: 362k]
  ------------------
 2853|      0|        return XML_ERROR_NO_MEMORY;
 2854|   362k|      entity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, 0);
 2855|   362k|      poolDiscard(&dtd->pool);
  ------------------
  |  |  600|   362k|#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|   362k|      if (! dtd->hasParamEntityRefs || dtd->standalone) {
  ------------------
  |  Branch (2860:11): [True: 334k, False: 28.1k]
  |  Branch (2860:40): [True: 194, False: 27.9k]
  ------------------
 2861|   334k|        if (! entity)
  ------------------
  |  Branch (2861:13): [True: 340, False: 333k]
  ------------------
 2862|    340|          return XML_ERROR_UNDEFINED_ENTITY;
 2863|   333k|        else if (! entity->is_internal)
  ------------------
  |  Branch (2863:18): [True: 0, False: 333k]
  ------------------
 2864|      0|          return XML_ERROR_ENTITY_DECLARED_IN_PE;
 2865|   334k|      } else if (! entity) {
  ------------------
  |  Branch (2865:18): [True: 22.7k, False: 5.21k]
  ------------------
 2866|  22.7k|        if (parser->m_skippedEntityHandler)
  ------------------
  |  Branch (2866:13): [True: 0, False: 22.7k]
  ------------------
 2867|      0|          parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 2868|  22.7k|        else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2868:18): [True: 0, False: 22.7k]
  ------------------
 2869|      0|          reportDefault(parser, enc, s, next);
 2870|  22.7k|        break;
 2871|  22.7k|      }
 2872|   339k|      if (entity->open)
  ------------------
  |  Branch (2872:11): [True: 3, False: 339k]
  ------------------
 2873|      3|        return XML_ERROR_RECURSIVE_ENTITY_REF;
 2874|   339k|      if (entity->notation)
  ------------------
  |  Branch (2874:11): [True: 1, False: 339k]
  ------------------
 2875|      1|        return XML_ERROR_BINARY_ENTITY_REF;
 2876|   339k|      if (entity->textPtr) {
  ------------------
  |  Branch (2876:11): [True: 338k, False: 194]
  ------------------
 2877|   338k|        enum XML_Error result;
 2878|   338k|        if (! parser->m_defaultExpandInternalEntities) {
  ------------------
  |  Branch (2878:13): [True: 0, False: 338k]
  ------------------
 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|   338k|        result = processInternalEntity(parser, entity, XML_FALSE);
  ------------------
  |  |   56|   338k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2887|   338k|        if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (2887:13): [True: 954, False: 338k]
  ------------------
 2888|    954|          return result;
 2889|   338k|      } else if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (2889:18): [True: 0, False: 194]
  ------------------
 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|    194|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2901:18): [True: 0, False: 194]
  ------------------
 2902|      0|        reportDefault(parser, enc, s, next);
 2903|   338k|      break;
 2904|   339k|    }
 2905|  2.32M|    case XML_TOK_START_TAG_NO_ATTS:
  ------------------
  |  |   63|  2.32M|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  |  Branch (2905:5): [True: 2.32M, False: 2.41M]
  ------------------
 2906|       |      /* fall through */
 2907|  2.33M|    case XML_TOK_START_TAG_WITH_ATTS: {
  ------------------
  |  |   62|  2.33M|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  |  Branch (2907:5): [True: 8.70k, False: 4.72M]
  ------------------
 2908|  2.33M|      TAG *tag;
 2909|  2.33M|      enum XML_Error result;
 2910|  2.33M|      XML_Char *toPtr;
 2911|  2.33M|      if (parser->m_freeTagList) {
  ------------------
  |  Branch (2911:11): [True: 119k, False: 2.21M]
  ------------------
 2912|   119k|        tag = parser->m_freeTagList;
 2913|   119k|        parser->m_freeTagList = parser->m_freeTagList->parent;
 2914|  2.21M|      } else {
 2915|  2.21M|        tag = (TAG *)MALLOC(parser, sizeof(TAG));
  ------------------
  |  |  714|  2.21M|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2916|  2.21M|        if (! tag)
  ------------------
  |  Branch (2916:13): [True: 0, False: 2.21M]
  ------------------
 2917|      0|          return XML_ERROR_NO_MEMORY;
 2918|  2.21M|        tag->buf = (char *)MALLOC(parser, INIT_TAG_BUF_SIZE);
  ------------------
  |  |  714|  2.21M|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2919|  2.21M|        if (! tag->buf) {
  ------------------
  |  Branch (2919:13): [True: 0, False: 2.21M]
  ------------------
 2920|      0|          FREE(parser, tag);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 2921|      0|          return XML_ERROR_NO_MEMORY;
 2922|      0|        }
 2923|  2.21M|        tag->bufEnd = tag->buf + INIT_TAG_BUF_SIZE;
  ------------------
  |  |  242|  2.21M|#define INIT_TAG_BUF_SIZE 32 /* must be a multiple of sizeof(XML_Char) */
  ------------------
 2924|  2.21M|      }
 2925|  2.33M|      tag->bindings = NULL;
 2926|  2.33M|      tag->parent = parser->m_tagStack;
 2927|  2.33M|      parser->m_tagStack = tag;
 2928|  2.33M|      tag->name.localPart = NULL;
 2929|  2.33M|      tag->name.prefix = NULL;
 2930|  2.33M|      tag->rawName = s + enc->minBytesPerChar;
 2931|  2.33M|      tag->rawNameLength = XmlNameLength(enc, tag->rawName);
  ------------------
  |  |  257|  2.33M|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 2932|  2.33M|      ++parser->m_tagLevel;
 2933|  2.33M|      {
 2934|  2.33M|        const char *rawNameEnd = tag->rawName + tag->rawNameLength;
 2935|  2.33M|        const char *fromPtr = tag->rawName;
 2936|  2.33M|        toPtr = (XML_Char *)tag->buf;
 2937|  2.33M|        for (;;) {
 2938|  2.33M|          int bufSize;
 2939|  2.33M|          int convLen;
 2940|  2.33M|          const enum XML_Convert_Result convert_res
 2941|  2.33M|              = XmlConvert(enc, &fromPtr, rawNameEnd, (ICHAR **)&toPtr,
  ------------------
  |  |  161|  2.33M|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|  2.33M|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 2942|  2.33M|                           (ICHAR *)tag->bufEnd - 1);
 2943|  2.33M|          convLen = (int)(toPtr - (XML_Char *)tag->buf);
 2944|  2.33M|          if ((fromPtr >= rawNameEnd)
  ------------------
  |  Branch (2944:15): [True: 2.33M, False: 3.22k]
  ------------------
 2945|  2.33M|              || (convert_res == XML_CONVERT_INPUT_INCOMPLETE)) {
  ------------------
  |  Branch (2945:18): [True: 0, False: 3.22k]
  ------------------
 2946|  2.33M|            tag->name.strLen = convLen;
 2947|  2.33M|            break;
 2948|  2.33M|          }
 2949|  3.22k|          bufSize = (int)(tag->bufEnd - tag->buf) << 1;
 2950|  3.22k|          {
 2951|  3.22k|            char *temp = (char *)REALLOC(parser, tag->buf, bufSize);
  ------------------
  |  |  715|  3.22k|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 2952|  3.22k|            if (temp == NULL)
  ------------------
  |  Branch (2952:17): [True: 0, False: 3.22k]
  ------------------
 2953|      0|              return XML_ERROR_NO_MEMORY;
 2954|  3.22k|            tag->buf = temp;
 2955|  3.22k|            tag->bufEnd = temp + bufSize;
 2956|  3.22k|            toPtr = (XML_Char *)temp + convLen;
 2957|  3.22k|          }
 2958|  3.22k|        }
 2959|  2.33M|      }
 2960|  2.33M|      tag->name.str = (XML_Char *)tag->buf;
 2961|  2.33M|      *toPtr = XML_T('\0');
  ------------------
  |  |  191|  2.33M|#  define XML_T(x) x
  ------------------
 2962|  2.33M|      result
 2963|  2.33M|          = storeAtts(parser, enc, s, &(tag->name), &(tag->bindings), account);
 2964|  2.33M|      if (result)
  ------------------
  |  Branch (2964:11): [True: 615, False: 2.33M]
  ------------------
 2965|    615|        return result;
 2966|  2.33M|      if (parser->m_startElementHandler)
  ------------------
  |  Branch (2966:11): [True: 2.33M, False: 0]
  ------------------
 2967|  2.33M|        parser->m_startElementHandler(parser->m_handlerArg, tag->name.str,
 2968|  2.33M|                                      (const XML_Char **)parser->m_atts);
 2969|      0|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2969:16): [True: 0, False: 0]
  ------------------
 2970|      0|        reportDefault(parser, enc, s, next);
 2971|  2.33M|      poolClear(&parser->m_tempPool);
 2972|  2.33M|      break;
 2973|  2.33M|    }
 2974|  42.9k|    case XML_TOK_EMPTY_ELEMENT_NO_ATTS:
  ------------------
  |  |   65|  42.9k|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  |  Branch (2974:5): [True: 42.9k, False: 4.69M]
  ------------------
 2975|       |      /* fall through */
 2976|  50.4k|    case XML_TOK_EMPTY_ELEMENT_WITH_ATTS: {
  ------------------
  |  |   64|  50.4k|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  |  Branch (2976:5): [True: 7.54k, False: 4.73M]
  ------------------
 2977|  50.4k|      const char *rawName = s + enc->minBytesPerChar;
 2978|  50.4k|      enum XML_Error result;
 2979|  50.4k|      BINDING *bindings = NULL;
 2980|  50.4k|      XML_Bool noElmHandlers = XML_TRUE;
  ------------------
  |  |   55|  50.4k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2981|  50.4k|      TAG_NAME name;
 2982|  50.4k|      name.str = poolStoreString(&parser->m_tempPool, enc, rawName,
 2983|  50.4k|                                 rawName + XmlNameLength(enc, rawName));
  ------------------
  |  |  257|  50.4k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 2984|  50.4k|      if (! name.str)
  ------------------
  |  Branch (2984:11): [True: 0, False: 50.4k]
  ------------------
 2985|      0|        return XML_ERROR_NO_MEMORY;
 2986|  50.4k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|  50.4k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 2987|  50.4k|      result = storeAtts(parser, enc, s, &name, &bindings,
 2988|  50.4k|                         XML_ACCOUNT_NONE /* token spans whole start tag */);
 2989|  50.4k|      if (result != XML_ERROR_NONE) {
  ------------------
  |  Branch (2989:11): [True: 5, False: 50.4k]
  ------------------
 2990|      5|        freeBindings(parser, bindings);
 2991|      5|        return result;
 2992|      5|      }
 2993|  50.4k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|  50.4k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 2994|  50.4k|      if (parser->m_startElementHandler) {
  ------------------
  |  Branch (2994:11): [True: 50.4k, False: 0]
  ------------------
 2995|  50.4k|        parser->m_startElementHandler(parser->m_handlerArg, name.str,
 2996|  50.4k|                                      (const XML_Char **)parser->m_atts);
 2997|  50.4k|        noElmHandlers = XML_FALSE;
  ------------------
  |  |   56|  50.4k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2998|  50.4k|      }
 2999|  50.4k|      if (parser->m_endElementHandler) {
  ------------------
  |  Branch (2999:11): [True: 50.4k, False: 0]
  ------------------
 3000|  50.4k|        if (parser->m_startElementHandler)
  ------------------
  |  Branch (3000:13): [True: 50.4k, False: 0]
  ------------------
 3001|  50.4k|          *eventPP = *eventEndPP;
 3002|  50.4k|        parser->m_endElementHandler(parser->m_handlerArg, name.str);
 3003|  50.4k|        noElmHandlers = XML_FALSE;
  ------------------
  |  |   56|  50.4k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 3004|  50.4k|      }
 3005|  50.4k|      if (noElmHandlers && parser->m_defaultHandler)
  ------------------
  |  Branch (3005:11): [True: 0, False: 50.4k]
  |  Branch (3005:28): [True: 0, False: 0]
  ------------------
 3006|      0|        reportDefault(parser, enc, s, next);
 3007|  50.4k|      poolClear(&parser->m_tempPool);
 3008|  50.4k|      freeBindings(parser, bindings);
 3009|  50.4k|    }
 3010|  50.4k|      if ((parser->m_tagLevel == 0)
  ------------------
  |  Branch (3010:11): [True: 105, False: 50.3k]
  ------------------
 3011|  50.4k|          && (parser->m_parsingStatus.parsing != XML_FINISHED)) {
  ------------------
  |  Branch (3011:14): [True: 105, False: 0]
  ------------------
 3012|    105|        if (parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (3012:13): [True: 0, False: 105]
  ------------------
 3013|      0|          parser->m_processor = epilogProcessor;
 3014|    105|        else
 3015|    105|          return epilogProcessor(parser, next, end, nextPtr);
 3016|    105|      }
 3017|  50.3k|      break;
 3018|   120k|    case XML_TOK_END_TAG:
  ------------------
  |  |   66|   120k|#define XML_TOK_END_TAG 5
  ------------------
  |  Branch (3018:5): [True: 120k, False: 4.61M]
  ------------------
 3019|   120k|      if (parser->m_tagLevel == startTagLevel)
  ------------------
  |  Branch (3019:11): [True: 4, False: 120k]
  ------------------
 3020|      4|        return XML_ERROR_ASYNC_ENTITY;
 3021|   120k|      else {
 3022|   120k|        int len;
 3023|   120k|        const char *rawName;
 3024|   120k|        TAG *tag = parser->m_tagStack;
 3025|   120k|        rawName = s + enc->minBytesPerChar * 2;
 3026|   120k|        len = XmlNameLength(enc, rawName);
  ------------------
  |  |  257|   120k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 3027|   120k|        if (len != tag->rawNameLength
  ------------------
  |  Branch (3027:13): [True: 49, False: 120k]
  ------------------
 3028|   120k|            || memcmp(tag->rawName, rawName, len) != 0) {
  ------------------
  |  Branch (3028:16): [True: 178, False: 120k]
  ------------------
 3029|    227|          *eventPP = rawName;
 3030|    227|          return XML_ERROR_TAG_MISMATCH;
 3031|    227|        }
 3032|   120k|        parser->m_tagStack = tag->parent;
 3033|   120k|        tag->parent = parser->m_freeTagList;
 3034|   120k|        parser->m_freeTagList = tag;
 3035|   120k|        --parser->m_tagLevel;
 3036|   120k|        if (parser->m_endElementHandler) {
  ------------------
  |  Branch (3036:13): [True: 120k, False: 0]
  ------------------
 3037|   120k|          const XML_Char *localPart;
 3038|   120k|          const XML_Char *prefix;
 3039|   120k|          XML_Char *uri;
 3040|   120k|          localPart = tag->name.localPart;
 3041|   120k|          if (parser->m_ns && localPart) {
  ------------------
  |  Branch (3041:15): [True: 0, False: 120k]
  |  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|   120k|          parser->m_endElementHandler(parser->m_handlerArg, tag->name.str);
 3059|   120k|        } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3059:20): [True: 0, False: 0]
  ------------------
 3060|      0|          reportDefault(parser, enc, s, next);
 3061|   120k|        while (tag->bindings) {
  ------------------
  |  Branch (3061:16): [True: 0, False: 120k]
  ------------------
 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|   120k|        if ((parser->m_tagLevel == 0)
  ------------------
  |  Branch (3071:13): [True: 42, False: 119k]
  ------------------
 3072|   120k|            && (parser->m_parsingStatus.parsing != XML_FINISHED)) {
  ------------------
  |  Branch (3072:16): [True: 42, False: 0]
  ------------------
 3073|     42|          if (parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (3073:15): [True: 0, False: 42]
  ------------------
 3074|      0|            parser->m_processor = epilogProcessor;
 3075|     42|          else
 3076|     42|            return epilogProcessor(parser, next, end, nextPtr);
 3077|     42|        }
 3078|   120k|      }
 3079|   119k|      break;
 3080|   119k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  8.13k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (3080:5): [True: 8.13k, False: 4.73M]
  ------------------
 3081|  8.13k|      int n = XmlCharRefNumber(enc, s);
  ------------------
  |  |  264|  8.13k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 3082|  8.13k|      if (n < 0)
  ------------------
  |  Branch (3082:11): [True: 171, False: 7.96k]
  ------------------
 3083|    171|        return XML_ERROR_BAD_CHAR_REF;
 3084|  7.96k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3084:11): [True: 0, False: 7.96k]
  ------------------
 3085|      0|        XML_Char buf[XML_ENCODE_MAX];
 3086|      0|        parser->m_characterDataHandler(parser->m_handlerArg, buf,
 3087|      0|                                       XmlEncode(n, (ICHAR *)buf));
  ------------------
  |  |  164|      0|#  define XmlEncode XmlUtf8Encode
  ------------------
 3088|  7.96k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3088:18): [True: 0, False: 7.96k]
  ------------------
 3089|      0|        reportDefault(parser, enc, s, next);
 3090|  7.96k|    } break;
 3091|     13|    case XML_TOK_XML_DECL:
  ------------------
  |  |   77|     13|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (3091:5): [True: 13, False: 4.73M]
  ------------------
 3092|     13|      return XML_ERROR_MISPLACED_XML_PI;
 3093|   474k|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|   474k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (3093:5): [True: 474k, False: 4.26M]
  ------------------
 3094|   474k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3094:11): [True: 0, False: 474k]
  ------------------
 3095|      0|        XML_Char c = 0xA;
 3096|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 3097|   474k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3097:18): [True: 0, False: 474k]
  ------------------
 3098|      0|        reportDefault(parser, enc, s, next);
 3099|   474k|      break;
 3100|  73.5k|    case XML_TOK_CDATA_SECT_OPEN: {
  ------------------
  |  |   69|  73.5k|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  |  Branch (3100:5): [True: 73.5k, False: 4.66M]
  ------------------
 3101|  73.5k|      enum XML_Error result;
 3102|  73.5k|      if (parser->m_startCdataSectionHandler)
  ------------------
  |  Branch (3102:11): [True: 0, False: 73.5k]
  ------------------
 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|  73.5k|      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|  73.5k|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3121:16): [True: 0, False: 73.5k]
  ------------------
 3122|      0|        reportDefault(parser, enc, s, next);
 3123|  73.5k|      result
 3124|  73.5k|          = doCdataSection(parser, enc, &next, end, nextPtr, haveMore, account);
 3125|  73.5k|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (3125:11): [True: 232, False: 73.3k]
  ------------------
 3126|    232|        return result;
 3127|  73.3k|      else if (! next) {
  ------------------
  |  Branch (3127:16): [True: 570, False: 72.7k]
  ------------------
 3128|    570|        parser->m_processor = cdataSectionProcessor;
 3129|    570|        return result;
 3130|    570|      }
 3131|  73.5k|    } break;
 3132|  72.7k|    case XML_TOK_TRAILING_RSQB:
  ------------------
  |  |   46|    693|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  |  Branch (3132:5): [True: 693, False: 4.73M]
  ------------------
 3133|    693|      if (haveMore) {
  ------------------
  |  Branch (3133:11): [True: 31, False: 662]
  ------------------
 3134|     31|        *nextPtr = s;
 3135|     31|        return XML_ERROR_NONE;
 3136|     31|      }
 3137|    662|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3137:11): [True: 0, False: 662]
  ------------------
 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|    662|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3148:18): [True: 0, False: 662]
  ------------------
 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|    662|      if (startTagLevel == 0) {
  ------------------
  |  Branch (3153:11): [True: 0, False: 662]
  ------------------
 3154|      0|        *eventPP = end;
 3155|      0|        return XML_ERROR_NO_ELEMENTS;
 3156|      0|      }
 3157|    662|      if (parser->m_tagLevel != startTagLevel) {
  ------------------
  |  Branch (3157:11): [True: 25, False: 637]
  ------------------
 3158|     25|        *eventPP = end;
 3159|     25|        return XML_ERROR_ASYNC_ENTITY;
 3160|     25|      }
 3161|    637|      *nextPtr = end;
 3162|    637|      return XML_ERROR_NONE;
 3163|   943k|    case XML_TOK_DATA_CHARS: {
  ------------------
  |  |   67|   943k|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (3163:5): [True: 943k, False: 3.79M]
  ------------------
 3164|   943k|      XML_CharacterDataHandler charDataHandler = parser->m_characterDataHandler;
 3165|   943k|      if (charDataHandler) {
  ------------------
  |  Branch (3165:11): [True: 0, False: 943k]
  ------------------
 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|   943k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3182:18): [True: 0, False: 943k]
  ------------------
 3183|      0|        reportDefault(parser, enc, s, next);
 3184|   943k|    } break;
 3185|  21.4k|    case XML_TOK_PI:
  ------------------
  |  |   76|  21.4k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (3185:5): [True: 21.4k, False: 4.71M]
  ------------------
 3186|  21.4k|      if (! reportProcessingInstruction(parser, enc, s, next))
  ------------------
  |  Branch (3186:11): [True: 0, False: 21.4k]
  ------------------
 3187|      0|        return XML_ERROR_NO_MEMORY;
 3188|  21.4k|      break;
 3189|  21.4k|    case XML_TOK_COMMENT:
  ------------------
  |  |   78|    900|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (3189:5): [True: 900, False: 4.73M]
  ------------------
 3190|    900|      if (! reportComment(parser, enc, s, next))
  ------------------
  |  Branch (3190:11): [True: 0, False: 900]
  ------------------
 3191|      0|        return XML_ERROR_NO_MEMORY;
 3192|    900|      break;
 3193|    900|    default:
  ------------------
  |  Branch (3193:5): [True: 0, False: 4.73M]
  ------------------
 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.73M|    }
 3206|  4.38M|    *eventPP = s = next;
 3207|  4.38M|    switch (parser->m_parsingStatus.parsing) {
 3208|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (3208:5): [True: 0, False: 4.38M]
  ------------------
 3209|      0|      *nextPtr = next;
 3210|      0|      return XML_ERROR_NONE;
 3211|      0|    case XML_FINISHED:
  ------------------
  |  Branch (3211:5): [True: 0, False: 4.38M]
  ------------------
 3212|      0|      return XML_ERROR_ABORTED;
 3213|  4.38M|    default:;
  ------------------
  |  Branch (3213:5): [True: 4.38M, False: 0]
  ------------------
 3214|  4.38M|    }
 3215|  4.38M|  }
 3216|       |  /* not reached */
 3217|   349k|}
xmlparse.c:hashTableIterInit:
 7159|  18.6k|hashTableIterInit(HASH_TABLE_ITER *iter, const HASH_TABLE *table) {
 7160|  18.6k|  iter->p = table->v;
 7161|  18.6k|  iter->end = iter->p ? iter->p + table->size : NULL;
  ------------------
  |  Branch (7161:15): [True: 10.0k, False: 8.59k]
  ------------------
 7162|  18.6k|}
xmlparse.c:hashTableIterNext:
 7165|  41.5k|hashTableIterNext(HASH_TABLE_ITER *iter) {
 7166|   687k|  while (iter->p != iter->end) {
  ------------------
  |  Branch (7166:10): [True: 668k, False: 18.6k]
  ------------------
 7167|   668k|    NAMED *tem = *(iter->p)++;
 7168|   668k|    if (tem)
  ------------------
  |  Branch (7168:9): [True: 22.9k, False: 645k]
  ------------------
 7169|  22.9k|      return tem;
 7170|   668k|  }
 7171|  18.6k|  return NULL;
 7172|  41.5k|}
xmlparse.c:storeAtts:
 3254|  2.38M|          enum XML_Account account) {
 3255|  2.38M|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 3256|  2.38M|  ELEMENT_TYPE *elementType;
 3257|  2.38M|  int nDefaultAtts;
 3258|  2.38M|  const XML_Char **appAtts; /* the attribute list for the application */
 3259|  2.38M|  int attIndex = 0;
 3260|  2.38M|  int prefixLen;
 3261|  2.38M|  int i;
 3262|  2.38M|  int n;
 3263|  2.38M|  XML_Char *uri;
 3264|  2.38M|  int nPrefixes = 0;
 3265|  2.38M|  BINDING *binding;
 3266|  2.38M|  const XML_Char *localPart;
 3267|       |
 3268|       |  /* lookup the element type name */
 3269|  2.38M|  elementType
 3270|  2.38M|      = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, tagNamePtr->str, 0);
 3271|  2.38M|  if (! elementType) {
  ------------------
  |  Branch (3271:7): [True: 14.9k, False: 2.36M]
  ------------------
 3272|  14.9k|    const XML_Char *name = poolCopyString(&dtd->pool, tagNamePtr->str);
 3273|  14.9k|    if (! name)
  ------------------
  |  Branch (3273:9): [True: 0, False: 14.9k]
  ------------------
 3274|      0|      return XML_ERROR_NO_MEMORY;
 3275|  14.9k|    elementType = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, name,
 3276|  14.9k|                                         sizeof(ELEMENT_TYPE));
 3277|  14.9k|    if (! elementType)
  ------------------
  |  Branch (3277:9): [True: 0, False: 14.9k]
  ------------------
 3278|      0|      return XML_ERROR_NO_MEMORY;
 3279|  14.9k|    if (parser->m_ns && ! setElementTypePrefix(parser, elementType))
  ------------------
  |  Branch (3279:9): [True: 0, False: 14.9k]
  |  Branch (3279:25): [True: 0, False: 0]
  ------------------
 3280|      0|      return XML_ERROR_NO_MEMORY;
 3281|  14.9k|  }
 3282|  2.38M|  nDefaultAtts = elementType->nDefaultAtts;
 3283|       |
 3284|       |  /* get the attributes from the tokenizer */
 3285|  2.38M|  n = XmlGetAttributes(enc, attStr, parser->m_attsSize, parser->m_atts);
  ------------------
  |  |  262|  2.38M|  (((enc)->getAtts)(enc, ptr, attsMax, atts))
  ------------------
 3286|       |
 3287|       |  /* Detect and prevent integer overflow */
 3288|  2.38M|  if (n > INT_MAX - nDefaultAtts) {
  ------------------
  |  Branch (3288:7): [True: 0, False: 2.38M]
  ------------------
 3289|      0|    return XML_ERROR_NO_MEMORY;
 3290|      0|  }
 3291|       |
 3292|  2.38M|  if (n + nDefaultAtts > parser->m_attsSize) {
  ------------------
  |  Branch (3292:7): [True: 351, False: 2.38M]
  ------------------
 3293|    351|    int oldAttsSize = parser->m_attsSize;
 3294|    351|    ATTRIBUTE *temp;
 3295|       |#ifdef XML_ATTR_INFO
 3296|       |    XML_AttrInfo *temp2;
 3297|       |#endif
 3298|       |
 3299|       |    /* Detect and prevent integer overflow */
 3300|    351|    if ((nDefaultAtts > INT_MAX - INIT_ATTS_SIZE)
  ------------------
  |  |  244|    351|#define INIT_ATTS_SIZE 16
  ------------------
  |  Branch (3300:9): [True: 0, False: 351]
  ------------------
 3301|    351|        || (n > INT_MAX - (nDefaultAtts + INIT_ATTS_SIZE))) {
  ------------------
  |  |  244|    351|#define INIT_ATTS_SIZE 16
  ------------------
  |  Branch (3301:12): [True: 0, False: 351]
  ------------------
 3302|      0|      return XML_ERROR_NO_MEMORY;
 3303|      0|    }
 3304|       |
 3305|    351|    parser->m_attsSize = n + nDefaultAtts + INIT_ATTS_SIZE;
  ------------------
  |  |  244|    351|#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|    351|    temp = (ATTRIBUTE *)REALLOC(parser, (void *)parser->m_atts,
  ------------------
  |  |  715|    351|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 3319|    351|                                parser->m_attsSize * sizeof(ATTRIBUTE));
 3320|    351|    if (temp == NULL) {
  ------------------
  |  Branch (3320:9): [True: 0, False: 351]
  ------------------
 3321|      0|      parser->m_attsSize = oldAttsSize;
 3322|      0|      return XML_ERROR_NO_MEMORY;
 3323|      0|    }
 3324|    351|    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|    351|    if (n > oldAttsSize)
  ------------------
  |  Branch (3345:9): [True: 331, False: 20]
  ------------------
 3346|    331|      XmlGetAttributes(enc, attStr, n, parser->m_atts);
  ------------------
  |  |  262|    331|  (((enc)->getAtts)(enc, ptr, attsMax, atts))
  ------------------
 3347|    351|  }
 3348|       |
 3349|  2.38M|  appAtts = (const XML_Char **)parser->m_atts;
 3350|  2.40M|  for (i = 0; i < n; i++) {
  ------------------
  |  Branch (3350:15): [True: 21.8k, False: 2.38M]
  ------------------
 3351|  21.8k|    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|  21.8k|    ATTRIBUTE_ID *attId
 3357|  21.8k|        = getAttributeId(parser, enc, currAtt->name,
 3358|  21.8k|                         currAtt->name + XmlNameLength(enc, currAtt->name));
  ------------------
  |  |  257|  21.8k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 3359|  21.8k|    if (! attId)
  ------------------
  |  Branch (3359:9): [True: 0, False: 21.8k]
  ------------------
 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|  21.8k|    if ((attId->name)[-1]) {
  ------------------
  |  Branch (3375:9): [True: 415, False: 21.4k]
  ------------------
 3376|    415|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (3376:11): [True: 393, False: 22]
  ------------------
 3377|    393|        parser->m_eventPtr = parser->m_atts[i].name;
 3378|    415|      return XML_ERROR_DUPLICATE_ATTRIBUTE;
 3379|    415|    }
 3380|  21.4k|    (attId->name)[-1] = 1;
 3381|  21.4k|    appAtts[attIndex++] = attId->name;
 3382|  21.4k|    if (! parser->m_atts[i].normalized) {
  ------------------
  |  Branch (3382:9): [True: 9.67k, False: 11.7k]
  ------------------
 3383|  9.67k|      enum XML_Error result;
 3384|  9.67k|      XML_Bool isCdata = XML_TRUE;
  ------------------
  |  |   55|  9.67k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 3385|       |
 3386|       |      /* figure out whether declared as other than CDATA */
 3387|  9.67k|      if (attId->maybeTokenized) {
  ------------------
  |  Branch (3387:11): [True: 1.12k, False: 8.55k]
  ------------------
 3388|  1.12k|        int j;
 3389|  48.0k|        for (j = 0; j < nDefaultAtts; j++) {
  ------------------
  |  Branch (3389:21): [True: 47.5k, False: 426]
  ------------------
 3390|  47.5k|          if (attId == elementType->defaultAtts[j].id) {
  ------------------
  |  Branch (3390:15): [True: 698, False: 46.8k]
  ------------------
 3391|    698|            isCdata = elementType->defaultAtts[j].isCdata;
 3392|    698|            break;
 3393|    698|          }
 3394|  47.5k|        }
 3395|  1.12k|      }
 3396|       |
 3397|       |      /* normalize the attribute value */
 3398|  9.67k|      result = storeAttributeValue(
 3399|  9.67k|          parser, enc, isCdata, parser->m_atts[i].valuePtr,
 3400|  9.67k|          parser->m_atts[i].valueEnd, &parser->m_tempPool, account);
 3401|  9.67k|      if (result)
  ------------------
  |  Branch (3401:11): [True: 205, False: 9.47k]
  ------------------
 3402|    205|        return result;
 3403|  9.47k|      appAtts[attIndex] = poolStart(&parser->m_tempPool);
  ------------------
  |  |  596|  9.47k|#define poolStart(pool) ((pool)->start)
  ------------------
 3404|  9.47k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|  9.47k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3405|  11.7k|    } else {
 3406|       |      /* the value did not need normalizing */
 3407|  11.7k|      appAtts[attIndex] = poolStoreString(&parser->m_tempPool, enc,
 3408|  11.7k|                                          parser->m_atts[i].valuePtr,
 3409|  11.7k|                                          parser->m_atts[i].valueEnd);
 3410|  11.7k|      if (appAtts[attIndex] == 0)
  ------------------
  |  Branch (3410:11): [True: 0, False: 11.7k]
  ------------------
 3411|      0|        return XML_ERROR_NO_MEMORY;
 3412|  11.7k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|  11.7k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3413|  11.7k|    }
 3414|       |    /* handle prefixed attribute names */
 3415|  21.2k|    if (attId->prefix) {
  ------------------
  |  Branch (3415:9): [True: 0, False: 21.2k]
  ------------------
 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|  21.2k|      attIndex++;
 3431|  21.2k|  }
 3432|       |
 3433|       |  /* set-up for XML_GetSpecifiedAttributeCount and XML_GetIdAttributeIndex */
 3434|  2.38M|  parser->m_nSpecifiedAtts = attIndex;
 3435|  2.38M|  if (elementType->idAtt && (elementType->idAtt->name)[-1]) {
  ------------------
  |  Branch (3435:7): [True: 556, False: 2.38M]
  |  Branch (3435:29): [True: 265, False: 291]
  ------------------
 3436|    876|    for (i = 0; i < attIndex; i += 2)
  ------------------
  |  Branch (3436:17): [True: 876, False: 0]
  ------------------
 3437|    876|      if (appAtts[i] == elementType->idAtt->name) {
  ------------------
  |  Branch (3437:11): [True: 265, False: 611]
  ------------------
 3438|    265|        parser->m_idAttIndex = i;
 3439|    265|        break;
 3440|    265|      }
 3441|    265|  } else
 3442|  2.38M|    parser->m_idAttIndex = -1;
 3443|       |
 3444|       |  /* do attribute defaulting */
 3445|  2.45M|  for (i = 0; i < nDefaultAtts; i++) {
  ------------------
  |  Branch (3445:15): [True: 77.7k, False: 2.38M]
  ------------------
 3446|  77.7k|    const DEFAULT_ATTRIBUTE *da = elementType->defaultAtts + i;
 3447|  77.7k|    if (! (da->id->name)[-1] && da->value) {
  ------------------
  |  Branch (3447:9): [True: 76.8k, False: 966]
  |  Branch (3447:33): [True: 752, False: 76.0k]
  ------------------
 3448|    752|      if (da->id->prefix) {
  ------------------
  |  Branch (3448:11): [True: 0, False: 752]
  ------------------
 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|    752|      } else {
 3461|    752|        (da->id->name)[-1] = 1;
 3462|    752|        appAtts[attIndex++] = da->id->name;
 3463|    752|        appAtts[attIndex++] = da->value;
 3464|    752|      }
 3465|    752|    }
 3466|  77.7k|  }
 3467|  2.38M|  appAtts[attIndex] = 0;
 3468|       |
 3469|       |  /* expand prefixed attribute names, check for duplicates,
 3470|       |     and clear flags that say whether attributes were specified */
 3471|  2.38M|  i = 0;
 3472|  2.38M|  if (nPrefixes) {
  ------------------
  |  Branch (3472:7): [True: 0, False: 2.38M]
  ------------------
 3473|      0|    int j; /* hash table index */
 3474|      0|    unsigned long version = parser->m_nsAttsVersion;
 3475|       |
 3476|       |    /* Detect and prevent invalid shift */
 3477|      0|    if (parser->m_nsAttsPower >= sizeof(unsigned int) * 8 /* bits per byte */) {
  ------------------
  |  Branch (3477:9): [True: 0, False: 0]
  ------------------
 3478|      0|      return XML_ERROR_NO_MEMORY;
 3479|      0|    }
 3480|       |
 3481|      0|    unsigned int nsAttsSize = 1u << parser->m_nsAttsPower;
 3482|      0|    unsigned char oldNsAttsPower = parser->m_nsAttsPower;
 3483|       |    /* size of hash table must be at least 2 * (# of prefixed attributes) */
 3484|      0|    if ((nPrefixes << 1)
  ------------------
  |  Branch (3484:9): [True: 0, False: 0]
  ------------------
 3485|      0|        >> parser->m_nsAttsPower) { /* true for m_nsAttsPower = 0 */
 3486|      0|      NS_ATT *temp;
 3487|       |      /* hash table size must also be a power of 2 and >= 8 */
 3488|      0|      while (nPrefixes >> parser->m_nsAttsPower++)
  ------------------
  |  Branch (3488:14): [True: 0, False: 0]
  ------------------
 3489|      0|        ;
 3490|      0|      if (parser->m_nsAttsPower < 3)
  ------------------
  |  Branch (3490:11): [True: 0, False: 0]
  ------------------
 3491|      0|        parser->m_nsAttsPower = 3;
 3492|       |
 3493|       |      /* Detect and prevent invalid shift */
 3494|      0|      if (parser->m_nsAttsPower >= sizeof(nsAttsSize) * 8 /* bits per byte */) {
  ------------------
  |  Branch (3494:11): [True: 0, False: 0]
  ------------------
 3495|       |        /* Restore actual size of memory in m_nsAtts */
 3496|      0|        parser->m_nsAttsPower = oldNsAttsPower;
 3497|      0|        return XML_ERROR_NO_MEMORY;
 3498|      0|      }
 3499|       |
 3500|      0|      nsAttsSize = 1u << parser->m_nsAttsPower;
 3501|       |
 3502|       |      /* Detect and prevent integer overflow.
 3503|       |       * The preprocessor guard addresses the "always false" warning
 3504|       |       * from -Wtype-limits on platforms where
 3505|       |       * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3506|       |#if UINT_MAX >= SIZE_MAX
 3507|       |      if (nsAttsSize > (size_t)(-1) / sizeof(NS_ATT)) {
 3508|       |        /* Restore actual size of memory in m_nsAtts */
 3509|       |        parser->m_nsAttsPower = oldNsAttsPower;
 3510|       |        return XML_ERROR_NO_MEMORY;
 3511|       |      }
 3512|       |#endif
 3513|       |
 3514|      0|      temp = (NS_ATT *)REALLOC(parser, parser->m_nsAtts,
  ------------------
  |  |  715|      0|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 3515|      0|                               nsAttsSize * sizeof(NS_ATT));
 3516|      0|      if (! temp) {
  ------------------
  |  Branch (3516:11): [True: 0, False: 0]
  ------------------
 3517|       |        /* Restore actual size of memory in m_nsAtts */
 3518|      0|        parser->m_nsAttsPower = oldNsAttsPower;
 3519|      0|        return XML_ERROR_NO_MEMORY;
 3520|      0|      }
 3521|      0|      parser->m_nsAtts = temp;
 3522|      0|      version = 0; /* force re-initialization of m_nsAtts hash table */
 3523|      0|    }
 3524|       |    /* using a version flag saves us from initializing m_nsAtts every time */
 3525|      0|    if (! version) { /* initialize version flags when version wraps around */
  ------------------
  |  Branch (3525:9): [True: 0, False: 0]
  ------------------
 3526|      0|      version = INIT_ATTS_VERSION;
  ------------------
  |  |  245|      0|#define INIT_ATTS_VERSION 0xFFFFFFFF
  ------------------
 3527|      0|      for (j = nsAttsSize; j != 0;)
  ------------------
  |  Branch (3527:28): [True: 0, False: 0]
  ------------------
 3528|      0|        parser->m_nsAtts[--j].version = version;
 3529|      0|    }
 3530|      0|    parser->m_nsAttsVersion = --version;
 3531|       |
 3532|       |    /* expand prefixed names and check for duplicates */
 3533|      0|    for (; i < attIndex; i += 2) {
  ------------------
  |  Branch (3533:12): [True: 0, False: 0]
  ------------------
 3534|      0|      const XML_Char *s = appAtts[i];
 3535|      0|      if (s[-1] == 2) { /* prefixed */
  ------------------
  |  Branch (3535:11): [True: 0, False: 0]
  ------------------
 3536|      0|        ATTRIBUTE_ID *id;
 3537|      0|        const BINDING *b;
 3538|      0|        unsigned long uriHash;
 3539|      0|        struct siphash sip_state;
 3540|      0|        struct sipkey sip_key;
 3541|       |
 3542|      0|        copy_salt_to_sipkey(parser, &sip_key);
 3543|      0|        sip24_init(&sip_state, &sip_key);
 3544|       |
 3545|      0|        ((XML_Char *)s)[-1] = 0; /* clear flag */
 3546|      0|        id = (ATTRIBUTE_ID *)lookup(parser, &dtd->attributeIds, s, 0);
 3547|      0|        if (! id || ! id->prefix) {
  ------------------
  |  Branch (3547:13): [True: 0, False: 0]
  |  Branch (3547:21): [True: 0, False: 0]
  ------------------
 3548|       |          /* This code is walking through the appAtts array, dealing
 3549|       |           * with (in this case) a prefixed attribute name.  To be in
 3550|       |           * the array, the attribute must have already been bound, so
 3551|       |           * has to have passed through the hash table lookup once
 3552|       |           * already.  That implies that an entry for it already
 3553|       |           * exists, so the lookup above will return a pointer to
 3554|       |           * already allocated memory.  There is no opportunaity for
 3555|       |           * the allocator to fail, so the condition above cannot be
 3556|       |           * fulfilled.
 3557|       |           *
 3558|       |           * Since it is difficult to be certain that the above
 3559|       |           * analysis is complete, we retain the test and merely
 3560|       |           * remove the code from coverage tests.
 3561|       |           */
 3562|      0|          return XML_ERROR_NO_MEMORY; /* LCOV_EXCL_LINE */
 3563|      0|        }
 3564|      0|        b = id->prefix->binding;
 3565|      0|        if (! b)
  ------------------
  |  Branch (3565:13): [True: 0, False: 0]
  ------------------
 3566|      0|          return XML_ERROR_UNBOUND_PREFIX;
 3567|       |
 3568|      0|        for (j = 0; j < b->uriLen; j++) {
  ------------------
  |  Branch (3568:21): [True: 0, False: 0]
  ------------------
 3569|      0|          const XML_Char c = b->uri[j];
 3570|      0|          if (! poolAppendChar(&parser->m_tempPool, c))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3570:15): [True: 0, False: 0]
  ------------------
 3571|      0|            return XML_ERROR_NO_MEMORY;
 3572|      0|        }
 3573|       |
 3574|      0|        sip24_update(&sip_state, b->uri, b->uriLen * sizeof(XML_Char));
 3575|       |
 3576|      0|        while (*s++ != XML_T(ASCII_COLON))
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (3576:16): [True: 0, False: 0]
  ------------------
 3577|      0|          ;
 3578|       |
 3579|      0|        sip24_update(&sip_state, s, keylen(s) * sizeof(XML_Char));
 3580|       |
 3581|      0|        do { /* copies null terminator */
 3582|      0|          if (! poolAppendChar(&parser->m_tempPool, *s))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3582:15): [True: 0, False: 0]
  ------------------
 3583|      0|            return XML_ERROR_NO_MEMORY;
 3584|      0|        } while (*s++);
  ------------------
  |  Branch (3584:18): [True: 0, False: 0]
  ------------------
 3585|       |
 3586|      0|        uriHash = (unsigned long)sip24_final(&sip_state);
 3587|       |
 3588|      0|        { /* Check hash table for duplicate of expanded name (uriName).
 3589|       |             Derived from code in lookup(parser, HASH_TABLE *table, ...).
 3590|       |          */
 3591|      0|          unsigned char step = 0;
 3592|      0|          unsigned long mask = nsAttsSize - 1;
 3593|      0|          j = uriHash & mask; /* index into hash table */
 3594|      0|          while (parser->m_nsAtts[j].version == version) {
  ------------------
  |  Branch (3594:18): [True: 0, False: 0]
  ------------------
 3595|       |            /* for speed we compare stored hash values first */
 3596|      0|            if (uriHash == parser->m_nsAtts[j].hash) {
  ------------------
  |  Branch (3596:17): [True: 0, False: 0]
  ------------------
 3597|      0|              const XML_Char *s1 = poolStart(&parser->m_tempPool);
  ------------------
  |  |  596|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 3598|      0|              const XML_Char *s2 = parser->m_nsAtts[j].uriName;
 3599|       |              /* s1 is null terminated, but not s2 */
 3600|      0|              for (; *s1 == *s2 && *s1 != 0; s1++, s2++)
  ------------------
  |  Branch (3600:22): [True: 0, False: 0]
  |  Branch (3600:36): [True: 0, False: 0]
  ------------------
 3601|      0|                ;
 3602|      0|              if (*s1 == 0)
  ------------------
  |  Branch (3602:19): [True: 0, False: 0]
  ------------------
 3603|      0|                return XML_ERROR_DUPLICATE_ATTRIBUTE;
 3604|      0|            }
 3605|      0|            if (! step)
  ------------------
  |  Branch (3605:17): [True: 0, False: 0]
  ------------------
 3606|      0|              step = PROBE_STEP(uriHash, mask, parser->m_nsAttsPower);
  ------------------
  |  |  235|      0|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  233|      0|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 3607|      0|            j < step ? (j += nsAttsSize - step) : (j -= step);
  ------------------
  |  Branch (3607:13): [True: 0, False: 0]
  ------------------
 3608|      0|          }
 3609|      0|        }
 3610|       |
 3611|      0|        if (parser->m_ns_triplets) { /* append namespace separator and prefix */
  ------------------
  |  Branch (3611:13): [True: 0, False: 0]
  ------------------
 3612|      0|          parser->m_tempPool.ptr[-1] = parser->m_namespaceSeparator;
 3613|      0|          s = b->prefix->name;
 3614|      0|          do {
 3615|      0|            if (! poolAppendChar(&parser->m_tempPool, *s))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3615:17): [True: 0, False: 0]
  ------------------
 3616|      0|              return XML_ERROR_NO_MEMORY;
 3617|      0|          } while (*s++);
  ------------------
  |  Branch (3617:20): [True: 0, False: 0]
  ------------------
 3618|      0|        }
 3619|       |
 3620|       |        /* store expanded name in attribute list */
 3621|      0|        s = poolStart(&parser->m_tempPool);
  ------------------
  |  |  596|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 3622|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3623|      0|        appAtts[i] = s;
 3624|       |
 3625|       |        /* fill empty slot with new version, uriName and hash value */
 3626|      0|        parser->m_nsAtts[j].version = version;
 3627|      0|        parser->m_nsAtts[j].hash = uriHash;
 3628|      0|        parser->m_nsAtts[j].uriName = s;
 3629|       |
 3630|      0|        if (! --nPrefixes) {
  ------------------
  |  Branch (3630:13): [True: 0, False: 0]
  ------------------
 3631|      0|          i += 2;
 3632|      0|          break;
 3633|      0|        }
 3634|      0|      } else                     /* not prefixed */
 3635|      0|        ((XML_Char *)s)[-1] = 0; /* clear flag */
 3636|      0|    }
 3637|      0|  }
 3638|       |  /* clear flags for the remaining attributes */
 3639|  2.40M|  for (; i < attIndex; i += 2)
  ------------------
  |  Branch (3639:10): [True: 20.9k, False: 2.38M]
  ------------------
 3640|  20.9k|    ((XML_Char *)(appAtts[i]))[-1] = 0;
 3641|  2.38M|  for (binding = *bindingsPtr; binding; binding = binding->nextTagBinding)
  ------------------
  |  Branch (3641:32): [True: 0, False: 2.38M]
  ------------------
 3642|      0|    binding->attId->name[-1] = 0;
 3643|       |
 3644|  2.38M|  if (! parser->m_ns)
  ------------------
  |  Branch (3644:7): [True: 2.38M, False: 0]
  ------------------
 3645|  2.38M|    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|  7.96k|setElementTypePrefix(XML_Parser parser, ELEMENT_TYPE *elementType) {
 6448|  7.96k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6449|  7.96k|  const XML_Char *name;
 6450|   173k|  for (name = elementType->name; *name; name++) {
  ------------------
  |  Branch (6450:34): [True: 168k, False: 4.51k]
  ------------------
 6451|   168k|    if (*name == XML_T(ASCII_COLON)) {
  ------------------
  |  |  191|   168k|#  define XML_T(x) x
  ------------------
  |  Branch (6451:9): [True: 3.44k, False: 165k]
  ------------------
 6452|  3.44k|      PREFIX *prefix;
 6453|  3.44k|      const XML_Char *s;
 6454|   108k|      for (s = elementType->name; s != name; s++) {
  ------------------
  |  Branch (6454:35): [True: 104k, False: 3.44k]
  ------------------
 6455|   104k|        if (! poolAppendChar(&dtd->pool, *s))
  ------------------
  |  |  603|   104k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 125, False: 104k]
  |  |  |  Branch (603:35): [True: 0, False: 125]
  |  |  ------------------
  |  |  604|   104k|       ? 0                                                                     \
  |  |  605|   104k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6455:13): [True: 0, False: 104k]
  ------------------
 6456|      0|          return 0;
 6457|   104k|      }
 6458|  3.44k|      if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  603|  3.44k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 20, False: 3.42k]
  |  |  |  Branch (603:35): [True: 0, False: 20]
  |  |  ------------------
  |  |  604|  3.44k|       ? 0                                                                     \
  |  |  605|  3.44k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6458:11): [True: 0, False: 3.44k]
  ------------------
 6459|      0|        return 0;
 6460|  3.44k|      prefix = (PREFIX *)lookup(parser, &dtd->prefixes, poolStart(&dtd->pool),
  ------------------
  |  |  596|  3.44k|#define poolStart(pool) ((pool)->start)
  ------------------
 6461|  3.44k|                                sizeof(PREFIX));
 6462|  3.44k|      if (! prefix)
  ------------------
  |  Branch (6462:11): [True: 0, False: 3.44k]
  ------------------
 6463|      0|        return 0;
 6464|  3.44k|      if (prefix->name == poolStart(&dtd->pool))
  ------------------
  |  |  596|  3.44k|#define poolStart(pool) ((pool)->start)
  ------------------
  |  Branch (6464:11): [True: 2.83k, False: 611]
  ------------------
 6465|  2.83k|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|  2.83k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6466|    611|      else
 6467|    611|        poolDiscard(&dtd->pool);
  ------------------
  |  |  600|    611|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6468|  3.44k|      elementType->prefix = prefix;
 6469|  3.44k|      break;
 6470|  3.44k|    }
 6471|   168k|  }
 6472|  7.96k|  return 1;
 6473|  7.96k|}
xmlparse.c:freeBindings:
 3224|  50.4k|freeBindings(XML_Parser parser, BINDING *bindings) {
 3225|  50.4k|  while (bindings) {
  ------------------
  |  Branch (3225:10): [True: 0, False: 50.4k]
  ------------------
 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|  50.4k|}
xmlparse.c:epilogProcessor:
 5647|    147|                const char **nextPtr) {
 5648|    147|  parser->m_processor = epilogProcessor;
 5649|    147|  parser->m_eventPtr = s;
 5650|  1.92k|  for (;;) {
 5651|  1.92k|    const char *next = NULL;
 5652|  1.92k|    int tok = XmlPrologTok(parser->m_encoding, s, end, &next);
  ------------------
  |  |  227|  1.92k|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  1.92k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5653|  1.92k|#ifdef XML_DTD
 5654|  1.92k|    if (! accountingDiffTolerated(parser, tok, s, next, __LINE__,
  ------------------
  |  Branch (5654:9): [True: 0, False: 1.92k]
  ------------------
 5655|  1.92k|                                  XML_ACCOUNT_DIRECT)) {
 5656|      0|      accountingOnAbort(parser);
 5657|      0|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 5658|      0|    }
 5659|  1.92k|#endif
 5660|  1.92k|    parser->m_eventEndPtr = next;
 5661|  1.92k|    switch (tok) {
 5662|       |    /* report partial linebreak - it might be the last token */
 5663|      2|    case -XML_TOK_PROLOG_S:
  ------------------
  |  |   82|      2|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (5663:5): [True: 2, False: 1.92k]
  ------------------
 5664|      2|      if (parser->m_defaultHandler) {
  ------------------
  |  Branch (5664:11): [True: 0, False: 2]
  ------------------
 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|      2|      *nextPtr = next;
 5670|      2|      return XML_ERROR_NONE;
 5671|     53|    case XML_TOK_NONE:
  ------------------
  |  |   51|     53|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (5671:5): [True: 53, False: 1.87k]
  ------------------
 5672|     53|      *nextPtr = s;
 5673|     53|      return XML_ERROR_NONE;
 5674|    772|    case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    772|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (5674:5): [True: 772, False: 1.15k]
  ------------------
 5675|    772|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (5675:11): [True: 0, False: 772]
  ------------------
 5676|      0|        reportDefault(parser, parser->m_encoding, s, next);
 5677|    772|      break;
 5678|    641|    case XML_TOK_PI:
  ------------------
  |  |   76|    641|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (5678:5): [True: 641, False: 1.28k]
  ------------------
 5679|    641|      if (! reportProcessingInstruction(parser, parser->m_encoding, s, next))
  ------------------
  |  Branch (5679:11): [True: 0, False: 641]
  ------------------
 5680|      0|        return XML_ERROR_NO_MEMORY;
 5681|    641|      break;
 5682|    641|    case XML_TOK_COMMENT:
  ------------------
  |  |   78|    366|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (5682:5): [True: 366, False: 1.56k]
  ------------------
 5683|    366|      if (! reportComment(parser, parser->m_encoding, s, next))
  ------------------
  |  Branch (5683:11): [True: 0, False: 366]
  ------------------
 5684|      0|        return XML_ERROR_NO_MEMORY;
 5685|    366|      break;
 5686|    366|    case XML_TOK_INVALID:
  ------------------
  |  |   57|     23|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (5686:5): [True: 23, False: 1.90k]
  ------------------
 5687|     23|      parser->m_eventPtr = next;
 5688|     23|      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: 1.92k]
  ------------------
 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: 1.92k]
  ------------------
 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|     62|    default:
  ------------------
  |  Branch (5701:5): [True: 62, False: 1.86k]
  ------------------
 5702|     62|      return XML_ERROR_JUNK_AFTER_DOC_ELEMENT;
 5703|  1.92k|    }
 5704|  1.77k|    parser->m_eventPtr = s = next;
 5705|  1.77k|    switch (parser->m_parsingStatus.parsing) {
 5706|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (5706:5): [True: 0, False: 1.77k]
  ------------------
 5707|      0|      *nextPtr = next;
 5708|      0|      return XML_ERROR_NONE;
 5709|      0|    case XML_FINISHED:
  ------------------
  |  Branch (5709:5): [True: 0, False: 1.77k]
  ------------------
 5710|      0|      return XML_ERROR_ABORTED;
 5711|  1.77k|    default:;
  ------------------
  |  Branch (5711:5): [True: 1.77k, False: 0]
  ------------------
 5712|  1.77k|    }
 5713|  1.77k|  }
 5714|    147|}
xmlparse.c:doCdataSection:
 4027|  73.5k|               enum XML_Account account) {
 4028|  73.5k|  const char *s = *startPtr;
 4029|  73.5k|  const char **eventPP;
 4030|  73.5k|  const char **eventEndPP;
 4031|  73.5k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (4031:7): [True: 1.68k, False: 71.8k]
  ------------------
 4032|  1.68k|    eventPP = &parser->m_eventPtr;
 4033|  1.68k|    *eventPP = s;
 4034|  1.68k|    eventEndPP = &parser->m_eventEndPtr;
 4035|  71.8k|  } else {
 4036|  71.8k|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 4037|  71.8k|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 4038|  71.8k|  }
 4039|  73.5k|  *eventPP = s;
 4040|  73.5k|  *startPtr = NULL;
 4041|       |
 4042|   338k|  for (;;) {
 4043|   338k|    const char *next = s; /* in case of XML_TOK_NONE or XML_TOK_PARTIAL */
 4044|   338k|    int tok = XmlCdataSectionTok(enc, s, end, &next);
  ------------------
  |  |  233|   338k|  XmlTok(enc, XML_CDATA_SECTION_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|   338k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 4045|   338k|#ifdef XML_DTD
 4046|   338k|    if (! accountingDiffTolerated(parser, tok, s, next, __LINE__, account)) {
  ------------------
  |  Branch (4046:9): [True: 1, False: 338k]
  ------------------
 4047|      1|      accountingOnAbort(parser);
 4048|      1|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4049|      1|    }
 4050|       |#else
 4051|       |    UNUSED_P(account);
 4052|       |#endif
 4053|   338k|    *eventEndPP = next;
 4054|   338k|    switch (tok) {
 4055|  72.7k|    case XML_TOK_CDATA_SECT_CLOSE:
  ------------------
  |  |  113|  72.7k|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  |  Branch (4055:5): [True: 72.7k, False: 265k]
  ------------------
 4056|  72.7k|      if (parser->m_endCdataSectionHandler)
  ------------------
  |  Branch (4056:11): [True: 0, False: 72.7k]
  ------------------
 4057|      0|        parser->m_endCdataSectionHandler(parser->m_handlerArg);
 4058|       |      /* BEGIN disabled code */
 4059|       |      /* see comment under XML_TOK_CDATA_SECT_OPEN */
 4060|  72.7k|      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|  72.7k|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4064:16): [True: 0, False: 72.7k]
  ------------------
 4065|      0|        reportDefault(parser, enc, s, next);
 4066|  72.7k|      *startPtr = next;
 4067|  72.7k|      *nextPtr = next;
 4068|  72.7k|      if (parser->m_parsingStatus.parsing == XML_FINISHED)
  ------------------
  |  Branch (4068:11): [True: 0, False: 72.7k]
  ------------------
 4069|      0|        return XML_ERROR_ABORTED;
 4070|  72.7k|      else
 4071|  72.7k|        return XML_ERROR_NONE;
 4072|   164k|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|   164k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (4072:5): [True: 164k, False: 174k]
  ------------------
 4073|   164k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (4073:11): [True: 0, False: 164k]
  ------------------
 4074|      0|        XML_Char c = 0xA;
 4075|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 4076|   164k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4076:18): [True: 0, False: 164k]
  ------------------
 4077|      0|        reportDefault(parser, enc, s, next);
 4078|   164k|      break;
 4079|   100k|    case XML_TOK_DATA_CHARS: {
  ------------------
  |  |   67|   100k|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (4079:5): [True: 100k, False: 237k]
  ------------------
 4080|   100k|      XML_CharacterDataHandler charDataHandler = parser->m_characterDataHandler;
 4081|   100k|      if (charDataHandler) {
  ------------------
  |  Branch (4081:11): [True: 0, False: 100k]
  ------------------
 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|   100k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4098:18): [True: 0, False: 100k]
  ------------------
 4099|      0|        reportDefault(parser, enc, s, next);
 4100|   100k|    } break;
 4101|    166|    case XML_TOK_INVALID:
  ------------------
  |  |   57|    166|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4101:5): [True: 166, False: 338k]
  ------------------
 4102|    166|      *eventPP = next;
 4103|    166|      return XML_ERROR_INVALID_TOKEN;
 4104|    111|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|    111|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (4104:5): [True: 111, False: 338k]
  ------------------
 4105|    111|      if (haveMore) {
  ------------------
  |  Branch (4105:11): [True: 111, False: 0]
  ------------------
 4106|    111|        *nextPtr = s;
 4107|    111|        return XML_ERROR_NONE;
 4108|    111|      }
 4109|      0|      return XML_ERROR_PARTIAL_CHAR;
 4110|     86|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|     86|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (4110:5): [True: 86, False: 338k]
  ------------------
 4111|    524|    case XML_TOK_NONE:
  ------------------
  |  |   51|    524|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (4111:5): [True: 438, False: 337k]
  ------------------
 4112|    524|      if (haveMore) {
  ------------------
  |  Branch (4112:11): [True: 459, False: 65]
  ------------------
 4113|    459|        *nextPtr = s;
 4114|    459|        return XML_ERROR_NONE;
 4115|    459|      }
 4116|     65|      return XML_ERROR_UNCLOSED_CDATA_SECTION;
 4117|      0|    default:
  ------------------
  |  Branch (4117:5): [True: 0, False: 338k]
  ------------------
 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|   338k|    }
 4129|       |
 4130|   264k|    *eventPP = s = next;
 4131|   264k|    switch (parser->m_parsingStatus.parsing) {
 4132|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (4132:5): [True: 0, False: 264k]
  ------------------
 4133|      0|      *nextPtr = next;
 4134|      0|      return XML_ERROR_NONE;
 4135|      0|    case XML_FINISHED:
  ------------------
  |  Branch (4135:5): [True: 0, False: 264k]
  ------------------
 4136|      0|      return XML_ERROR_ABORTED;
 4137|   264k|    default:;
  ------------------
  |  Branch (4137:5): [True: 264k, False: 0]
  ------------------
 4138|   264k|    }
 4139|   264k|  }
 4140|       |  /* not reached */
 4141|  73.5k|}
xmlparse.c:storeRawNames:
 2572|  6.56k|storeRawNames(XML_Parser parser) {
 2573|  6.56k|  TAG *tag = parser->m_tagStack;
 2574|  57.1k|  while (tag) {
  ------------------
  |  Branch (2574:10): [True: 50.5k, False: 6.56k]
  ------------------
 2575|  50.5k|    int bufSize;
 2576|  50.5k|    int nameLen = sizeof(XML_Char) * (tag->name.strLen + 1);
 2577|  50.5k|    size_t rawNameLen;
 2578|  50.5k|    char *rawNameBuf = tag->buf + nameLen;
 2579|       |    /* Stop if already stored.  Since m_tagStack is a stack, we can stop
 2580|       |       at the first entry that has already been copied; everything
 2581|       |       below it in the stack is already been accounted for in a
 2582|       |       previous call to this function.
 2583|       |    */
 2584|  50.5k|    if (tag->rawName == rawNameBuf)
  ------------------
  |  Branch (2584:9): [True: 0, False: 50.5k]
  ------------------
 2585|      0|      break;
 2586|       |    /* For re-use purposes we need to ensure that the
 2587|       |       size of tag->buf is a multiple of sizeof(XML_Char).
 2588|       |    */
 2589|  50.5k|    rawNameLen = ROUND_UP(tag->rawNameLength, sizeof(XML_Char));
  ------------------
  |  |  197|  50.5k|#define ROUND_UP(n, sz) (((n) + ((sz)-1)) & ~((sz)-1))
  ------------------
 2590|       |    /* Detect and prevent integer overflow. */
 2591|  50.5k|    if (rawNameLen > (size_t)INT_MAX - nameLen)
  ------------------
  |  Branch (2591:9): [True: 0, False: 50.5k]
  ------------------
 2592|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2593|  50.5k|    bufSize = nameLen + (int)rawNameLen;
 2594|  50.5k|    if (bufSize > tag->bufEnd - tag->buf) {
  ------------------
  |  Branch (2594:9): [True: 461, False: 50.0k]
  ------------------
 2595|    461|      char *temp = (char *)REALLOC(parser, tag->buf, bufSize);
  ------------------
  |  |  715|    461|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 2596|    461|      if (temp == NULL)
  ------------------
  |  Branch (2596:11): [True: 0, False: 461]
  ------------------
 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|    461|      if (tag->name.str == (XML_Char *)tag->buf)
  ------------------
  |  Branch (2601:11): [True: 461, False: 0]
  ------------------
 2602|    461|        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|    461|      if (tag->name.localPart)
  ------------------
  |  Branch (2606:11): [True: 0, False: 461]
  ------------------
 2607|      0|        tag->name.localPart
 2608|      0|            = (XML_Char *)temp + (tag->name.localPart - (XML_Char *)tag->buf);
 2609|    461|      tag->buf = temp;
 2610|    461|      tag->bufEnd = temp + bufSize;
 2611|    461|      rawNameBuf = temp + nameLen;
 2612|    461|    }
 2613|  50.5k|    memcpy(rawNameBuf, tag->rawName, tag->rawNameLength);
 2614|  50.5k|    tag->rawName = rawNameBuf;
 2615|  50.5k|    tag = tag->parent;
 2616|  50.5k|  }
 2617|  6.56k|  return XML_TRUE;
  ------------------
  |  |   55|  6.56k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2618|  6.56k|}
xmlparse.c:getElementType:
 7615|  10.6k|               const char *end) {
 7616|  10.6k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 7617|  10.6k|  const XML_Char *name = poolStoreString(&dtd->pool, enc, ptr, end);
 7618|  10.6k|  ELEMENT_TYPE *ret;
 7619|       |
 7620|  10.6k|  if (! name)
  ------------------
  |  Branch (7620:7): [True: 0, False: 10.6k]
  ------------------
 7621|      0|    return NULL;
 7622|  10.6k|  ret = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, name,
 7623|  10.6k|                               sizeof(ELEMENT_TYPE));
 7624|  10.6k|  if (! ret)
  ------------------
  |  Branch (7624:7): [True: 0, False: 10.6k]
  ------------------
 7625|      0|    return NULL;
 7626|  10.6k|  if (ret->name != name)
  ------------------
  |  Branch (7626:7): [True: 2.68k, False: 7.96k]
  ------------------
 7627|  2.68k|    poolDiscard(&dtd->pool);
  ------------------
  |  |  600|  2.68k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 7628|  7.96k|  else {
 7629|  7.96k|    poolFinish(&dtd->pool);
  ------------------
  |  |  601|  7.96k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 7630|  7.96k|    if (! setElementTypePrefix(parser, ret))
  ------------------
  |  Branch (7630:9): [True: 0, False: 7.96k]
  ------------------
 7631|      0|      return NULL;
 7632|  7.96k|  }
 7633|  10.6k|  return ret;
 7634|  10.6k|}
xmlparse.c:getAttributeId:
 6477|  60.2k|               const char *end) {
 6478|  60.2k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6479|  60.2k|  ATTRIBUTE_ID *id;
 6480|  60.2k|  const XML_Char *name;
 6481|  60.2k|  if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  603|  60.2k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 218, False: 60.0k]
  |  |  |  Branch (603:35): [True: 0, False: 218]
  |  |  ------------------
  |  |  604|  60.2k|       ? 0                                                                     \
  |  |  605|  60.2k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6481:7): [True: 0, False: 60.2k]
  ------------------
 6482|      0|    return NULL;
 6483|  60.2k|  name = poolStoreString(&dtd->pool, enc, start, end);
 6484|  60.2k|  if (! name)
  ------------------
  |  Branch (6484:7): [True: 0, False: 60.2k]
  ------------------
 6485|      0|    return NULL;
 6486|       |  /* skip quotation mark - its storage will be re-used (like in name[-1]) */
 6487|  60.2k|  ++name;
 6488|  60.2k|  id = (ATTRIBUTE_ID *)lookup(parser, &dtd->attributeIds, name,
 6489|  60.2k|                              sizeof(ATTRIBUTE_ID));
 6490|  60.2k|  if (! id)
  ------------------
  |  Branch (6490:7): [True: 0, False: 60.2k]
  ------------------
 6491|      0|    return NULL;
 6492|  60.2k|  if (id->name != name)
  ------------------
  |  Branch (6492:7): [True: 51.4k, False: 8.82k]
  ------------------
 6493|  51.4k|    poolDiscard(&dtd->pool);
  ------------------
  |  |  600|  51.4k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6494|  8.82k|  else {
 6495|  8.82k|    poolFinish(&dtd->pool);
  ------------------
  |  |  601|  8.82k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6496|  8.82k|    if (! parser->m_ns)
  ------------------
  |  Branch (6496:9): [True: 8.82k, False: 0]
  ------------------
 6497|  8.82k|      ;
 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|  8.82k|  }
 6533|  60.2k|  return id;
 6534|  60.2k|}
xmlparse.c:poolAppend:
 7221|  14.1M|           const char *end) {
 7222|  14.1M|  if (! pool->ptr && ! poolGrow(pool))
  ------------------
  |  Branch (7222:7): [True: 62.0k, False: 14.0M]
  |  Branch (7222:22): [True: 0, False: 62.0k]
  ------------------
 7223|      0|    return NULL;
 7224|  14.1M|  for (;;) {
 7225|  14.1M|    const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  161|  14.1M|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|  14.1M|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 7226|  14.1M|        enc, &ptr, end, (ICHAR **)&(pool->ptr), (const ICHAR *)pool->end);
 7227|  14.1M|    if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (7227:9): [True: 14.1M, False: 12.5k]
  ------------------
 7228|  14.1M|        || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (7228:12): [True: 0, False: 12.5k]
  ------------------
 7229|  14.1M|      break;
 7230|  12.5k|    if (! poolGrow(pool))
  ------------------
  |  Branch (7230:9): [True: 0, False: 12.5k]
  ------------------
 7231|      0|      return NULL;
 7232|  12.5k|  }
 7233|  14.1M|  return pool->start;
 7234|  14.1M|}
xmlparse.c:defineAttribute:
 6387|  36.8k|                XML_Bool isId, const XML_Char *value, XML_Parser parser) {
 6388|  36.8k|  DEFAULT_ATTRIBUTE *att;
 6389|  36.8k|  if (value || isId) {
  ------------------
  |  Branch (6389:7): [True: 8.87k, False: 27.9k]
  |  Branch (6389:16): [True: 2.51k, False: 25.4k]
  ------------------
 6390|       |    /* The handling of default attributes gets messed up if we have
 6391|       |       a default which duplicates a non-default. */
 6392|  11.3k|    int i;
 6393|  73.4k|    for (i = 0; i < type->nDefaultAtts; i++)
  ------------------
  |  Branch (6393:17): [True: 70.0k, False: 3.42k]
  ------------------
 6394|  70.0k|      if (attId == type->defaultAtts[i].id)
  ------------------
  |  Branch (6394:11): [True: 7.96k, False: 62.0k]
  ------------------
 6395|  7.96k|        return 1;
 6396|  3.42k|    if (isId && ! type->idAtt && ! attId->xmlns)
  ------------------
  |  Branch (6396:9): [True: 1.74k, False: 1.68k]
  |  Branch (6396:17): [True: 310, False: 1.43k]
  |  Branch (6396:34): [True: 310, False: 0]
  ------------------
 6397|    310|      type->idAtt = attId;
 6398|  3.42k|  }
 6399|  28.8k|  if (type->nDefaultAtts == type->allocDefaultAtts) {
  ------------------
  |  Branch (6399:7): [True: 1.60k, False: 27.2k]
  ------------------
 6400|  1.60k|    if (type->allocDefaultAtts == 0) {
  ------------------
  |  Branch (6400:9): [True: 1.24k, False: 360]
  ------------------
 6401|  1.24k|      type->allocDefaultAtts = 8;
 6402|  1.24k|      type->defaultAtts = (DEFAULT_ATTRIBUTE *)MALLOC(
  ------------------
  |  |  714|  1.24k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 6403|  1.24k|          parser, type->allocDefaultAtts * sizeof(DEFAULT_ATTRIBUTE));
 6404|  1.24k|      if (! type->defaultAtts) {
  ------------------
  |  Branch (6404:11): [True: 0, False: 1.24k]
  ------------------
 6405|      0|        type->allocDefaultAtts = 0;
 6406|      0|        return 0;
 6407|      0|      }
 6408|  1.24k|    } else {
 6409|    360|      DEFAULT_ATTRIBUTE *temp;
 6410|       |
 6411|       |      /* Detect and prevent integer overflow */
 6412|    360|      if (type->allocDefaultAtts > INT_MAX / 2) {
  ------------------
  |  Branch (6412:11): [True: 0, False: 360]
  ------------------
 6413|      0|        return 0;
 6414|      0|      }
 6415|       |
 6416|    360|      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|    360|      temp = (DEFAULT_ATTRIBUTE *)REALLOC(parser, type->defaultAtts,
  ------------------
  |  |  715|    360|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 6429|    360|                                          (count * sizeof(DEFAULT_ATTRIBUTE)));
 6430|    360|      if (temp == NULL)
  ------------------
  |  Branch (6430:11): [True: 0, False: 360]
  ------------------
 6431|      0|        return 0;
 6432|    360|      type->allocDefaultAtts = count;
 6433|    360|      type->defaultAtts = temp;
 6434|    360|    }
 6435|  1.60k|  }
 6436|  28.8k|  att = type->defaultAtts + type->nDefaultAtts;
 6437|  28.8k|  att->id = attId;
 6438|  28.8k|  att->value = value;
 6439|  28.8k|  att->isCdata = isCdata;
 6440|  28.8k|  if (! isCdata)
  ------------------
  |  Branch (6440:7): [True: 27.5k, False: 1.32k]
  ------------------
 6441|  27.5k|    attId->maybeTokenized = XML_TRUE;
  ------------------
  |  |   55|  27.5k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6442|  28.8k|  type->nDefaultAtts += 1;
 6443|  28.8k|  return 1;
 6444|  28.8k|}
xmlparse.c:poolGrow:
 7322|  87.7k|poolGrow(STRING_POOL *pool) {
 7323|  87.7k|  if (pool->freeBlocks) {
  ------------------
  |  Branch (7323:7): [True: 58.2k, False: 29.4k]
  ------------------
 7324|  58.2k|    if (pool->start == 0) {
  ------------------
  |  Branch (7324:9): [True: 56.3k, False: 1.94k]
  ------------------
 7325|  56.3k|      pool->blocks = pool->freeBlocks;
 7326|  56.3k|      pool->freeBlocks = pool->freeBlocks->next;
 7327|  56.3k|      pool->blocks->next = NULL;
 7328|  56.3k|      pool->start = pool->blocks->s;
 7329|  56.3k|      pool->end = pool->start + pool->blocks->size;
 7330|  56.3k|      pool->ptr = pool->start;
 7331|  56.3k|      return XML_TRUE;
  ------------------
  |  |   55|  56.3k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7332|  56.3k|    }
 7333|  1.94k|    if (pool->end - pool->start < pool->freeBlocks->size) {
  ------------------
  |  Branch (7333:9): [True: 1.76k, False: 182]
  ------------------
 7334|  1.76k|      BLOCK *tem = pool->freeBlocks->next;
 7335|  1.76k|      pool->freeBlocks->next = pool->blocks;
 7336|  1.76k|      pool->blocks = pool->freeBlocks;
 7337|  1.76k|      pool->freeBlocks = tem;
 7338|  1.76k|      memcpy(pool->blocks->s, pool->start,
 7339|  1.76k|             (pool->end - pool->start) * sizeof(XML_Char));
 7340|  1.76k|      pool->ptr = pool->blocks->s + (pool->ptr - pool->start);
 7341|  1.76k|      pool->start = pool->blocks->s;
 7342|  1.76k|      pool->end = pool->start + pool->blocks->size;
 7343|  1.76k|      return XML_TRUE;
  ------------------
  |  |   55|  1.76k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7344|  1.76k|    }
 7345|  1.94k|  }
 7346|  29.6k|  if (pool->blocks && pool->start == pool->blocks->s) {
  ------------------
  |  Branch (7346:7): [True: 12.5k, False: 17.1k]
  |  Branch (7346:23): [True: 9.29k, False: 3.21k]
  ------------------
 7347|  9.29k|    BLOCK *temp;
 7348|  9.29k|    int blockSize = (int)((unsigned)(pool->end - pool->start) * 2U);
 7349|  9.29k|    size_t bytesToAllocate;
 7350|       |
 7351|       |    /* NOTE: Needs to be calculated prior to calling `realloc`
 7352|       |             to avoid dangling pointers: */
 7353|  9.29k|    const ptrdiff_t offsetInsideBlock = pool->ptr - pool->start;
 7354|       |
 7355|  9.29k|    if (blockSize < 0) {
  ------------------
  |  Branch (7355:9): [True: 0, False: 9.29k]
  ------------------
 7356|       |      /* This condition traps a situation where either more than
 7357|       |       * INT_MAX/2 bytes have already been allocated.  This isn't
 7358|       |       * readily testable, since it is unlikely that an average
 7359|       |       * machine will have that much memory, so we exclude it from the
 7360|       |       * coverage statistics.
 7361|       |       */
 7362|      0|      return XML_FALSE; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7363|      0|    }
 7364|       |
 7365|  9.29k|    bytesToAllocate = poolBytesToAllocateFor(blockSize);
 7366|  9.29k|    if (bytesToAllocate == 0)
  ------------------
  |  Branch (7366:9): [True: 0, False: 9.29k]
  ------------------
 7367|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7368|       |
 7369|  9.29k|    temp = (BLOCK *)pool->mem->realloc_fcn(pool->blocks,
 7370|  9.29k|                                           (unsigned)bytesToAllocate);
 7371|  9.29k|    if (temp == NULL)
  ------------------
  |  Branch (7371:9): [True: 0, False: 9.29k]
  ------------------
 7372|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7373|  9.29k|    pool->blocks = temp;
 7374|  9.29k|    pool->blocks->size = blockSize;
 7375|  9.29k|    pool->ptr = pool->blocks->s + offsetInsideBlock;
 7376|  9.29k|    pool->start = pool->blocks->s;
 7377|  9.29k|    pool->end = pool->start + blockSize;
 7378|  20.3k|  } else {
 7379|  20.3k|    BLOCK *tem;
 7380|  20.3k|    int blockSize = (int)(pool->end - pool->start);
 7381|  20.3k|    size_t bytesToAllocate;
 7382|       |
 7383|  20.3k|    if (blockSize < 0) {
  ------------------
  |  Branch (7383:9): [True: 0, False: 20.3k]
  ------------------
 7384|       |      /* This condition traps a situation where either more than
 7385|       |       * INT_MAX bytes have already been allocated (which is prevented
 7386|       |       * by various pieces of program logic, not least this one, never
 7387|       |       * mind the unlikelihood of actually having that much memory) or
 7388|       |       * the pool control fields have been corrupted (which could
 7389|       |       * conceivably happen in an extremely buggy user handler
 7390|       |       * function).  Either way it isn't readily testable, so we
 7391|       |       * exclude it from the coverage statistics.
 7392|       |       */
 7393|      0|      return XML_FALSE; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7394|      0|    }
 7395|       |
 7396|  20.3k|    if (blockSize < INIT_BLOCK_SIZE)
  ------------------
  |  |  246|  20.3k|#define INIT_BLOCK_SIZE 1024
  ------------------
  |  Branch (7396:9): [True: 19.5k, False: 812]
  ------------------
 7397|  19.5k|      blockSize = INIT_BLOCK_SIZE;
  ------------------
  |  |  246|  19.5k|#define INIT_BLOCK_SIZE 1024
  ------------------
 7398|    812|    else {
 7399|       |      /* Detect overflow, avoiding _signed_ overflow undefined behavior */
 7400|    812|      if ((int)((unsigned)blockSize * 2U) < 0) {
  ------------------
  |  Branch (7400:11): [True: 0, False: 812]
  ------------------
 7401|      0|        return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7402|      0|      }
 7403|    812|      blockSize *= 2;
 7404|    812|    }
 7405|       |
 7406|  20.3k|    bytesToAllocate = poolBytesToAllocateFor(blockSize);
 7407|  20.3k|    if (bytesToAllocate == 0)
  ------------------
  |  Branch (7407:9): [True: 0, False: 20.3k]
  ------------------
 7408|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7409|       |
 7410|  20.3k|    tem = pool->mem->malloc_fcn(bytesToAllocate);
 7411|  20.3k|    if (! tem)
  ------------------
  |  Branch (7411:9): [True: 0, False: 20.3k]
  ------------------
 7412|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7413|  20.3k|    tem->size = blockSize;
 7414|  20.3k|    tem->next = pool->blocks;
 7415|  20.3k|    pool->blocks = tem;
 7416|  20.3k|    if (pool->ptr != pool->start)
  ------------------
  |  Branch (7416:9): [True: 2.98k, False: 17.3k]
  ------------------
 7417|  2.98k|      memcpy(tem->s, pool->start, (pool->ptr - pool->start) * sizeof(XML_Char));
 7418|  20.3k|    pool->ptr = tem->s + (pool->ptr - pool->start);
 7419|  20.3k|    pool->start = tem->s;
 7420|  20.3k|    pool->end = tem->s + blockSize;
 7421|  20.3k|  }
 7422|  29.6k|  return XML_TRUE;
  ------------------
  |  |   55|  29.6k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7423|  29.6k|}
xmlparse.c:poolBytesToAllocateFor:
 7294|  29.6k|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|  29.6k|  const size_t stretch = sizeof(XML_Char); /* can be 4 bytes */
 7303|       |
 7304|  29.6k|  if (blockSize <= 0)
  ------------------
  |  Branch (7304:7): [True: 0, False: 29.6k]
  ------------------
 7305|      0|    return 0;
 7306|       |
 7307|  29.6k|  if (blockSize > (int)(INT_MAX / stretch))
  ------------------
  |  Branch (7307:7): [True: 0, False: 29.6k]
  ------------------
 7308|      0|    return 0;
 7309|       |
 7310|  29.6k|  {
 7311|  29.6k|    const int stretchedBlockSize = blockSize * (int)stretch;
 7312|  29.6k|    const int bytesToAllocate
 7313|  29.6k|        = (int)(offsetof(BLOCK, s) + (unsigned)stretchedBlockSize);
 7314|  29.6k|    if (bytesToAllocate < 0)
  ------------------
  |  Branch (7314:9): [True: 0, False: 29.6k]
  ------------------
 7315|      0|      return 0;
 7316|       |
 7317|  29.6k|    return (size_t)bytesToAllocate;
 7318|  29.6k|  }
 7319|  29.6k|}
xmlparse.c:storeAttributeValue:
 5872|  18.5k|                    enum XML_Account account) {
 5873|  18.5k|  enum XML_Error result
 5874|  18.5k|      = appendAttributeValue(parser, enc, isCdata, ptr, end, pool, account);
 5875|  18.5k|  if (result)
  ------------------
  |  Branch (5875:7): [True: 231, False: 18.3k]
  ------------------
 5876|    231|    return result;
 5877|  18.3k|  if (! isCdata && poolLength(pool) && poolLastChar(pool) == 0x20)
  ------------------
  |  |  597|  26.6k|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  |  |  ------------------
  |  |  |  Branch (597:26): [True: 4.20k, False: 4.06k]
  |  |  ------------------
  ------------------
                if (! isCdata && poolLength(pool) && poolLastChar(pool) == 0x20)
  ------------------
  |  |  599|  4.20k|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5877:7): [True: 8.26k, False: 10.0k]
  |  Branch (5877:40): [True: 1.23k, False: 2.97k]
  ------------------
 5878|  1.23k|    poolChop(pool);
  ------------------
  |  |  598|  1.23k|#define poolChop(pool) ((void)--(pool->ptr))
  ------------------
 5879|  18.3k|  if (! poolAppendChar(pool, XML_T('\0')))
  ------------------
  |  |  603|  18.3k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 795, False: 17.5k]
  |  |  |  Branch (603:35): [True: 0, False: 795]
  |  |  ------------------
  |  |  604|  18.3k|       ? 0                                                                     \
  |  |  605|  18.3k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5879:7): [True: 0, False: 18.3k]
  ------------------
 5880|      0|    return XML_ERROR_NO_MEMORY;
 5881|  18.3k|  return XML_ERROR_NONE;
 5882|  18.3k|}
xmlparse.c:appendAttributeValue:
 5887|  3.30M|                     enum XML_Account account) {
 5888|  3.30M|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 5889|       |#ifndef XML_DTD
 5890|       |  UNUSED_P(account);
 5891|       |#endif
 5892|       |
 5893|  30.4M|  for (;;) {
 5894|  30.4M|    const char *next
 5895|  30.4M|        = ptr; /* XmlAttributeValueTok doesn't always set the last arg */
 5896|  30.4M|    int tok = XmlAttributeValueTok(enc, ptr, end, &next);
  ------------------
  |  |  249|  30.4M|  XmlLiteralTok(enc, XML_ATTRIBUTE_VALUE_LITERAL, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  246|  30.4M|  (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5897|  30.4M|#ifdef XML_DTD
 5898|  30.4M|    if (! accountingDiffTolerated(parser, tok, ptr, next, __LINE__, account)) {
  ------------------
  |  Branch (5898:9): [True: 57, False: 30.4M]
  ------------------
 5899|     57|      accountingOnAbort(parser);
 5900|     57|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 5901|     57|    }
 5902|  30.4M|#endif
 5903|  30.4M|    switch (tok) {
 5904|  3.30M|    case XML_TOK_NONE:
  ------------------
  |  |   51|  3.30M|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (5904:5): [True: 3.30M, False: 27.1M]
  ------------------
 5905|  3.30M|      return XML_ERROR_NONE;
 5906|     21|    case XML_TOK_INVALID:
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (5906:5): [True: 21, False: 30.4M]
  ------------------
 5907|     21|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (5907:11): [True: 11, False: 10]
  ------------------
 5908|     11|        parser->m_eventPtr = next;
 5909|     21|      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: 30.4M]
  ------------------
 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|  3.84k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  3.84k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (5914:5): [True: 3.84k, False: 30.4M]
  ------------------
 5915|  3.84k|      XML_Char buf[XML_ENCODE_MAX];
 5916|  3.84k|      int i;
 5917|  3.84k|      int n = XmlCharRefNumber(enc, ptr);
  ------------------
  |  |  264|  3.84k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 5918|  3.84k|      if (n < 0) {
  ------------------
  |  Branch (5918:11): [True: 29, False: 3.81k]
  ------------------
 5919|     29|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (5919:13): [True: 28, False: 1]
  ------------------
 5920|     28|          parser->m_eventPtr = ptr;
 5921|     29|        return XML_ERROR_BAD_CHAR_REF;
 5922|     29|      }
 5923|  3.81k|      if (! isCdata && n == 0x20 /* space */
  ------------------
  |  Branch (5923:11): [True: 1.17k, False: 2.64k]
  |  Branch (5923:24): [True: 598, False: 575]
  ------------------
 5924|  3.81k|          && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  597|    598|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
                        && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  599|    400|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5924:15): [True: 198, False: 400]
  |  Branch (5924:40): [True: 200, False: 200]
  ------------------
 5925|    398|        break;
 5926|  3.41k|      n = XmlEncode(n, (ICHAR *)buf);
  ------------------
  |  |  164|  3.41k|#  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|  10.5k|      for (i = 0; i < n; i++) {
  ------------------
  |  Branch (5936:19): [True: 7.16k, False: 3.41k]
  ------------------
 5937|  7.16k|        if (! poolAppendChar(pool, buf[i]))
  ------------------
  |  |  603|  7.16k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 359, False: 6.80k]
  |  |  |  Branch (603:35): [True: 0, False: 359]
  |  |  ------------------
  |  |  604|  7.16k|       ? 0                                                                     \
  |  |  605|  7.16k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5937:13): [True: 0, False: 7.16k]
  ------------------
 5938|      0|          return XML_ERROR_NO_MEMORY;
 5939|  7.16k|      }
 5940|  3.41k|    } break;
 5941|  9.58M|    case XML_TOK_DATA_CHARS:
  ------------------
  |  |   67|  9.58M|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (5941:5): [True: 9.58M, False: 20.9M]
  ------------------
 5942|  9.58M|      if (! poolAppend(pool, enc, ptr, next))
  ------------------
  |  Branch (5942:11): [True: 0, False: 9.58M]
  ------------------
 5943|      0|        return XML_ERROR_NO_MEMORY;
 5944|  9.58M|      break;
 5945|  9.58M|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|  2.27k|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (5945:5): [True: 2.27k, False: 30.4M]
  ------------------
 5946|  2.27k|      next = ptr + enc->minBytesPerChar;
 5947|       |      /* fall through */
 5948|  3.41M|    case XML_TOK_ATTRIBUTE_VALUE_S:
  ------------------
  |  |  110|  3.41M|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
  |  Branch (5948:5): [True: 3.41M, False: 27.0M]
  ------------------
 5949|  14.0M|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|  14.0M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (5949:5): [True: 10.6M, False: 19.8M]
  ------------------
 5950|  14.0M|      if (! isCdata && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  597|  1.23M|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
                    if (! isCdata && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  599|  1.23M|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5950:11): [True: 1.23M, False: 12.8M]
  |  Branch (5950:25): [True: 997, False: 1.23M]
  |  Branch (5950:50): [True: 1.14M, False: 94.5k]
  ------------------
 5951|  1.14M|        break;
 5952|  12.9M|      if (! poolAppendChar(pool, 0x20))
  ------------------
  |  |  603|  12.9M|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 967, False: 12.9M]
  |  |  |  Branch (603:35): [True: 0, False: 967]
  |  |  ------------------
  |  |  604|  12.9M|       ? 0                                                                     \
  |  |  605|  12.9M|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5952:11): [True: 0, False: 12.9M]
  ------------------
 5953|      0|        return XML_ERROR_NO_MEMORY;
 5954|  12.9M|      break;
 5955|  12.9M|    case XML_TOK_ENTITY_REF: {
  ------------------
  |  |   70|  3.52M|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (5955:5): [True: 3.52M, False: 26.9M]
  ------------------
 5956|  3.52M|      const XML_Char *name;
 5957|  3.52M|      ENTITY *entity;
 5958|  3.52M|      char checkEntityDecl;
 5959|  3.52M|      XML_Char ch = (XML_Char)XmlPredefinedEntityName(
  ------------------
  |  |  267|  3.52M|  (((enc)->predefinedEntityName)(enc, ptr, end))
  ------------------
 5960|  3.52M|          enc, ptr + enc->minBytesPerChar, next - enc->minBytesPerChar);
 5961|  3.52M|      if (ch) {
  ------------------
  |  Branch (5961:11): [True: 7.52k, False: 3.51M]
  ------------------
 5962|  7.52k|#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|  7.52k|        accountingDiffTolerated(parser, tok, (char *)&ch,
 5967|  7.52k|                                ((char *)&ch) + sizeof(XML_Char), __LINE__,
 5968|  7.52k|                                XML_ACCOUNT_ENTITY_EXPANSION);
 5969|  7.52k|#endif /* XML_DTD */
 5970|  7.52k|        if (! poolAppendChar(pool, ch))
  ------------------
  |  |  603|  7.52k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 212, False: 7.30k]
  |  |  |  Branch (603:35): [True: 0, False: 212]
  |  |  ------------------
  |  |  604|  7.52k|       ? 0                                                                     \
  |  |  605|  7.52k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5970:13): [True: 0, False: 7.52k]
  ------------------
 5971|      0|          return XML_ERROR_NO_MEMORY;
 5972|  7.52k|        break;
 5973|  7.52k|      }
 5974|  3.51M|      name = poolStoreString(&parser->m_temp2Pool, enc,
 5975|  3.51M|                             ptr + enc->minBytesPerChar,
 5976|  3.51M|                             next - enc->minBytesPerChar);
 5977|  3.51M|      if (! name)
  ------------------
  |  Branch (5977:11): [True: 0, False: 3.51M]
  ------------------
 5978|      0|        return XML_ERROR_NO_MEMORY;
 5979|  3.51M|      entity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, 0);
 5980|  3.51M|      poolDiscard(&parser->m_temp2Pool);
  ------------------
  |  |  600|  3.51M|#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|  3.51M|      if (pool == &dtd->pool) /* are we called from prolog? */
  ------------------
  |  Branch (5984:11): [True: 48.6k, False: 3.46M]
  ------------------
 5985|  48.6k|        checkEntityDecl =
 5986|  48.6k|#ifdef XML_DTD
 5987|  48.6k|            parser->m_prologState.documentEntity &&
  ------------------
  |  Branch (5987:13): [True: 48.6k, False: 0]
  ------------------
 5988|  48.6k|#endif /* XML_DTD */
 5989|  48.6k|            (dtd->standalone ? ! parser->m_openInternalEntities
  ------------------
  |  Branch (5989:13): [True: 34.4k, False: 14.2k]
  |  Branch (5989:14): [True: 194, False: 48.4k]
  ------------------
 5990|  48.6k|                             : ! dtd->hasParamEntityRefs);
 5991|  3.46M|      else /* if (pool == &parser->m_tempPool): we are called from content */
 5992|  3.46M|        checkEntityDecl = ! dtd->hasParamEntityRefs || dtd->standalone;
  ------------------
  |  Branch (5992:27): [True: 14.5k, False: 3.45M]
  |  Branch (5992:56): [True: 0, False: 3.45M]
  ------------------
 5993|  3.51M|      if (checkEntityDecl) {
  ------------------
  |  Branch (5993:11): [True: 48.9k, False: 3.46M]
  ------------------
 5994|  48.9k|        if (! entity)
  ------------------
  |  Branch (5994:13): [True: 109, False: 48.8k]
  ------------------
 5995|    109|          return XML_ERROR_UNDEFINED_ENTITY;
 5996|  48.8k|        else if (! entity->is_internal)
  ------------------
  |  Branch (5996:18): [True: 0, False: 48.8k]
  ------------------
 5997|      0|          return XML_ERROR_ENTITY_DECLARED_IN_PE;
 5998|  3.46M|      } else if (! entity) {
  ------------------
  |  Branch (5998:18): [True: 223k, False: 3.24M]
  ------------------
 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|   223k|        break;
 6010|   223k|      }
 6011|  3.29M|      if (entity->open) {
  ------------------
  |  Branch (6011:11): [True: 8, False: 3.29M]
  ------------------
 6012|      8|        if (enc == parser->m_encoding) {
  ------------------
  |  Branch (6012:13): [True: 0, False: 8]
  ------------------
 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|      8|        return XML_ERROR_RECURSIVE_ENTITY_REF;
 6033|      8|      }
 6034|  3.29M|      if (entity->notation) {
  ------------------
  |  Branch (6034:11): [True: 0, False: 3.29M]
  ------------------
 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|  3.29M|      if (! entity->textPtr) {
  ------------------
  |  Branch (6039:11): [True: 2, False: 3.29M]
  ------------------
 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|  3.29M|      } else {
 6044|  3.29M|        enum XML_Error result;
 6045|  3.29M|        const XML_Char *textEnd = entity->textPtr + entity->textLen;
 6046|  3.29M|        entity->open = XML_TRUE;
  ------------------
  |  |   55|  3.29M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6047|  3.29M|#ifdef XML_DTD
 6048|  3.29M|        entityTrackingOnOpen(parser, entity, __LINE__);
 6049|  3.29M|#endif
 6050|  3.29M|        result = appendAttributeValue(parser, parser->m_internalEncoding,
 6051|  3.29M|                                      isCdata, (const char *)entity->textPtr,
 6052|  3.29M|                                      (const char *)textEnd, pool,
 6053|  3.29M|                                      XML_ACCOUNT_ENTITY_EXPANSION);
 6054|  3.29M|#ifdef XML_DTD
 6055|  3.29M|        entityTrackingOnClose(parser, entity, __LINE__);
 6056|  3.29M|#endif
 6057|  3.29M|        entity->open = XML_FALSE;
  ------------------
  |  |   56|  3.29M|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6058|  3.29M|        if (result)
  ------------------
  |  Branch (6058:13): [True: 168, False: 3.29M]
  ------------------
 6059|    168|          return result;
 6060|  3.29M|      }
 6061|  3.29M|    } break;
 6062|  3.29M|    default:
  ------------------
  |  Branch (6062:5): [True: 0, False: 30.4M]
  ------------------
 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|  30.4M|    }
 6079|  27.1M|    ptr = next;
 6080|  27.1M|  }
 6081|       |  /* not reached */
 6082|  3.30M|}
xmlparse.c:storeEntityValue:
 6087|  6.68k|                 enum XML_Account account) {
 6088|  6.68k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6089|  6.68k|  STRING_POOL *pool = &(dtd->entityValuePool);
 6090|  6.68k|  enum XML_Error result = XML_ERROR_NONE;
 6091|  6.68k|#ifdef XML_DTD
 6092|  6.68k|  int oldInEntityValue = parser->m_prologState.inEntityValue;
 6093|  6.68k|  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|  6.68k|  if (! pool->blocks) {
  ------------------
  |  Branch (6100:7): [True: 2.46k, False: 4.22k]
  ------------------
 6101|  2.46k|    if (! poolGrow(pool))
  ------------------
  |  Branch (6101:9): [True: 0, False: 2.46k]
  ------------------
 6102|      0|      return XML_ERROR_NO_MEMORY;
 6103|  2.46k|  }
 6104|       |
 6105|  1.23M|  for (;;) {
 6106|  1.23M|    const char *next
 6107|  1.23M|        = entityTextPtr; /* XmlEntityValueTok doesn't always set the last arg */
 6108|  1.23M|    int tok = XmlEntityValueTok(enc, entityTextPtr, entityTextEnd, &next);
  ------------------
  |  |  252|  1.23M|  XmlLiteralTok(enc, XML_ENTITY_VALUE_LITERAL, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  246|  1.23M|  (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 6109|       |
 6110|  1.23M|#ifdef XML_DTD
 6111|  1.23M|    if (! accountingDiffTolerated(parser, tok, entityTextPtr, next, __LINE__,
  ------------------
  |  Branch (6111:9): [True: 0, False: 1.23M]
  ------------------
 6112|  1.23M|                                  account)) {
 6113|      0|      accountingOnAbort(parser);
 6114|      0|      result = XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 6115|      0|      goto endEntityValue;
 6116|      0|    }
 6117|  1.23M|#endif
 6118|       |
 6119|  1.23M|    switch (tok) {
 6120|      2|    case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|      2|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (6120:5): [True: 2, False: 1.23M]
  ------------------
 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|  6.62k|    case XML_TOK_NONE:
  ------------------
  |  |   51|  6.62k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (6189:5): [True: 6.62k, False: 1.22M]
  ------------------
 6190|  6.62k|      result = XML_ERROR_NONE;
 6191|  6.62k|      goto endEntityValue;
 6192|  41.0k|    case XML_TOK_ENTITY_REF:
  ------------------
  |  |   70|  41.0k|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (6192:5): [True: 41.0k, False: 1.19M]
  ------------------
 6193|   531k|    case XML_TOK_DATA_CHARS:
  ------------------
  |  |   67|   531k|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (6193:5): [True: 490k, False: 745k]
  ------------------
 6194|   531k|      if (! poolAppend(pool, enc, entityTextPtr, next)) {
  ------------------
  |  Branch (6194:11): [True: 0, False: 531k]
  ------------------
 6195|      0|        result = XML_ERROR_NO_MEMORY;
 6196|      0|        goto endEntityValue;
 6197|      0|      }
 6198|   531k|      break;
 6199|   531k|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|  1.80k|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (6199:5): [True: 1.80k, False: 1.23M]
  ------------------
 6200|  1.80k|      next = entityTextPtr + enc->minBytesPerChar;
 6201|       |      /* fall through */
 6202|   642k|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|   642k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (6202:5): [True: 640k, False: 595k]
  ------------------
 6203|   642k|      if (pool->end == pool->ptr && ! poolGrow(pool)) {
  ------------------
  |  Branch (6203:11): [True: 57, False: 641k]
  |  Branch (6203:37): [True: 0, False: 57]
  ------------------
 6204|      0|        result = XML_ERROR_NO_MEMORY;
 6205|      0|        goto endEntityValue;
 6206|      0|      }
 6207|   642k|      *(pool->ptr)++ = 0xA;
 6208|   642k|      break;
 6209|  55.4k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  55.4k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (6209:5): [True: 55.4k, False: 1.18M]
  ------------------
 6210|  55.4k|      XML_Char buf[XML_ENCODE_MAX];
 6211|  55.4k|      int i;
 6212|  55.4k|      int n = XmlCharRefNumber(enc, entityTextPtr);
  ------------------
  |  |  264|  55.4k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 6213|  55.4k|      if (n < 0) {
  ------------------
  |  Branch (6213:11): [True: 2, False: 55.4k]
  ------------------
 6214|      2|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (6214:13): [True: 2, False: 0]
  ------------------
 6215|      2|          parser->m_eventPtr = entityTextPtr;
 6216|      2|        result = XML_ERROR_BAD_CHAR_REF;
 6217|      2|        goto endEntityValue;
 6218|      2|      }
 6219|  55.4k|      n = XmlEncode(n, (ICHAR *)buf);
  ------------------
  |  |  164|  55.4k|#  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|   218k|      for (i = 0; i < n; i++) {
  ------------------
  |  Branch (6229:19): [True: 162k, False: 55.4k]
  ------------------
 6230|   162k|        if (pool->end == pool->ptr && ! poolGrow(pool)) {
  ------------------
  |  Branch (6230:13): [True: 25, False: 162k]
  |  Branch (6230:39): [True: 0, False: 25]
  ------------------
 6231|      0|          result = XML_ERROR_NO_MEMORY;
 6232|      0|          goto endEntityValue;
 6233|      0|        }
 6234|   162k|        *(pool->ptr)++ = buf[i];
 6235|   162k|      }
 6236|  55.4k|    } break;
 6237|  55.4k|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|     26|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (6237:5): [True: 26, False: 1.23M]
  ------------------
 6238|     26|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6238:11): [True: 26, False: 0]
  ------------------
 6239|     26|        parser->m_eventPtr = entityTextPtr;
 6240|     26|      result = XML_ERROR_INVALID_TOKEN;
 6241|     26|      goto endEntityValue;
 6242|     32|    case XML_TOK_INVALID:
  ------------------
  |  |   57|     32|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (6242:5): [True: 32, False: 1.23M]
  ------------------
 6243|     32|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6243:11): [True: 32, False: 0]
  ------------------
 6244|     32|        parser->m_eventPtr = next;
 6245|     32|      result = XML_ERROR_INVALID_TOKEN;
 6246|     32|      goto endEntityValue;
 6247|      0|    default:
  ------------------
  |  Branch (6247:5): [True: 0, False: 1.23M]
  ------------------
 6248|       |      /* This default case should be unnecessary -- all the tokens
 6249|       |       * that XmlEntityValueTok() can return have their own explicit
 6250|       |       * cases -- but should be retained for safety.  We do however
 6251|       |       * exclude it from the coverage statistics.
 6252|       |       *
 6253|       |       * LCOV_EXCL_START
 6254|       |       */
 6255|      0|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6255:11): [True: 0, False: 0]
  ------------------
 6256|      0|        parser->m_eventPtr = entityTextPtr;
 6257|      0|      result = XML_ERROR_UNEXPECTED_STATE;
 6258|      0|      goto endEntityValue;
 6259|       |      /* LCOV_EXCL_STOP */
 6260|  1.23M|    }
 6261|  1.22M|    entityTextPtr = next;
 6262|  1.22M|  }
 6263|  6.68k|endEntityValue:
 6264|  6.68k|#ifdef XML_DTD
 6265|  6.68k|  parser->m_prologState.inEntityValue = oldInEntityValue;
 6266|  6.68k|#endif /* XML_DTD */
 6267|  6.68k|  return result;
 6268|  6.68k|}
xmlparse.c:processInternalEntity:
 5717|   338k|processInternalEntity(XML_Parser parser, ENTITY *entity, XML_Bool betweenDecl) {
 5718|   338k|  const char *textStart, *textEnd;
 5719|   338k|  const char *next;
 5720|   338k|  enum XML_Error result;
 5721|   338k|  OPEN_INTERNAL_ENTITY *openEntity;
 5722|       |
 5723|   338k|  if (parser->m_freeInternalEntities) {
  ------------------
  |  Branch (5723:7): [True: 336k, False: 2.00k]
  ------------------
 5724|   336k|    openEntity = parser->m_freeInternalEntities;
 5725|   336k|    parser->m_freeInternalEntities = openEntity->next;
 5726|   336k|  } else {
 5727|  2.00k|    openEntity
 5728|  2.00k|        = (OPEN_INTERNAL_ENTITY *)MALLOC(parser, sizeof(OPEN_INTERNAL_ENTITY));
  ------------------
  |  |  714|  2.00k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5729|  2.00k|    if (! openEntity)
  ------------------
  |  Branch (5729:9): [True: 0, False: 2.00k]
  ------------------
 5730|      0|      return XML_ERROR_NO_MEMORY;
 5731|  2.00k|  }
 5732|   338k|  entity->open = XML_TRUE;
  ------------------
  |  |   55|   338k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5733|   338k|#ifdef XML_DTD
 5734|   338k|  entityTrackingOnOpen(parser, entity, __LINE__);
 5735|   338k|#endif
 5736|   338k|  entity->processed = 0;
 5737|   338k|  openEntity->next = parser->m_openInternalEntities;
 5738|   338k|  parser->m_openInternalEntities = openEntity;
 5739|   338k|  openEntity->entity = entity;
 5740|   338k|  openEntity->startTagLevel = parser->m_tagLevel;
 5741|   338k|  openEntity->betweenDecl = betweenDecl;
 5742|   338k|  openEntity->internalEventPtr = NULL;
 5743|   338k|  openEntity->internalEventEndPtr = NULL;
 5744|   338k|  textStart = (const char *)entity->textPtr;
 5745|   338k|  textEnd = (const char *)(entity->textPtr + entity->textLen);
 5746|       |  /* Set a safe default value in case 'next' does not get set */
 5747|   338k|  next = textStart;
 5748|       |
 5749|   338k|#ifdef XML_DTD
 5750|   338k|  if (entity->is_param) {
  ------------------
  |  Branch (5750:7): [True: 0, False: 338k]
  ------------------
 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|   338k|#endif /* XML_DTD */
 5758|   338k|    result = doContent(parser, parser->m_tagLevel, parser->m_internalEncoding,
 5759|   338k|                       textStart, textEnd, &next, XML_FALSE,
  ------------------
  |  |   56|   338k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5760|   338k|                       XML_ACCOUNT_ENTITY_EXPANSION);
 5761|       |
 5762|   338k|  if (result == XML_ERROR_NONE) {
  ------------------
  |  Branch (5762:7): [True: 338k, False: 954]
  ------------------
 5763|   338k|    if (textEnd != next && parser->m_parsingStatus.parsing == XML_SUSPENDED) {
  ------------------
  |  Branch (5763:9): [True: 0, False: 338k]
  |  Branch (5763:28): [True: 0, False: 0]
  ------------------
 5764|      0|      entity->processed = (int)(next - textStart);
 5765|      0|      parser->m_processor = internalEntityProcessor;
 5766|   338k|    } else {
 5767|   338k|#ifdef XML_DTD
 5768|   338k|      entityTrackingOnClose(parser, entity, __LINE__);
 5769|   338k|#endif /* XML_DTD */
 5770|   338k|      entity->open = XML_FALSE;
  ------------------
  |  |   56|   338k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5771|   338k|      parser->m_openInternalEntities = openEntity->next;
 5772|       |      /* put openEntity back in list of free instances */
 5773|   338k|      openEntity->next = parser->m_freeInternalEntities;
 5774|   338k|      parser->m_freeInternalEntities = openEntity;
 5775|   338k|    }
 5776|   338k|  }
 5777|   338k|  return result;
 5778|   338k|}
xmlparse.c:entityTrackingOnOpen:
 7828|  3.62M|entityTrackingOnOpen(XML_Parser originParser, ENTITY *entity, int sourceLine) {
 7829|  3.62M|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7830|  3.62M|  assert(! rootParser->m_parentParser);
 7831|       |
 7832|      0|  rootParser->m_entity_stats.countEverOpened++;
 7833|  3.62M|  rootParser->m_entity_stats.currentDepth++;
 7834|  3.62M|  if (rootParser->m_entity_stats.currentDepth
  ------------------
  |  Branch (7834:7): [True: 2.68k, False: 3.62M]
  ------------------
 7835|  3.62M|      > rootParser->m_entity_stats.maximumDepthSeen) {
 7836|  2.68k|    rootParser->m_entity_stats.maximumDepthSeen++;
 7837|  2.68k|  }
 7838|       |
 7839|  3.62M|  entityTrackingReportStats(rootParser, entity, "OPEN ", sourceLine);
 7840|  3.62M|}
xmlparse.c:entityTrackingReportStats:
 7805|  7.25M|                          const char *action, int sourceLine) {
 7806|  7.25M|  assert(! rootParser->m_parentParser);
 7807|  7.25M|  if (rootParser->m_entity_stats.debugLevel == 0u)
  ------------------
  |  Branch (7807:7): [True: 7.25M, False: 0]
  ------------------
 7808|  7.25M|    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|  3.62M|entityTrackingOnClose(XML_Parser originParser, ENTITY *entity, int sourceLine) {
 7844|  3.62M|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7845|  3.62M|  assert(! rootParser->m_parentParser);
 7846|       |
 7847|      0|  entityTrackingReportStats(rootParser, entity, "CLOSE", sourceLine);
 7848|  3.62M|  rootParser->m_entity_stats.currentDepth--;
 7849|  3.62M|}
xmlparse.c:reportProcessingInstruction:
 6293|  28.9k|                            const char *start, const char *end) {
 6294|  28.9k|  const XML_Char *target;
 6295|  28.9k|  XML_Char *data;
 6296|  28.9k|  const char *tem;
 6297|  28.9k|  if (! parser->m_processingInstructionHandler) {
  ------------------
  |  Branch (6297:7): [True: 28.9k, False: 0]
  ------------------
 6298|  28.9k|    if (parser->m_defaultHandler)
  ------------------
  |  Branch (6298:9): [True: 0, False: 28.9k]
  ------------------
 6299|      0|      reportDefault(parser, enc, start, end);
 6300|  28.9k|    return 1;
 6301|  28.9k|  }
 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.15k|              const char *end) {
 6321|  2.15k|  XML_Char *data;
 6322|  2.15k|  if (! parser->m_commentHandler) {
  ------------------
  |  Branch (6322:7): [True: 2.15k, False: 0]
  ------------------
 6323|  2.15k|    if (parser->m_defaultHandler)
  ------------------
  |  Branch (6323:9): [True: 0, False: 2.15k]
  ------------------
 6324|      0|      reportDefault(parser, enc, start, end);
 6325|  2.15k|    return 1;
 6326|  2.15k|  }
 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|  37.3k|getDebugLevel(const char *variableName, unsigned long defaultDebugLevel) {
 8392|  37.3k|  const char *const valueOrNull = getenv(variableName);
 8393|  37.3k|  if (valueOrNull == NULL) {
  ------------------
  |  Branch (8393:7): [True: 37.3k, False: 0]
  ------------------
 8394|  37.3k|    return defaultDebugLevel;
 8395|  37.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|  2.24M|destroyBindings(BINDING *bindings, XML_Parser parser) {
 1430|  2.24M|  for (;;) {
 1431|  2.24M|    BINDING *b = bindings;
 1432|  2.24M|    if (! b)
  ------------------
  |  Branch (1432:9): [True: 2.24M, False: 0]
  ------------------
 1433|  2.24M|      break;
 1434|      0|    bindings = b->nextTagBinding;
 1435|      0|    FREE(parser, b->uri);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1436|      0|    FREE(parser, b);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1437|      0|  }
 1438|  2.24M|}
xmlparse.c:startParsing:
  954|  18.6k|startParsing(XML_Parser parser) {
  955|       |  /* hash functions must be initialized before setContext() is called */
  956|  18.6k|  if (parser->m_hash_secret_salt == 0)
  ------------------
  |  Branch (956:7): [True: 0, False: 18.6k]
  ------------------
  957|      0|    parser->m_hash_secret_salt = generate_hash_secret_salt(parser);
  958|  18.6k|  if (parser->m_ns) {
  ------------------
  |  Branch (958:7): [True: 0, False: 18.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|  18.6k|  return XML_TRUE;
  ------------------
  |  |   55|  18.6k|#define XML_TRUE ((XML_Bool)1)
  ------------------
  965|  18.6k|}
xmlparse.c:dtdDestroy:
 6789|  18.6k|dtdDestroy(DTD *p, XML_Bool isDocEntity, const XML_Memory_Handling_Suite *ms) {
 6790|  18.6k|  HASH_TABLE_ITER iter;
 6791|  18.6k|  hashTableIterInit(&iter, &(p->elementTypes));
 6792|  41.5k|  for (;;) {
 6793|  41.5k|    ELEMENT_TYPE *e = (ELEMENT_TYPE *)hashTableIterNext(&iter);
 6794|  41.5k|    if (! e)
  ------------------
  |  Branch (6794:9): [True: 18.6k, False: 22.9k]
  ------------------
 6795|  18.6k|      break;
 6796|  22.9k|    if (e->allocDefaultAtts != 0)
  ------------------
  |  Branch (6796:9): [True: 1.24k, False: 21.6k]
  ------------------
 6797|  1.24k|      ms->free_fcn(e->defaultAtts);
 6798|  22.9k|  }
 6799|  18.6k|  hashTableDestroy(&(p->generalEntities));
 6800|  18.6k|#ifdef XML_DTD
 6801|  18.6k|  hashTableDestroy(&(p->paramEntities));
 6802|  18.6k|#endif /* XML_DTD */
 6803|  18.6k|  hashTableDestroy(&(p->elementTypes));
 6804|  18.6k|  hashTableDestroy(&(p->attributeIds));
 6805|  18.6k|  hashTableDestroy(&(p->prefixes));
 6806|  18.6k|  poolDestroy(&(p->pool));
 6807|  18.6k|  poolDestroy(&(p->entityValuePool));
 6808|  18.6k|  if (isDocEntity) {
  ------------------
  |  Branch (6808:7): [True: 18.6k, False: 0]
  ------------------
 6809|  18.6k|    ms->free_fcn(p->scaffIndex);
 6810|  18.6k|    ms->free_fcn(p->scaffold);
 6811|  18.6k|  }
 6812|  18.6k|  ms->free_fcn(p);
 6813|  18.6k|}
xmlparse.c:hashTableDestroy:
 7142|  93.2k|hashTableDestroy(HASH_TABLE *table) {
 7143|  93.2k|  size_t i;
 7144|  1.22M|  for (i = 0; i < table->size; i++)
  ------------------
  |  Branch (7144:15): [True: 1.13M, False: 93.2k]
  ------------------
 7145|  1.13M|    table->mem->free_fcn(table->v[i]);
 7146|  93.2k|  table->mem->free_fcn(table->v);
 7147|  93.2k|}
xmlparse.c:poolClear:
 7185|  2.41M|poolClear(STRING_POOL *pool) {
 7186|  2.41M|  if (! pool->freeBlocks)
  ------------------
  |  Branch (7186:7): [True: 1.25M, False: 1.15M]
  ------------------
 7187|  1.25M|    pool->freeBlocks = pool->blocks;
 7188|  1.15M|  else {
 7189|  1.15M|    BLOCK *p = pool->blocks;
 7190|  1.15M|    while (p) {
  ------------------
  |  Branch (7190:12): [True: 1.74k, False: 1.15M]
  ------------------
 7191|  1.74k|      BLOCK *tem = p->next;
 7192|  1.74k|      p->next = pool->freeBlocks;
 7193|  1.74k|      pool->freeBlocks = p;
 7194|  1.74k|      p = tem;
 7195|  1.74k|    }
 7196|  1.15M|  }
 7197|  2.41M|  pool->blocks = NULL;
 7198|  2.41M|  pool->start = NULL;
 7199|  2.41M|  pool->ptr = NULL;
 7200|  2.41M|  pool->end = NULL;
 7201|  2.41M|}
xmlparse.c:poolDestroy:
 7204|  74.6k|poolDestroy(STRING_POOL *pool) {
 7205|  74.6k|  BLOCK *p = pool->blocks;
 7206|  92.4k|  while (p) {
  ------------------
  |  Branch (7206:10): [True: 17.8k, False: 74.6k]
  ------------------
 7207|  17.8k|    BLOCK *tem = p->next;
 7208|  17.8k|    pool->mem->free_fcn(p);
 7209|  17.8k|    p = tem;
 7210|  17.8k|  }
 7211|  74.6k|  p = pool->freeBlocks;
 7212|  77.1k|  while (p) {
  ------------------
  |  Branch (7212:10): [True: 2.55k, False: 74.6k]
  ------------------
 7213|  2.55k|    BLOCK *tem = p->next;
 7214|  2.55k|    pool->mem->free_fcn(p);
 7215|  2.55k|    p = tem;
 7216|  2.55k|  }
 7217|  74.6k|}
xmlparse.c:poolCopyString:
 7237|  14.9k|poolCopyString(STRING_POOL *pool, const XML_Char *s) {
 7238|  1.04M|  do {
 7239|  1.04M|    if (! poolAppendChar(pool, *s))
  ------------------
  |  |  603|  1.04M|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 7.56k, False: 1.03M]
  |  |  |  Branch (603:35): [True: 0, False: 7.56k]
  |  |  ------------------
  |  |  604|  1.04M|       ? 0                                                                     \
  |  |  605|  1.04M|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (7239:9): [True: 0, False: 1.04M]
  ------------------
 7240|      0|      return NULL;
 7241|  1.04M|  } while (*s++);
  ------------------
  |  Branch (7241:12): [True: 1.03M, False: 14.9k]
  ------------------
 7242|  14.9k|  s = pool->start;
 7243|  14.9k|  poolFinish(pool);
  ------------------
  |  |  601|  14.9k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 7244|  14.9k|  return s;
 7245|  14.9k|}
xmlparse.c:copyString:
 7637|  18.6k|copyString(const XML_Char *s, const XML_Memory_Handling_Suite *memsuite) {
 7638|  18.6k|  size_t charsRequired = 0;
 7639|  18.6k|  XML_Char *result;
 7640|       |
 7641|       |  /* First determine how long the string is */
 7642|   205k|  while (s[charsRequired] != 0) {
  ------------------
  |  Branch (7642:10): [True: 186k, False: 18.6k]
  ------------------
 7643|   186k|    charsRequired++;
 7644|   186k|  }
 7645|       |  /* Include the terminator */
 7646|  18.6k|  charsRequired++;
 7647|       |
 7648|       |  /* Now allocate space for the copy */
 7649|  18.6k|  result = memsuite->malloc_fcn(charsRequired * sizeof(XML_Char));
 7650|  18.6k|  if (result == NULL)
  ------------------
  |  Branch (7650:7): [True: 0, False: 18.6k]
  ------------------
 7651|      0|    return NULL;
 7652|       |  /* Copy the original into place */
 7653|  18.6k|  memcpy(result, s, charsRequired * sizeof(XML_Char));
 7654|  18.6k|  return result;
 7655|  18.6k|}

XmlPrologStateInit:
 1237|  18.6k|XmlPrologStateInit(PROLOG_STATE *state) {
 1238|  18.6k|  state->handler = prolog0;
 1239|  18.6k|#ifdef XML_DTD
 1240|  18.6k|  state->documentEntity = 1;
 1241|  18.6k|  state->includeLevel = 0;
 1242|  18.6k|  state->inEntityValue = 0;
 1243|  18.6k|#endif /* XML_DTD */
 1244|  18.6k|}
xmlrole.c:prolog0:
  142|  16.9k|        const ENCODING *enc) {
  143|  16.9k|  switch (tok) {
  ------------------
  |  Branch (143:11): [True: 295, False: 16.6k]
  ------------------
  144|    575|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    575|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (144:3): [True: 575, False: 16.3k]
  ------------------
  145|    575|    state->handler = prolog1;
  146|    575|    return XML_ROLE_NONE;
  147|    304|  case XML_TOK_XML_DECL:
  ------------------
  |  |   77|    304|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (147:3): [True: 304, False: 16.6k]
  ------------------
  148|    304|    state->handler = prolog1;
  149|    304|    return XML_ROLE_XML_DECL;
  150|    306|  case XML_TOK_PI:
  ------------------
  |  |   76|    306|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (150:3): [True: 306, False: 16.6k]
  ------------------
  151|    306|    state->handler = prolog1;
  152|    306|    return XML_ROLE_PI;
  153|     47|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|     47|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (153:3): [True: 47, False: 16.8k]
  ------------------
  154|     47|    state->handler = prolog1;
  155|     47|    return XML_ROLE_COMMENT;
  156|  1.34k|  case XML_TOK_BOM:
  ------------------
  |  |   79|  1.34k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
  |  Branch (156:3): [True: 1.34k, False: 15.5k]
  ------------------
  157|  1.34k|    return XML_ROLE_NONE;
  158|  5.49k|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|  5.49k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (158:3): [True: 5.49k, False: 11.4k]
  ------------------
  159|  5.49k|    if (! XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  5.49k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (159:9): [True: 94, False: 5.40k]
  ------------------
  160|  5.49k|                              KW_DOCTYPE))
  161|     94|      break;
  162|  5.40k|    state->handler = doctype0;
  163|  5.40k|    return XML_ROLE_DOCTYPE_NONE;
  164|  8.57k|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|  8.57k|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (164:3): [True: 8.57k, False: 8.36k]
  ------------------
  165|  8.57k|    state->handler = error;
  166|  8.57k|    return XML_ROLE_INSTANCE_START;
  167|  16.9k|  }
  168|    389|  return common(state, tok);
  169|  16.9k|}
xmlrole.c:prolog1:
  173|  6.68k|        const ENCODING *enc) {
  174|  6.68k|  switch (tok) {
  ------------------
  |  Branch (174:11): [True: 12, False: 6.67k]
  ------------------
  175|    655|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    655|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (175:3): [True: 655, False: 6.03k]
  ------------------
  176|    655|    return XML_ROLE_NONE;
  177|  5.24k|  case XML_TOK_PI:
  ------------------
  |  |   76|  5.24k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (177:3): [True: 5.24k, False: 1.43k]
  ------------------
  178|  5.24k|    return XML_ROLE_PI;
  179|    406|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    406|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (179:3): [True: 406, False: 6.28k]
  ------------------
  180|    406|    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: 6.68k]
  ------------------
  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|    290|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|    290|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (190:3): [True: 290, False: 6.39k]
  ------------------
  191|    290|    if (! XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|    290|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (191:9): [True: 7, False: 283]
  ------------------
  192|    290|                              KW_DOCTYPE))
  193|      7|      break;
  194|    283|    state->handler = doctype0;
  195|    283|    return XML_ROLE_DOCTYPE_NONE;
  196|     76|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|     76|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (196:3): [True: 76, False: 6.61k]
  ------------------
  197|     76|    state->handler = error;
  198|     76|    return XML_ROLE_INSTANCE_START;
  199|  6.68k|  }
  200|     19|  return common(state, tok);
  201|  6.68k|}
xmlrole.c:doctype0:
  225|  11.3k|         const ENCODING *enc) {
  226|  11.3k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  11.3k|#  define UNUSED_P(p) (void)p
  ------------------
  227|  11.3k|  UNUSED_P(end);
  ------------------
  |  |  135|  11.3k|#  define UNUSED_P(p) (void)p
  ------------------
  228|  11.3k|  UNUSED_P(enc);
  ------------------
  |  |  135|  11.3k|#  define UNUSED_P(p) (void)p
  ------------------
  229|  11.3k|  switch (tok) {
  ------------------
  |  Branch (229:11): [True: 10, False: 11.3k]
  ------------------
  230|  5.68k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  5.68k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (230:3): [True: 5.68k, False: 5.67k]
  ------------------
  231|  5.68k|    return XML_ROLE_DOCTYPE_NONE;
  232|  5.66k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  5.66k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (232:3): [True: 5.66k, False: 5.69k]
  ------------------
  233|  5.66k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  5.66k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (233:3): [True: 0, False: 11.3k]
  ------------------
  234|  5.66k|    state->handler = doctype1;
  235|  5.66k|    return XML_ROLE_DOCTYPE_NAME;
  236|  11.3k|  }
  237|     10|  return common(state, tok);
  238|  11.3k|}
xmlrole.c:doctype1:
  242|  6.81k|         const ENCODING *enc) {
  243|  6.81k|  switch (tok) {
  ------------------
  |  Branch (243:11): [True: 2, False: 6.81k]
  ------------------
  244|  1.16k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.16k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (244:3): [True: 1.16k, False: 5.65k]
  ------------------
  245|  1.16k|    return XML_ROLE_DOCTYPE_NONE;
  246|  4.70k|  case XML_TOK_OPEN_BRACKET:
  ------------------
  |  |   92|  4.70k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
  |  Branch (246:3): [True: 4.70k, False: 2.11k]
  ------------------
  247|  4.70k|    state->handler = internalSubset;
  248|  4.70k|    return XML_ROLE_DOCTYPE_INTERNAL_SUBSET;
  249|     40|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|     40|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (249:3): [True: 40, False: 6.77k]
  ------------------
  250|     40|    state->handler = prolog2;
  251|     40|    return XML_ROLE_DOCTYPE_CLOSE;
  252|    907|  case XML_TOK_NAME:
  ------------------
  |  |   85|    907|#define XML_TOK_NAME 18
  ------------------
  |  Branch (252:3): [True: 907, False: 5.90k]
  ------------------
  253|    907|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|    907|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 14, False: 893]
  |  |  ------------------
  ------------------
  254|     14|      state->handler = doctype3;
  255|     14|      return XML_ROLE_DOCTYPE_NONE;
  256|     14|    }
  257|    893|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|    893|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 874, False: 19]
  |  |  ------------------
  ------------------
  258|    874|      state->handler = doctype2;
  259|    874|      return XML_ROLE_DOCTYPE_NONE;
  260|    874|    }
  261|     19|    break;
  262|  6.81k|  }
  263|     21|  return common(state, tok);
  264|  6.81k|}
xmlrole.c:internalSubset:
  335|  36.0k|               const ENCODING *enc) {
  336|  36.0k|  switch (tok) {
  ------------------
  |  Branch (336:11): [True: 75, False: 35.9k]
  ------------------
  337|  3.44k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  3.44k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (337:3): [True: 3.44k, False: 32.5k]
  ------------------
  338|  3.44k|    return XML_ROLE_NONE;
  339|  26.3k|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|  26.3k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (339:3): [True: 26.3k, False: 9.65k]
  ------------------
  340|  26.3k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  26.3k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 10.2k, False: 16.1k]
  |  |  ------------------
  ------------------
  341|  26.3k|                            KW_ENTITY)) {
  342|  10.2k|      state->handler = entity0;
  343|  10.2k|      return XML_ROLE_ENTITY_NONE;
  344|  10.2k|    }
  345|  16.1k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  16.1k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 10.6k, False: 5.41k]
  |  |  ------------------
  ------------------
  346|  16.1k|                            KW_ATTLIST)) {
  347|  10.6k|      state->handler = attlist0;
  348|  10.6k|      return XML_ROLE_ATTLIST_NONE;
  349|  10.6k|    }
  350|  5.41k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  5.41k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 3.75k, False: 1.66k]
  |  |  ------------------
  ------------------
  351|  5.41k|                            KW_ELEMENT)) {
  352|  3.75k|      state->handler = element0;
  353|  3.75k|      return XML_ROLE_ELEMENT_NONE;
  354|  3.75k|    }
  355|  1.66k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  1.66k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.63k, False: 34]
  |  |  ------------------
  ------------------
  356|  1.66k|                            KW_NOTATION)) {
  357|  1.63k|      state->handler = notation0;
  358|  1.63k|      return XML_ROLE_NOTATION_NONE;
  359|  1.63k|    }
  360|     34|    break;
  361|    715|  case XML_TOK_PI:
  ------------------
  |  |   76|    715|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (361:3): [True: 715, False: 35.2k]
  ------------------
  362|    715|    return XML_ROLE_PI;
  363|    206|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    206|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (363:3): [True: 206, False: 35.7k]
  ------------------
  364|    206|    return XML_ROLE_COMMENT;
  365|  2.93k|  case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|  2.93k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (365:3): [True: 2.93k, False: 33.0k]
  ------------------
  366|  2.93k|    return XML_ROLE_PARAM_ENTITY_REF;
  367|  2.27k|  case XML_TOK_CLOSE_BRACKET:
  ------------------
  |  |   93|  2.27k|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
  |  Branch (367:3): [True: 2.27k, False: 33.7k]
  ------------------
  368|  2.27k|    state->handler = doctype5;
  369|  2.27k|    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: 36.0k]
  ------------------
  371|      0|    return XML_ROLE_NONE;
  372|  36.0k|  }
  373|    109|  return common(state, tok);
  374|  36.0k|}
xmlrole.c:entity0:
  417|  20.4k|        const ENCODING *enc) {
  418|  20.4k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  20.4k|#  define UNUSED_P(p) (void)p
  ------------------
  419|  20.4k|  UNUSED_P(end);
  ------------------
  |  |  135|  20.4k|#  define UNUSED_P(p) (void)p
  ------------------
  420|  20.4k|  UNUSED_P(enc);
  ------------------
  |  |  135|  20.4k|#  define UNUSED_P(p) (void)p
  ------------------
  421|  20.4k|  switch (tok) {
  ------------------
  |  Branch (421:11): [True: 7, False: 20.4k]
  ------------------
  422|  10.2k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  10.2k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (422:3): [True: 10.2k, False: 10.2k]
  ------------------
  423|  10.2k|    return XML_ROLE_ENTITY_NONE;
  424|  4.72k|  case XML_TOK_PERCENT:
  ------------------
  |  |   89|  4.72k|#define XML_TOK_PERCENT 22
  ------------------
  |  Branch (424:3): [True: 4.72k, False: 15.7k]
  ------------------
  425|  4.72k|    state->handler = entity1;
  426|  4.72k|    return XML_ROLE_ENTITY_NONE;
  427|  5.50k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  5.50k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (427:3): [True: 5.50k, False: 14.9k]
  ------------------
  428|  5.50k|    state->handler = entity2;
  429|  5.50k|    return XML_ROLE_GENERAL_ENTITY_NAME;
  430|  20.4k|  }
  431|      7|  return common(state, tok);
  432|  20.4k|}
xmlrole.c:entity1:
  436|  9.43k|        const ENCODING *enc) {
  437|  9.43k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  9.43k|#  define UNUSED_P(p) (void)p
  ------------------
  438|  9.43k|  UNUSED_P(end);
  ------------------
  |  |  135|  9.43k|#  define UNUSED_P(p) (void)p
  ------------------
  439|  9.43k|  UNUSED_P(enc);
  ------------------
  |  |  135|  9.43k|#  define UNUSED_P(p) (void)p
  ------------------
  440|  9.43k|  switch (tok) {
  ------------------
  |  Branch (440:11): [True: 32, False: 9.40k]
  ------------------
  441|  4.72k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  4.72k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (441:3): [True: 4.72k, False: 4.71k]
  ------------------
  442|  4.72k|    return XML_ROLE_ENTITY_NONE;
  443|  4.68k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  4.68k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (443:3): [True: 4.68k, False: 4.75k]
  ------------------
  444|  4.68k|    state->handler = entity7;
  445|  4.68k|    return XML_ROLE_PARAM_ENTITY_NAME;
  446|  9.43k|  }
  447|     32|  return common(state, tok);
  448|  9.43k|}
xmlrole.c:entity7:
  544|  9.32k|        const ENCODING *enc) {
  545|  9.32k|  switch (tok) {
  ------------------
  |  Branch (545:11): [True: 16, False: 9.31k]
  ------------------
  546|  4.67k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  4.67k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (546:3): [True: 4.67k, False: 4.65k]
  ------------------
  547|  4.67k|    return XML_ROLE_ENTITY_NONE;
  548|  1.96k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.96k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (548:3): [True: 1.96k, False: 7.36k]
  ------------------
  549|  1.96k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  1.96k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 148, False: 1.81k]
  |  |  ------------------
  ------------------
  550|    148|      state->handler = entity9;
  551|    148|      return XML_ROLE_ENTITY_NONE;
  552|    148|    }
  553|  1.81k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|  1.81k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.80k, False: 4]
  |  |  ------------------
  ------------------
  554|  1.80k|      state->handler = entity8;
  555|  1.80k|      return XML_ROLE_ENTITY_NONE;
  556|  1.80k|    }
  557|      4|    break;
  558|  2.67k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  2.67k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (558:3): [True: 2.67k, False: 6.65k]
  ------------------
  559|  2.67k|    state->handler = declClose;
  560|  2.67k|    state->role_none = XML_ROLE_ENTITY_NONE;
  561|  2.67k|    return XML_ROLE_ENTITY_VALUE;
  562|  9.32k|  }
  563|     20|  return common(state, tok);
  564|  9.32k|}
xmlrole.c:entity9:
  584|  3.88k|        const ENCODING *enc) {
  585|  3.88k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.88k|#  define UNUSED_P(p) (void)p
  ------------------
  586|  3.88k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.88k|#  define UNUSED_P(p) (void)p
  ------------------
  587|  3.88k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.88k|#  define UNUSED_P(p) (void)p
  ------------------
  588|  3.88k|  switch (tok) {
  ------------------
  |  Branch (588:11): [True: 3, False: 3.88k]
  ------------------
  589|  1.94k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.94k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (589:3): [True: 1.94k, False: 1.93k]
  ------------------
  590|  1.94k|    return XML_ROLE_ENTITY_NONE;
  591|  1.93k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.93k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (591:3): [True: 1.93k, False: 1.95k]
  ------------------
  592|  1.93k|    state->handler = entity10;
  593|  1.93k|    return XML_ROLE_ENTITY_SYSTEM_ID;
  594|  3.88k|  }
  595|      3|  return common(state, tok);
  596|  3.88k|}
xmlrole.c:entity10:
  600|  2.15k|         const ENCODING *enc) {
  601|  2.15k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.15k|#  define UNUSED_P(p) (void)p
  ------------------
  602|  2.15k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.15k|#  define UNUSED_P(p) (void)p
  ------------------
  603|  2.15k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.15k|#  define UNUSED_P(p) (void)p
  ------------------
  604|  2.15k|  switch (tok) {
  ------------------
  |  Branch (604:11): [True: 4, False: 2.15k]
  ------------------
  605|    227|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    227|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (605:3): [True: 227, False: 1.93k]
  ------------------
  606|    227|    return XML_ROLE_ENTITY_NONE;
  607|  1.92k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  1.92k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (607:3): [True: 1.92k, False: 231]
  ------------------
  608|  1.92k|    setTopLevel(state);
  ------------------
  |  |  116|  1.92k|    ((state)->handler                                                          \
  |  |  117|  1.92k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 1.92k, False: 0]
  |  |  ------------------
  ------------------
  609|  1.92k|    return XML_ROLE_ENTITY_COMPLETE;
  610|  2.15k|  }
  611|      4|  return common(state, tok);
  612|  2.15k|}
xmlrole.c:entity8:
  568|  3.61k|        const ENCODING *enc) {
  569|  3.61k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.61k|#  define UNUSED_P(p) (void)p
  ------------------
  570|  3.61k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.61k|#  define UNUSED_P(p) (void)p
  ------------------
  571|  3.61k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.61k|#  define UNUSED_P(p) (void)p
  ------------------
  572|  3.61k|  switch (tok) {
  ------------------
  |  Branch (572:11): [True: 2, False: 3.61k]
  ------------------
  573|  1.80k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.80k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (573:3): [True: 1.80k, False: 1.80k]
  ------------------
  574|  1.80k|    return XML_ROLE_ENTITY_NONE;
  575|  1.80k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.80k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (575:3): [True: 1.80k, False: 1.81k]
  ------------------
  576|  1.80k|    state->handler = entity9;
  577|  1.80k|    return XML_ROLE_ENTITY_PUBLIC_ID;
  578|  3.61k|  }
  579|      2|  return common(state, tok);
  580|  3.61k|}
xmlrole.c:declClose:
 1178|  12.2k|          const ENCODING *enc) {
 1179|  12.2k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  12.2k|#  define UNUSED_P(p) (void)p
  ------------------
 1180|  12.2k|  UNUSED_P(end);
  ------------------
  |  |  135|  12.2k|#  define UNUSED_P(p) (void)p
  ------------------
 1181|  12.2k|  UNUSED_P(enc);
  ------------------
  |  |  135|  12.2k|#  define UNUSED_P(p) (void)p
  ------------------
 1182|  12.2k|  switch (tok) {
  ------------------
  |  Branch (1182:11): [True: 92, False: 12.1k]
  ------------------
 1183|    870|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    870|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1183:3): [True: 870, False: 11.3k]
  ------------------
 1184|    870|    return state->role_none;
 1185|  11.2k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  11.2k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (1185:3): [True: 11.2k, False: 962]
  ------------------
 1186|  11.2k|    setTopLevel(state);
  ------------------
  |  |  116|  11.2k|    ((state)->handler                                                          \
  |  |  117|  11.2k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 11.2k, False: 0]
  |  |  ------------------
  ------------------
 1187|  11.2k|    return state->role_none;
 1188|  12.2k|  }
 1189|     92|  return common(state, tok);
 1190|  12.2k|}
xmlrole.c:entity2:
  452|  10.9k|        const ENCODING *enc) {
  453|  10.9k|  switch (tok) {
  ------------------
  |  Branch (453:11): [True: 5, False: 10.9k]
  ------------------
  454|  5.50k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  5.50k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (454:3): [True: 5.50k, False: 5.46k]
  ------------------
  455|  5.50k|    return XML_ROLE_ENTITY_NONE;
  456|  1.22k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.22k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (456:3): [True: 1.22k, False: 9.74k]
  ------------------
  457|  1.22k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  1.22k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 258, False: 962]
  |  |  ------------------
  ------------------
  458|    258|      state->handler = entity4;
  459|    258|      return XML_ROLE_ENTITY_NONE;
  460|    258|    }
  461|    962|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|    962|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 954, False: 8]
  |  |  ------------------
  ------------------
  462|    954|      state->handler = entity3;
  463|    954|      return XML_ROLE_ENTITY_NONE;
  464|    954|    }
  465|      8|    break;
  466|  4.24k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  4.24k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (466:3): [True: 4.24k, False: 6.72k]
  ------------------
  467|  4.24k|    state->handler = declClose;
  468|  4.24k|    state->role_none = XML_ROLE_ENTITY_NONE;
  469|  4.24k|    return XML_ROLE_ENTITY_VALUE;
  470|  10.9k|  }
  471|     13|  return common(state, tok);
  472|  10.9k|}
xmlrole.c:entity4:
  492|  2.38k|        const ENCODING *enc) {
  493|  2.38k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.38k|#  define UNUSED_P(p) (void)p
  ------------------
  494|  2.38k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.38k|#  define UNUSED_P(p) (void)p
  ------------------
  495|  2.38k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.38k|#  define UNUSED_P(p) (void)p
  ------------------
  496|  2.38k|  switch (tok) {
  ------------------
  |  Branch (496:11): [True: 13, False: 2.36k]
  ------------------
  497|  1.19k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.19k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (497:3): [True: 1.19k, False: 1.18k]
  ------------------
  498|  1.19k|    return XML_ROLE_ENTITY_NONE;
  499|  1.17k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.17k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (499:3): [True: 1.17k, False: 1.20k]
  ------------------
  500|  1.17k|    state->handler = entity5;
  501|  1.17k|    return XML_ROLE_ENTITY_SYSTEM_ID;
  502|  2.38k|  }
  503|     13|  return common(state, tok);
  504|  2.38k|}
xmlrole.c:entity5:
  508|  1.80k|        const ENCODING *enc) {
  509|  1.80k|  switch (tok) {
  ------------------
  |  Branch (509:11): [True: 2, False: 1.80k]
  ------------------
  510|    635|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    635|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (510:3): [True: 635, False: 1.17k]
  ------------------
  511|    635|    return XML_ROLE_ENTITY_NONE;
  512|    600|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|    600|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (512:3): [True: 600, False: 1.20k]
  ------------------
  513|    600|    setTopLevel(state);
  ------------------
  |  |  116|    600|    ((state)->handler                                                          \
  |  |  117|    600|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 600, False: 0]
  |  |  ------------------
  ------------------
  514|    600|    return XML_ROLE_ENTITY_COMPLETE;
  515|    568|  case XML_TOK_NAME:
  ------------------
  |  |   85|    568|#define XML_TOK_NAME 18
  ------------------
  |  Branch (515:3): [True: 568, False: 1.23k]
  ------------------
  516|    568|    if (XmlNameMatchesAscii(enc, ptr, end, KW_NDATA)) {
  ------------------
  |  |  255|    568|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 564, False: 4]
  |  |  ------------------
  ------------------
  517|    564|      state->handler = entity6;
  518|    564|      return XML_ROLE_ENTITY_NONE;
  519|    564|    }
  520|      4|    break;
  521|  1.80k|  }
  522|      6|  return common(state, tok);
  523|  1.80k|}
xmlrole.c:entity6:
  527|  1.12k|        const ENCODING *enc) {
  528|  1.12k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.12k|#  define UNUSED_P(p) (void)p
  ------------------
  529|  1.12k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.12k|#  define UNUSED_P(p) (void)p
  ------------------
  530|  1.12k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.12k|#  define UNUSED_P(p) (void)p
  ------------------
  531|  1.12k|  switch (tok) {
  ------------------
  |  Branch (531:11): [True: 3, False: 1.12k]
  ------------------
  532|    564|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    564|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (532:3): [True: 564, False: 561]
  ------------------
  533|    564|    return XML_ROLE_ENTITY_NONE;
  534|    558|  case XML_TOK_NAME:
  ------------------
  |  |   85|    558|#define XML_TOK_NAME 18
  ------------------
  |  Branch (534:3): [True: 558, False: 567]
  ------------------
  535|    558|    state->handler = declClose;
  536|    558|    state->role_none = XML_ROLE_ENTITY_NONE;
  537|    558|    return XML_ROLE_ENTITY_NOTATION_NAME;
  538|  1.12k|  }
  539|      3|  return common(state, tok);
  540|  1.12k|}
xmlrole.c:entity3:
  476|  1.90k|        const ENCODING *enc) {
  477|  1.90k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.90k|#  define UNUSED_P(p) (void)p
  ------------------
  478|  1.90k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.90k|#  define UNUSED_P(p) (void)p
  ------------------
  479|  1.90k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.90k|#  define UNUSED_P(p) (void)p
  ------------------
  480|  1.90k|  switch (tok) {
  ------------------
  |  Branch (480:11): [True: 2, False: 1.90k]
  ------------------
  481|    953|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    953|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (481:3): [True: 953, False: 951]
  ------------------
  482|    953|    return XML_ROLE_ENTITY_NONE;
  483|    949|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    949|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (483:3): [True: 949, False: 955]
  ------------------
  484|    949|    state->handler = entity4;
  485|    949|    return XML_ROLE_ENTITY_PUBLIC_ID;
  486|  1.90k|  }
  487|      2|  return common(state, tok);
  488|  1.90k|}
xmlrole.c:attlist0:
  705|  21.3k|         const ENCODING *enc) {
  706|  21.3k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  21.3k|#  define UNUSED_P(p) (void)p
  ------------------
  707|  21.3k|  UNUSED_P(end);
  ------------------
  |  |  135|  21.3k|#  define UNUSED_P(p) (void)p
  ------------------
  708|  21.3k|  UNUSED_P(enc);
  ------------------
  |  |  135|  21.3k|#  define UNUSED_P(p) (void)p
  ------------------
  709|  21.3k|  switch (tok) {
  ------------------
  |  Branch (709:11): [True: 14, False: 21.3k]
  ------------------
  710|  10.6k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  10.6k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (710:3): [True: 10.6k, False: 10.6k]
  ------------------
  711|  10.6k|    return XML_ROLE_ATTLIST_NONE;
  712|  10.6k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  10.6k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (712:3): [True: 10.6k, False: 10.6k]
  ------------------
  713|  10.6k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  10.6k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (713:3): [True: 0, False: 21.3k]
  ------------------
  714|  10.6k|    state->handler = attlist1;
  715|  10.6k|    return XML_ROLE_ATTLIST_ELEMENT_NAME;
  716|  21.3k|  }
  717|     14|  return common(state, tok);
  718|  21.3k|}
xmlrole.c:attlist1:
  722|  89.7k|         const ENCODING *enc) {
  723|  89.7k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  89.7k|#  define UNUSED_P(p) (void)p
  ------------------
  724|  89.7k|  UNUSED_P(end);
  ------------------
  |  |  135|  89.7k|#  define UNUSED_P(p) (void)p
  ------------------
  725|  89.7k|  UNUSED_P(enc);
  ------------------
  |  |  135|  89.7k|#  define UNUSED_P(p) (void)p
  ------------------
  726|  89.7k|  switch (tok) {
  ------------------
  |  Branch (726:11): [True: 37, False: 89.6k]
  ------------------
  727|  41.3k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  41.3k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (727:3): [True: 41.3k, False: 48.3k]
  ------------------
  728|  41.3k|    return XML_ROLE_ATTLIST_NONE;
  729|  9.90k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  9.90k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (729:3): [True: 9.90k, False: 79.8k]
  ------------------
  730|  9.90k|    setTopLevel(state);
  ------------------
  |  |  116|  9.90k|    ((state)->handler                                                          \
  |  |  117|  9.90k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 9.90k, False: 0]
  |  |  ------------------
  ------------------
  731|  9.90k|    return XML_ROLE_ATTLIST_NONE;
  732|  38.4k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  38.4k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (732:3): [True: 38.4k, False: 51.3k]
  ------------------
  733|  38.4k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  38.4k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (733:3): [True: 0, False: 89.7k]
  ------------------
  734|  38.4k|    state->handler = attlist2;
  735|  38.4k|    return XML_ROLE_ATTRIBUTE_NAME;
  736|  89.7k|  }
  737|     37|  return common(state, tok);
  738|  89.7k|}
xmlrole.c:attlist2:
  742|  76.7k|         const ENCODING *enc) {
  743|  76.7k|  switch (tok) {
  ------------------
  |  Branch (743:11): [True: 23, False: 76.7k]
  ------------------
  744|  38.3k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  38.3k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (744:3): [True: 38.3k, False: 38.3k]
  ------------------
  745|  38.3k|    return XML_ROLE_ATTLIST_NONE;
  746|  9.72k|  case XML_TOK_NAME: {
  ------------------
  |  |   85|  9.72k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (746:3): [True: 9.72k, False: 67.0k]
  ------------------
  747|  9.72k|    static const char *const types[] = {
  748|  9.72k|        KW_CDATA,  KW_ID,       KW_IDREF,   KW_IDREFS,
  749|  9.72k|        KW_ENTITY, KW_ENTITIES, KW_NMTOKEN, KW_NMTOKENS,
  750|  9.72k|    };
  751|  9.72k|    int i;
  752|  22.7k|    for (i = 0; i < (int)(sizeof(types) / sizeof(types[0])); i++)
  ------------------
  |  Branch (752:17): [True: 22.3k, False: 385]
  ------------------
  753|  22.3k|      if (XmlNameMatchesAscii(enc, ptr, end, types[i])) {
  ------------------
  |  |  255|  22.3k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 9.34k, False: 13.0k]
  |  |  ------------------
  ------------------
  754|  9.34k|        state->handler = attlist8;
  755|  9.34k|        return XML_ROLE_ATTRIBUTE_TYPE_CDATA + i;
  756|  9.34k|      }
  757|  9.72k|  }
  758|    385|    if (XmlNameMatchesAscii(enc, ptr, end, KW_NOTATION)) {
  ------------------
  |  |  255|    385|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 337, False: 48]
  |  |  ------------------
  ------------------
  759|    337|      state->handler = attlist5;
  760|    337|      return XML_ROLE_ATTLIST_NONE;
  761|    337|    }
  762|     48|    break;
  763|  28.6k|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  28.6k|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (763:3): [True: 28.6k, False: 48.1k]
  ------------------
  764|  28.6k|    state->handler = attlist3;
  765|  28.6k|    return XML_ROLE_ATTLIST_NONE;
  766|  76.7k|  }
  767|     71|  return common(state, tok);
  768|  76.7k|}
xmlrole.c:attlist8:
  861|  76.0k|         const ENCODING *enc) {
  862|  76.0k|  switch (tok) {
  ------------------
  |  Branch (862:11): [True: 16, False: 76.0k]
  ------------------
  863|  38.0k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  38.0k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (863:3): [True: 38.0k, False: 37.9k]
  ------------------
  864|  38.0k|    return XML_ROLE_ATTLIST_NONE;
  865|  29.5k|  case XML_TOK_POUND_NAME:
  ------------------
  |  |   87|  29.5k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  |  Branch (865:3): [True: 29.5k, False: 46.4k]
  ------------------
  866|  29.5k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  29.5k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 25.2k, False: 4.34k]
  |  |  ------------------
  ------------------
  867|  29.5k|                            KW_IMPLIED)) {
  868|  25.2k|      state->handler = attlist1;
  869|  25.2k|      return XML_ROLE_IMPLIED_ATTRIBUTE_VALUE;
  870|  25.2k|    }
  871|  4.34k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  4.34k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 3.09k, False: 1.25k]
  |  |  ------------------
  ------------------
  872|  4.34k|                            KW_REQUIRED)) {
  873|  3.09k|      state->handler = attlist1;
  874|  3.09k|      return XML_ROLE_REQUIRED_ATTRIBUTE_VALUE;
  875|  3.09k|    }
  876|  1.25k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  1.25k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.24k, False: 13]
  |  |  ------------------
  ------------------
  877|  1.25k|                            KW_FIXED)) {
  878|  1.24k|      state->handler = attlist9;
  879|  1.24k|      return XML_ROLE_ATTLIST_NONE;
  880|  1.24k|    }
  881|     13|    break;
  882|  8.36k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  8.36k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (882:3): [True: 8.36k, False: 67.6k]
  ------------------
  883|  8.36k|    state->handler = attlist1;
  884|  8.36k|    return XML_ROLE_DEFAULT_ATTRIBUTE_VALUE;
  885|  76.0k|  }
  886|     29|  return common(state, tok);
  887|  76.0k|}
xmlrole.c:attlist9:
  891|  2.47k|         const ENCODING *enc) {
  892|  2.47k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.47k|#  define UNUSED_P(p) (void)p
  ------------------
  893|  2.47k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.47k|#  define UNUSED_P(p) (void)p
  ------------------
  894|  2.47k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.47k|#  define UNUSED_P(p) (void)p
  ------------------
  895|  2.47k|  switch (tok) {
  ------------------
  |  Branch (895:11): [True: 12, False: 2.46k]
  ------------------
  896|  1.24k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.24k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (896:3): [True: 1.24k, False: 1.23k]
  ------------------
  897|  1.24k|    return XML_ROLE_ATTLIST_NONE;
  898|  1.22k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.22k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (898:3): [True: 1.22k, False: 1.25k]
  ------------------
  899|  1.22k|    state->handler = attlist1;
  900|  1.22k|    return XML_ROLE_FIXED_ATTRIBUTE_VALUE;
  901|  2.47k|  }
  902|     12|  return common(state, tok);
  903|  2.47k|}
xmlrole.c:attlist5:
  809|    672|         const ENCODING *enc) {
  810|    672|  UNUSED_P(ptr);
  ------------------
  |  |  135|    672|#  define UNUSED_P(p) (void)p
  ------------------
  811|    672|  UNUSED_P(end);
  ------------------
  |  |  135|    672|#  define UNUSED_P(p) (void)p
  ------------------
  812|    672|  UNUSED_P(enc);
  ------------------
  |  |  135|    672|#  define UNUSED_P(p) (void)p
  ------------------
  813|    672|  switch (tok) {
  ------------------
  |  Branch (813:11): [True: 2, False: 670]
  ------------------
  814|    336|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    336|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (814:3): [True: 336, False: 336]
  ------------------
  815|    336|    return XML_ROLE_ATTLIST_NONE;
  816|    334|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|    334|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (816:3): [True: 334, False: 338]
  ------------------
  817|    334|    state->handler = attlist6;
  818|    334|    return XML_ROLE_ATTLIST_NONE;
  819|    672|  }
  820|      2|  return common(state, tok);
  821|    672|}
xmlrole.c:attlist6:
  825|  1.37k|         const ENCODING *enc) {
  826|  1.37k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.37k|#  define UNUSED_P(p) (void)p
  ------------------
  827|  1.37k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.37k|#  define UNUSED_P(p) (void)p
  ------------------
  828|  1.37k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.37k|#  define UNUSED_P(p) (void)p
  ------------------
  829|  1.37k|  switch (tok) {
  ------------------
  |  Branch (829:11): [True: 4, False: 1.36k]
  ------------------
  830|    263|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    263|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (830:3): [True: 263, False: 1.11k]
  ------------------
  831|    263|    return XML_ROLE_ATTLIST_NONE;
  832|  1.10k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.10k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (832:3): [True: 1.10k, False: 267]
  ------------------
  833|  1.10k|    state->handler = attlist7;
  834|  1.10k|    return XML_ROLE_ATTRIBUTE_NOTATION_VALUE;
  835|  1.37k|  }
  836|      4|  return common(state, tok);
  837|  1.37k|}
xmlrole.c:attlist7:
  841|  1.46k|         const ENCODING *enc) {
  842|  1.46k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.46k|#  define UNUSED_P(p) (void)p
  ------------------
  843|  1.46k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.46k|#  define UNUSED_P(p) (void)p
  ------------------
  844|  1.46k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.46k|#  define UNUSED_P(p) (void)p
  ------------------
  845|  1.46k|  switch (tok) {
  ------------------
  |  Branch (845:11): [True: 4, False: 1.46k]
  ------------------
  846|    367|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    367|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (846:3): [True: 367, False: 1.09k]
  ------------------
  847|    367|    return XML_ROLE_ATTLIST_NONE;
  848|    300|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|    300|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (848:3): [True: 300, False: 1.16k]
  ------------------
  849|    300|    state->handler = attlist8;
  850|    300|    return XML_ROLE_ATTLIST_NONE;
  851|    795|  case XML_TOK_OR:
  ------------------
  |  |   88|    795|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (851:3): [True: 795, False: 671]
  ------------------
  852|    795|    state->handler = attlist6;
  853|    795|    return XML_ROLE_ATTLIST_NONE;
  854|  1.46k|  }
  855|      4|  return common(state, tok);
  856|  1.46k|}
xmlrole.c:attlist3:
  772|  34.6k|         const ENCODING *enc) {
  773|  34.6k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  34.6k|#  define UNUSED_P(p) (void)p
  ------------------
  774|  34.6k|  UNUSED_P(end);
  ------------------
  |  |  135|  34.6k|#  define UNUSED_P(p) (void)p
  ------------------
  775|  34.6k|  UNUSED_P(enc);
  ------------------
  |  |  135|  34.6k|#  define UNUSED_P(p) (void)p
  ------------------
  776|  34.6k|  switch (tok) {
  ------------------
  |  Branch (776:11): [True: 8, False: 34.6k]
  ------------------
  777|    469|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    469|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (777:3): [True: 469, False: 34.1k]
  ------------------
  778|    469|    return XML_ROLE_ATTLIST_NONE;
  779|  5.61k|  case XML_TOK_NMTOKEN:
  ------------------
  |  |   86|  5.61k|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (779:3): [True: 5.61k, False: 29.0k]
  ------------------
  780|  34.1k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  34.1k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (780:3): [True: 28.5k, False: 6.09k]
  ------------------
  781|  34.1k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  34.1k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (781:3): [True: 0, False: 34.6k]
  ------------------
  782|  34.1k|    state->handler = attlist4;
  783|  34.1k|    return XML_ROLE_ATTRIBUTE_ENUM_VALUE;
  784|  34.6k|  }
  785|      8|  return common(state, tok);
  786|  34.6k|}
xmlrole.c:attlist4:
  790|  35.8k|         const ENCODING *enc) {
  791|  35.8k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  35.8k|#  define UNUSED_P(p) (void)p
  ------------------
  792|  35.8k|  UNUSED_P(end);
  ------------------
  |  |  135|  35.8k|#  define UNUSED_P(p) (void)p
  ------------------
  793|  35.8k|  UNUSED_P(enc);
  ------------------
  |  |  135|  35.8k|#  define UNUSED_P(p) (void)p
  ------------------
  794|  35.8k|  switch (tok) {
  ------------------
  |  Branch (794:11): [True: 7, False: 35.8k]
  ------------------
  795|  1.74k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.74k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (795:3): [True: 1.74k, False: 34.1k]
  ------------------
  796|  1.74k|    return XML_ROLE_ATTLIST_NONE;
  797|  28.4k|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|  28.4k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (797:3): [True: 28.4k, False: 7.45k]
  ------------------
  798|  28.4k|    state->handler = attlist8;
  799|  28.4k|    return XML_ROLE_ATTLIST_NONE;
  800|  5.70k|  case XML_TOK_OR:
  ------------------
  |  |   88|  5.70k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (800:3): [True: 5.70k, False: 30.1k]
  ------------------
  801|  5.70k|    state->handler = attlist3;
  802|  5.70k|    return XML_ROLE_ATTLIST_NONE;
  803|  35.8k|  }
  804|      7|  return common(state, tok);
  805|  35.8k|}
xmlrole.c:element0:
  907|  7.50k|         const ENCODING *enc) {
  908|  7.50k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  7.50k|#  define UNUSED_P(p) (void)p
  ------------------
  909|  7.50k|  UNUSED_P(end);
  ------------------
  |  |  135|  7.50k|#  define UNUSED_P(p) (void)p
  ------------------
  910|  7.50k|  UNUSED_P(enc);
  ------------------
  |  |  135|  7.50k|#  define UNUSED_P(p) (void)p
  ------------------
  911|  7.50k|  switch (tok) {
  ------------------
  |  Branch (911:11): [True: 8, False: 7.49k]
  ------------------
  912|  3.75k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  3.75k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (912:3): [True: 3.75k, False: 3.75k]
  ------------------
  913|  3.75k|    return XML_ROLE_ELEMENT_NONE;
  914|  3.74k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  3.74k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (914:3): [True: 3.74k, False: 3.76k]
  ------------------
  915|  3.74k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  3.74k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (915:3): [True: 0, False: 7.50k]
  ------------------
  916|  3.74k|    state->handler = element1;
  917|  3.74k|    return XML_ROLE_ELEMENT_NAME;
  918|  7.50k|  }
  919|      8|  return common(state, tok);
  920|  7.50k|}
xmlrole.c:element1:
  924|  7.48k|         const ENCODING *enc) {
  925|  7.48k|  switch (tok) {
  ------------------
  |  Branch (925:11): [True: 5, False: 7.47k]
  ------------------
  926|  3.74k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  3.74k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (926:3): [True: 3.74k, False: 3.74k]
  ------------------
  927|  3.74k|    return XML_ROLE_ELEMENT_NONE;
  928|     24|  case XML_TOK_NAME:
  ------------------
  |  |   85|     24|#define XML_TOK_NAME 18
  ------------------
  |  Branch (928:3): [True: 24, False: 7.45k]
  ------------------
  929|     24|    if (XmlNameMatchesAscii(enc, ptr, end, KW_EMPTY)) {
  ------------------
  |  |  255|     24|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 18, False: 6]
  |  |  ------------------
  ------------------
  930|     18|      state->handler = declClose;
  931|     18|      state->role_none = XML_ROLE_ELEMENT_NONE;
  932|     18|      return XML_ROLE_CONTENT_EMPTY;
  933|     18|    }
  934|      6|    if (XmlNameMatchesAscii(enc, ptr, end, KW_ANY)) {
  ------------------
  |  |  255|      6|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1, False: 5]
  |  |  ------------------
  ------------------
  935|      1|      state->handler = declClose;
  936|      1|      state->role_none = XML_ROLE_ELEMENT_NONE;
  937|      1|      return XML_ROLE_CONTENT_ANY;
  938|      1|    }
  939|      5|    break;
  940|  3.71k|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  3.71k|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (940:3): [True: 3.71k, False: 3.77k]
  ------------------
  941|  3.71k|    state->handler = element2;
  942|  3.71k|    state->level = 1;
  943|  3.71k|    return XML_ROLE_GROUP_OPEN;
  944|  7.48k|  }
  945|     10|  return common(state, tok);
  946|  7.48k|}
xmlrole.c:element2:
  950|  3.81k|         const ENCODING *enc) {
  951|  3.81k|  switch (tok) {
  ------------------
  |  Branch (951:11): [True: 3, False: 3.81k]
  ------------------
  952|    116|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    116|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (952:3): [True: 116, False: 3.70k]
  ------------------
  953|    116|    return XML_ROLE_ELEMENT_NONE;
  954|  1.57k|  case XML_TOK_POUND_NAME:
  ------------------
  |  |   87|  1.57k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  |  Branch (954:3): [True: 1.57k, False: 2.24k]
  ------------------
  955|  1.57k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  1.57k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.56k, False: 6]
  |  |  ------------------
  ------------------
  956|  1.57k|                            KW_PCDATA)) {
  957|  1.56k|      state->handler = element3;
  958|  1.56k|      return XML_ROLE_CONTENT_PCDATA;
  959|  1.56k|    }
  960|      6|    break;
  961|    523|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|    523|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (961:3): [True: 523, False: 3.29k]
  ------------------
  962|    523|    state->level = 2;
  963|    523|    state->handler = element6;
  964|    523|    return XML_ROLE_GROUP_OPEN;
  965|    433|  case XML_TOK_NAME:
  ------------------
  |  |   85|    433|#define XML_TOK_NAME 18
  ------------------
  |  Branch (965:3): [True: 433, False: 3.38k]
  ------------------
  966|    433|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|    433|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (966:3): [True: 0, False: 3.81k]
  ------------------
  967|    433|    state->handler = element7;
  968|    433|    return XML_ROLE_CONTENT_ELEMENT;
  969|    231|  case XML_TOK_NAME_QUESTION:
  ------------------
  |  |   99|    231|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
  |  Branch (969:3): [True: 231, False: 3.58k]
  ------------------
  970|    231|    state->handler = element7;
  971|    231|    return XML_ROLE_CONTENT_ELEMENT_OPT;
  972|    826|  case XML_TOK_NAME_ASTERISK:
  ------------------
  |  |  100|    826|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
  |  Branch (972:3): [True: 826, False: 2.99k]
  ------------------
  973|    826|    state->handler = element7;
  974|    826|    return XML_ROLE_CONTENT_ELEMENT_REP;
  975|    116|  case XML_TOK_NAME_PLUS:
  ------------------
  |  |  101|    116|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
  |  Branch (975:3): [True: 116, False: 3.70k]
  ------------------
  976|    116|    state->handler = element7;
  977|    116|    return XML_ROLE_CONTENT_ELEMENT_PLUS;
  978|  3.81k|  }
  979|      9|  return common(state, tok);
  980|  3.81k|}
xmlrole.c:element3:
  984|  2.23k|         const ENCODING *enc) {
  985|  2.23k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.23k|#  define UNUSED_P(p) (void)p
  ------------------
  986|  2.23k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.23k|#  define UNUSED_P(p) (void)p
  ------------------
  987|  2.23k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.23k|#  define UNUSED_P(p) (void)p
  ------------------
  988|  2.23k|  switch (tok) {
  ------------------
  |  Branch (988:11): [True: 5, False: 2.22k]
  ------------------
  989|    672|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    672|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (989:3): [True: 672, False: 1.56k]
  ------------------
  990|    672|    return XML_ROLE_ELEMENT_NONE;
  991|    827|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|    827|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (991:3): [True: 827, False: 1.40k]
  ------------------
  992|    827|    state->handler = declClose;
  993|    827|    state->role_none = XML_ROLE_ELEMENT_NONE;
  994|    827|    return XML_ROLE_GROUP_CLOSE;
  995|    532|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|    532|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (995:3): [True: 532, False: 1.70k]
  ------------------
  996|    532|    state->handler = declClose;
  997|    532|    state->role_none = XML_ROLE_ELEMENT_NONE;
  998|    532|    return XML_ROLE_GROUP_CLOSE_REP;
  999|    197|  case XML_TOK_OR:
  ------------------
  |  |   88|    197|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (999:3): [True: 197, False: 2.03k]
  ------------------
 1000|    197|    state->handler = element4;
 1001|    197|    return XML_ROLE_ELEMENT_NONE;
 1002|  2.23k|  }
 1003|      5|  return common(state, tok);
 1004|  2.23k|}
xmlrole.c:element4:
 1008|  1.45k|         const ENCODING *enc) {
 1009|  1.45k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.45k|#  define UNUSED_P(p) (void)p
  ------------------
 1010|  1.45k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.45k|#  define UNUSED_P(p) (void)p
  ------------------
 1011|  1.45k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.45k|#  define UNUSED_P(p) (void)p
  ------------------
 1012|  1.45k|  switch (tok) {
  ------------------
  |  Branch (1012:11): [True: 8, False: 1.45k]
  ------------------
 1013|    429|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    429|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1013:3): [True: 429, False: 1.03k]
  ------------------
 1014|    429|    return XML_ROLE_ELEMENT_NONE;
 1015|  1.02k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.02k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1015:3): [True: 1.02k, False: 437]
  ------------------
 1016|  1.02k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  1.02k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1016:3): [True: 0, False: 1.45k]
  ------------------
 1017|  1.02k|    state->handler = element5;
 1018|  1.02k|    return XML_ROLE_CONTENT_ELEMENT;
 1019|  1.45k|  }
 1020|      8|  return common(state, tok);
 1021|  1.45k|}
xmlrole.c:element5:
 1025|  1.24k|         const ENCODING *enc) {
 1026|  1.24k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.24k|#  define UNUSED_P(p) (void)p
  ------------------
 1027|  1.24k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.24k|#  define UNUSED_P(p) (void)p
  ------------------
 1028|  1.24k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.24k|#  define UNUSED_P(p) (void)p
  ------------------
 1029|  1.24k|  switch (tok) {
  ------------------
  |  Branch (1029:11): [True: 2, False: 1.24k]
  ------------------
 1030|    234|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    234|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1030:3): [True: 234, False: 1.01k]
  ------------------
 1031|    234|    return XML_ROLE_ELEMENT_NONE;
 1032|    157|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|    157|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (1032:3): [True: 157, False: 1.09k]
  ------------------
 1033|    157|    state->handler = declClose;
 1034|    157|    state->role_none = XML_ROLE_ELEMENT_NONE;
 1035|    157|    return XML_ROLE_GROUP_CLOSE_REP;
 1036|    855|  case XML_TOK_OR:
  ------------------
  |  |   88|    855|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (1036:3): [True: 855, False: 393]
  ------------------
 1037|    855|    state->handler = element4;
 1038|    855|    return XML_ROLE_ELEMENT_NONE;
 1039|  1.24k|  }
 1040|      2|  return common(state, tok);
 1041|  1.24k|}
xmlrole.c:element6:
 1045|  4.73M|         const ENCODING *enc) {
 1046|  4.73M|  UNUSED_P(ptr);
  ------------------
  |  |  135|  4.73M|#  define UNUSED_P(p) (void)p
  ------------------
 1047|  4.73M|  UNUSED_P(end);
  ------------------
  |  |  135|  4.73M|#  define UNUSED_P(p) (void)p
  ------------------
 1048|  4.73M|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.73M|#  define UNUSED_P(p) (void)p
  ------------------
 1049|  4.73M|  switch (tok) {
  ------------------
  |  Branch (1049:11): [True: 46, False: 4.73M]
  ------------------
 1050|  57.2k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  57.2k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1050:3): [True: 57.2k, False: 4.67M]
  ------------------
 1051|  57.2k|    return XML_ROLE_ELEMENT_NONE;
 1052|  4.59M|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  4.59M|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (1052:3): [True: 4.59M, False: 142k]
  ------------------
 1053|  4.59M|    state->level += 1;
 1054|  4.59M|    return XML_ROLE_GROUP_OPEN;
 1055|  67.7k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  67.7k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1055:3): [True: 67.7k, False: 4.66M]
  ------------------
 1056|  67.7k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  67.7k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1056:3): [True: 0, False: 4.73M]
  ------------------
 1057|  67.7k|    state->handler = element7;
 1058|  67.7k|    return XML_ROLE_CONTENT_ELEMENT;
 1059|  14.6k|  case XML_TOK_NAME_QUESTION:
  ------------------
  |  |   99|  14.6k|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
  |  Branch (1059:3): [True: 14.6k, False: 4.71M]
  ------------------
 1060|  14.6k|    state->handler = element7;
 1061|  14.6k|    return XML_ROLE_CONTENT_ELEMENT_OPT;
 1062|    577|  case XML_TOK_NAME_ASTERISK:
  ------------------
  |  |  100|    577|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
  |  Branch (1062:3): [True: 577, False: 4.73M]
  ------------------
 1063|    577|    state->handler = element7;
 1064|    577|    return XML_ROLE_CONTENT_ELEMENT_REP;
 1065|  2.28k|  case XML_TOK_NAME_PLUS:
  ------------------
  |  |  101|  2.28k|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
  |  Branch (1065:3): [True: 2.28k, False: 4.73M]
  ------------------
 1066|  2.28k|    state->handler = element7;
 1067|  2.28k|    return XML_ROLE_CONTENT_ELEMENT_PLUS;
 1068|  4.73M|  }
 1069|     46|  return common(state, tok);
 1070|  4.73M|}
xmlrole.c:element7:
 1074|   165k|         const ENCODING *enc) {
 1075|   165k|  UNUSED_P(ptr);
  ------------------
  |  |  135|   165k|#  define UNUSED_P(p) (void)p
  ------------------
 1076|   165k|  UNUSED_P(end);
  ------------------
  |  |  135|   165k|#  define UNUSED_P(p) (void)p
  ------------------
 1077|   165k|  UNUSED_P(enc);
  ------------------
  |  |  135|   165k|#  define UNUSED_P(p) (void)p
  ------------------
 1078|   165k|  switch (tok) {
  ------------------
  |  Branch (1078:11): [True: 53, False: 165k]
  ------------------
 1079|  37.6k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  37.6k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1079:3): [True: 37.6k, False: 128k]
  ------------------
 1080|  37.6k|    return XML_ROLE_ELEMENT_NONE;
 1081|  26.8k|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|  26.8k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (1081:3): [True: 26.8k, False: 138k]
  ------------------
 1082|  26.8k|    state->level -= 1;
 1083|  26.8k|    if (state->level == 0) {
  ------------------
  |  Branch (1083:9): [True: 748, False: 26.1k]
  ------------------
 1084|    748|      state->handler = declClose;
 1085|    748|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1086|    748|    }
 1087|  26.8k|    return XML_ROLE_GROUP_CLOSE;
 1088|  3.04k|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|  3.04k|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (1088:3): [True: 3.04k, False: 162k]
  ------------------
 1089|  3.04k|    state->level -= 1;
 1090|  3.04k|    if (state->level == 0) {
  ------------------
  |  Branch (1090:9): [True: 888, False: 2.16k]
  ------------------
 1091|    888|      state->handler = declClose;
 1092|    888|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1093|    888|    }
 1094|  3.04k|    return XML_ROLE_GROUP_CLOSE_REP;
 1095|  4.39k|  case XML_TOK_CLOSE_PAREN_QUESTION:
  ------------------
  |  |  104|  4.39k|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
  |  Branch (1095:3): [True: 4.39k, False: 161k]
  ------------------
 1096|  4.39k|    state->level -= 1;
 1097|  4.39k|    if (state->level == 0) {
  ------------------
  |  Branch (1097:9): [True: 33, False: 4.35k]
  ------------------
 1098|     33|      state->handler = declClose;
 1099|     33|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1100|     33|    }
 1101|  4.39k|    return XML_ROLE_GROUP_CLOSE_OPT;
 1102|  8.67k|  case XML_TOK_CLOSE_PAREN_PLUS:
  ------------------
  |  |  106|  8.67k|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
  |  Branch (1102:3): [True: 8.67k, False: 157k]
  ------------------
 1103|  8.67k|    state->level -= 1;
 1104|  8.67k|    if (state->level == 0) {
  ------------------
  |  Branch (1104:9): [True: 82, False: 8.59k]
  ------------------
 1105|     82|      state->handler = declClose;
 1106|     82|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1107|     82|    }
 1108|  8.67k|    return XML_ROLE_GROUP_CLOSE_PLUS;
 1109|  5.80k|  case XML_TOK_COMMA:
  ------------------
  |  |  107|  5.80k|#define XML_TOK_COMMA 38
  ------------------
  |  Branch (1109:3): [True: 5.80k, False: 159k]
  ------------------
 1110|  5.80k|    state->handler = element6;
 1111|  5.80k|    return XML_ROLE_GROUP_SEQUENCE;
 1112|  79.2k|  case XML_TOK_OR:
  ------------------
  |  |   88|  79.2k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (1112:3): [True: 79.2k, False: 86.5k]
  ------------------
 1113|  79.2k|    state->handler = element6;
 1114|  79.2k|    return XML_ROLE_GROUP_CHOICE;
 1115|   165k|  }
 1116|     53|  return common(state, tok);
 1117|   165k|}
xmlrole.c:notation0:
  616|  3.24k|          const ENCODING *enc) {
  617|  3.24k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.24k|#  define UNUSED_P(p) (void)p
  ------------------
  618|  3.24k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.24k|#  define UNUSED_P(p) (void)p
  ------------------
  619|  3.24k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.24k|#  define UNUSED_P(p) (void)p
  ------------------
  620|  3.24k|  switch (tok) {
  ------------------
  |  Branch (620:11): [True: 1, False: 3.24k]
  ------------------
  621|  1.62k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.62k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (621:3): [True: 1.62k, False: 1.61k]
  ------------------
  622|  1.62k|    return XML_ROLE_NOTATION_NONE;
  623|  1.61k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.61k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (623:3): [True: 1.61k, False: 1.63k]
  ------------------
  624|  1.61k|    state->handler = notation1;
  625|  1.61k|    return XML_ROLE_NOTATION_NAME;
  626|  3.24k|  }
  627|      1|  return common(state, tok);
  628|  3.24k|}
xmlrole.c:notation1:
  632|  3.22k|          const ENCODING *enc) {
  633|  3.22k|  switch (tok) {
  ------------------
  |  Branch (633:11): [True: 3, False: 3.22k]
  ------------------
  634|  1.61k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.61k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (634:3): [True: 1.61k, False: 1.61k]
  ------------------
  635|  1.61k|    return XML_ROLE_NOTATION_NONE;
  636|  1.60k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.60k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (636:3): [True: 1.60k, False: 1.61k]
  ------------------
  637|  1.60k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  1.60k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 530, False: 1.07k]
  |  |  ------------------
  ------------------
  638|    530|      state->handler = notation3;
  639|    530|      return XML_ROLE_NOTATION_NONE;
  640|    530|    }
  641|  1.07k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|  1.07k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.07k, False: 4]
  |  |  ------------------
  ------------------
  642|  1.07k|      state->handler = notation2;
  643|  1.07k|      return XML_ROLE_NOTATION_NONE;
  644|  1.07k|    }
  645|      4|    break;
  646|  3.22k|  }
  647|      7|  return common(state, tok);
  648|  3.22k|}
xmlrole.c:notation3:
  668|  1.05k|          const ENCODING *enc) {
  669|  1.05k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.05k|#  define UNUSED_P(p) (void)p
  ------------------
  670|  1.05k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.05k|#  define UNUSED_P(p) (void)p
  ------------------
  671|  1.05k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.05k|#  define UNUSED_P(p) (void)p
  ------------------
  672|  1.05k|  switch (tok) {
  ------------------
  |  Branch (672:11): [True: 2, False: 1.05k]
  ------------------
  673|    529|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    529|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (673:3): [True: 529, False: 527]
  ------------------
  674|    529|    return XML_ROLE_NOTATION_NONE;
  675|    525|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    525|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (675:3): [True: 525, False: 531]
  ------------------
  676|    525|    state->handler = declClose;
  677|    525|    state->role_none = XML_ROLE_NOTATION_NONE;
  678|    525|    return XML_ROLE_NOTATION_SYSTEM_ID;
  679|  1.05k|  }
  680|      2|  return common(state, tok);
  681|  1.05k|}
xmlrole.c:notation2:
  652|  2.14k|          const ENCODING *enc) {
  653|  2.14k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.14k|#  define UNUSED_P(p) (void)p
  ------------------
  654|  2.14k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.14k|#  define UNUSED_P(p) (void)p
  ------------------
  655|  2.14k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.14k|#  define UNUSED_P(p) (void)p
  ------------------
  656|  2.14k|  switch (tok) {
  ------------------
  |  Branch (656:11): [True: 3, False: 2.14k]
  ------------------
  657|  1.07k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.07k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (657:3): [True: 1.07k, False: 1.07k]
  ------------------
  658|  1.07k|    return XML_ROLE_NOTATION_NONE;
  659|  1.06k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.06k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (659:3): [True: 1.06k, False: 1.07k]
  ------------------
  660|  1.06k|    state->handler = notation4;
  661|  1.06k|    return XML_ROLE_NOTATION_PUBLIC_ID;
  662|  2.14k|  }
  663|      3|  return common(state, tok);
  664|  2.14k|}
xmlrole.c:notation4:
  685|  1.74k|          const ENCODING *enc) {
  686|  1.74k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.74k|#  define UNUSED_P(p) (void)p
  ------------------
  687|  1.74k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.74k|#  define UNUSED_P(p) (void)p
  ------------------
  688|  1.74k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.74k|#  define UNUSED_P(p) (void)p
  ------------------
  689|  1.74k|  switch (tok) {
  ------------------
  |  Branch (689:11): [True: 1, False: 1.74k]
  ------------------
  690|    688|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    688|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (690:3): [True: 688, False: 1.05k]
  ------------------
  691|    688|    return XML_ROLE_NOTATION_NONE;
  692|    254|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    254|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (692:3): [True: 254, False: 1.49k]
  ------------------
  693|    254|    state->handler = declClose;
  694|    254|    state->role_none = XML_ROLE_NOTATION_NONE;
  695|    254|    return XML_ROLE_NOTATION_SYSTEM_ID;
  696|    804|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|    804|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (696:3): [True: 804, False: 943]
  ------------------
  697|    804|    setTopLevel(state);
  ------------------
  |  |  116|    804|    ((state)->handler                                                          \
  |  |  117|    804|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 804, False: 0]
  |  |  ------------------
  ------------------
  698|    804|    return XML_ROLE_NOTATION_NO_SYSTEM_ID;
  699|  1.74k|  }
  700|      1|  return common(state, tok);
  701|  1.74k|}
xmlrole.c:doctype5:
  319|  2.29k|         const ENCODING *enc) {
  320|  2.29k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.29k|#  define UNUSED_P(p) (void)p
  ------------------
  321|  2.29k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.29k|#  define UNUSED_P(p) (void)p
  ------------------
  322|  2.29k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.29k|#  define UNUSED_P(p) (void)p
  ------------------
  323|  2.29k|  switch (tok) {
  ------------------
  |  Branch (323:11): [True: 9, False: 2.28k]
  ------------------
  324|     33|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|     33|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (324:3): [True: 33, False: 2.26k]
  ------------------
  325|     33|    return XML_ROLE_DOCTYPE_NONE;
  326|  2.25k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  2.25k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (326:3): [True: 2.25k, False: 42]
  ------------------
  327|  2.25k|    state->handler = prolog2;
  328|  2.25k|    return XML_ROLE_DOCTYPE_CLOSE;
  329|  2.29k|  }
  330|      9|  return common(state, tok);
  331|  2.29k|}
xmlrole.c:prolog2:
  205|  3.58k|        const ENCODING *enc) {
  206|  3.58k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.58k|#  define UNUSED_P(p) (void)p
  ------------------
  207|  3.58k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.58k|#  define UNUSED_P(p) (void)p
  ------------------
  208|  3.58k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.58k|#  define UNUSED_P(p) (void)p
  ------------------
  209|  3.58k|  switch (tok) {
  ------------------
  |  Branch (209:11): [True: 17, False: 3.56k]
  ------------------
  210|    523|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    523|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (210:3): [True: 523, False: 3.06k]
  ------------------
  211|    523|    return XML_ROLE_NONE;
  212|    549|  case XML_TOK_PI:
  ------------------
  |  |   76|    549|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (212:3): [True: 549, False: 3.03k]
  ------------------
  213|    549|    return XML_ROLE_PI;
  214|    231|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    231|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (214:3): [True: 231, False: 3.35k]
  ------------------
  215|    231|    return XML_ROLE_COMMENT;
  216|  2.26k|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|  2.26k|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (216:3): [True: 2.26k, False: 1.32k]
  ------------------
  217|  2.26k|    state->handler = error;
  218|  2.26k|    return XML_ROLE_INSTANCE_START;
  219|  3.58k|  }
  220|     17|  return common(state, tok);
  221|  3.58k|}
xmlrole.c:doctype3:
  284|    812|         const ENCODING *enc) {
  285|    812|  UNUSED_P(ptr);
  ------------------
  |  |  135|    812|#  define UNUSED_P(p) (void)p
  ------------------
  286|    812|  UNUSED_P(end);
  ------------------
  |  |  135|    812|#  define UNUSED_P(p) (void)p
  ------------------
  287|    812|  UNUSED_P(enc);
  ------------------
  |  |  135|    812|#  define UNUSED_P(p) (void)p
  ------------------
  288|    812|  switch (tok) {
  ------------------
  |  Branch (288:11): [True: 93, False: 719]
  ------------------
  289|    503|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    503|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (289:3): [True: 503, False: 309]
  ------------------
  290|    503|    return XML_ROLE_DOCTYPE_NONE;
  291|    216|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    216|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (291:3): [True: 216, False: 596]
  ------------------
  292|    216|    state->handler = doctype4;
  293|    216|    return XML_ROLE_DOCTYPE_SYSTEM_ID;
  294|    812|  }
  295|     93|  return common(state, tok);
  296|    812|}
xmlrole.c:doctype4:
  300|    224|         const ENCODING *enc) {
  301|    224|  UNUSED_P(ptr);
  ------------------
  |  |  135|    224|#  define UNUSED_P(p) (void)p
  ------------------
  302|    224|  UNUSED_P(end);
  ------------------
  |  |  135|    224|#  define UNUSED_P(p) (void)p
  ------------------
  303|    224|  UNUSED_P(enc);
  ------------------
  |  |  135|    224|#  define UNUSED_P(p) (void)p
  ------------------
  304|    224|  switch (tok) {
  ------------------
  |  Branch (304:11): [True: 9, False: 215]
  ------------------
  305|     21|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|     21|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (305:3): [True: 21, False: 203]
  ------------------
  306|     21|    return XML_ROLE_DOCTYPE_NONE;
  307|    173|  case XML_TOK_OPEN_BRACKET:
  ------------------
  |  |   92|    173|#define XML_TOK_OPEN_BRACKET 25
  ------------------
  |  Branch (307:3): [True: 173, False: 51]
  ------------------
  308|    173|    state->handler = internalSubset;
  309|    173|    return XML_ROLE_DOCTYPE_INTERNAL_SUBSET;
  310|     21|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|     21|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (310:3): [True: 21, False: 203]
  ------------------
  311|     21|    state->handler = prolog2;
  312|     21|    return XML_ROLE_DOCTYPE_CLOSE;
  313|    224|  }
  314|      9|  return common(state, tok);
  315|    224|}
xmlrole.c:doctype2:
  268|  1.74k|         const ENCODING *enc) {
  269|  1.74k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.74k|#  define UNUSED_P(p) (void)p
  ------------------
  270|  1.74k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.74k|#  define UNUSED_P(p) (void)p
  ------------------
  271|  1.74k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.74k|#  define UNUSED_P(p) (void)p
  ------------------
  272|  1.74k|  switch (tok) {
  ------------------
  |  Branch (272:11): [True: 9, False: 1.73k]
  ------------------
  273|    873|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    873|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (273:3): [True: 873, False: 868]
  ------------------
  274|    873|    return XML_ROLE_DOCTYPE_NONE;
  275|    859|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    859|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (275:3): [True: 859, False: 882]
  ------------------
  276|    859|    state->handler = doctype3;
  277|    859|    return XML_ROLE_DOCTYPE_PUBLIC_ID;
  278|  1.74k|  }
  279|      9|  return common(state, tok);
  280|  1.74k|}
xmlrole.c:common:
 1225|  1.22k|common(PROLOG_STATE *state, int tok) {
 1226|  1.22k|#ifdef XML_DTD
 1227|  1.22k|  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.22k]
  |  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.22k|  state->handler = error;
 1233|  1.22k|  return XML_ROLE_ERROR;
 1234|  1.22k|}

_INTERNAL_trim_to_complete_utf8_characters:
  327|  15.3M|                                           const char **fromLimRef) {
  328|  15.3M|  const char *fromLim = *fromLimRef;
  329|  15.3M|  size_t walked = 0;
  330|  21.1M|  for (; fromLim > from; fromLim--, walked++) {
  ------------------
  |  Branch (330:10): [True: 21.0M, False: 2.87k]
  ------------------
  331|  21.0M|    const unsigned char prev = (unsigned char)fromLim[-1];
  332|  21.0M|    if ((prev & 0xf8u)
  ------------------
  |  Branch (332:9): [True: 158k, False: 20.9M]
  ------------------
  333|  21.0M|        == 0xf0u) { /* 4-byte character, lead by 0b11110xxx byte */
  334|   158k|      if (walked + 1 >= 4) {
  ------------------
  |  Branch (334:11): [True: 158k, False: 252]
  ------------------
  335|   158k|        fromLim += 4 - 1;
  336|   158k|        break;
  337|   158k|      } else {
  338|    252|        walked = 0;
  339|    252|      }
  340|  20.9M|    } else if ((prev & 0xf0u)
  ------------------
  |  Branch (340:16): [True: 590k, False: 20.3M]
  ------------------
  341|  20.9M|               == 0xe0u) { /* 3-byte character, lead by 0b1110xxxx byte */
  342|   590k|      if (walked + 1 >= 3) {
  ------------------
  |  Branch (342:11): [True: 589k, False: 729]
  ------------------
  343|   589k|        fromLim += 3 - 1;
  344|   589k|        break;
  345|   589k|      } else {
  346|    729|        walked = 0;
  347|    729|      }
  348|  20.3M|    } else if ((prev & 0xe0u)
  ------------------
  |  Branch (348:16): [True: 4.05M, False: 16.2M]
  ------------------
  349|  20.3M|               == 0xc0u) { /* 2-byte character, lead by 0b110xxxxx byte */
  350|  4.05M|      if (walked + 1 >= 2) {
  ------------------
  |  Branch (350:11): [True: 4.05M, False: 2.47k]
  ------------------
  351|  4.05M|        fromLim += 2 - 1;
  352|  4.05M|        break;
  353|  4.05M|      } else {
  354|  2.47k|        walked = 0;
  355|  2.47k|      }
  356|  16.2M|    } else if ((prev & 0x80u)
  ------------------
  |  Branch (356:16): [True: 10.5M, False: 5.70M]
  ------------------
  357|  16.2M|               == 0x00u) { /* 1-byte character, matching 0b0xxxxxxx */
  358|  10.5M|      break;
  359|  10.5M|    }
  360|  21.0M|  }
  361|  15.3M|  *fromLimRef = fromLim;
  362|  15.3M|}
XmlUtf8Encode:
 1255|  58.8k|XmlUtf8Encode(int c, char *buf) {
 1256|  58.8k|  enum {
 1257|       |    /* minN is minimum legal resulting value for N byte sequence */
 1258|  58.8k|    min2 = 0x80,
 1259|  58.8k|    min3 = 0x800,
 1260|  58.8k|    min4 = 0x10000
 1261|  58.8k|  };
 1262|       |
 1263|  58.8k|  if (c < 0)
  ------------------
  |  Branch (1263:7): [True: 0, False: 58.8k]
  ------------------
 1264|      0|    return 0; /* LCOV_EXCL_LINE: this case is always eliminated beforehand */
 1265|  58.8k|  if (c < min2) {
  ------------------
  |  Branch (1265:7): [True: 8.94k, False: 49.9k]
  ------------------
 1266|  8.94k|    buf[0] = (char)(c | UTF8_cval1);
 1267|  8.94k|    return 1;
 1268|  8.94k|  }
 1269|  49.9k|  if (c < min3) {
  ------------------
  |  Branch (1269:7): [True: 6.18k, False: 43.7k]
  ------------------
 1270|  6.18k|    buf[0] = (char)((c >> 6) | UTF8_cval2);
 1271|  6.18k|    buf[1] = (char)((c & 0x3f) | 0x80);
 1272|  6.18k|    return 2;
 1273|  6.18k|  }
 1274|  43.7k|  if (c < min4) {
  ------------------
  |  Branch (1274:7): [True: 26.5k, False: 17.2k]
  ------------------
 1275|  26.5k|    buf[0] = (char)((c >> 12) | UTF8_cval3);
 1276|  26.5k|    buf[1] = (char)(((c >> 6) & 0x3f) | 0x80);
 1277|  26.5k|    buf[2] = (char)((c & 0x3f) | 0x80);
 1278|  26.5k|    return 3;
 1279|  26.5k|  }
 1280|  17.2k|  if (c < 0x110000) {
  ------------------
  |  Branch (1280:7): [True: 17.2k, False: 0]
  ------------------
 1281|  17.2k|    buf[0] = (char)((c >> 18) | UTF8_cval4);
 1282|  17.2k|    buf[1] = (char)(((c >> 12) & 0x3f) | 0x80);
 1283|  17.2k|    buf[2] = (char)(((c >> 6) & 0x3f) | 0x80);
 1284|  17.2k|    buf[3] = (char)((c & 0x3f) | 0x80);
 1285|  17.2k|    return 4;
 1286|  17.2k|  }
 1287|      0|  return 0; /* LCOV_EXCL_LINE: this case too is eliminated before calling */
 1288|  17.2k|}
xmltok.c:latin1_toUtf8:
  503|   855k|              char **toP, const char *toLim) {
  504|   855k|  UNUSED_P(enc);
  ------------------
  |  |  135|   855k|#  define UNUSED_P(p) (void)p
  ------------------
  505|  81.2M|  for (;;) {
  506|  81.2M|    unsigned char c;
  507|  81.2M|    if (*fromP == fromLim)
  ------------------
  |  Branch (507:9): [True: 844k, False: 80.4M]
  ------------------
  508|   844k|      return XML_CONVERT_COMPLETED;
  509|  80.4M|    c = (unsigned char)**fromP;
  510|  80.4M|    if (c & 0x80) {
  ------------------
  |  Branch (510:9): [True: 71.1M, False: 9.27M]
  ------------------
  511|  71.1M|      if (toLim - *toP < 2)
  ------------------
  |  Branch (511:11): [True: 4.39k, False: 71.1M]
  ------------------
  512|  4.39k|        return XML_CONVERT_OUTPUT_EXHAUSTED;
  513|  71.1M|      *(*toP)++ = (char)((c >> 6) | UTF8_cval2);
  514|  71.1M|      *(*toP)++ = (char)((c & 0x3f) | 0x80);
  515|  71.1M|      (*fromP)++;
  516|  71.1M|    } else {
  517|  9.27M|      if (*toP == toLim)
  ------------------
  |  Branch (517:11): [True: 6.37k, False: 9.27M]
  ------------------
  518|  6.37k|        return XML_CONVERT_OUTPUT_EXHAUSTED;
  519|  9.27M|      *(*toP)++ = *(*fromP)++;
  520|  9.27M|    }
  521|  80.4M|  }
  522|   855k|}
xmltok.c:checkCharRefNumber:
 1231|  67.3k|checkCharRefNumber(int result) {
 1232|  67.3k|  switch (result >> 8) {
  ------------------
  |  Branch (1232:11): [True: 51.4k, False: 15.9k]
  ------------------
 1233|      3|  case 0xD8:
  ------------------
  |  Branch (1233:3): [True: 3, False: 67.3k]
  ------------------
 1234|      6|  case 0xD9:
  ------------------
  |  Branch (1234:3): [True: 3, False: 67.3k]
  ------------------
 1235|      9|  case 0xDA:
  ------------------
  |  Branch (1235:3): [True: 3, False: 67.3k]
  ------------------
 1236|     12|  case 0xDB:
  ------------------
  |  Branch (1236:3): [True: 3, False: 67.3k]
  ------------------
 1237|     15|  case 0xDC:
  ------------------
  |  Branch (1237:3): [True: 3, False: 67.3k]
  ------------------
 1238|     25|  case 0xDD:
  ------------------
  |  Branch (1238:3): [True: 10, False: 67.3k]
  ------------------
 1239|     28|  case 0xDE:
  ------------------
  |  Branch (1239:3): [True: 3, False: 67.3k]
  ------------------
 1240|     31|  case 0xDF:
  ------------------
  |  Branch (1240:3): [True: 3, False: 67.3k]
  ------------------
 1241|     31|    return -1;
 1242|  14.7k|  case 0:
  ------------------
  |  Branch (1242:3): [True: 14.7k, False: 52.6k]
  ------------------
 1243|  14.7k|    if (latin1_encoding.type[result] == BT_NONXML)
  ------------------
  |  Branch (1243:9): [True: 99, False: 14.6k]
  ------------------
 1244|     99|      return -1;
 1245|  14.6k|    break;
 1246|  14.6k|  case 0xFF:
  ------------------
  |  Branch (1246:3): [True: 1.22k, False: 66.1k]
  ------------------
 1247|  1.22k|    if (result == 0xFFFE || result == 0xFFFF)
  ------------------
  |  Branch (1247:9): [True: 3, False: 1.22k]
  |  Branch (1247:29): [True: 9, False: 1.21k]
  ------------------
 1248|     12|      return -1;
 1249|  1.21k|    break;
 1250|  67.3k|  }
 1251|  67.2k|  return result;
 1252|  67.3k|}
xmltok.c:utf8_toUtf8:
  366|  15.3M|            char **toP, const char *toLim) {
  367|  15.3M|  bool input_incomplete = false;
  368|  15.3M|  bool output_exhausted = false;
  369|       |
  370|       |  /* Avoid copying partial characters (due to limited space). */
  371|  15.3M|  const ptrdiff_t bytesAvailable = fromLim - *fromP;
  372|  15.3M|  const ptrdiff_t bytesStorable = toLim - *toP;
  373|  15.3M|  UNUSED_P(enc);
  ------------------
  |  |  135|  15.3M|#  define UNUSED_P(p) (void)p
  ------------------
  374|  15.3M|  if (bytesAvailable > bytesStorable) {
  ------------------
  |  Branch (374:7): [True: 7.99k, False: 15.3M]
  ------------------
  375|  7.99k|    fromLim = *fromP + bytesStorable;
  376|  7.99k|    output_exhausted = true;
  377|  7.99k|  }
  378|       |
  379|       |  /* Avoid copying partial characters (from incomplete input). */
  380|  15.3M|  {
  381|  15.3M|    const char *const fromLimBefore = fromLim;
  382|  15.3M|    _INTERNAL_trim_to_complete_utf8_characters(*fromP, &fromLim);
  383|  15.3M|    if (fromLim < fromLimBefore) {
  ------------------
  |  Branch (383:9): [True: 3.45k, False: 15.3M]
  ------------------
  384|  3.45k|      input_incomplete = true;
  385|  3.45k|    }
  386|  15.3M|  }
  387|       |
  388|  15.3M|  {
  389|  15.3M|    const ptrdiff_t bytesToCopy = fromLim - *fromP;
  390|  15.3M|    memcpy(*toP, *fromP, bytesToCopy);
  391|  15.3M|    *fromP += bytesToCopy;
  392|  15.3M|    *toP += bytesToCopy;
  393|  15.3M|  }
  394|       |
  395|  15.3M|  if (output_exhausted) /* needs to go first */
  ------------------
  |  Branch (395:7): [True: 7.99k, False: 15.3M]
  ------------------
  396|  7.99k|    return XML_CONVERT_OUTPUT_EXHAUSTED;
  397|  15.3M|  else if (input_incomplete)
  ------------------
  |  Branch (397:12): [True: 0, False: 15.3M]
  ------------------
  398|      0|    return XML_CONVERT_INPUT_INCOMPLETE;
  399|  15.3M|  else
  400|  15.3M|    return XML_CONVERT_COMPLETED;
  401|  15.3M|}
xmltok.c:utf8_isName2:
  140|  2.63M|utf8_isName2(const ENCODING *enc, const char *p) {
  141|  2.63M|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.63M|#  define UNUSED_P(p) (void)p
  ------------------
  142|  2.63M|  return UTF8_GET_NAMING2(namePages, (const unsigned char *)p);
  ------------------
  |  |   86|  2.63M|  (namingBitmap[((pages)[(((byte)[0]) >> 2) & 7] << 3)                         \
  |  |   87|  2.63M|                + ((((byte)[0]) & 3) << 1) + ((((byte)[1]) >> 5) & 1)]         \
  |  |   88|  2.63M|   & (1u << (((byte)[1]) & 0x1F)))
  ------------------
  143|  2.63M|}
xmltok.c:utf8_isName3:
  146|  17.4k|utf8_isName3(const ENCODING *enc, const char *p) {
  147|  17.4k|  UNUSED_P(enc);
  ------------------
  |  |  135|  17.4k|#  define UNUSED_P(p) (void)p
  ------------------
  148|  17.4k|  return UTF8_GET_NAMING3(namePages, (const unsigned char *)p);
  ------------------
  |  |   96|  17.4k|  (namingBitmap                                                                \
  |  |   97|  17.4k|       [((pages)[((((byte)[0]) & 0xF) << 4) + ((((byte)[1]) >> 2) & 0xF)]      \
  |  |   98|  17.4k|         << 3)                                                                 \
  |  |   99|  17.4k|        + ((((byte)[1]) & 3) << 1) + ((((byte)[2]) >> 5) & 1)]                 \
  |  |  100|  17.4k|   & (1u << (((byte)[2]) & 0x1F)))
  ------------------
  149|  17.4k|}
xmltok.c:isNever:
  133|    122|isNever(const ENCODING *enc, const char *p) {
  134|    122|  UNUSED_P(enc);
  ------------------
  |  |  135|    122|#  define UNUSED_P(p) (void)p
  ------------------
  135|    122|  UNUSED_P(p);
  ------------------
  |  |  135|    122|#  define UNUSED_P(p) (void)p
  ------------------
  136|    122|  return 0;
  137|    122|}
xmltok.c:utf8_isNmstrt2:
  154|   153k|utf8_isNmstrt2(const ENCODING *enc, const char *p) {
  155|   153k|  UNUSED_P(enc);
  ------------------
  |  |  135|   153k|#  define UNUSED_P(p) (void)p
  ------------------
  156|   153k|  return UTF8_GET_NAMING2(nmstrtPages, (const unsigned char *)p);
  ------------------
  |  |   86|   153k|  (namingBitmap[((pages)[(((byte)[0]) >> 2) & 7] << 3)                         \
  |  |   87|   153k|                + ((((byte)[0]) & 3) << 1) + ((((byte)[1]) >> 5) & 1)]         \
  |  |   88|   153k|   & (1u << (((byte)[1]) & 0x1F)))
  ------------------
  157|   153k|}
xmltok.c:utf8_isNmstrt3:
  160|  17.0k|utf8_isNmstrt3(const ENCODING *enc, const char *p) {
  161|  17.0k|  UNUSED_P(enc);
  ------------------
  |  |  135|  17.0k|#  define UNUSED_P(p) (void)p
  ------------------
  162|  17.0k|  return UTF8_GET_NAMING3(nmstrtPages, (const unsigned char *)p);
  ------------------
  |  |   96|  17.0k|  (namingBitmap                                                                \
  |  |   97|  17.0k|       [((pages)[((((byte)[0]) & 0xF) << 4) + ((((byte)[1]) >> 2) & 0xF)]      \
  |  |   98|  17.0k|         << 3)                                                                 \
  |  |   99|  17.0k|        + ((((byte)[1]) & 3) << 1) + ((((byte)[2]) >> 5) & 1)]                 \
  |  |  100|  17.0k|   & (1u << (((byte)[2]) & 0x1F)))
  ------------------
  163|  17.0k|}
xmltok.c:utf8_isInvalid2:
  168|  59.9M|utf8_isInvalid2(const ENCODING *enc, const char *p) {
  169|  59.9M|  UNUSED_P(enc);
  ------------------
  |  |  135|  59.9M|#  define UNUSED_P(p) (void)p
  ------------------
  170|  59.9M|  return UTF8_INVALID2((const unsigned char *)p);
  ------------------
  |  |  113|  59.9M|  ((*p) < 0xC2 || ((p)[1] & 0x80) == 0 || ((p)[1] & 0xC0) == 0xC0)
  |  |  ------------------
  |  |  |  Branch (113:4): [True: 11, False: 59.9M]
  |  |  |  Branch (113:19): [True: 61, False: 59.9M]
  |  |  |  Branch (113:43): [True: 42, False: 59.9M]
  |  |  ------------------
  ------------------
  171|  59.9M|}
xmltok.c:utf8_isInvalid3:
  174|  15.7M|utf8_isInvalid3(const ENCODING *enc, const char *p) {
  175|  15.7M|  UNUSED_P(enc);
  ------------------
  |  |  135|  15.7M|#  define UNUSED_P(p) (void)p
  ------------------
  176|  15.7M|  return UTF8_INVALID3((const unsigned char *)p);
  ------------------
  |  |  116|  15.7M|  (((p)[2] & 0x80) == 0                                                        \
  |  |  ------------------
  |  |  |  Branch (116:4): [True: 49, False: 15.7M]
  |  |  ------------------
  |  |  117|  15.7M|   || ((*p) == 0xEF && (p)[1] == 0xBF ? (p)[2] > 0xBD                          \
  |  |  ------------------
  |  |  |  Branch (117:7): [True: 46, False: 15.7M]
  |  |  |  Branch (117:8): [True: 56.8k, False: 15.7M]
  |  |  |  Branch (117:24): [True: 6.22k, False: 50.5k]
  |  |  ------------------
  |  |  118|  15.7M|                                      : ((p)[2] & 0xC0) == 0xC0)               \
  |  |  119|  15.7M|   || ((*p) == 0xE0                                                            \
  |  |  ------------------
  |  |  |  Branch (119:7): [True: 42, False: 15.7M]
  |  |  |  Branch (119:8): [True: 377k, False: 15.4M]
  |  |  ------------------
  |  |  120|  15.7M|           ? (p)[1] < 0xA0 || ((p)[1] & 0xC0) == 0xC0                          \
  |  |  ------------------
  |  |  |  Branch (120:14): [True: 11, False: 377k]
  |  |  |  Branch (120:31): [True: 2, False: 377k]
  |  |  ------------------
  |  |  121|  15.7M|           : ((p)[1] & 0x80) == 0                                              \
  |  |  ------------------
  |  |  |  Branch (121:14): [True: 12, False: 15.4M]
  |  |  ------------------
  |  |  122|  15.4M|                 || ((*p) == 0xED ? (p)[1] > 0x9F : ((p)[1] & 0xC0) == 0xC0)))
  |  |  ------------------
  |  |  |  Branch (122:21): [True: 17, False: 15.4M]
  |  |  |  Branch (122:22): [True: 99.0k, False: 15.3M]
  |  |  ------------------
  ------------------
  177|  15.7M|}
xmltok.c:utf8_isInvalid4:
  180|   792k|utf8_isInvalid4(const ENCODING *enc, const char *p) {
  181|   792k|  UNUSED_P(enc);
  ------------------
  |  |  135|   792k|#  define UNUSED_P(p) (void)p
  ------------------
  182|   792k|  return UTF8_INVALID4((const unsigned char *)p);
  ------------------
  |  |  125|   792k|  (((p)[3] & 0x80) == 0 || ((p)[3] & 0xC0) == 0xC0 || ((p)[2] & 0x80) == 0     \
  |  |  ------------------
  |  |  |  Branch (125:4): [True: 101, False: 792k]
  |  |  |  Branch (125:28): [True: 54, False: 792k]
  |  |  |  Branch (125:55): [True: 7, False: 792k]
  |  |  ------------------
  |  |  126|   792k|   || ((p)[2] & 0xC0) == 0xC0                                                  \
  |  |  ------------------
  |  |  |  Branch (126:7): [True: 5, False: 792k]
  |  |  ------------------
  |  |  127|   792k|   || ((*p) == 0xF0                                                            \
  |  |  ------------------
  |  |  |  Branch (127:7): [True: 39, False: 792k]
  |  |  |  Branch (127:8): [True: 7.66k, False: 784k]
  |  |  ------------------
  |  |  128|   792k|           ? (p)[1] < 0x90 || ((p)[1] & 0xC0) == 0xC0                          \
  |  |  ------------------
  |  |  |  Branch (128:14): [True: 11, False: 7.65k]
  |  |  |  Branch (128:31): [True: 9, False: 7.64k]
  |  |  ------------------
  |  |  129|   792k|           : ((p)[1] & 0x80) == 0                                              \
  |  |  ------------------
  |  |  |  Branch (129:14): [True: 9, False: 784k]
  |  |  ------------------
  |  |  130|   784k|                 || ((*p) == 0xF4 ? (p)[1] > 0x8F : ((p)[1] & 0xC0) == 0xC0)))
  |  |  ------------------
  |  |  |  Branch (130:21): [True: 10, False: 784k]
  |  |  |  Branch (130:22): [True: 37.2k, False: 747k]
  |  |  ------------------
  ------------------
  183|   792k|}
xmltok.c:unicode_byte_type:
  595|  58.4M|unicode_byte_type(char hi, char lo) {
  596|  58.4M|  switch ((unsigned char)hi) {
  ------------------
  |  Branch (596:11): [True: 55.4M, False: 2.99M]
  ------------------
  597|       |  /* 0xD800-0xDBFF first 16-bit code unit or high surrogate (W1) */
  598|   481k|  case 0xD8:
  ------------------
  |  Branch (598:3): [True: 481k, False: 57.9M]
  ------------------
  599|   753k|  case 0xD9:
  ------------------
  |  Branch (599:3): [True: 271k, False: 58.2M]
  ------------------
  600|  2.00M|  case 0xDA:
  ------------------
  |  Branch (600:3): [True: 1.25M, False: 57.2M]
  ------------------
  601|  2.72M|  case 0xDB:
  ------------------
  |  Branch (601:3): [True: 714k, False: 57.7M]
  ------------------
  602|  2.72M|    return BT_LEAD4;
  603|       |  /* 0xDC00-0xDFFF second 16-bit code unit or low surrogate (W2) */
  604|    113|  case 0xDC:
  ------------------
  |  Branch (604:3): [True: 113, False: 58.4M]
  ------------------
  605|    214|  case 0xDD:
  ------------------
  |  Branch (605:3): [True: 101, False: 58.4M]
  ------------------
  606|    307|  case 0xDE:
  ------------------
  |  Branch (606:3): [True: 93, False: 58.4M]
  ------------------
  607|    414|  case 0xDF:
  ------------------
  |  Branch (607:3): [True: 107, False: 58.4M]
  ------------------
  608|    414|    return BT_TRAIL;
  609|   273k|  case 0xFF:
  ------------------
  |  Branch (609:3): [True: 273k, False: 58.2M]
  ------------------
  610|   273k|    switch ((unsigned char)lo) {
  ------------------
  |  Branch (610:13): [True: 272k, False: 279]
  ------------------
  611|    264|    case 0xFF: /* noncharacter-FFFF */
  ------------------
  |  Branch (611:5): [True: 264, False: 272k]
  ------------------
  612|    279|    case 0xFE: /* noncharacter-FFFE */
  ------------------
  |  Branch (612:5): [True: 15, False: 273k]
  ------------------
  613|    279|      return BT_NONXML;
  614|   273k|    }
  615|   272k|    break;
  616|  58.4M|  }
  617|  55.7M|  return BT_NONASCII;
  618|  58.4M|}
xmltok.c:little2_toUtf8:
  623|  72.8k|      char **toP, const char *toLim) {                                         \
  624|  72.8k|    const char *from = *fromP;                                                 \
  625|  72.8k|    UNUSED_P(enc);                                                             \
  ------------------
  |  |  135|  72.8k|#  define UNUSED_P(p) (void)p
  ------------------
  626|  72.8k|    fromLim = from + (((fromLim - from) >> 1) << 1); /* shrink to even */      \
  627|  3.79M|    for (; from < fromLim; from += 2) {                                        \
  ------------------
  |  Branch (627:12): [True: 3.72M, False: 71.5k]
  ------------------
  628|  3.72M|      int plane;                                                               \
  629|  3.72M|      unsigned char lo2;                                                       \
  630|  3.72M|      unsigned char lo = GET_LO(from);                                         \
  ------------------
  |  |  718|  3.72M|#define GET_LO(ptr) ((unsigned char)(ptr)[0])
  ------------------
  631|  3.72M|      unsigned char hi = GET_HI(from);                                         \
  ------------------
  |  |  719|  3.72M|#define GET_HI(ptr) ((unsigned char)(ptr)[1])
  ------------------
  632|  3.72M|      switch (hi) {                                                            \
  633|   181k|      case 0:                                                                  \
  ------------------
  |  Branch (633:7): [True: 181k, False: 3.53M]
  ------------------
  634|   181k|        if (lo < 0x80) {                                                       \
  ------------------
  |  Branch (634:13): [True: 160k, False: 21.4k]
  ------------------
  635|   160k|          if (*toP == toLim) {                                                 \
  ------------------
  |  Branch (635:15): [True: 350, False: 159k]
  ------------------
  636|    350|            *fromP = from;                                                     \
  637|    350|            return XML_CONVERT_OUTPUT_EXHAUSTED;                               \
  638|    350|          }                                                                    \
  639|   160k|          *(*toP)++ = lo;                                                      \
  640|   159k|          break;                                                               \
  641|   160k|        }                                                                      \
  642|   181k|        /* fall through */                                                     \
  643|   181k|      case 0x1:                                                                \
  ------------------
  |  Branch (643:7): [True: 2.58k, False: 3.71M]
  ------------------
  644|  25.2k|      case 0x2:                                                                \
  ------------------
  |  Branch (644:7): [True: 1.30k, False: 3.71M]
  ------------------
  645|  26.2k|      case 0x3:                                                                \
  ------------------
  |  Branch (645:7): [True: 951, False: 3.72M]
  ------------------
  646|  29.0k|      case 0x4:                                                                \
  ------------------
  |  Branch (646:7): [True: 2.82k, False: 3.71M]
  ------------------
  647|  30.2k|      case 0x5:                                                                \
  ------------------
  |  Branch (647:7): [True: 1.14k, False: 3.71M]
  ------------------
  648|  31.3k|      case 0x6:                                                                \
  ------------------
  |  Branch (648:7): [True: 1.10k, False: 3.72M]
  ------------------
  649|  37.7k|      case 0x7:                                                                \
  ------------------
  |  Branch (649:7): [True: 6.37k, False: 3.71M]
  ------------------
  650|  37.7k|        if (toLim - *toP < 2) {                                                \
  ------------------
  |  Branch (650:13): [True: 252, False: 37.4k]
  ------------------
  651|    252|          *fromP = from;                                                       \
  652|    252|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  653|    252|        }                                                                      \
  654|  37.7k|        *(*toP)++ = ((lo >> 6) | (hi << 2) | UTF8_cval2);                      \
  655|  37.4k|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  656|  37.4k|        break;                                                                 \
  657|  3.45M|      default:                                                                 \
  ------------------
  |  Branch (657:7): [True: 3.45M, False: 269k]
  ------------------
  658|  3.45M|        if (toLim - *toP < 3) {                                                \
  ------------------
  |  Branch (658:13): [True: 626, False: 3.45M]
  ------------------
  659|    626|          *fromP = from;                                                       \
  660|    626|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  661|    626|        }                                                                      \
  662|  3.45M|        /* 16 bits divided 4, 6, 6 amongst 3 bytes */                          \
  663|  3.45M|        *(*toP)++ = ((hi >> 4) | UTF8_cval3);                                  \
  664|  3.45M|        *(*toP)++ = (((hi & 0xf) << 2) | (lo >> 6) | 0x80);                    \
  665|  3.45M|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  666|  3.45M|        break;                                                                 \
  667|  3.45M|      case 0xD8:                                                               \
  ------------------
  |  Branch (667:7): [True: 7.80k, False: 3.71M]
  ------------------
  668|  17.9k|      case 0xD9:                                                               \
  ------------------
  |  Branch (668:7): [True: 10.1k, False: 3.71M]
  ------------------
  669|  43.2k|      case 0xDA:                                                               \
  ------------------
  |  Branch (669:7): [True: 25.3k, False: 3.69M]
  ------------------
  670|  71.5k|      case 0xDB:                                                               \
  ------------------
  |  Branch (670:7): [True: 28.2k, False: 3.69M]
  ------------------
  671|  71.5k|        if (toLim - *toP < 4) {                                                \
  ------------------
  |  Branch (671:13): [True: 101, False: 71.4k]
  ------------------
  672|    101|          *fromP = from;                                                       \
  673|    101|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  674|    101|        }                                                                      \
  675|  71.5k|        if (fromLim - from < 4) {                                              \
  ------------------
  |  Branch (675:13): [True: 0, False: 71.4k]
  ------------------
  676|      0|          *fromP = from;                                                       \
  677|      0|          return XML_CONVERT_INPUT_INCOMPLETE;                                 \
  678|      0|        }                                                                      \
  679|  71.4k|        plane = (((hi & 0x3) << 2) | ((lo >> 6) & 0x3)) + 1;                   \
  680|  71.4k|        *(*toP)++ = (char)((plane >> 2) | UTF8_cval4);                         \
  681|  71.4k|        *(*toP)++ = (((lo >> 2) & 0xF) | ((plane & 0x3) << 4) | 0x80);         \
  682|  71.4k|        from += 2;                                                             \
  683|  71.4k|        lo2 = GET_LO(from);                                                    \
  ------------------
  |  |  718|  71.4k|#define GET_LO(ptr) ((unsigned char)(ptr)[0])
  ------------------
  684|  71.4k|        *(*toP)++ = (((lo & 0x3) << 4) | ((GET_HI(from) & 0x3) << 2)           \
  ------------------
  |  |  719|  71.4k|#define GET_HI(ptr) ((unsigned char)(ptr)[1])
  ------------------
  685|  71.4k|                     | (lo2 >> 6) | 0x80);                                     \
  686|  71.4k|        *(*toP)++ = ((lo2 & 0x3f) | 0x80);                                     \
  687|  71.4k|        break;                                                                 \
  688|  3.72M|      }                                                                        \
  689|  3.72M|    }                                                                          \
  690|  72.8k|    *fromP = from;                                                             \
  691|  71.5k|    if (from < fromLim)                                                        \
  ------------------
  |  Branch (691:9): [True: 0, False: 71.5k]
  ------------------
  692|  71.5k|      return XML_CONVERT_INPUT_INCOMPLETE;                                     \
  693|  71.5k|    else                                                                       \
  694|  71.5k|      return XML_CONVERT_COMPLETED;                                            \
  695|  71.5k|  }
xmltok.c:getEncodingIndex:
 1502|  37.3k|getEncodingIndex(const char *name) {
 1503|  37.3k|  static const char *const encodingNames[] = {
 1504|  37.3k|      KW_ISO_8859_1, KW_US_ASCII, KW_UTF_8, KW_UTF_16, KW_UTF_16BE, KW_UTF_16LE,
 1505|  37.3k|  };
 1506|  37.3k|  int i;
 1507|  37.3k|  if (name == NULL)
  ------------------
  |  Branch (1507:7): [True: 18.6k, False: 18.7k]
  ------------------
 1508|  18.6k|    return NO_ENC;
 1509|  18.9k|  for (i = 0; i < (int)(sizeof(encodingNames) / sizeof(encodingNames[0])); i++)
  ------------------
  |  Branch (1509:15): [True: 18.9k, False: 41]
  ------------------
 1510|  18.9k|    if (streqci(name, encodingNames[i]))
  ------------------
  |  Branch (1510:9): [True: 18.6k, False: 259]
  ------------------
 1511|  18.6k|      return i;
 1512|     41|  return UNKNOWN_ENC;
 1513|  18.7k|}
xmltok.c:streqci:
 1005|  18.9k|streqci(const char *s1, const char *s2) {
 1006|   205k|  for (;;) {
 1007|   205k|    char c1 = *s1++;
 1008|   205k|    char c2 = *s2++;
 1009|   205k|    if (ASCII_a <= c1 && c1 <= ASCII_z)
  ------------------
  |  |   63|   205k|#define ASCII_a 0x61
  ------------------
                  if (ASCII_a <= c1 && c1 <= ASCII_z)
  ------------------
  |  |   88|    220|#define ASCII_z 0x7A
  ------------------
  |  Branch (1009:9): [True: 220, False: 205k]
  |  Branch (1009:26): [True: 220, False: 0]
  ------------------
 1010|    220|      c1 += ASCII_A - ASCII_a;
  ------------------
  |  |   36|    220|#define ASCII_A 0x41
  ------------------
                    c1 += ASCII_A - ASCII_a;
  ------------------
  |  |   63|    220|#define ASCII_a 0x61
  ------------------
 1011|   205k|    if (ASCII_a <= c2 && c2 <= ASCII_z)
  ------------------
  |  |   63|   205k|#define ASCII_a 0x61
  ------------------
                  if (ASCII_a <= c2 && c2 <= ASCII_z)
  ------------------
  |  |   88|      0|#define ASCII_z 0x7A
  ------------------
  |  Branch (1011:9): [True: 0, False: 205k]
  |  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|   205k|    if (c1 != c2)
  ------------------
  |  Branch (1017:9): [True: 305, False: 205k]
  ------------------
 1018|    305|      return 0;
 1019|   205k|    if (! c1)
  ------------------
  |  Branch (1019:9): [True: 18.6k, False: 186k]
  ------------------
 1020|  18.6k|      break;
 1021|   205k|  }
 1022|  18.6k|  return 1;
 1023|  18.9k|}
xmltok.c:initScan:
 1531|  18.6k|         int state, const char *ptr, const char *end, const char **nextTokPtr) {
 1532|  18.6k|  const ENCODING **encPtr;
 1533|       |
 1534|  18.6k|  if (ptr >= end)
  ------------------
  |  Branch (1534:7): [True: 0, False: 18.6k]
  ------------------
 1535|      0|    return XML_TOK_NONE;
  ------------------
  |  |   51|      0|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1536|  18.6k|  encPtr = enc->encPtr;
 1537|  18.6k|  if (ptr + 1 == end) {
  ------------------
  |  Branch (1537:7): [True: 34, False: 18.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|     34|    switch (INIT_ENC_INDEX(enc)) {
  ------------------
  |  | 1519|     34|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  |  |  ------------------
  |  |  |  Branch (1519:29): [True: 34, False: 0]
  |  |  ------------------
  ------------------
 1547|      0|    case UTF_16_ENC:
  ------------------
  |  Branch (1547:5): [True: 0, False: 34]
  ------------------
 1548|      0|    case UTF_16LE_ENC:
  ------------------
  |  Branch (1548:5): [True: 0, False: 34]
  ------------------
 1549|      0|    case UTF_16BE_ENC:
  ------------------
  |  Branch (1549:5): [True: 0, False: 34]
  ------------------
 1550|      0|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1551|     34|    }
 1552|     34|    switch ((unsigned char)*ptr) {
  ------------------
  |  Branch (1552:13): [True: 29, False: 5]
  ------------------
 1553|      1|    case 0xFE:
  ------------------
  |  Branch (1553:5): [True: 1, False: 33]
  ------------------
 1554|      2|    case 0xFF:
  ------------------
  |  Branch (1554:5): [True: 1, False: 33]
  ------------------
 1555|      3|    case 0xEF: /* possibly first byte of UTF-8 BOM */
  ------------------
  |  Branch (1555:5): [True: 1, False: 33]
  ------------------
 1556|      3|      if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  | 1519|      3|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
                    if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  |  131|      3|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1556:11): [True: 3, False: 0]
  |  Branch (1556:52): [True: 0, False: 3]
  ------------------
 1557|      0|        break;
 1558|       |      /* fall through */
 1559|      4|    case 0x00:
  ------------------
  |  Branch (1559:5): [True: 1, False: 33]
  ------------------
 1560|      5|    case 0x3C:
  ------------------
  |  Branch (1560:5): [True: 1, False: 33]
  ------------------
 1561|      5|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1562|     34|    }
 1563|  18.6k|  } else {
 1564|  18.6k|    switch (((unsigned char)ptr[0] << 8) | (unsigned char)ptr[1]) {
 1565|      7|    case 0xFEFF:
  ------------------
  |  Branch (1565:5): [True: 7, False: 18.6k]
  ------------------
 1566|      7|      if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  | 1519|      7|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
                    if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  |  131|      7|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1566:11): [True: 7, False: 0]
  |  Branch (1566:52): [True: 0, False: 7]
  ------------------
 1567|      0|        break;
 1568|      7|      *nextTokPtr = ptr + 2;
 1569|      7|      *encPtr = encodingTable[UTF_16BE_ENC];
 1570|      7|      return XML_TOK_BOM;
  ------------------
  |  |   79|      7|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1571|       |    /* 00 3C is handled in the default case */
 1572|  4.45k|    case 0x3C00:
  ------------------
  |  Branch (1572:5): [True: 4.45k, False: 14.1k]
  ------------------
 1573|  4.45k|      if ((INIT_ENC_INDEX(enc) == UTF_16BE_ENC
  ------------------
  |  | 1519|  4.45k|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
  |  Branch (1573:12): [True: 0, False: 4.45k]
  ------------------
 1574|  4.45k|           || INIT_ENC_INDEX(enc) == UTF_16_ENC)
  ------------------
  |  | 1519|  4.45k|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
  |  Branch (1574:15): [True: 0, False: 4.45k]
  ------------------
 1575|  4.45k|          && state == XML_CONTENT_STATE)
  ------------------
  |  |  131|      0|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1575:14): [True: 0, False: 0]
  ------------------
 1576|      0|        break;
 1577|  4.45k|      *encPtr = encodingTable[UTF_16LE_ENC];
 1578|  4.45k|      return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|  4.45k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1579|      3|    case 0xFFFE:
  ------------------
  |  Branch (1579:5): [True: 3, False: 18.6k]
  ------------------
 1580|      3|      if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  | 1519|      3|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
                    if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  |  131|      3|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1580:11): [True: 3, False: 0]
  |  Branch (1580:52): [True: 0, False: 3]
  ------------------
 1581|      0|        break;
 1582|      3|      *nextTokPtr = ptr + 2;
 1583|      3|      *encPtr = encodingTable[UTF_16LE_ENC];
 1584|      3|      return XML_TOK_BOM;
  ------------------
  |  |   79|      3|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1585|  1.34k|    case 0xEFBB:
  ------------------
  |  Branch (1585:5): [True: 1.34k, False: 17.2k]
  ------------------
 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|  1.34k|      if (state == XML_CONTENT_STATE) {
  ------------------
  |  |  131|  1.34k|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1593:11): [True: 0, False: 1.34k]
  ------------------
 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|  1.34k|      if (ptr + 2 == end)
  ------------------
  |  Branch (1599:11): [True: 1, False: 1.34k]
  ------------------
 1600|      1|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1601|  1.34k|      if ((unsigned char)ptr[2] == 0xBF) {
  ------------------
  |  Branch (1601:11): [True: 1.33k, False: 10]
  ------------------
 1602|  1.33k|        *nextTokPtr = ptr + 3;
 1603|  1.33k|        *encPtr = encodingTable[UTF_8_ENC];
 1604|  1.33k|        return XML_TOK_BOM;
  ------------------
  |  |   79|  1.33k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1605|  1.33k|      }
 1606|     10|      break;
 1607|  12.8k|    default:
  ------------------
  |  Branch (1607:5): [True: 12.8k, False: 5.80k]
  ------------------
 1608|  12.8k|      if (ptr[0] == '\0') {
  ------------------
  |  Branch (1608:11): [True: 5.54k, False: 7.27k]
  ------------------
 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.54k|        if (state == XML_CONTENT_STATE && INIT_ENC_INDEX(enc) == UTF_16LE_ENC)
  ------------------
  |  |  131|  11.0k|#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.54k]
  |  Branch (1615:43): [True: 0, False: 0]
  ------------------
 1616|      0|          break;
 1617|  5.54k|        *encPtr = encodingTable[UTF_16BE_ENC];
 1618|  5.54k|        return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|  5.54k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1619|  7.27k|      } else if (ptr[1] == '\0') {
  ------------------
  |  Branch (1619:18): [True: 903, False: 6.36k]
  ------------------
 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|    903|        if (state == XML_CONTENT_STATE)
  ------------------
  |  |  131|    903|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1629:13): [True: 0, False: 903]
  ------------------
 1630|      0|          break;
 1631|    903|        *encPtr = encodingTable[UTF_16LE_ENC];
 1632|    903|        return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|    903|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1633|    903|      }
 1634|  6.36k|      break;
 1635|  18.6k|    }
 1636|  18.6k|  }
 1637|  6.40k|  *encPtr = encodingTable[INIT_ENC_INDEX(enc)];
  ------------------
  |  | 1519|  6.40k|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
 1638|  6.40k|  return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|  6.40k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1639|  18.6k|}
xmltok.c:big2_toUtf8:
  623|   173k|      char **toP, const char *toLim) {                                         \
  624|   173k|    const char *from = *fromP;                                                 \
  625|   173k|    UNUSED_P(enc);                                                             \
  ------------------
  |  |  135|   173k|#  define UNUSED_P(p) (void)p
  ------------------
  626|   173k|    fromLim = from + (((fromLim - from) >> 1) << 1); /* shrink to even */      \
  627|  14.9M|    for (; from < fromLim; from += 2) {                                        \
  ------------------
  |  Branch (627:12): [True: 14.8M, False: 170k]
  ------------------
  628|  14.8M|      int plane;                                                               \
  629|  14.8M|      unsigned char lo2;                                                       \
  630|  14.8M|      unsigned char lo = GET_LO(from);                                         \
  ------------------
  |  |  727|  14.8M|#define GET_LO(ptr) ((unsigned char)(ptr)[1])
  ------------------
  631|  14.8M|      unsigned char hi = GET_HI(from);                                         \
  ------------------
  |  |  728|  14.8M|#define GET_HI(ptr) ((unsigned char)(ptr)[0])
  ------------------
  632|  14.8M|      switch (hi) {                                                            \
  633|   709k|      case 0:                                                                  \
  ------------------
  |  Branch (633:7): [True: 709k, False: 14.1M]
  ------------------
  634|   709k|        if (lo < 0x80) {                                                       \
  ------------------
  |  Branch (634:13): [True: 616k, False: 93.1k]
  ------------------
  635|   616k|          if (*toP == toLim) {                                                 \
  ------------------
  |  Branch (635:15): [True: 315, False: 616k]
  ------------------
  636|    315|            *fromP = from;                                                     \
  637|    315|            return XML_CONVERT_OUTPUT_EXHAUSTED;                               \
  638|    315|          }                                                                    \
  639|   616k|          *(*toP)++ = lo;                                                      \
  640|   616k|          break;                                                               \
  641|   616k|        }                                                                      \
  642|   709k|        /* fall through */                                                     \
  643|   709k|      case 0x1:                                                                \
  ------------------
  |  Branch (643:7): [True: 8.52k, False: 14.8M]
  ------------------
  644|   110k|      case 0x2:                                                                \
  ------------------
  |  Branch (644:7): [True: 8.44k, False: 14.8M]
  ------------------
  645|   120k|      case 0x3:                                                                \
  ------------------
  |  Branch (645:7): [True: 10.1k, False: 14.8M]
  ------------------
  646|   154k|      case 0x4:                                                                \
  ------------------
  |  Branch (646:7): [True: 34.5k, False: 14.7M]
  ------------------
  647|   158k|      case 0x5:                                                                \
  ------------------
  |  Branch (647:7): [True: 3.26k, False: 14.8M]
  ------------------
  648|   161k|      case 0x6:                                                                \
  ------------------
  |  Branch (648:7): [True: 3.13k, False: 14.8M]
  ------------------
  649|   191k|      case 0x7:                                                                \
  ------------------
  |  Branch (649:7): [True: 29.9k, False: 14.7M]
  ------------------
  650|   191k|        if (toLim - *toP < 2) {                                                \
  ------------------
  |  Branch (650:13): [True: 248, False: 191k]
  ------------------
  651|    248|          *fromP = from;                                                       \
  652|    248|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  653|    248|        }                                                                      \
  654|   191k|        *(*toP)++ = ((lo >> 6) | (hi << 2) | UTF8_cval2);                      \
  655|   191k|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  656|   191k|        break;                                                                 \
  657|  13.0M|      default:                                                                 \
  ------------------
  |  Branch (657:7): [True: 13.0M, False: 1.76M]
  ------------------
  658|  13.0M|        if (toLim - *toP < 3) {                                                \
  ------------------
  |  Branch (658:13): [True: 1.77k, False: 13.0M]
  ------------------
  659|  1.77k|          *fromP = from;                                                       \
  660|  1.77k|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  661|  1.77k|        }                                                                      \
  662|  13.0M|        /* 16 bits divided 4, 6, 6 amongst 3 bytes */                          \
  663|  13.0M|        *(*toP)++ = ((hi >> 4) | UTF8_cval3);                                  \
  664|  13.0M|        *(*toP)++ = (((hi & 0xf) << 2) | (lo >> 6) | 0x80);                    \
  665|  13.0M|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  666|  13.0M|        break;                                                                 \
  667|  13.0M|      case 0xD8:                                                               \
  ------------------
  |  Branch (667:7): [True: 179k, False: 14.6M]
  ------------------
  668|   254k|      case 0xD9:                                                               \
  ------------------
  |  Branch (668:7): [True: 75.3k, False: 14.7M]
  ------------------
  669|   738k|      case 0xDA:                                                               \
  ------------------
  |  Branch (669:7): [True: 484k, False: 14.3M]
  ------------------
  670|   957k|      case 0xDB:                                                               \
  ------------------
  |  Branch (670:7): [True: 218k, False: 14.5M]
  ------------------
  671|   957k|        if (toLim - *toP < 4) {                                                \
  ------------------
  |  Branch (671:13): [True: 332, False: 956k]
  ------------------
  672|    332|          *fromP = from;                                                       \
  673|    332|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  674|    332|        }                                                                      \
  675|   957k|        if (fromLim - from < 4) {                                              \
  ------------------
  |  Branch (675:13): [True: 0, False: 956k]
  ------------------
  676|      0|          *fromP = from;                                                       \
  677|      0|          return XML_CONVERT_INPUT_INCOMPLETE;                                 \
  678|      0|        }                                                                      \
  679|   956k|        plane = (((hi & 0x3) << 2) | ((lo >> 6) & 0x3)) + 1;                   \
  680|   956k|        *(*toP)++ = (char)((plane >> 2) | UTF8_cval4);                         \
  681|   956k|        *(*toP)++ = (((lo >> 2) & 0xF) | ((plane & 0x3) << 4) | 0x80);         \
  682|   956k|        from += 2;                                                             \
  683|   956k|        lo2 = GET_LO(from);                                                    \
  ------------------
  |  |  727|   956k|#define GET_LO(ptr) ((unsigned char)(ptr)[1])
  ------------------
  684|   956k|        *(*toP)++ = (((lo & 0x3) << 4) | ((GET_HI(from) & 0x3) << 2)           \
  ------------------
  |  |  728|   956k|#define GET_HI(ptr) ((unsigned char)(ptr)[0])
  ------------------
  685|   956k|                     | (lo2 >> 6) | 0x80);                                     \
  686|   956k|        *(*toP)++ = ((lo2 & 0x3f) | 0x80);                                     \
  687|   956k|        break;                                                                 \
  688|  14.8M|      }                                                                        \
  689|  14.8M|    }                                                                          \
  690|   173k|    *fromP = from;                                                             \
  691|   170k|    if (from < fromLim)                                                        \
  ------------------
  |  Branch (691:9): [True: 0, False: 170k]
  ------------------
  692|   170k|      return XML_CONVERT_INPUT_INCOMPLETE;                                     \
  693|   170k|    else                                                                       \
  694|   170k|      return XML_CONVERT_COMPLETED;                                            \
  695|   170k|  }
xmltok.c:initUpdatePosition:
 1027|      6|                   POSITION *pos) {
 1028|      6|  UNUSED_P(enc);
  ------------------
  |  |  135|      6|#  define UNUSED_P(p) (void)p
  ------------------
 1029|      6|  normal_updatePosition(&utf8_encoding.enc, ptr, end, pos);
 1030|      6|}
xmltok.c:doParseXmlDecl:
 1155|    304|               const ENCODING **encoding, int *standalone) {
 1156|    304|  const char *val = NULL;
 1157|    304|  const char *name = NULL;
 1158|    304|  const char *nameEnd = NULL;
 1159|    304|  ptr += 5 * enc->minBytesPerChar;
 1160|    304|  end -= 2 * enc->minBytesPerChar;
 1161|    304|  if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)
  ------------------
  |  Branch (1161:7): [True: 170, False: 134]
  ------------------
 1162|    304|      || ! name) {
  ------------------
  |  Branch (1162:10): [True: 12, False: 122]
  ------------------
 1163|    182|    *badPtr = ptr;
 1164|    182|    return 0;
 1165|    182|  }
 1166|    122|  if (! XmlNameMatchesAscii(enc, name, nameEnd, KW_version)) {
  ------------------
  |  |  255|    122|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (1166:7): [True: 2, False: 120]
  ------------------
 1167|      2|    if (! isGeneralTextEntity) {
  ------------------
  |  Branch (1167:9): [True: 2, False: 0]
  ------------------
 1168|      2|      *badPtr = name;
 1169|      2|      return 0;
 1170|      2|    }
 1171|    120|  } else {
 1172|    120|    if (versionPtr)
  ------------------
  |  Branch (1172:9): [True: 120, False: 0]
  ------------------
 1173|    120|      *versionPtr = val;
 1174|    120|    if (versionEndPtr)
  ------------------
  |  Branch (1174:9): [True: 120, False: 0]
  ------------------
 1175|    120|      *versionEndPtr = ptr;
 1176|    120|    if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) {
  ------------------
  |  Branch (1176:9): [True: 15, False: 105]
  ------------------
 1177|     15|      *badPtr = ptr;
 1178|     15|      return 0;
 1179|     15|    }
 1180|    105|    if (! name) {
  ------------------
  |  Branch (1180:9): [True: 6, False: 99]
  ------------------
 1181|      6|      if (isGeneralTextEntity) {
  ------------------
  |  Branch (1181:11): [True: 0, False: 6]
  ------------------
 1182|       |        /* a TextDecl must have an EncodingDecl */
 1183|      0|        *badPtr = ptr;
 1184|      0|        return 0;
 1185|      0|      }
 1186|      6|      return 1;
 1187|      6|    }
 1188|    105|  }
 1189|     99|  if (XmlNameMatchesAscii(enc, name, nameEnd, KW_encoding)) {
  ------------------
  |  |  255|     99|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 52, False: 47]
  |  |  ------------------
  ------------------
 1190|     52|    int c = toAscii(enc, val, end);
 1191|     52|    if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   63|     52|#define ASCII_a 0x61
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   88|     20|#define ASCII_z 0x7A
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   36|     32|#define ASCII_A 0x41
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   61|     30|#define ASCII_Z 0x5A
  ------------------
  |  Branch (1191:12): [True: 20, False: 32]
  |  Branch (1191:28): [True: 20, False: 0]
  |  Branch (1191:48): [True: 30, False: 2]
  |  Branch (1191:64): [True: 29, False: 1]
  ------------------
 1192|      3|      *badPtr = val;
 1193|      3|      return 0;
 1194|      3|    }
 1195|     49|    if (encodingName)
  ------------------
  |  Branch (1195:9): [True: 49, False: 0]
  ------------------
 1196|     49|      *encodingName = val;
 1197|     49|    if (encoding)
  ------------------
  |  Branch (1197:9): [True: 49, False: 0]
  ------------------
 1198|     49|      *encoding = encodingFinder(enc, val, ptr - enc->minBytesPerChar);
 1199|     49|    if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) {
  ------------------
  |  Branch (1199:9): [True: 9, False: 40]
  ------------------
 1200|      9|      *badPtr = ptr;
 1201|      9|      return 0;
 1202|      9|    }
 1203|     40|    if (! name)
  ------------------
  |  Branch (1203:9): [True: 39, False: 1]
  ------------------
 1204|     39|      return 1;
 1205|     40|  }
 1206|     48|  if (! XmlNameMatchesAscii(enc, name, nameEnd, KW_standalone)
  ------------------
  |  |  255|     96|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (1206:7): [True: 4, False: 44]
  ------------------
 1207|     48|      || isGeneralTextEntity) {
  ------------------
  |  Branch (1207:10): [True: 0, False: 44]
  ------------------
 1208|      4|    *badPtr = name;
 1209|      4|    return 0;
 1210|      4|  }
 1211|     44|  if (XmlNameMatchesAscii(enc, val, ptr - enc->minBytesPerChar, KW_yes)) {
  ------------------
  |  |  255|     44|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 26, False: 18]
  |  |  ------------------
  ------------------
 1212|     26|    if (standalone)
  ------------------
  |  Branch (1212:9): [True: 26, False: 0]
  ------------------
 1213|     26|      *standalone = 1;
 1214|     26|  } else if (XmlNameMatchesAscii(enc, val, ptr - enc->minBytesPerChar, KW_no)) {
  ------------------
  |  |  255|     18|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 17, False: 1]
  |  |  ------------------
  ------------------
 1215|     17|    if (standalone)
  ------------------
  |  Branch (1215:9): [True: 17, False: 0]
  ------------------
 1216|     17|      *standalone = 0;
 1217|     17|  } else {
 1218|      1|    *badPtr = val;
 1219|      1|    return 0;
 1220|      1|  }
 1221|    246|  while (isSpace(toAscii(enc, ptr, end)))
  ------------------
  |  Branch (1221:10): [True: 203, False: 43]
  ------------------
 1222|    203|    ptr += enc->minBytesPerChar;
 1223|     43|  if (ptr != end) {
  ------------------
  |  Branch (1223:7): [True: 8, False: 35]
  ------------------
 1224|      8|    *badPtr = ptr;
 1225|      8|    return 0;
 1226|      8|  }
 1227|     35|  return 1;
 1228|     43|}
xmltok.c:parsePseudoAttribute:
 1061|    473|                     const char **valPtr, const char **nextTokPtr) {
 1062|    473|  int c;
 1063|    473|  char open;
 1064|    473|  if (ptr == end) {
  ------------------
  |  Branch (1064:7): [True: 44, False: 429]
  ------------------
 1065|     44|    *namePtr = NULL;
 1066|     44|    return 1;
 1067|     44|  }
 1068|    429|  if (! isSpace(toAscii(enc, ptr, end))) {
  ------------------
  |  Branch (1068:7): [True: 4, False: 425]
  ------------------
 1069|      4|    *nextTokPtr = ptr;
 1070|      4|    return 0;
 1071|      4|  }
 1072|    722|  do {
 1073|    722|    ptr += enc->minBytesPerChar;
 1074|    722|  } while (isSpace(toAscii(enc, ptr, end)));
  ------------------
  |  Branch (1074:12): [True: 297, False: 425]
  ------------------
 1075|    425|  if (ptr == end) {
  ------------------
  |  Branch (1075:7): [True: 13, False: 412]
  ------------------
 1076|     13|    *namePtr = NULL;
 1077|     13|    return 1;
 1078|     13|  }
 1079|    412|  *namePtr = ptr;
 1080|  2.80k|  for (;;) {
 1081|  2.80k|    c = toAscii(enc, ptr, end);
 1082|  2.80k|    if (c == -1) {
  ------------------
  |  Branch (1082:9): [True: 44, False: 2.75k]
  ------------------
 1083|     44|      *nextTokPtr = ptr;
 1084|     44|      return 0;
 1085|     44|    }
 1086|  2.75k|    if (c == ASCII_EQUALS) {
  ------------------
  |  |  112|  2.75k|#define ASCII_EQUALS 0x3D
  ------------------
  |  Branch (1086:9): [True: 327, False: 2.43k]
  ------------------
 1087|    327|      *nameEndPtr = ptr;
 1088|    327|      break;
 1089|    327|    }
 1090|  2.43k|    if (isSpace(c)) {
  ------------------
  |  Branch (1090:9): [True: 41, False: 2.39k]
  ------------------
 1091|     41|      *nameEndPtr = ptr;
 1092|    448|      do {
 1093|    448|        ptr += enc->minBytesPerChar;
 1094|    448|      } while (isSpace(c = toAscii(enc, ptr, end)));
  ------------------
  |  Branch (1094:16): [True: 407, False: 41]
  ------------------
 1095|     41|      if (c != ASCII_EQUALS) {
  ------------------
  |  |  112|     41|#define ASCII_EQUALS 0x3D
  ------------------
  |  Branch (1095:11): [True: 32, False: 9]
  ------------------
 1096|     32|        *nextTokPtr = ptr;
 1097|     32|        return 0;
 1098|     32|      }
 1099|      9|      break;
 1100|     41|    }
 1101|  2.39k|    ptr += enc->minBytesPerChar;
 1102|  2.39k|  }
 1103|    336|  if (ptr == *namePtr) {
  ------------------
  |  Branch (1103:7): [True: 4, False: 332]
  ------------------
 1104|      4|    *nextTokPtr = ptr;
 1105|      4|    return 0;
 1106|      4|  }
 1107|    332|  ptr += enc->minBytesPerChar;
 1108|    332|  c = toAscii(enc, ptr, end);
 1109|    658|  while (isSpace(c)) {
  ------------------
  |  Branch (1109:10): [True: 326, False: 332]
  ------------------
 1110|    326|    ptr += enc->minBytesPerChar;
 1111|    326|    c = toAscii(enc, ptr, end);
 1112|    326|  }
 1113|    332|  if (c != ASCII_QUOT && c != ASCII_APOS) {
  ------------------
  |  |  104|    664|#define ASCII_QUOT 0x22
  ------------------
                if (c != ASCII_QUOT && c != ASCII_APOS) {
  ------------------
  |  |  106|     67|#define ASCII_APOS 0x27
  ------------------
  |  Branch (1113:7): [True: 67, False: 265]
  |  Branch (1113:26): [True: 31, False: 36]
  ------------------
 1114|     31|    *nextTokPtr = ptr;
 1115|     31|    return 0;
 1116|     31|  }
 1117|    301|  open = (char)c;
 1118|    301|  ptr += enc->minBytesPerChar;
 1119|    301|  *valPtr = ptr;
 1120|  2.05k|  for (;; ptr += enc->minBytesPerChar) {
 1121|  2.05k|    c = toAscii(enc, ptr, end);
 1122|  2.05k|    if (c == open)
  ------------------
  |  Branch (1122:9): [True: 222, False: 1.82k]
  ------------------
 1123|    222|      break;
 1124|  1.82k|    if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   63|  1.82k|#define ASCII_a 0x61
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   88|    516|#define ASCII_z 0x7A
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   36|  1.31k|#define ASCII_A 0x41
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   61|    560|#define ASCII_Z 0x5A
  ------------------
  |  Branch (1124:12): [True: 516, False: 1.31k]
  |  Branch (1124:28): [True: 515, False: 1]
  |  Branch (1124:48): [True: 560, False: 754]
  |  Branch (1124:64): [True: 359, False: 201]
  ------------------
 1125|  1.82k|        && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |   90|    955|#define ASCII_0 0x30
  ------------------
                      && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |   99|    436|#define ASCII_9 0x39
  ------------------
                      && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |  108|  2.55k|#define ASCII_PERIOD 0x2E
  ------------------
  |  Branch (1125:15): [True: 436, False: 519]
  |  Branch (1125:31): [True: 230, False: 206]
  |  Branch (1125:48): [True: 522, False: 203]
  ------------------
 1126|  1.82k|        && c != ASCII_MINUS && c != ASCII_UNDERSCORE) {
  ------------------
  |  |  107|  2.35k|#define ASCII_MINUS 0x2D
  ------------------
                      && c != ASCII_MINUS && c != ASCII_UNDERSCORE) {
  ------------------
  |  |  116|    276|#define ASCII_UNDERSCORE 0x5F
  ------------------
  |  Branch (1126:12): [True: 276, False: 246]
  |  Branch (1126:32): [True: 79, False: 197]
  ------------------
 1127|     79|      *nextTokPtr = ptr;
 1128|     79|      return 0;
 1129|     79|    }
 1130|  1.82k|  }
 1131|    222|  *nextTokPtr = ptr + enc->minBytesPerChar;
 1132|    222|  return 1;
 1133|    301|}
xmltok.c:toAscii:
 1033|  7.40k|toAscii(const ENCODING *enc, const char *ptr, const char *end) {
 1034|  7.40k|  char buf[1];
 1035|  7.40k|  char *p = buf;
 1036|  7.40k|  XmlUtf8Convert(enc, &ptr, end, &p, p + 1);
  ------------------
  |  |  276|  7.40k|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  ------------------
 1037|  7.40k|  if (p == buf)
  ------------------
  |  Branch (1037:7): [True: 209, False: 7.19k]
  ------------------
 1038|    209|    return -1;
 1039|  7.19k|  else
 1040|  7.19k|    return buf[0];
 1041|  7.40k|}
xmltok.c:isSpace:
 1044|  4.93k|isSpace(int c) {
 1045|  4.93k|  switch (c) {
  ------------------
  |  Branch (1045:11): [True: 3.23k, False: 1.69k]
  ------------------
 1046|    412|  case 0x20:
  ------------------
  |  Branch (1046:3): [True: 412, False: 4.52k]
  ------------------
 1047|    841|  case 0xD:
  ------------------
  |  Branch (1047:3): [True: 429, False: 4.50k]
  ------------------
 1048|  1.24k|  case 0xA:
  ------------------
  |  Branch (1048:3): [True: 404, False: 4.53k]
  ------------------
 1049|  1.69k|  case 0x9:
  ------------------
  |  Branch (1049:3): [True: 454, False: 4.48k]
  ------------------
 1050|  1.69k|    return 1;
 1051|  4.93k|  }
 1052|  3.23k|  return 0;
 1053|  4.93k|}

xmltok.c:normal_prologTok:
 1018|  5.28M|                  const char **nextTokPtr) {
 1019|  5.28M|  int tok;
 1020|  5.28M|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 924, False: 5.28M]
  ------------------
 1021|    924|    return XML_TOK_NONE;
  ------------------
  |  |   51|    924|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  5.28M|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|  5.28M|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|      0|    size_t n = end - ptr;
 1024|      0|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1024:9): [True: 0, False: 0]
  ------------------
 1025|      0|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
 1026|      0|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 0, False: 0]
  ------------------
 1027|      0|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|      0|      end = ptr + n;
 1029|      0|    }
 1030|      0|  }
 1031|  5.28M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  5.28M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  5.28M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1032|  3.74k|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 3.74k, False: 5.28M]
  ------------------
 1033|  3.74k|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  3.74k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  3.74k|#  define MINBPC(enc) 1
  ------------------
 1034|  11.0k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 11.0k, False: 5.27M]
  ------------------
 1035|  11.0k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  11.0k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  11.0k|#  define MINBPC(enc) 1
  ------------------
 1036|  31.5k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 31.5k, False: 5.25M]
  ------------------
 1037|  31.5k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  31.5k|#  define MINBPC(enc) 1
  ------------------
 1038|  31.5k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  31.5k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  31.5k|    {                                                                          \
  |  |  |  |  135|  31.5k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  31.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  31.5k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 24, False: 31.5k]
  |  |  |  |  ------------------
  |  |  |  |  136|     24|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     24|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     24|      }                                                                        \
  |  |  |  |  138|  31.5k|    }
  |  |  ------------------
  ------------------
 1039|  31.5k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  31.5k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  31.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 26, False: 31.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  24.2k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 24.2k, False: 7.25k]
  ------------------
 1041|  24.2k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  24.2k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  24.2k|#  define MINBPC(enc) 1
  ------------------
 1042|  2.90k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 2.90k, False: 28.5k]
  ------------------
 1043|  2.90k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  2.90k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  2.90k|#  define MINBPC(enc) 1
  ------------------
 1044|  2.62k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 2.62k, False: 28.8k]
  ------------------
 1045|  4.24k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 1.62k, False: 29.8k]
  ------------------
 1046|  4.24k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 0, False: 31.5k]
  ------------------
 1047|  4.27k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 25, False: 31.4k]
  ------------------
 1048|  4.31k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 48, False: 31.4k]
  ------------------
 1049|  4.32k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 5, False: 31.5k]
  ------------------
 1050|  4.32k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  242|  4.32k|#  define MINBPC(enc) 1
  ------------------
 1051|  4.32k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  4.32k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  31.5k|    }
 1053|     26|    *nextTokPtr = ptr;
 1054|     26|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     26|#define XML_TOK_INVALID 0
  ------------------
 1055|  31.5k|  }
 1056|   120k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 120k, False: 5.16M]
  ------------------
 1057|   120k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  242|   120k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1057:9): [True: 123, False: 120k]
  ------------------
 1058|    123|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|    123|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    123|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|    123|    }
 1062|       |    /* fall through */
 1063|   171k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 51.4k, False: 5.23M]
  ------------------
 1064|   243k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 71.4k, False: 5.21M]
  ------------------
 1065|   251k|    for (;;) {
 1066|   251k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   251k|#  define MINBPC(enc) 1
  ------------------
 1067|   251k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   251k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   251k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   251k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 422, False: 250k]
  ------------------
 1068|    422|        break;
 1069|   250k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   250k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   250k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1070|  2.74k|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 2.74k, False: 247k]
  ------------------
 1071|  6.30k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 3.56k, False: 247k]
  ------------------
 1072|  6.30k|        break;
 1073|  1.43k|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 1.43k, False: 249k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|  1.43k|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  242|  1.43k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1075:13): [True: 1.42k, False: 6]
  ------------------
 1076|  1.42k|          break;
 1077|       |        /* fall through */
 1078|   242k|      default:
  ------------------
  |  Branch (1078:7): [True: 242k, False: 7.73k]
  ------------------
 1079|   242k|        *nextTokPtr = ptr;
 1080|   242k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|   242k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|   250k|      }
 1082|   250k|    }
 1083|    422|    *nextTokPtr = ptr;
 1084|    422|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    422|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  3.65k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 3.65k, False: 5.28M]
  ------------------
 1086|  3.65k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  3.65k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  3.65k|#  define MINBPC(enc) 1
  ------------------
 1087|  1.72k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 1.72k, False: 5.28M]
  ------------------
 1088|  1.72k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.72k|#  define MINBPC(enc) 1
  ------------------
 1089|  1.72k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  1.72k|#define XML_TOK_COMMA 38
  ------------------
 1090|  3.29k|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 3.29k, False: 5.28M]
  ------------------
 1091|  3.29k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.29k|#  define MINBPC(enc) 1
  ------------------
 1092|  3.29k|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|  3.29k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|  1.70k|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 1.70k, False: 5.28M]
  ------------------
 1094|  1.70k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.70k|#  define MINBPC(enc) 1
  ------------------
 1095|  1.70k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  1.70k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.70k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.70k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 10, False: 1.69k]
  ------------------
 1096|     10|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|     10|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|  1.69k|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  300|  1.69k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 28, False: 1.66k]
  |  |  ------------------
  ------------------
 1098|     28|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     28|    {                                                                          \
  |  |  135|     28|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     28|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|     28|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 27]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     28|    }
  ------------------
 1099|     27|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  300|     27|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1, False: 26]
  |  |  ------------------
  ------------------
 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|     27|    }
 1104|  1.68k|    *nextTokPtr = ptr;
 1105|  1.68k|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|  1.68k|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  4.61M|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 4.61M, False: 674k]
  ------------------
 1107|  4.61M|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  4.61M|#  define MINBPC(enc) 1
  ------------------
 1108|  4.61M|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  4.61M|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|  64.5k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 64.5k, False: 5.22M]
  ------------------
 1110|  64.5k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  64.5k|#  define MINBPC(enc) 1
  ------------------
 1111|  64.5k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  64.5k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  64.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  64.5k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 27, False: 64.4k]
  ------------------
 1112|     27|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|     27|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|  64.4k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  64.4k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  64.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 11, False: 64.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|  3.02k|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 3.02k, False: 61.4k]
  ------------------
 1115|  3.02k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.02k|#  define MINBPC(enc) 1
  ------------------
 1116|  3.02k|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|  3.02k|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|  4.26k|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 4.26k, False: 60.2k]
  ------------------
 1118|  4.26k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  4.26k|#  define MINBPC(enc) 1
  ------------------
 1119|  4.26k|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|  4.26k|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|  8.57k|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 8.57k, False: 55.9k]
  ------------------
 1121|  8.57k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  8.57k|#  define MINBPC(enc) 1
  ------------------
 1122|  8.57k|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|  8.57k|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|    955|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 955, False: 63.5k]
  ------------------
 1124|  1.70k|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 746, False: 63.7k]
  ------------------
 1125|  29.0k|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 27.3k, False: 37.1k]
  ------------------
 1126|  30.2k|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 1.15k, False: 63.3k]
  ------------------
 1127|  30.7k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 572, False: 63.9k]
  ------------------
 1128|  32.4k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 1.65k, False: 62.8k]
  ------------------
 1129|  48.6k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 16.1k, False: 48.3k]
  ------------------
 1130|  48.6k|      *nextTokPtr = ptr;
 1131|  48.6k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  48.6k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|  64.4k|    }
 1133|     11|    *nextTokPtr = ptr;
 1134|     11|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
 1135|  82.2k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 82.2k, False: 5.20M]
  ------------------
 1136|  82.2k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  82.2k|#  define MINBPC(enc) 1
  ------------------
 1137|  82.2k|    return XML_TOK_OR;
  ------------------
  |  |   88|  82.2k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  20.4k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 20.4k, False: 5.26M]
  ------------------
 1139|  20.4k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  20.4k|#  define MINBPC(enc) 1
  ------------------
 1140|  20.4k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  20.4k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  28.2k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 28.2k, False: 5.25M]
  ------------------
 1142|  28.2k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  28.2k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  28.2k|#  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|  4.41k|    LEAD_CASE(2)
  ------------------
  |  | 1144|      1|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 1.23k, False: 5.28M]
  |  |  ------------------
  |  | 1145|  1.23k|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 2, False: 1.23k]
  |  |  ------------------
  |  | 1146|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|  1.23k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|  1.23k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.23k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 7, False: 1.22k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      7|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      7|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      7|    }                                                                          \
  |  | 1151|  1.23k|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|  1.22k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.22k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 489, False: 734]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|    489|      ptr += n;                                                                \
  |  | 1153|    489|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|    489|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|    489|      break;                                                                   \
  |  | 1155|    489|    }                                                                          \
  |  | 1156|  1.22k|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|    734|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    734|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 733, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|    733|      ptr += n;                                                                \
  |  | 1158|    733|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|    733|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|    733|      break;                                                                   \
  |  | 1160|    733|    }                                                                          \
  |  | 1161|    734|    *nextTokPtr = ptr;                                                         \
  |  | 1162|      1|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1164|  2.03k|    LEAD_CASE(3)
  ------------------
  |  | 1144|     12|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 582, False: 5.28M]
  |  |  ------------------
  |  | 1145|    582|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 2, False: 580]
  |  |  ------------------
  |  | 1146|     12|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|    580|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|    580|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    580|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 35, False: 545]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|     35|      *nextTokPtr = ptr;                                                       \
  |  | 1149|     35|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     35|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|     35|    }                                                                          \
  |  | 1151|    580|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|    545|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    545|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 213, False: 332]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|    213|      ptr += n;                                                                \
  |  | 1153|    213|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|    213|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|    213|      break;                                                                   \
  |  | 1155|    213|    }                                                                          \
  |  | 1156|    545|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|    332|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    332|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 320, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|    320|      ptr += n;                                                                \
  |  | 1158|    320|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|    320|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|    320|      break;                                                                   \
  |  | 1160|    320|    }                                                                          \
  |  | 1161|    332|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     12|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1165|    137|    LEAD_CASE(4)
  ------------------
  |  | 1144|     16|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 54, False: 5.28M]
  |  |  ------------------
  |  | 1145|     54|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 3, False: 51]
  |  |  ------------------
  |  | 1146|     16|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     51|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|     51|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     51|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 35, False: 16]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|     35|      *nextTokPtr = ptr;                                                       \
  |  | 1149|     35|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     35|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|     35|    }                                                                          \
  |  | 1151|     51|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|     16|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     16|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 0, False: 16]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|     16|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|     16|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     16|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 0, False: 16]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|     16|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     16|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|   119k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 119k, False: 5.16M]
  ------------------
 1168|   174k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 54.3k, False: 5.23M]
  ------------------
 1169|   174k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|   174k|#define XML_TOK_NAME 18
  ------------------
 1170|   174k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|   174k|#  define MINBPC(enc) 1
  ------------------
 1171|   174k|    break;
 1172|    979|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 979, False: 5.28M]
  ------------------
 1173|  1.47k|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 494, False: 5.28M]
  ------------------
 1174|  2.71k|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 1.24k, False: 5.28M]
  ------------------
 1175|  2.71k|#  ifdef XML_NS
 1176|  2.71k|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 5.28M]
  ------------------
 1177|  2.71k|#  endif
 1178|  2.71k|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|  2.71k|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|  2.71k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.71k|#  define MINBPC(enc) 1
  ------------------
 1180|  2.71k|    break;
 1181|      0|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 0, False: 5.28M]
  ------------------
 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|     88|  default:
  ------------------
  |  Branch (1193:3): [True: 88, False: 5.28M]
  ------------------
 1194|     88|    *nextTokPtr = ptr;
 1195|     88|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     88|#define XML_TOK_INVALID 0
  ------------------
 1196|  5.28M|  }
 1197|  2.42M|  while (HAS_CHAR(enc, ptr, end)) {
 1198|  2.42M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.42M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.42M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1199|  6.90M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  2.24M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 2.42M]
  |  |  ------------------
  |  |   82|  2.24M|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  286|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (82:9): [Folded - Ignored]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|  2.24M|    /* fall through */                                                         \
  |  |   87|  2.24M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 210k, False: 2.20M]
  |  |  ------------------
  |  |   88|  2.21M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 2.00M, False: 414k]
  |  |  ------------------
  |  |   89|  2.23M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 20.4k, False: 2.40M]
  |  |  ------------------
  |  |   90|  2.23M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 1.41k, False: 2.41M]
  |  |  ------------------
  |  |   91|  2.24M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 2.17k, False: 2.41M]
  |  |  ------------------
  |  |   92|  2.24M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  2.24M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  2.24M|    break;                                                                     \
  |  |   94|  2.24M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    781|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 798, False: 2.42M]
  |  |  |  |  ------------------
  |  |  |  |   71|    798|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 795]
  |  |  |  |  ------------------
  |  |  |  |   72|    781|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    795|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.59k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    795|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 10, False: 785]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    785|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    785|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 4, False: 781]
  |  |  |  |  ------------------
  |  |  |  |   74|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     14|    }                                                                          \
  |  |  |  |   77|    795|    ptr += n;                                                                  \
  |  |  |  |   78|    781|    break;
  |  |  ------------------
  |  |   95|    781|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    292|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 302, False: 2.42M]
  |  |  |  |  ------------------
  |  |  |  |   71|    302|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 299]
  |  |  |  |  ------------------
  |  |  |  |   72|    292|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    299|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    598|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    299|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 294]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    294|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    294|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 2, False: 292]
  |  |  |  |  ------------------
  |  |  |  |   74|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      7|    }                                                                          \
  |  |  |  |   77|    299|    ptr += n;                                                                  \
  |  |  |  |   78|    292|    break;
  |  |  ------------------
  |  |   96|    292|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 14, False: 2.42M]
  |  |  |  |  ------------------
  |  |  |  |   71|     14|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 12]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     12|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     24|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     12|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, 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|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     12|    }                                                                          \
  |  |  |  |   77|     12|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
 1200|  5.68k|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 5.68k, False: 2.41M]
  ------------------
 1201|  38.1k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 32.4k, False: 2.38M]
  ------------------
 1202|  38.7k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 573, False: 2.42M]
  ------------------
 1203|  81.1k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 42.3k, False: 2.37M]
  ------------------
 1204|  84.1k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 3.02k, False: 2.41M]
  ------------------
 1205|  84.1k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 6, False: 2.42M]
  ------------------
 1206|  96.3k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 12.2k, False: 2.40M]
  ------------------
 1207|   126k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 30.3k, False: 2.39M]
  ------------------
 1208|   161k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 34.7k, False: 2.38M]
  ------------------
 1209|   161k|      *nextTokPtr = ptr;
 1210|   161k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 2.42M]
  ------------------
 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|    930|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 930, False: 2.41M]
  ------------------
 1232|    930|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    930|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 3, False: 927]
  ------------------
 1233|      3|        *nextTokPtr = ptr;
 1234|      3|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
 1235|      3|      }
 1236|    927|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|    927|#  define MINBPC(enc) 1
  ------------------
 1237|    927|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|    927|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    901|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 901, False: 2.41M]
  ------------------
 1239|    901|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    901|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 900]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|    900|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|    900|#  define MINBPC(enc) 1
  ------------------
 1244|    900|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    900|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|  14.8k|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 14.8k, False: 2.40M]
  ------------------
 1246|  14.8k|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|  14.8k|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 2, False: 14.8k]
  ------------------
 1247|      2|        *nextTokPtr = ptr;
 1248|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
 1249|      2|      }
 1250|  14.8k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  14.8k|#  define MINBPC(enc) 1
  ------------------
 1251|  14.8k|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|  14.8k|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     94|    default:
  ------------------
  |  Branch (1252:5): [True: 94, False: 2.42M]
  ------------------
 1253|     94|      *nextTokPtr = ptr;
 1254|     94|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     94|#define XML_TOK_INVALID 0
  ------------------
 1255|  2.42M|    }
 1256|  2.42M|  }
 1257|    285|  return -tok;
 1258|   178k|}
xmltok.c:normal_scanLit:
  984|  14.8k|                const char **nextTokPtr) {
  985|  70.9M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  70.9M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  70.9M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  70.9M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  987|  70.9M|    switch (t) {
  988|  3.74k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|    857|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|    845|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 857, False: 70.9M]
  |  |  |  |  ------------------
  |  |  |  |   50|    857|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 856]
  |  |  |  |  ------------------
  |  |  |  |   51|    845|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|    856|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    856|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    856|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 845]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     11|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     11|    }                                                                          \
  |  |  |  |   56|    856|    ptr += n;                                                                  \
  |  |  |  |   57|    845|    break;
  |  |  ------------------
  |  |   61|    845|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|    548|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 554, False: 70.9M]
  |  |  |  |  ------------------
  |  |  |  |   50|    554|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 552]
  |  |  |  |  ------------------
  |  |  |  |   51|    548|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|    552|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    552|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    552|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 548]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      4|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      4|    }                                                                          \
  |  |  |  |   56|    552|    ptr += n;                                                                  \
  |  |  |  |   57|    548|    break;
  |  |  ------------------
  |  |   62|    548|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|    439|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 449, False: 70.9M]
  |  |  |  |  ------------------
  |  |  |  |   50|    449|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 447]
  |  |  |  |  ------------------
  |  |  |  |   51|    439|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|    447|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    447|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    447|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 8, False: 439]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      8|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      8|    }                                                                          \
  |  |  |  |   56|    447|    ptr += n;                                                                  \
  |  |  |  |   57|    439|    break;
  |  |  ------------------
  |  |   63|    439|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 15, False: 70.9M]
  |  |  ------------------
  |  |   64|     18|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 3, False: 70.9M]
  |  |  ------------------
  |  |   65|     20|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 2, False: 70.9M]
  |  |  ------------------
  |  |   66|     20|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     20|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|   371k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 371k, False: 70.5M]
  ------------------
  990|   382k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 11.4k, False: 70.9M]
  ------------------
  991|   382k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   382k|#  define MINBPC(enc) 1
  ------------------
  992|   382k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 367k, False: 14.6k]
  ------------------
  993|   367k|        break;
  994|  14.6k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  14.6k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  14.6k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  14.6k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 8, False: 14.6k]
  ------------------
  995|      8|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      8|#define XML_TOK_LITERAL 27
  ------------------
  996|  14.6k|      *nextTokPtr = ptr;
  997|  14.6k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  14.6k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  14.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  998|  1.47k|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 1.47k, False: 13.1k]
  ------------------
  999|  4.29k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 2.81k, False: 11.8k]
  ------------------
 1000|  8.72k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 4.43k, False: 10.2k]
  ------------------
 1001|  14.4k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 5.73k, False: 8.94k]
  ------------------
 1002|  14.4k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 5, False: 14.6k]
  ------------------
 1003|  14.6k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 201, False: 14.4k]
  ------------------
 1004|  14.6k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  14.6k|#define XML_TOK_LITERAL 27
  ------------------
 1005|     12|      default:
  ------------------
  |  Branch (1005:7): [True: 12, False: 14.6k]
  ------------------
 1006|     12|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
 1007|  14.6k|      }
 1008|  70.5M|    default:
  ------------------
  |  Branch (1008:5): [True: 70.5M, False: 384k]
  ------------------
 1009|  70.5M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  70.5M|#  define MINBPC(enc) 1
  ------------------
 1010|  70.5M|      break;
 1011|  70.9M|    }
 1012|  70.9M|  }
 1013|     94|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     94|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  14.8k|}
xmltok.c:normal_scanDecl:
  183|  24.2k|                 const char **nextTokPtr) {
  184|  24.2k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  24.2k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  24.2k|    {                                                                          \
  |  |  |  |  135|  24.2k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  24.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  24.2k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 6, False: 24.2k]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|  24.2k|    }
  |  |  ------------------
  ------------------
  185|  24.2k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  24.2k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  24.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  186|    781|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 781, False: 23.4k]
  ------------------
  187|    781|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|    781|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|    781|#  define MINBPC(enc) 1
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 24.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|  1.09k|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 1.09k, False: 23.1k]
  ------------------
  192|  23.4k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 22.3k, False: 1.88k]
  ------------------
  193|  23.4k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  23.4k|#  define MINBPC(enc) 1
  ------------------
  194|  23.4k|    break;
  195|      6|  default:
  ------------------
  |  Branch (195:3): [True: 6, False: 24.2k]
  ------------------
  196|      6|    *nextTokPtr = ptr;
  197|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  198|  24.2k|  }
  199|   159k|  while (HAS_CHAR(enc, ptr, end)) {
  200|   159k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   159k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   159k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  201|     11|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 11, False: 159k]
  ------------------
  202|     11|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     11|    {                                                                          \
  |  |  135|     11|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     11|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|     11|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 3, False: 8]
  |  |  ------------------
  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      3|      }                                                                        \
  |  |  138|     11|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|      8|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  255|      8|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|      8|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 3, False: 5]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      1|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 1, False: 7]
  ------------------
  206|      2|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 7]
  ------------------
  207|      4|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 2, False: 6]
  ------------------
  208|      5|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 1, False: 7]
  ------------------
  209|      5|        *nextTokPtr = ptr;
  210|      5|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  211|      8|      }
  212|       |      /* fall through */
  213|  3.74k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 3.74k, False: 155k]
  ------------------
  214|  12.0k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 8.29k, False: 150k]
  ------------------
  215|  23.3k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 11.3k, False: 147k]
  ------------------
  216|  23.3k|      *nextTokPtr = ptr;
  217|  23.3k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  23.3k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|   121k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 121k, False: 37.9k]
  ------------------
  219|   135k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 14.5k, False: 144k]
  ------------------
  220|   135k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   135k|#  define MINBPC(enc) 1
  ------------------
  221|   135k|      break;
  222|     16|    default:
  ------------------
  |  Branch (222:5): [True: 16, False: 159k]
  ------------------
  223|     16|      *nextTokPtr = ptr;
  224|     16|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  225|   159k|    }
  226|   159k|  }
  227|     38|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     38|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  23.4k|}
xmltok.c:normal_scanComment:
  146|  1.28k|                    const char **nextTokPtr) {
  147|  1.28k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  1.28k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.28k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.28k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 1.28k, False: 7]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|  1.28k|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  300|  1.28k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (148:9): [True: 17, False: 1.26k]
  ------------------
  149|     17|      *nextTokPtr = ptr;
  150|     17|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
  151|     17|    }
  152|  1.26k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.26k|#  define MINBPC(enc) 1
  ------------------
  153|  1.38M|    while (HAS_CHAR(enc, ptr, end)) {
  154|  1.38M|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.38M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.38M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  155|  2.43M|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  1.18M|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.18M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.18M, False: 202k]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.18M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 1.18M]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.18M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.18M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.18M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.18M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 1.18M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      3|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      3|    }                                                                          \
  |  |  |  |   56|  1.18M|    ptr += n;                                                                  \
  |  |  |  |   57|  1.18M|    break;
  |  |  ------------------
  |  |   61|  1.18M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  28.9k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 28.9k, False: 1.35M]
  |  |  |  |  ------------------
  |  |  |  |   50|  28.9k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 28.9k]
  |  |  |  |  ------------------
  |  |  |  |   51|  28.9k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  28.9k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  28.9k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  28.9k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 28.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      1|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      1|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      1|    }                                                                          \
  |  |  |  |   56|  28.9k|    ptr += n;                                                                  \
  |  |  |  |   57|  28.9k|    break;
  |  |  ------------------
  |  |   62|  28.9k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.97k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.97k, False: 1.38M]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.97k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 2.97k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.97k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.97k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.97k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.97k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 2.97k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      2|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      2|    }                                                                          \
  |  |  |  |   56|  2.97k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.97k|    break;
  |  |  ------------------
  |  |   63|  2.97k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 9, False: 1.38M]
  |  |  ------------------
  |  |   64|     11|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 2, False: 1.38M]
  |  |  ------------------
  |  |   65|     13|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 2, False: 1.38M]
  |  |  ------------------
  |  |   66|     13|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     13|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  2.49k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 2.49k, False: 1.38M]
  ------------------
  157|  2.49k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.49k|#  define MINBPC(enc) 1
  ------------------
  158|  2.49k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.49k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.49k|    {                                                                          \
  |  |  |  |  135|  2.49k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.49k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.49k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 2.48k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  2.49k|    }
  |  |  ------------------
  ------------------
  159|  2.48k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  300|  2.48k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1.17k, False: 1.31k]
  |  |  ------------------
  ------------------
  160|  1.17k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.17k|#  define MINBPC(enc) 1
  ------------------
  161|  1.17k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.17k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.17k|    {                                                                          \
  |  |  |  |  135|  1.17k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.17k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.17k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.17k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.17k|    }
  |  |  ------------------
  ------------------
  162|  1.17k|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  1.17k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (162:15): [True: 12, False: 1.16k]
  ------------------
  163|     12|            *nextTokPtr = ptr;
  164|     12|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  165|     12|          }
  166|  1.16k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.16k|#  define MINBPC(enc) 1
  ------------------
  167|  1.16k|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|  1.16k|#define XML_TOK_COMMENT 13
  ------------------
  168|  1.17k|        }
  169|  1.31k|        break;
  170|   168k|      default:
  ------------------
  |  Branch (170:7): [True: 168k, False: 1.22M]
  ------------------
  171|   168k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   168k|#  define MINBPC(enc) 1
  ------------------
  172|   168k|        break;
  173|  1.38M|      }
  174|  1.38M|    }
  175|  1.26k|  }
  176|     75|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     75|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|  1.28k|}
xmltok.c:normal_scanPi:
  277|  11.7k|               const char **nextTokPtr) {
  278|  11.7k|  int tok;
  279|  11.7k|  const char *target = ptr;
  280|  11.7k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  11.7k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  11.7k|    {                                                                          \
  |  |  |  |  135|  11.7k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  11.7k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  11.7k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 9, False: 11.7k]
  |  |  |  |  ------------------
  |  |  |  |  136|      9|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      9|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      9|      }                                                                        \
  |  |  |  |  138|  11.7k|    }
  |  |  ------------------
  ------------------
  281|  11.7k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  11.7k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  11.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  282|  8.60k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  10.8k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 11.7k]
  |  |  ------------------
  |  |  111|  10.8k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  10.8k|    /* fall through */                                                         \
  |  |  116|  10.8k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 6.82k, False: 4.91k]
  |  |  ------------------
  |  |  117|  10.8k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 4.02k, False: 7.72k]
  |  |  ------------------
  |  |  118|  10.8k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  10.8k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  10.8k|    break;                                                                     \
  |  |  120|  10.8k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    514|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 521, False: 11.2k]
  |  |  |  |  ------------------
  |  |  |  |  100|    521|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 520]
  |  |  |  |  ------------------
  |  |  |  |  101|    514|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    520|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.04k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    520|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 518]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    518|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    518|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 4, False: 514]
  |  |  |  |  ------------------
  |  |  |  |  103|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      6|    }                                                                          \
  |  |  |  |  106|    520|    ptr += n;                                                                  \
  |  |  |  |  107|    514|    break;
  |  |  ------------------
  |  |  121|    514|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    357|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 366, False: 11.3k]
  |  |  |  |  ------------------
  |  |  |  |  100|    366|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 364]
  |  |  |  |  ------------------
  |  |  |  |  101|    357|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    364|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    728|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    364|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 360]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    360|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    360|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 357]
  |  |  |  |  ------------------
  |  |  |  |  103|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      7|    }                                                                          \
  |  |  |  |  106|    364|    ptr += n;                                                                  \
  |  |  |  |  107|    357|    break;
  |  |  ------------------
  |  |  122|    357|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 3, False: 11.7k]
  |  |  |  |  ------------------
  |  |  |  |  100|      3|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 2]
  |  |  |  |  ------------------
  |  |  |  |  101|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      4|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      2|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, 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|      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;
  |  |  ------------------
  ------------------
  283|      3|  default:
  ------------------
  |  Branch (283:3): [True: 3, False: 11.7k]
  ------------------
  284|      3|    *nextTokPtr = ptr;
  285|      3|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  286|  11.7k|  }
  287|  1.65M|  while (HAS_CHAR(enc, ptr, end)) {
  288|  1.65M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.65M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.65M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  289|  5.37M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.07M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 1.65M]
  |  |  ------------------
  |  |   82|  1.07M|    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.07M|    /* fall through */                                                         \
  |  |   87|  1.07M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.04M, False: 612k]
  |  |  ------------------
  |  |   88|  1.05M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 17.1k, False: 1.63M]
  |  |  ------------------
  |  |   89|  1.06M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 6.60k, False: 1.64M]
  |  |  ------------------
  |  |   90|  1.06M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 409, False: 1.65M]
  |  |  ------------------
  |  |   91|  1.07M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 7.94k, False: 1.64M]
  |  |  ------------------
  |  |   92|  1.07M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.07M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  1.07M|    break;                                                                     \
  |  |   94|  1.07M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|   566k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 566k, False: 1.08M]
  |  |  |  |  ------------------
  |  |  |  |   71|   566k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 566k]
  |  |  |  |  ------------------
  |  |  |  |   72|   566k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|   566k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.13M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   566k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 566k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|   566k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   566k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 18, False: 566k]
  |  |  |  |  ------------------
  |  |  |  |   74|     20|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     20|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     20|    }                                                                          \
  |  |  |  |   77|   566k|    ptr += n;                                                                  \
  |  |  |  |   78|   566k|    break;
  |  |  ------------------
  |  |   95|   566k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  2.09k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 2.10k, False: 1.65M]
  |  |  |  |  ------------------
  |  |  |  |   71|  2.10k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 2.10k]
  |  |  |  |  ------------------
  |  |  |  |   72|  2.09k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  2.10k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  4.21k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.10k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 2.10k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  2.10k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.10k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 8, False: 2.09k]
  |  |  |  |  ------------------
  |  |  |  |   74|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     14|    }                                                                          \
  |  |  |  |   77|  2.10k|    ptr += n;                                                                  \
  |  |  |  |   78|  2.09k|    break;
  |  |  ------------------
  |  |   96|  2.09k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 33, False: 1.65M]
  |  |  |  |  ------------------
  |  |  |  |   71|     33|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 31]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     31|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     62|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     31|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 9, False: 22]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|     22|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     22|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 22, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     31|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     31|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     31|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     31|    }                                                                          \
  |  |  |  |   77|     31|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  290|  4.70k|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 4.70k, False: 1.65M]
  ------------------
  291|  5.47k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 770, False: 1.65M]
  ------------------
  292|  7.19k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 1.72k, False: 1.65M]
  ------------------
  293|  7.19k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  303|  7.19k|#define PREFIX(ident) normal_##ident
  ------------------
  |  Branch (293:11): [True: 3, False: 7.19k]
  ------------------
  294|      3|        *nextTokPtr = ptr;
  295|      3|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  296|      3|      }
  297|  7.19k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  7.19k|#  define MINBPC(enc) 1
  ------------------
  298|  7.71M|      while (HAS_CHAR(enc, ptr, end)) {
  299|  7.71M|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  7.71M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  7.71M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  300|  14.9M|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  7.09M|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  7.09M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 7.09M, False: 625k]
  |  |  |  |  ------------------
  |  |  |  |   50|  7.09M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 7.09M]
  |  |  |  |  ------------------
  |  |  |  |   51|  7.09M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  7.09M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  7.09M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  7.09M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 7.09M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      2|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      2|    }                                                                          \
  |  |  |  |   56|  7.09M|    ptr += n;                                                                  \
  |  |  |  |   57|  7.09M|    break;
  |  |  ------------------
  |  |   61|  7.09M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|   356k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 356k, False: 7.36M]
  |  |  |  |  ------------------
  |  |  |  |   50|   356k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 356k]
  |  |  |  |  ------------------
  |  |  |  |   51|   356k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|   356k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   356k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   356k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 356k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      2|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      2|    }                                                                          \
  |  |  |  |   56|   356k|    ptr += n;                                                                  \
  |  |  |  |   57|   356k|    break;
  |  |  ------------------
  |  |   62|   356k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  35.4k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 35.4k, False: 7.68M]
  |  |  |  |  ------------------
  |  |  |  |   50|  35.4k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 35.4k]
  |  |  |  |  ------------------
  |  |  |  |   51|  35.4k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  35.4k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  35.4k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  35.4k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 35.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      5|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      5|    }                                                                          \
  |  |  |  |   56|  35.4k|    ptr += n;                                                                  \
  |  |  |  |   57|  35.4k|    break;
  |  |  ------------------
  |  |   63|  35.4k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 5, False: 7.71M]
  |  |  ------------------
  |  |   64|      7|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 2, False: 7.71M]
  |  |  ------------------
  |  |   65|      8|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 1, False: 7.71M]
  |  |  ------------------
  |  |   66|      8|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|      8|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  17.1k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 17.1k, False: 7.70M]
  ------------------
  302|  17.1k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  17.1k|#  define MINBPC(enc) 1
  ------------------
  303|  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|    }
  |  |  ------------------
  ------------------
  304|  17.1k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  17.1k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 7.03k, False: 10.0k]
  |  |  ------------------
  ------------------
  305|  7.03k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  7.03k|#  define MINBPC(enc) 1
  ------------------
  306|  7.03k|            return tok;
  307|  7.03k|          }
  308|  10.0k|          break;
  309|   216k|        default:
  ------------------
  |  Branch (309:9): [True: 216k, False: 7.50M]
  ------------------
  310|   216k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|   216k|#  define MINBPC(enc) 1
  ------------------
  311|   216k|          break;
  312|  7.71M|        }
  313|  7.71M|      }
  314|    132|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    132|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  4.36k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 4.36k, False: 1.65M]
  ------------------
  316|  4.36k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  303|  4.36k|#define PREFIX(ident) normal_##ident
  ------------------
  |  Branch (316:11): [True: 3, False: 4.35k]
  ------------------
  317|      3|        *nextTokPtr = ptr;
  318|      3|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  319|      3|      }
  320|  4.35k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  4.35k|#  define MINBPC(enc) 1
  ------------------
  321|  4.35k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.35k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.35k|    {                                                                          \
  |  |  |  |  135|  4.35k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.35k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  4.35k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 23, False: 4.33k]
  |  |  |  |  ------------------
  |  |  |  |  136|     23|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     23|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     23|      }                                                                        \
  |  |  |  |  138|  4.35k|    }
  |  |  ------------------
  ------------------
  322|  4.33k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  4.33k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 4.30k, False: 31]
  |  |  ------------------
  ------------------
  323|  4.30k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  4.30k|#  define MINBPC(enc) 1
  ------------------
  324|  4.30k|        return tok;
  325|  4.30k|      }
  326|       |      /* fall through */
  327|     65|    default:
  ------------------
  |  Branch (327:5): [True: 34, False: 1.65M]
  ------------------
  328|     65|      *nextTokPtr = ptr;
  329|     65|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     65|#define XML_TOK_INVALID 0
  ------------------
  330|  1.65M|    }
  331|  1.65M|  }
  332|     64|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     64|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  11.7k|}
xmltok.c:normal_checkPiTarget:
  232|  11.5k|                      int *tokPtr) {
  233|  11.5k|  int upper = 0;
  234|  11.5k|  UNUSED_P(enc);
  ------------------
  |  |  135|  11.5k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  11.5k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  11.5k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  11.5k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  242|  11.5k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (236:7): [True: 4.98k, False: 6.57k]
  ------------------
  237|  4.98k|    return 1;
  238|  6.57k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  6.57k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  239|  1.67k|  case ASCII_x:
  ------------------
  |  |   86|  1.67k|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 1.67k, False: 4.89k]
  ------------------
  240|  1.67k|    break;
  241|  1.67k|  case ASCII_X:
  ------------------
  |  |   59|  1.67k|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 1.67k, False: 4.90k]
  ------------------
  242|  1.67k|    upper = 1;
  243|  1.67k|    break;
  244|  3.22k|  default:
  ------------------
  |  Branch (244:3): [True: 3.22k, False: 3.34k]
  ------------------
  245|  3.22k|    return 1;
  246|  6.57k|  }
  247|  3.34k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.34k|#  define MINBPC(enc) 1
  ------------------
  248|  3.34k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  3.34k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  249|  1.08k|  case ASCII_m:
  ------------------
  |  |   75|  1.08k|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 1.08k, False: 2.26k]
  ------------------
  250|  1.08k|    break;
  251|  1.40k|  case ASCII_M:
  ------------------
  |  |   48|  1.40k|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 1.40k, False: 1.94k]
  ------------------
  252|  1.40k|    upper = 1;
  253|  1.40k|    break;
  254|    860|  default:
  ------------------
  |  Branch (254:3): [True: 860, False: 2.48k]
  ------------------
  255|    860|    return 1;
  256|  3.34k|  }
  257|  2.48k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.48k|#  define MINBPC(enc) 1
  ------------------
  258|  2.48k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  2.48k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  259|    285|  case ASCII_l:
  ------------------
  |  |   74|    285|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 285, False: 2.20k]
  ------------------
  260|    285|    break;
  261|      2|  case ASCII_L:
  ------------------
  |  |   47|      2|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 2, False: 2.48k]
  ------------------
  262|      2|    upper = 1;
  263|      2|    break;
  264|  2.20k|  default:
  ------------------
  |  Branch (264:3): [True: 2.20k, False: 287]
  ------------------
  265|  2.20k|    return 1;
  266|  2.48k|  }
  267|    287|  if (upper)
  ------------------
  |  Branch (267:7): [True: 6, False: 281]
  ------------------
  268|      6|    return 0;
  269|    281|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|    281|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|    281|  return 1;
  271|    287|}
xmltok.c:normal_scanPercent:
  924|  3.65k|                    const char **nextTokPtr) {
  925|  3.65k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.65k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.65k|    {                                                                          \
  |  |  |  |  135|  3.65k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.65k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.65k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 12, False: 3.64k]
  |  |  |  |  ------------------
  |  |  |  |  136|     12|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     12|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     12|      }                                                                        \
  |  |  |  |  138|  3.65k|    }
  |  |  ------------------
  ------------------
  926|  3.64k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.64k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.64k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  927|  2.15k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.55k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 3.64k]
  |  |  ------------------
  |  |  111|  1.55k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  1.55k|    /* fall through */                                                         \
  |  |  116|  1.55k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 740, False: 2.90k]
  |  |  ------------------
  |  |  117|  1.55k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 816, False: 2.83k]
  |  |  ------------------
  |  |  118|  1.55k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.55k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  1.55k|    break;                                                                     \
  |  |  120|  1.55k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    305|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 320, False: 3.32k]
  |  |  |  |  ------------------
  |  |  |  |  100|    320|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 319]
  |  |  |  |  ------------------
  |  |  |  |  101|    305|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    319|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    638|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    319|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 308]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    308|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    308|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 305]
  |  |  |  |  ------------------
  |  |  |  |  103|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     14|    }                                                                          \
  |  |  |  |  106|    319|    ptr += n;                                                                  \
  |  |  |  |  107|    305|    break;
  |  |  ------------------
  |  |  121|    375|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    372|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 375, False: 3.27k]
  |  |  |  |  ------------------
  |  |  |  |  100|    375|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 374]
  |  |  |  |  ------------------
  |  |  |  |  101|    372|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    374|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    748|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    374|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 373]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    373|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    373|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 372]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      2|    }                                                                          \
  |  |  |  |  106|    374|    ptr += n;                                                                  \
  |  |  |  |  107|    372|    break;
  |  |  ------------------
  |  |  122|    372|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 13, False: 3.63k]
  |  |  |  |  ------------------
  |  |  |  |  100|     13|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 11]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     11|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     22|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     11|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 10, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      1|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      1|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     11|    }                                                                          \
  |  |  |  |  106|     11|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  928|    171|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 171, False: 3.47k]
  ------------------
  929|  1.02k|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 857, False: 2.78k]
  ------------------
  930|  1.36k|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 340, False: 3.30k]
  ------------------
  931|  1.37k|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 6, False: 3.64k]
  ------------------
  932|  1.37k|    *nextTokPtr = ptr;
  933|  1.37k|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|  1.37k|#define XML_TOK_PERCENT 22
  ------------------
  934|      8|  default:
  ------------------
  |  Branch (934:3): [True: 8, False: 3.63k]
  ------------------
  935|      8|    *nextTokPtr = ptr;
  936|      8|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  937|  3.64k|  }
  938|  6.88k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  6.88k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  6.88k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  6.88k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  940|  14.5k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  3.75k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 6.88k]
  |  |  ------------------
  |  |   82|  3.75k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  286|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (82:9): [Folded - Ignored]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|  3.75k|    /* fall through */                                                         \
  |  |   87|  3.75k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 2.55k, False: 4.32k]
  |  |  ------------------
  |  |   88|  3.12k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 565, False: 6.31k]
  |  |  ------------------
  |  |   89|  3.33k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 212, False: 6.67k]
  |  |  ------------------
  |  |   90|  3.53k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 201, False: 6.68k]
  |  |  ------------------
  |  |   91|  3.75k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 215, False: 6.66k]
  |  |  ------------------
  |  |   92|  3.75k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  3.75k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  3.75k|    break;                                                                     \
  |  |   94|  3.75k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    504|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 515, False: 6.36k]
  |  |  |  |  ------------------
  |  |  |  |   71|    515|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 514]
  |  |  |  |  ------------------
  |  |  |  |   72|    504|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    514|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.02k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    514|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 8, False: 506]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    506|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    506|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 2, False: 504]
  |  |  |  |  ------------------
  |  |  |  |   74|     10|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     10|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     10|    }                                                                          \
  |  |  |  |   77|    514|    ptr += n;                                                                  \
  |  |  |  |   78|    504|    break;
  |  |  ------------------
  |  |   95|    504|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    483|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 492, False: 6.39k]
  |  |  |  |  ------------------
  |  |  |  |   71|    492|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 490]
  |  |  |  |  ------------------
  |  |  |  |   72|    483|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    490|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    980|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    490|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 486]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    486|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    486|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 483]
  |  |  |  |  ------------------
  |  |  |  |   74|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      7|    }                                                                          \
  |  |  |  |   77|    490|    ptr += n;                                                                  \
  |  |  |  |   78|    483|    break;
  |  |  ------------------
  |  |   96|    483|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 10, False: 6.87k]
  |  |  |  |  ------------------
  |  |  |  |   71|     10|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 9]
  |  |  |  |  ------------------
  |  |  |  |   72|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 5, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      4|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      4|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 4, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      9|    }                                                                          \
  |  |  |  |   77|      9|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  941|  2.09k|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 2.09k, False: 4.78k]
  ------------------
  942|  2.09k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.09k|#  define MINBPC(enc) 1
  ------------------
  943|  2.09k|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|  2.09k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|     20|    default:
  ------------------
  |  Branch (944:5): [True: 20, False: 6.86k]
  ------------------
  945|     20|      *nextTokPtr = ptr;
  946|     20|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     20|#define XML_TOK_INVALID 0
  ------------------
  947|  6.88k|    }
  948|  6.88k|  }
  949|     87|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     87|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|  2.23k|}
xmltok.c:normal_scanPoundName:
  954|  28.2k|                      const char **nextTokPtr) {
  955|  28.2k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  28.2k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  28.2k|    {                                                                          \
  |  |  |  |  135|  28.2k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  28.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  28.2k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 28.2k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  28.2k|    }
  |  |  ------------------
  ------------------
  956|  28.2k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  28.2k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  28.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  957|  27.9k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  28.1k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 28.2k]
  |  |  ------------------
  |  |  111|  28.1k|    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|  28.1k|    /* fall through */                                                         \
  |  |  116|  28.1k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 27.8k, False: 371]
  |  |  ------------------
  |  |  117|  28.1k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 319, False: 27.9k]
  |  |  ------------------
  |  |  118|  28.1k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  28.1k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  28.1k|    break;                                                                     \
  |  |  120|  28.1k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|     12|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 26, False: 28.2k]
  |  |  |  |  ------------------
  |  |  |  |  100|     26|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 25]
  |  |  |  |  ------------------
  |  |  |  |  101|     12|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     25|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     50|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     25|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 14]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|     14|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     14|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 12]
  |  |  |  |  ------------------
  |  |  |  |  103|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     13|    }                                                                          \
  |  |  |  |  106|     25|    ptr += n;                                                                  \
  |  |  |  |  107|     12|    break;
  |  |  ------------------
  |  |  121|     12|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      2|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 9, False: 28.2k]
  |  |  |  |  ------------------
  |  |  |  |  100|      9|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 8]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      8|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     16|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      8|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      3|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      3|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 2]
  |  |  |  |  ------------------
  |  |  |  |  103|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      6|    }                                                                          \
  |  |  |  |  106|      8|    ptr += n;                                                                  \
  |  |  |  |  107|      2|    break;
  |  |  ------------------
  |  |  122|     14|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 14, False: 28.2k]
  |  |  |  |  ------------------
  |  |  |  |  100|     14|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 12]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     12|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     24|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     12|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 9, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      3|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      3|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     12|    }                                                                          \
  |  |  |  |  106|     12|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  958|      3|  default:
  ------------------
  |  Branch (958:3): [True: 3, False: 28.2k]
  ------------------
  959|      3|    *nextTokPtr = ptr;
  960|      3|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  961|  28.2k|  }
  962|   198k|  while (HAS_CHAR(enc, ptr, end)) {
  963|   198k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   198k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   198k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  964|   617k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   169k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 198k]
  |  |  ------------------
  |  |   82|   169k|    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|   169k|    /* fall through */                                                         \
  |  |   87|   169k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 108k, False: 89.4k]
  |  |  ------------------
  |  |   88|   168k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 60.1k, False: 138k]
  |  |  ------------------
  |  |   89|   169k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 402, False: 197k]
  |  |  ------------------
  |  |   90|   169k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 199, False: 198k]
  |  |  ------------------
  |  |   91|   169k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 281, False: 197k]
  |  |  ------------------
  |  |   92|   169k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   169k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|   169k|    break;                                                                     \
  |  |   94|   169k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    171|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 186, False: 198k]
  |  |  |  |  ------------------
  |  |  |  |   71|    186|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 184]
  |  |  |  |  ------------------
  |  |  |  |   72|    171|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    184|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    368|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    184|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 12, False: 172]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    172|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    172|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 171]
  |  |  |  |  ------------------
  |  |  |  |   74|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     13|    }                                                                          \
  |  |  |  |   77|    184|    ptr += n;                                                                  \
  |  |  |  |   78|    171|    break;
  |  |  ------------------
  |  |   95|    233|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    203|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 233, False: 197k]
  |  |  |  |  ------------------
  |  |  |  |   71|    233|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 229]
  |  |  |  |  ------------------
  |  |  |  |   72|    203|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    229|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    458|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    229|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 15, False: 214]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    214|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    214|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 11, False: 203]
  |  |  |  |  ------------------
  |  |  |  |   74|     26|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     26|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     26|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     26|    }                                                                          \
  |  |  |  |   77|    229|    ptr += n;                                                                  \
  |  |  |  |   78|    203|    break;
  |  |  ------------------
  |  |   96|    203|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 23, False: 198k]
  |  |  |  |  ------------------
  |  |  |  |   71|     23|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 21]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     21|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     42|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     21|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 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|  23.9k|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 23.9k, False: 174k]
  ------------------
  966|  25.1k|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 1.11k, False: 197k]
  ------------------
  967|  26.7k|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 1.65k, False: 196k]
  ------------------
  968|  27.2k|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 488, False: 197k]
  ------------------
  969|  27.9k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 692, False: 197k]
  ------------------
  970|  27.9k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 1, False: 198k]
  ------------------
  971|  28.0k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 81, False: 198k]
  ------------------
  972|  28.0k|      *nextTokPtr = ptr;
  973|  28.0k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  28.0k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|     27|    default:
  ------------------
  |  Branch (974:5): [True: 27, False: 198k]
  ------------------
  975|     27|      *nextTokPtr = ptr;
  976|     27|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     27|#define XML_TOK_INVALID 0
  ------------------
  977|   198k|    }
  978|   198k|  }
  979|     70|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     70|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  28.1k|}
xmltok.c:normal_contentTok:
  824|  4.58M|                   const char **nextTokPtr) {
  825|  4.58M|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 338k, False: 4.24M]
  ------------------
  826|   338k|    return XML_TOK_NONE;
  ------------------
  |  |   51|   338k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|  4.24M|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|  4.24M|#  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.24M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.24M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.24M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  837|  2.56M|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 2.56M, False: 1.68M]
  ------------------
  838|  2.56M|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  2.56M|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  2.56M|#  define MINBPC(enc) 1
  ------------------
  839|   347k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 347k, False: 3.90M]
  ------------------
  840|   347k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|   347k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|   347k|#  define MINBPC(enc) 1
  ------------------
  841|  31.6k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 31.6k, False: 4.21M]
  ------------------
  842|  31.6k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  31.6k|#  define MINBPC(enc) 1
  ------------------
  843|  31.6k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  31.6k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  31.6k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  31.6k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 18, False: 31.6k]
  ------------------
  844|     18|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     18|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  31.6k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  31.6k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  31.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 1.59k, False: 30.0k]
  ------------------
  846|  1.59k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.59k|#  define MINBPC(enc) 1
  ------------------
  847|  31.6k|    *nextTokPtr = ptr;
  848|  31.6k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  31.6k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|   409k|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 409k, False: 3.83M]
  ------------------
  850|   409k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   409k|#  define MINBPC(enc) 1
  ------------------
  851|   409k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   409k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  20.0k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 20.0k, False: 4.22M]
  ------------------
  853|  20.0k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  20.0k|#  define MINBPC(enc) 1
  ------------------
  854|  20.0k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  20.0k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  20.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  20.0k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 451, False: 19.6k]
  ------------------
  855|    451|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|    451|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  19.6k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  300|  19.6k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (856:9): [True: 6.50k, False: 13.1k]
  ------------------
  857|  6.50k|      break;
  858|  13.1k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  13.1k|#  define MINBPC(enc) 1
  ------------------
  859|  13.1k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  13.1k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  13.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  13.1k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 219, False: 12.8k]
  ------------------
  860|    219|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|    219|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|  12.8k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  12.8k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (861:9): [True: 12.8k, False: 1]
  ------------------
  862|  12.8k|      ptr -= MINBPC(enc);
  ------------------
  |  |  242|  12.8k|#  define MINBPC(enc) 1
  ------------------
  863|  12.8k|      break;
  864|  12.8k|    }
  865|      1|    *nextTokPtr = ptr;
  866|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  867|   425k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|   172k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|   172k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 172k, False: 4.07M]
  |  |  |  |  ------------------
  |  |  |  |   50|   172k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 172k]
  |  |  |  |  ------------------
  |  |  |  |   51|   172k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|   172k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   172k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   172k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 172k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      4|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      4|    }                                                                          \
  |  |  |  |   56|   172k|    ptr += n;                                                                  \
  |  |  |  |   57|   172k|    break;
  |  |  ------------------
  |  |   61|   172k|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  7.93k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 7.95k, False: 4.24M]
  |  |  |  |  ------------------
  |  |  |  |   50|  7.95k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 4, False: 7.94k]
  |  |  |  |  ------------------
  |  |  |  |   51|  7.93k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  7.94k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  7.94k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  7.94k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 7.93k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     11|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     11|    }                                                                          \
  |  |  |  |   56|  7.94k|    ptr += n;                                                                  \
  |  |  |  |   57|  7.93k|    break;
  |  |  ------------------
  |  |   62|  32.6k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  32.5k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 32.6k, False: 4.21M]
  |  |  |  |  ------------------
  |  |  |  |   50|  32.6k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 5, False: 32.6k]
  |  |  |  |  ------------------
  |  |  |  |   51|  32.5k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  32.6k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  32.6k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  32.6k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 18, False: 32.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     18|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     18|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     18|    }                                                                          \
  |  |  |  |   56|  32.6k|    ptr += n;                                                                  \
  |  |  |  |   57|  32.5k|    break;
  |  |  ------------------
  |  |   63|  32.5k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 51, False: 4.24M]
  |  |  ------------------
  |  |   64|     53|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 2, False: 4.24M]
  |  |  ------------------
  |  |   65|     55|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 2, False: 4.24M]
  |  |  ------------------
  |  |   66|     55|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     55|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     55|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|   662k|  default:
  ------------------
  |  Branch (868:3): [True: 662k, False: 3.58M]
  ------------------
  869|   662k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|   662k|#  define MINBPC(enc) 1
  ------------------
  870|   662k|    break;
  871|  4.24M|  }
  872|  50.5M|  while (HAS_CHAR(enc, ptr, end)) {
  873|  50.5M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  50.5M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  50.5M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  874|      0|#  define LEAD_CASE(n)                                                         \
  875|      0|  case BT_LEAD##n:                                                             \
  876|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  877|      0|      *nextTokPtr = ptr;                                                       \
  878|      0|      return XML_TOK_DATA_CHARS;                                               \
  879|      0|    }                                                                          \
  880|      0|    ptr += n;                                                                  \
  881|      0|    break;
  882|  33.5M|      LEAD_CASE(2)
  ------------------
  |  |  875|  33.5M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 33.5M, False: 17.0M]
  |  |  ------------------
  |  |  876|  33.5M|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  33.5M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  33.5M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 3, False: 33.5M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 1, False: 33.5M]
  |  |  ------------------
  |  |  877|      4|      *nextTokPtr = ptr;                                                       \
  |  |  878|      4|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      4|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|      4|    }                                                                          \
  |  |  880|  33.5M|    ptr += n;                                                                  \
  |  |  881|  33.5M|    break;
  ------------------
  883|  11.8M|      LEAD_CASE(3)
  ------------------
  |  |  875|  11.8M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 11.8M, False: 38.6M]
  |  |  ------------------
  |  |  876|  11.8M|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  11.8M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  11.8M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 9, False: 11.8M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 2, False: 11.8M]
  |  |  ------------------
  |  |  877|     11|      *nextTokPtr = ptr;                                                       \
  |  |  878|     11|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     11|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     11|    }                                                                          \
  |  |  880|  11.8M|    ptr += n;                                                                  \
  |  |  881|  11.8M|    break;
  ------------------
  884|   618k|      LEAD_CASE(4)
  ------------------
  |  |  875|   618k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 618k, False: 49.9M]
  |  |  ------------------
  |  |  876|   618k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|   618k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   618k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 16, False: 618k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 2, False: 618k]
  |  |  ------------------
  |  |  877|     18|      *nextTokPtr = ptr;                                                       \
  |  |  878|     18|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     18|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     18|    }                                                                          \
  |  |  880|   618k|    ptr += n;                                                                  \
  |  |  881|   618k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|  39.7k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 39.7k, False: 50.5M]
  ------------------
  887|  39.7k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|  39.7k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  242|  39.7k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 39.4k, False: 334]
  |  |  ------------------
  ------------------
  888|  39.4k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  300|  39.4k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (888:13): [True: 30.1k, False: 9.30k]
  ------------------
  889|  30.1k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  30.1k|#  define MINBPC(enc) 1
  ------------------
  890|  30.1k|          break;
  891|  30.1k|        }
  892|  9.30k|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|  9.30k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  242|  9.30k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 9.10k, False: 207]
  |  |  ------------------
  ------------------
  893|  9.10k|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  300|  9.10k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (893:15): [True: 9.09k, False: 10]
  ------------------
  894|  9.09k|            ptr += MINBPC(enc);
  ------------------
  |  |  242|  9.09k|#  define MINBPC(enc) 1
  ------------------
  895|  9.09k|            break;
  896|  9.09k|          }
  897|     10|          *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  242|     10|#  define MINBPC(enc) 1
  ------------------
  898|     10|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  899|  9.10k|        }
  900|  9.30k|      }
  901|       |      /* fall through */
  902|  50.8k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 50.3k, False: 50.5M]
  ------------------
  903|   390k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 339k, False: 50.2M]
  ------------------
  904|   390k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 33, False: 50.5M]
  ------------------
  905|   390k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 1, False: 50.5M]
  ------------------
  906|   390k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 1, False: 50.5M]
  ------------------
  907|   394k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 4.10k, False: 50.5M]
  ------------------
  908|   682k|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 287k, False: 50.2M]
  ------------------
  909|   682k|      *nextTokPtr = ptr;
  910|   682k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   682k|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|  3.79M|    default:
  ------------------
  |  Branch (911:5): [True: 3.79M, False: 46.7M]
  ------------------
  912|  3.79M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.79M|#  define MINBPC(enc) 1
  ------------------
  913|  3.79M|      break;
  914|  50.5M|    }
  915|  50.5M|  }
  916|   212k|  *nextTokPtr = ptr;
  917|   212k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   212k|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|   894k|}
xmltok.c:normal_scanLt:
  726|  2.56M|               const char **nextTokPtr) {
  727|  2.56M|#  ifdef XML_NS
  728|  2.56M|  int hadColon;
  729|  2.56M|#  endif
  730|  2.56M|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.56M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.56M|    {                                                                          \
  |  |  |  |  135|  2.56M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.56M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.56M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 33, False: 2.56M]
  |  |  |  |  ------------------
  |  |  |  |  136|     33|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     33|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     33|      }                                                                        \
  |  |  |  |  138|  2.56M|    }
  |  |  ------------------
  ------------------
  731|  2.56M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.56M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.56M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  732|  1.35M|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.35M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 2.56M]
  |  |  ------------------
  |  |  111|  2.35M|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  2.35M|    /* fall through */                                                         \
  |  |  116|  2.35M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.33M, False: 1.22M]
  |  |  ------------------
  |  |  117|  2.35M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 1.01M, False: 1.54M]
  |  |  ------------------
  |  |  118|  2.35M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  2.35M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  2.35M|    break;                                                                     \
  |  |  120|  2.35M|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  9.71k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 9.72k, False: 2.55M]
  |  |  |  |  ------------------
  |  |  |  |  100|  9.72k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 9.72k]
  |  |  |  |  ------------------
  |  |  |  |  101|  9.71k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  9.72k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  19.4k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  9.72k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 9.71k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  9.71k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  9.71k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 7, False: 9.71k]
  |  |  |  |  ------------------
  |  |  |  |  103|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      9|    }                                                                          \
  |  |  |  |  106|  9.72k|    ptr += n;                                                                  \
  |  |  |  |  107|  9.71k|    break;
  |  |  ------------------
  |  |  121|  9.71k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    787|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 796, False: 2.56M]
  |  |  |  |  ------------------
  |  |  |  |  100|    796|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 795]
  |  |  |  |  ------------------
  |  |  |  |  101|    787|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    795|    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|    795|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, 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: 6, False: 787]
  |  |  |  |  ------------------
  |  |  |  |  103|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      8|    }                                                                          \
  |  |  |  |  106|    795|    ptr += n;                                                                  \
  |  |  |  |  107|    787|    break;
  |  |  ------------------
  |  |  122|    787|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 11, False: 2.56M]
  |  |  |  |  ------------------
  |  |  |  |  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: 2, False: 7]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      7|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      7|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 7, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      9|    }                                                                          \
  |  |  |  |  106|      9|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  733|  72.6k|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 72.6k, False: 2.49M]
  ------------------
  734|  72.6k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  72.6k|#  define MINBPC(enc) 1
  ------------------
  735|  72.6k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  72.6k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  72.6k|    {                                                                          \
  |  |  |  |  135|  72.6k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  72.6k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  72.6k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 72.6k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  72.6k|    }
  |  |  ------------------
  ------------------
  736|  72.6k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  72.6k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  72.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 18, False: 72.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    508|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 508, False: 72.1k]
  ------------------
  738|    508|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|    508|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|    508|#  define MINBPC(enc) 1
  ------------------
  739|  72.1k|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 72.1k, False: 526]
  ------------------
  740|  72.1k|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  72.1k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  72.1k|#  define MINBPC(enc) 1
  ------------------
  741|  72.6k|    }
  742|     18|    *nextTokPtr = ptr;
  743|     18|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  744|  8.84k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 8.84k, False: 2.55M]
  ------------------
  745|  8.84k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  8.84k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  8.84k|#  define MINBPC(enc) 1
  ------------------
  746|   118k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 118k, False: 2.44M]
  ------------------
  747|   118k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|   118k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|   118k|#  define MINBPC(enc) 1
  ------------------
  748|     32|  default:
  ------------------
  |  Branch (748:3): [True: 32, False: 2.56M]
  ------------------
  749|     32|    *nextTokPtr = ptr;
  750|     32|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     32|#define XML_TOK_INVALID 0
  ------------------
  751|  2.56M|  }
  752|  2.36M|#  ifdef XML_NS
  753|  2.36M|  hadColon = 0;
  754|  2.36M|#  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|  4.63M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.01M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 3.72M]
  |  |  ------------------
  |  |   82|  1.01M|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  286|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (82:9): [Folded - Ignored]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|  1.01M|    /* fall through */                                                         \
  |  |   87|  1.01M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 910k, False: 2.81M]
  |  |  ------------------
  |  |   88|  1.00M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 98.0k, False: 3.62M]
  |  |  ------------------
  |  |   89|  1.01M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 6.30k, False: 3.72M]
  |  |  ------------------
  |  |   90|  1.01M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 4.08k, False: 3.72M]
  |  |  ------------------
  |  |   91|  1.01M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 1.07k, False: 3.72M]
  |  |  ------------------
  |  |   92|  1.01M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.01M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  1.01M|    break;                                                                     \
  |  |   94|  1.01M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|   336k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 336k, False: 3.39M]
  |  |  |  |  ------------------
  |  |  |  |   71|   336k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 336k]
  |  |  |  |  ------------------
  |  |  |  |   72|   336k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|   336k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   672k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   336k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 336k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|   336k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   336k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 17, False: 336k]
  |  |  |  |  ------------------
  |  |  |  |   74|     21|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     21|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     21|    }                                                                          \
  |  |  |  |   77|   336k|    ptr += n;                                                                  \
  |  |  |  |   78|   336k|    break;
  |  |  ------------------
  |  |   95|   336k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  6.84k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 6.86k, False: 3.72M]
  |  |  |  |  ------------------
  |  |  |  |   71|  6.86k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 6.85k]
  |  |  |  |  ------------------
  |  |  |  |   72|  6.84k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  6.85k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  13.7k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  6.85k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 6.85k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  6.85k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  6.85k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 11, False: 6.84k]
  |  |  |  |  ------------------
  |  |  |  |   74|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     12|    }                                                                          \
  |  |  |  |   77|  6.85k|    ptr += n;                                                                  \
  |  |  |  |   78|  6.84k|    break;
  |  |  ------------------
  |  |   96|  6.84k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 13, False: 3.72M]
  |  |  |  |  ------------------
  |  |  |  |   71|     13|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 11]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     11|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     22|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     11|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      6|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      6|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 6, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     11|    }                                                                          \
  |  |  |  |   77|     11|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  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|  50.8k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 50.8k, False: 3.67M]
  ------------------
  777|  51.6k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 783, False: 3.72M]
  ------------------
  778|  52.6k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 1.03k, False: 3.72M]
  ------------------
  779|  52.6k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  52.6k|#  define MINBPC(enc) 1
  ------------------
  780|  53.7k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  53.7k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  53.7k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  53.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  782|  13.8k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  7.69k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 53.7k]
  |  |  ------------------
  |  |  111|  7.69k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  7.69k|    /* fall through */                                                         \
  |  |  116|  7.69k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 5.68k, False: 48.0k]
  |  |  ------------------
  |  |  117|  7.69k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 2.01k, False: 51.7k]
  |  |  ------------------
  |  |  118|  7.69k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  7.69k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  7.69k|    break;                                                                     \
  |  |  120|  7.69k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  3.48k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 3.49k, False: 50.2k]
  |  |  |  |  ------------------
  |  |  |  |  100|  3.49k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 3.49k]
  |  |  |  |  ------------------
  |  |  |  |  101|  3.48k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  3.49k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  6.98k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.49k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 3.49k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  3.49k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.49k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 4, False: 3.48k]
  |  |  |  |  ------------------
  |  |  |  |  103|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      5|    }                                                                          \
  |  |  |  |  106|  3.49k|    ptr += n;                                                                  \
  |  |  |  |  107|  3.48k|    break;
  |  |  ------------------
  |  |  121|  3.48k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    547|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 560, False: 53.1k]
  |  |  |  |  ------------------
  |  |  |  |  100|    560|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 558]
  |  |  |  |  ------------------
  |  |  |  |  101|    547|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    558|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.11k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    558|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 552]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    552|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    552|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 5, False: 547]
  |  |  |  |  ------------------
  |  |  |  |  103|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     11|    }                                                                          \
  |  |  |  |  106|    558|    ptr += n;                                                                  \
  |  |  |  |  107|    547|    break;
  |  |  ------------------
  |  |  122|    547|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 12, False: 53.7k]
  |  |  |  |  ------------------
  |  |  |  |  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: 5, 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|     10|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     10|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     10|    }                                                                          \
  |  |  |  |  106|     10|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  783|    692|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 692, False: 53.0k]
  ------------------
  784|    692|          goto gt;
  785|  40.1k|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 40.1k, False: 13.6k]
  ------------------
  786|  40.1k|          goto sol;
  787|    314|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 314, False: 53.4k]
  ------------------
  788|    612|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 298, False: 53.4k]
  ------------------
  789|  1.15k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 539, False: 53.2k]
  ------------------
  790|  1.15k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.15k|#  define MINBPC(enc) 1
  ------------------
  791|  1.15k|          continue;
  792|     16|        default:
  ------------------
  |  Branch (792:9): [True: 16, False: 53.7k]
  ------------------
  793|     16|          *nextTokPtr = ptr;
  794|     16|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  795|  53.7k|        }
  796|  11.7k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  303|  11.7k|#define PREFIX(ident) normal_##ident
  ------------------
  797|  53.7k|      }
  798|     32|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     32|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  52.6k|    }
  800|  2.31M|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 2.31M, False: 1.41M]
  ------------------
  801|  2.31M|    gt:
  802|  2.31M|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.31M|#  define MINBPC(enc) 1
  ------------------
  803|  2.31M|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  2.31M|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|  1.82k|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 1.82k, False: 3.72M]
  ------------------
  805|  41.9k|    sol:
  806|  41.9k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  41.9k|#  define MINBPC(enc) 1
  ------------------
  807|  41.9k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  41.9k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  41.9k|    {                                                                          \
  |  |  |  |  135|  41.9k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  41.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  41.9k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 9, False: 41.9k]
  |  |  |  |  ------------------
  |  |  |  |  136|      9|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      9|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      9|      }                                                                        \
  |  |  |  |  138|  41.9k|    }
  |  |  ------------------
  ------------------
  808|  41.9k|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  41.9k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (808:11): [True: 16, False: 41.9k]
  ------------------
  809|     16|        *nextTokPtr = ptr;
  810|     16|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  811|     16|      }
  812|  41.9k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  41.9k|#  define MINBPC(enc) 1
  ------------------
  813|  41.9k|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|  41.9k|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|     76|    default:
  ------------------
  |  Branch (814:5): [True: 76, False: 3.72M]
  ------------------
  815|     76|      *nextTokPtr = ptr;
  816|     76|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     76|#define XML_TOK_INVALID 0
  ------------------
  817|  3.72M|    }
  818|  3.72M|  }
  819|     91|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     91|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  2.36M|}
xmltok.c:normal_scanCdataSection:
  337|  72.1k|                         const char **nextTokPtr) {
  338|  72.1k|  static const char CDATA_LSQB[]
  339|  72.1k|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|  72.1k|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|  72.1k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|  72.1k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|  72.1k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|  72.1k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|  72.1k|#define ASCII_LSQB 0x5B
  ------------------
  340|  72.1k|  int i;
  341|  72.1k|  UNUSED_P(enc);
  ------------------
  |  |  135|  72.1k|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|  72.1k|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|  72.1k|    {                                                                          \
  |  |  135|  72.1k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|  72.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  72.1k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 2, False: 72.1k]
  |  |  ------------------
  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      2|      }                                                                        \
  |  |  138|  72.1k|    }
  ------------------
  344|   504k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  242|   432k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (344:15): [True: 432k, False: 72.1k]
  ------------------
  345|   432k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  300|   432k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (345:9): [True: 20, False: 432k]
  ------------------
  346|     20|      *nextTokPtr = ptr;
  347|     20|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     20|#define XML_TOK_INVALID 0
  ------------------
  348|     20|    }
  349|   432k|  }
  350|  72.1k|  *nextTokPtr = ptr;
  351|  72.1k|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|  72.1k|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|  72.1k|}
xmltok.c:normal_scanEndTag:
  432|   118k|                   const char **nextTokPtr) {
  433|   118k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   118k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   118k|    {                                                                          \
  |  |  |  |  135|   118k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   118k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|   118k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 118k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|   118k|    }
  |  |  ------------------
  ------------------
  434|   118k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   118k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   118k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  435|  79.8k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   115k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 118k]
  |  |  ------------------
  |  |  111|   115k|    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|   115k|    /* fall through */                                                         \
  |  |  116|   115k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 75.6k, False: 42.5k]
  |  |  ------------------
  |  |  117|   115k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 40.3k, False: 77.7k]
  |  |  ------------------
  |  |  118|   115k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   115k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|   115k|    break;                                                                     \
  |  |  120|   115k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  1.91k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 1.92k, False: 116k]
  |  |  |  |  ------------------
  |  |  |  |  100|  1.92k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 1.92k]
  |  |  |  |  ------------------
  |  |  |  |  101|  1.91k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  1.92k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.84k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.92k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 1.91k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  1.91k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.91k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 1.91k]
  |  |  |  |  ------------------
  |  |  |  |  103|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      6|    }                                                                          \
  |  |  |  |  106|  1.92k|    ptr += n;                                                                  \
  |  |  |  |  107|  1.91k|    break;
  |  |  ------------------
  |  |  121|  1.91k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    208|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 212, False: 117k]
  |  |  |  |  ------------------
  |  |  |  |  100|    212|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 211]
  |  |  |  |  ------------------
  |  |  |  |  101|    208|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    211|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    422|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    211|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 210]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    210|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    210|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 208]
  |  |  |  |  ------------------
  |  |  |  |  103|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|    211|    ptr += n;                                                                  \
  |  |  |  |  107|    208|    break;
  |  |  ------------------
  |  |  122|    208|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 3, False: 118k]
  |  |  |  |  ------------------
  |  |  |  |  100|      3|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 2]
  |  |  |  |  ------------------
  |  |  |  |  101|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      4|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      2|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, 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|      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;
  |  |  ------------------
  ------------------
  436|      2|  default:
  ------------------
  |  Branch (436:3): [True: 2, False: 118k]
  ------------------
  437|      2|    *nextTokPtr = ptr;
  438|      2|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  439|   118k|  }
  440|  1.80M|  while (HAS_CHAR(enc, ptr, end)) {
  441|  1.80M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.80M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.80M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  442|  4.05M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   386k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 1.80M]
  |  |  ------------------
  |  |   82|   386k|    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|   386k|    /* fall through */                                                         \
  |  |   87|   386k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 300k, False: 1.50M]
  |  |  ------------------
  |  |   88|   383k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 83.5k, False: 1.72M]
  |  |  ------------------
  |  |   89|   384k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 949, False: 1.80M]
  |  |  ------------------
  |  |   90|   384k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 262, False: 1.80M]
  |  |  ------------------
  |  |   91|   386k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 1.33k, False: 1.80M]
  |  |  ------------------
  |  |   92|   386k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   386k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|   386k|    break;                                                                     \
  |  |   94|  1.30M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  1.30M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 1.30M, False: 505k]
  |  |  |  |  ------------------
  |  |  |  |   71|  1.30M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 1.30M]
  |  |  |  |  ------------------
  |  |  |  |   72|  1.30M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  1.30M|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.60M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.30M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 1.30M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  1.30M|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.30M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 19, False: 1.30M]
  |  |  |  |  ------------------
  |  |  |  |   74|     21|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     21|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     21|    }                                                                          \
  |  |  |  |   77|  1.30M|    ptr += n;                                                                  \
  |  |  |  |   78|  1.30M|    break;
  |  |  ------------------
  |  |   95|  1.30M|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    850|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 861, False: 1.80M]
  |  |  |  |  ------------------
  |  |  |  |   71|    861|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 860]
  |  |  |  |  ------------------
  |  |  |  |   72|    850|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    860|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.72k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    860|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 858]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    858|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    858|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 8, False: 850]
  |  |  |  |  ------------------
  |  |  |  |   74|     10|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     10|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     10|    }                                                                          \
  |  |  |  |   77|    860|    ptr += n;                                                                  \
  |  |  |  |   78|    850|    break;
  |  |  ------------------
  |  |   96|    850|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 13, False: 1.80M]
  |  |  |  |  ------------------
  |  |  |  |   71|     13|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 12]
  |  |  |  |  ------------------
  |  |  |  |   72|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     12|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     24|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     12|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, 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|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     12|    }                                                                          \
  |  |  |  |   77|     12|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  443|    423|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 423, False: 1.80M]
  ------------------
  444|  1.52k|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 1.10k, False: 1.80M]
  ------------------
  445|  2.11k|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 588, False: 1.80M]
  ------------------
  446|  3.73k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  2.11k|#  define MINBPC(enc) 1
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  1.65k|#  define MINBPC(enc) 1
  ------------------
  447|  3.73k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.73k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.73k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  448|    223|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 223, False: 3.50k]
  ------------------
  449|  1.39k|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 1.16k, False: 2.56k]
  ------------------
  450|  1.65k|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 265, False: 3.46k]
  ------------------
  451|  1.65k|          break;
  452|  2.06k|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 2.06k, False: 1.66k]
  ------------------
  453|  2.06k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.06k|#  define MINBPC(enc) 1
  ------------------
  454|  2.06k|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|  2.06k|#define XML_TOK_END_TAG 5
  ------------------
  455|     14|        default:
  ------------------
  |  Branch (455:9): [True: 14, False: 3.71k]
  ------------------
  456|     14|          *nextTokPtr = ptr;
  457|     14|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  458|  3.73k|        }
  459|  3.73k|      }
  460|     39|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     39|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  461|      0|#  ifdef XML_NS
  462|      0|    case BT_COLON:
  ------------------
  |  Branch (462:5): [True: 0, False: 1.80M]
  ------------------
  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|   115k|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 115k, False: 1.68M]
  ------------------
  469|   115k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   115k|#  define MINBPC(enc) 1
  ------------------
  470|   115k|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|   115k|#define XML_TOK_END_TAG 5
  ------------------
  471|     30|    default:
  ------------------
  |  Branch (471:5): [True: 30, False: 1.80M]
  ------------------
  472|     30|      *nextTokPtr = ptr;
  473|     30|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     30|#define XML_TOK_INVALID 0
  ------------------
  474|  1.80M|    }
  475|  1.80M|  }
  476|     71|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     71|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|   118k|}
xmltok.c:normal_scanAtts:
  573|  11.7k|                 const char **nextTokPtr) {
  574|  11.7k|#  ifdef XML_NS
  575|  11.7k|  int hadColon = 0;
  576|  11.7k|#  endif
  577|  1.33M|  while (HAS_CHAR(enc, ptr, end)) {
  578|  1.33M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.33M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.33M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  579|   817k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   318k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 1.33M]
  |  |  ------------------
  |  |   82|   318k|    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|   318k|    /* fall through */                                                         \
  |  |   87|   318k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 131k, False: 1.20M]
  |  |  ------------------
  |  |   88|   134k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 2.58k, False: 1.33M]
  |  |  ------------------
  |  |   89|   141k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 7.30k, False: 1.33M]
  |  |  ------------------
  |  |   90|   142k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 201, False: 1.33M]
  |  |  ------------------
  |  |   91|   318k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 176k, False: 1.16M]
  |  |  ------------------
  |  |   92|   318k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   318k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|   318k|    break;                                                                     \
  |  |   94|   318k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|   132k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 132k, False: 1.20M]
  |  |  |  |  ------------------
  |  |  |  |   71|   132k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 132k]
  |  |  |  |  ------------------
  |  |  |  |   72|   132k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|   132k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   265k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   132k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 132k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|   132k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   132k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 10, False: 132k]
  |  |  |  |  ------------------
  |  |  |  |   74|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     11|    }                                                                          \
  |  |  |  |   77|   132k|    ptr += n;                                                                  \
  |  |  |  |   78|   132k|    break;
  |  |  ------------------
  |  |   95|   132k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    644|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 658, False: 1.33M]
  |  |  |  |  ------------------
  |  |  |  |   71|    658|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 656]
  |  |  |  |  ------------------
  |  |  |  |   72|    644|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    656|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.31k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    656|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 650]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    650|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    650|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 6, False: 644]
  |  |  |  |  ------------------
  |  |  |  |   74|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     12|    }                                                                          \
  |  |  |  |   77|    656|    ptr += n;                                                                  \
  |  |  |  |   78|    644|    break;
  |  |  ------------------
  |  |   96|    644|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 16, False: 1.33M]
  |  |  |  |  ------------------
  |  |  |  |   71|     16|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 15]
  |  |  |  |  ------------------
  |  |  |  |   72|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 7, 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|     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;
  |  |  ------------------
  ------------------
  580|      0|#  ifdef XML_NS
  581|      0|    case BT_COLON:
  ------------------
  |  Branch (581:5): [True: 0, False: 1.33M]
  ------------------
  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|    220|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 220, False: 1.33M]
  ------------------
  598|    434|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 214, False: 1.33M]
  ------------------
  599|  40.7k|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 40.3k, False: 1.29M]
  ------------------
  600|  41.5k|      for (;;) {
  601|  41.5k|        int t;
  602|       |
  603|  41.5k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  41.5k|#  define MINBPC(enc) 1
  ------------------
  604|  41.5k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  41.5k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  41.5k|    {                                                                          \
  |  |  |  |  135|  41.5k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  41.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  41.5k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 36, False: 41.5k]
  |  |  |  |  ------------------
  |  |  |  |  136|     36|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     36|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     36|      }                                                                        \
  |  |  |  |  138|  41.5k|    }
  |  |  ------------------
  ------------------
  605|  41.5k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  41.5k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  41.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  606|  41.5k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 40.7k, False: 857]
  ------------------
  607|  40.7k|          break;
  608|    857|        switch (t) {
  609|    233|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 233, False: 624]
  ------------------
  610|    568|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 335, False: 522]
  ------------------
  611|    852|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 284, False: 573]
  ------------------
  612|    852|          break;
  613|      5|        default:
  ------------------
  |  Branch (613:9): [True: 5, False: 852]
  ------------------
  614|      5|          *nextTokPtr = ptr;
  615|      5|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  616|    857|        }
  617|    857|      }
  618|       |      /* fall through */
  619|   886k|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 846k, False: 492k]
  ------------------
  620|   886k|      int open;
  621|   886k|#  ifdef XML_NS
  622|   886k|      hadColon = 0;
  623|   886k|#  endif
  624|   887k|      for (;;) {
  625|   887k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   887k|#  define MINBPC(enc) 1
  ------------------
  626|   887k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   887k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   887k|    {                                                                          \
  |  |  |  |  135|   887k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   887k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|   887k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 37, False: 887k]
  |  |  |  |  ------------------
  |  |  |  |  136|     37|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     37|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     37|      }                                                                        \
  |  |  |  |  138|   887k|    }
  |  |  ------------------
  ------------------
  627|   887k|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|   887k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   887k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  628|   887k|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 91.0k, False: 796k]
  |  Branch (628:32): [True: 795k, False: 858]
  ------------------
  629|   886k|          break;
  630|    858|        switch (open) {
  631|    410|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 410, False: 448]
  ------------------
  632|    641|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 231, False: 627]
  ------------------
  633|    845|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 204, False: 654]
  ------------------
  634|    845|          break;
  635|     13|        default:
  ------------------
  |  Branch (635:9): [True: 13, False: 845]
  ------------------
  636|     13|          *nextTokPtr = ptr;
  637|     13|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  638|    858|        }
  639|    858|      }
  640|   886k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   886k|#  define MINBPC(enc) 1
  ------------------
  641|       |      /* in attribute value */
  642|  19.6M|      for (;;) {
  643|  19.6M|        int t;
  644|  19.6M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  19.6M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  19.6M|    {                                                                          \
  |  |  |  |  135|  19.6M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  19.6M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  19.6M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 58, False: 19.6M]
  |  |  |  |  ------------------
  |  |  |  |  136|     58|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     58|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     58|      }                                                                        \
  |  |  |  |  138|  19.6M|    }
  |  |  ------------------
  ------------------
  645|  19.6M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  19.6M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  19.6M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  646|  19.6M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 886k, False: 18.7M]
  ------------------
  647|   886k|          break;
  648|  18.7M|        switch (t) {
  649|  8.05M|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  1.94M|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.94M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.94M, False: 16.7M]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.94M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 1.94M]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.94M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.94M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.94M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.94M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 1.94M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      1|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      1|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      1|    }                                                                          \
  |  |  |  |   56|  1.94M|    ptr += n;                                                                  \
  |  |  |  |   57|  1.94M|    break;
  |  |  ------------------
  |  |   61|  2.07M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.07M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.07M, False: 16.6M]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.07M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 2.07M]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.07M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.07M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.07M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.07M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 2.07M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      3|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      3|    }                                                                          \
  |  |  |  |   56|  2.07M|    ptr += n;                                                                  \
  |  |  |  |   57|  2.07M|    break;
  |  |  ------------------
  |  |   62|  2.07M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  12.8k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 12.8k, False: 18.7M]
  |  |  |  |  ------------------
  |  |  |  |   50|  12.8k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 3, False: 12.8k]
  |  |  |  |  ------------------
  |  |  |  |   51|  12.8k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  12.8k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  12.8k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  12.8k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 12.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      2|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      2|    }                                                                          \
  |  |  |  |   56|  12.8k|    ptr += n;                                                                  \
  |  |  |  |   57|  12.8k|    break;
  |  |  ------------------
  |  |   63|  12.8k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 2, False: 18.7M]
  |  |  ------------------
  |  |   64|      4|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 2, False: 18.7M]
  |  |  ------------------
  |  |   65|      9|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 5, False: 18.7M]
  |  |  ------------------
  |  |   66|      9|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|      9|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  54.7k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 54.7k, False: 18.6M]
  ------------------
  651|  54.7k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  303|  54.7k|#define PREFIX(ident) normal_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  242|  54.7k|#  define MINBPC(enc) 1
  ------------------
  652|  54.7k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 11, False: 54.7k]
  ------------------
  653|     11|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 5, False: 6]
  ------------------
  654|      5|              *nextTokPtr = ptr;
  655|     11|            return tok;
  656|     11|          }
  657|  54.7k|          break;
  658|  54.7k|        }
  659|  54.7k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 34, False: 18.7M]
  ------------------
  660|     34|          *nextTokPtr = ptr;
  661|     34|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     34|#define XML_TOK_INVALID 0
  ------------------
  662|  14.6M|        default:
  ------------------
  |  Branch (662:9): [True: 14.6M, False: 4.08M]
  ------------------
  663|  14.6M|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  14.6M|#  define MINBPC(enc) 1
  ------------------
  664|  14.6M|          break;
  665|  18.7M|        }
  666|  18.7M|      }
  667|   886k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   886k|#  define MINBPC(enc) 1
  ------------------
  668|   886k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   886k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   886k|    {                                                                          \
  |  |  |  |  135|   886k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   886k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|   886k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 886k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|   886k|    }
  |  |  ------------------
  ------------------
  669|   886k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   886k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   886k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  670|   426k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 426k, False: 460k]
  ------------------
  671|   811k|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 384k, False: 501k]
  ------------------
  672|   876k|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 65.6k, False: 821k]
  ------------------
  673|   876k|        break;
  674|  5.48k|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 5.48k, False: 881k]
  ------------------
  675|  5.48k|        goto sol;
  676|  4.57k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 4.57k, False: 882k]
  ------------------
  677|  4.57k|        goto gt;
  678|     18|      default:
  ------------------
  |  Branch (678:7): [True: 18, False: 886k]
  ------------------
  679|     18|        *nextTokPtr = ptr;
  680|     18|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  681|   886k|      }
  682|       |      /* ptr points to closing quote */
  683|  1.05M|      for (;;) {
  684|  1.05M|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.05M|#  define MINBPC(enc) 1
  ------------------
  685|  1.05M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.05M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.05M|    {                                                                          \
  |  |  |  |  135|  1.05M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.05M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.05M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 38, False: 1.05M]
  |  |  |  |  ------------------
  |  |  |  |  136|     38|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     38|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     38|      }                                                                        \
  |  |  |  |  138|  1.05M|    }
  |  |  ------------------
  ------------------
  686|  1.05M|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.05M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.05M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  687|   937k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   809k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 1.05M]
  |  |  ------------------
  |  |  111|   809k|    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|   809k|    /* fall through */                                                         \
  |  |  116|   809k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 806k, False: 244k]
  |  |  ------------------
  |  |  117|   809k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 3.46k, False: 1.04M]
  |  |  ------------------
  |  |  118|   809k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   809k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|   809k|    break;                                                                     \
  |  |  120|   809k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  61.6k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 61.6k, False: 989k]
  |  |  |  |  ------------------
  |  |  |  |  100|  61.6k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 61.6k]
  |  |  |  |  ------------------
  |  |  |  |  101|  61.6k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  61.6k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   123k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  61.6k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 61.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  61.6k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  61.6k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 61.6k]
  |  |  |  |  ------------------
  |  |  |  |  103|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|  61.6k|    ptr += n;                                                                  \
  |  |  |  |  107|  61.6k|    break;
  |  |  ------------------
  |  |  121|  61.6k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  4.22k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 4.23k, False: 1.04M]
  |  |  |  |  ------------------
  |  |  |  |  100|  4.23k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 4.23k]
  |  |  |  |  ------------------
  |  |  |  |  101|  4.22k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  4.23k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  8.46k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  4.23k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 4.22k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  4.22k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  4.22k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 4.22k]
  |  |  |  |  ------------------
  |  |  |  |  103|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      5|    }                                                                          \
  |  |  |  |  106|  4.23k|    ptr += n;                                                                  \
  |  |  |  |  107|  4.22k|    break;
  |  |  ------------------
  |  |  122|  4.22k|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 27, False: 1.05M]
  |  |  |  |  ------------------
  |  |  |  |  100|     27|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 26]
  |  |  |  |  ------------------
  |  |  |  |  101|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     26|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     52|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     26|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 19]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|     19|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     19|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 19, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|     26|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     26|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     26|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     26|    }                                                                          \
  |  |  |  |  106|     26|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  688|   172k|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 172k, False: 878k]
  ------------------
  689|   173k|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 1.59k, False: 1.04M]
  ------------------
  690|   174k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 698, False: 1.05M]
  ------------------
  691|   174k|          continue;
  692|    347|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 347, False: 1.05M]
  ------------------
  693|  4.91k|        gt:
  694|  4.91k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  4.91k|#  define MINBPC(enc) 1
  ------------------
  695|  4.91k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  4.91k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|    852|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 852, False: 1.05M]
  ------------------
  697|  6.33k|        sol:
  698|  6.33k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  6.33k|#  define MINBPC(enc) 1
  ------------------
  699|  6.33k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.33k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.33k|    {                                                                          \
  |  |  |  |  135|  6.33k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.33k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  6.33k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 6.33k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  6.33k|    }
  |  |  ------------------
  ------------------
  700|  6.33k|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  6.33k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (700:15): [True: 16, False: 6.31k]
  ------------------
  701|     16|            *nextTokPtr = ptr;
  702|     16|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  703|     16|          }
  704|  6.31k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  6.31k|#  define MINBPC(enc) 1
  ------------------
  705|  6.31k|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|  6.31k|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|      6|        default:
  ------------------
  |  Branch (706:9): [True: 6, False: 1.05M]
  ------------------
  707|      6|          *nextTokPtr = ptr;
  708|      6|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  709|  1.05M|        }
  710|   875k|        break;
  711|  1.05M|      }
  712|   875k|      break;
  713|   876k|    }
  714|   875k|    default:
  ------------------
  |  Branch (714:5): [True: 39, False: 1.33M]
  ------------------
  715|     39|      *nextTokPtr = ptr;
  716|     39|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     39|#define XML_TOK_INVALID 0
  ------------------
  717|  1.33M|    }
  718|  1.33M|  }
  719|     81|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     81|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  11.7k|}
xmltok.c:normal_scanRef:
  545|  3.99M|                const char **nextTokPtr) {
  546|  3.99M|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.99M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.99M|    {                                                                          \
  |  |  |  |  135|  3.99M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.99M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.99M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 68, False: 3.99M]
  |  |  |  |  ------------------
  |  |  |  |  136|     68|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     68|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     68|      }                                                                        \
  |  |  |  |  138|  3.99M|    }
  |  |  ------------------
  ------------------
  547|  3.99M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.99M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.99M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  548|  3.92M|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  3.84M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 3.99M]
  |  |  ------------------
  |  |  111|  3.84M|    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.84M|    /* fall through */                                                         \
  |  |  116|  3.84M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.75M, False: 230k]
  |  |  ------------------
  |  |  117|  3.84M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 87.4k, False: 3.90M]
  |  |  ------------------
  |  |  118|  3.84M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  3.84M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  3.84M|    break;                                                                     \
  |  |  120|  3.84M|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  75.1k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 75.1k, False: 3.91M]
  |  |  |  |  ------------------
  |  |  |  |  100|  75.1k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 75.1k]
  |  |  |  |  ------------------
  |  |  |  |  101|  75.1k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  75.1k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   150k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  75.1k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 75.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  75.1k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  75.1k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 75.1k]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      2|    }                                                                          \
  |  |  |  |  106|  75.1k|    ptr += n;                                                                  \
  |  |  |  |  107|  75.1k|    break;
  |  |  ------------------
  |  |  121|  75.1k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  10.0k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 10.0k, False: 3.98M]
  |  |  |  |  ------------------
  |  |  |  |  100|  10.0k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 10.0k]
  |  |  |  |  ------------------
  |  |  |  |  101|  10.0k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  10.0k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  20.0k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  10.0k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 10.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  10.0k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  10.0k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 10.0k]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      2|    }                                                                          \
  |  |  |  |  106|  10.0k|    ptr += n;                                                                  \
  |  |  |  |  107|  10.0k|    break;
  |  |  ------------------
  |  |  122|  10.0k|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 4, False: 3.99M]
  |  |  |  |  ------------------
  |  |  |  |  100|      4|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 3]
  |  |  |  |  ------------------
  |  |  |  |  101|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      3|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      6|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      3|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      1|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      1|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|      3|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  549|  58.1k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 58.1k, False: 3.93M]
  ------------------
  550|  58.1k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  58.1k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  58.1k|#  define MINBPC(enc) 1
  ------------------
  551|     40|  default:
  ------------------
  |  Branch (551:3): [True: 40, False: 3.99M]
  ------------------
  552|     40|    *nextTokPtr = ptr;
  553|     40|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     40|#define XML_TOK_INVALID 0
  ------------------
  554|  3.99M|  }
  555|  6.02M|  while (HAS_CHAR(enc, ptr, end)) {
  556|  6.02M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  6.02M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  6.02M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  557|  6.73M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.79M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 6.02M]
  |  |  ------------------
  |  |   82|  1.79M|    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.79M|    /* fall through */                                                         \
  |  |   87|  1.79M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.07M, False: 4.95M]
  |  |  ------------------
  |  |   88|  1.47M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 395k, False: 5.63M]
  |  |  ------------------
  |  |   89|  1.79M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 326k, False: 5.70M]
  |  |  ------------------
  |  |   90|  1.79M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 233, False: 6.02M]
  |  |  ------------------
  |  |   91|  1.79M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 868, False: 6.02M]
  |  |  ------------------
  |  |   92|  1.79M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.79M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  1.79M|    break;                                                                     \
  |  |   94|  1.79M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|   294k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 294k, False: 5.73M]
  |  |  |  |  ------------------
  |  |  |  |   71|   294k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 294k]
  |  |  |  |  ------------------
  |  |  |  |   72|   294k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|   294k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   588k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   294k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 294k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|   294k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   294k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 294k]
  |  |  |  |  ------------------
  |  |  |  |   74|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      2|    }                                                                          \
  |  |  |  |   77|   294k|    ptr += n;                                                                  \
  |  |  |  |   78|   294k|    break;
  |  |  ------------------
  |  |   95|   294k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  5.69k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 5.70k, False: 6.02M]
  |  |  |  |  ------------------
  |  |  |  |   71|  5.70k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 5.70k]
  |  |  |  |  ------------------
  |  |  |  |   72|  5.69k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  5.70k|    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.70k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 5.70k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  5.70k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  5.70k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 5.69k]
  |  |  |  |  ------------------
  |  |  |  |   74|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      3|    }                                                                          \
  |  |  |  |   77|  5.70k|    ptr += n;                                                                  \
  |  |  |  |   78|  5.69k|    break;
  |  |  ------------------
  |  |   96|  5.69k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 22, False: 6.02M]
  |  |  |  |  ------------------
  |  |  |  |   71|     22|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 20]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     20|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     40|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     20|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 19, 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|     20|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     20|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     20|    }                                                                          \
  |  |  |  |   77|     20|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  558|  3.93M|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 3.93M, False: 2.09M]
  ------------------
  559|  3.93M|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.93M|#  define MINBPC(enc) 1
  ------------------
  560|  3.93M|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|  3.93M|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|     25|    default:
  ------------------
  |  Branch (561:5): [True: 25, False: 6.02M]
  ------------------
  562|     25|      *nextTokPtr = ptr;
  563|     25|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     25|#define XML_TOK_INVALID 0
  ------------------
  564|  6.02M|    }
  565|  6.02M|  }
  566|     68|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     68|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|  3.93M|}
xmltok.c:normal_scanCharRef:
  514|  58.1k|                    const char **nextTokPtr) {
  515|  58.1k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  58.1k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  58.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  58.1k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 58.1k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  58.1k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  300|  58.1k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 56.8k, False: 1.35k]
  |  |  ------------------
  ------------------
  517|  56.8k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  56.8k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  56.8k|#  define MINBPC(enc) 1
  ------------------
  518|  1.35k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.35k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.35k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  519|  1.33k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 1.33k, False: 14]
  ------------------
  520|  1.33k|      break;
  521|     14|    default:
  ------------------
  |  Branch (521:5): [True: 14, False: 1.33k]
  ------------------
  522|     14|      *nextTokPtr = ptr;
  523|     14|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  524|  1.35k|    }
  525|  4.90k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  1.33k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  3.57k|#  define MINBPC(enc) 1
  ------------------
  526|  4.90k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.90k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.90k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  527|  3.57k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 3.57k, False: 1.33k]
  ------------------
  528|  3.57k|        break;
  529|  1.32k|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 1.32k, False: 3.57k]
  ------------------
  530|  1.32k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.32k|#  define MINBPC(enc) 1
  ------------------
  531|  1.32k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  1.32k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|      5|      default:
  ------------------
  |  Branch (532:7): [True: 5, False: 4.90k]
  ------------------
  533|      5|        *nextTokPtr = ptr;
  534|      5|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  535|  4.90k|      }
  536|  4.90k|    }
  537|  1.33k|  }
  538|      6|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  58.1k|}
xmltok.c:normal_scanHexCharRef:
  483|  56.8k|                       const char **nextTokPtr) {
  484|  56.8k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  56.8k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  56.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  56.8k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 56.8k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  56.8k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  56.8k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  56.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  486|  25.1k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 25.1k, False: 31.6k]
  ------------------
  487|  56.8k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 31.6k, False: 25.1k]
  ------------------
  488|  56.8k|      break;
  489|     10|    default:
  ------------------
  |  Branch (489:5): [True: 10, False: 56.8k]
  ------------------
  490|     10|      *nextTokPtr = ptr;
  491|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  492|  56.8k|    }
  493|   204k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  56.8k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|   147k|#  define MINBPC(enc) 1
  ------------------
  494|   204k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   204k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   204k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  495|   101k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 101k, False: 103k]
  ------------------
  496|   147k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 46.8k, False: 157k]
  ------------------
  497|   147k|        break;
  498|  56.7k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 56.7k, False: 147k]
  ------------------
  499|  56.7k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  56.7k|#  define MINBPC(enc) 1
  ------------------
  500|  56.7k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  56.7k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|      4|      default:
  ------------------
  |  Branch (501:7): [True: 4, False: 204k]
  ------------------
  502|      4|        *nextTokPtr = ptr;
  503|      4|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  504|   204k|      }
  505|   204k|    }
  506|  56.8k|  }
  507|     11|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  56.8k|}
xmltok.c:normal_cdataSectionTok:
  356|   286k|                        const char **nextTokPtr) {
  357|   286k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 169, False: 286k]
  ------------------
  358|    169|    return XML_TOK_NONE;
  ------------------
  |  |   51|    169|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|   286k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|   286k|#  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|   286k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   286k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   286k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  369|  94.7k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 94.7k, False: 192k]
  ------------------
  370|  94.7k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  94.7k|#  define MINBPC(enc) 1
  ------------------
  371|  94.7k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  94.7k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  94.7k|    {                                                                          \
  |  |  |  |  135|  94.7k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  94.7k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  94.7k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 94.7k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  94.7k|    }
  |  |  ------------------
  ------------------
  372|  94.7k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  300|  94.7k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (372:9): [True: 11.5k, False: 83.2k]
  ------------------
  373|  11.5k|      break;
  374|  83.2k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  83.2k|#  define MINBPC(enc) 1
  ------------------
  375|  83.2k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  83.2k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  83.2k|    {                                                                          \
  |  |  |  |  135|  83.2k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  83.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  83.2k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 83.2k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  83.2k|    }
  |  |  ------------------
  ------------------
  376|  83.2k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  83.2k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (376:9): [True: 11.3k, False: 71.8k]
  ------------------
  377|  11.3k|      ptr -= MINBPC(enc);
  ------------------
  |  |  242|  11.3k|#  define MINBPC(enc) 1
  ------------------
  378|  11.3k|      break;
  379|  11.3k|    }
  380|  71.8k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  71.8k|#  define MINBPC(enc) 1
  ------------------
  381|  71.8k|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|  71.8k|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  24.0k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 24.0k, False: 262k]
  ------------------
  383|  24.0k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  24.0k|#  define MINBPC(enc) 1
  ------------------
  384|  24.0k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  24.0k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  24.0k|    {                                                                          \
  |  |  |  |  135|  24.0k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  24.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  24.0k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 9, False: 24.0k]
  |  |  |  |  ------------------
  |  |  |  |  136|      9|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      9|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      9|      }                                                                        \
  |  |  |  |  138|  24.0k|    }
  |  |  ------------------
  ------------------
  385|  24.0k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  24.0k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  24.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 1.48k, False: 22.5k]
  ------------------
  386|  1.48k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.48k|#  define MINBPC(enc) 1
  ------------------
  387|  24.0k|    *nextTokPtr = ptr;
  388|  24.0k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  24.0k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|   116k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 116k, False: 170k]
  ------------------
  390|   116k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   116k|#  define MINBPC(enc) 1
  ------------------
  391|   116k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   116k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|   116k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  14.3k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  14.3k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 14.3k, False: 272k]
  |  |  |  |  ------------------
  |  |  |  |   50|  14.3k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 3, False: 14.3k]
  |  |  |  |  ------------------
  |  |  |  |   51|  14.3k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  14.3k|    if (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: 6, False: 14.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      6|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      6|    }                                                                          \
  |  |  |  |   56|  14.3k|    ptr += n;                                                                  \
  |  |  |  |   57|  14.3k|    break;
  |  |  ------------------
  |  |   61|  14.3k|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  5.09k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 5.10k, False: 281k]
  |  |  |  |  ------------------
  |  |  |  |   50|  5.10k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 3, False: 5.09k]
  |  |  |  |  ------------------
  |  |  |  |   51|  5.09k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  5.09k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  5.09k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  5.09k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 5.09k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      4|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      4|    }                                                                          \
  |  |  |  |   56|  5.09k|    ptr += n;                                                                  \
  |  |  |  |   57|  5.09k|    break;
  |  |  ------------------
  |  |   62|  5.09k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  4.54k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 4.54k, False: 282k]
  |  |  |  |  ------------------
  |  |  |  |   50|  4.54k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 4.54k]
  |  |  |  |  ------------------
  |  |  |  |   51|  4.54k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  4.54k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  4.54k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  4.54k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 4.54k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      3|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      3|    }                                                                          \
  |  |  |  |   56|  4.54k|    ptr += n;                                                                  \
  |  |  |  |   57|  4.54k|    break;
  |  |  ------------------
  |  |   63|  4.54k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 23, False: 286k]
  |  |  ------------------
  |  |   64|     25|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 2, False: 286k]
  |  |  ------------------
  |  |   65|     28|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 3, False: 286k]
  |  |  ------------------
  |  |   66|     28|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     28|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     28|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  27.5k|  default:
  ------------------
  |  Branch (393:3): [True: 27.5k, False: 259k]
  ------------------
  394|  27.5k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  27.5k|#  define MINBPC(enc) 1
  ------------------
  395|  27.5k|    break;
  396|   286k|  }
  397|  16.0M|  while (HAS_CHAR(enc, ptr, end)) {
  398|  16.0M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  16.0M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  16.0M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  399|      0|#  define LEAD_CASE(n)                                                         \
  400|      0|  case BT_LEAD##n:                                                             \
  401|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  402|      0|      *nextTokPtr = ptr;                                                       \
  403|      0|      return XML_TOK_DATA_CHARS;                                               \
  404|      0|    }                                                                          \
  405|      0|    ptr += n;                                                                  \
  406|      0|    break;
  407|  13.2M|      LEAD_CASE(2)
  ------------------
  |  |  400|  13.2M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 13.2M, False: 2.85M]
  |  |  ------------------
  |  |  401|  13.2M|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  13.2M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  13.2M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 4, False: 13.2M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 2, False: 13.2M]
  |  |  ------------------
  |  |  402|      6|      *nextTokPtr = ptr;                                                       \
  |  |  403|      6|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      6|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      6|    }                                                                          \
  |  |  405|  13.2M|    ptr += n;                                                                  \
  |  |  406|  13.2M|    break;
  ------------------
  408|  1.39M|      LEAD_CASE(3)
  ------------------
  |  |  400|  1.39M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 1.39M, False: 14.6M]
  |  |  ------------------
  |  |  401|  1.39M|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  1.39M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.39M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 3, False: 1.39M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 2, False: 1.39M]
  |  |  ------------------
  |  |  402|      5|      *nextTokPtr = ptr;                                                       \
  |  |  403|      5|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      5|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      5|    }                                                                          \
  |  |  405|  1.39M|    ptr += n;                                                                  \
  |  |  406|  1.39M|    break;
  ------------------
  409|  84.4k|      LEAD_CASE(4)
  ------------------
  |  |  400|  84.4k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 84.4k, False: 15.9M]
  |  |  ------------------
  |  |  401|  84.4k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  84.4k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  84.4k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 1, False: 84.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 1, False: 84.4k]
  |  |  ------------------
  |  |  402|      2|      *nextTokPtr = ptr;                                                       \
  |  |  403|      2|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      2|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      2|    }                                                                          \
  |  |  405|  84.4k|    ptr += n;                                                                  \
  |  |  406|  84.4k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|     19|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 19, False: 16.0M]
  ------------------
  412|     21|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 2, False: 16.0M]
  ------------------
  413|     23|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 2, False: 16.0M]
  ------------------
  414|  2.68k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 2.66k, False: 16.0M]
  ------------------
  415|  56.1k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 53.4k, False: 16.0M]
  ------------------
  416|  74.2k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 18.1k, False: 16.0M]
  ------------------
  417|  74.2k|      *nextTokPtr = ptr;
  418|  74.2k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  74.2k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|  1.29M|    default:
  ------------------
  |  Branch (419:5): [True: 1.29M, False: 14.7M]
  ------------------
  420|  1.29M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.29M|#  define MINBPC(enc) 1
  ------------------
  421|  1.29M|      break;
  422|  16.0M|    }
  423|  16.0M|  }
  424|    144|  *nextTokPtr = ptr;
  425|    144|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    144|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  74.4k|}
xmltok.c:normal_attributeValueTok:
 1262|  30.4M|                          const char **nextTokPtr) {
 1263|  30.4M|  const char *start;
 1264|  30.4M|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 3.30M, False: 27.1M]
  ------------------
 1265|  3.30M|    return XML_TOK_NONE;
  ------------------
  |  |   51|  3.30M|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|  27.1M|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  27.1M|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  27.1M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  27.1M|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 27.1M]
  ------------------
 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|  27.1M|  start = ptr;
 1275|  1.66G|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  1.66G|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.66G|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.66G|  (((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.12G|      LEAD_CASE(2)
  ------------------
  |  | 1278|  1.12G|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 1.12G, False: 533M]
  |  |  ------------------
  |  | 1279|  1.12G|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  1.12G|    break;
  ------------------
 1282|   200M|      LEAD_CASE(3)
  ------------------
  |  | 1278|   200M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 200M, False: 1.46G]
  |  |  ------------------
  |  | 1279|   200M|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|   200M|    break;
  ------------------
 1283|  9.07M|      LEAD_CASE(4)
  ------------------
  |  | 1278|  9.07M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 9.07M, False: 1.65G]
  |  |  ------------------
  |  | 1279|  9.07M|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  9.07M|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|  4.66M|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 4.66M, False: 1.65G]
  ------------------
 1286|  4.66M|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 3.51M, False: 1.14M]
  ------------------
 1287|  3.51M|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  3.51M|#define PREFIX(ident) normal_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  3.51M|#  define MINBPC(enc) 1
  ------------------
 1288|  1.14M|      *nextTokPtr = ptr;
 1289|  1.14M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.14M|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|     11|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 11, False: 1.66G]
  ------------------
 1291|       |      /* this is for inside entity references */
 1292|     11|      *nextTokPtr = ptr;
 1293|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
 1294|  14.9M|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 14.9M, False: 1.64G]
  ------------------
 1295|  14.9M|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 10.0M, False: 4.88M]
  ------------------
 1296|  10.0M|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  10.0M|#  define MINBPC(enc) 1
  ------------------
 1297|  10.0M|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  10.0M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|  10.0M|      }
 1299|  4.88M|      *nextTokPtr = ptr;
 1300|  4.88M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  4.88M|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|   623k|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 623k, False: 1.66G]
  ------------------
 1302|   623k|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 555k, False: 67.6k]
  ------------------
 1303|   555k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   555k|#  define MINBPC(enc) 1
  ------------------
 1304|   555k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   555k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   555k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   555k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 1.30k, False: 554k]
  ------------------
 1305|  1.30k|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|  1.30k|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|   554k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|   554k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   554k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 21.4k, False: 532k]
  ------------------
 1307|  21.4k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  21.4k|#  define MINBPC(enc) 1
  ------------------
 1308|   554k|        *nextTokPtr = ptr;
 1309|   554k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   554k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|   555k|      }
 1311|  67.6k|      *nextTokPtr = ptr;
 1312|  67.6k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  67.6k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  6.76M|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 6.76M, False: 1.65G]
  ------------------
 1314|  6.76M|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 3.40M, False: 3.36M]
  ------------------
 1315|  3.40M|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.40M|#  define MINBPC(enc) 1
  ------------------
 1316|  3.40M|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  3.40M|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  3.40M|      }
 1318|  3.36M|      *nextTokPtr = ptr;
 1319|  3.36M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  3.36M|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|   297M|    default:
  ------------------
  |  Branch (1320:5): [True: 297M, False: 1.36G]
  ------------------
 1321|   297M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   297M|#  define MINBPC(enc) 1
  ------------------
 1322|   297M|      break;
 1323|  1.66G|    }
 1324|  1.66G|  }
 1325|   106k|  *nextTokPtr = ptr;
 1326|   106k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   106k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|  27.1M|}
xmltok.c:normal_entityValueTok:
 1331|   895k|                       const char **nextTokPtr) {
 1332|   895k|  const char *start;
 1333|   895k|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 4.14k, False: 890k]
  ------------------
 1334|  4.14k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  4.14k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|   890k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   890k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   890k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   890k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 890k]
  ------------------
 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|   890k|  start = ptr;
 1344|  70.5M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  70.5M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  70.5M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  70.5M|  (((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|    627|      LEAD_CASE(2)
  ------------------
  |  | 1347|    627|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 627, False: 70.5M]
  |  |  ------------------
  |  | 1348|    627|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|    627|    break;
  ------------------
 1351|    245|      LEAD_CASE(3)
  ------------------
  |  | 1347|    245|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 245, False: 70.5M]
  |  |  ------------------
  |  | 1348|    245|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|    245|    break;
  ------------------
 1352|    245|      LEAD_CASE(4)
  ------------------
  |  | 1347|    245|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 245, False: 70.5M]
  |  |  ------------------
  |  | 1348|    245|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|    245|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  94.5k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 94.5k, False: 70.4M]
  ------------------
 1355|  94.5k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 70.2k, False: 24.3k]
  ------------------
 1356|  70.2k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  70.2k|#define PREFIX(ident) normal_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  70.2k|#  define MINBPC(enc) 1
  ------------------
 1357|  24.3k|      *nextTokPtr = ptr;
 1358|  24.3k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  24.3k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      4|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 4, False: 70.5M]
  ------------------
 1360|      4|      if (ptr == start) {
  ------------------
  |  Branch (1360:11): [True: 3, False: 1]
  ------------------
 1361|      3|        int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|      3|#define PREFIX(ident) normal_##ident
  ------------------
                      int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|      3|#  define MINBPC(enc) 1
  ------------------
 1362|      3|        return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   89|      3|#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: 2]
  ------------------
 1363|      3|      }
 1364|      1|      *nextTokPtr = ptr;
 1365|      1|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|      1|#define XML_TOK_DATA_CHARS 6
  ------------------
 1366|   151k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 151k, False: 70.3M]
  ------------------
 1367|   151k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 115k, False: 36.3k]
  ------------------
 1368|   115k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   115k|#  define MINBPC(enc) 1
  ------------------
 1369|   115k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   115k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|   115k|      }
 1371|  36.3k|      *nextTokPtr = ptr;
 1372|  36.3k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  36.3k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|   642k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 642k, False: 69.9M]
  ------------------
 1374|   642k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 344k, False: 297k]
  ------------------
 1375|   344k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   344k|#  define MINBPC(enc) 1
  ------------------
 1376|   344k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   344k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   344k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   344k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 569, False: 343k]
  ------------------
 1377|    569|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    569|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|   343k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|   343k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   343k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 417, False: 343k]
  ------------------
 1379|    417|          ptr += MINBPC(enc);
  ------------------
  |  |  242|    417|#  define MINBPC(enc) 1
  ------------------
 1380|   343k|        *nextTokPtr = ptr;
 1381|   343k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   343k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|   344k|      }
 1383|   297k|      *nextTokPtr = ptr;
 1384|   297k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   297k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  69.6M|    default:
  ------------------
  |  Branch (1385:5): [True: 69.6M, False: 889k]
  ------------------
 1386|  69.6M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  69.6M|#  define MINBPC(enc) 1
  ------------------
 1387|  69.6M|      break;
 1388|  70.5M|    }
 1389|  70.5M|  }
 1390|  2.15k|  *nextTokPtr = ptr;
 1391|  2.15k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.15k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|   890k|}
xmltok.c:normal_nameMatchesAscii:
 1715|  91.1k|                         const char *end1, const char *ptr2) {
 1716|  91.1k|  UNUSED_P(enc);
  ------------------
  |  |  135|  91.1k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|   487k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  242|   396k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1717:10): [True: 427k, False: 59.7k]
  ------------------
 1718|   427k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  242|   427k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1718:9): [True: 33, False: 427k]
  ------------------
 1719|       |      /* This line cannot be executed.  The incoming data has already
 1720|       |       * been tokenized once, so incomplete characters like this have
 1721|       |       * already been eliminated from the input.  Retaining the
 1722|       |       * paranoia check is still valuable, however.
 1723|       |       */
 1724|     33|      return 0; /* LCOV_EXCL_LINE */
 1725|     33|    }
 1726|   427k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  300|   427k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (1726:9): [True: 31.3k, False: 396k]
  ------------------
 1727|  31.3k|      return 0;
 1728|   427k|  }
 1729|  59.7k|  return ptr1 == end1;
 1730|  91.1k|}
xmltok.c:normal_nameLength:
 1733|  2.49M|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  2.49M|  const char *start = ptr;
 1735|  7.84M|  for (;;) {
 1736|  7.84M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  7.84M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  7.84M|  (((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|  1.51M|      LEAD_CASE(2)
  ------------------
  |  | 1738|  1.51M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 1.51M, False: 6.32M]
  |  |  ------------------
  |  | 1739|  1.51M|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|  1.51M|    break;
  ------------------
 1742|  8.90k|      LEAD_CASE(3)
  ------------------
  |  | 1738|  8.90k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 8.90k, False: 7.83M]
  |  |  ------------------
  |  | 1739|  8.90k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|  8.90k|    break;
  ------------------
 1743|      0|      LEAD_CASE(4)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 7.84M]
  |  |  ------------------
  |  | 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: 7.84M]
  ------------------
 1746|  2.56M|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 2.56M, False: 5.27M]
  ------------------
 1747|  2.56M|#  ifdef XML_NS
 1748|  2.56M|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 7.84M]
  ------------------
 1749|  2.56M|#  endif
 1750|  3.80M|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 1.24M, False: 6.60M]
  ------------------
 1751|  3.81M|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 6.74k, False: 7.83M]
  ------------------
 1752|  3.82M|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 4.03k, False: 7.84M]
  ------------------
 1753|  3.82M|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 2.23k, False: 7.84M]
  ------------------
 1754|  3.82M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.82M|#  define MINBPC(enc) 1
  ------------------
 1755|  3.82M|      break;
 1756|  2.49M|    default:
  ------------------
  |  Branch (1756:5): [True: 2.49M, False: 5.34M]
  ------------------
 1757|  2.49M|      return (int)(ptr - start);
 1758|  7.84M|    }
 1759|  7.84M|  }
 1760|  2.49M|}
xmltok.c:normal_getAtts:
 1510|  2.36M|                ATTRIBUTE *atts) {
 1511|  2.36M|  enum { other, inName, inValue } state = inName;
 1512|  2.36M|  int nAtts = 0;
 1513|  2.36M|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  34.2M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  2.36M|#  define MINBPC(enc) 1
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  31.9M|#  define MINBPC(enc) 1
  ------------------
 1517|  34.2M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  34.2M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  34.2M|  (((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|  3.12M|      LEAD_CASE(2)
  ------------------
  |  | 1527|  3.12M|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 3.12M, False: 31.1M]
  |  |  ------------------
  |  | 1528|  3.12M|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  3.12M|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 118k, False: 3.00M]
  |  |  |  |  ------------------
  |  |  |  | 1520|   118k|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 61.8k, False: 56.7k]
  |  |  |  |  ------------------
  |  |  |  | 1521|  61.8k|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|  61.8k|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|  61.8k|      }                                                                        \
  |  |  |  | 1524|   118k|      state = inName;                                                          \
  |  |  |  | 1525|   118k|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  242|  3.12M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|  3.12M|    break;
  ------------------
 1531|   674k|      LEAD_CASE(3)
  ------------------
  |  | 1527|   674k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 674k, False: 33.6M]
  |  |  ------------------
  |  | 1528|   674k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|   674k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 8.37k, False: 666k]
  |  |  |  |  ------------------
  |  |  |  | 1520|  8.37k|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 4.55k, False: 3.81k]
  |  |  |  |  ------------------
  |  |  |  | 1521|  4.55k|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|  4.55k|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|  4.55k|      }                                                                        \
  |  |  |  | 1524|  8.37k|      state = inName;                                                          \
  |  |  |  | 1525|  8.37k|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  242|   674k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|   674k|    break;
  ------------------
 1532|  5.83k|      LEAD_CASE(4)
  ------------------
  |  | 1527|  5.83k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 5.83k, False: 34.2M]
  |  |  ------------------
  |  | 1528|  5.83k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  5.83k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 5.83k]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  242|  5.83k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|  5.83k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|      0|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 0, False: 34.2M]
  ------------------
 1535|  15.9M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 15.9M, False: 18.3M]
  ------------------
 1536|  17.4M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 1.49M, False: 32.7M]
  ------------------
 1537|  17.4M|      START_NAME
  ------------------
  |  | 1519|  17.4M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 1.62M, False: 15.8M]
  |  |  ------------------
  |  | 1520|  1.62M|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 818k, False: 805k]
  |  |  ------------------
  |  | 1521|   818k|        atts[nAtts].name = ptr;                                                \
  |  | 1522|   818k|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|   818k|      }                                                                        \
  |  | 1524|  1.62M|      state = inName;                                                          \
  |  | 1525|  1.62M|    }
  ------------------
 1538|  17.4M|      break;
 1539|      0|#  undef START_NAME
 1540|   324k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 324k, False: 33.9M]
  ------------------
 1541|   324k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 161k, False: 162k]
  ------------------
 1542|   161k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 88.1k, False: 73.5k]
  ------------------
 1543|  88.1k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  88.1k|#  define MINBPC(enc) 1
  ------------------
 1544|   161k|        state = inValue;
 1545|   161k|        open = BT_QUOT;
 1546|   162k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 161k, False: 754]
  ------------------
 1547|   161k|        state = other;
 1548|   161k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 88.1k, False: 73.5k]
  ------------------
 1549|  88.1k|          atts[nAtts].valueEnd = ptr;
 1550|   161k|        nAtts++;
 1551|   161k|      }
 1552|   324k|      break;
 1553|  3.20M|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 3.20M, False: 31.0M]
  ------------------
 1554|  3.20M|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 1.58M, False: 1.61M]
  ------------------
 1555|  1.58M|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 796k, False: 792k]
  ------------------
 1556|   796k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   796k|#  define MINBPC(enc) 1
  ------------------
 1557|  1.58M|        state = inValue;
 1558|  1.58M|        open = BT_APOS;
 1559|  1.61M|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 1.58M, False: 25.8k]
  ------------------
 1560|  1.58M|        state = other;
 1561|  1.58M|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 796k, False: 792k]
  ------------------
 1562|   796k|          atts[nAtts].valueEnd = ptr;
 1563|  1.58M|        nAtts++;
 1564|  1.58M|      }
 1565|  3.20M|      break;
 1566|  49.8k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 49.8k, False: 34.2M]
  ------------------
 1567|  49.8k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 47.2k, False: 2.65k]
  ------------------
 1568|  47.2k|        atts[nAtts].normalized = 0;
 1569|  49.8k|      break;
 1570|  1.34M|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 1.34M, False: 32.9M]
  ------------------
 1571|  1.34M|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 50.7k, False: 1.29M]
  ------------------
 1572|  50.7k|        state = other;
 1573|  1.29M|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 100k, False: 1.19M]
  |  Branch (1573:36): [True: 73.0k, False: 27.9k]
  |  Branch (1573:55): [True: 25.4k, False: 47.5k]
  ------------------
 1574|  1.29M|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 14.2k, False: 11.2k]
  ------------------
 1575|  25.4k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  266|  11.2k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|  36.7k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 9.08k, False: 2.14k]
  ------------------
 1576|  25.4k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  266|  2.14k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|  27.6k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 1.01k, False: 1.12k]
  ------------------
 1577|  25.4k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  255|  1.12k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.12k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 291, False: 831]
  ------------------
 1578|  24.6k|        atts[nAtts].normalized = 0;
 1579|  1.34M|      break;
 1580|  1.34M|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 1.34M, False: 32.9M]
  ------------------
 1581|  2.32M|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 980k, False: 33.2M]
  ------------------
 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.32M|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 77.6k, False: 2.24M]
  ------------------
 1585|  77.6k|        state = other;
 1586|  2.24M|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 1.34M, False: 895k]
  |  Branch (1586:36): [True: 1.32M, False: 20.0k]
  ------------------
 1587|  1.32M|        atts[nAtts].normalized = 0;
 1588|  2.32M|      break;
 1589|  2.36M|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 2.36M, False: 31.9M]
  ------------------
 1590|  2.43M|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 72.5k, False: 34.2M]
  ------------------
 1591|  2.43M|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 2.36M, False: 70.5k]
  ------------------
 1592|  2.36M|        return nAtts;
 1593|  70.5k|      break;
 1594|  3.33M|    default:
  ------------------
  |  Branch (1594:5): [True: 3.33M, False: 30.9M]
  ------------------
 1595|  3.33M|      break;
 1596|  34.2M|    }
 1597|  34.2M|  }
 1598|       |  /* not reached */
 1599|  2.36M|}
xmltok.c:normal_charRefNumber:
 1602|  55.2k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  55.2k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  55.2k|  UNUSED_P(enc);
  ------------------
  |  |  135|  55.2k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  55.2k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  242|  55.2k|#  define MINBPC(enc) 1
  ------------------
 1607|  55.2k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  300|  55.2k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 54.2k, False: 1.00k]
  |  |  ------------------
  ------------------
 1608|   255k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  242|  54.2k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  300|   255k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (1608:30): [True: 201k, False: 54.1k]
  ------------------
 1609|   201k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  242|   201k|#  define MINBPC(enc) 1
  ------------------
 1610|   201k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  266|   201k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1611|   201k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 201k]
  ------------------
 1612|  13.1k|      case ASCII_0:
  ------------------
  |  |   90|  13.1k|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 13.1k, False: 188k]
  ------------------
 1613|  22.6k|      case ASCII_1:
  ------------------
  |  |   91|  22.6k|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 9.50k, False: 191k]
  ------------------
 1614|  24.5k|      case ASCII_2:
  ------------------
  |  |   92|  24.5k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 1.91k, False: 199k]
  ------------------
 1615|  47.3k|      case ASCII_3:
  ------------------
  |  |   93|  47.3k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 22.7k, False: 178k]
  ------------------
 1616|  57.2k|      case ASCII_4:
  ------------------
  |  |   94|  57.2k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 9.95k, False: 191k]
  ------------------
 1617|  59.9k|      case ASCII_5:
  ------------------
  |  |   95|  59.9k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 2.60k, False: 198k]
  ------------------
 1618|  80.4k|      case ASCII_6:
  ------------------
  |  |   96|  80.4k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 20.5k, False: 180k]
  ------------------
 1619|   101k|      case ASCII_7:
  ------------------
  |  |   97|   101k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 21.3k, False: 179k]
  ------------------
 1620|   112k|      case ASCII_8:
  ------------------
  |  |   98|   112k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 10.9k, False: 190k]
  ------------------
 1621|   123k|      case ASCII_9:
  ------------------
  |  |   99|   123k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 10.7k, False: 190k]
  ------------------
 1622|   123k|        result <<= 4;
 1623|   123k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|   123k|#define ASCII_0 0x30
  ------------------
 1624|   123k|        break;
 1625|  39.8k|      case ASCII_A:
  ------------------
  |  |   36|  39.8k|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 39.8k, False: 161k]
  ------------------
 1626|  40.1k|      case ASCII_B:
  ------------------
  |  |   37|  40.1k|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 304, False: 200k]
  ------------------
 1627|  40.4k|      case ASCII_C:
  ------------------
  |  |   38|  40.4k|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 268, False: 201k]
  ------------------
 1628|  40.7k|      case ASCII_D:
  ------------------
  |  |   39|  40.7k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 353, False: 200k]
  ------------------
 1629|  43.4k|      case ASCII_E:
  ------------------
  |  |   40|  43.4k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 2.65k, False: 198k]
  ------------------
 1630|  46.9k|      case ASCII_F:
  ------------------
  |  |   41|  46.9k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 3.53k, False: 197k]
  ------------------
 1631|  46.9k|        result <<= 4;
 1632|  46.9k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  46.9k|#define ASCII_A 0x41
  ------------------
 1633|  46.9k|        break;
 1634|  14.9k|      case ASCII_a:
  ------------------
  |  |   63|  14.9k|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 14.9k, False: 186k]
  ------------------
 1635|  15.2k|      case ASCII_b:
  ------------------
  |  |   64|  15.2k|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 286, False: 200k]
  ------------------
 1636|  18.8k|      case ASCII_c:
  ------------------
  |  |   65|  18.8k|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 3.59k, False: 197k]
  ------------------
 1637|  20.0k|      case ASCII_d:
  ------------------
  |  |   66|  20.0k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 1.15k, False: 200k]
  ------------------
 1638|  25.3k|      case ASCII_e:
  ------------------
  |  |   67|  25.3k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 5.31k, False: 195k]
  ------------------
 1639|  30.8k|      case ASCII_f:
  ------------------
  |  |   68|  30.8k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 5.48k, False: 195k]
  ------------------
 1640|  30.8k|        result <<= 4;
 1641|  30.8k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  30.8k|#define ASCII_a 0x61
  ------------------
 1642|  30.8k|        break;
 1643|   201k|      }
 1644|   201k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 21, False: 201k]
  ------------------
 1645|     21|        return -1;
 1646|   201k|    }
 1647|  54.2k|  } else {
 1648|  4.36k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  300|  4.36k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  3.36k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1648:12): [True: 3.37k, False: 995]
  ------------------
 1649|  3.37k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  266|  3.37k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1650|  3.37k|      result *= 10;
 1651|  3.37k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  3.37k|#define ASCII_0 0x30
  ------------------
 1652|  3.37k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 8, False: 3.36k]
  ------------------
 1653|      8|        return -1;
 1654|  3.37k|    }
 1655|  1.00k|  }
 1656|  55.1k|  return checkCharRefNumber(result);
 1657|  55.2k|}
xmltok.c:normal_predefinedEntityName:
 1661|  3.86M|                             const char *end) {
 1662|  3.86M|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.86M|#  define UNUSED_P(p) (void)p
  ------------------
 1663|  3.86M|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  242|  3.86M|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1663:11): [True: 3.74M, False: 120k]
  ------------------
 1664|  82.1k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 82.1k, False: 3.78M]
  ------------------
 1665|  82.1k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  300|  82.1k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 9.16k, False: 73.0k]
  |  |  ------------------
  ------------------
 1666|  9.16k|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  9.16k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  |  |  ------------------
  |  |  |  Branch (266:33): [True: 0, False: 9.16k]
  |  |  ------------------
  ------------------
 1667|  8.27k|      case ASCII_l:
  ------------------
  |  |   74|  8.27k|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 8.27k, False: 881]
  ------------------
 1668|  8.27k|        return ASCII_LT;
  ------------------
  |  |  111|  8.27k|#define ASCII_LT 0x3C
  ------------------
 1669|    881|      case ASCII_g:
  ------------------
  |  |   69|    881|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 881, False: 8.27k]
  ------------------
 1670|    881|        return ASCII_GT;
  ------------------
  |  |  113|    881|#define ASCII_GT 0x3E
  ------------------
 1671|  9.16k|      }
 1672|  9.16k|    }
 1673|  73.0k|    break;
 1674|  73.0k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.64k, False: 3.86M]
  ------------------
 1675|  1.64k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  300|  1.64k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 902, False: 744]
  |  |  ------------------
  ------------------
 1676|    902|      ptr += MINBPC(enc);
  ------------------
  |  |  242|    902|#  define MINBPC(enc) 1
  ------------------
 1677|    902|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  300|    902|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 683, False: 219]
  |  |  ------------------
  ------------------
 1678|    683|        ptr += MINBPC(enc);
  ------------------
  |  |  242|    683|#  define MINBPC(enc) 1
  ------------------
 1679|    683|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  300|    683|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 488, False: 195]
  |  |  ------------------
  ------------------
 1680|    488|          return ASCII_AMP;
  ------------------
  |  |  105|    488|#define ASCII_AMP 0x26
  ------------------
 1681|    683|      }
 1682|    902|    }
 1683|  1.15k|    break;
 1684|  36.9k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 36.9k, False: 3.82M]
  ------------------
 1685|  36.9k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  36.9k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  |  |  ------------------
  |  |  |  Branch (266:33): [True: 866, False: 36.0k]
  |  |  ------------------
  ------------------
 1686|  35.1k|    case ASCII_q:
  ------------------
  |  |   79|  35.1k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 35.1k, False: 1.84k]
  ------------------
 1687|  35.1k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  35.1k|#  define MINBPC(enc) 1
  ------------------
 1688|  35.1k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  300|  35.1k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 627, False: 34.4k]
  |  |  ------------------
  ------------------
 1689|    627|        ptr += MINBPC(enc);
  ------------------
  |  |  242|    627|#  define MINBPC(enc) 1
  ------------------
 1690|    627|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  300|    627|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 409, False: 218]
  |  |  ------------------
  ------------------
 1691|    409|          ptr += MINBPC(enc);
  ------------------
  |  |  242|    409|#  define MINBPC(enc) 1
  ------------------
 1692|    409|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  300|    409|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 199, False: 210]
  |  |  ------------------
  ------------------
 1693|    199|            return ASCII_QUOT;
  ------------------
  |  |  104|    199|#define ASCII_QUOT 0x22
  ------------------
 1694|    409|        }
 1695|    627|      }
 1696|  34.9k|      break;
 1697|  34.9k|    case ASCII_a:
  ------------------
  |  |   63|    976|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 976, False: 35.9k]
  ------------------
 1698|    976|      ptr += MINBPC(enc);
  ------------------
  |  |  242|    976|#  define MINBPC(enc) 1
  ------------------
 1699|    976|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  300|    976|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 737, False: 239]
  |  |  ------------------
  ------------------
 1700|    737|        ptr += MINBPC(enc);
  ------------------
  |  |  242|    737|#  define MINBPC(enc) 1
  ------------------
 1701|    737|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  300|    737|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 530, False: 207]
  |  |  ------------------
  ------------------
 1702|    530|          ptr += MINBPC(enc);
  ------------------
  |  |  242|    530|#  define MINBPC(enc) 1
  ------------------
 1703|    530|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  300|    530|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 333, False: 197]
  |  |  ------------------
  ------------------
 1704|    333|            return ASCII_APOS;
  ------------------
  |  |  106|    333|#define ASCII_APOS 0x27
  ------------------
 1705|    530|        }
 1706|    737|      }
 1707|    643|      break;
 1708|  36.9k|    }
 1709|  3.86M|  }
 1710|  3.85M|  return 0;
 1711|  3.86M|}
xmltok.c:normal_updatePosition:
 1779|  4.32k|                       POSITION *pos) {
 1780|  6.76M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  6.76M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  6.76M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  6.76M|  (((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.07k|      LEAD_CASE(2)
  ------------------
  |  | 1783|  1.07k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 1.07k, False: 6.76M]
  |  |  ------------------
  |  | 1784|  1.07k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  1.07k|    pos->columnNumber++;                                                       \
  |  | 1786|  1.07k|    break;
  ------------------
 1788|  1.67k|      LEAD_CASE(3)
  ------------------
  |  | 1783|  1.67k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 1.67k, False: 6.76M]
  |  |  ------------------
  |  | 1784|  1.67k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  1.67k|    pos->columnNumber++;                                                       \
  |  | 1786|  1.67k|    break;
  ------------------
 1789|    342|      LEAD_CASE(4)
  ------------------
  |  | 1783|    342|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 342, False: 6.76M]
  |  |  ------------------
  |  | 1784|    342|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|    342|    pos->columnNumber++;                                                       \
  |  | 1786|    342|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|   107k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 107k, False: 6.65M]
  ------------------
 1792|   107k|      pos->columnNumber = 0;
 1793|   107k|      pos->lineNumber++;
 1794|   107k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   107k|#  define MINBPC(enc) 1
  ------------------
 1795|   107k|      break;
 1796|  82.9k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 82.9k, False: 6.68M]
  ------------------
 1797|  82.9k|      pos->lineNumber++;
 1798|  82.9k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  82.9k|#  define MINBPC(enc) 1
  ------------------
 1799|  82.9k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|  82.9k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   165k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  82.9k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 82.9k, False: 70]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  82.9k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  82.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 2.16k, False: 80.7k]
  ------------------
 1800|  2.16k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.16k|#  define MINBPC(enc) 1
  ------------------
 1801|  82.9k|      pos->columnNumber = 0;
 1802|  82.9k|      break;
 1803|  6.56M|    default:
  ------------------
  |  Branch (1803:5): [True: 6.56M, False: 193k]
  ------------------
 1804|  6.56M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  6.56M|#  define MINBPC(enc) 1
  ------------------
 1805|  6.56M|      pos->columnNumber++;
 1806|  6.56M|      break;
 1807|  6.76M|    }
 1808|  6.76M|  }
 1809|  4.32k|}
xmltok.c:normal_isPublicId:
 1450|  2.16k|                   const char **badPtr) {
 1451|  2.16k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.16k|#  define MINBPC(enc) 1
  ------------------
 1452|  2.16k|  end -= MINBPC(enc);
  ------------------
  |  |  242|  2.16k|#  define MINBPC(enc) 1
  ------------------
 1453|  8.59k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  8.57k|#  define MINBPC(enc) 1
  ------------------
 1454|  8.59k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  8.59k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  8.59k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1455|    263|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 263, False: 8.33k]
  ------------------
 1456|    921|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 658, False: 7.93k]
  ------------------
 1457|  1.13k|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 218, False: 8.37k]
  ------------------
 1458|  1.34k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 206, False: 8.38k]
  ------------------
 1459|  2.33k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 991, False: 7.60k]
  ------------------
 1460|  2.55k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 216, False: 8.37k]
  ------------------
 1461|  2.75k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 200, False: 8.39k]
  ------------------
 1462|  2.98k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 230, False: 8.36k]
  ------------------
 1463|  3.30k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 319, False: 8.27k]
  ------------------
 1464|  3.79k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 496, False: 8.09k]
  ------------------
 1465|  4.01k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 219, False: 8.37k]
  ------------------
 1466|  4.32k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 313, False: 8.28k]
  ------------------
 1467|  5.19k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 865, False: 7.72k]
  ------------------
 1468|  5.93k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 742, False: 7.85k]
  ------------------
 1469|  6.20k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 273, False: 8.32k]
  ------------------
 1470|  6.45k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 245, False: 8.34k]
  ------------------
 1471|  6.66k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 208, False: 8.38k]
  ------------------
 1472|  6.98k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 320, False: 8.27k]
  ------------------
 1473|  6.98k|#  ifdef XML_NS
 1474|  6.98k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 8.59k]
  ------------------
 1475|  6.98k|#  endif
 1476|  6.98k|      break;
 1477|    355|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 355, False: 8.23k]
  ------------------
 1478|    355|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  300|    355|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 3, False: 352]
  |  |  ------------------
  ------------------
 1479|      3|        *badPtr = ptr;
 1480|      3|        return 0;
 1481|      3|      }
 1482|    352|      break;
 1483|    352|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 336, False: 8.25k]
  ------------------
 1484|    859|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 523, False: 8.07k]
  ------------------
 1485|    859|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  266|    859|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  |  Branch (1485:11): [True: 849, False: 10]
  ------------------
 1486|    849|        break;
 1487|       |      /* fall through */
 1488|    407|    default:
  ------------------
  |  Branch (1488:5): [True: 397, False: 8.19k]
  ------------------
 1489|    407|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|    407|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1490|    197|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 197, False: 210]
  ------------------
 1491|    394|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 197, False: 210]
  ------------------
 1492|    394|        break;
 1493|     13|      default:
  ------------------
  |  Branch (1493:7): [True: 13, False: 394]
  ------------------
 1494|     13|        *badPtr = ptr;
 1495|     13|        return 0;
 1496|    407|      }
 1497|    394|      break;
 1498|  8.59k|    }
 1499|  8.59k|  }
 1500|  2.14k|  return 1;
 1501|  2.16k|}
xmltok.c:little2_prologTok:
 1018|  79.9k|                  const char **nextTokPtr) {
 1019|  79.9k|  int tok;
 1020|  79.9k|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 215, False: 79.7k]
  ------------------
 1021|    215|    return XML_TOK_NONE;
  ------------------
  |  |   51|    215|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  79.7k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  79.7k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|  79.7k|    size_t n = end - ptr;
 1024|  79.7k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  79.7k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1024:9): [True: 36.5k, False: 43.2k]
  ------------------
 1025|  36.5k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  36.5k|#  define MINBPC(enc) 2
  ------------------
 1026|  36.5k|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 48, False: 36.5k]
  ------------------
 1027|     48|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     48|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|  36.5k|      end = ptr + n;
 1029|  36.5k|    }
 1030|  79.7k|  }
 1031|  79.7k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  79.7k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  79.7k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  73.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 73.5k, False: 6.21k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1032|  1.05k|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 1.05k, False: 78.6k]
  ------------------
 1033|  1.05k|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.05k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.05k|#  define MINBPC(enc) 2
  ------------------
 1034|  4.19k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 4.19k, False: 75.5k]
  ------------------
 1035|  4.19k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  4.19k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  4.19k|#  define MINBPC(enc) 2
  ------------------
 1036|  9.90k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 9.90k, False: 69.8k]
  ------------------
 1037|  9.90k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  9.90k|#  define MINBPC(enc) 2
  ------------------
 1038|  9.90k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  9.90k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  9.90k|    {                                                                          \
  |  |  |  |  135|  9.90k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  9.90k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  9.90k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 9.90k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  9.90k|    }
  |  |  ------------------
  ------------------
 1039|  9.90k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  9.90k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  9.90k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  8.26k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 8, False: 9.89k]
  |  |  |  |  |  Branch (737:4): [True: 8.26k, False: 1.63k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  4.67k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 4.67k, False: 5.23k]
  ------------------
 1041|  4.67k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  4.67k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  4.67k|#  define MINBPC(enc) 2
  ------------------
 1042|  2.03k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 2.03k, False: 7.86k]
  ------------------
 1043|  2.03k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.03k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.03k|#  define MINBPC(enc) 2
  ------------------
 1044|  1.08k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 1.08k, False: 8.82k]
  ------------------
 1045|  1.55k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 471, False: 9.43k]
  ------------------
 1046|  3.16k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 1.61k, False: 8.28k]
  ------------------
 1047|  3.16k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 0, False: 9.90k]
  ------------------
 1048|  3.16k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 0, False: 9.90k]
  ------------------
 1049|  3.18k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 18, False: 9.88k]
  ------------------
 1050|  3.18k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  783|  3.18k|#  define MINBPC(enc) 2
  ------------------
 1051|  3.18k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  3.18k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  9.90k|    }
 1053|      8|    *nextTokPtr = ptr;
 1054|      8|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
 1055|  9.90k|  }
 1056|  5.78k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 5.78k, False: 73.9k]
  ------------------
 1057|  5.78k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  783|  5.78k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1057:9): [True: 60, False: 5.72k]
  ------------------
 1058|     60|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|     60|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|     60|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|     60|    }
 1062|       |    /* fall through */
 1063|  17.0k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 11.3k, False: 68.3k]
  ------------------
 1064|  24.5k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 7.54k, False: 72.1k]
  ------------------
 1065|  30.5k|    for (;;) {
 1066|  30.5k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  30.5k|#  define MINBPC(enc) 2
  ------------------
 1067|  30.5k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  30.5k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  30.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  30.5k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 139, False: 30.3k]
  ------------------
 1068|    139|        break;
 1069|  30.3k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  30.3k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  30.3k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  26.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 26.0k, False: 4.37k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1070|  3.48k|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 3.48k, False: 26.8k]
  ------------------
 1071|  4.98k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 1.49k, False: 28.8k]
  ------------------
 1072|  4.98k|        break;
 1073|    942|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 942, False: 29.4k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|    942|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  783|    942|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1075:13): [True: 935, False: 7]
  ------------------
 1076|    935|          break;
 1077|       |        /* fall through */
 1078|  24.4k|      default:
  ------------------
  |  Branch (1078:7): [True: 24.4k, False: 5.92k]
  ------------------
 1079|  24.4k|        *nextTokPtr = ptr;
 1080|  24.4k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|  24.4k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|  30.3k|      }
 1082|  30.3k|    }
 1083|    139|    *nextTokPtr = ptr;
 1084|    139|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    139|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  2.05k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 2.05k, False: 77.6k]
  ------------------
 1086|  2.05k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.05k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.05k|#  define MINBPC(enc) 2
  ------------------
 1087|  1.90k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 1.90k, False: 77.8k]
  ------------------
 1088|  1.90k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.90k|#  define MINBPC(enc) 2
  ------------------
 1089|  1.90k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  1.90k|#define XML_TOK_COMMA 38
  ------------------
 1090|    746|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 746, False: 78.9k]
  ------------------
 1091|    746|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    746|#  define MINBPC(enc) 2
  ------------------
 1092|    746|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|    746|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|    293|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 293, False: 79.4k]
  ------------------
 1094|    293|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    293|#  define MINBPC(enc) 2
  ------------------
 1095|    293|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    293|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    293|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    293|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 1, False: 292]
  ------------------
 1096|      1|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      1|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|    292|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  787|    292|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    292|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 282, False: 10]
  |  |  |  |  |  Branch (739:52): [True: 39, False: 243]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1098|     39|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     39|    {                                                                          \
  |  |  135|     39|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     39|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|     39|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 38]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     39|    }
  ------------------
 1099|     38|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  787|     38|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|     38|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 24, False: 14]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1100|      1|        *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  783|      1|#  define MINBPC(enc) 2
  ------------------
 1101|      1|        return XML_TOK_COND_SECT_CLOSE;
  ------------------
  |  |  103|      1|#define XML_TOK_COND_SECT_CLOSE 34      /* ]]> */
  ------------------
 1102|      1|      }
 1103|     38|    }
 1104|    290|    *nextTokPtr = ptr;
 1105|    290|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|    290|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  5.27k|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 5.27k, False: 74.4k]
  ------------------
 1107|  5.27k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  5.27k|#  define MINBPC(enc) 2
  ------------------
 1108|  5.27k|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  5.27k|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|  4.16k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 4.16k, False: 75.5k]
  ------------------
 1110|  4.16k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.16k|#  define MINBPC(enc) 2
  ------------------
 1111|  4.16k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  4.16k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  4.16k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  4.16k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 4, False: 4.15k]
  ------------------
 1112|      4|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|      4|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|  4.15k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  4.15k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  4.15k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.12k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 42, False: 4.11k]
  |  |  |  |  |  Branch (737:4): [True: 4.12k, False: 35]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|    186|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 186, False: 3.97k]
  ------------------
 1115|    186|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    186|#  define MINBPC(enc) 2
  ------------------
 1116|    186|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|    186|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|     66|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 66, False: 4.09k]
  ------------------
 1118|     66|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|     66|#  define MINBPC(enc) 2
  ------------------
 1119|     66|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|     66|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|     69|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 69, False: 4.09k]
  ------------------
 1121|     69|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|     69|#  define MINBPC(enc) 2
  ------------------
 1122|     69|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|     69|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|    624|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 624, False: 3.53k]
  ------------------
 1124|    908|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 284, False: 3.87k]
  ------------------
 1125|  1.23k|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 323, False: 3.83k]
  ------------------
 1126|  1.39k|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 160, False: 3.99k]
  ------------------
 1127|  1.86k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 471, False: 3.68k]
  ------------------
 1128|  2.85k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 992, False: 3.16k]
  ------------------
 1129|  3.79k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 942, False: 3.21k]
  ------------------
 1130|  3.79k|      *nextTokPtr = ptr;
 1131|  3.79k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  3.79k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|  4.15k|    }
 1133|     42|    *nextTokPtr = ptr;
 1134|     42|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     42|#define XML_TOK_INVALID 0
  ------------------
 1135|  2.46k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 2.46k, False: 77.2k]
  ------------------
 1136|  2.46k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.46k|#  define MINBPC(enc) 2
  ------------------
 1137|  2.46k|    return XML_TOK_OR;
  ------------------
  |  |   88|  2.46k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  2.95k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 2.95k, False: 76.7k]
  ------------------
 1139|  2.95k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.95k|#  define MINBPC(enc) 2
  ------------------
 1140|  2.95k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  2.95k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  2.68k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 2.68k, False: 77.0k]
  ------------------
 1142|  2.68k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.68k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.68k|#  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.7k]
  |  |  ------------------
  |  | 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.7k]
  |  |  ------------------
  |  | 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|     78|    LEAD_CASE(4)
  ------------------
  |  | 1144|     18|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 24, False: 79.7k]
  |  |  ------------------
  |  | 1145|     24|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 6, False: 18]
  |  |  ------------------
  |  | 1146|     18|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      6|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     18|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|     18|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      0|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      0|    }                                                                          \
  |  | 1151|     18|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  790|     18|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (790:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|     18|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  788|     18|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (788:35): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|     18|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     18|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|  5.81k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 5.81k, False: 73.9k]
  ------------------
 1168|  10.2k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 4.46k, False: 75.2k]
  ------------------
 1169|  10.2k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|  10.2k|#define XML_TOK_NAME 18
  ------------------
 1170|  10.2k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  10.2k|#  define MINBPC(enc) 2
  ------------------
 1171|  10.2k|    break;
 1172|    378|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 378, False: 79.3k]
  ------------------
 1173|    617|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 239, False: 79.4k]
  ------------------
 1174|    868|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 251, False: 79.4k]
  ------------------
 1175|    868|#  ifdef XML_NS
 1176|    868|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 79.7k]
  ------------------
 1177|    868|#  endif
 1178|    868|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    868|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|    868|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    868|#  define MINBPC(enc) 2
  ------------------
 1180|    868|    break;
 1181|  6.18k|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 6.18k, False: 73.5k]
  ------------------
 1182|  6.18k|    if (IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  791|  6.18k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  743|  6.18k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  6.18k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 5.82k, False: 353]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1183|  5.82k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  5.82k|#  define MINBPC(enc) 2
  ------------------
 1184|  5.82k|      tok = XML_TOK_NAME;
  ------------------
  |  |   85|  5.82k|#define XML_TOK_NAME 18
  ------------------
 1185|  5.82k|      break;
 1186|  5.82k|    }
 1187|    353|    if (IS_NAME_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  789|    353|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  741|    353|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|    353|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 293, False: 60]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1188|    293|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    293|#  define MINBPC(enc) 2
  ------------------
 1189|    293|      tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    293|#define XML_TOK_NMTOKEN 19
  ------------------
 1190|    293|      break;
 1191|    293|    }
 1192|       |    /* fall through */
 1193|     79|  default:
  ------------------
  |  Branch (1193:3): [True: 19, False: 79.7k]
  ------------------
 1194|     79|    *nextTokPtr = ptr;
 1195|     79|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     79|#define XML_TOK_INVALID 0
  ------------------
 1196|  79.7k|  }
 1197|  42.9k|  while (HAS_CHAR(enc, ptr, end)) {
 1198|  42.9k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  42.9k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  42.9k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  41.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 41.0k, False: 1.88k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1199|  87.9k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  25.7k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 1.86k, False: 41.0k]
  |  |  ------------------
  |  |   82|  25.7k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  1.86k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  1.86k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.86k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 48, False: 1.81k]
  |  |  ------------------
  |  |   83|     48|      *nextTokPtr = ptr;                                                       \
  |  |   84|     48|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     48|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     48|    }                                                                          \
  |  |   86|  25.7k|    /* fall through */                                                         \
  |  |   87|  25.7k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 10.2k, False: 32.6k]
  |  |  ------------------
  |  |   88|  24.3k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 12.2k, False: 30.6k]
  |  |  ------------------
  |  |   89|  24.7k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 381, False: 42.5k]
  |  |  ------------------
  |  |   90|  24.9k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 211, False: 42.7k]
  |  |  ------------------
  |  |   91|  25.7k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 849, False: 42.0k]
  |  |  ------------------
  |  |   92|  25.7k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  25.7k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  25.7k|    break;                                                                     \
  |  |   94|  25.7k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 42.9k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 42.9k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 42.9k]
  |  |  |  |  ------------------
  |  |  |  |   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;
  |  |  ------------------
  ------------------
 1200|    145|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 145, False: 42.7k]
  ------------------
 1201|  1.59k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 1.45k, False: 41.4k]
  ------------------
 1202|  2.33k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 744, False: 42.1k]
  ------------------
 1203|  3.32k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 983, False: 41.9k]
  ------------------
 1204|  4.04k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 726, False: 42.2k]
  ------------------
 1205|  4.05k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 3, False: 42.9k]
  ------------------
 1206|  9.73k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 5.68k, False: 37.2k]
  ------------------
 1207|  11.1k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 1.39k, False: 41.5k]
  ------------------
 1208|  16.0k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 4.88k, False: 38.0k]
  ------------------
 1209|  16.0k|      *nextTokPtr = ptr;
 1210|  16.0k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 42.9k]
  ------------------
 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|    633|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 633, False: 42.2k]
  ------------------
 1232|    633|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    633|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 1, False: 632]
  ------------------
 1233|      1|        *nextTokPtr = ptr;
 1234|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1235|      1|      }
 1236|    632|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    632|#  define MINBPC(enc) 2
  ------------------
 1237|    632|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|    632|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    365|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 365, False: 42.5k]
  ------------------
 1239|    365|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    365|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 364]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|    364|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    364|#  define MINBPC(enc) 2
  ------------------
 1244|    364|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    364|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|     71|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 71, False: 42.8k]
  ------------------
 1246|     71|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|     71|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 1, False: 70]
  ------------------
 1247|      1|        *nextTokPtr = ptr;
 1248|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1249|      1|      }
 1250|     70|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|     70|#  define MINBPC(enc) 2
  ------------------
 1251|     70|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|     70|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     15|    default:
  ------------------
  |  Branch (1252:5): [True: 15, False: 42.9k]
  ------------------
 1253|     15|      *nextTokPtr = ptr;
 1254|     15|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
 1255|  42.9k|    }
 1256|  42.9k|  }
 1257|    117|  return -tok;
 1258|  17.2k|}
xmltok.c:little2_scanLit:
  984|  5.24k|                const char **nextTokPtr) {
  985|  2.80M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  2.80M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  2.80M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.80M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   281k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 281k, False: 2.52M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  987|  2.80M|    switch (t) {
  988|   117k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 2.80M]
  |  |  |  |  ------------------
  |  |  |  |   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: 2.80M]
  |  |  |  |  ------------------
  |  |  |  |   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|  58.6k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  58.6k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 58.6k, False: 2.74M]
  |  |  |  |  ------------------
  |  |  |  |   50|  58.6k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 27, False: 58.6k]
  |  |  |  |  ------------------
  |  |  |  |   51|  58.6k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     27|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  58.6k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  58.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|  58.6k|    ptr += n;                                                                  \
  |  |  |  |   57|  58.6k|    break;
  |  |  ------------------
  |  |   63|  58.6k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 12, False: 2.80M]
  |  |  ------------------
  |  |   64|     12|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 2.80M]
  |  |  ------------------
  |  |   65|     18|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 6, False: 2.80M]
  |  |  ------------------
  |  |   66|     18|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     18|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  18.7k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 18.7k, False: 2.78M]
  ------------------
  990|  24.5k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 5.88k, False: 2.80M]
  ------------------
  991|  24.5k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  24.5k|#  define MINBPC(enc) 2
  ------------------
  992|  24.5k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 19.4k, False: 5.13k]
  ------------------
  993|  19.4k|        break;
  994|  5.13k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  5.13k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  5.13k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  5.13k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 1, False: 5.13k]
  ------------------
  995|      1|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      1|#define XML_TOK_LITERAL 27
  ------------------
  996|  5.13k|      *nextTokPtr = ptr;
  997|  5.13k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  5.13k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.13k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.10k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 5.10k, False: 34]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  998|  1.75k|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 1.75k, False: 3.38k]
  ------------------
  999|  2.74k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 990, False: 4.14k]
  ------------------
 1000|  3.14k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 397, False: 4.74k]
  ------------------
 1001|  5.07k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 1.92k, False: 3.21k]
  ------------------
 1002|  5.09k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 24, False: 5.11k]
  ------------------
 1003|  5.09k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 3, False: 5.13k]
  ------------------
 1004|  5.09k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  5.09k|#define XML_TOK_LITERAL 27
  ------------------
 1005|     40|      default:
  ------------------
  |  Branch (1005:7): [True: 40, False: 5.09k]
  ------------------
 1006|     40|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     40|#define XML_TOK_INVALID 0
  ------------------
 1007|  5.13k|      }
 1008|  2.72M|    default:
  ------------------
  |  Branch (1008:5): [True: 2.72M, False: 83.2k]
  ------------------
 1009|  2.72M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.72M|#  define MINBPC(enc) 2
  ------------------
 1010|  2.72M|      break;
 1011|  2.80M|    }
 1012|  2.80M|  }
 1013|     58|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     58|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  5.24k|}
xmltok.c:little2_scanDecl:
  183|  4.67k|                 const char **nextTokPtr) {
  184|  4.67k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.67k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.67k|    {                                                                          \
  |  |  |  |  135|  4.67k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.67k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  4.67k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 4.66k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  4.67k|    }
  |  |  ------------------
  ------------------
  185|  4.66k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  4.66k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  4.66k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.63k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.63k, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|    457|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 457, False: 4.20k]
  ------------------
  187|    457|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    457|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    457|#  define MINBPC(enc) 2
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 4.66k]
  ------------------
  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|    327|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 327, False: 4.33k]
  ------------------
  192|  4.18k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 3.85k, False: 813]
  ------------------
  193|  4.18k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.18k|#  define MINBPC(enc) 2
  ------------------
  194|  4.18k|    break;
  195|     28|  default:
  ------------------
  |  Branch (195:3): [True: 28, False: 4.63k]
  ------------------
  196|     28|    *nextTokPtr = ptr;
  197|     28|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     28|#define XML_TOK_INVALID 0
  ------------------
  198|  4.66k|  }
  199|  27.6k|  while (HAS_CHAR(enc, ptr, end)) {
  200|  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|  27.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 27.5k, False: 25]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|     40|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 40, False: 27.5k]
  ------------------
  202|     40|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     40|    {                                                                          \
  |  |  135|     40|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     40|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|     40|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 39]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     40|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|     39|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  785|     39|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|     39|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|     16|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 31, False: 8]
  |  |  |  |  |  Branch (737:4): [True: 16, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      1|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 1, False: 38]
  ------------------
  206|      2|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 38]
  ------------------
  207|      6|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 4, False: 35]
  ------------------
  208|      8|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 2, False: 37]
  ------------------
  209|      8|        *nextTokPtr = ptr;
  210|      8|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  211|     39|      }
  212|       |      /* fall through */
  213|  2.00k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 1.96k, False: 25.6k]
  ------------------
  214|  3.70k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 1.70k, False: 25.9k]
  ------------------
  215|  4.11k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 417, False: 27.1k]
  ------------------
  216|  4.11k|      *nextTokPtr = ptr;
  217|  4.11k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  4.11k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|  20.1k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 20.1k, False: 7.45k]
  ------------------
  219|  23.4k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 3.30k, False: 24.3k]
  ------------------
  220|  23.4k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  23.4k|#  define MINBPC(enc) 2
  ------------------
  221|  23.4k|      break;
  222|     29|    default:
  ------------------
  |  Branch (222:5): [True: 29, False: 27.5k]
  ------------------
  223|     29|      *nextTokPtr = ptr;
  224|     29|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     29|#define XML_TOK_INVALID 0
  ------------------
  225|  27.6k|    }
  226|  27.6k|  }
  227|     24|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     24|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  4.18k|}
xmltok.c:little2_scanComment:
  146|    664|                    const char **nextTokPtr) {
  147|    664|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|    664|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    664|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    664|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 654, False: 10]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|    654|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  787|    654|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    654|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 642, False: 12]
  |  |  |  |  |  Branch (739:52): [True: 633, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  149|     21|      *nextTokPtr = ptr;
  150|     21|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  151|     21|    }
  152|    633|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    633|#  define MINBPC(enc) 2
  ------------------
  153|   111k|    while (HAS_CHAR(enc, ptr, end)) {
  154|   111k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   111k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   111k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  9.09k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 9.09k, False: 102k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|  32.2k|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 111k]
  |  |  |  |  ------------------
  |  |  |  |   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: 111k]
  |  |  |  |  ------------------
  |  |  |  |   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|  16.1k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  16.0k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 16.1k, False: 95.0k]
  |  |  |  |  ------------------
  |  |  |  |   50|  16.1k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 28, False: 16.0k]
  |  |  |  |  ------------------
  |  |  |  |   51|  16.0k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     28|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  16.0k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  16.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|  16.0k|    ptr += n;                                                                  \
  |  |  |  |   57|  16.0k|    break;
  |  |  ------------------
  |  |   63|  16.0k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 21, False: 111k]
  |  |  ------------------
  |  |   64|     21|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 111k]
  |  |  ------------------
  |  |   65|     32|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 11, False: 111k]
  |  |  ------------------
  |  |   66|     32|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     32|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     32|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  1.05k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 1.05k, False: 110k]
  ------------------
  157|  1.05k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.05k|#  define MINBPC(enc) 2
  ------------------
  158|  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: 1, False: 1.05k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.05k|    }
  |  |  ------------------
  ------------------
  159|  1.05k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  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: 805, False: 253]
  |  |  |  |  |  Branch (739:52): [True: 507, False: 298]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|    507|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    507|#  define MINBPC(enc) 2
  ------------------
  161|    507|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    507|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    507|    {                                                                          \
  |  |  |  |  135|    507|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    507|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    507|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 505]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|    507|    }
  |  |  ------------------
  ------------------
  162|    505|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    505|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    505|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 497, False: 8]
  |  |  |  |  |  Branch (739:52): [True: 489, False: 8]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|     16|            *nextTokPtr = ptr;
  164|     16|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  165|     16|          }
  166|    489|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    489|#  define MINBPC(enc) 2
  ------------------
  167|    489|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|    489|#define XML_TOK_COMMENT 13
  ------------------
  168|    505|        }
  169|    551|        break;
  170|  93.9k|      default:
  ------------------
  |  Branch (170:7): [True: 93.9k, False: 17.2k]
  ------------------
  171|  93.9k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  93.9k|#  define MINBPC(enc) 2
  ------------------
  172|  93.9k|        break;
  173|   111k|      }
  174|   111k|    }
  175|    633|  }
  176|     75|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     75|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|    664|}
xmltok.c:little2_scanPi:
  277|  9.91k|               const char **nextTokPtr) {
  278|  9.91k|  int tok;
  279|  9.91k|  const char *target = ptr;
  280|  9.91k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  9.91k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  9.91k|    {                                                                          \
  |  |  |  |  135|  9.91k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  9.91k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  9.91k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 10, False: 9.90k]
  |  |  |  |  ------------------
  |  |  |  |  136|     10|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     10|      }                                                                        \
  |  |  |  |  138|  9.91k|    }
  |  |  ------------------
  ------------------
  281|  9.90k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  9.90k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  9.90k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  8.42k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 8.42k, False: 1.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  282|  10.3k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  9.85k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.44k, False: 8.45k]
  |  |  ------------------
  |  |  111|  9.85k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  1.44k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  1.44k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.44k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 11, False: 1.43k]
  |  |  ------------------
  |  |  112|     11|      *nextTokPtr = ptr;                                                       \
  |  |  113|     11|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     11|    }                                                                          \
  |  |  115|  9.85k|    /* fall through */                                                         \
  |  |  116|  9.85k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 7.38k, False: 2.51k]
  |  |  ------------------
  |  |  117|  9.85k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 1.04k, False: 8.85k]
  |  |  ------------------
  |  |  118|  9.85k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  9.85k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  9.85k|    break;                                                                     \
  |  |  120|  9.85k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 9.90k]
  |  |  |  |  ------------------
  |  |  |  |  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: 9.90k]
  |  |  |  |  ------------------
  |  |  |  |  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: 9.87k]
  |  |  |  |  ------------------
  |  |  |  |  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;
  |  |  ------------------
  ------------------
  283|      7|  default:
  ------------------
  |  Branch (283:3): [True: 7, False: 9.89k]
  ------------------
  284|      7|    *nextTokPtr = ptr;
  285|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  286|  9.90k|  }
  287|  32.2k|  while (HAS_CHAR(enc, ptr, end)) {
  288|  32.2k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  32.2k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  32.2k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  20.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 20.2k, False: 11.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  289|  98.5k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  22.4k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 11.8k, False: 20.3k]
  |  |  ------------------
  |  |   82|  22.4k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  11.8k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  11.8k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  11.8k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 21, False: 11.8k]
  |  |  ------------------
  |  |   83|     21|      *nextTokPtr = ptr;                                                       \
  |  |   84|     21|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     21|    }                                                                          \
  |  |   86|  22.4k|    /* fall through */                                                         \
  |  |   87|  22.4k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 8.69k, False: 23.5k]
  |  |  ------------------
  |  |   88|  21.8k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.26k, False: 30.9k]
  |  |  ------------------
  |  |   89|  22.0k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 197, False: 32.0k]
  |  |  ------------------
  |  |   90|  22.2k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 203, False: 32.0k]
  |  |  ------------------
  |  |   91|  22.4k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 196, False: 32.0k]
  |  |  ------------------
  |  |   92|  22.4k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  22.4k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  22.4k|    break;                                                                     \
  |  |   94|  22.4k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 32.2k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 32.2k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     23|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 23, False: 32.1k]
  |  |  |  |  ------------------
  |  |  |  |   71|     23|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 18]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     18|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     36|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     18|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     18|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     18|    }                                                                          \
  |  |  |  |   77|     18|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  290|  1.21k|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 1.21k, False: 30.9k]
  ------------------
  291|  1.90k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 686, False: 31.5k]
  ------------------
  292|  2.80k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 895, False: 31.3k]
  ------------------
  293|  2.80k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  782|  2.80k|#  define PREFIX(ident) little2_##ident
  ------------------
  |  Branch (293:11): [True: 1, False: 2.79k]
  ------------------
  294|      1|        *nextTokPtr = ptr;
  295|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  296|      1|      }
  297|  2.79k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.79k|#  define MINBPC(enc) 2
  ------------------
  298|   150k|      while (HAS_CHAR(enc, ptr, end)) {
  299|   150k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   150k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   150k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  17.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 17.8k, False: 132k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  300|  31.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: 150k]
  |  |  |  |  ------------------
  |  |  |  |   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: 150k]
  |  |  |  |  ------------------
  |  |  |  |   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.8k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  15.8k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 15.8k, False: 134k]
  |  |  |  |  ------------------
  |  |  |  |   50|  15.8k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 26, False: 15.8k]
  |  |  |  |  ------------------
  |  |  |  |   51|  15.8k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     26|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  15.8k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  15.8k|#    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.8k|    ptr += n;                                                                  \
  |  |  |  |   57|  15.8k|    break;
  |  |  ------------------
  |  |   63|  15.8k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 13, False: 150k]
  |  |  ------------------
  |  |   64|     13|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 150k]
  |  |  ------------------
  |  |   65|     17|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 150k]
  |  |  ------------------
  |  |   66|     17|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     17|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  4.60k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 4.60k, False: 145k]
  ------------------
  302|  4.60k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.60k|#  define MINBPC(enc) 2
  ------------------
  303|  4.60k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.60k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.60k|    {                                                                          \
  |  |  |  |  135|  4.60k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.60k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  4.60k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 7, False: 4.59k]
  |  |  |  |  ------------------
  |  |  |  |  136|      7|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      7|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      7|      }                                                                        \
  |  |  |  |  138|  4.60k|    }
  |  |  ------------------
  ------------------
  304|  4.59k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  4.59k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  4.59k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 3.82k, False: 772]
  |  |  |  |  |  Branch (739:52): [True: 2.61k, False: 1.21k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  305|  2.61k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.61k|#  define MINBPC(enc) 2
  ------------------
  306|  2.61k|            return tok;
  307|  2.61k|          }
  308|  1.98k|          break;
  309|   129k|        default:
  ------------------
  |  Branch (309:9): [True: 129k, False: 20.4k]
  ------------------
  310|   129k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|   129k|#  define MINBPC(enc) 2
  ------------------
  311|   129k|          break;
  312|   150k|        }
  313|   150k|      }
  314|    137|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    137|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  6.94k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 6.94k, False: 25.2k]
  ------------------
  316|  6.94k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  782|  6.94k|#  define PREFIX(ident) little2_##ident
  ------------------
  |  Branch (316:11): [True: 3, False: 6.93k]
  ------------------
  317|      3|        *nextTokPtr = ptr;
  318|      3|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  319|      3|      }
  320|  6.93k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  6.93k|#  define MINBPC(enc) 2
  ------------------
  321|  6.93k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.93k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.93k|    {                                                                          \
  |  |  |  |  135|  6.93k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.93k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  6.93k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 35, False: 6.90k]
  |  |  |  |  ------------------
  |  |  |  |  136|     35|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     35|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     35|      }                                                                        \
  |  |  |  |  138|  6.93k|    }
  |  |  ------------------
  ------------------
  322|  6.90k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  6.90k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  6.90k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 6.88k, False: 16]
  |  |  |  |  |  Branch (739:52): [True: 6.87k, False: 15]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  323|  6.87k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  6.87k|#  define MINBPC(enc) 2
  ------------------
  324|  6.87k|        return tok;
  325|  6.87k|      }
  326|       |      /* fall through */
  327|     41|    default:
  ------------------
  |  Branch (327:5): [True: 10, False: 32.1k]
  ------------------
  328|     41|      *nextTokPtr = ptr;
  329|     41|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     41|#define XML_TOK_INVALID 0
  ------------------
  330|  32.2k|    }
  331|  32.2k|  }
  332|     65|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     65|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  9.85k|}
xmltok.c:little2_checkPiTarget:
  232|  9.74k|                      int *tokPtr) {
  233|  9.74k|  int upper = 0;
  234|  9.74k|  UNUSED_P(enc);
  ------------------
  |  |  135|  9.74k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  9.74k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  9.74k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  9.74k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  783|  9.74k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (236:7): [True: 2.23k, False: 7.50k]
  ------------------
  237|  2.23k|    return 1;
  238|  7.50k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  7.50k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  7.50k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 6.83k, False: 675]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  239|  1.16k|  case ASCII_x:
  ------------------
  |  |   86|  1.16k|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 1.16k, False: 6.34k]
  ------------------
  240|  1.16k|    break;
  241|  5.10k|  case ASCII_X:
  ------------------
  |  |   59|  5.10k|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 5.10k, False: 2.40k]
  ------------------
  242|  5.10k|    upper = 1;
  243|  5.10k|    break;
  244|  1.24k|  default:
  ------------------
  |  Branch (244:3): [True: 1.24k, False: 6.26k]
  ------------------
  245|  1.24k|    return 1;
  246|  7.50k|  }
  247|  6.26k|  ptr += MINBPC(enc);
  ------------------
  |  |  783|  6.26k|#  define MINBPC(enc) 2
  ------------------
  248|  6.26k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  6.26k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  6.26k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 5.70k, False: 559]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|  2.74k|  case ASCII_m:
  ------------------
  |  |   75|  2.74k|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 2.74k, False: 3.52k]
  ------------------
  250|  2.74k|    break;
  251|  2.84k|  case ASCII_M:
  ------------------
  |  |   48|  2.84k|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 2.84k, False: 3.41k]
  ------------------
  252|  2.84k|    upper = 1;
  253|  2.84k|    break;
  254|    673|  default:
  ------------------
  |  Branch (254:3): [True: 673, False: 5.59k]
  ------------------
  255|    673|    return 1;
  256|  6.26k|  }
  257|  5.59k|  ptr += MINBPC(enc);
  ------------------
  |  |  783|  5.59k|#  define MINBPC(enc) 2
  ------------------
  258|  5.59k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  5.59k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  5.59k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 1.17k, False: 4.42k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|     26|  case ASCII_l:
  ------------------
  |  |   74|     26|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 26, False: 5.56k]
  ------------------
  260|     26|    break;
  261|      2|  case ASCII_L:
  ------------------
  |  |   47|      2|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 2, False: 5.59k]
  ------------------
  262|      2|    upper = 1;
  263|      2|    break;
  264|  5.56k|  default:
  ------------------
  |  Branch (264:3): [True: 5.56k, False: 28]
  ------------------
  265|  5.56k|    return 1;
  266|  5.59k|  }
  267|     28|  if (upper)
  ------------------
  |  Branch (267:7): [True: 4, False: 24]
  ------------------
  268|      4|    return 0;
  269|     24|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|     24|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|     24|  return 1;
  271|     28|}
xmltok.c:little2_scanPercent:
  924|  2.06k|                    const char **nextTokPtr) {
  925|  2.06k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.06k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.06k|    {                                                                          \
  |  |  |  |  135|  2.06k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.06k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.06k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 21, False: 2.04k]
  |  |  |  |  ------------------
  |  |  |  |  136|     21|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     21|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     21|      }                                                                        \
  |  |  |  |  138|  2.06k|    }
  |  |  ------------------
  ------------------
  926|  2.04k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.04k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.04k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.80k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.80k, False: 242]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  927|    601|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|    460|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 223, False: 1.82k]
  |  |  ------------------
  |  |  111|    460|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    223|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    223|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    223|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 14, False: 209]
  |  |  ------------------
  |  |  112|     14|      *nextTokPtr = ptr;                                                       \
  |  |  113|     14|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     14|    }                                                                          \
  |  |  115|    460|    /* fall through */                                                         \
  |  |  116|    460|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 145, False: 1.89k]
  |  |  ------------------
  |  |  117|    460|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 106, False: 1.93k]
  |  |  ------------------
  |  |  118|    460|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|    460|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|    460|    break;                                                                     \
  |  |  120|    460|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.04k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.04k]
  |  |  |  |  ------------------
  |  |  |  |  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: 2.02k]
  |  |  |  |  ------------------
  |  |  |  |  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|    427|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 427, False: 1.61k]
  ------------------
  929|    756|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 329, False: 1.71k]
  ------------------
  930|  1.54k|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 789, False: 1.25k]
  ------------------
  931|  1.54k|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 4, False: 2.03k]
  ------------------
  932|  1.54k|    *nextTokPtr = ptr;
  933|  1.54k|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|  1.54k|#define XML_TOK_PERCENT 22
  ------------------
  934|      6|  default:
  ------------------
  |  Branch (934:3): [True: 6, False: 2.03k]
  ------------------
  935|      6|    *nextTokPtr = ptr;
  936|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  937|  2.04k|  }
  938|  1.84k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  1.84k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.84k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.84k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.49k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.49k, False: 355]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  940|  4.06k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.45k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 342, False: 1.50k]
  |  |  ------------------
  |  |   82|  1.45k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    342|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    342|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    342|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 22, False: 320]
  |  |  ------------------
  |  |   83|     22|      *nextTokPtr = ptr;                                                       \
  |  |   84|     22|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     22|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     22|    }                                                                          \
  |  |   86|  1.45k|    /* fall through */                                                         \
  |  |   87|  1.45k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 308, False: 1.53k]
  |  |  ------------------
  |  |   88|    830|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 202, False: 1.64k]
  |  |  ------------------
  |  |   89|  1.02k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 195, False: 1.65k]
  |  |  ------------------
  |  |   90|  1.22k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 204, False: 1.64k]
  |  |  ------------------
  |  |   91|  1.45k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 221, False: 1.62k]
  |  |  ------------------
  |  |   92|  1.45k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.45k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.45k|    break;                                                                     \
  |  |   94|  1.45k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 1.84k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 1.84k]
  |  |  |  |  ------------------
  |  |  |  |   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|      7|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 7, False: 1.83k]
  |  |  |  |  ------------------
  |  |  |  |   71|      7|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 3]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      3|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      6|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      3|    }                                                                          \
  |  |  |  |   77|      3|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  941|    353|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 353, False: 1.49k]
  ------------------
  942|    353|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    353|#  define MINBPC(enc) 2
  ------------------
  943|    353|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|    353|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|     14|    default:
  ------------------
  |  Branch (944:5): [True: 14, False: 1.83k]
  ------------------
  945|     14|      *nextTokPtr = ptr;
  946|     14|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  947|  1.84k|    }
  948|  1.84k|  }
  949|     64|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     64|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|    460|}
xmltok.c:little2_scanPoundName:
  954|  2.68k|                      const char **nextTokPtr) {
  955|  2.68k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.68k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.68k|    {                                                                          \
  |  |  |  |  135|  2.68k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.68k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.68k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 2.68k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  2.68k|    }
  |  |  ------------------
  ------------------
  956|  2.68k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.68k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.68k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.57k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.57k, False: 107]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  957|  1.93k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.64k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 83, False: 2.59k]
  |  |  ------------------
  |  |  111|  2.64k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|     83|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|     83|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|     83|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 11, False: 72]
  |  |  ------------------
  |  |  112|     11|      *nextTokPtr = ptr;                                                       \
  |  |  113|     11|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     11|    }                                                                          \
  |  |  115|  2.64k|    /* fall through */                                                         \
  |  |  116|  2.64k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.74k, False: 938]
  |  |  ------------------
  |  |  117|  2.64k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 829, False: 1.85k]
  |  |  ------------------
  |  |  118|  2.64k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  2.64k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  2.64k|    break;                                                                     \
  |  |  120|  2.64k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.68k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.68k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     19|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 19, False: 2.66k]
  |  |  |  |  ------------------
  |  |  |  |  100|     19|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 15]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     15|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     30|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     15|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     15|    }                                                                          \
  |  |  |  |  106|     15|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  958|      7|  default:
  ------------------
  |  Branch (958:3): [True: 7, False: 2.67k]
  ------------------
  959|      7|    *nextTokPtr = ptr;
  960|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  961|  2.68k|  }
  962|  18.7k|  while (HAS_CHAR(enc, ptr, end)) {
  963|  18.7k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  18.7k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  18.7k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  18.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 18.3k, False: 393]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  964|  56.1k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  16.1k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 371, False: 18.4k]
  |  |  ------------------
  |  |   82|  16.1k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    371|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    371|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    371|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 21, False: 350]
  |  |  ------------------
  |  |   83|     21|      *nextTokPtr = ptr;                                                       \
  |  |   84|     21|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     21|    }                                                                          \
  |  |   86|  16.1k|    /* fall through */                                                         \
  |  |   87|  16.1k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 8.11k, False: 10.6k]
  |  |  ------------------
  |  |   88|  15.5k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 7.10k, False: 11.6k]
  |  |  ------------------
  |  |   89|  15.7k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 201, False: 18.5k]
  |  |  ------------------
  |  |   90|  15.9k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 210, False: 18.5k]
  |  |  ------------------
  |  |   91|  16.1k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 204, False: 18.5k]
  |  |  ------------------
  |  |   92|  16.1k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  16.1k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  16.1k|    break;                                                                     \
  |  |   94|  16.1k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 18.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: 18.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|     13|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 13, False: 18.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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      9|    }                                                                          \
  |  |  |  |   77|      9|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  965|    201|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 201, False: 18.5k]
  ------------------
  966|  1.03k|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 838, False: 17.9k]
  ------------------
  967|  1.98k|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 949, False: 17.8k]
  ------------------
  968|  2.10k|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 121, False: 18.6k]
  ------------------
  969|  2.47k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 368, False: 18.4k]
  ------------------
  970|  2.47k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 1, False: 18.7k]
  ------------------
  971|  2.54k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 67, False: 18.7k]
  ------------------
  972|  2.54k|      *nextTokPtr = ptr;
  973|  2.54k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  2.54k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|     14|    default:
  ------------------
  |  Branch (974:5): [True: 14, False: 18.7k]
  ------------------
  975|     14|      *nextTokPtr = ptr;
  976|     14|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  977|  18.7k|    }
  978|  18.7k|  }
  979|     52|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     52|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  2.64k|}
xmltok.c:little2_contentTok:
  824|  76.1k|                   const char **nextTokPtr) {
  825|  76.1k|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 940, False: 75.1k]
  ------------------
  826|    940|    return XML_TOK_NONE;
  ------------------
  |  |   51|    940|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|  75.1k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  75.1k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (827:7): [Folded - Ignored]
  ------------------
  828|  75.1k|    size_t n = end - ptr;
  829|  75.1k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  75.1k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (829:9): [True: 29.6k, False: 45.5k]
  ------------------
  830|  29.6k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  29.6k|#  define MINBPC(enc) 2
  ------------------
  831|  29.6k|      if (n == 0)
  ------------------
  |  Branch (831:11): [True: 146, False: 29.4k]
  ------------------
  832|    146|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    146|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  833|  29.4k|      end = ptr + n;
  834|  29.4k|    }
  835|  75.1k|  }
  836|  75.0k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  75.0k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  75.0k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  61.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 61.6k, False: 13.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  837|  19.0k|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 19.0k, False: 55.9k]
  ------------------
  838|  19.0k|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  19.0k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  19.0k|#  define MINBPC(enc) 2
  ------------------
  839|  12.2k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 12.2k, False: 62.8k]
  ------------------
  840|  12.2k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  12.2k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  12.2k|#  define MINBPC(enc) 2
  ------------------
  841|  11.6k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 11.6k, False: 63.3k]
  ------------------
  842|  11.6k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  11.6k|#  define MINBPC(enc) 2
  ------------------
  843|  11.6k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  11.6k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  11.6k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  11.6k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 13, False: 11.6k]
  ------------------
  844|     13|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     13|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  11.6k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  11.6k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  11.6k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.08k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 7.08k, False: 4.59k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 1.26k, False: 10.4k]
  ------------------
  846|  1.26k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.26k|#  define MINBPC(enc) 2
  ------------------
  847|  11.6k|    *nextTokPtr = ptr;
  848|  11.6k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  11.6k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|  5.20k|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 5.20k, False: 69.8k]
  ------------------
  850|  5.20k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  5.20k|#  define MINBPC(enc) 2
  ------------------
  851|  5.20k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  5.20k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  5.45k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 5.45k, False: 69.5k]
  ------------------
  853|  5.45k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  5.45k|#  define MINBPC(enc) 2
  ------------------
  854|  5.45k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  5.45k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  5.45k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  5.45k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 6, False: 5.45k]
  ------------------
  855|      6|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      6|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  5.45k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  787|  5.45k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  5.45k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 3.28k, False: 2.17k]
  |  |  |  |  |  Branch (739:52): [True: 1.98k, False: 1.29k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  857|  3.46k|      break;
  858|  1.98k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.98k|#  define MINBPC(enc) 2
  ------------------
  859|  1.98k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  1.98k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.98k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  1.98k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 9, False: 1.97k]
  ------------------
  860|      9|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      9|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|  1.97k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  1.97k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.97k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.01k, False: 961]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 1.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  862|  1.97k|      ptr -= MINBPC(enc);
  ------------------
  |  |  783|  1.97k|#  define MINBPC(enc) 2
  ------------------
  863|  1.97k|      break;
  864|  1.97k|    }
  865|      1|    *nextTokPtr = ptr;
  866|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  867|  3.93k|    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.0k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 75.0k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  1.92k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.87k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.92k, False: 73.0k]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.92k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 53, False: 1.87k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.87k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     53|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.87k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.87k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  1.87k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.87k|    break;
  |  |  ------------------
  |  |   63|  1.87k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 67, False: 74.9k]
  |  |  ------------------
  |  |   64|     67|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 75.0k]
  |  |  ------------------
  |  |   65|     79|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 12, False: 75.0k]
  |  |  ------------------
  |  |   66|     79|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     79|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     79|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|  19.3k|  default:
  ------------------
  |  Branch (868:3): [True: 19.3k, False: 55.6k]
  ------------------
  869|  19.3k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  19.3k|#  define MINBPC(enc) 2
  ------------------
  870|  19.3k|    break;
  871|  75.0k|  }
  872|   601k|  while (HAS_CHAR(enc, ptr, end)) {
  873|   601k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   601k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   601k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  68.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 68.3k, False: 532k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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: 601k]
  |  |  ------------------
  |  |  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: 601k]
  |  |  ------------------
  |  |  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|  56.0k|      LEAD_CASE(4)
  ------------------
  |  |  875|  55.9k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 56.0k, False: 545k]
  |  |  ------------------
  |  |  876|  56.0k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  55.9k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 44, False: 55.9k]
  |  |  ------------------
  |  |  877|     44|      *nextTokPtr = ptr;                                                       \
  |  |  878|     44|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     44|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     44|    }                                                                          \
  |  |  880|  55.9k|    ptr += n;                                                                  \
  |  |  881|  55.9k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|  9.92k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 9.92k, False: 591k]
  ------------------
  887|  9.92k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|  9.92k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  783|  9.92k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 9.92k, False: 1]
  |  |  ------------------
  ------------------
  888|  9.92k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  787|  9.92k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  9.92k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 5.27k, False: 4.64k]
  |  |  |  |  |  Branch (739:52): [True: 3.50k, False: 1.76k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  889|  6.41k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  6.41k|#  define MINBPC(enc) 2
  ------------------
  890|  6.41k|          break;
  891|  6.41k|        }
  892|  3.50k|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|  3.50k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  783|  3.50k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 3.49k, False: 8]
  |  |  ------------------
  ------------------
  893|  3.49k|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  787|  3.49k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  3.49k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.26k, False: 2.23k]
  |  |  |  |  |  Branch (739:52): [True: 2, False: 1.26k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  894|  3.49k|            ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.49k|#  define MINBPC(enc) 2
  ------------------
  895|  3.49k|            break;
  896|  3.49k|          }
  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|  3.49k|        }
  900|  3.50k|      }
  901|       |      /* fall through */
  902|  6.72k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 6.71k, False: 594k]
  ------------------
  903|  14.2k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 7.48k, False: 593k]
  ------------------
  904|  14.2k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 57, False: 601k]
  ------------------
  905|  14.2k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 0, False: 601k]
  ------------------
  906|  14.2k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 8, False: 601k]
  ------------------
  907|  22.4k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 8.16k, False: 593k]
  ------------------
  908|  26.3k|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 3.87k, False: 597k]
  ------------------
  909|  26.3k|      *nextTokPtr = ptr;
  910|  26.3k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  26.3k|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|   508k|    default:
  ------------------
  |  Branch (911:5): [True: 508k, False: 92.2k]
  ------------------
  912|   508k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   508k|#  define MINBPC(enc) 2
  ------------------
  913|   508k|      break;
  914|   601k|    }
  915|   601k|  }
  916|    352|  *nextTokPtr = ptr;
  917|    352|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    352|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|  26.7k|}
xmltok.c:little2_scanLt:
  726|  19.0k|               const char **nextTokPtr) {
  727|  19.0k|#  ifdef XML_NS
  728|  19.0k|  int hadColon;
  729|  19.0k|#  endif
  730|  19.0k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  19.0k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  19.0k|    {                                                                          \
  |  |  |  |  135|  19.0k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  19.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  19.0k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 15, False: 19.0k]
  |  |  |  |  ------------------
  |  |  |  |  136|     15|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     15|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     15|      }                                                                        \
  |  |  |  |  138|  19.0k|    }
  |  |  ------------------
  ------------------
  731|  19.0k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  19.0k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  19.0k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  15.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 15.8k, False: 3.14k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  732|  9.60k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  8.78k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 3.11k, False: 15.9k]
  |  |  ------------------
  |  |  111|  8.78k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  3.11k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  3.11k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  3.11k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 22, False: 3.09k]
  |  |  ------------------
  |  |  112|     22|      *nextTokPtr = ptr;                                                       \
  |  |  113|     22|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     22|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     22|    }                                                                          \
  |  |  115|  8.78k|    /* fall through */                                                         \
  |  |  116|  8.78k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.35k, False: 15.6k]
  |  |  ------------------
  |  |  117|  8.78k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 2.33k, False: 16.6k]
  |  |  ------------------
  |  |  118|  8.78k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  8.78k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  8.78k|    break;                                                                     \
  |  |  120|  8.78k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 19.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: 19.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|     22|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 22, False: 18.9k]
  |  |  |  |  ------------------
  |  |  |  |  100|     22|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 18]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     18|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     36|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     18|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     18|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     18|    }                                                                          \
  |  |  |  |  106|     18|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  733|    844|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 844, False: 18.1k]
  ------------------
  734|    844|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    844|#  define MINBPC(enc) 2
  ------------------
  735|    844|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    844|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    844|    {                                                                          \
  |  |  |  |  135|    844|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    844|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    844|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 842]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|    844|    }
  |  |  ------------------
  ------------------
  736|    842|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|    842|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|    842|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    823|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 21, False: 821]
  |  |  |  |  |  Branch (737:4): [True: 823, False: 19]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    207|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 207, False: 635]
  ------------------
  738|    207|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    207|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    207|#  define MINBPC(enc) 2
  ------------------
  739|    614|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 614, False: 228]
  ------------------
  740|    614|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    614|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    614|#  define MINBPC(enc) 2
  ------------------
  741|    842|    }
  742|     21|    *nextTokPtr = ptr;
  743|     21|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  744|  7.87k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 7.87k, False: 11.1k]
  ------------------
  745|  7.87k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  7.87k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  7.87k|#  define MINBPC(enc) 2
  ------------------
  746|  1.47k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 1.47k, False: 17.5k]
  ------------------
  747|  1.47k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.47k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.47k|#  define MINBPC(enc) 2
  ------------------
  748|     10|  default:
  ------------------
  |  Branch (748:3): [True: 10, False: 19.0k]
  ------------------
  749|     10|    *nextTokPtr = ptr;
  750|     10|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  751|  19.0k|  }
  752|  8.78k|#  ifdef XML_NS
  753|  8.78k|  hadColon = 0;
  754|  8.78k|#  endif
  755|       |  /* we have a start-tag */
  756|  19.4k|  while (HAS_CHAR(enc, ptr, end)) {
  757|  19.4k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  19.4k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  19.4k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  13.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 13.3k, False: 6.10k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  758|  46.0k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  10.7k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 6.08k, False: 13.3k]
  |  |  ------------------
  |  |   82|  10.7k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  6.08k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  6.08k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  6.08k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 19, False: 6.06k]
  |  |  ------------------
  |  |   83|     19|      *nextTokPtr = ptr;                                                       \
  |  |   84|     19|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     19|    }                                                                          \
  |  |   86|  10.7k|    /* fall through */                                                         \
  |  |   87|  10.7k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 3.33k, False: 16.1k]
  |  |  ------------------
  |  |   88|  9.89k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 494, False: 18.9k]
  |  |  ------------------
  |  |   89|  10.1k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 289, False: 19.1k]
  |  |  ------------------
  |  |   90|  10.5k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 325, False: 19.1k]
  |  |  ------------------
  |  |   91|  10.7k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 231, False: 19.2k]
  |  |  ------------------
  |  |   92|  10.7k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  10.7k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  10.7k|    break;                                                                     \
  |  |   94|  10.7k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 19.4k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 19.4k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     13|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 13, False: 19.4k]
  |  |  |  |  ------------------
  |  |  |  |   71|     13|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 6, False: 7]
  |  |  |  |  ------------------
  |  |  |  |   72|      6|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      6|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      7|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     14|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      7|    }                                                                          \
  |  |  |  |   77|      7|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 19.4k]
  ------------------
  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.01k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 2.01k, False: 17.4k]
  ------------------
  777|  2.46k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 452, False: 19.0k]
  ------------------
  778|  3.66k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 1.19k, False: 18.2k]
  ------------------
  779|  3.66k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.66k|#  define MINBPC(enc) 2
  ------------------
  780|  4.65k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  4.65k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  4.65k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  4.65k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.72k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 3.72k, False: 934]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  782|  3.02k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.50k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 908, False: 3.74k]
  |  |  ------------------
  |  |  111|  2.50k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    908|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    908|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    908|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 16, False: 892]
  |  |  ------------------
  |  |  112|     16|      *nextTokPtr = ptr;                                                       \
  |  |  113|     16|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     16|    }                                                                          \
  |  |  115|  2.50k|    /* fall through */                                                         \
  |  |  116|  2.50k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.18k, False: 3.47k]
  |  |  ------------------
  |  |  117|  2.50k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 428, False: 4.22k]
  |  |  ------------------
  |  |  118|  2.50k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  2.50k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  2.50k|    break;                                                                     \
  |  |  120|  2.50k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 4.65k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 4.65k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     21|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 21, False: 4.63k]
  |  |  |  |  ------------------
  |  |  |  |  100|     21|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 17]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     17|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     34|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     17|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     17|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     17|    }                                                                          \
  |  |  |  |  106|     17|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  783|    868|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 868, False: 3.78k]
  ------------------
  784|    868|          goto gt;
  785|    209|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 209, False: 4.44k]
  ------------------
  786|    209|          goto sol;
  787|    320|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 320, False: 4.33k]
  ------------------
  788|    584|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 264, False: 4.39k]
  ------------------
  789|  1.03k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 447, False: 4.21k]
  ------------------
  790|  1.03k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.03k|#  define MINBPC(enc) 2
  ------------------
  791|  1.03k|          continue;
  792|      6|        default:
  ------------------
  |  Branch (792:9): [True: 6, False: 4.65k]
  ------------------
  793|      6|          *nextTokPtr = ptr;
  794|      6|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  795|  4.65k|        }
  796|  2.50k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  782|  2.50k|#  define PREFIX(ident) little2_##ident
  ------------------
  797|  4.65k|      }
  798|     35|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     35|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  3.66k|    }
  800|  4.75k|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 4.75k, False: 14.7k]
  ------------------
  801|  5.62k|    gt:
  802|  5.62k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  5.62k|#  define MINBPC(enc) 2
  ------------------
  803|  5.62k|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  5.62k|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|    265|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 265, False: 19.1k]
  ------------------
  805|    474|    sol:
  806|    474|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    474|#  define MINBPC(enc) 2
  ------------------
  807|    474|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    474|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    474|    {                                                                          \
  |  |  |  |  135|    474|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    474|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    474|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 8, False: 466]
  |  |  |  |  ------------------
  |  |  |  |  136|      8|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      8|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      8|      }                                                                        \
  |  |  |  |  138|    474|    }
  |  |  ------------------
  ------------------
  808|    466|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    466|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    466|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 458, False: 8]
  |  |  |  |  |  Branch (739:52): [True: 446, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  809|     20|        *nextTokPtr = ptr;
  810|     20|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     20|#define XML_TOK_INVALID 0
  ------------------
  811|     20|      }
  812|    446|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    446|#  define MINBPC(enc) 2
  ------------------
  813|    446|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|    446|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|      7|    default:
  ------------------
  |  Branch (814:5): [True: 7, False: 19.4k]
  ------------------
  815|      7|      *nextTokPtr = ptr;
  816|      7|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  817|  19.4k|    }
  818|  19.4k|  }
  819|     65|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     65|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  8.78k|}
xmltok.c:little2_scanCdataSection:
  337|    614|                         const char **nextTokPtr) {
  338|    614|  static const char CDATA_LSQB[]
  339|    614|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|    614|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|    614|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    614|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|    614|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    614|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|    614|#define ASCII_LSQB 0x5B
  ------------------
  340|    614|  int i;
  341|    614|  UNUSED_P(enc);
  ------------------
  |  |  135|    614|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|    614|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|    614|    {                                                                          \
  |  |  135|    614|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|    614|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    614|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 6, False: 608]
  |  |  ------------------
  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      6|      }                                                                        \
  |  |  138|    614|    }
  ------------------
  344|  4.20k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  3.59k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (344:15): [True: 3.61k, False: 593]
  ------------------
  345|  3.61k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  787|  3.61k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  3.61k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 3.59k, False: 11]
  |  |  |  |  |  Branch (739:52): [True: 3.59k, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  346|     15|      *nextTokPtr = ptr;
  347|     15|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  348|     15|    }
  349|  3.61k|  }
  350|    593|  *nextTokPtr = ptr;
  351|    593|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|    593|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|    608|}
xmltok.c:little2_scanEndTag:
  432|  1.47k|                   const char **nextTokPtr) {
  433|  1.47k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.47k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.47k|    {                                                                          \
  |  |  |  |  135|  1.47k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.47k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.47k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  1.47k|    }
  |  |  ------------------
  ------------------
  434|  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.12k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.12k, False: 343]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  435|  1.20k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.44k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 323, False: 1.14k]
  |  |  ------------------
  |  |  111|  1.44k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    323|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    323|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    323|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 1, False: 322]
  |  |  ------------------
  |  |  112|      1|      *nextTokPtr = ptr;                                                       \
  |  |  113|      1|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      1|    }                                                                          \
  |  |  115|  1.44k|    /* fall through */                                                         \
  |  |  116|  1.44k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 530, False: 938]
  |  |  ------------------
  |  |  117|  1.44k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 595, False: 873]
  |  |  ------------------
  |  |  118|  1.44k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.44k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.44k|    break;                                                                     \
  |  |  120|  1.44k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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.46k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     15|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 15, False: 1.45k]
  |  |  |  |  ------------------
  |  |  |  |  100|     15|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 11]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     11|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     22|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     11|    }                                                                          \
  |  |  |  |  106|     11|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  436|      5|  default:
  ------------------
  |  Branch (436:3): [True: 5, False: 1.46k]
  ------------------
  437|      5|    *nextTokPtr = ptr;
  438|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  439|  1.46k|  }
  440|  3.91k|  while (HAS_CHAR(enc, ptr, end)) {
  441|  3.91k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  3.91k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  3.91k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.90k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.90k, False: 1.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  442|  8.63k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  2.53k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 989, False: 2.93k]
  |  |  ------------------
  |  |   82|  2.53k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    989|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    989|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    989|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 18, False: 971]
  |  |  ------------------
  |  |   83|     18|      *nextTokPtr = ptr;                                                       \
  |  |   84|     18|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     18|    }                                                                          \
  |  |   86|  2.53k|    /* fall through */                                                         \
  |  |   87|  2.53k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 306, False: 3.61k]
  |  |  ------------------
  |  |   88|  1.90k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 625, False: 3.29k]
  |  |  ------------------
  |  |   89|  2.09k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 196, False: 3.72k]
  |  |  ------------------
  |  |   90|  2.32k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 229, False: 3.69k]
  |  |  ------------------
  |  |   91|  2.53k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 205, False: 3.71k]
  |  |  ------------------
  |  |   92|  2.53k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  2.53k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  2.53k|    break;                                                                     \
  |  |   94|  2.53k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 3.91k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 3.91k]
  |  |  |  |  ------------------
  |  |  |  |   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: 3.89k]
  |  |  |  |  ------------------
  |  |  |  |   71|     22|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 18]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     18|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     36|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     18|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     18|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     18|    }                                                                          \
  |  |  |  |   77|     18|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  443|    327|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 327, False: 3.59k]
  ------------------
  444|    584|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 257, False: 3.66k]
  ------------------
  445|    859|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 275, False: 3.64k]
  ------------------
  446|  1.83k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|    859|#  define MINBPC(enc) 2
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  1.01k|#  define MINBPC(enc) 2
  ------------------
  447|  1.83k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.83k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.83k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.81k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.81k, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  448|    346|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 346, False: 1.48k]
  ------------------
  449|    698|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 352, False: 1.48k]
  ------------------
  450|  1.01k|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 315, False: 1.52k]
  ------------------
  451|  1.01k|          break;
  452|    800|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 800, False: 1.03k]
  ------------------
  453|    800|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    800|#  define MINBPC(enc) 2
  ------------------
  454|    800|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|    800|#define XML_TOK_END_TAG 5
  ------------------
  455|     22|        default:
  ------------------
  |  Branch (455:9): [True: 22, False: 1.81k]
  ------------------
  456|     22|          *nextTokPtr = ptr;
  457|     22|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     22|#define XML_TOK_INVALID 0
  ------------------
  458|  1.83k|        }
  459|  1.83k|      }
  460|     37|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     37|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  461|      0|#  ifdef XML_NS
  462|      0|    case BT_COLON:
  ------------------
  |  Branch (462:5): [True: 0, False: 3.91k]
  ------------------
  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|    483|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 483, False: 3.43k]
  ------------------
  469|    483|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    483|#  define MINBPC(enc) 2
  ------------------
  470|    483|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|    483|#define XML_TOK_END_TAG 5
  ------------------
  471|      5|    default:
  ------------------
  |  Branch (471:5): [True: 5, False: 3.91k]
  ------------------
  472|      5|      *nextTokPtr = ptr;
  473|      5|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  474|  3.91k|    }
  475|  3.91k|  }
  476|     60|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     60|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  1.44k|}
xmltok.c:little2_scanAtts:
  573|  2.50k|                 const char **nextTokPtr) {
  574|  2.50k|#  ifdef XML_NS
  575|  2.50k|  int hadColon = 0;
  576|  2.50k|#  endif
  577|   264k|  while (HAS_CHAR(enc, ptr, end)) {
  578|   264k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   264k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   264k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   262k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 262k, False: 1.88k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  579|  15.7k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  4.00k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 1.87k, False: 262k]
  |  |  ------------------
  |  |   82|  4.00k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  1.87k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  1.87k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.87k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 21, False: 1.85k]
  |  |  ------------------
  |  |   83|     21|      *nextTokPtr = ptr;                                                       \
  |  |   84|     21|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     21|    }                                                                          \
  |  |   86|  4.00k|    /* fall through */                                                         \
  |  |   87|  4.00k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.21k, False: 263k]
  |  |  ------------------
  |  |   88|  3.41k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 351, False: 264k]
  |  |  ------------------
  |  |   89|  3.61k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 195, False: 264k]
  |  |  ------------------
  |  |   90|  3.80k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 194, False: 264k]
  |  |  ------------------
  |  |   91|  4.00k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 200, False: 264k]
  |  |  ------------------
  |  |   92|  4.00k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  4.00k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  4.00k|    break;                                                                     \
  |  |   94|  4.00k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 264k]
  |  |  |  |  ------------------
  |  |  |  |   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: 264k]
  |  |  |  |  ------------------
  |  |  |  |   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: 264k]
  |  |  |  |  ------------------
  |  |  |  |   71|      8|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 4]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      4|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      8|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      4|    }                                                                          \
  |  |  |  |   77|      4|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  580|      0|#  ifdef XML_NS
  581|      0|    case BT_COLON:
  ------------------
  |  Branch (581:5): [True: 0, False: 264k]
  ------------------
  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|    248|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 248, False: 264k]
  ------------------
  598|    747|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 499, False: 263k]
  ------------------
  599|  1.01k|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 270, False: 264k]
  ------------------
  600|  2.26k|      for (;;) {
  601|  2.26k|        int t;
  602|       |
  603|  2.26k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.26k|#  define MINBPC(enc) 2
  ------------------
  604|  2.26k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.26k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.26k|    {                                                                          \
  |  |  |  |  135|  2.26k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.26k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.26k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 38, False: 2.22k]
  |  |  |  |  ------------------
  |  |  |  |  136|     38|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     38|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     38|      }                                                                        \
  |  |  |  |  138|  2.26k|    }
  |  |  ------------------
  ------------------
  605|  2.22k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  2.22k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.22k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.20k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.20k, False: 19]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  606|  2.22k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 957, False: 1.27k]
  ------------------
  607|    957|          break;
  608|  1.27k|        switch (t) {
  609|    197|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 197, False: 1.07k]
  ------------------
  610|    757|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 560, False: 711]
  ------------------
  611|  1.24k|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 492, False: 779]
  ------------------
  612|  1.24k|          break;
  613|     22|        default:
  ------------------
  |  Branch (613:9): [True: 22, False: 1.24k]
  ------------------
  614|     22|          *nextTokPtr = ptr;
  615|     22|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     22|#define XML_TOK_INVALID 0
  ------------------
  616|  1.27k|        }
  617|  1.27k|      }
  618|       |      /* fall through */
  619|   260k|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 259k, False: 5.06k]
  ------------------
  620|   260k|      int open;
  621|   260k|#  ifdef XML_NS
  622|   260k|      hadColon = 0;
  623|   260k|#  endif
  624|   260k|      for (;;) {
  625|   260k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   260k|#  define MINBPC(enc) 2
  ------------------
  626|   260k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   260k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   260k|    {                                                                          \
  |  |  |  |  135|   260k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   260k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   260k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 34, False: 260k]
  |  |  |  |  ------------------
  |  |  |  |  136|     34|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     34|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     34|      }                                                                        \
  |  |  |  |  138|   260k|    }
  |  |  ------------------
  ------------------
  627|   260k|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|   260k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   260k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   260k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 260k, False: 32]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  628|   260k|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 7.06k, False: 253k]
  |  Branch (628:32): [True: 253k, False: 623]
  ------------------
  629|   260k|          break;
  630|    623|        switch (open) {
  631|    198|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 198, False: 425]
  ------------------
  632|    396|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 198, False: 425]
  ------------------
  633|    590|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 194, False: 429]
  ------------------
  634|    590|          break;
  635|     33|        default:
  ------------------
  |  Branch (635:9): [True: 33, False: 590]
  ------------------
  636|     33|          *nextTokPtr = ptr;
  637|     33|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     33|#define XML_TOK_INVALID 0
  ------------------
  638|    623|        }
  639|    623|      }
  640|   260k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   260k|#  define MINBPC(enc) 2
  ------------------
  641|       |      /* in attribute value */
  642|  4.00M|      for (;;) {
  643|  4.00M|        int t;
  644|  4.00M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.00M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.00M|    {                                                                          \
  |  |  |  |  135|  4.00M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.00M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  4.00M|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 48, False: 4.00M]
  |  |  |  |  ------------------
  |  |  |  |  136|     48|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     48|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     48|      }                                                                        \
  |  |  |  |  138|  4.00M|    }
  |  |  ------------------
  ------------------
  645|  4.00M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  4.00M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  4.00M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.20M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.20M, False: 2.79M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  646|  4.00M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 260k, False: 3.74M]
  ------------------
  647|   260k|          break;
  648|  3.74M|        switch (t) {
  649|  91.5k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 3.74M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 3.74M]
  |  |  |  |  ------------------
  |  |  |  |   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.7k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  45.7k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 45.7k, False: 3.69M]
  |  |  |  |  ------------------
  |  |  |  |   50|  45.7k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 25, False: 45.7k]
  |  |  |  |  ------------------
  |  |  |  |   51|  45.7k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     25|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  45.7k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  45.7k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  45.7k|    ptr += n;                                                                  \
  |  |  |  |   57|  45.7k|    break;
  |  |  ------------------
  |  |   63|  45.7k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 14, False: 3.74M]
  |  |  ------------------
  |  |   64|     14|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 3.74M]
  |  |  ------------------
  |  |   65|     18|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 3.74M]
  |  |  ------------------
  |  |   66|     18|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     18|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  2.75k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 2.75k, False: 3.73M]
  ------------------
  651|  2.75k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  782|  2.75k|#  define PREFIX(ident) little2_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  783|  2.75k|#  define MINBPC(enc) 2
  ------------------
  652|  2.75k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 20, False: 2.73k]
  ------------------
  653|     20|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     20|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 13, False: 7]
  ------------------
  654|     13|              *nextTokPtr = ptr;
  655|     20|            return tok;
  656|     20|          }
  657|  2.73k|          break;
  658|  2.75k|        }
  659|  2.73k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 3, False: 3.74M]
  ------------------
  660|      3|          *nextTokPtr = ptr;
  661|      3|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  662|  3.69M|        default:
  ------------------
  |  Branch (662:9): [True: 3.69M, False: 48.5k]
  ------------------
  663|  3.69M|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.69M|#  define MINBPC(enc) 2
  ------------------
  664|  3.69M|          break;
  665|  3.74M|        }
  666|  3.74M|      }
  667|   260k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   260k|#  define MINBPC(enc) 2
  ------------------
  668|   260k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   260k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   260k|    {                                                                          \
  |  |  |  |  135|   260k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   260k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   260k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 7, False: 260k]
  |  |  |  |  ------------------
  |  |  |  |  136|      7|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      7|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      7|      }                                                                        \
  |  |  |  |  138|   260k|    }
  |  |  ------------------
  ------------------
  669|   260k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   260k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   260k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   260k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 260k, False: 20]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  670|   255k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 255k, False: 4.70k]
  ------------------
  671|   256k|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 1.40k, False: 258k]
  ------------------
  672|   258k|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 1.92k, False: 258k]
  ------------------
  673|   258k|        break;
  674|    273|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 273, False: 259k]
  ------------------
  675|    273|        goto sol;
  676|  1.08k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 1.08k, False: 259k]
  ------------------
  677|  1.08k|        goto gt;
  678|     22|      default:
  ------------------
  |  Branch (678:7): [True: 22, False: 260k]
  ------------------
  679|     22|        *nextTokPtr = ptr;
  680|     22|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     22|#define XML_TOK_INVALID 0
  ------------------
  681|   260k|      }
  682|       |      /* ptr points to closing quote */
  683|   260k|      for (;;) {
  684|   260k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   260k|#  define MINBPC(enc) 2
  ------------------
  685|   260k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   260k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   260k|    {                                                                          \
  |  |  |  |  135|   260k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   260k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   260k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 37, False: 260k]
  |  |  |  |  ------------------
  |  |  |  |  136|     37|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     37|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     37|      }                                                                        \
  |  |  |  |  138|   260k|    }
  |  |  ------------------
  ------------------
  686|   260k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   260k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   260k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   259k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 259k, False: 938]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  687|   207k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   258k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 918, False: 259k]
  |  |  ------------------
  |  |  111|   258k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    918|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    918|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    918|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 5, False: 913]
  |  |  ------------------
  |  |  112|      5|      *nextTokPtr = ptr;                                                       \
  |  |  113|      5|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      5|    }                                                                          \
  |  |  115|   258k|    /* fall through */                                                         \
  |  |  116|   258k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 206k, False: 54.3k]
  |  |  ------------------
  |  |  117|   258k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 51.0k, False: 209k]
  |  |  ------------------
  |  |  118|   258k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|   258k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   258k|    break;                                                                     \
  |  |  120|   258k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 260k]
  |  |  |  |  ------------------
  |  |  |  |  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: 260k]
  |  |  |  |  ------------------
  |  |  |  |  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: 260k]
  |  |  |  |  ------------------
  |  |  |  |  100|     15|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 11]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     11|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     22|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     11|    }                                                                          \
  |  |  |  |  106|     11|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  688|    763|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 763, False: 259k]
  ------------------
  689|  1.05k|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 290, False: 260k]
  ------------------
  690|  1.69k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 641, False: 259k]
  ------------------
  691|  1.69k|          continue;
  692|    616|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 616, False: 259k]
  ------------------
  693|  1.70k|        gt:
  694|  1.70k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.70k|#  define MINBPC(enc) 2
  ------------------
  695|  1.70k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  1.70k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|     77|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 77, False: 260k]
  ------------------
  697|    350|        sol:
  698|    350|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    350|#  define MINBPC(enc) 2
  ------------------
  699|    350|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    350|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    350|    {                                                                          \
  |  |  |  |  135|    350|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    350|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    350|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 6, False: 344]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|    350|    }
  |  |  ------------------
  ------------------
  700|    344|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    344|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    344|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 337, False: 7]
  |  |  |  |  |  Branch (739:52): [True: 331, False: 6]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  701|     13|            *nextTokPtr = ptr;
  702|     13|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  703|     13|          }
  704|    331|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    331|#  define MINBPC(enc) 2
  ------------------
  705|    331|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|    331|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|      7|        default:
  ------------------
  |  Branch (706:9): [True: 7, False: 260k]
  ------------------
  707|      7|          *nextTokPtr = ptr;
  708|      7|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  709|   260k|        }
  710|   258k|        break;
  711|   260k|      }
  712|   258k|      break;
  713|   258k|    }
  714|   258k|    default:
  ------------------
  |  Branch (714:5): [True: 11, False: 264k]
  ------------------
  715|     11|      *nextTokPtr = ptr;
  716|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  717|   264k|    }
  718|   264k|  }
  719|     80|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     80|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  2.50k|}
xmltok.c:little2_scanRef:
  545|  20.6k|                const char **nextTokPtr) {
  546|  20.6k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  20.6k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  20.6k|    {                                                                          \
  |  |  |  |  135|  20.6k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  20.6k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  20.6k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 23, False: 20.6k]
  |  |  |  |  ------------------
  |  |  |  |  136|     23|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     23|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     23|      }                                                                        \
  |  |  |  |  138|  20.6k|    }
  |  |  ------------------
  ------------------
  547|  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|  19.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 19.3k, False: 1.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  548|  6.01k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  12.3k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.28k, False: 19.3k]
  |  |  ------------------
  |  |  111|  12.3k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  1.28k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  1.28k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.28k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 16, False: 1.26k]
  |  |  ------------------
  |  |  112|     16|      *nextTokPtr = ptr;                                                       \
  |  |  113|     16|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     16|    }                                                                          \
  |  |  115|  12.3k|    /* fall through */                                                         \
  |  |  116|  12.3k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.43k, False: 17.1k]
  |  |  ------------------
  |  |  117|  12.3k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 7.64k, False: 12.9k]
  |  |  ------------------
  |  |  118|  12.3k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  12.3k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  12.3k|    break;                                                                     \
  |  |  120|  12.3k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 20.6k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 20.6k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     16|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 16, False: 20.5k]
  |  |  |  |  ------------------
  |  |  |  |  100|     16|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 11]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     11|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     22|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     11|    }                                                                          \
  |  |  |  |  106|     11|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  549|  8.22k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 8.22k, False: 12.3k]
  ------------------
  550|  8.22k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  8.22k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  8.22k|#  define MINBPC(enc) 2
  ------------------
  551|     13|  default:
  ------------------
  |  Branch (551:3): [True: 13, False: 20.5k]
  ------------------
  552|     13|    *nextTokPtr = ptr;
  553|     13|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  554|  20.6k|  }
  555|  37.6k|  while (HAS_CHAR(enc, ptr, end)) {
  556|  37.6k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  37.6k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  37.6k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  31.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 31.3k, False: 6.34k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  557|   101k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  25.4k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 6.32k, False: 31.3k]
  |  |  ------------------
  |  |   82|  25.4k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  6.32k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  6.32k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  6.32k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 30, False: 6.29k]
  |  |  ------------------
  |  |   83|     30|      *nextTokPtr = ptr;                                                       \
  |  |   84|     30|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     30|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     30|    }                                                                          \
  |  |   86|  25.4k|    /* fall through */                                                         \
  |  |   87|  25.4k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 14.4k, False: 23.2k]
  |  |  ------------------
  |  |   88|  24.3k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 3.63k, False: 34.0k]
  |  |  ------------------
  |  |   89|  24.9k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 577, False: 37.1k]
  |  |  ------------------
  |  |   90|  25.1k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 246, False: 37.4k]
  |  |  ------------------
  |  |   91|  25.4k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 214, False: 37.4k]
  |  |  ------------------
  |  |   92|  25.4k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  25.4k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  25.4k|    break;                                                                     \
  |  |   94|  25.4k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 37.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: 37.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: 37.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;
  |  |  ------------------
  ------------------
  558|  12.2k|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 12.2k, False: 25.4k]
  ------------------
  559|  12.2k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  12.2k|#  define MINBPC(enc) 2
  ------------------
  560|  12.2k|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|  12.2k|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|     12|    default:
  ------------------
  |  Branch (561:5): [True: 12, False: 37.6k]
  ------------------
  562|     12|      *nextTokPtr = ptr;
  563|     12|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  564|  37.6k|    }
  565|  37.6k|  }
  566|     54|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     54|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|  12.3k|}
xmltok.c:little2_scanCharRef:
  514|  8.22k|                    const char **nextTokPtr) {
  515|  8.22k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  8.22k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  8.22k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  8.22k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 8.22k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  8.22k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  787|  8.22k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  8.22k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 8.22k, False: 3]
  |  |  |  |  |  Branch (739:52): [True: 7.00k, False: 1.22k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  517|  7.00k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  7.00k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  7.00k|#  define MINBPC(enc) 2
  ------------------
  518|  1.22k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.22k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.22k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.22k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.22k, False: 3]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  519|  1.21k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 1.21k, False: 6]
  ------------------
  520|  1.21k|      break;
  521|      6|    default:
  ------------------
  |  Branch (521:5): [True: 6, False: 1.21k]
  ------------------
  522|      6|      *nextTokPtr = ptr;
  523|      6|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  524|  1.22k|    }
  525|  4.12k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  1.21k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  2.91k|#  define MINBPC(enc) 2
  ------------------
  526|  4.12k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  4.12k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  4.12k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.10k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.10k, False: 21]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  527|  2.91k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 2.91k, False: 1.21k]
  ------------------
  528|  2.91k|        break;
  529|  1.18k|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 1.18k, False: 2.93k]
  ------------------
  530|  1.18k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.18k|#  define MINBPC(enc) 2
  ------------------
  531|  1.18k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  1.18k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     21|      default:
  ------------------
  |  Branch (532:7): [True: 21, False: 4.10k]
  ------------------
  533|     21|        *nextTokPtr = ptr;
  534|     21|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  535|  4.12k|      }
  536|  4.12k|    }
  537|  1.21k|  }
  538|      8|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      8|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  8.22k|}
xmltok.c:little2_scanHexCharRef:
  483|  7.00k|                       const char **nextTokPtr) {
  484|  7.00k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  7.00k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  7.00k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  7.00k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 6.99k, False: 3]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  6.99k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  6.99k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  6.99k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  6.98k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 6.98k, False: 10]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  486|  4.22k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 4.22k, False: 2.76k]
  ------------------
  487|  6.98k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 2.75k, False: 4.24k]
  ------------------
  488|  6.98k|      break;
  489|     14|    default:
  ------------------
  |  Branch (489:5): [True: 14, False: 6.98k]
  ------------------
  490|     14|      *nextTokPtr = ptr;
  491|     14|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  492|  6.99k|    }
  493|  20.6k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  6.98k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  13.6k|#  define MINBPC(enc) 2
  ------------------
  494|  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|  20.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 20.5k, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  495|  5.74k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 5.74k, False: 14.8k]
  ------------------
  496|  13.6k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 7.90k, False: 12.7k]
  ------------------
  497|  13.6k|        break;
  498|  6.94k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 6.94k, False: 13.6k]
  ------------------
  499|  6.94k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  6.94k|#  define MINBPC(enc) 2
  ------------------
  500|  6.94k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  6.94k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|     28|      default:
  ------------------
  |  Branch (501:7): [True: 28, False: 20.5k]
  ------------------
  502|     28|        *nextTokPtr = ptr;
  503|     28|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     28|#define XML_TOK_INVALID 0
  ------------------
  504|  20.6k|      }
  505|  20.6k|    }
  506|  6.98k|  }
  507|     17|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     17|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  7.00k|}
xmltok.c:little2_cdataSectionTok:
  356|  34.4k|                        const char **nextTokPtr) {
  357|  34.4k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 134, False: 34.3k]
  ------------------
  358|    134|    return XML_TOK_NONE;
  ------------------
  |  |   51|    134|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|  34.3k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  34.3k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (359:7): [Folded - Ignored]
  ------------------
  360|  34.3k|    size_t n = end - ptr;
  361|  34.3k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  34.3k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (361:9): [True: 11.0k, False: 23.3k]
  ------------------
  362|  11.0k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  11.0k|#  define MINBPC(enc) 2
  ------------------
  363|  11.0k|      if (n == 0)
  ------------------
  |  Branch (363:11): [True: 27, False: 11.0k]
  ------------------
  364|     27|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     27|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  365|  11.0k|      end = ptr + n;
  366|  11.0k|    }
  367|  34.3k|  }
  368|  34.3k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  34.3k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  34.3k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  23.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 23.0k, False: 11.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  369|  4.52k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 4.52k, False: 29.8k]
  ------------------
  370|  4.52k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.52k|#  define MINBPC(enc) 2
  ------------------
  371|  4.52k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.52k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.52k|    {                                                                          \
  |  |  |  |  135|  4.52k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.52k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  4.52k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 4.51k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  4.52k|    }
  |  |  ------------------
  ------------------
  372|  4.51k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  787|  4.51k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  4.51k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 2.93k, False: 1.58k]
  |  |  |  |  |  Branch (739:52): [True: 1.59k, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  373|  2.92k|      break;
  374|  1.59k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.59k|#  define MINBPC(enc) 2
  ------------------
  375|  1.59k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.59k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.59k|    {                                                                          \
  |  |  |  |  135|  1.59k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.59k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.59k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 1.59k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  1.59k|    }
  |  |  ------------------
  ------------------
  376|  1.59k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  1.59k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.59k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 815, False: 781]
  |  |  |  |  |  Branch (739:52): [True: 306, False: 509]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  377|  1.29k|      ptr -= MINBPC(enc);
  ------------------
  |  |  783|  1.29k|#  define MINBPC(enc) 2
  ------------------
  378|  1.29k|      break;
  379|  1.29k|    }
  380|    306|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    306|#  define MINBPC(enc) 2
  ------------------
  381|    306|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|    306|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  11.7k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 11.7k, False: 22.5k]
  ------------------
  383|  11.7k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  11.7k|#  define MINBPC(enc) 2
  ------------------
  384|  11.7k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  11.7k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  11.7k|    {                                                                          \
  |  |  |  |  135|  11.7k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  11.7k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  11.7k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 6, False: 11.7k]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|  11.7k|    }
  |  |  ------------------
  ------------------
  385|  11.7k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  11.7k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  11.7k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.36k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 3.36k, False: 8.38k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 1.82k, False: 9.92k]
  ------------------
  386|  1.82k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.82k|#  define MINBPC(enc) 2
  ------------------
  387|  11.7k|    *nextTokPtr = ptr;
  388|  11.7k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  11.7k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  5.31k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 5.31k, False: 29.0k]
  ------------------
  390|  5.31k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  5.31k|#  define MINBPC(enc) 2
  ------------------
  391|  5.31k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  5.31k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  12.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: 34.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: 34.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|  6.43k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  6.38k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 6.43k, False: 27.8k]
  |  |  |  |  ------------------
  |  |  |  |   50|  6.43k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 55, False: 6.38k]
  |  |  |  |  ------------------
  |  |  |  |   51|  6.38k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     55|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  6.38k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  6.38k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  6.38k|    ptr += n;                                                                  \
  |  |  |  |   57|  6.38k|    break;
  |  |  ------------------
  |  |   63|  6.38k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 47, False: 34.2k]
  |  |  ------------------
  |  |   64|     47|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 34.3k]
  |  |  ------------------
  |  |   65|     60|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 13, False: 34.3k]
  |  |  ------------------
  |  |   66|     60|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     60|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     60|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  6.23k|  default:
  ------------------
  |  Branch (393:3): [True: 6.23k, False: 28.0k]
  ------------------
  394|  6.23k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  6.23k|#  define MINBPC(enc) 2
  ------------------
  395|  6.23k|    break;
  396|  34.3k|  }
  397|   392k|  while (HAS_CHAR(enc, ptr, end)) {
  398|   392k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   392k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   392k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  42.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 42.2k, False: 349k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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: 392k]
  |  |  ------------------
  |  |  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: 392k]
  |  |  ------------------
  |  |  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|  28.6k|      LEAD_CASE(4)
  ------------------
  |  |  400|  28.5k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 28.6k, False: 363k]
  |  |  ------------------
  |  |  401|  28.6k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  28.5k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 43, False: 28.5k]
  |  |  ------------------
  |  |  402|     43|      *nextTokPtr = ptr;                                                       \
  |  |  403|     43|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     43|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|     43|    }                                                                          \
  |  |  405|  28.5k|    ptr += n;                                                                  \
  |  |  406|  28.5k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|     45|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 45, False: 391k]
  ------------------
  412|     45|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 0, False: 392k]
  ------------------
  413|     56|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 11, False: 392k]
  ------------------
  414|  8.77k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 8.72k, False: 383k]
  ------------------
  415|  13.3k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 4.58k, False: 387k]
  ------------------
  416|  16.6k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 3.29k, False: 388k]
  ------------------
  417|  16.6k|      *nextTokPtr = ptr;
  418|  16.6k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  16.6k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|   346k|    default:
  ------------------
  |  Branch (419:5): [True: 346k, False: 45.2k]
  ------------------
  420|   346k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   346k|#  define MINBPC(enc) 2
  ------------------
  421|   346k|      break;
  422|   392k|    }
  423|   392k|  }
  424|    133|  *nextTokPtr = ptr;
  425|    133|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    133|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  16.8k|}
xmltok.c:little2_attributeValueTok:
 1262|  29.2k|                          const char **nextTokPtr) {
 1263|  29.2k|  const char *start;
 1264|  29.2k|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 2.81k, False: 26.3k]
  ------------------
 1265|  2.81k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  2.81k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|  26.3k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  26.3k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  26.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  26.3k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 26.3k]
  ------------------
 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|  26.3k|  start = ptr;
 1275|  1.19M|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  1.19M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.19M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.19M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  49.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 49.1k, False: 1.14M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1277|      0|#  define LEAD_CASE(n)                                                         \
 1278|      0|  case BT_LEAD##n:                                                             \
 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1280|      0|    break;
 1281|      0|      LEAD_CASE(2)
  ------------------
  |  | 1278|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 0, False: 1.19M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1282|      0|      LEAD_CASE(3)
  ------------------
  |  | 1278|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 0, False: 1.19M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1283|  24.0k|      LEAD_CASE(4)
  ------------------
  |  | 1278|  24.0k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 24.0k, False: 1.16M]
  |  |  ------------------
  |  | 1279|  24.0k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  24.0k|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|  3.61k|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 3.61k, False: 1.18M]
  ------------------
 1286|  3.61k|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 2.12k, False: 1.49k]
  ------------------
 1287|  2.12k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.12k|#  define PREFIX(ident) little2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.12k|#  define MINBPC(enc) 2
  ------------------
 1288|  1.49k|      *nextTokPtr = ptr;
 1289|  1.49k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.49k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      1|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 1, False: 1.19M]
  ------------------
 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|  5.57k|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 5.57k, False: 1.18M]
  ------------------
 1295|  5.57k|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 2.96k, False: 2.61k]
  ------------------
 1296|  2.96k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.96k|#  define MINBPC(enc) 2
  ------------------
 1297|  2.96k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  2.96k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|  2.96k|      }
 1299|  2.61k|      *nextTokPtr = ptr;
 1300|  2.61k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.61k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|  6.33k|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 6.33k, False: 1.18M]
  ------------------
 1302|  6.33k|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 3.96k, False: 2.37k]
  ------------------
 1303|  3.96k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.96k|#  define MINBPC(enc) 2
  ------------------
 1304|  3.96k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  3.96k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  3.96k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  3.96k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 314, False: 3.64k]
  ------------------
 1305|    314|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    314|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|  3.64k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  3.64k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  3.64k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.60k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.60k, False: 2.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 474, False: 3.17k]
  ------------------
 1307|    474|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    474|#  define MINBPC(enc) 2
  ------------------
 1308|  3.64k|        *nextTokPtr = ptr;
 1309|  3.64k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  3.64k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|  3.96k|      }
 1311|  2.37k|      *nextTokPtr = ptr;
 1312|  2.37k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.37k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  10.2k|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 10.2k, False: 1.18M]
  ------------------
 1314|  10.2k|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 5.51k, False: 4.75k]
  ------------------
 1315|  5.51k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  5.51k|#  define MINBPC(enc) 2
  ------------------
 1316|  5.51k|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  5.51k|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  5.51k|      }
 1318|  4.75k|      *nextTokPtr = ptr;
 1319|  4.75k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  4.75k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|  1.14M|    default:
  ------------------
  |  Branch (1320:5): [True: 1.14M, False: 49.8k]
  ------------------
 1321|  1.14M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.14M|#  define MINBPC(enc) 2
  ------------------
 1322|  1.14M|      break;
 1323|  1.19M|    }
 1324|  1.19M|  }
 1325|    589|  *nextTokPtr = ptr;
 1326|    589|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    589|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|  26.3k|}
xmltok.c:little2_entityValueTok:
 1331|  99.2k|                       const char **nextTokPtr) {
 1332|  99.2k|  const char *start;
 1333|  99.2k|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 998, False: 98.2k]
  ------------------
 1334|    998|    return XML_TOK_NONE;
  ------------------
  |  |   51|    998|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|  98.2k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  98.2k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  98.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  98.2k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 98.2k]
  ------------------
 1336|       |    /* This line cannot be executed.  The incoming data has already
 1337|       |     * been tokenized once, so incomplete characters like this have
 1338|       |     * already been eliminated from the input.  Retaining the paranoia
 1339|       |     * check is still valuable, however.
 1340|       |     */
 1341|      0|    return XML_TOK_PARTIAL; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1342|      0|  }
 1343|  98.2k|  start = ptr;
 1344|  2.57M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  2.57M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.57M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.57M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   198k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 198k, False: 2.37M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 2.57M]
  |  |  ------------------
  |  | 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: 2.57M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1352|  46.4k|      LEAD_CASE(4)
  ------------------
  |  | 1347|  46.4k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 46.4k, False: 2.52M]
  |  |  ------------------
  |  | 1348|  46.4k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|  46.4k|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  6.74k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 6.74k, False: 2.56M]
  ------------------
 1355|  6.74k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 3.54k, False: 3.20k]
  ------------------
 1356|  3.54k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  3.54k|#  define PREFIX(ident) little2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  3.54k|#  define MINBPC(enc) 2
  ------------------
 1357|  3.20k|      *nextTokPtr = ptr;
 1358|  3.20k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  3.20k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      8|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 8, False: 2.57M]
  ------------------
 1360|      8|      if (ptr == start) {
  ------------------
  |  Branch (1360:11): [True: 5, False: 3]
  ------------------
 1361|      5|        int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|      5|#  define PREFIX(ident) little2_##ident
  ------------------
                      int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|      5|#  define MINBPC(enc) 2
  ------------------
 1362|      5|        return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   89|      5|#define XML_TOK_PERCENT 22
  ------------------
                      return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (1362:16): [True: 2, False: 3]
  ------------------
 1363|      5|      }
 1364|      3|      *nextTokPtr = ptr;
 1365|      3|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|      3|#define XML_TOK_DATA_CHARS 6
  ------------------
 1366|  45.3k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 45.3k, False: 2.52M]
  ------------------
 1367|  45.3k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 26.2k, False: 19.1k]
  ------------------
 1368|  26.2k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  26.2k|#  define MINBPC(enc) 2
  ------------------
 1369|  26.2k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  26.2k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|  26.2k|      }
 1371|  19.1k|      *nextTokPtr = ptr;
 1372|  19.1k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  19.1k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|  45.7k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 45.7k, False: 2.52M]
  ------------------
 1374|  45.7k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 38.4k, False: 7.33k]
  ------------------
 1375|  38.4k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  38.4k|#  define MINBPC(enc) 2
  ------------------
 1376|  38.4k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  38.4k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  38.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  38.4k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 500, False: 37.9k]
  ------------------
 1377|    500|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    500|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|  37.9k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  37.9k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  37.9k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  30.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 30.3k, False: 7.59k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 25.2k, False: 12.6k]
  ------------------
 1379|  25.2k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  25.2k|#  define MINBPC(enc) 2
  ------------------
 1380|  37.9k|        *nextTokPtr = ptr;
 1381|  37.9k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  37.9k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|  38.4k|      }
 1383|  7.33k|      *nextTokPtr = ptr;
 1384|  7.33k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  7.33k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  2.42M|    default:
  ------------------
  |  Branch (1385:5): [True: 2.42M, False: 144k]
  ------------------
 1386|  2.42M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.42M|#  define MINBPC(enc) 2
  ------------------
 1387|  2.42M|      break;
 1388|  2.57M|    }
 1389|  2.57M|  }
 1390|    427|  *nextTokPtr = ptr;
 1391|    427|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    427|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|  98.2k|}
xmltok.c:little2_nameMatchesAscii:
 1715|  19.0k|                         const char *end1, const char *ptr2) {
 1716|  19.0k|  UNUSED_P(enc);
  ------------------
  |  |  135|  19.0k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|  85.8k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  783|  66.8k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1717:10): [True: 74.5k, False: 11.3k]
  ------------------
 1718|  74.5k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  783|  74.5k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1718:9): [True: 41, False: 74.5k]
  ------------------
 1719|       |      /* This line cannot be executed.  The incoming data has already
 1720|       |       * been tokenized once, so incomplete characters like this have
 1721|       |       * already been eliminated from the input.  Retaining the
 1722|       |       * paranoia check is still valuable, however.
 1723|       |       */
 1724|     41|      return 0; /* LCOV_EXCL_LINE */
 1725|     41|    }
 1726|  74.5k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  787|  74.5k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  74.5k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 74.5k, False: 27]
  |  |  |  |  |  Branch (739:52): [True: 66.8k, False: 7.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1727|  7.67k|      return 0;
 1728|  74.5k|  }
 1729|  11.3k|  return ptr1 == end1;
 1730|  19.0k|}
xmltok.c:little2_nameLength:
 1733|  12.6k|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  12.6k|  const char *start = ptr;
 1735|  35.5k|  for (;;) {
 1736|  35.5k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  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|  25.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 25.6k, False: 9.87k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 35.5k]
  |  |  ------------------
  |  | 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: 35.5k]
  |  |  ------------------
  |  | 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: 35.5k]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1744|      0|#  undef LEAD_CASE
 1745|  9.87k|    case BT_NONASCII:
  ------------------
  |  Branch (1745:5): [True: 9.87k, False: 25.6k]
  ------------------
 1746|  19.0k|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 9.20k, False: 26.3k]
  ------------------
 1747|  19.0k|#  ifdef XML_NS
 1748|  19.0k|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 35.5k]
  ------------------
 1749|  19.0k|#  endif
 1750|  22.6k|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 3.53k, False: 31.9k]
  ------------------
 1751|  22.7k|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 111, False: 35.4k]
  ------------------
 1752|  22.8k|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 129, False: 35.3k]
  ------------------
 1753|  22.8k|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 37, False: 35.4k]
  ------------------
 1754|  22.8k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  22.8k|#  define MINBPC(enc) 2
  ------------------
 1755|  22.8k|      break;
 1756|  12.6k|    default:
  ------------------
  |  Branch (1756:5): [True: 12.6k, False: 22.8k]
  ------------------
 1757|  12.6k|      return (int)(ptr - start);
 1758|  35.5k|    }
 1759|  35.5k|  }
 1760|  12.6k|}
xmltok.c:little2_getAtts:
 1510|  8.18k|                ATTRIBUTE *atts) {
 1511|  8.18k|  enum { other, inName, inValue } state = inName;
 1512|  8.18k|  int nAtts = 0;
 1513|  8.18k|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  8.83M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  8.18k|#  define MINBPC(enc) 2
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  8.83M|#  define MINBPC(enc) 2
  ------------------
 1517|  8.83M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  8.83M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  8.83M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.42M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.42M, False: 4.41M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 8.83M]
  |  |  ------------------
  |  | 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: 8.83M]
  |  |  ------------------
  |  | 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|  67.1k|      LEAD_CASE(4)
  ------------------
  |  | 1527|  67.1k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 67.1k, False: 8.77M]
  |  |  ------------------
  |  | 1528|  67.1k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  67.1k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 67.1k]
  |  |  |  |  ------------------
  |  |  |  | 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|  67.1k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|  67.1k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|  4.35M|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 4.35M, False: 4.48M]
  ------------------
 1535|  4.88M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 532k, False: 8.30M]
  ------------------
 1536|  5.00M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 125k, False: 8.71M]
  ------------------
 1537|  5.00M|      START_NAME
  ------------------
  |  | 1519|  5.00M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 509k, False: 4.49M]
  |  |  ------------------
  |  | 1520|   509k|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 257k, False: 252k]
  |  |  ------------------
  |  | 1521|   257k|        atts[nAtts].name = ptr;                                                \
  |  | 1522|   257k|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|   257k|      }                                                                        \
  |  | 1524|   509k|      state = inName;                                                          \
  |  | 1525|   509k|    }
  ------------------
 1538|  5.00M|      break;
 1539|      0|#  undef START_NAME
 1540|  27.9k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 27.9k, False: 8.81M]
  ------------------
 1541|  27.9k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 10.9k, False: 16.9k]
  ------------------
 1542|  10.9k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 7.29k, False: 3.66k]
  ------------------
 1543|  7.29k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  7.29k|#  define MINBPC(enc) 2
  ------------------
 1544|  10.9k|        state = inValue;
 1545|  10.9k|        open = BT_QUOT;
 1546|  16.9k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 10.9k, False: 6.00k]
  ------------------
 1547|  10.9k|        state = other;
 1548|  10.9k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 7.29k, False: 3.66k]
  ------------------
 1549|  7.29k|          atts[nAtts].valueEnd = ptr;
 1550|  10.9k|        nAtts++;
 1551|  10.9k|      }
 1552|  27.9k|      break;
 1553|  1.00M|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 1.00M, False: 7.83M]
  ------------------
 1554|  1.00M|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 499k, False: 503k]
  ------------------
 1555|   499k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 250k, False: 248k]
  ------------------
 1556|   250k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|   250k|#  define MINBPC(enc) 2
  ------------------
 1557|   499k|        state = inValue;
 1558|   499k|        open = BT_APOS;
 1559|   503k|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 499k, False: 4.89k]
  ------------------
 1560|   499k|        state = other;
 1561|   499k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 250k, False: 248k]
  ------------------
 1562|   250k|          atts[nAtts].valueEnd = ptr;
 1563|   499k|        nAtts++;
 1564|   499k|      }
 1565|  1.00M|      break;
 1566|  2.71k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 2.71k, False: 8.83M]
  ------------------
 1567|  2.71k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 2.48k, False: 222]
  ------------------
 1568|  2.48k|        atts[nAtts].normalized = 0;
 1569|  2.71k|      break;
 1570|  1.38M|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 1.38M, False: 7.45M]
  ------------------
 1571|  1.38M|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 1.94k, False: 1.38M]
  ------------------
 1572|  1.94k|        state = other;
 1573|  1.38M|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 879k, False: 505k]
  |  Branch (1573:36): [True: 443k, False: 435k]
  |  Branch (1573:55): [True: 222k, False: 221k]
  ------------------
 1574|  1.38M|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 39.0k, False: 183k]
  ------------------
 1575|   222k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  786|   183k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|   183k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 183k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|   405k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 7.71k, False: 175k]
  ------------------
 1576|   222k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  786|   175k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|   175k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 167k, False: 7.61k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|   397k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 91.7k, False: 83.6k]
  ------------------
 1577|   222k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  785|  83.6k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  83.6k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  76.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 76.0k, False: 7.61k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 75.7k, False: 7.94k]
  ------------------
 1578|   214k|        atts[nAtts].normalized = 0;
 1579|  1.38M|      break;
 1580|   184k|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 184k, False: 8.65M]
  ------------------
 1581|   192k|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 8.43k, False: 8.83M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|   192k|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 1.90k, False: 190k]
  ------------------
 1585|  1.90k|        state = other;
 1586|   190k|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 185k, False: 5.19k]
  |  Branch (1586:36): [True: 96.6k, False: 89.1k]
  ------------------
 1587|  96.6k|        atts[nAtts].normalized = 0;
 1588|   192k|      break;
 1589|   220k|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 220k, False: 8.61M]
  ------------------
 1590|   272k|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 51.9k, False: 8.78M]
  ------------------
 1591|   272k|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 8.18k, False: 264k]
  ------------------
 1592|  8.18k|        return nAtts;
 1593|   264k|      break;
 1594|   877k|    default:
  ------------------
  |  Branch (1594:5): [True: 877k, False: 7.96M]
  ------------------
 1595|   877k|      break;
 1596|  8.83M|    }
 1597|  8.83M|  }
 1598|       |  /* not reached */
 1599|  8.18k|}
xmltok.c:little2_charRefNumber:
 1602|  6.88k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  6.88k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  6.88k|  UNUSED_P(enc);
  ------------------
  |  |  135|  6.88k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  6.88k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  783|  6.88k|#  define MINBPC(enc) 2
  ------------------
 1607|  6.88k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  787|  6.88k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  6.88k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 6.88k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 5.84k, False: 1.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1608|  23.3k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  783|  5.84k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  787|  23.3k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  23.3k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 23.3k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 5.83k, False: 17.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1609|  17.5k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  17.5k|#  define MINBPC(enc) 2
  ------------------
 1610|  17.5k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  786|  17.5k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  17.5k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 17.5k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1611|  17.5k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 17.5k]
  ------------------
 1612|    842|      case ASCII_0:
  ------------------
  |  |   90|    842|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 842, False: 16.6k]
  ------------------
 1613|  2.65k|      case ASCII_1:
  ------------------
  |  |   91|  2.65k|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 1.81k, False: 15.7k]
  ------------------
 1614|  3.47k|      case ASCII_2:
  ------------------
  |  |   92|  3.47k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 816, False: 16.7k]
  ------------------
 1615|  4.24k|      case ASCII_3:
  ------------------
  |  |   93|  4.24k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 770, False: 16.7k]
  ------------------
 1616|  4.75k|      case ASCII_4:
  ------------------
  |  |   94|  4.75k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 515, False: 17.0k]
  ------------------
 1617|  5.72k|      case ASCII_5:
  ------------------
  |  |   95|  5.72k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 969, False: 16.5k]
  ------------------
 1618|  6.15k|      case ASCII_6:
  ------------------
  |  |   96|  6.15k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 430, False: 17.1k]
  ------------------
 1619|  7.99k|      case ASCII_7:
  ------------------
  |  |   97|  7.99k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 1.83k, False: 15.7k]
  ------------------
 1620|  8.44k|      case ASCII_8:
  ------------------
  |  |   98|  8.44k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 450, False: 17.0k]
  ------------------
 1621|  8.82k|      case ASCII_9:
  ------------------
  |  |   99|  8.82k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 381, False: 17.1k]
  ------------------
 1622|  8.82k|        result <<= 4;
 1623|  8.82k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  8.82k|#define ASCII_0 0x30
  ------------------
 1624|  8.82k|        break;
 1625|    215|      case ASCII_A:
  ------------------
  |  |   36|    215|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 215, False: 17.3k]
  ------------------
 1626|    734|      case ASCII_B:
  ------------------
  |  |   37|    734|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 519, False: 17.0k]
  ------------------
 1627|    937|      case ASCII_C:
  ------------------
  |  |   38|    937|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 203, False: 17.3k]
  ------------------
 1628|  1.15k|      case ASCII_D:
  ------------------
  |  |   39|  1.15k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 214, False: 17.3k]
  ------------------
 1629|  1.52k|      case ASCII_E:
  ------------------
  |  |   40|  1.52k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 373, False: 17.1k]
  ------------------
 1630|  3.85k|      case ASCII_F:
  ------------------
  |  |   41|  3.85k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 2.32k, False: 15.2k]
  ------------------
 1631|  3.85k|        result <<= 4;
 1632|  3.85k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  3.85k|#define ASCII_A 0x41
  ------------------
 1633|  3.85k|        break;
 1634|  1.11k|      case ASCII_a:
  ------------------
  |  |   63|  1.11k|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 1.11k, False: 16.4k]
  ------------------
 1635|  2.29k|      case ASCII_b:
  ------------------
  |  |   64|  2.29k|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 1.17k, False: 16.3k]
  ------------------
 1636|  2.81k|      case ASCII_c:
  ------------------
  |  |   65|  2.81k|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 519, False: 17.0k]
  ------------------
 1637|  3.68k|      case ASCII_d:
  ------------------
  |  |   66|  3.68k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 863, False: 16.6k]
  ------------------
 1638|  4.41k|      case ASCII_e:
  ------------------
  |  |   67|  4.41k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 736, False: 16.8k]
  ------------------
 1639|  4.86k|      case ASCII_f:
  ------------------
  |  |   68|  4.86k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 450, False: 17.0k]
  ------------------
 1640|  4.86k|        result <<= 4;
 1641|  4.86k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  4.86k|#define ASCII_a 0x61
  ------------------
 1642|  4.86k|        break;
 1643|  17.5k|      }
 1644|  17.5k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 12, False: 17.5k]
  ------------------
 1645|     12|        return -1;
 1646|  17.5k|    }
 1647|  5.84k|  } else {
 1648|  4.77k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  787|  4.77k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  4.77k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 4.77k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 1.03k, False: 3.74k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  3.73k|#  define MINBPC(enc) 2
  ------------------
 1649|  3.74k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  786|  3.74k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  3.74k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 3.74k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1650|  3.74k|      result *= 10;
 1651|  3.74k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  3.74k|#define ASCII_0 0x30
  ------------------
 1652|  3.74k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 3, False: 3.73k]
  ------------------
 1653|      3|        return -1;
 1654|  3.74k|    }
 1655|  1.04k|  }
 1656|  6.87k|  return checkCharRefNumber(result);
 1657|  6.88k|}
xmltok.c:little2_predefinedEntityName:
 1661|  10.2k|                             const char *end) {
 1662|  10.2k|  UNUSED_P(enc);
  ------------------
  |  |  135|  10.2k|#  define UNUSED_P(p) (void)p
  ------------------
 1663|  10.2k|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  783|  10.2k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1663:11): [True: 1.74k, False: 8.50k]
  ------------------
 1664|  1.09k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 1.09k, False: 9.16k]
  ------------------
 1665|  1.09k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  787|  1.09k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.09k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 790, False: 300]
  |  |  |  |  |  Branch (739:52): [True: 392, False: 398]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1666|    392|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|    392|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|    392|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:34): [True: 87, False: 305]
  |  |  |  |  |  Branch (738:35): [True: 320, False: 72]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1667|    142|      case ASCII_l:
  ------------------
  |  |   74|    142|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 142, False: 250]
  ------------------
 1668|    142|        return ASCII_LT;
  ------------------
  |  |  111|    142|#define ASCII_LT 0x3C
  ------------------
 1669|    163|      case ASCII_g:
  ------------------
  |  |   69|    163|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 163, False: 229]
  ------------------
 1670|    163|        return ASCII_GT;
  ------------------
  |  |  113|    163|#define ASCII_GT 0x3E
  ------------------
 1671|    392|      }
 1672|    392|    }
 1673|    785|    break;
 1674|  1.87k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.87k, False: 8.38k]
  ------------------
 1675|  1.87k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  787|  1.87k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.87k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.52k, False: 349]
  |  |  |  |  |  Branch (739:52): [True: 1.02k, False: 495]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1676|  1.02k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.02k|#  define MINBPC(enc) 2
  ------------------
 1677|  1.02k|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  787|  1.02k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.02k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 743, False: 283]
  |  |  |  |  |  Branch (739:52): [True: 463, False: 280]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1678|    463|        ptr += MINBPC(enc);
  ------------------
  |  |  783|    463|#  define MINBPC(enc) 2
  ------------------
 1679|    463|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  787|    463|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    463|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 266, False: 197]
  |  |  |  |  |  Branch (739:52): [True: 67, False: 199]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1680|     67|          return ASCII_AMP;
  ------------------
  |  |  105|     67|#define ASCII_AMP 0x26
  ------------------
 1681|    463|      }
 1682|  1.02k|    }
 1683|  1.80k|    break;
 1684|  5.54k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 5.54k, False: 4.70k]
  ------------------
 1685|  5.54k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  5.54k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  5.54k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:34): [True: 691, False: 4.85k]
  |  |  |  |  |  Branch (738:35): [True: 5.20k, False: 345]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1686|  1.53k|    case ASCII_q:
  ------------------
  |  |   79|  1.53k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 1.53k, False: 4.01k]
  ------------------
 1687|  1.53k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.53k|#  define MINBPC(enc) 2
  ------------------
 1688|  1.53k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  787|  1.53k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.53k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.33k, False: 197]
  |  |  |  |  |  Branch (739:52): [True: 1.13k, False: 198]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1689|  1.13k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.13k|#  define MINBPC(enc) 2
  ------------------
 1690|  1.13k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  787|  1.13k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.13k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 941, False: 198]
  |  |  |  |  |  Branch (739:52): [True: 741, False: 200]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1691|    741|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    741|#  define MINBPC(enc) 2
  ------------------
 1692|    741|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  787|    741|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    741|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 671, False: 70]
  |  |  |  |  |  Branch (739:52): [True: 466, False: 205]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1693|    466|            return ASCII_QUOT;
  ------------------
  |  |  104|    466|#define ASCII_QUOT 0x22
  ------------------
 1694|    741|        }
 1695|  1.13k|      }
 1696|  1.06k|      break;
 1697|  3.32k|    case ASCII_a:
  ------------------
  |  |   63|  3.32k|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 3.32k, False: 2.22k]
  ------------------
 1698|  3.32k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.32k|#  define MINBPC(enc) 2
  ------------------
 1699|  3.32k|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  787|  3.32k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  3.32k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 2.56k, False: 759]
  |  |  |  |  |  Branch (739:52): [True: 2.30k, False: 260]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1700|  2.30k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.30k|#  define MINBPC(enc) 2
  ------------------
 1701|  2.30k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  787|  2.30k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.30k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 2.08k, False: 216]
  |  |  |  |  |  Branch (739:52): [True: 1.87k, False: 214]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1702|  1.87k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.87k|#  define MINBPC(enc) 2
  ------------------
 1703|  1.87k|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  787|  1.87k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.87k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.60k, False: 270]
  |  |  |  |  |  Branch (739:52): [True: 197, False: 1.40k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1704|    197|            return ASCII_APOS;
  ------------------
  |  |  106|    197|#define ASCII_APOS 0x27
  ------------------
 1705|  1.87k|        }
 1706|  2.30k|      }
 1707|  3.12k|      break;
 1708|  5.54k|    }
 1709|  10.2k|  }
 1710|  9.22k|  return 0;
 1711|  10.2k|}
xmltok.c:little2_updatePosition:
 1779|  3.15k|                       POSITION *pos) {
 1780|  3.06M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  3.06M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  3.06M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  3.06M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   207k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 207k, False: 2.85M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1782|      0|#  define LEAD_CASE(n)                                                         \
 1783|      0|  case BT_LEAD##n:                                                             \
 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1785|      0|    pos->columnNumber++;                                                       \
 1786|      0|    break;
 1787|      0|      LEAD_CASE(2)
  ------------------
  |  | 1783|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 0, False: 3.06M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1788|      0|      LEAD_CASE(3)
  ------------------
  |  | 1783|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 0, False: 3.06M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1789|  85.5k|      LEAD_CASE(4)
  ------------------
  |  | 1783|  85.5k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 85.5k, False: 2.97M]
  |  |  ------------------
  |  | 1784|  85.5k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  85.5k|    pos->columnNumber++;                                                       \
  |  | 1786|  85.5k|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|  9.69k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 9.69k, False: 3.05M]
  ------------------
 1792|  9.69k|      pos->columnNumber = 0;
 1793|  9.69k|      pos->lineNumber++;
 1794|  9.69k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  9.69k|#  define MINBPC(enc) 2
  ------------------
 1795|  9.69k|      break;
 1796|  19.2k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 19.2k, False: 3.04M]
  ------------------
 1797|  19.2k|      pos->lineNumber++;
 1798|  19.2k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  19.2k|#  define MINBPC(enc) 2
  ------------------
 1799|  19.2k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|  19.2k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  38.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  19.2k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 19.1k, False: 44]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  19.1k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  19.1k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  10.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 10.7k, False: 8.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 1.18k, False: 18.0k]
  ------------------
 1800|  1.18k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.18k|#  define MINBPC(enc) 2
  ------------------
 1801|  19.2k|      pos->columnNumber = 0;
 1802|  19.2k|      break;
 1803|  2.94M|    default:
  ------------------
  |  Branch (1803:5): [True: 2.94M, False: 114k]
  ------------------
 1804|  2.94M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.94M|#  define MINBPC(enc) 2
  ------------------
 1805|  2.94M|      pos->columnNumber++;
 1806|  2.94M|      break;
 1807|  3.06M|    }
 1808|  3.06M|  }
 1809|  3.15k|}
xmltok.c:little2_isPublicId:
 1450|  1.24k|                   const char **badPtr) {
 1451|  1.24k|  ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.24k|#  define MINBPC(enc) 2
  ------------------
 1452|  1.24k|  end -= MINBPC(enc);
  ------------------
  |  |  783|  1.24k|#  define MINBPC(enc) 2
  ------------------
 1453|  27.8k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  27.7k|#  define MINBPC(enc) 2
  ------------------
 1454|  27.8k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  27.8k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  27.8k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  27.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 27.7k, False: 49]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1455|  1.22k|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 1.22k, False: 26.5k]
  ------------------
 1456|  2.94k|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 1.72k, False: 26.0k]
  ------------------
 1457|  3.26k|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 319, False: 27.4k]
  ------------------
 1458|  4.73k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 1.46k, False: 26.3k]
  ------------------
 1459|  5.54k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 819, False: 26.9k]
  ------------------
 1460|  5.83k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 290, False: 27.5k]
  ------------------
 1461|  7.19k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 1.35k, False: 26.4k]
  ------------------
 1462|  7.46k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 271, False: 27.5k]
  ------------------
 1463|  8.06k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 601, False: 27.2k]
  ------------------
 1464|  15.4k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 7.33k, False: 20.4k]
  ------------------
 1465|  15.9k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 501, False: 27.3k]
  ------------------
 1466|  16.8k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 946, False: 26.8k]
  ------------------
 1467|  18.3k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 1.47k, False: 26.3k]
  ------------------
 1468|  18.6k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 357, False: 27.4k]
  ------------------
 1469|  19.1k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 486, False: 27.3k]
  ------------------
 1470|  19.8k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 653, False: 27.1k]
  ------------------
 1471|  20.1k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 331, False: 27.4k]
  ------------------
 1472|  21.1k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 973, False: 26.8k]
  ------------------
 1473|  21.1k|#  ifdef XML_NS
 1474|  21.1k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 27.8k]
  ------------------
 1475|  21.1k|#  endif
 1476|  21.1k|      break;
 1477|  2.87k|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 2.87k, False: 24.9k]
  ------------------
 1478|  2.87k|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  787|  2.87k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.87k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 2.87k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 2.87k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1479|      1|        *badPtr = ptr;
 1480|      1|        return 0;
 1481|      1|      }
 1482|  2.87k|      break;
 1483|  2.87k|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 694, False: 27.1k]
  ------------------
 1484|  2.76k|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 2.07k, False: 25.7k]
  ------------------
 1485|  2.76k|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  786|  2.76k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  2.76k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 2.76k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1485:11): [True: 2.75k, False: 9]
  ------------------
 1486|  2.75k|        break;
 1487|       |      /* fall through */
 1488|  1.05k|    default:
  ------------------
  |  Branch (1488:5): [True: 1.04k, False: 26.7k]
  ------------------
 1489|  1.05k|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  1.05k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  1.05k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 1.00k, False: 49]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1490|    317|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 317, False: 739]
  ------------------
 1491|    997|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 680, False: 376]
  ------------------
 1492|    997|        break;
 1493|     59|      default:
  ------------------
  |  Branch (1493:7): [True: 59, False: 997]
  ------------------
 1494|     59|        *badPtr = ptr;
 1495|     59|        return 0;
 1496|  1.05k|      }
 1497|    997|      break;
 1498|  27.8k|    }
 1499|  27.8k|  }
 1500|  1.18k|  return 1;
 1501|  1.24k|}
xmltok.c:big2_prologTok:
 1018|  79.4k|                  const char **nextTokPtr) {
 1019|  79.4k|  int tok;
 1020|  79.4k|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 205, False: 79.2k]
  ------------------
 1021|    205|    return XML_TOK_NONE;
  ------------------
  |  |   51|    205|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  79.2k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  79.2k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|  79.2k|    size_t n = end - ptr;
 1024|  79.2k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  79.2k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1024:9): [True: 29.3k, False: 49.9k]
  ------------------
 1025|  29.3k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  29.3k|#  define MINBPC(enc) 2
  ------------------
 1026|  29.3k|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 63, False: 29.2k]
  ------------------
 1027|     63|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     63|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|  29.2k|      end = ptr + n;
 1029|  29.2k|    }
 1030|  79.2k|  }
 1031|  79.2k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  79.2k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  79.2k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  78.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 78.0k, False: 1.17k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1032|  1.01k|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 1.01k, False: 78.1k]
  ------------------
 1033|  1.01k|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  1.01k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  1.01k|#  define MINBPC(enc) 2
  ------------------
 1034|  4.71k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 4.71k, False: 74.4k]
  ------------------
 1035|  4.71k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  4.71k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  4.71k|#  define MINBPC(enc) 2
  ------------------
 1036|  12.4k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 12.4k, False: 66.7k]
  ------------------
 1037|  12.4k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  12.4k|#  define MINBPC(enc) 2
  ------------------
 1038|  12.4k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  12.4k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  12.4k|    {                                                                          \
  |  |  |  |  135|  12.4k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  12.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  12.4k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 8, False: 12.4k]
  |  |  |  |  ------------------
  |  |  |  |  136|      8|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      8|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      8|      }                                                                        \
  |  |  |  |  138|  12.4k|    }
  |  |  ------------------
  ------------------
 1039|  12.4k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  12.4k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  12.4k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  10.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 15, False: 12.4k]
  |  |  |  |  |  Branch (870:4): [True: 10.6k, False: 1.74k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  5.18k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 5.18k, False: 7.25k]
  ------------------
 1041|  5.18k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  5.18k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  5.18k|#  define MINBPC(enc) 2
  ------------------
 1042|  3.79k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 3.79k, False: 8.64k]
  ------------------
 1043|  3.79k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  3.79k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  3.79k|#  define MINBPC(enc) 2
  ------------------
 1044|  1.10k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 1.10k, False: 11.3k]
  ------------------
 1045|  1.70k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 605, False: 11.8k]
  ------------------
 1046|  3.43k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 1.72k, False: 10.7k]
  ------------------
 1047|  3.43k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 0, False: 12.4k]
  ------------------
 1048|  3.43k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 0, False: 12.4k]
  ------------------
 1049|  3.44k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 16, False: 12.4k]
  ------------------
 1050|  3.44k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  916|  3.44k|#  define MINBPC(enc) 2
  ------------------
 1051|  3.44k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  3.44k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  12.4k|    }
 1053|     15|    *nextTokPtr = ptr;
 1054|     15|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
 1055|  12.4k|  }
 1056|  6.86k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 6.86k, False: 72.3k]
  ------------------
 1057|  6.86k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  916|  6.86k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1057:9): [True: 51, False: 6.81k]
  ------------------
 1058|     51|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|     51|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|     51|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|     51|    }
 1062|       |    /* fall through */
 1063|  17.7k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 10.9k, False: 68.2k]
  ------------------
 1064|  22.0k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 4.25k, False: 74.9k]
  ------------------
 1065|  24.7k|    for (;;) {
 1066|  24.7k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  24.7k|#  define MINBPC(enc) 2
  ------------------
 1067|  24.7k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  24.7k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  24.7k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  24.7k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 144, False: 24.6k]
  ------------------
 1068|    144|        break;
 1069|  24.6k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  24.6k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  24.6k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  24.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 24.1k, False: 498]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1070|  1.04k|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 1.04k, False: 23.5k]
  ------------------
 1071|  2.07k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 1.02k, False: 23.5k]
  ------------------
 1072|  2.07k|        break;
 1073|    655|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 655, False: 23.9k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|    655|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  916|    655|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1075:13): [True: 653, False: 2]
  ------------------
 1076|    653|          break;
 1077|       |        /* fall through */
 1078|  21.9k|      default:
  ------------------
  |  Branch (1078:7): [True: 21.8k, False: 2.72k]
  ------------------
 1079|  21.9k|        *nextTokPtr = ptr;
 1080|  21.9k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|  21.9k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|  24.6k|      }
 1082|  24.6k|    }
 1083|    144|    *nextTokPtr = ptr;
 1084|    144|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    144|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  2.52k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 2.52k, False: 76.6k]
  ------------------
 1086|  2.52k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  2.52k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  2.52k|#  define MINBPC(enc) 2
  ------------------
 1087|  2.19k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 2.19k, False: 77.0k]
  ------------------
 1088|  2.19k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.19k|#  define MINBPC(enc) 2
  ------------------
 1089|  2.19k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  2.19k|#define XML_TOK_COMMA 38
  ------------------
 1090|    881|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 881, False: 78.3k]
  ------------------
 1091|    881|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    881|#  define MINBPC(enc) 2
  ------------------
 1092|    881|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|    881|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|    442|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 442, False: 78.7k]
  ------------------
 1094|    442|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    442|#  define MINBPC(enc) 2
  ------------------
 1095|    442|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    442|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    442|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    442|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 2, False: 440]
  ------------------
 1096|      2|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      2|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|    440|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  920|    440|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    440|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 433, False: 7]
  |  |  |  |  |  Branch (872:49): [True: 37, False: 396]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1098|     37|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     37|    {                                                                          \
  |  |  135|     37|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     37|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|     37|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 36]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     37|    }
  ------------------
 1099|     36|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  920|     36|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|     36|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 16, False: 20]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 15]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1100|      1|        *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  916|      1|#  define MINBPC(enc) 2
  ------------------
 1101|      1|        return XML_TOK_COND_SECT_CLOSE;
  ------------------
  |  |  103|      1|#define XML_TOK_COND_SECT_CLOSE 34      /* ]]> */
  ------------------
 1102|      1|      }
 1103|     36|    }
 1104|    438|    *nextTokPtr = ptr;
 1105|    438|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|    438|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  6.28k|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 6.28k, False: 72.9k]
  ------------------
 1107|  6.28k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  6.28k|#  define MINBPC(enc) 2
  ------------------
 1108|  6.28k|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  6.28k|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|  4.82k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 4.82k, False: 74.3k]
  ------------------
 1110|  4.82k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.82k|#  define MINBPC(enc) 2
  ------------------
 1111|  4.82k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  4.82k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  4.82k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  4.82k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 6, False: 4.81k]
  ------------------
 1112|      6|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|      6|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|  4.81k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  4.81k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.81k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.79k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 26, False: 4.79k]
  |  |  |  |  |  Branch (870:4): [True: 4.79k, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|    543|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 543, False: 4.27k]
  ------------------
 1115|    543|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    543|#  define MINBPC(enc) 2
  ------------------
 1116|    543|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|    543|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|     66|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 66, False: 4.75k]
  ------------------
 1118|     66|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|     66|#  define MINBPC(enc) 2
  ------------------
 1119|     66|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|     66|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|     48|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 48, False: 4.77k]
  ------------------
 1121|     48|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|     48|#  define MINBPC(enc) 2
  ------------------
 1122|     48|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|     48|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|    489|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 489, False: 4.33k]
  ------------------
 1124|    761|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 272, False: 4.54k]
  ------------------
 1125|  1.42k|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 667, False: 4.15k]
  ------------------
 1126|  1.56k|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 134, False: 4.68k]
  ------------------
 1127|  2.01k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 455, False: 4.36k]
  ------------------
 1128|  2.73k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 720, False: 4.09k]
  ------------------
 1129|  4.13k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 1.39k, False: 3.42k]
  ------------------
 1130|  4.13k|      *nextTokPtr = ptr;
 1131|  4.13k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  4.13k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|  4.81k|    }
 1133|     26|    *nextTokPtr = ptr;
 1134|     26|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     26|#define XML_TOK_INVALID 0
  ------------------
 1135|  2.07k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 2.07k, False: 77.1k]
  ------------------
 1136|  2.07k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.07k|#  define MINBPC(enc) 2
  ------------------
 1137|  2.07k|    return XML_TOK_OR;
  ------------------
  |  |   88|  2.07k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  3.57k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 3.57k, False: 75.6k]
  ------------------
 1139|  3.57k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  3.57k|#  define MINBPC(enc) 2
  ------------------
 1140|  3.57k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  3.57k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|    795|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 795, False: 78.4k]
  ------------------
 1142|    795|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    795|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    795|#  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.2k]
  |  |  ------------------
  |  | 1145|      0|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 0, False: 0]
  |  |  ------------------
  |  | 1146|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      0|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      0|    }                                                                          \
  |  | 1151|      0|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (923:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|      0|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (921:35): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|      0|    *nextTokPtr = ptr;                                                         \
  |  | 1162|      0|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1164|      0|    LEAD_CASE(3)
  ------------------
  |  | 1144|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 0, False: 79.2k]
  |  |  ------------------
  |  | 1145|      0|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 0, False: 0]
  |  |  ------------------
  |  | 1146|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      0|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      0|    }                                                                          \
  |  | 1151|      0|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (923:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|      0|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (921:35): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|      0|    *nextTokPtr = ptr;                                                         \
  |  | 1162|      0|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1165|     64|    LEAD_CASE(4)
  ------------------
  |  | 1144|     15|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 19, False: 79.1k]
  |  |  ------------------
  |  | 1145|     19|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 4, False: 15]
  |  |  ------------------
  |  | 1146|     15|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     15|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|     15|#    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|     15|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  923|     15|#  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|     15|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  921|     15|#  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|     15|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     15|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|  11.0k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 11.0k, False: 68.1k]
  ------------------
 1168|  13.3k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 2.25k, False: 76.9k]
  ------------------
 1169|  13.3k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|  13.3k|#define XML_TOK_NAME 18
  ------------------
 1170|  13.3k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  13.3k|#  define MINBPC(enc) 2
  ------------------
 1171|  13.3k|    break;
 1172|    421|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 421, False: 78.7k]
  ------------------
 1173|    459|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 38, False: 79.1k]
  ------------------
 1174|    812|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 353, False: 78.8k]
  ------------------
 1175|    812|#  ifdef XML_NS
 1176|    812|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 79.2k]
  ------------------
 1177|    812|#  endif
 1178|    812|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    812|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|    812|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    812|#  define MINBPC(enc) 2
  ------------------
 1180|    812|    break;
 1181|  1.14k|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 1.14k, False: 78.0k]
  ------------------
 1182|  1.14k|    if (IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  924|  1.14k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  876|  1.14k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  1.14k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 997, False: 151]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1183|    997|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    997|#  define MINBPC(enc) 2
  ------------------
 1184|    997|      tok = XML_TOK_NAME;
  ------------------
  |  |   85|    997|#define XML_TOK_NAME 18
  ------------------
 1185|    997|      break;
 1186|    997|    }
 1187|    151|    if (IS_NAME_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  922|    151|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  874|    151|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|    151|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 106, False: 45]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1188|    106|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    106|#  define MINBPC(enc) 2
  ------------------
 1189|    106|      tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    106|#define XML_TOK_NMTOKEN 19
  ------------------
 1190|    106|      break;
 1191|    106|    }
 1192|       |    /* fall through */
 1193|     92|  default:
  ------------------
  |  Branch (1193:3): [True: 47, False: 79.1k]
  ------------------
 1194|     92|    *nextTokPtr = ptr;
 1195|     92|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     92|#define XML_TOK_INVALID 0
  ------------------
 1196|  79.2k|  }
 1197|  31.9k|  while (HAS_CHAR(enc, ptr, end)) {
 1198|  31.9k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  31.9k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  31.9k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  28.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 28.2k, False: 3.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1199|  61.3k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  16.8k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 3.71k, False: 28.2k]
  |  |  ------------------
  |  |   82|  16.8k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  3.71k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  3.71k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  3.71k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 32, False: 3.67k]
  |  |  ------------------
  |  |   83|     32|      *nextTokPtr = ptr;                                                       \
  |  |   84|     32|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     32|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     32|    }                                                                          \
  |  |   86|  16.8k|    /* fall through */                                                         \
  |  |   87|  16.8k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 5.34k, False: 26.6k]
  |  |  ------------------
  |  |   88|  15.8k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 6.82k, False: 25.1k]
  |  |  ------------------
  |  |   89|  16.2k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 447, False: 31.4k]
  |  |  ------------------
  |  |   90|  16.5k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 217, False: 31.7k]
  |  |  ------------------
  |  |   91|  16.8k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 312, False: 31.6k]
  |  |  ------------------
  |  |   92|  16.8k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  16.8k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  16.8k|    break;                                                                     \
  |  |   94|  16.8k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 31.9k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 31.9k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     12|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 12, False: 31.9k]
  |  |  |  |  ------------------
  |  |  |  |   71|     12|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 7]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      7|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     14|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      7|    }                                                                          \
  |  |  |  |   77|      7|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
 1200|    164|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 164, False: 31.7k]
  ------------------
 1201|  1.70k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 1.53k, False: 30.4k]
  ------------------
 1202|  2.32k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 627, False: 31.3k]
  ------------------
 1203|  3.33k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 1.00k, False: 30.9k]
  ------------------
 1204|  4.06k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 734, False: 31.2k]
  ------------------
 1205|  4.06k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 2, False: 31.9k]
  ------------------
 1206|  9.98k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 5.91k, False: 26.0k]
  ------------------
 1207|  12.0k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 2.07k, False: 29.8k]
  ------------------
 1208|  13.9k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 1.93k, False: 30.0k]
  ------------------
 1209|  13.9k|      *nextTokPtr = ptr;
 1210|  13.9k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 31.9k]
  ------------------
 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|    858|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 858, False: 31.0k]
  ------------------
 1232|    858|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    858|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 1, False: 857]
  ------------------
 1233|      1|        *nextTokPtr = ptr;
 1234|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1235|      1|      }
 1236|    857|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    857|#  define MINBPC(enc) 2
  ------------------
 1237|    857|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|    857|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    154|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 154, False: 31.7k]
  ------------------
 1239|    154|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    154|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 153]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|    153|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    153|#  define MINBPC(enc) 2
  ------------------
 1244|    153|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    153|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|     68|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 68, False: 31.8k]
  ------------------
 1246|     68|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|     68|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 1, False: 67]
  ------------------
 1247|      1|        *nextTokPtr = ptr;
 1248|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1249|      1|      }
 1250|     67|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|     67|#  define MINBPC(enc) 2
  ------------------
 1251|     67|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|     67|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     15|    default:
  ------------------
  |  Branch (1252:5): [True: 15, False: 31.9k]
  ------------------
 1253|     15|      *nextTokPtr = ptr;
 1254|     15|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
 1255|  31.9k|    }
 1256|  31.9k|  }
 1257|    104|  return -tok;
 1258|  15.2k|}
xmltok.c:big2_scanLit:
  984|  5.72k|                const char **nextTokPtr) {
  985|  13.6M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  13.6M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  13.6M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  13.6M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   815k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 815k, False: 12.7M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  987|  13.6M|    switch (t) {
  988|  1.89M|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 13.6M]
  |  |  |  |  ------------------
  |  |  |  |   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: 13.6M]
  |  |  |  |  ------------------
  |  |  |  |   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|   945k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|   945k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 945k, False: 12.6M]
  |  |  |  |  ------------------
  |  |  |  |   50|   945k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 31, False: 945k]
  |  |  |  |  ------------------
  |  |  |  |   51|   945k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     31|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|   945k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   945k|#    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|   945k|    ptr += n;                                                                  \
  |  |  |  |   57|   945k|    break;
  |  |  ------------------
  |  |   63|   945k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 13, False: 13.6M]
  |  |  ------------------
  |  |   64|     13|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 13.6M]
  |  |  ------------------
  |  |   65|     17|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 13.6M]
  |  |  ------------------
  |  |   66|     17|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     17|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  25.0k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 25.0k, False: 13.5M]
  ------------------
  990|  30.9k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 5.91k, False: 13.6M]
  ------------------
  991|  30.9k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  30.9k|#  define MINBPC(enc) 2
  ------------------
  992|  30.9k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 25.3k, False: 5.61k]
  ------------------
  993|  25.3k|        break;
  994|  5.61k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  5.61k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  5.61k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  5.61k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 3, False: 5.61k]
  ------------------
  995|      3|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      3|#define XML_TOK_LITERAL 27
  ------------------
  996|  5.61k|      *nextTokPtr = ptr;
  997|  5.61k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  5.61k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  5.61k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.58k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 5.58k, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  998|  1.08k|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 1.08k, False: 4.53k]
  ------------------
  999|  2.17k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 1.09k, False: 4.52k]
  ------------------
 1000|  3.13k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 959, False: 4.65k]
  ------------------
 1001|  5.55k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 2.42k, False: 3.18k]
  ------------------
 1002|  5.57k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 13, False: 5.59k]
  ------------------
 1003|  5.57k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 5, False: 5.60k]
  ------------------
 1004|  5.57k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  5.57k|#define XML_TOK_LITERAL 27
  ------------------
 1005|     36|      default:
  ------------------
  |  Branch (1005:7): [True: 36, False: 5.57k]
  ------------------
 1006|     36|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     36|#define XML_TOK_INVALID 0
  ------------------
 1007|  5.61k|      }
 1008|  12.6M|    default:
  ------------------
  |  Branch (1008:5): [True: 12.6M, False: 976k]
  ------------------
 1009|  12.6M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  12.6M|#  define MINBPC(enc) 2
  ------------------
 1010|  12.6M|      break;
 1011|  13.6M|    }
 1012|  13.6M|  }
 1013|     64|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     64|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  5.72k|}
xmltok.c:big2_scanDecl:
  183|  5.18k|                 const char **nextTokPtr) {
  184|  5.18k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.18k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.18k|    {                                                                          \
  |  |  |  |  135|  5.18k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.18k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  5.18k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 5.18k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  5.18k|    }
  |  |  ------------------
  ------------------
  185|  5.18k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  5.18k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  5.18k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.15k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 5.15k, False: 25]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|    424|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 424, False: 4.75k]
  ------------------
  187|    424|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    424|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    424|#  define MINBPC(enc) 2
  ------------------
  188|      2|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 2, False: 5.17k]
  ------------------
  189|      2|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|      2|#  define MINBPC(enc) 2
  ------------------
  190|      2|    return XML_TOK_COND_SECT_OPEN;
  ------------------
  |  |  102|      2|#define XML_TOK_COND_SECT_OPEN 33       /* <![ */
  ------------------
  191|    356|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 356, False: 4.82k]
  ------------------
  192|  4.72k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 4.37k, False: 809]
  ------------------
  193|  4.72k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.72k|#  define MINBPC(enc) 2
  ------------------
  194|  4.72k|    break;
  195|     27|  default:
  ------------------
  |  Branch (195:3): [True: 27, False: 5.15k]
  ------------------
  196|     27|    *nextTokPtr = ptr;
  197|     27|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     27|#define XML_TOK_INVALID 0
  ------------------
  198|  5.18k|  }
  199|  31.0k|  while (HAS_CHAR(enc, ptr, end)) {
  200|  31.0k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  31.0k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  31.0k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  30.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 30.9k, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|     30|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 30, False: 30.9k]
  ------------------
  202|     30|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     30|    {                                                                          \
  |  |  135|     30|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     30|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|     30|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 29]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     30|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|     29|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  918|     29|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|     29|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|      7|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 25, False: 4]
  |  |  |  |  |  Branch (870:4): [True: 7, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      1|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 1, False: 28]
  ------------------
  206|      2|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 28]
  ------------------
  207|      3|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 1, False: 28]
  ------------------
  208|      4|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 1, False: 28]
  ------------------
  209|      4|        *nextTokPtr = ptr;
  210|      4|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  211|     29|      }
  212|       |      /* fall through */
  213|  2.26k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 2.23k, False: 28.7k]
  ------------------
  214|  4.22k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 1.96k, False: 29.0k]
  ------------------
  215|  4.66k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 437, False: 30.5k]
  ------------------
  216|  4.66k|      *nextTokPtr = ptr;
  217|  4.66k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  4.66k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|  22.7k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 22.7k, False: 8.22k]
  ------------------
  219|  26.3k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 3.52k, False: 27.4k]
  ------------------
  220|  26.3k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  26.3k|#  define MINBPC(enc) 2
  ------------------
  221|  26.3k|      break;
  222|     32|    default:
  ------------------
  |  Branch (222:5): [True: 32, False: 30.9k]
  ------------------
  223|     32|      *nextTokPtr = ptr;
  224|     32|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     32|#define XML_TOK_INVALID 0
  ------------------
  225|  31.0k|    }
  226|  31.0k|  }
  227|     28|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     28|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  4.72k|}
xmltok.c:big2_scanComment:
  146|    680|                    const char **nextTokPtr) {
  147|    680|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|    680|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    680|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    680|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 672, False: 8]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|    672|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  920|    672|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    672|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 663, False: 9]
  |  |  |  |  |  Branch (872:49): [True: 658, False: 5]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  149|     14|      *nextTokPtr = ptr;
  150|     14|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  151|     14|    }
  152|    658|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    658|#  define MINBPC(enc) 2
  ------------------
  153|  61.7k|    while (HAS_CHAR(enc, ptr, end)) {
  154|  61.7k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  61.7k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  61.7k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.59k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 7.59k, False: 54.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|  15.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: 61.7k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 61.7k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  7.55k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  7.52k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 7.55k, False: 54.2k]
  |  |  |  |  ------------------
  |  |  |  |   50|  7.55k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 30, False: 7.52k]
  |  |  |  |  ------------------
  |  |  |  |   51|  7.52k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     30|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  7.52k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  7.52k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  7.52k|    ptr += n;                                                                  \
  |  |  |  |   57|  7.52k|    break;
  |  |  ------------------
  |  |   63|  7.52k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 27, False: 61.7k]
  |  |  ------------------
  |  |   64|     27|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 61.7k]
  |  |  ------------------
  |  |   65|     35|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 8, False: 61.7k]
  |  |  ------------------
  |  |   66|     35|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     35|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     35|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  1.06k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 1.06k, False: 60.6k]
  ------------------
  157|  1.06k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.06k|#  define MINBPC(enc) 2
  ------------------
  158|  1.06k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.06k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.06k|    {                                                                          \
  |  |  |  |  135|  1.06k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.06k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.06k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.06k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.06k|    }
  |  |  ------------------
  ------------------
  159|  1.06k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  920|  1.06k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.06k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 809, False: 254]
  |  |  |  |  |  Branch (872:49): [True: 522, False: 287]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|    522|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    522|#  define MINBPC(enc) 2
  ------------------
  161|    522|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    522|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    522|    {                                                                          \
  |  |  |  |  135|    522|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    522|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    522|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 521]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    522|    }
  |  |  ------------------
  ------------------
  162|    521|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    521|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    521|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 515, False: 6]
  |  |  |  |  |  Branch (872:49): [True: 507, False: 8]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|     14|            *nextTokPtr = ptr;
  164|     14|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  165|     14|          }
  166|    507|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    507|#  define MINBPC(enc) 2
  ------------------
  167|    507|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|    507|#define XML_TOK_COMMENT 13
  ------------------
  168|    521|        }
  169|    541|        break;
  170|  53.1k|      default:
  ------------------
  |  Branch (170:7): [True: 53.1k, False: 8.65k]
  ------------------
  171|  53.1k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  53.1k|#  define MINBPC(enc) 2
  ------------------
  172|  53.1k|        break;
  173|  61.7k|      }
  174|  61.7k|    }
  175|    658|  }
  176|     78|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     78|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|    680|}
xmltok.c:big2_scanPi:
  277|  8.85k|               const char **nextTokPtr) {
  278|  8.85k|  int tok;
  279|  8.85k|  const char *target = ptr;
  280|  8.85k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  8.85k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  8.85k|    {                                                                          \
  |  |  |  |  135|  8.85k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  8.85k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  8.85k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 12, False: 8.84k]
  |  |  |  |  ------------------
  |  |  |  |  136|     12|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     12|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     12|      }                                                                        \
  |  |  |  |  138|  8.85k|    }
  |  |  ------------------
  ------------------
  281|  8.84k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  8.84k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  8.84k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.67k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 7.67k, False: 1.17k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  282|  8.71k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  8.81k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.15k, False: 7.69k]
  |  |  ------------------
  |  |  111|  8.81k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  1.15k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  1.15k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.15k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 5, False: 1.14k]
  |  |  ------------------
  |  |  112|      5|      *nextTokPtr = ptr;                                                       \
  |  |  113|      5|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      5|    }                                                                          \
  |  |  115|  8.81k|    /* fall through */                                                         \
  |  |  116|  8.81k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 6.38k, False: 2.46k]
  |  |  ------------------
  |  |  117|  8.81k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 1.28k, False: 7.56k]
  |  |  ------------------
  |  |  118|  8.81k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  8.81k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  8.81k|    break;                                                                     \
  |  |  120|  8.81k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 8.84k]
  |  |  |  |  ------------------
  |  |  |  |  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: 8.84k]
  |  |  |  |  ------------------
  |  |  |  |  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: 8.82k]
  |  |  |  |  ------------------
  |  |  |  |  100|     17|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 13]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     13|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     26|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     13|    }                                                                          \
  |  |  |  |  106|     13|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  283|     10|  default:
  ------------------
  |  Branch (283:3): [True: 10, False: 8.83k]
  ------------------
  284|     10|    *nextTokPtr = ptr;
  285|     10|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  286|  8.84k|  }
  287|   148k|  while (HAS_CHAR(enc, ptr, end)) {
  288|   148k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   148k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   148k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  18.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 18.1k, False: 129k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  289|   682k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   139k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 129k, False: 18.1k]
  |  |  ------------------
  |  |   82|   139k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|   129k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|   129k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|   129k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 27, False: 129k]
  |  |  ------------------
  |  |   83|     27|      *nextTokPtr = ptr;                                                       \
  |  |   84|     27|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     27|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     27|    }                                                                          \
  |  |   86|   139k|    /* fall through */                                                         \
  |  |   87|   139k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 6.55k, False: 141k]
  |  |  ------------------
  |  |   88|   138k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.99k, False: 146k]
  |  |  ------------------
  |  |   89|   138k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 201, False: 147k]
  |  |  ------------------
  |  |   90|   138k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 197, False: 147k]
  |  |  ------------------
  |  |   91|   139k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 484, False: 147k]
  |  |  ------------------
  |  |   92|   139k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   139k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|   139k|    break;                                                                     \
  |  |   94|   139k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 148k]
  |  |  |  |  ------------------
  |  |  |  |   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: 148k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     16|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 16, False: 148k]
  |  |  |  |  ------------------
  |  |  |  |   71|     16|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 11]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     11|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     22|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     11|    }                                                                          \
  |  |  |  |   77|     11|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  290|  1.98k|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 1.98k, False: 146k]
  ------------------
  291|  2.78k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 798, False: 147k]
  ------------------
  292|  3.65k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 866, False: 147k]
  ------------------
  293|  3.65k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  915|  3.65k|#  define PREFIX(ident) big2_##ident
  ------------------
  |  Branch (293:11): [True: 1, False: 3.65k]
  ------------------
  294|      1|        *nextTokPtr = ptr;
  295|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  296|      1|      }
  297|  3.65k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.65k|#  define MINBPC(enc) 2
  ------------------
  298|   172k|      while (HAS_CHAR(enc, ptr, end)) {
  299|   172k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   172k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   172k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  20.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 20.8k, False: 151k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  300|  19.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: 172k]
  |  |  |  |  ------------------
  |  |  |  |   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: 172k]
  |  |  |  |  ------------------
  |  |  |  |   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|  9.82k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  9.79k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 9.82k, False: 162k]
  |  |  |  |  ------------------
  |  |  |  |   50|  9.82k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 32, False: 9.79k]
  |  |  |  |  ------------------
  |  |  |  |   51|  9.79k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     32|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  9.79k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  9.79k|#    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|  9.79k|    ptr += n;                                                                  \
  |  |  |  |   57|  9.79k|    break;
  |  |  ------------------
  |  |   63|  9.79k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 28, False: 172k]
  |  |  ------------------
  |  |   64|     28|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 172k]
  |  |  ------------------
  |  |   65|     32|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 172k]
  |  |  ------------------
  |  |   66|     32|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     32|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     32|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  5.61k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 5.61k, False: 166k]
  ------------------
  302|  5.61k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  5.61k|#  define MINBPC(enc) 2
  ------------------
  303|  5.61k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.61k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.61k|    {                                                                          \
  |  |  |  |  135|  5.61k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.61k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  5.61k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 5.61k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  5.61k|    }
  |  |  ------------------
  ------------------
  304|  5.61k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  5.61k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  5.61k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 5.34k, False: 270]
  |  |  |  |  |  Branch (872:49): [True: 3.46k, False: 1.88k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  305|  3.46k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  3.46k|#  define MINBPC(enc) 2
  ------------------
  306|  3.46k|            return tok;
  307|  3.46k|          }
  308|  2.15k|          break;
  309|   157k|        default:
  ------------------
  |  Branch (309:9): [True: 157k, False: 15.4k]
  ------------------
  310|   157k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|   157k|#  define MINBPC(enc) 2
  ------------------
  311|   157k|          break;
  312|   172k|        }
  313|   172k|      }
  314|    119|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    119|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  5.03k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 5.03k, False: 143k]
  ------------------
  316|  5.03k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  915|  5.03k|#  define PREFIX(ident) big2_##ident
  ------------------
  |  Branch (316:11): [True: 1, False: 5.03k]
  ------------------
  317|      1|        *nextTokPtr = ptr;
  318|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  319|      1|      }
  320|  5.03k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  5.03k|#  define MINBPC(enc) 2
  ------------------
  321|  5.03k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.03k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.03k|    {                                                                          \
  |  |  |  |  135|  5.03k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.03k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  5.03k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 40, False: 4.99k]
  |  |  |  |  ------------------
  |  |  |  |  136|     40|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     40|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     40|      }                                                                        \
  |  |  |  |  138|  5.03k|    }
  |  |  ------------------
  ------------------
  322|  4.99k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  4.99k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  4.99k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 4.98k, False: 9]
  |  |  |  |  |  Branch (872:49): [True: 4.97k, False: 10]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  323|  4.97k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  4.97k|#  define MINBPC(enc) 2
  ------------------
  324|  4.97k|        return tok;
  325|  4.97k|      }
  326|       |      /* fall through */
  327|     29|    default:
  ------------------
  |  Branch (327:5): [True: 10, False: 148k]
  ------------------
  328|     29|      *nextTokPtr = ptr;
  329|     29|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     29|#define XML_TOK_INVALID 0
  ------------------
  330|   148k|    }
  331|   148k|  }
  332|     70|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     70|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  8.81k|}
xmltok.c:big2_checkPiTarget:
  232|  8.68k|                      int *tokPtr) {
  233|  8.68k|  int upper = 0;
  234|  8.68k|  UNUSED_P(enc);
  ------------------
  |  |  135|  8.68k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  8.68k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  8.68k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  8.68k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  916|  8.68k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (236:7): [True: 2.61k, False: 6.07k]
  ------------------
  237|  2.61k|    return 1;
  238|  6.07k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  6.07k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  6.07k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 5.49k, False: 584]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  239|  2.75k|  case ASCII_x:
  ------------------
  |  |   86|  2.75k|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 2.75k, False: 3.32k]
  ------------------
  240|  2.75k|    break;
  241|  1.52k|  case ASCII_X:
  ------------------
  |  |   59|  1.52k|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 1.52k, False: 4.55k]
  ------------------
  242|  1.52k|    upper = 1;
  243|  1.52k|    break;
  244|  1.80k|  default:
  ------------------
  |  Branch (244:3): [True: 1.80k, False: 4.27k]
  ------------------
  245|  1.80k|    return 1;
  246|  6.07k|  }
  247|  4.27k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.27k|#  define MINBPC(enc) 2
  ------------------
  248|  4.27k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  4.27k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  4.27k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 3.08k, False: 1.19k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|  1.06k|  case ASCII_m:
  ------------------
  |  |   75|  1.06k|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 1.06k, False: 3.21k]
  ------------------
  250|  1.06k|    break;
  251|  1.74k|  case ASCII_M:
  ------------------
  |  |   48|  1.74k|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 1.74k, False: 2.53k]
  ------------------
  252|  1.74k|    upper = 1;
  253|  1.74k|    break;
  254|  1.47k|  default:
  ------------------
  |  Branch (254:3): [True: 1.47k, False: 2.80k]
  ------------------
  255|  1.47k|    return 1;
  256|  4.27k|  }
  257|  2.80k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.80k|#  define MINBPC(enc) 2
  ------------------
  258|  2.80k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  2.80k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  2.80k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.08k, False: 1.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|     25|  case ASCII_l:
  ------------------
  |  |   74|     25|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 25, False: 2.77k]
  ------------------
  260|     25|    break;
  261|      2|  case ASCII_L:
  ------------------
  |  |   47|      2|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 2, False: 2.80k]
  ------------------
  262|      2|    upper = 1;
  263|      2|    break;
  264|  2.77k|  default:
  ------------------
  |  Branch (264:3): [True: 2.77k, False: 27]
  ------------------
  265|  2.77k|    return 1;
  266|  2.80k|  }
  267|     27|  if (upper)
  ------------------
  |  Branch (267:7): [True: 2, False: 25]
  ------------------
  268|      2|    return 0;
  269|     25|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|     25|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|     25|  return 1;
  271|     27|}
xmltok.c:big2_scanPercent:
  924|  2.52k|                    const char **nextTokPtr) {
  925|  2.52k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.52k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.52k|    {                                                                          \
  |  |  |  |  135|  2.52k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.52k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.52k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 14, False: 2.51k]
  |  |  |  |  ------------------
  |  |  |  |  136|     14|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     14|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     14|      }                                                                        \
  |  |  |  |  138|  2.52k|    }
  |  |  ------------------
  ------------------
  926|  2.51k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.51k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.51k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.14k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.14k, False: 368]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  927|    887|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|    615|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 356, False: 2.15k]
  |  |  ------------------
  |  |  111|    615|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    356|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    356|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    356|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 15, False: 341]
  |  |  ------------------
  |  |  112|     15|      *nextTokPtr = ptr;                                                       \
  |  |  113|     15|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     15|    }                                                                          \
  |  |  115|    615|    /* fall through */                                                         \
  |  |  116|    615|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 180, False: 2.33k]
  |  |  ------------------
  |  |  117|    615|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 94, False: 2.42k]
  |  |  ------------------
  |  |  118|    615|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|    615|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|    615|    break;                                                                     \
  |  |  120|    615|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.51k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.51k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|      7|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 7, False: 2.50k]
  |  |  |  |  ------------------
  |  |  |  |  100|      7|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 3]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      3|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      6|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|      3|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  928|    565|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 565, False: 1.94k]
  ------------------
  929|  1.11k|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 551, False: 1.96k]
  ------------------
  930|  1.86k|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 751, False: 1.76k]
  ------------------
  931|  1.87k|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 3, False: 2.51k]
  ------------------
  932|  1.87k|    *nextTokPtr = ptr;
  933|  1.87k|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|  1.87k|#define XML_TOK_PERCENT 22
  ------------------
  934|      7|  default:
  ------------------
  |  Branch (934:3): [True: 7, False: 2.50k]
  ------------------
  935|      7|    *nextTokPtr = ptr;
  936|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  937|  2.51k|  }
  938|  2.60k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  2.60k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.60k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.60k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.14k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.14k, False: 463]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  940|  6.21k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  2.05k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 438, False: 2.16k]
  |  |  ------------------
  |  |   82|  2.05k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    438|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    438|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    438|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 22, False: 416]
  |  |  ------------------
  |  |   83|     22|      *nextTokPtr = ptr;                                                       \
  |  |   84|     22|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     22|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     22|    }                                                                          \
  |  |   86|  2.05k|    /* fall through */                                                         \
  |  |   87|  2.05k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 563, False: 2.04k]
  |  |  ------------------
  |  |   88|  1.28k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 307, False: 2.29k]
  |  |  ------------------
  |  |   89|  1.61k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 330, False: 2.27k]
  |  |  ------------------
  |  |   90|  1.85k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 243, False: 2.36k]
  |  |  ------------------
  |  |   91|  2.05k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 195, False: 2.40k]
  |  |  ------------------
  |  |   92|  2.05k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  2.05k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  2.05k|    break;                                                                     \
  |  |   94|  2.05k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 2.60k]
  |  |  |  |  ------------------
  |  |  |  |   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.60k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     18|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 18, False: 2.58k]
  |  |  |  |  ------------------
  |  |  |  |   71|     18|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 14]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     14|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     28|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     14|    }                                                                          \
  |  |  |  |   77|     14|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  941|    495|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 495, False: 2.10k]
  ------------------
  942|    495|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    495|#  define MINBPC(enc) 2
  ------------------
  943|    495|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|    495|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|     14|    default:
  ------------------
  |  Branch (944:5): [True: 14, False: 2.58k]
  ------------------
  945|     14|      *nextTokPtr = ptr;
  946|     14|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  947|  2.60k|    }
  948|  2.60k|  }
  949|     66|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     66|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|    615|}
xmltok.c:big2_scanPoundName:
  954|    795|                      const char **nextTokPtr) {
  955|    795|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    795|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    795|    {                                                                          \
  |  |  |  |  135|    795|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    795|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    795|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 794]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    795|    }
  |  |  ------------------
  ------------------
  956|    794|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|    794|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|    794|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    684|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 684, False: 110]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  957|    683|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|    747|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 81, False: 713]
  |  |  ------------------
  |  |  111|    747|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|     81|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|     81|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|     81|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 16, False: 65]
  |  |  ------------------
  |  |  112|     16|      *nextTokPtr = ptr;                                                       \
  |  |  113|     16|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     16|    }                                                                          \
  |  |  115|    747|    /* fall through */                                                         \
  |  |  116|    747|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 493, False: 301]
  |  |  ------------------
  |  |  117|    747|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 189, False: 605]
  |  |  ------------------
  |  |  118|    747|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|    747|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|    747|    break;                                                                     \
  |  |  120|    747|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 794]
  |  |  |  |  ------------------
  |  |  |  |  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: 794]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     24|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 24, False: 770]
  |  |  |  |  ------------------
  |  |  |  |  100|     24|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 20]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     20|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     40|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     20|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     20|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     20|    }                                                                          \
  |  |  |  |  106|     20|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  958|      7|  default:
  ------------------
  |  Branch (958:3): [True: 7, False: 787]
  ------------------
  959|      7|    *nextTokPtr = ptr;
  960|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  961|    794|  }
  962|  5.86k|  while (HAS_CHAR(enc, ptr, end)) {
  963|  5.86k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  5.86k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  5.86k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.56k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 5.56k, False: 297]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  964|  17.0k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  5.16k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 282, False: 5.58k]
  |  |  ------------------
  |  |   82|  5.16k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    282|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    282|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    282|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 9, False: 273]
  |  |  ------------------
  |  |   83|      9|      *nextTokPtr = ptr;                                                       \
  |  |   84|      9|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      9|    }                                                                          \
  |  |   86|  5.16k|    /* fall through */                                                         \
  |  |   87|  5.16k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 2.19k, False: 3.66k]
  |  |  ------------------
  |  |   88|  4.56k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 2.08k, False: 3.77k]
  |  |  ------------------
  |  |   89|  4.75k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 198, False: 5.66k]
  |  |  ------------------
  |  |   90|  4.97k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 215, False: 5.64k]
  |  |  ------------------
  |  |   91|  5.16k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 195, False: 5.66k]
  |  |  ------------------
  |  |   92|  5.16k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  5.16k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  5.16k|    break;                                                                     \
  |  |   94|  5.16k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 5.86k]
  |  |  |  |  ------------------
  |  |  |  |   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.86k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|      7|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 7, False: 5.85k]
  |  |  |  |  ------------------
  |  |  |  |   71|      7|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 3]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      3|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      6|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      3|    }                                                                          \
  |  |  |  |   77|      3|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  965|    171|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 171, False: 5.69k]
  ------------------
  966|    182|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 11, False: 5.85k]
  ------------------
  967|    195|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 13, False: 5.85k]
  ------------------
  968|    297|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 102, False: 5.76k]
  ------------------
  969|    602|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 305, False: 5.55k]
  ------------------
  970|    603|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 1, False: 5.86k]
  ------------------
  971|    669|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 66, False: 5.79k]
  ------------------
  972|    669|      *nextTokPtr = ptr;
  973|    669|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|    669|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|     10|    default:
  ------------------
  |  Branch (974:5): [True: 10, False: 5.85k]
  ------------------
  975|     10|      *nextTokPtr = ptr;
  976|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  977|  5.86k|    }
  978|  5.86k|  }
  979|     52|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     52|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|    747|}
xmltok.c:big2_contentTok:
  824|  73.8k|                   const char **nextTokPtr) {
  825|  73.8k|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 915, False: 72.9k]
  ------------------
  826|    915|    return XML_TOK_NONE;
  ------------------
  |  |   51|    915|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|  72.9k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  72.9k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (827:7): [Folded - Ignored]
  ------------------
  828|  72.9k|    size_t n = end - ptr;
  829|  72.9k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  72.9k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (829:9): [True: 36.1k, False: 36.7k]
  ------------------
  830|  36.1k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  36.1k|#  define MINBPC(enc) 2
  ------------------
  831|  36.1k|      if (n == 0)
  ------------------
  |  Branch (831:11): [True: 175, False: 36.0k]
  ------------------
  832|    175|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    175|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  833|  36.0k|      end = ptr + n;
  834|  36.0k|    }
  835|  72.9k|  }
  836|  72.7k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  72.7k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  72.7k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  64.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 64.7k, False: 7.96k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  837|  18.2k|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 18.2k, False: 54.4k]
  ------------------
  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|  15.9k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 15.9k, False: 56.7k]
  ------------------
  840|  15.9k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  15.9k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  15.9k|#  define MINBPC(enc) 2
  ------------------
  841|  11.3k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 11.3k, False: 61.3k]
  ------------------
  842|  11.3k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  11.3k|#  define MINBPC(enc) 2
  ------------------
  843|  11.3k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  11.3k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  11.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  11.3k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 12, False: 11.3k]
  ------------------
  844|     12|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     12|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  11.3k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  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|  8.08k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 8.08k, False: 3.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 2.11k, False: 9.25k]
  ------------------
  846|  2.11k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.11k|#  define MINBPC(enc) 2
  ------------------
  847|  11.3k|    *nextTokPtr = ptr;
  848|  11.3k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  11.3k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|  4.94k|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 4.94k, False: 67.7k]
  ------------------
  850|  4.94k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  4.94k|#  define MINBPC(enc) 2
  ------------------
  851|  4.94k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  4.94k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  5.59k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 5.59k, False: 67.1k]
  ------------------
  853|  5.59k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  5.59k|#  define MINBPC(enc) 2
  ------------------
  854|  5.59k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  5.59k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  5.59k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  5.59k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 5, False: 5.59k]
  ------------------
  855|      5|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      5|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  5.59k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  920|  5.59k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  5.59k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 5.07k, False: 514]
  |  |  |  |  |  Branch (872:49): [True: 1.95k, False: 3.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  857|  3.63k|      break;
  858|  1.95k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.95k|#  define MINBPC(enc) 2
  ------------------
  859|  1.95k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  1.95k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.95k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  1.95k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 3, False: 1.95k]
  ------------------
  860|      3|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      3|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|  1.95k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  1.95k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.95k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 557, False: 1.39k]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 556]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  862|  1.95k|      ptr -= MINBPC(enc);
  ------------------
  |  |  916|  1.95k|#  define MINBPC(enc) 2
  ------------------
  863|  1.95k|      break;
  864|  1.95k|    }
  865|      1|    *nextTokPtr = ptr;
  866|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  867|  4.11k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 72.7k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 72.7k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  1.99k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.93k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.99k, False: 70.7k]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.99k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 60, False: 1.93k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.93k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     60|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.93k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.93k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  1.93k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.93k|    break;
  |  |  ------------------
  |  |   63|  1.93k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 90, False: 72.6k]
  |  |  ------------------
  |  |   64|     90|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 72.7k]
  |  |  ------------------
  |  |   65|    107|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 17, False: 72.7k]
  |  |  ------------------
  |  |   66|    107|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|    107|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|    107|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|  14.4k|  default:
  ------------------
  |  Branch (868:3): [True: 14.4k, False: 58.3k]
  ------------------
  869|  14.4k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  14.4k|#  define MINBPC(enc) 2
  ------------------
  870|  14.4k|    break;
  871|  72.7k|  }
  872|   711k|  while (HAS_CHAR(enc, ptr, end)) {
  873|   711k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   711k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   711k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  65.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 65.6k, False: 646k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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: 711k]
  |  |  ------------------
  |  |  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: 711k]
  |  |  ------------------
  |  |  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|  57.8k|      LEAD_CASE(4)
  ------------------
  |  |  875|  57.7k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 57.8k, False: 654k]
  |  |  ------------------
  |  |  876|  57.8k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  57.7k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 51, False: 57.7k]
  |  |  ------------------
  |  |  877|     51|      *nextTokPtr = ptr;                                                       \
  |  |  878|     51|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     51|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     51|    }                                                                          \
  |  |  880|  57.7k|    ptr += n;                                                                  \
  |  |  881|  57.7k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|  7.90k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 7.90k, False: 703k]
  ------------------
  887|  7.90k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|  7.90k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  916|  7.90k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 7.90k, False: 1]
  |  |  ------------------
  ------------------
  888|  7.90k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  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: 4.89k, False: 3.00k]
  |  |  |  |  |  Branch (872:49): [True: 2.56k, False: 2.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  889|  5.34k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  5.34k|#  define MINBPC(enc) 2
  ------------------
  890|  5.34k|          break;
  891|  5.34k|        }
  892|  2.56k|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|  2.56k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  916|  2.56k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 2.56k, False: 2]
  |  |  ------------------
  ------------------
  893|  2.56k|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  920|  2.56k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.56k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.55k, False: 1.00k]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 1.55k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  894|  2.56k|            ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.56k|#  define MINBPC(enc) 2
  ------------------
  895|  2.56k|            break;
  896|  2.56k|          }
  897|      1|          *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  916|      1|#  define MINBPC(enc) 2
  ------------------
  898|      1|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  899|  2.56k|        }
  900|  2.56k|      }
  901|       |      /* fall through */
  902|  5.92k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 5.92k, False: 705k]
  ------------------
  903|  10.1k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 4.24k, False: 707k]
  ------------------
  904|  10.2k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 66, False: 711k]
  ------------------
  905|  10.2k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 0, False: 711k]
  ------------------
  906|  10.2k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 13, False: 711k]
  ------------------
  907|  18.1k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 7.90k, False: 703k]
  ------------------
  908|  21.5k|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 3.37k, False: 708k]
  ------------------
  909|  21.5k|      *nextTokPtr = ptr;
  910|  21.5k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  21.5k|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|   624k|    default:
  ------------------
  |  Branch (911:5): [True: 624k, False: 87.2k]
  ------------------
  912|   624k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   624k|#  define MINBPC(enc) 2
  ------------------
  913|   624k|      break;
  914|   711k|    }
  915|   711k|  }
  916|    376|  *nextTokPtr = ptr;
  917|    376|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    376|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|  21.9k|}
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: 12, False: 18.2k]
  |  |  |  |  ------------------
  |  |  |  |  136|     12|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     12|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     12|      }                                                                        \
  |  |  |  |  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|  15.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 15.1k, False: 3.15k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  732|  11.1k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  10.7k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 3.12k, False: 15.1k]
  |  |  ------------------
  |  |  111|  10.7k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  3.12k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  3.12k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  3.12k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 19, False: 3.11k]
  |  |  ------------------
  |  |  112|     19|      *nextTokPtr = ptr;                                                       \
  |  |  113|     19|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     19|    }                                                                          \
  |  |  115|  10.7k|    /* fall through */                                                         \
  |  |  116|  10.7k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.87k, False: 13.4k]
  |  |  ------------------
  |  |  117|  10.7k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 2.76k, False: 15.5k]
  |  |  ------------------
  |  |  118|  10.7k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  10.7k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  10.7k|    break;                                                                     \
  |  |  120|  10.7k|    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|     19|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 19, False: 18.2k]
  |  |  |  |  ------------------
  |  |  |  |  100|     19|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 15]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     15|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     30|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     15|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     15|    }                                                                          \
  |  |  |  |  106|     15|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  733|  1.14k|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 1.14k, False: 17.1k]
  ------------------
  734|  1.14k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.14k|#  define MINBPC(enc) 2
  ------------------
  735|  1.14k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.14k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.14k|    {                                                                          \
  |  |  |  |  135|  1.14k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.14k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.14k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.14k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.14k|    }
  |  |  ------------------
  ------------------
  736|  1.14k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.14k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.14k|  ((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:3): [True: 18, False: 1.12k]
  |  |  |  |  |  Branch (870:4): [True: 1.13k, False: 13]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    256|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 256, False: 889]
  ------------------
  738|    256|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    256|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    256|#  define MINBPC(enc) 2
  ------------------
  739|    871|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 871, False: 274]
  ------------------
  740|    871|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    871|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    871|#  define MINBPC(enc) 2
  ------------------
  741|  1.14k|    }
  742|     18|    *nextTokPtr = ptr;
  743|     18|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  744|  5.05k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 5.05k, False: 13.2k]
  ------------------
  745|  5.05k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  5.05k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  5.05k|#  define MINBPC(enc) 2
  ------------------
  746|  1.28k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 1.28k, False: 17.0k]
  ------------------
  747|  1.28k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  1.28k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  1.28k|#  define MINBPC(enc) 2
  ------------------
  748|      9|  default:
  ------------------
  |  Branch (748:3): [True: 9, False: 18.2k]
  ------------------
  749|      9|    *nextTokPtr = ptr;
  750|      9|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  751|  18.2k|  }
  752|  10.7k|#  ifdef XML_NS
  753|  10.7k|  hadColon = 0;
  754|  10.7k|#  endif
  755|       |  /* we have a start-tag */
  756|  28.6k|  while (HAS_CHAR(enc, ptr, end)) {
  757|  28.6k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  28.6k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  28.6k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  14.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 14.9k, False: 13.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  758|  82.2k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  17.9k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 13.6k, False: 14.9k]
  |  |  ------------------
  |  |   82|  17.9k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  13.6k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  13.6k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  13.6k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 19, False: 13.6k]
  |  |  ------------------
  |  |   83|     19|      *nextTokPtr = ptr;                                                       \
  |  |   84|     19|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     19|    }                                                                          \
  |  |   86|  17.9k|    /* fall through */                                                         \
  |  |   87|  17.9k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 2.87k, False: 25.7k]
  |  |  ------------------
  |  |   88|  17.0k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 606, False: 27.9k]
  |  |  ------------------
  |  |   89|  17.3k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 239, False: 28.3k]
  |  |  ------------------
  |  |   90|  17.7k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 366, False: 28.2k]
  |  |  ------------------
  |  |   91|  17.9k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 218, False: 28.3k]
  |  |  ------------------
  |  |   92|  17.9k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  17.9k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  17.9k|    break;                                                                     \
  |  |   94|  17.9k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 28.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: 28.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|     17|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 17, False: 28.5k]
  |  |  |  |  ------------------
  |  |  |  |   71|     17|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 13]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     13|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     26|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     13|    }                                                                          \
  |  |  |  |   77|     13|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 28.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|  2.71k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 2.71k, False: 25.8k]
  ------------------
  777|  3.86k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 1.15k, False: 27.4k]
  ------------------
  778|  4.37k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 511, False: 28.0k]
  ------------------
  779|  4.37k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.37k|#  define MINBPC(enc) 2
  ------------------
  780|  5.57k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  5.57k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  5.57k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  5.57k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.49k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 4.49k, False: 1.07k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  782|  4.03k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  3.51k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.05k, False: 4.52k]
  |  |  ------------------
  |  |  111|  3.51k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  1.05k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  1.05k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.05k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 12, False: 1.04k]
  |  |  ------------------
  |  |  112|     12|      *nextTokPtr = ptr;                                                       \
  |  |  113|     12|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     12|    }                                                                          \
  |  |  115|  3.51k|    /* fall through */                                                         \
  |  |  116|  3.51k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.90k, False: 3.67k]
  |  |  ------------------
  |  |  117|  3.51k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 565, False: 5.01k]
  |  |  ------------------
  |  |  118|  3.51k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  3.51k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  3.51k|    break;                                                                     \
  |  |  120|  3.51k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 5.57k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 5.57k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     18|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 18, False: 5.55k]
  |  |  |  |  ------------------
  |  |  |  |  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;
  |  |  ------------------
  ------------------
  783|    507|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 507, False: 5.07k]
  ------------------
  784|    507|          goto gt;
  785|    283|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 283, False: 5.29k]
  ------------------
  786|    283|          goto sol;
  787|    408|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 408, False: 5.16k]
  ------------------
  788|    688|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 280, False: 5.29k]
  ------------------
  789|  1.23k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 549, False: 5.02k]
  ------------------
  790|  1.23k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.23k|#  define MINBPC(enc) 2
  ------------------
  791|  1.23k|          continue;
  792|      9|        default:
  ------------------
  |  Branch (792:9): [True: 9, False: 5.56k]
  ------------------
  793|      9|          *nextTokPtr = ptr;
  794|      9|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  795|  5.57k|        }
  796|  3.51k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  915|  3.51k|#  define PREFIX(ident) big2_##ident
  ------------------
  797|  5.57k|      }
  798|     37|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     37|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  4.37k|    }
  800|  5.95k|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 5.95k, False: 22.6k]
  ------------------
  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|    302|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 302, False: 28.2k]
  ------------------
  805|    585|    sol:
  806|    585|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    585|#  define MINBPC(enc) 2
  ------------------
  807|    585|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    585|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    585|    {                                                                          \
  |  |  |  |  135|    585|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    585|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    585|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 10, False: 575]
  |  |  |  |  ------------------
  |  |  |  |  136|     10|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     10|      }                                                                        \
  |  |  |  |  138|    585|    }
  |  |  ------------------
  ------------------
  808|    575|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    575|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    575|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 556, False: 19]
  |  |  |  |  |  Branch (872:49): [True: 545, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  809|     30|        *nextTokPtr = ptr;
  810|     30|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     30|#define XML_TOK_INVALID 0
  ------------------
  811|     30|      }
  812|    545|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    545|#  define MINBPC(enc) 2
  ------------------
  813|    545|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|    545|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|     10|    default:
  ------------------
  |  Branch (814:5): [True: 10, False: 28.5k]
  ------------------
  815|     10|      *nextTokPtr = ptr;
  816|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  817|  28.6k|    }
  818|  28.6k|  }
  819|     67|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     67|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  10.7k|}
xmltok.c:big2_scanCdataSection:
  337|    871|                         const char **nextTokPtr) {
  338|    871|  static const char CDATA_LSQB[]
  339|    871|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|    871|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|    871|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    871|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|    871|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    871|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|    871|#define ASCII_LSQB 0x5B
  ------------------
  340|    871|  int i;
  341|    871|  UNUSED_P(enc);
  ------------------
  |  |  135|    871|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|    871|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|    871|    {                                                                          \
  |  |  135|    871|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|    871|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    871|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 2, False: 869]
  |  |  ------------------
  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      2|      }                                                                        \
  |  |  138|    871|    }
  ------------------
  344|  6.01k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  5.14k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (344:15): [True: 5.16k, False: 853]
  ------------------
  345|  5.16k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  920|  5.16k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  5.16k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 5.15k, False: 3]
  |  |  |  |  |  Branch (872:49): [True: 5.14k, False: 13]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  346|     16|      *nextTokPtr = ptr;
  347|     16|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  348|     16|    }
  349|  5.16k|  }
  350|    853|  *nextTokPtr = ptr;
  351|    853|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|    853|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|    869|}
xmltok.c:big2_scanEndTag:
  432|  1.28k|                   const char **nextTokPtr) {
  433|  1.28k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.28k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.28k|    {                                                                          \
  |  |  |  |  135|  1.28k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.28k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.28k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.28k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.28k|    }
  |  |  ------------------
  ------------------
  434|  1.28k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.28k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.28k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    874|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 874, False: 407]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  435|  1.21k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.25k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 381, False: 900]
  |  |  ------------------
  |  |  111|  1.25k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    381|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    381|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    381|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 2, False: 379]
  |  |  ------------------
  |  |  112|      2|      *nextTokPtr = ptr;                                                       \
  |  |  113|      2|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      2|    }                                                                          \
  |  |  115|  1.25k|    /* fall through */                                                         \
  |  |  116|  1.25k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 419, False: 862]
  |  |  ------------------
  |  |  117|  1.25k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 453, False: 828]
  |  |  ------------------
  |  |  118|  1.25k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.25k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.25k|    break;                                                                     \
  |  |  120|  1.25k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.28k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.28k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     21|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 21, False: 1.26k]
  |  |  |  |  ------------------
  |  |  |  |  100|     21|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 17]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     17|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     34|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     17|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     17|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     17|    }                                                                          \
  |  |  |  |  106|     17|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  436|      7|  default:
  ------------------
  |  Branch (436:3): [True: 7, False: 1.27k]
  ------------------
  437|      7|    *nextTokPtr = ptr;
  438|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  439|  1.28k|  }
  440|  2.77k|  while (HAS_CHAR(enc, ptr, end)) {
  441|  2.77k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.77k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.77k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.35k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.35k, False: 421]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  442|  4.64k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.58k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 397, False: 2.37k]
  |  |  ------------------
  |  |   82|  1.58k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    397|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    397|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    397|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 19, False: 378]
  |  |  ------------------
  |  |   83|     19|      *nextTokPtr = ptr;                                                       \
  |  |   84|     19|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     19|    }                                                                          \
  |  |   86|  1.58k|    /* fall through */                                                         \
  |  |   87|  1.58k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 344, False: 2.43k]
  |  |  ------------------
  |  |   88|    965|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 243, False: 2.53k]
  |  |  ------------------
  |  |   89|  1.16k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 196, False: 2.58k]
  |  |  ------------------
  |  |   90|  1.36k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 204, False: 2.57k]
  |  |  ------------------
  |  |   91|  1.58k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 220, False: 2.55k]
  |  |  ------------------
  |  |   92|  1.58k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.58k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.58k|    break;                                                                     \
  |  |   94|  1.58k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 2.77k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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.77k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     19|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 19, False: 2.75k]
  |  |  |  |  ------------------
  |  |  |  |   71|     19|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 15]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     15|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     30|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     15|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     15|    }                                                                          \
  |  |  |  |   77|     15|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  443|    227|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 227, False: 2.54k]
  ------------------
  444|    495|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 268, False: 2.50k]
  ------------------
  445|    596|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 101, False: 2.67k]
  ------------------
  446|  1.59k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|    596|#  define MINBPC(enc) 2
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  1.03k|#  define MINBPC(enc) 2
  ------------------
  447|  1.59k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.59k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.59k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.55k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.55k, False: 36]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  448|    268|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 268, False: 1.32k]
  ------------------
  449|    725|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 457, False: 1.13k]
  ------------------
  450|  1.03k|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 307, False: 1.28k]
  ------------------
  451|  1.03k|          break;
  452|    517|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 517, False: 1.07k]
  ------------------
  453|    517|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    517|#  define MINBPC(enc) 2
  ------------------
  454|    517|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|    517|#define XML_TOK_END_TAG 5
  ------------------
  455|     41|        default:
  ------------------
  |  Branch (455:9): [True: 41, False: 1.54k]
  ------------------
  456|     41|          *nextTokPtr = ptr;
  457|     41|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     41|#define XML_TOK_INVALID 0
  ------------------
  458|  1.59k|        }
  459|  1.59k|      }
  460|     38|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     38|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  461|      0|#  ifdef XML_NS
  462|      0|    case BT_COLON:
  ------------------
  |  Branch (462:5): [True: 0, False: 2.77k]
  ------------------
  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|    550|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 550, False: 2.22k]
  ------------------
  469|    550|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    550|#  define MINBPC(enc) 2
  ------------------
  470|    550|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|    550|#define XML_TOK_END_TAG 5
  ------------------
  471|      7|    default:
  ------------------
  |  Branch (471:5): [True: 7, False: 2.76k]
  ------------------
  472|      7|      *nextTokPtr = ptr;
  473|      7|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  474|  2.77k|    }
  475|  2.77k|  }
  476|     60|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     60|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  1.25k|}
xmltok.c:big2_scanAtts:
  573|  3.51k|                 const char **nextTokPtr) {
  574|  3.51k|#  ifdef XML_NS
  575|  3.51k|  int hadColon = 0;
  576|  3.51k|#  endif
  577|   228k|  while (HAS_CHAR(enc, ptr, end)) {
  578|   228k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   228k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   228k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   223k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 223k, False: 4.90k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  579|  91.0k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  22.0k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 4.86k, False: 223k]
  |  |  ------------------
  |  |   82|  22.0k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  4.86k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  4.86k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  4.86k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 15, False: 4.85k]
  |  |  ------------------
  |  |   83|     15|      *nextTokPtr = ptr;                                                       \
  |  |   84|     15|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     15|    }                                                                          \
  |  |   86|  22.0k|    /* fall through */                                                         \
  |  |   87|  22.0k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 16.3k, False: 211k]
  |  |  ------------------
  |  |   88|  21.4k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 216, False: 228k]
  |  |  ------------------
  |  |   89|  21.6k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 238, False: 228k]
  |  |  ------------------
  |  |   90|  21.8k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 208, False: 228k]
  |  |  ------------------
  |  |   91|  22.0k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 197, False: 228k]
  |  |  ------------------
  |  |   92|  22.0k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  22.0k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  22.0k|    break;                                                                     \
  |  |   94|  22.0k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 228k]
  |  |  |  |  ------------------
  |  |  |  |   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: 228k]
  |  |  |  |  ------------------
  |  |  |  |   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|     25|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 25, False: 228k]
  |  |  |  |  ------------------
  |  |  |  |   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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     42|#    define IS_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|     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;
  |  |  ------------------
  ------------------
  580|      0|#  ifdef XML_NS
  581|      0|    case BT_COLON:
  ------------------
  |  Branch (581:5): [True: 0, False: 228k]
  ------------------
  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|    708|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 708, False: 227k]
  ------------------
  598|    846|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 138, False: 228k]
  ------------------
  599|  30.7k|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 29.8k, False: 198k]
  ------------------
  600|  31.4k|      for (;;) {
  601|  31.4k|        int t;
  602|       |
  603|  31.4k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  31.4k|#  define MINBPC(enc) 2
  ------------------
  604|  31.4k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  31.4k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  31.4k|    {                                                                          \
  |  |  |  |  135|  31.4k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  31.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  31.4k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 41, False: 31.4k]
  |  |  |  |  ------------------
  |  |  |  |  136|     41|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     41|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     41|      }                                                                        \
  |  |  |  |  138|  31.4k|    }
  |  |  ------------------
  ------------------
  605|  31.4k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  31.4k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  31.4k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  31.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 31.4k, False: 26]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  606|  31.4k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 30.6k, False: 771]
  ------------------
  607|  30.6k|          break;
  608|    771|        switch (t) {
  609|    275|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 275, False: 496]
  ------------------
  610|    514|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 239, False: 532]
  ------------------
  611|    739|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 225, False: 546]
  ------------------
  612|    739|          break;
  613|     32|        default:
  ------------------
  |  Branch (613:9): [True: 32, False: 739]
  ------------------
  614|     32|          *nextTokPtr = ptr;
  615|     32|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     32|#define XML_TOK_INVALID 0
  ------------------
  616|    771|        }
  617|    771|      }
  618|       |      /* fall through */
  619|   206k|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 175k, False: 52.8k]
  ------------------
  620|   206k|      int open;
  621|   206k|#  ifdef XML_NS
  622|   206k|      hadColon = 0;
  623|   206k|#  endif
  624|   206k|      for (;;) {
  625|   206k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|   206k|#  define MINBPC(enc) 2
  ------------------
  626|   206k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   206k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   206k|    {                                                                          \
  |  |  |  |  135|   206k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   206k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   206k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 31, False: 206k]
  |  |  |  |  ------------------
  |  |  |  |  136|     31|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     31|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     31|      }                                                                        \
  |  |  |  |  138|   206k|    }
  |  |  ------------------
  ------------------
  627|   206k|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|   206k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   206k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   206k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 206k, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  628|   206k|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 168k, False: 38.1k]
  |  Branch (628:32): [True: 37.4k, False: 768]
  ------------------
  629|   205k|          break;
  630|    768|        switch (open) {
  631|    311|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 311, False: 457]
  ------------------
  632|    510|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 199, False: 569]
  ------------------
  633|    736|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 226, False: 542]
  ------------------
  634|    736|          break;
  635|     32|        default:
  ------------------
  |  Branch (635:9): [True: 32, False: 736]
  ------------------
  636|     32|          *nextTokPtr = ptr;
  637|     32|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     32|#define XML_TOK_INVALID 0
  ------------------
  638|    768|        }
  639|    768|      }
  640|   205k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   205k|#  define MINBPC(enc) 2
  ------------------
  641|       |      /* in attribute value */
  642|  4.17M|      for (;;) {
  643|  4.17M|        int t;
  644|  4.17M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.17M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.17M|    {                                                                          \
  |  |  |  |  135|  4.17M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.17M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  4.17M|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 60, False: 4.17M]
  |  |  |  |  ------------------
  |  |  |  |  136|     60|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     60|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     60|      }                                                                        \
  |  |  |  |  138|  4.17M|    }
  |  |  ------------------
  ------------------
  645|  4.17M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  4.17M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.17M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   321k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 321k, False: 3.85M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  646|  4.17M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 205k, False: 3.96M]
  ------------------
  647|   205k|          break;
  648|  3.96M|        switch (t) {
  649|  92.0k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 3.96M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 3.96M]
  |  |  |  |  ------------------
  |  |  |  |   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|  46.0k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  46.0k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 46.0k, False: 3.92M]
  |  |  |  |  ------------------
  |  |  |  |   50|  46.0k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 23, False: 46.0k]
  |  |  |  |  ------------------
  |  |  |  |   51|  46.0k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     23|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  46.0k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  46.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|  46.0k|    ptr += n;                                                                  \
  |  |  |  |   57|  46.0k|    break;
  |  |  ------------------
  |  |   63|  46.0k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 11, False: 3.96M]
  |  |  ------------------
  |  |   64|     11|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 3.96M]
  |  |  ------------------
  |  |   65|     16|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 5, False: 3.96M]
  |  |  ------------------
  |  |   66|     16|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     16|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  7.71k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 7.71k, False: 3.96M]
  ------------------
  651|  7.71k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  915|  7.71k|#  define PREFIX(ident) big2_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  916|  7.71k|#  define MINBPC(enc) 2
  ------------------
  652|  7.71k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 21, False: 7.69k]
  ------------------
  653|     21|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 15, False: 6]
  ------------------
  654|     15|              *nextTokPtr = ptr;
  655|     21|            return tok;
  656|     21|          }
  657|  7.69k|          break;
  658|  7.71k|        }
  659|  7.69k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 4, False: 3.96M]
  ------------------
  660|      4|          *nextTokPtr = ptr;
  661|      4|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  662|  3.91M|        default:
  ------------------
  |  Branch (662:9): [True: 3.91M, False: 53.7k]
  ------------------
  663|  3.91M|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.91M|#  define MINBPC(enc) 2
  ------------------
  664|  3.91M|          break;
  665|  3.96M|        }
  666|  3.96M|      }
  667|   205k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   205k|#  define MINBPC(enc) 2
  ------------------
  668|   205k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   205k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   205k|    {                                                                          \
  |  |  |  |  135|   205k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   205k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   205k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 205k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|   205k|    }
  |  |  ------------------
  ------------------
  669|   205k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   205k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   205k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   205k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 205k, False: 17]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  670|  2.56k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 2.56k, False: 203k]
  ------------------
  671|  3.87k|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 1.30k, False: 204k]
  ------------------
  672|   203k|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 200k, False: 5.75k]
  ------------------
  673|   203k|        break;
  674|    441|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 441, False: 205k]
  ------------------
  675|    441|        goto sol;
  676|  1.42k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 1.42k, False: 204k]
  ------------------
  677|  1.42k|        goto gt;
  678|     19|      default:
  ------------------
  |  Branch (678:7): [True: 19, False: 205k]
  ------------------
  679|     19|        *nextTokPtr = ptr;
  680|     19|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     19|#define XML_TOK_INVALID 0
  ------------------
  681|   205k|      }
  682|       |      /* ptr points to closing quote */
  683|   217k|      for (;;) {
  684|   217k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|   217k|#  define MINBPC(enc) 2
  ------------------
  685|   217k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   217k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   217k|    {                                                                          \
  |  |  |  |  135|   217k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   217k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   217k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 28, False: 217k]
  |  |  |  |  ------------------
  |  |  |  |  136|     28|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     28|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     28|      }                                                                        \
  |  |  |  |  138|   217k|    }
  |  |  ------------------
  ------------------
  686|   217k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   217k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   217k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   215k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 215k, False: 1.81k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  687|   170k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   202k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.78k, False: 215k]
  |  |  ------------------
  |  |  111|   202k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  1.78k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  1.78k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.78k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 14, False: 1.76k]
  |  |  ------------------
  |  |  112|     14|      *nextTokPtr = ptr;                                                       \
  |  |  113|     14|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     14|    }                                                                          \
  |  |  115|   202k|    /* fall through */                                                         \
  |  |  116|   202k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 167k, False: 50.1k]
  |  |  ------------------
  |  |  117|   202k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 33.6k, False: 183k]
  |  |  ------------------
  |  |  118|   202k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   202k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   202k|    break;                                                                     \
  |  |  120|   202k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 217k]
  |  |  |  |  ------------------
  |  |  |  |  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: 217k]
  |  |  |  |  ------------------
  |  |  |  |  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|     30|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 30, False: 217k]
  |  |  |  |  ------------------
  |  |  |  |  100|     30|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 25]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     25|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     50|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     25|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     25|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     25|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     25|    }                                                                          \
  |  |  |  |  106|     25|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  688|  6.03k|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 6.03k, False: 211k]
  ------------------
  689|  6.64k|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 610, False: 216k]
  ------------------
  690|  13.5k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 6.89k, False: 210k]
  ------------------
  691|  13.5k|          continue;
  692|    658|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 658, False: 216k]
  ------------------
  693|  2.08k|        gt:
  694|  2.08k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.08k|#  define MINBPC(enc) 2
  ------------------
  695|  2.08k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  2.08k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|    479|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 479, False: 217k]
  ------------------
  697|    920|        sol:
  698|    920|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    920|#  define MINBPC(enc) 2
  ------------------
  699|    920|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    920|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    920|    {                                                                          \
  |  |  |  |  135|    920|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    920|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    920|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 7, False: 913]
  |  |  |  |  ------------------
  |  |  |  |  136|      7|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      7|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      7|      }                                                                        \
  |  |  |  |  138|    920|    }
  |  |  ------------------
  ------------------
  700|    913|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    913|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    913|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 907, False: 6]
  |  |  |  |  |  Branch (872:49): [True: 898, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  701|     15|            *nextTokPtr = ptr;
  702|     15|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  703|     15|          }
  704|    898|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    898|#  define MINBPC(enc) 2
  ------------------
  705|    898|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|    898|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|     14|        default:
  ------------------
  |  Branch (706:9): [True: 14, False: 217k]
  ------------------
  707|     14|          *nextTokPtr = ptr;
  708|     14|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  709|   217k|        }
  710|   202k|        break;
  711|   217k|      }
  712|   202k|      break;
  713|   203k|    }
  714|   202k|    default:
  ------------------
  |  Branch (714:5): [True: 15, False: 228k]
  ------------------
  715|     15|      *nextTokPtr = ptr;
  716|     15|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  717|   228k|    }
  718|   228k|  }
  719|     82|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     82|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  3.51k|}
xmltok.c:big2_scanRef:
  545|  52.3k|                const char **nextTokPtr) {
  546|  52.3k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  52.3k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  52.3k|    {                                                                          \
  |  |  |  |  135|  52.3k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  52.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  52.3k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 15, False: 52.3k]
  |  |  |  |  ------------------
  |  |  |  |  136|     15|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     15|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     15|      }                                                                        \
  |  |  |  |  138|  52.3k|    }
  |  |  ------------------
  ------------------
  547|  52.3k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  52.3k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  52.3k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  38.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 38.2k, False: 14.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  548|  40.7k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  45.2k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 14.0k, False: 38.2k]
  |  |  ------------------
  |  |  111|  45.2k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  14.0k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  14.0k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  14.0k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 13, False: 14.0k]
  |  |  ------------------
  |  |  112|     13|      *nextTokPtr = ptr;                                                       \
  |  |  113|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     13|    }                                                                          \
  |  |  115|  45.2k|    /* fall through */                                                         \
  |  |  116|  45.2k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 12.5k, False: 39.8k]
  |  |  ------------------
  |  |  117|  45.2k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 18.6k, False: 33.6k]
  |  |  ------------------
  |  |  118|  45.2k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  45.2k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  45.2k|    break;                                                                     \
  |  |  120|  45.2k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 52.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: 52.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|     15|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 15, False: 52.3k]
  |  |  |  |  ------------------
  |  |  |  |  100|     15|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 10]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      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;
  |  |  ------------------
  ------------------
  549|  7.05k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 7.05k, False: 45.2k]
  ------------------
  550|  7.05k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  7.05k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  7.05k|#  define MINBPC(enc) 2
  ------------------
  551|     14|  default:
  ------------------
  |  Branch (551:3): [True: 14, False: 52.3k]
  ------------------
  552|     14|    *nextTokPtr = ptr;
  553|     14|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  554|  52.3k|  }
  555|  99.5k|  while (HAS_CHAR(enc, ptr, end)) {
  556|  99.5k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  99.5k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  99.5k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  85.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 85.1k, False: 14.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  557|   220k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  54.3k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 14.4k, False: 85.1k]
  |  |  ------------------
  |  |   82|  54.3k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  14.4k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  14.4k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  14.4k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 21, False: 14.3k]
  |  |  ------------------
  |  |   83|     21|      *nextTokPtr = ptr;                                                       \
  |  |   84|     21|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     21|    }                                                                          \
  |  |   86|  54.3k|    /* fall through */                                                         \
  |  |   87|  54.3k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 30.4k, False: 69.1k]
  |  |  ------------------
  |  |   88|  53.3k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 8.59k, False: 90.9k]
  |  |  ------------------
  |  |   89|  53.7k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 374, False: 99.1k]
  |  |  ------------------
  |  |   90|  54.1k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 404, False: 99.1k]
  |  |  ------------------
  |  |   91|  54.3k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 200, False: 99.3k]
  |  |  ------------------
  |  |   92|  54.3k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  54.3k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  54.3k|    break;                                                                     \
  |  |   94|  54.3k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 99.5k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 99.5k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     11|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 11, False: 99.5k]
  |  |  |  |  ------------------
  |  |  |  |   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;
  |  |  ------------------
  ------------------
  558|  45.1k|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 45.1k, False: 54.4k]
  ------------------
  559|  45.1k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  45.1k|#  define MINBPC(enc) 2
  ------------------
  560|  45.1k|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|  45.1k|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|     11|    default:
  ------------------
  |  Branch (561:5): [True: 11, False: 99.5k]
  ------------------
  562|     11|      *nextTokPtr = ptr;
  563|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  564|  99.5k|    }
  565|  99.5k|  }
  566|     60|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     60|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|  45.2k|}
xmltok.c:big2_scanCharRef:
  514|  7.05k|                    const char **nextTokPtr) {
  515|  7.05k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  7.05k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  7.05k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  7.05k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 7.05k, False: 3]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  7.05k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  920|  7.05k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  7.05k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 7.04k, False: 6]
  |  |  |  |  |  Branch (872:49): [True: 6.09k, False: 947]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  517|  6.09k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  6.09k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  6.09k|#  define MINBPC(enc) 2
  ------------------
  518|    953|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|    953|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|    953|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    947|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 947, False: 6]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  519|    932|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 932, False: 21]
  ------------------
  520|    932|      break;
  521|     21|    default:
  ------------------
  |  Branch (521:5): [True: 21, False: 932]
  ------------------
  522|     21|      *nextTokPtr = ptr;
  523|     21|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  524|    953|    }
  525|  2.81k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|    932|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  1.89k|#  define MINBPC(enc) 2
  ------------------
  526|  2.81k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.81k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.81k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.78k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.78k, False: 29]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  527|  1.89k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 1.89k, False: 926]
  ------------------
  528|  1.89k|        break;
  529|    893|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 893, False: 1.92k]
  ------------------
  530|    893|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    893|#  define MINBPC(enc) 2
  ------------------
  531|    893|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|    893|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     33|      default:
  ------------------
  |  Branch (532:7): [True: 33, False: 2.78k]
  ------------------
  533|     33|        *nextTokPtr = ptr;
  534|     33|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     33|#define XML_TOK_INVALID 0
  ------------------
  535|  2.81k|      }
  536|  2.81k|    }
  537|    932|  }
  538|      9|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      9|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  7.05k|}
xmltok.c:big2_scanHexCharRef:
  483|  6.09k|                       const char **nextTokPtr) {
  484|  6.09k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  6.09k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  6.09k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  6.09k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 6.09k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  6.09k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  6.09k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  6.09k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  6.09k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 6.09k, False: 7]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  486|  4.16k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 4.16k, False: 1.93k]
  ------------------
  487|  6.08k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 1.92k, False: 4.17k]
  ------------------
  488|  6.08k|      break;
  489|     11|    default:
  ------------------
  |  Branch (489:5): [True: 11, False: 6.08k]
  ------------------
  490|     11|      *nextTokPtr = ptr;
  491|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  492|  6.09k|    }
  493|  22.6k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  6.08k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  16.5k|#  define MINBPC(enc) 2
  ------------------
  494|  22.6k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  22.6k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  22.6k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  22.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 22.5k, False: 29]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  495|  10.8k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 10.8k, False: 11.7k]
  ------------------
  496|  16.5k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 5.69k, False: 16.9k]
  ------------------
  497|  16.5k|        break;
  498|  6.04k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 6.04k, False: 16.5k]
  ------------------
  499|  6.04k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  6.04k|#  define MINBPC(enc) 2
  ------------------
  500|  6.04k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  6.04k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|     34|      default:
  ------------------
  |  Branch (501:7): [True: 34, False: 22.5k]
  ------------------
  502|     34|        *nextTokPtr = ptr;
  503|     34|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     34|#define XML_TOK_INVALID 0
  ------------------
  504|  22.6k|      }
  505|  22.6k|    }
  506|  6.08k|  }
  507|     13|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     13|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  6.09k|}
xmltok.c:big2_cdataSectionTok:
  356|  16.8k|                        const char **nextTokPtr) {
  357|  16.8k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 135, False: 16.7k]
  ------------------
  358|    135|    return XML_TOK_NONE;
  ------------------
  |  |   51|    135|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|  16.7k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  16.7k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (359:7): [Folded - Ignored]
  ------------------
  360|  16.7k|    size_t n = end - ptr;
  361|  16.7k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  16.7k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (361:9): [True: 7.99k, False: 8.76k]
  ------------------
  362|  7.99k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  7.99k|#  define MINBPC(enc) 2
  ------------------
  363|  7.99k|      if (n == 0)
  ------------------
  |  Branch (363:11): [True: 22, False: 7.96k]
  ------------------
  364|     22|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     22|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  365|  7.96k|      end = ptr + n;
  366|  7.96k|    }
  367|  16.7k|  }
  368|  16.7k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  16.7k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  16.7k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  13.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 13.8k, False: 2.86k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  369|  5.65k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 5.65k, False: 11.0k]
  ------------------
  370|  5.65k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  5.65k|#  define MINBPC(enc) 2
  ------------------
  371|  5.65k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.65k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.65k|    {                                                                          \
  |  |  |  |  135|  5.65k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.65k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  5.65k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 5.65k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  5.65k|    }
  |  |  ------------------
  ------------------
  372|  5.65k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  920|  5.65k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  5.65k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 4.27k, False: 1.37k]
  |  |  |  |  |  Branch (872:49): [True: 2.83k, False: 1.44k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  373|  2.81k|      break;
  374|  2.83k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.83k|#  define MINBPC(enc) 2
  ------------------
  375|  2.83k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.83k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.83k|    {                                                                          \
  |  |  |  |  135|  2.83k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.83k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.83k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 2.83k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  2.83k|    }
  |  |  ------------------
  ------------------
  376|  2.83k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  2.83k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.83k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.85k, False: 978]
  |  |  |  |  |  Branch (872:49): [True: 569, False: 1.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  377|  2.26k|      ptr -= MINBPC(enc);
  ------------------
  |  |  916|  2.26k|#  define MINBPC(enc) 2
  ------------------
  378|  2.26k|      break;
  379|  2.26k|    }
  380|    569|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    569|#  define MINBPC(enc) 2
  ------------------
  381|    569|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|    569|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  4.49k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 4.49k, False: 12.2k]
  ------------------
  383|  4.49k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.49k|#  define MINBPC(enc) 2
  ------------------
  384|  4.49k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.49k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.49k|    {                                                                          \
  |  |  |  |  135|  4.49k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.49k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  4.49k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 7, False: 4.49k]
  |  |  |  |  ------------------
  |  |  |  |  136|      7|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      7|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      7|      }                                                                        \
  |  |  |  |  138|  4.49k|    }
  |  |  ------------------
  ------------------
  385|  4.49k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  4.49k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.49k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.22k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.22k, False: 2.26k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 452, False: 4.03k]
  ------------------
  386|    452|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    452|#  define MINBPC(enc) 2
  ------------------
  387|  4.49k|    *nextTokPtr = ptr;
  388|  4.49k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  4.49k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  2.03k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 2.03k, False: 14.6k]
  ------------------
  390|  2.03k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.03k|#  define MINBPC(enc) 2
  ------------------
  391|  2.03k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  2.03k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  3.14k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 16.7k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 16.7k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  1.54k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.49k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.54k, False: 15.1k]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.54k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 48, False: 1.49k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.49k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     48|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.49k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.49k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  1.49k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.49k|    break;
  |  |  ------------------
  |  |   63|  1.49k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 52, False: 16.6k]
  |  |  ------------------
  |  |   64|     52|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 16.7k]
  |  |  ------------------
  |  |   65|     65|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 13, False: 16.7k]
  |  |  ------------------
  |  |   66|     65|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     65|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     65|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  2.93k|  default:
  ------------------
  |  Branch (393:3): [True: 2.93k, False: 13.7k]
  ------------------
  394|  2.93k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.93k|#  define MINBPC(enc) 2
  ------------------
  395|  2.93k|    break;
  396|  16.7k|  }
  397|   226k|  while (HAS_CHAR(enc, ptr, end)) {
  398|   226k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   226k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   226k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  28.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 28.0k, False: 198k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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: 226k]
  |  |  ------------------
  |  |  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: 226k]
  |  |  ------------------
  |  |  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|  26.6k|      LEAD_CASE(4)
  ------------------
  |  |  400|  26.5k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 26.6k, False: 200k]
  |  |  ------------------
  |  |  401|  26.6k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  26.5k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 41, False: 26.5k]
  |  |  ------------------
  |  |  402|     41|      *nextTokPtr = ptr;                                                       \
  |  |  403|     41|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     41|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|     41|    }                                                                          \
  |  |  405|  26.5k|    ptr += n;                                                                  \
  |  |  406|  26.5k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|     47|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 47, False: 226k]
  ------------------
  412|     47|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 0, False: 226k]
  ------------------
  413|     58|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 11, False: 226k]
  ------------------
  414|  3.66k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 3.60k, False: 223k]
  ------------------
  415|  5.46k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 1.80k, False: 225k]
  ------------------
  416|  9.33k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 3.87k, False: 222k]
  ------------------
  417|  9.33k|      *nextTokPtr = ptr;
  418|  9.33k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  9.33k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|   190k|    default:
  ------------------
  |  Branch (419:5): [True: 190k, False: 35.9k]
  ------------------
  420|   190k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   190k|#  define MINBPC(enc) 2
  ------------------
  421|   190k|      break;
  422|   226k|    }
  423|   226k|  }
  424|    138|  *nextTokPtr = ptr;
  425|    138|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    138|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  9.51k|}
xmltok.c:big2_attributeValueTok:
 1262|  33.2k|                          const char **nextTokPtr) {
 1263|  33.2k|  const char *start;
 1264|  33.2k|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 3.89k, False: 29.3k]
  ------------------
 1265|  3.89k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  3.89k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|  29.3k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  29.3k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  29.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  29.3k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 29.3k]
  ------------------
 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|  29.3k|  start = ptr;
 1275|  2.04M|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  2.04M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.04M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.04M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  64.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 64.5k, False: 1.97M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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.04M]
  |  |  ------------------
  |  | 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.04M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1283|  57.2k|      LEAD_CASE(4)
  ------------------
  |  | 1278|  57.2k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 57.2k, False: 1.98M]
  |  |  ------------------
  |  | 1279|  57.2k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  57.2k|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|  9.25k|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 9.25k, False: 2.03M]
  ------------------
 1286|  9.25k|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 5.85k, False: 3.39k]
  ------------------
 1287|  5.85k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  5.85k|#  define PREFIX(ident) big2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  5.85k|#  define MINBPC(enc) 2
  ------------------
 1288|  3.39k|      *nextTokPtr = ptr;
 1289|  3.39k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  3.39k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      3|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 3, False: 2.04M]
  ------------------
 1291|       |      /* this is for inside entity references */
 1292|      3|      *nextTokPtr = ptr;
 1293|      3|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
 1294|  1.39k|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 1.39k, False: 2.03M]
  ------------------
 1295|  1.39k|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 861, False: 529]
  ------------------
 1296|    861|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    861|#  define MINBPC(enc) 2
  ------------------
 1297|    861|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|    861|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|    861|      }
 1299|    529|      *nextTokPtr = ptr;
 1300|    529|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    529|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|  8.83k|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 8.83k, False: 2.03M]
  ------------------
 1302|  8.83k|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 5.27k, False: 3.56k]
  ------------------
 1303|  5.27k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  5.27k|#  define MINBPC(enc) 2
  ------------------
 1304|  5.27k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  5.27k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  5.27k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  5.27k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 652, False: 4.61k]
  ------------------
 1305|    652|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    652|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|  4.61k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  4.61k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.61k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.86k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.86k, False: 1.75k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 471, False: 4.14k]
  ------------------
 1307|    471|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    471|#  define MINBPC(enc) 2
  ------------------
 1308|  4.61k|        *nextTokPtr = ptr;
 1309|  4.61k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  4.61k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|  5.27k|      }
 1311|  3.56k|      *nextTokPtr = ptr;
 1312|  3.56k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  3.56k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  8.67k|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 8.67k, False: 2.03M]
  ------------------
 1314|  8.67k|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 4.92k, False: 3.75k]
  ------------------
 1315|  4.92k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  4.92k|#  define MINBPC(enc) 2
  ------------------
 1316|  4.92k|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  4.92k|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  4.92k|      }
 1318|  3.75k|      *nextTokPtr = ptr;
 1319|  3.75k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  3.75k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|  1.95M|    default:
  ------------------
  |  Branch (1320:5): [True: 1.95M, False: 85.4k]
  ------------------
 1321|  1.95M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.95M|#  define MINBPC(enc) 2
  ------------------
 1322|  1.95M|      break;
 1323|  2.04M|    }
 1324|  2.04M|  }
 1325|  1.16k|  *nextTokPtr = ptr;
 1326|  1.16k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.16k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|  29.3k|}
xmltok.c:big2_entityValueTok:
 1331|   241k|                       const char **nextTokPtr) {
 1332|   241k|  const char *start;
 1333|   241k|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 1.48k, False: 239k]
  ------------------
 1334|  1.48k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.48k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|   239k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   239k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   239k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|   239k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 239k]
  ------------------
 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|   239k|  start = ptr;
 1344|  12.8M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  12.8M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  12.8M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  12.8M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   780k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 780k, False: 12.0M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1346|      0|#  define LEAD_CASE(n)                                                         \
 1347|      0|  case BT_LEAD##n:                                                             \
 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1349|      0|    break;
 1350|      0|      LEAD_CASE(2)
  ------------------
  |  | 1347|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 0, False: 12.8M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1351|      0|      LEAD_CASE(3)
  ------------------
  |  | 1347|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 0, False: 12.8M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1352|   898k|      LEAD_CASE(4)
  ------------------
  |  | 1347|   898k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 898k, False: 11.9M]
  |  |  ------------------
  |  | 1348|   898k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|   898k|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  34.3k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 34.3k, False: 12.8M]
  ------------------
 1355|  34.3k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 22.7k, False: 11.6k]
  ------------------
 1356|  22.7k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  22.7k|#  define PREFIX(ident) big2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  22.7k|#  define MINBPC(enc) 2
  ------------------
 1357|  11.6k|      *nextTokPtr = ptr;
 1358|  11.6k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  11.6k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      8|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 8, False: 12.8M]
  ------------------
 1360|      8|      if (ptr == start) {
  ------------------
  |  Branch (1360:11): [True: 5, False: 3]
  ------------------
 1361|      5|        int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|      5|#  define PREFIX(ident) big2_##ident
  ------------------
                      int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|      5|#  define MINBPC(enc) 2
  ------------------
 1362|      5|        return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   89|      5|#define XML_TOK_PERCENT 22
  ------------------
                      return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (1362:16): [True: 1, False: 4]
  ------------------
 1363|      5|      }
 1364|      3|      *nextTokPtr = ptr;
 1365|      3|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|      3|#define XML_TOK_DATA_CHARS 6
  ------------------
 1366|  31.1k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 31.1k, False: 12.8M]
  ------------------
 1367|  31.1k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 17.0k, False: 14.0k]
  ------------------
 1368|  17.0k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  17.0k|#  define MINBPC(enc) 2
  ------------------
 1369|  17.0k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  17.0k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|  17.0k|      }
 1371|  14.0k|      *nextTokPtr = ptr;
 1372|  14.0k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  14.0k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|   173k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 173k, False: 12.6M]
  ------------------
 1374|   173k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 100k, False: 73.1k]
  ------------------
 1375|   100k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|   100k|#  define MINBPC(enc) 2
  ------------------
 1376|   100k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   100k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   100k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|   100k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 731, False: 99.7k]
  ------------------
 1377|    731|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    731|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|  99.7k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  99.7k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  99.7k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  74.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 74.9k, False: 24.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 14.0k, False: 85.6k]
  ------------------
 1379|  14.0k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  14.0k|#  define MINBPC(enc) 2
  ------------------
 1380|  99.7k|        *nextTokPtr = ptr;
 1381|  99.7k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  99.7k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|   100k|      }
 1383|  73.1k|      *nextTokPtr = ptr;
 1384|  73.1k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  73.1k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  11.7M|    default:
  ------------------
  |  Branch (1385:5): [True: 11.7M, False: 1.13M]
  ------------------
 1386|  11.7M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  11.7M|#  define MINBPC(enc) 2
  ------------------
 1387|  11.7M|      break;
 1388|  12.8M|    }
 1389|  12.8M|  }
 1390|    642|  *nextTokPtr = ptr;
 1391|    642|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    642|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|   239k|}
xmltok.c:big2_nameMatchesAscii:
 1715|  16.1k|                         const char *end1, const char *ptr2) {
 1716|  16.1k|  UNUSED_P(enc);
  ------------------
  |  |  135|  16.1k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|  66.5k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  916|  50.4k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1717:10): [True: 57.0k, False: 9.51k]
  ------------------
 1718|  57.0k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  916|  57.0k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1718:9): [True: 29, False: 57.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|     29|      return 0; /* LCOV_EXCL_LINE */
 1725|     29|    }
 1726|  57.0k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  920|  57.0k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  57.0k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 56.9k, False: 39]
  |  |  |  |  |  Branch (872:49): [True: 50.4k, False: 6.52k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1727|  6.56k|      return 0;
 1728|  57.0k|  }
 1729|  9.51k|  return ptr1 == end1;
 1730|  16.1k|}
xmltok.c:big2_nameLength:
 1733|  14.7k|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  14.7k|  const char *start = ptr;
 1735|  46.9k|  for (;;) {
 1736|  46.9k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  46.9k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  46.9k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  29.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 29.1k, False: 17.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 46.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: 46.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: 46.9k]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1744|      0|#  undef LEAD_CASE
 1745|  17.8k|    case BT_NONASCII:
  ------------------
  |  Branch (1745:5): [True: 17.8k, False: 29.1k]
  ------------------
 1746|  27.4k|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 9.64k, False: 37.2k]
  ------------------
 1747|  27.4k|#  ifdef XML_NS
 1748|  27.4k|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 46.9k]
  ------------------
 1749|  27.4k|#  endif
 1750|  31.7k|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 4.29k, False: 42.6k]
  ------------------
 1751|  31.8k|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 43, False: 46.8k]
  ------------------
 1752|  32.0k|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 283, False: 46.6k]
  ------------------
 1753|  32.1k|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 50, False: 46.8k]
  ------------------
 1754|  32.1k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  32.1k|#  define MINBPC(enc) 2
  ------------------
 1755|  32.1k|      break;
 1756|  14.7k|    default:
  ------------------
  |  Branch (1756:5): [True: 14.7k, False: 32.1k]
  ------------------
 1757|  14.7k|      return (int)(ptr - start);
 1758|  46.9k|    }
 1759|  46.9k|  }
 1760|  14.7k|}
xmltok.c:big2_getAtts:
 1510|  10.0k|                ATTRIBUTE *atts) {
 1511|  10.0k|  enum { other, inName, inValue } state = inName;
 1512|  10.0k|  int nAtts = 0;
 1513|  10.0k|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  8.10M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  10.0k|#  define MINBPC(enc) 2
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  8.09M|#  define MINBPC(enc) 2
  ------------------
 1517|  8.10M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  8.10M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  8.10M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.36M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.36M, False: 5.74M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 8.10M]
  |  |  ------------------
  |  | 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: 8.10M]
  |  |  ------------------
  |  | 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|  43.7k|      LEAD_CASE(4)
  ------------------
  |  | 1527|  43.7k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 43.7k, False: 8.06M]
  |  |  ------------------
  |  | 1528|  43.7k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  43.7k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 43.7k]
  |  |  |  |  ------------------
  |  |  |  | 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|  43.7k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|  43.7k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|  5.69M|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 5.69M, False: 2.41M]
  ------------------
 1535|  6.08M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 387k, False: 7.72M]
  ------------------
 1536|  6.17M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 92.4k, False: 8.01M]
  ------------------
 1537|  6.17M|      START_NAME
  ------------------
  |  | 1519|  6.17M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 405k, False: 5.77M]
  |  |  ------------------
  |  | 1520|   405k|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 205k, False: 199k]
  |  |  ------------------
  |  | 1521|   205k|        atts[nAtts].name = ptr;                                                \
  |  | 1522|   205k|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|   205k|      }                                                                        \
  |  | 1524|   405k|      state = inName;                                                          \
  |  | 1525|   405k|    }
  ------------------
 1538|  6.17M|      break;
 1539|      0|#  undef START_NAME
 1540|   665k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 665k, False: 7.44M]
  ------------------
 1541|   665k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 332k, False: 332k]
  ------------------
 1542|   332k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 168k, False: 163k]
  ------------------
 1543|   168k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|   168k|#  define MINBPC(enc) 2
  ------------------
 1544|   332k|        state = inValue;
 1545|   332k|        open = BT_QUOT;
 1546|   332k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 332k, False: 388]
  ------------------
 1547|   332k|        state = other;
 1548|   332k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 168k, False: 163k]
  ------------------
 1549|   168k|          atts[nAtts].valueEnd = ptr;
 1550|   332k|        nAtts++;
 1551|   332k|      }
 1552|   665k|      break;
 1553|   146k|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 146k, False: 7.96M]
  ------------------
 1554|   146k|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 72.7k, False: 74.1k]
  ------------------
 1555|  72.7k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 37.2k, False: 35.5k]
  ------------------
 1556|  37.2k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  37.2k|#  define MINBPC(enc) 2
  ------------------
 1557|  72.7k|        state = inValue;
 1558|  72.7k|        open = BT_APOS;
 1559|  74.1k|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 72.7k, False: 1.34k]
  ------------------
 1560|  72.7k|        state = other;
 1561|  72.7k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 37.2k, False: 35.5k]
  ------------------
 1562|  37.2k|          atts[nAtts].valueEnd = ptr;
 1563|  72.7k|        nAtts++;
 1564|  72.7k|      }
 1565|   146k|      break;
 1566|  8.62k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 8.62k, False: 8.10M]
  ------------------
 1567|  8.62k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 7.32k, False: 1.29k]
  ------------------
 1568|  7.32k|        atts[nAtts].normalized = 0;
 1569|  8.62k|      break;
 1570|  39.5k|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 39.5k, False: 8.07M]
  ------------------
 1571|  39.5k|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 3.11k, False: 36.4k]
  ------------------
 1572|  3.11k|        state = other;
 1573|  36.4k|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 21.5k, False: 14.8k]
  |  Branch (1573:36): [True: 13.5k, False: 8.03k]
  |  Branch (1573:55): [True: 10.3k, False: 3.14k]
  ------------------
 1574|  36.4k|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 4.18k, False: 6.19k]
  ------------------
 1575|  10.3k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  919|  6.19k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  6.19k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 6.19k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|  16.5k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 3.14k, False: 3.04k]
  ------------------
 1576|  10.3k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  919|  3.04k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  3.04k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.57k, False: 1.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|  13.4k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 417, False: 2.62k]
  ------------------
 1577|  10.3k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  918|  2.62k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.62k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.15k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.15k, False: 1.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 377, False: 2.25k]
  ------------------
 1578|  8.12k|        atts[nAtts].normalized = 0;
 1579|  39.5k|      break;
 1580|  8.84k|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 8.84k, False: 8.10M]
  ------------------
 1581|   507k|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 498k, False: 7.61M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|   507k|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 60.7k, False: 446k]
  ------------------
 1585|  60.7k|        state = other;
 1586|   446k|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 32.4k, False: 414k]
  |  Branch (1586:36): [True: 19.5k, False: 12.9k]
  ------------------
 1587|  19.5k|        atts[nAtts].normalized = 0;
 1588|   507k|      break;
 1589|  18.0k|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 18.0k, False: 8.09M]
  ------------------
 1590|  19.8k|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 1.76k, False: 8.10M]
  ------------------
 1591|  19.8k|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 10.0k, False: 9.75k]
  ------------------
 1592|  10.0k|        return nAtts;
 1593|  9.75k|      break;
 1594|   500k|    default:
  ------------------
  |  Branch (1594:5): [True: 500k, False: 7.60M]
  ------------------
 1595|   500k|      break;
 1596|  8.10M|    }
 1597|  8.10M|  }
 1598|       |  /* not reached */
 1599|  10.0k|}
xmltok.c:big2_charRefNumber:
 1602|  5.33k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  5.33k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  5.33k|  UNUSED_P(enc);
  ------------------
  |  |  135|  5.33k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  5.33k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  916|  5.33k|#  define MINBPC(enc) 2
  ------------------
 1607|  5.33k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  920|  5.33k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  5.33k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 5.33k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 4.61k, False: 720]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1608|  20.4k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  916|  4.61k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  920|  20.4k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  20.4k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 20.4k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 4.60k, False: 15.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1609|  15.7k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  15.7k|#  define MINBPC(enc) 2
  ------------------
 1610|  15.7k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  919|  15.7k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  15.7k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 15.7k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1611|  15.7k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 15.7k]
  ------------------
 1612|    897|      case ASCII_0:
  ------------------
  |  |   90|    897|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 897, False: 14.9k]
  ------------------
 1613|  2.29k|      case ASCII_1:
  ------------------
  |  |   91|  2.29k|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 1.39k, False: 14.4k]
  ------------------
 1614|  3.16k|      case ASCII_2:
  ------------------
  |  |   92|  3.16k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 870, False: 14.9k]
  ------------------
 1615|  4.26k|      case ASCII_3:
  ------------------
  |  |   93|  4.26k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 1.10k, False: 14.6k]
  ------------------
 1616|  5.13k|      case ASCII_4:
  ------------------
  |  |   94|  5.13k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 868, False: 14.9k]
  ------------------
 1617|  5.78k|      case ASCII_5:
  ------------------
  |  |   95|  5.78k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 654, False: 15.1k]
  ------------------
 1618|  6.70k|      case ASCII_6:
  ------------------
  |  |   96|  6.70k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 914, False: 14.8k]
  ------------------
 1619|  7.48k|      case ASCII_7:
  ------------------
  |  |   97|  7.48k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 783, False: 15.0k]
  ------------------
 1620|  7.80k|      case ASCII_8:
  ------------------
  |  |   98|  7.80k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 320, False: 15.4k]
  ------------------
 1621|  8.69k|      case ASCII_9:
  ------------------
  |  |   99|  8.69k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 887, False: 14.9k]
  ------------------
 1622|  8.69k|        result <<= 4;
 1623|  8.69k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  8.69k|#define ASCII_0 0x30
  ------------------
 1624|  8.69k|        break;
 1625|    216|      case ASCII_A:
  ------------------
  |  |   36|    216|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 216, False: 15.5k]
  ------------------
 1626|    490|      case ASCII_B:
  ------------------
  |  |   37|    490|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 274, False: 15.5k]
  ------------------
 1627|    906|      case ASCII_C:
  ------------------
  |  |   38|    906|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 416, False: 15.3k]
  ------------------
 1628|  1.16k|      case ASCII_D:
  ------------------
  |  |   39|  1.16k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 259, False: 15.5k]
  ------------------
 1629|  1.48k|      case ASCII_E:
  ------------------
  |  |   40|  1.48k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 317, False: 15.4k]
  ------------------
 1630|  2.16k|      case ASCII_F:
  ------------------
  |  |   41|  2.16k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 683, False: 15.1k]
  ------------------
 1631|  2.16k|        result <<= 4;
 1632|  2.16k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  2.16k|#define ASCII_A 0x41
  ------------------
 1633|  2.16k|        break;
 1634|    837|      case ASCII_a:
  ------------------
  |  |   63|    837|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 837, False: 14.9k]
  ------------------
 1635|  2.23k|      case ASCII_b:
  ------------------
  |  |   64|  2.23k|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 1.39k, False: 14.3k]
  ------------------
 1636|  2.46k|      case ASCII_c:
  ------------------
  |  |   65|  2.46k|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 229, False: 15.5k]
  ------------------
 1637|  3.24k|      case ASCII_d:
  ------------------
  |  |   66|  3.24k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 775, False: 15.0k]
  ------------------
 1638|  4.52k|      case ASCII_e:
  ------------------
  |  |   67|  4.52k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 1.28k, False: 14.5k]
  ------------------
 1639|  4.94k|      case ASCII_f:
  ------------------
  |  |   68|  4.94k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 421, False: 15.3k]
  ------------------
 1640|  4.94k|        result <<= 4;
 1641|  4.94k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  4.94k|#define ASCII_a 0x61
  ------------------
 1642|  4.94k|        break;
 1643|  15.7k|      }
 1644|  15.7k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 13, False: 15.7k]
  ------------------
 1645|     13|        return -1;
 1646|  15.7k|    }
 1647|  4.61k|  } else {
 1648|  3.13k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  920|  3.13k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  3.13k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 3.13k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 717, False: 2.41k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  2.41k|#  define MINBPC(enc) 2
  ------------------
 1649|  2.41k|      int c = 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: 2.41k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1650|  2.41k|      result *= 10;
 1651|  2.41k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  2.41k|#define ASCII_0 0x30
  ------------------
 1652|  2.41k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 3, False: 2.41k]
  ------------------
 1653|      3|        return -1;
 1654|  2.41k|    }
 1655|    720|  }
 1656|  5.32k|  return checkCharRefNumber(result);
 1657|  5.33k|}
xmltok.c:big2_predefinedEntityName:
 1661|  18.6k|                             const char *end) {
 1662|  18.6k|  UNUSED_P(enc);
  ------------------
  |  |  135|  18.6k|#  define UNUSED_P(p) (void)p
  ------------------
 1663|  18.6k|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  916|  18.6k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1663:11): [True: 7.50k, False: 11.1k]
  ------------------
 1664|  2.56k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 2.56k, False: 16.0k]
  ------------------
 1665|  2.56k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  920|  2.56k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.56k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.25k, False: 313]
  |  |  |  |  |  Branch (872:49): [True: 788, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1666|    788|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|    788|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|    788|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:31): [True: 318, False: 470]
  |  |  |  |  |  Branch (871:32): [True: 488, False: 300]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1667|    249|      case ASCII_l:
  ------------------
  |  |   74|    249|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 249, False: 539]
  ------------------
 1668|    249|        return ASCII_LT;
  ------------------
  |  |  111|    249|#define ASCII_LT 0x3C
  ------------------
 1669|    221|      case ASCII_g:
  ------------------
  |  |   69|    221|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 221, False: 567]
  ------------------
 1670|    221|        return ASCII_GT;
  ------------------
  |  |  113|    221|#define ASCII_GT 0x3E
  ------------------
 1671|    788|      }
 1672|    788|    }
 1673|  2.09k|    break;
 1674|  2.39k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 2.39k, False: 16.2k]
  ------------------
 1675|  2.39k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  920|  2.39k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.39k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.13k, False: 260]
  |  |  |  |  |  Branch (872:49): [True: 1.61k, False: 513]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1676|  1.61k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.61k|#  define MINBPC(enc) 2
  ------------------
 1677|  1.61k|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  920|  1.61k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.61k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.40k, False: 212]
  |  |  |  |  |  Branch (872:49): [True: 712, False: 693]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1678|    712|        ptr += MINBPC(enc);
  ------------------
  |  |  916|    712|#  define MINBPC(enc) 2
  ------------------
 1679|    712|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  920|    712|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    712|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 507, False: 205]
  |  |  |  |  |  Branch (872:49): [True: 221, False: 286]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1680|    221|          return ASCII_AMP;
  ------------------
  |  |  105|    221|#define ASCII_AMP 0x26
  ------------------
 1681|    712|      }
 1682|  1.61k|    }
 1683|  2.16k|    break;
 1684|  6.20k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 6.20k, False: 12.4k]
  ------------------
 1685|  6.20k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  6.20k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  6.20k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:31): [True: 508, False: 5.69k]
  |  |  |  |  |  Branch (871:32): [True: 5.78k, False: 415]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1686|  1.70k|    case ASCII_q:
  ------------------
  |  |   79|  1.70k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 1.70k, False: 4.49k]
  ------------------
 1687|  1.70k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.70k|#  define MINBPC(enc) 2
  ------------------
 1688|  1.70k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  920|  1.70k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.70k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.40k, False: 301]
  |  |  |  |  |  Branch (872:49): [True: 1.20k, False: 202]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1689|  1.20k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.20k|#  define MINBPC(enc) 2
  ------------------
 1690|  1.20k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  920|  1.20k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.20k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.00k, False: 201]
  |  |  |  |  |  Branch (872:49): [True: 772, False: 229]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1691|    772|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    772|#  define MINBPC(enc) 2
  ------------------
 1692|    772|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  920|    772|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    772|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 536, False: 236]
  |  |  |  |  |  Branch (872:49): [True: 322, False: 214]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1693|    322|            return ASCII_QUOT;
  ------------------
  |  |  104|    322|#define ASCII_QUOT 0x22
  ------------------
 1694|    772|        }
 1695|  1.20k|      }
 1696|  1.38k|      break;
 1697|  3.99k|    case ASCII_a:
  ------------------
  |  |   63|  3.99k|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 3.99k, False: 2.21k]
  ------------------
 1698|  3.99k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.99k|#  define MINBPC(enc) 2
  ------------------
 1699|  3.99k|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  920|  3.99k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  3.99k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 3.76k, False: 224]
  |  |  |  |  |  Branch (872:49): [True: 3.28k, False: 486]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1700|  3.28k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.28k|#  define MINBPC(enc) 2
  ------------------
 1701|  3.28k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  920|  3.28k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  3.28k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 3.21k, False: 70]
  |  |  |  |  |  Branch (872:49): [True: 2.92k, False: 289]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1702|  2.92k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.92k|#  define MINBPC(enc) 2
  ------------------
 1703|  2.92k|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  920|  2.92k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.92k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.72k, False: 198]
  |  |  |  |  |  Branch (872:49): [True: 206, False: 2.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1704|    206|            return ASCII_APOS;
  ------------------
  |  |  106|    206|#define ASCII_APOS 0x27
  ------------------
 1705|  2.92k|        }
 1706|  3.28k|      }
 1707|  3.78k|      break;
 1708|  6.20k|    }
 1709|  18.6k|  }
 1710|  17.4k|  return 0;
 1711|  18.6k|}
xmltok.c:big2_updatePosition:
 1779|  3.13k|                       POSITION *pos) {
 1780|  3.63M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  3.63M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  3.63M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  3.63M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   249k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 249k, False: 3.38M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1782|      0|#  define LEAD_CASE(n)                                                         \
 1783|      0|  case BT_LEAD##n:                                                             \
 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1785|      0|    pos->columnNumber++;                                                       \
 1786|      0|    break;
 1787|      0|      LEAD_CASE(2)
  ------------------
  |  | 1783|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 0, False: 3.63M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1788|      0|      LEAD_CASE(3)
  ------------------
  |  | 1783|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 0, False: 3.63M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1789|   139k|      LEAD_CASE(4)
  ------------------
  |  | 1783|   139k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 139k, False: 3.49M]
  |  |  ------------------
  |  | 1784|   139k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|   139k|    pos->columnNumber++;                                                       \
  |  | 1786|   139k|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|  8.12k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 8.12k, False: 3.62M]
  ------------------
 1792|  8.12k|      pos->columnNumber = 0;
 1793|  8.12k|      pos->lineNumber++;
 1794|  8.12k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  8.12k|#  define MINBPC(enc) 2
  ------------------
 1795|  8.12k|      break;
 1796|  22.9k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 22.9k, False: 3.61M]
  ------------------
 1797|  22.9k|      pos->lineNumber++;
 1798|  22.9k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  22.9k|#  define MINBPC(enc) 2
  ------------------
 1799|  22.9k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|  22.9k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  45.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  22.9k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 22.8k, False: 30]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  22.8k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  22.8k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  14.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 14.1k, False: 8.73k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 2.48k, False: 20.3k]
  ------------------
 1800|  2.48k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.48k|#  define MINBPC(enc) 2
  ------------------
 1801|  22.9k|      pos->columnNumber = 0;
 1802|  22.9k|      break;
 1803|  3.46M|    default:
  ------------------
  |  Branch (1803:5): [True: 3.46M, False: 170k]
  ------------------
 1804|  3.46M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.46M|#  define MINBPC(enc) 2
  ------------------
 1805|  3.46M|      pos->columnNumber++;
 1806|  3.46M|      break;
 1807|  3.63M|    }
 1808|  3.63M|  }
 1809|  3.13k|}
xmltok.c:big2_isPublicId:
 1450|  1.26k|                   const char **badPtr) {
 1451|  1.26k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.26k|#  define MINBPC(enc) 2
  ------------------
 1452|  1.26k|  end -= MINBPC(enc);
  ------------------
  |  |  916|  1.26k|#  define MINBPC(enc) 2
  ------------------
 1453|  21.1k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  21.1k|#  define MINBPC(enc) 2
  ------------------
 1454|  21.1k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  21.1k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  21.1k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  21.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 21.1k, False: 38]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1455|    645|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 645, False: 20.5k]
  ------------------
 1456|  2.40k|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 1.76k, False: 19.4k]
  ------------------
 1457|  2.68k|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 281, False: 20.9k]
  ------------------
 1458|  3.73k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 1.04k, False: 20.1k]
  ------------------
 1459|  4.84k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 1.11k, False: 20.0k]
  ------------------
 1460|  5.51k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 671, False: 20.5k]
  ------------------
 1461|  6.09k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 578, False: 20.6k]
  ------------------
 1462|  6.43k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 338, False: 20.8k]
  ------------------
 1463|  7.00k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 570, False: 20.6k]
  ------------------
 1464|  10.3k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 3.30k, False: 17.8k]
  ------------------
 1465|  10.5k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 283, False: 20.9k]
  ------------------
 1466|  11.3k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 746, False: 20.4k]
  ------------------
 1467|  12.4k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 1.14k, False: 20.0k]
  ------------------
 1468|  12.8k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 349, False: 20.8k]
  ------------------
 1469|  13.2k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 424, False: 20.7k]
  ------------------
 1470|  13.6k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 390, False: 20.8k]
  ------------------
 1471|  13.9k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 331, False: 20.8k]
  ------------------
 1472|  14.9k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 1.00k, False: 20.1k]
  ------------------
 1473|  14.9k|#  ifdef XML_NS
 1474|  14.9k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 21.1k]
  ------------------
 1475|  14.9k|#  endif
 1476|  14.9k|      break;
 1477|  2.59k|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 2.59k, False: 18.5k]
  ------------------
 1478|  2.59k|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  920|  2.59k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.59k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.59k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 2.59k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1479|      1|        *badPtr = ptr;
 1480|      1|        return 0;
 1481|      1|      }
 1482|  2.59k|      break;
 1483|  2.59k|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 394, False: 20.8k]
  ------------------
 1484|  2.36k|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 1.96k, False: 19.2k]
  ------------------
 1485|  2.36k|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  919|  2.36k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  2.36k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 2.36k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1485:11): [True: 2.34k, False: 13]
  ------------------
 1486|  2.34k|        break;
 1487|       |      /* fall through */
 1488|  1.26k|    default:
  ------------------
  |  Branch (1488:5): [True: 1.25k, False: 19.9k]
  ------------------
 1489|  1.26k|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  1.26k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  1.26k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.23k, False: 38]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1490|    446|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 446, False: 823]
  ------------------
 1491|  1.21k|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 771, False: 498]
  ------------------
 1492|  1.21k|        break;
 1493|     52|      default:
  ------------------
  |  Branch (1493:7): [True: 52, False: 1.21k]
  ------------------
 1494|     52|        *badPtr = ptr;
 1495|     52|        return 0;
 1496|  1.26k|      }
 1497|  1.21k|      break;
 1498|  21.1k|    }
 1499|  21.1k|  }
 1500|  1.21k|  return 1;
 1501|  1.26k|}

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

