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

xml_parsebuffer_fuzzer.c:sip_tokey:
  148|  19.7k|sip_tokey(struct sipkey *key, const void *src) {
  149|  19.7k|  key->k[0] = SIP_U8TO64_LE((const unsigned char *)src);
  ------------------
  |  |  124|  19.7k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  19.7k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  19.7k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  19.7k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  150|  19.7k|  key->k[1] = SIP_U8TO64_LE((const unsigned char *)src + 8);
  ------------------
  |  |  124|  19.7k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  19.7k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  19.7k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  19.7k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  151|  19.7k|  return key;
  152|  19.7k|} /* sip_tokey() */
xml_parsebuffer_fuzzer.c:siphash24:
  271|  19.7k|siphash24(const void *src, size_t len, const struct sipkey *key) {
  272|  19.7k|  struct siphash state = SIPHASH_INITIALIZER;
  ------------------
  |  |  130|  19.7k|  { 0, 0, 0, 0, {0}, 0, 0 }
  ------------------
  273|  19.7k|  return sip24_final(sip24_update(sip24_init(&state, key), src, len));
  274|  19.7k|} /* siphash24() */
xml_parsebuffer_fuzzer.c:sip24_final:
  231|  19.7k|sip24_final(struct siphash *H) {
  232|  19.7k|  const char left = (char)(H->p - H->buf);
  233|  19.7k|  uint64_t b = (H->c + left) << 56;
  234|       |
  235|  19.7k|  switch (left) {
  ------------------
  |  Branch (235:11): [True: 0, False: 19.7k]
  ------------------
  236|  1.22k|  case 7:
  ------------------
  |  Branch (236:3): [True: 1.22k, False: 18.5k]
  ------------------
  237|  1.22k|    b |= (uint64_t)H->buf[6] << 48;
  238|       |    /* fall through */
  239|  5.19k|  case 6:
  ------------------
  |  Branch (239:3): [True: 3.96k, False: 15.8k]
  ------------------
  240|  5.19k|    b |= (uint64_t)H->buf[5] << 40;
  241|       |    /* fall through */
  242|  6.27k|  case 5:
  ------------------
  |  Branch (242:3): [True: 1.08k, False: 18.7k]
  ------------------
  243|  6.27k|    b |= (uint64_t)H->buf[4] << 32;
  244|       |    /* fall through */
  245|  10.1k|  case 4:
  ------------------
  |  Branch (245:3): [True: 3.87k, False: 15.9k]
  ------------------
  246|  10.1k|    b |= (uint64_t)H->buf[3] << 24;
  247|       |    /* fall through */
  248|  11.3k|  case 3:
  ------------------
  |  Branch (248:3): [True: 1.18k, False: 18.6k]
  ------------------
  249|  11.3k|    b |= (uint64_t)H->buf[2] << 16;
  250|       |    /* fall through */
  251|  14.8k|  case 2:
  ------------------
  |  Branch (251:3): [True: 3.47k, False: 16.3k]
  ------------------
  252|  14.8k|    b |= (uint64_t)H->buf[1] << 8;
  253|       |    /* fall through */
  254|  16.0k|  case 1:
  ------------------
  |  Branch (254:3): [True: 1.24k, False: 18.5k]
  ------------------
  255|  16.0k|    b |= (uint64_t)H->buf[0] << 0;
  256|       |    /* fall through */
  257|  19.7k|  case 0:
  ------------------
  |  Branch (257:3): [True: 3.73k, False: 16.0k]
  ------------------
  258|  19.7k|    break;
  259|  19.7k|  }
  260|       |
  261|  19.7k|  H->v3 ^= b;
  262|  19.7k|  sip_round(H, 2);
  263|  19.7k|  H->v0 ^= b;
  264|  19.7k|  H->v2 ^= 0xff;
  265|  19.7k|  sip_round(H, 4);
  266|       |
  267|  19.7k|  return H->v0 ^ H->v1 ^ H->v2 ^ H->v3;
  268|  19.7k|} /* sip24_final() */
xml_parsebuffer_fuzzer.c:sip_round:
  167|  42.8M|sip_round(struct siphash *H, const int rounds) {
  168|  42.8M|  int i;
  169|       |
  170|   128M|  for (i = 0; i < rounds; i++) {
  ------------------
  |  Branch (170:15): [True: 85.7M, False: 42.8M]
  ------------------
  171|  85.7M|    H->v0 += H->v1;
  172|  85.7M|    H->v1 = SIP_ROTL(H->v1, 13);
  ------------------
  |  |  111|  85.7M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  173|  85.7M|    H->v1 ^= H->v0;
  174|  85.7M|    H->v0 = SIP_ROTL(H->v0, 32);
  ------------------
  |  |  111|  85.7M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  175|       |
  176|  85.7M|    H->v2 += H->v3;
  177|  85.7M|    H->v3 = SIP_ROTL(H->v3, 16);
  ------------------
  |  |  111|  85.7M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  178|  85.7M|    H->v3 ^= H->v2;
  179|       |
  180|  85.7M|    H->v0 += H->v3;
  181|  85.7M|    H->v3 = SIP_ROTL(H->v3, 21);
  ------------------
  |  |  111|  85.7M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  182|  85.7M|    H->v3 ^= H->v0;
  183|       |
  184|  85.7M|    H->v2 += H->v1;
  185|  85.7M|    H->v1 = SIP_ROTL(H->v1, 17);
  ------------------
  |  |  111|  85.7M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  186|  85.7M|    H->v1 ^= H->v2;
  187|  85.7M|    H->v2 = SIP_ROTL(H->v2, 32);
  ------------------
  |  |  111|  85.7M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  188|  85.7M|  }
  189|  42.8M|} /* sip_round() */
xml_parsebuffer_fuzzer.c:sip24_update:
  207|  19.7k|sip24_update(struct siphash *H, const void *src, size_t len) {
  208|  19.7k|  const unsigned char *p = (const unsigned char *)src, *pe = p + len;
  209|  19.7k|  uint64_t m;
  210|       |
  211|  42.8M|  do {
  212|   385M|    while (p < pe && H->p < sip_endof(H->buf))
  ------------------
  |  |  204|   385M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (212:12): [True: 385M, False: 19.7k]
  |  Branch (212:22): [True: 342M, False: 42.7M]
  ------------------
  213|   342M|      *H->p++ = *p++;
  214|       |
  215|  42.8M|    if (H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  42.8M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (215:9): [True: 16.0k, False: 42.7M]
  ------------------
  216|  16.0k|      break;
  217|       |
  218|  42.7M|    m = SIP_U8TO64_LE(H->buf);
  ------------------
  |  |  124|  42.7M|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  42.7M|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  42.7M|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  42.7M|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  219|  42.7M|    H->v3 ^= m;
  220|  42.7M|    sip_round(H, 2);
  221|  42.7M|    H->v0 ^= m;
  222|       |
  223|  42.7M|    H->p = H->buf;
  224|  42.7M|    H->c += 8;
  225|  42.7M|  } while (p < pe);
  ------------------
  |  Branch (225:12): [True: 42.7M, False: 3.73k]
  ------------------
  226|       |
  227|      0|  return H;
  228|  19.7k|} /* sip24_update() */
xml_parsebuffer_fuzzer.c:sip24_init:
  192|  19.7k|sip24_init(struct siphash *H, const struct sipkey *key) {
  193|  19.7k|  H->v0 = SIP_ULL(0x736f6d65U, 0x70736575U) ^ key->k[0];
  ------------------
  |  |  109|  19.7k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  194|  19.7k|  H->v1 = SIP_ULL(0x646f7261U, 0x6e646f6dU) ^ key->k[1];
  ------------------
  |  |  109|  19.7k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  195|  19.7k|  H->v2 = SIP_ULL(0x6c796765U, 0x6e657261U) ^ key->k[0];
  ------------------
  |  |  109|  19.7k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  196|  19.7k|  H->v3 = SIP_ULL(0x74656462U, 0x79746573U) ^ key->k[1];
  ------------------
  |  |  109|  19.7k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  197|       |
  198|  19.7k|  H->p = H->buf;
  199|  19.7k|  H->c = 0;
  200|       |
  201|  19.7k|  return H;
  202|  19.7k|} /* sip24_init() */
xmlparse.c:sip24_init:
  192|  3.19M|sip24_init(struct siphash *H, const struct sipkey *key) {
  193|  3.19M|  H->v0 = SIP_ULL(0x736f6d65U, 0x70736575U) ^ key->k[0];
  ------------------
  |  |  109|  3.19M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  194|  3.19M|  H->v1 = SIP_ULL(0x646f7261U, 0x6e646f6dU) ^ key->k[1];
  ------------------
  |  |  109|  3.19M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  195|  3.19M|  H->v2 = SIP_ULL(0x6c796765U, 0x6e657261U) ^ key->k[0];
  ------------------
  |  |  109|  3.19M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  196|  3.19M|  H->v3 = SIP_ULL(0x74656462U, 0x79746573U) ^ key->k[1];
  ------------------
  |  |  109|  3.19M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  197|       |
  198|  3.19M|  H->p = H->buf;
  199|  3.19M|  H->c = 0;
  200|       |
  201|  3.19M|  return H;
  202|  3.19M|} /* sip24_init() */
xmlparse.c:sip24_update:
  207|  3.19M|sip24_update(struct siphash *H, const void *src, size_t len) {
  208|  3.19M|  const unsigned char *p = (const unsigned char *)src, *pe = p + len;
  209|  3.19M|  uint64_t m;
  210|       |
  211|  4.11M|  do {
  212|  14.9M|    while (p < pe && H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  11.7M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (212:12): [True: 11.7M, False: 3.19M]
  |  Branch (212:22): [True: 10.8M, False: 919k]
  ------------------
  213|  10.8M|      *H->p++ = *p++;
  214|       |
  215|  4.11M|    if (H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  4.11M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (215:9): [True: 3.18M, False: 930k]
  ------------------
  216|  3.18M|      break;
  217|       |
  218|   930k|    m = SIP_U8TO64_LE(H->buf);
  ------------------
  |  |  124|   930k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|   930k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|   930k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|   930k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  219|   930k|    H->v3 ^= m;
  220|   930k|    sip_round(H, 2);
  221|   930k|    H->v0 ^= m;
  222|       |
  223|   930k|    H->p = H->buf;
  224|   930k|    H->c += 8;
  225|   930k|  } while (p < pe);
  ------------------
  |  Branch (225:12): [True: 919k, False: 11.2k]
  ------------------
  226|       |
  227|      0|  return H;
  228|  3.19M|} /* sip24_update() */
xmlparse.c:sip_round:
  167|  7.31M|sip_round(struct siphash *H, const int rounds) {
  168|  7.31M|  int i;
  169|       |
  170|  28.3M|  for (i = 0; i < rounds; i++) {
  ------------------
  |  Branch (170:15): [True: 21.0M, False: 7.31M]
  ------------------
  171|  21.0M|    H->v0 += H->v1;
  172|  21.0M|    H->v1 = SIP_ROTL(H->v1, 13);
  ------------------
  |  |  111|  21.0M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  173|  21.0M|    H->v1 ^= H->v0;
  174|  21.0M|    H->v0 = SIP_ROTL(H->v0, 32);
  ------------------
  |  |  111|  21.0M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  175|       |
  176|  21.0M|    H->v2 += H->v3;
  177|  21.0M|    H->v3 = SIP_ROTL(H->v3, 16);
  ------------------
  |  |  111|  21.0M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  178|  21.0M|    H->v3 ^= H->v2;
  179|       |
  180|  21.0M|    H->v0 += H->v3;
  181|  21.0M|    H->v3 = SIP_ROTL(H->v3, 21);
  ------------------
  |  |  111|  21.0M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  182|  21.0M|    H->v3 ^= H->v0;
  183|       |
  184|  21.0M|    H->v2 += H->v1;
  185|  21.0M|    H->v1 = SIP_ROTL(H->v1, 17);
  ------------------
  |  |  111|  21.0M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  186|  21.0M|    H->v1 ^= H->v2;
  187|  21.0M|    H->v2 = SIP_ROTL(H->v2, 32);
  ------------------
  |  |  111|  21.0M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  188|  21.0M|  }
  189|  7.31M|} /* sip_round() */
xmlparse.c:sip24_final:
  231|  3.19M|sip24_final(struct siphash *H) {
  232|  3.19M|  const char left = (char)(H->p - H->buf);
  233|  3.19M|  uint64_t b = (H->c + left) << 56;
  234|       |
  235|  3.19M|  switch (left) {
  ------------------
  |  Branch (235:11): [True: 0, False: 3.19M]
  ------------------
  236|  5.46k|  case 7:
  ------------------
  |  Branch (236:3): [True: 5.46k, False: 3.18M]
  ------------------
  237|  5.46k|    b |= (uint64_t)H->buf[6] << 48;
  238|       |    /* fall through */
  239|  12.3k|  case 6:
  ------------------
  |  Branch (239:3): [True: 6.88k, False: 3.18M]
  ------------------
  240|  12.3k|    b |= (uint64_t)H->buf[5] << 40;
  241|       |    /* fall through */
  242|  18.1k|  case 5:
  ------------------
  |  Branch (242:3): [True: 5.77k, False: 3.18M]
  ------------------
  243|  18.1k|    b |= (uint64_t)H->buf[4] << 32;
  244|       |    /* fall through */
  245|  28.2k|  case 4:
  ------------------
  |  Branch (245:3): [True: 10.1k, False: 3.18M]
  ------------------
  246|  28.2k|    b |= (uint64_t)H->buf[3] << 24;
  247|       |    /* fall through */
  248|  43.7k|  case 3:
  ------------------
  |  Branch (248:3): [True: 15.5k, False: 3.17M]
  ------------------
  249|  43.7k|    b |= (uint64_t)H->buf[2] << 16;
  250|       |    /* fall through */
  251|  89.3k|  case 2:
  ------------------
  |  Branch (251:3): [True: 45.5k, False: 3.14M]
  ------------------
  252|  89.3k|    b |= (uint64_t)H->buf[1] << 8;
  253|       |    /* fall through */
  254|  3.18M|  case 1:
  ------------------
  |  Branch (254:3): [True: 3.09M, False: 101k]
  ------------------
  255|  3.18M|    b |= (uint64_t)H->buf[0] << 0;
  256|       |    /* fall through */
  257|  3.19M|  case 0:
  ------------------
  |  Branch (257:3): [True: 11.8k, False: 3.18M]
  ------------------
  258|  3.19M|    break;
  259|  3.19M|  }
  260|       |
  261|  3.19M|  H->v3 ^= b;
  262|  3.19M|  sip_round(H, 2);
  263|  3.19M|  H->v0 ^= b;
  264|  3.19M|  H->v2 ^= 0xff;
  265|  3.19M|  sip_round(H, 4);
  266|       |
  267|  3.19M|  return H->v0 ^ H->v1 ^ H->v2 ^ H->v3;
  268|  3.19M|} /* sip24_final() */

XML_ParserCreate:
  718|  19.7k|XML_ParserCreate(const XML_Char *encodingName) {
  719|  19.7k|  return XML_ParserCreate_MM(encodingName, NULL, NULL);
  720|  19.7k|}
XML_ParserCreate_MM:
  969|  19.7k|                    const XML_Char *nameSep) {
  970|  19.7k|  return parserCreate(encodingName, memsuite, nameSep, NULL);
  971|  19.7k|}
XML_ParserFree:
 1440|  19.7k|XML_ParserFree(XML_Parser parser) {
 1441|  19.7k|  TAG *tagList;
 1442|  19.7k|  OPEN_INTERNAL_ENTITY *entityList;
 1443|  19.7k|  if (parser == NULL)
  ------------------
  |  Branch (1443:7): [True: 0, False: 19.7k]
  ------------------
 1444|      0|    return;
 1445|       |  /* free m_tagStack and m_freeTagList */
 1446|  19.7k|  tagList = parser->m_tagStack;
 1447|  2.23M|  for (;;) {
 1448|  2.23M|    TAG *p;
 1449|  2.23M|    if (tagList == NULL) {
  ------------------
  |  Branch (1449:9): [True: 20.0k, False: 2.21M]
  ------------------
 1450|  20.0k|      if (parser->m_freeTagList == NULL)
  ------------------
  |  Branch (1450:11): [True: 19.7k, False: 218]
  ------------------
 1451|  19.7k|        break;
 1452|    218|      tagList = parser->m_freeTagList;
 1453|    218|      parser->m_freeTagList = NULL;
 1454|    218|    }
 1455|  2.21M|    p = tagList;
 1456|  2.21M|    tagList = tagList->parent;
 1457|  2.21M|    FREE(parser, p->buf);
  ------------------
  |  |  715|  2.21M|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1458|  2.21M|    destroyBindings(p->bindings, parser);
 1459|  2.21M|    FREE(parser, p);
  ------------------
  |  |  715|  2.21M|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1460|  2.21M|  }
 1461|       |  /* free m_openInternalEntities and m_freeInternalEntities */
 1462|  19.7k|  entityList = parser->m_openInternalEntities;
 1463|  21.5k|  for (;;) {
 1464|  21.5k|    OPEN_INTERNAL_ENTITY *openEntity;
 1465|  21.5k|    if (entityList == NULL) {
  ------------------
  |  Branch (1465:9): [True: 20.4k, False: 1.08k]
  ------------------
 1466|  20.4k|      if (parser->m_freeInternalEntities == NULL)
  ------------------
  |  Branch (1466:11): [True: 19.7k, False: 637]
  ------------------
 1467|  19.7k|        break;
 1468|    637|      entityList = parser->m_freeInternalEntities;
 1469|    637|      parser->m_freeInternalEntities = NULL;
 1470|    637|    }
 1471|  1.71k|    openEntity = entityList;
 1472|  1.71k|    entityList = entityList->next;
 1473|  1.71k|    FREE(parser, openEntity);
  ------------------
  |  |  715|  1.71k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1474|  1.71k|  }
 1475|       |
 1476|  19.7k|  destroyBindings(parser->m_freeBindingList, parser);
 1477|  19.7k|  destroyBindings(parser->m_inheritedBindings, parser);
 1478|  19.7k|  poolDestroy(&parser->m_tempPool);
 1479|  19.7k|  poolDestroy(&parser->m_temp2Pool);
 1480|  19.7k|  FREE(parser, (void *)parser->m_protocolEncodingName);
  ------------------
  |  |  715|  19.7k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1481|  19.7k|#ifdef XML_DTD
 1482|       |  /* external parameter entity parsers share the DTD structure
 1483|       |     parser->m_dtd with the root parser, so we must not destroy it
 1484|       |  */
 1485|  19.7k|  if (! parser->m_isParamEntity && parser->m_dtd)
  ------------------
  |  Branch (1485:7): [True: 19.7k, False: 0]
  |  Branch (1485:36): [True: 19.7k, False: 0]
  ------------------
 1486|       |#else
 1487|       |  if (parser->m_dtd)
 1488|       |#endif /* XML_DTD */
 1489|  19.7k|    dtdDestroy(parser->m_dtd, (XML_Bool)! parser->m_parentParser,
 1490|  19.7k|               &parser->m_mem);
 1491|  19.7k|  FREE(parser, (void *)parser->m_atts);
  ------------------
  |  |  715|  19.7k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1492|       |#ifdef XML_ATTR_INFO
 1493|       |  FREE(parser, (void *)parser->m_attInfo);
 1494|       |#endif
 1495|  19.7k|  FREE(parser, parser->m_groupConnector);
  ------------------
  |  |  715|  19.7k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1496|  19.7k|  FREE(parser, parser->m_buffer);
  ------------------
  |  |  715|  19.7k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1497|  19.7k|  FREE(parser, parser->m_dataBuf);
  ------------------
  |  |  715|  19.7k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1498|  19.7k|  FREE(parser, parser->m_nsAtts);
  ------------------
  |  |  715|  19.7k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1499|  19.7k|  FREE(parser, parser->m_unknownEncodingMem);
  ------------------
  |  |  715|  19.7k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1500|  19.7k|  if (parser->m_unknownEncodingRelease)
  ------------------
  |  Branch (1500:7): [True: 0, False: 19.7k]
  ------------------
 1501|      0|    parser->m_unknownEncodingRelease(parser->m_unknownEncodingData);
 1502|  19.7k|  FREE(parser, parser);
  ------------------
  |  |  715|  19.7k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1503|  19.7k|}
XML_SetElementHandler:
 1595|  19.7k|                      XML_EndElementHandler end) {
 1596|  19.7k|  if (parser == NULL)
  ------------------
  |  Branch (1596:7): [True: 0, False: 19.7k]
  ------------------
 1597|      0|    return;
 1598|  19.7k|  parser->m_startElementHandler = start;
 1599|  19.7k|  parser->m_endElementHandler = end;
 1600|  19.7k|}
XML_SetHashSalt:
 1815|  19.7k|XML_SetHashSalt(XML_Parser parser, unsigned long hash_salt) {
 1816|  19.7k|  if (parser == NULL)
  ------------------
  |  Branch (1816:7): [True: 0, False: 19.7k]
  ------------------
 1817|      0|    return 0;
 1818|  19.7k|  if (parser->m_parentParser)
  ------------------
  |  Branch (1818:7): [True: 0, False: 19.7k]
  ------------------
 1819|      0|    return XML_SetHashSalt(parser->m_parentParser, hash_salt);
 1820|       |  /* block after XML_Parse()/XML_ParseBuffer() has been called */
 1821|  19.7k|  if (parser->m_parsingStatus.parsing == XML_PARSING
  ------------------
  |  Branch (1821:7): [True: 0, False: 19.7k]
  ------------------
 1822|  19.7k|      || parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (1822:10): [True: 0, False: 19.7k]
  ------------------
 1823|      0|    return 0;
 1824|  19.7k|  parser->m_hash_secret_salt = hash_salt;
 1825|  19.7k|  return 1;
 1826|  19.7k|}
XML_ParseBuffer:
 1983|  19.7k|XML_ParseBuffer(XML_Parser parser, int len, int isFinal) {
 1984|  19.7k|  const char *start;
 1985|  19.7k|  enum XML_Status result = XML_STATUS_OK;
  ------------------
  |  |   75|  19.7k|#define XML_STATUS_OK XML_STATUS_OK
  ------------------
 1986|       |
 1987|  19.7k|  if (parser == NULL)
  ------------------
  |  Branch (1987:7): [True: 0, False: 19.7k]
  ------------------
 1988|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1989|  19.7k|  switch (parser->m_parsingStatus.parsing) {
 1990|      0|  case XML_SUSPENDED:
  ------------------
  |  Branch (1990:3): [True: 0, False: 19.7k]
  ------------------
 1991|      0|    parser->m_errorCode = XML_ERROR_SUSPENDED;
 1992|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1993|      0|  case XML_FINISHED:
  ------------------
  |  Branch (1993:3): [True: 0, False: 19.7k]
  ------------------
 1994|      0|    parser->m_errorCode = XML_ERROR_FINISHED;
 1995|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1996|  19.7k|  case XML_INITIALIZED:
  ------------------
  |  Branch (1996:3): [True: 19.7k, False: 0]
  ------------------
 1997|       |    /* Has someone called XML_GetBuffer successfully before? */
 1998|  19.7k|    if (! parser->m_bufferPtr) {
  ------------------
  |  Branch (1998:9): [True: 0, False: 19.7k]
  ------------------
 1999|      0|      parser->m_errorCode = XML_ERROR_NO_BUFFER;
 2000|      0|      return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2001|      0|    }
 2002|       |
 2003|  19.7k|    if (parser->m_parentParser == NULL && ! startParsing(parser)) {
  ------------------
  |  Branch (2003:9): [True: 19.7k, False: 0]
  |  Branch (2003:43): [True: 0, False: 19.7k]
  ------------------
 2004|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2005|      0|      return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2006|      0|    }
 2007|       |    /* fall through */
 2008|  19.7k|  default:
  ------------------
  |  Branch (2008:3): [True: 0, False: 19.7k]
  ------------------
 2009|  19.7k|    parser->m_parsingStatus.parsing = XML_PARSING;
 2010|  19.7k|  }
 2011|       |
 2012|  19.7k|  start = parser->m_bufferPtr;
 2013|  19.7k|  parser->m_positionPtr = start;
 2014|  19.7k|  parser->m_bufferEnd += len;
 2015|  19.7k|  parser->m_parseEndPtr = parser->m_bufferEnd;
 2016|  19.7k|  parser->m_parseEndByteIndex += len;
 2017|  19.7k|  parser->m_parsingStatus.finalBuffer = (XML_Bool)isFinal;
 2018|       |
 2019|  19.7k|  parser->m_errorCode = parser->m_processor(
 2020|  19.7k|      parser, start, parser->m_parseEndPtr, &parser->m_bufferPtr);
 2021|       |
 2022|  19.7k|  if (parser->m_errorCode != XML_ERROR_NONE) {
  ------------------
  |  Branch (2022:7): [True: 8.00k, False: 11.7k]
  ------------------
 2023|  8.00k|    parser->m_eventEndPtr = parser->m_eventPtr;
 2024|  8.00k|    parser->m_processor = errorProcessor;
 2025|  8.00k|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|  8.00k|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2026|  11.7k|  } else {
 2027|  11.7k|    switch (parser->m_parsingStatus.parsing) {
 2028|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (2028:5): [True: 0, False: 11.7k]
  ------------------
 2029|      0|      result = XML_STATUS_SUSPENDED;
  ------------------
  |  |   77|      0|#define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED
  ------------------
 2030|      0|      break;
 2031|      0|    case XML_INITIALIZED:
  ------------------
  |  Branch (2031:5): [True: 0, False: 11.7k]
  ------------------
 2032|  11.7k|    case XML_PARSING:
  ------------------
  |  Branch (2032:5): [True: 11.7k, False: 0]
  ------------------
 2033|  11.7k|      if (isFinal) {
  ------------------
  |  Branch (2033:11): [True: 0, False: 11.7k]
  ------------------
 2034|      0|        parser->m_parsingStatus.parsing = XML_FINISHED;
 2035|      0|        return result;
 2036|      0|      }
 2037|  11.7k|    default:; /* should not happen */
  ------------------
  |  Branch (2037:5): [True: 0, False: 11.7k]
  ------------------
 2038|  11.7k|    }
 2039|  11.7k|  }
 2040|       |
 2041|  11.7k|  XmlUpdatePosition(parser->m_encoding, parser->m_positionPtr,
  ------------------
  |  |  270|  11.7k|  (((enc)->updatePosition)(enc, ptr, end, pos))
  ------------------
 2042|  11.7k|                    parser->m_bufferPtr, &parser->m_position);
 2043|  11.7k|  parser->m_positionPtr = parser->m_bufferPtr;
 2044|  11.7k|  return result;
 2045|  19.7k|}
XML_GetBuffer:
 2048|  19.7k|XML_GetBuffer(XML_Parser parser, int len) {
 2049|  19.7k|  if (parser == NULL)
  ------------------
  |  Branch (2049:7): [True: 0, False: 19.7k]
  ------------------
 2050|      0|    return NULL;
 2051|  19.7k|  if (len < 0) {
  ------------------
  |  Branch (2051:7): [True: 0, False: 19.7k]
  ------------------
 2052|      0|    parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2053|      0|    return NULL;
 2054|      0|  }
 2055|  19.7k|  switch (parser->m_parsingStatus.parsing) {
 2056|      0|  case XML_SUSPENDED:
  ------------------
  |  Branch (2056:3): [True: 0, False: 19.7k]
  ------------------
 2057|      0|    parser->m_errorCode = XML_ERROR_SUSPENDED;
 2058|      0|    return NULL;
 2059|      0|  case XML_FINISHED:
  ------------------
  |  Branch (2059:3): [True: 0, False: 19.7k]
  ------------------
 2060|      0|    parser->m_errorCode = XML_ERROR_FINISHED;
 2061|      0|    return NULL;
 2062|  19.7k|  default:;
  ------------------
  |  Branch (2062:3): [True: 19.7k, False: 0]
  ------------------
 2063|  19.7k|  }
 2064|       |
 2065|  19.7k|  if (len > EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_bufferEnd)) {
  ------------------
  |  |  199|  19.7k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 19.7k]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2065:7): [True: 19.7k, False: 0]
  ------------------
 2066|  19.7k|#ifdef XML_CONTEXT_BYTES
 2067|  19.7k|    int keep;
 2068|  19.7k|#endif /* defined XML_CONTEXT_BYTES */
 2069|       |    /* Do not invoke signed arithmetic overflow: */
 2070|  19.7k|    int neededSize = (int)((unsigned)len
 2071|  19.7k|                           + (unsigned)EXPAT_SAFE_PTR_DIFF(
  ------------------
  |  |  199|  19.7k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 19.7k]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2072|  19.7k|                               parser->m_bufferEnd, parser->m_bufferPtr));
 2073|  19.7k|    if (neededSize < 0) {
  ------------------
  |  Branch (2073:9): [True: 0, False: 19.7k]
  ------------------
 2074|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2075|      0|      return NULL;
 2076|      0|    }
 2077|  19.7k|#ifdef XML_CONTEXT_BYTES
 2078|  19.7k|    keep = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer);
  ------------------
  |  |  199|  19.7k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 19.7k]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2079|  19.7k|    if (keep > XML_CONTEXT_BYTES)
  ------------------
  |  |   96|  19.7k|#define XML_CONTEXT_BYTES 1024
  ------------------
  |  Branch (2079:9): [True: 0, False: 19.7k]
  ------------------
 2080|      0|      keep = XML_CONTEXT_BYTES;
  ------------------
  |  |   96|      0|#define XML_CONTEXT_BYTES 1024
  ------------------
 2081|       |    /* Detect and prevent integer overflow */
 2082|  19.7k|    if (keep > INT_MAX - neededSize) {
  ------------------
  |  Branch (2082:9): [True: 0, False: 19.7k]
  ------------------
 2083|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2084|      0|      return NULL;
 2085|      0|    }
 2086|  19.7k|    neededSize += keep;
 2087|  19.7k|#endif /* defined XML_CONTEXT_BYTES */
 2088|  19.7k|    if (neededSize
  ------------------
  |  Branch (2088:9): [True: 0, False: 19.7k]
  ------------------
 2089|  19.7k|        <= EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_buffer)) {
  ------------------
  |  |  199|  19.7k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 19.7k]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2090|      0|#ifdef XML_CONTEXT_BYTES
 2091|      0|      if (keep < EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer)) {
  ------------------
  |  |  199|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 0]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2091:11): [True: 0, False: 0]
  ------------------
 2092|      0|        int offset
 2093|      0|            = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer)
  ------------------
  |  |  199|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 0]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2094|      0|              - keep;
 2095|       |        /* The buffer pointers cannot be NULL here; we have at least some bytes
 2096|       |         * in the buffer */
 2097|      0|        memmove(parser->m_buffer, &parser->m_buffer[offset],
 2098|      0|                parser->m_bufferEnd - parser->m_bufferPtr + keep);
 2099|      0|        parser->m_bufferEnd -= offset;
 2100|      0|        parser->m_bufferPtr -= offset;
 2101|      0|      }
 2102|       |#else
 2103|       |      if (parser->m_buffer && parser->m_bufferPtr) {
 2104|       |        memmove(parser->m_buffer, parser->m_bufferPtr,
 2105|       |                EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr));
 2106|       |        parser->m_bufferEnd
 2107|       |            = parser->m_buffer
 2108|       |              + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr);
 2109|       |        parser->m_bufferPtr = parser->m_buffer;
 2110|       |      }
 2111|       |#endif /* not defined XML_CONTEXT_BYTES */
 2112|  19.7k|    } else {
 2113|  19.7k|      char *newBuf;
 2114|  19.7k|      int bufferSize
 2115|  19.7k|          = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_bufferPtr);
  ------------------
  |  |  199|  19.7k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 19.7k]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2116|  19.7k|      if (bufferSize == 0)
  ------------------
  |  Branch (2116:11): [True: 19.7k, False: 0]
  ------------------
 2117|  19.7k|        bufferSize = INIT_BUFFER_SIZE;
  ------------------
  |  |  246|  19.7k|#define INIT_BUFFER_SIZE 1024
  ------------------
 2118|  30.9k|      do {
 2119|       |        /* Do not invoke signed arithmetic overflow: */
 2120|  30.9k|        bufferSize = (int)(2U * (unsigned)bufferSize);
 2121|  30.9k|      } while (bufferSize < neededSize && bufferSize > 0);
  ------------------
  |  Branch (2121:16): [True: 11.1k, False: 19.7k]
  |  Branch (2121:43): [True: 11.1k, False: 0]
  ------------------
 2122|  19.7k|      if (bufferSize <= 0) {
  ------------------
  |  Branch (2122:11): [True: 0, False: 19.7k]
  ------------------
 2123|      0|        parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2124|      0|        return NULL;
 2125|      0|      }
 2126|  19.7k|      newBuf = (char *)MALLOC(parser, bufferSize);
  ------------------
  |  |  713|  19.7k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2127|  19.7k|      if (newBuf == 0) {
  ------------------
  |  Branch (2127:11): [True: 0, False: 19.7k]
  ------------------
 2128|      0|        parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2129|      0|        return NULL;
 2130|      0|      }
 2131|  19.7k|      parser->m_bufferLim = newBuf + bufferSize;
 2132|  19.7k|#ifdef XML_CONTEXT_BYTES
 2133|  19.7k|      if (parser->m_bufferPtr) {
  ------------------
  |  Branch (2133:11): [True: 0, False: 19.7k]
  ------------------
 2134|      0|        memcpy(newBuf, &parser->m_bufferPtr[-keep],
 2135|      0|               EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr)
  ------------------
  |  |  199|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 0]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2136|      0|                   + keep);
 2137|      0|        FREE(parser, parser->m_buffer);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 2138|      0|        parser->m_buffer = newBuf;
 2139|      0|        parser->m_bufferEnd
 2140|      0|            = parser->m_buffer
 2141|      0|              + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr)
  ------------------
  |  |  199|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 0]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2142|      0|              + keep;
 2143|      0|        parser->m_bufferPtr = parser->m_buffer + keep;
 2144|  19.7k|      } else {
 2145|       |        /* This must be a brand new buffer with no data in it yet */
 2146|  19.7k|        parser->m_bufferEnd = newBuf;
 2147|  19.7k|        parser->m_bufferPtr = parser->m_buffer = newBuf;
 2148|  19.7k|      }
 2149|       |#else
 2150|       |      if (parser->m_bufferPtr) {
 2151|       |        memcpy(newBuf, parser->m_bufferPtr,
 2152|       |               EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr));
 2153|       |        FREE(parser, parser->m_buffer);
 2154|       |        parser->m_bufferEnd
 2155|       |            = newBuf
 2156|       |              + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr);
 2157|       |      } else {
 2158|       |        /* This must be a brand new buffer with no data in it yet */
 2159|       |        parser->m_bufferEnd = newBuf;
 2160|       |      }
 2161|       |      parser->m_bufferPtr = parser->m_buffer = newBuf;
 2162|       |#endif /* not defined XML_CONTEXT_BYTES */
 2163|  19.7k|    }
 2164|  19.7k|    parser->m_eventPtr = parser->m_eventEndPtr = NULL;
 2165|  19.7k|    parser->m_positionPtr = NULL;
 2166|  19.7k|  }
 2167|  19.7k|  return parser->m_bufferEnd;
 2168|  19.7k|}
xmlparse.c:parserCreate:
  976|  19.7k|             DTD *dtd) {
  977|  19.7k|  XML_Parser parser;
  978|       |
  979|  19.7k|  if (memsuite) {
  ------------------
  |  Branch (979:7): [True: 0, False: 19.7k]
  ------------------
  980|      0|    XML_Memory_Handling_Suite *mtemp;
  981|      0|    parser = memsuite->malloc_fcn(sizeof(struct XML_ParserStruct));
  982|      0|    if (parser != NULL) {
  ------------------
  |  Branch (982:9): [True: 0, False: 0]
  ------------------
  983|      0|      mtemp = (XML_Memory_Handling_Suite *)&(parser->m_mem);
  984|      0|      mtemp->malloc_fcn = memsuite->malloc_fcn;
  985|      0|      mtemp->realloc_fcn = memsuite->realloc_fcn;
  986|      0|      mtemp->free_fcn = memsuite->free_fcn;
  987|      0|    }
  988|  19.7k|  } else {
  989|  19.7k|    XML_Memory_Handling_Suite *mtemp;
  990|  19.7k|    parser = (XML_Parser)malloc(sizeof(struct XML_ParserStruct));
  991|  19.7k|    if (parser != NULL) {
  ------------------
  |  Branch (991:9): [True: 19.7k, False: 0]
  ------------------
  992|  19.7k|      mtemp = (XML_Memory_Handling_Suite *)&(parser->m_mem);
  993|  19.7k|      mtemp->malloc_fcn = malloc;
  994|  19.7k|      mtemp->realloc_fcn = realloc;
  995|  19.7k|      mtemp->free_fcn = free;
  996|  19.7k|    }
  997|  19.7k|  }
  998|       |
  999|  19.7k|  if (! parser)
  ------------------
  |  Branch (999:7): [True: 0, False: 19.7k]
  ------------------
 1000|      0|    return parser;
 1001|       |
 1002|  19.7k|  parser->m_buffer = NULL;
 1003|  19.7k|  parser->m_bufferLim = NULL;
 1004|       |
 1005|  19.7k|  parser->m_attsSize = INIT_ATTS_SIZE;
  ------------------
  |  |  243|  19.7k|#define INIT_ATTS_SIZE 16
  ------------------
 1006|  19.7k|  parser->m_atts
 1007|  19.7k|      = (ATTRIBUTE *)MALLOC(parser, parser->m_attsSize * sizeof(ATTRIBUTE));
  ------------------
  |  |  713|  19.7k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 1008|  19.7k|  if (parser->m_atts == NULL) {
  ------------------
  |  Branch (1008:7): [True: 0, False: 19.7k]
  ------------------
 1009|      0|    FREE(parser, parser);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1010|      0|    return NULL;
 1011|      0|  }
 1012|       |#ifdef XML_ATTR_INFO
 1013|       |  parser->m_attInfo = (XML_AttrInfo *)MALLOC(
 1014|       |      parser, parser->m_attsSize * sizeof(XML_AttrInfo));
 1015|       |  if (parser->m_attInfo == NULL) {
 1016|       |    FREE(parser, parser->m_atts);
 1017|       |    FREE(parser, parser);
 1018|       |    return NULL;
 1019|       |  }
 1020|       |#endif
 1021|  19.7k|  parser->m_dataBuf
 1022|  19.7k|      = (XML_Char *)MALLOC(parser, INIT_DATA_BUF_SIZE * sizeof(XML_Char));
  ------------------
  |  |  713|  19.7k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 1023|  19.7k|  if (parser->m_dataBuf == NULL) {
  ------------------
  |  Branch (1023:7): [True: 0, False: 19.7k]
  ------------------
 1024|      0|    FREE(parser, parser->m_atts);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1025|       |#ifdef XML_ATTR_INFO
 1026|       |    FREE(parser, parser->m_attInfo);
 1027|       |#endif
 1028|      0|    FREE(parser, parser);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1029|      0|    return NULL;
 1030|      0|  }
 1031|  19.7k|  parser->m_dataBufEnd = parser->m_dataBuf + INIT_DATA_BUF_SIZE;
  ------------------
  |  |  242|  19.7k|#define INIT_DATA_BUF_SIZE 1024
  ------------------
 1032|       |
 1033|  19.7k|  if (dtd)
  ------------------
  |  Branch (1033:7): [True: 0, False: 19.7k]
  ------------------
 1034|      0|    parser->m_dtd = dtd;
 1035|  19.7k|  else {
 1036|  19.7k|    parser->m_dtd = dtdCreate(&parser->m_mem);
 1037|  19.7k|    if (parser->m_dtd == NULL) {
  ------------------
  |  Branch (1037:9): [True: 0, False: 19.7k]
  ------------------
 1038|      0|      FREE(parser, parser->m_dataBuf);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1039|      0|      FREE(parser, parser->m_atts);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1040|       |#ifdef XML_ATTR_INFO
 1041|       |      FREE(parser, parser->m_attInfo);
 1042|       |#endif
 1043|      0|      FREE(parser, parser);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1044|      0|      return NULL;
 1045|      0|    }
 1046|  19.7k|  }
 1047|       |
 1048|  19.7k|  parser->m_freeBindingList = NULL;
 1049|  19.7k|  parser->m_freeTagList = NULL;
 1050|  19.7k|  parser->m_freeInternalEntities = NULL;
 1051|       |
 1052|  19.7k|  parser->m_groupSize = 0;
 1053|  19.7k|  parser->m_groupConnector = NULL;
 1054|       |
 1055|  19.7k|  parser->m_unknownEncodingHandler = NULL;
 1056|  19.7k|  parser->m_unknownEncodingHandlerData = NULL;
 1057|       |
 1058|  19.7k|  parser->m_namespaceSeparator = ASCII_EXCL;
  ------------------
  |  |  103|  19.7k|#define ASCII_EXCL 0x21
  ------------------
 1059|  19.7k|  parser->m_ns = XML_FALSE;
  ------------------
  |  |   56|  19.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1060|  19.7k|  parser->m_ns_triplets = XML_FALSE;
  ------------------
  |  |   56|  19.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1061|       |
 1062|  19.7k|  parser->m_nsAtts = NULL;
 1063|  19.7k|  parser->m_nsAttsVersion = 0;
 1064|  19.7k|  parser->m_nsAttsPower = 0;
 1065|       |
 1066|  19.7k|  parser->m_protocolEncodingName = NULL;
 1067|       |
 1068|  19.7k|  poolInit(&parser->m_tempPool, &(parser->m_mem));
 1069|  19.7k|  poolInit(&parser->m_temp2Pool, &(parser->m_mem));
 1070|  19.7k|  parserInit(parser, encodingName);
 1071|       |
 1072|  19.7k|  if (encodingName && ! parser->m_protocolEncodingName) {
  ------------------
  |  Branch (1072:7): [True: 19.7k, False: 0]
  |  Branch (1072:23): [True: 0, False: 19.7k]
  ------------------
 1073|      0|    if (dtd) {
  ------------------
  |  Branch (1073:9): [True: 0, False: 0]
  ------------------
 1074|       |      // We need to stop the upcoming call to XML_ParserFree from happily
 1075|       |      // destroying parser->m_dtd because the DTD is shared with the parent
 1076|       |      // parser and the only guard that keeps XML_ParserFree from destroying
 1077|       |      // parser->m_dtd is parser->m_isParamEntity but it will be set to
 1078|       |      // XML_TRUE only later in XML_ExternalEntityParserCreate (or not at all).
 1079|      0|      parser->m_dtd = NULL;
 1080|      0|    }
 1081|      0|    XML_ParserFree(parser);
 1082|      0|    return NULL;
 1083|      0|  }
 1084|       |
 1085|  19.7k|  if (nameSep) {
  ------------------
  |  Branch (1085:7): [True: 0, False: 19.7k]
  ------------------
 1086|      0|    parser->m_ns = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 1087|      0|    parser->m_internalEncoding = XmlGetInternalEncodingNS();
  ------------------
  |  |  162|      0|#  define XmlGetInternalEncodingNS XmlGetUtf8InternalEncodingNS
  ------------------
 1088|      0|    parser->m_namespaceSeparator = *nameSep;
 1089|  19.7k|  } else {
 1090|  19.7k|    parser->m_internalEncoding = XmlGetInternalEncoding();
  ------------------
  |  |  161|  19.7k|#  define XmlGetInternalEncoding XmlGetUtf8InternalEncoding
  ------------------
 1091|  19.7k|  }
 1092|       |
 1093|  19.7k|  return parser;
 1094|  19.7k|}
xmlparse.c:dtdCreate:
 6715|  19.7k|dtdCreate(const XML_Memory_Handling_Suite *ms) {
 6716|  19.7k|  DTD *p = ms->malloc_fcn(sizeof(DTD));
 6717|  19.7k|  if (p == NULL)
  ------------------
  |  Branch (6717:7): [True: 0, False: 19.7k]
  ------------------
 6718|      0|    return p;
 6719|  19.7k|  poolInit(&(p->pool), ms);
 6720|  19.7k|  poolInit(&(p->entityValuePool), ms);
 6721|  19.7k|  hashTableInit(&(p->generalEntities), ms);
 6722|  19.7k|  hashTableInit(&(p->elementTypes), ms);
 6723|  19.7k|  hashTableInit(&(p->attributeIds), ms);
 6724|  19.7k|  hashTableInit(&(p->prefixes), ms);
 6725|  19.7k|#ifdef XML_DTD
 6726|  19.7k|  p->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|  19.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6727|  19.7k|  hashTableInit(&(p->paramEntities), ms);
 6728|  19.7k|#endif /* XML_DTD */
 6729|  19.7k|  p->defaultPrefix.name = NULL;
 6730|  19.7k|  p->defaultPrefix.binding = NULL;
 6731|       |
 6732|  19.7k|  p->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|  19.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6733|  19.7k|  p->scaffIndex = NULL;
 6734|  19.7k|  p->scaffold = NULL;
 6735|  19.7k|  p->scaffLevel = 0;
 6736|  19.7k|  p->scaffSize = 0;
 6737|  19.7k|  p->scaffCount = 0;
 6738|  19.7k|  p->contentStringLen = 0;
 6739|       |
 6740|  19.7k|  p->keepProcessing = XML_TRUE;
  ------------------
  |  |   55|  19.7k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6741|  19.7k|  p->hasParamEntityRefs = XML_FALSE;
  ------------------
  |  |   56|  19.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6742|  19.7k|  p->standalone = XML_FALSE;
  ------------------
  |  |   56|  19.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6743|  19.7k|  return p;
 6744|  19.7k|}
xmlparse.c:hashTableInit:
 7149|  98.9k|hashTableInit(HASH_TABLE *p, const XML_Memory_Handling_Suite *ms) {
 7150|  98.9k|  p->power = 0;
 7151|  98.9k|  p->size = 0;
 7152|  98.9k|  p->used = 0;
 7153|  98.9k|  p->v = NULL;
 7154|  98.9k|  p->mem = ms;
 7155|  98.9k|}
xmlparse.c:poolInit:
 7174|  79.1k|poolInit(STRING_POOL *pool, const XML_Memory_Handling_Suite *ms) {
 7175|  79.1k|  pool->blocks = NULL;
 7176|  79.1k|  pool->freeBlocks = NULL;
 7177|  79.1k|  pool->start = NULL;
 7178|  79.1k|  pool->ptr = NULL;
 7179|  79.1k|  pool->end = NULL;
 7180|  79.1k|  pool->mem = ms;
 7181|  79.1k|}
xmlparse.c:parserInit:
 1097|  19.7k|parserInit(XML_Parser parser, const XML_Char *encodingName) {
 1098|  19.7k|  parser->m_processor = prologInitProcessor;
 1099|  19.7k|  XmlPrologStateInit(&parser->m_prologState);
 1100|  19.7k|  if (encodingName != NULL) {
  ------------------
  |  Branch (1100:7): [True: 19.7k, False: 0]
  ------------------
 1101|  19.7k|    parser->m_protocolEncodingName = copyString(encodingName, &(parser->m_mem));
 1102|  19.7k|  }
 1103|  19.7k|  parser->m_curBase = NULL;
 1104|  19.7k|  XmlInitEncoding(&parser->m_initEncoding, &parser->m_encoding, 0);
 1105|  19.7k|  parser->m_userData = NULL;
 1106|  19.7k|  parser->m_handlerArg = NULL;
 1107|  19.7k|  parser->m_startElementHandler = NULL;
 1108|  19.7k|  parser->m_endElementHandler = NULL;
 1109|  19.7k|  parser->m_characterDataHandler = NULL;
 1110|  19.7k|  parser->m_processingInstructionHandler = NULL;
 1111|  19.7k|  parser->m_commentHandler = NULL;
 1112|  19.7k|  parser->m_startCdataSectionHandler = NULL;
 1113|  19.7k|  parser->m_endCdataSectionHandler = NULL;
 1114|  19.7k|  parser->m_defaultHandler = NULL;
 1115|  19.7k|  parser->m_startDoctypeDeclHandler = NULL;
 1116|  19.7k|  parser->m_endDoctypeDeclHandler = NULL;
 1117|  19.7k|  parser->m_unparsedEntityDeclHandler = NULL;
 1118|  19.7k|  parser->m_notationDeclHandler = NULL;
 1119|  19.7k|  parser->m_startNamespaceDeclHandler = NULL;
 1120|  19.7k|  parser->m_endNamespaceDeclHandler = NULL;
 1121|  19.7k|  parser->m_notStandaloneHandler = NULL;
 1122|  19.7k|  parser->m_externalEntityRefHandler = NULL;
 1123|  19.7k|  parser->m_externalEntityRefHandlerArg = parser;
 1124|  19.7k|  parser->m_skippedEntityHandler = NULL;
 1125|  19.7k|  parser->m_elementDeclHandler = NULL;
 1126|  19.7k|  parser->m_attlistDeclHandler = NULL;
 1127|  19.7k|  parser->m_entityDeclHandler = NULL;
 1128|  19.7k|  parser->m_xmlDeclHandler = NULL;
 1129|  19.7k|  parser->m_bufferPtr = parser->m_buffer;
 1130|  19.7k|  parser->m_bufferEnd = parser->m_buffer;
 1131|  19.7k|  parser->m_parseEndByteIndex = 0;
 1132|  19.7k|  parser->m_parseEndPtr = NULL;
 1133|  19.7k|  parser->m_declElementType = NULL;
 1134|  19.7k|  parser->m_declAttributeId = NULL;
 1135|  19.7k|  parser->m_declEntity = NULL;
 1136|  19.7k|  parser->m_doctypeName = NULL;
 1137|  19.7k|  parser->m_doctypeSysid = NULL;
 1138|  19.7k|  parser->m_doctypePubid = NULL;
 1139|  19.7k|  parser->m_declAttributeType = NULL;
 1140|  19.7k|  parser->m_declNotationName = NULL;
 1141|  19.7k|  parser->m_declNotationPublicId = NULL;
 1142|  19.7k|  parser->m_declAttributeIsCdata = XML_FALSE;
  ------------------
  |  |   56|  19.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1143|  19.7k|  parser->m_declAttributeIsId = XML_FALSE;
  ------------------
  |  |   56|  19.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1144|  19.7k|  memset(&parser->m_position, 0, sizeof(POSITION));
 1145|  19.7k|  parser->m_errorCode = XML_ERROR_NONE;
 1146|  19.7k|  parser->m_eventPtr = NULL;
 1147|  19.7k|  parser->m_eventEndPtr = NULL;
 1148|  19.7k|  parser->m_positionPtr = NULL;
 1149|  19.7k|  parser->m_openInternalEntities = NULL;
 1150|  19.7k|  parser->m_defaultExpandInternalEntities = XML_TRUE;
  ------------------
  |  |   55|  19.7k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 1151|  19.7k|  parser->m_tagLevel = 0;
 1152|  19.7k|  parser->m_tagStack = NULL;
 1153|  19.7k|  parser->m_inheritedBindings = NULL;
 1154|  19.7k|  parser->m_nSpecifiedAtts = 0;
 1155|  19.7k|  parser->m_unknownEncodingMem = NULL;
 1156|  19.7k|  parser->m_unknownEncodingRelease = NULL;
 1157|  19.7k|  parser->m_unknownEncodingData = NULL;
 1158|  19.7k|  parser->m_parentParser = NULL;
 1159|  19.7k|  parser->m_parsingStatus.parsing = XML_INITIALIZED;
 1160|  19.7k|#ifdef XML_DTD
 1161|  19.7k|  parser->m_isParamEntity = XML_FALSE;
  ------------------
  |  |   56|  19.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1162|  19.7k|  parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|  19.7k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1163|  19.7k|  parser->m_paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER;
 1164|  19.7k|#endif
 1165|  19.7k|  parser->m_hash_secret_salt = 0;
 1166|       |
 1167|  19.7k|#ifdef XML_DTD
 1168|  19.7k|  memset(&parser->m_accounting, 0, sizeof(ACCOUNTING));
 1169|  19.7k|  parser->m_accounting.debugLevel = getDebugLevel("EXPAT_ACCOUNTING_DEBUG", 0u);
 1170|  19.7k|  parser->m_accounting.maximumAmplificationFactor
 1171|  19.7k|      = EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_MAXIMUM_AMPLIFICATION_DEFAULT;
  ------------------
  |  |  143|  19.7k|  100.0f
  ------------------
 1172|  19.7k|  parser->m_accounting.activationThresholdBytes
 1173|  19.7k|      = EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_ACTIVATION_THRESHOLD_DEFAULT;
  ------------------
  |  |  145|  19.7k|  8388608 // 8 MiB, 2^23
  ------------------
 1174|       |
 1175|  19.7k|  memset(&parser->m_entity_stats, 0, sizeof(ENTITY_STATS));
 1176|  19.7k|  parser->m_entity_stats.debugLevel = getDebugLevel("EXPAT_ENTITY_DEBUG", 0u);
 1177|  19.7k|#endif
 1178|  19.7k|}
xmlparse.c:prologInitProcessor:
 4405|  19.7k|                    const char **nextPtr) {
 4406|  19.7k|  enum XML_Error result = initializeEncoding(parser);
 4407|  19.7k|  if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4407:7): [True: 0, False: 19.7k]
  ------------------
 4408|      0|    return result;
 4409|  19.7k|  parser->m_processor = prologProcessor;
 4410|  19.7k|  return prologProcessor(parser, s, end, nextPtr);
 4411|  19.7k|}
xmlparse.c:initializeEncoding:
 4248|  19.7k|initializeEncoding(XML_Parser parser) {
 4249|  19.7k|  const char *s;
 4250|       |#ifdef XML_UNICODE
 4251|       |  char encodingBuf[128];
 4252|       |  /* See comments about `protocolEncodingName` in parserInit() */
 4253|       |  if (! parser->m_protocolEncodingName)
 4254|       |    s = NULL;
 4255|       |  else {
 4256|       |    int i;
 4257|       |    for (i = 0; parser->m_protocolEncodingName[i]; i++) {
 4258|       |      if (i == sizeof(encodingBuf) - 1
 4259|       |          || (parser->m_protocolEncodingName[i] & ~0x7f) != 0) {
 4260|       |        encodingBuf[0] = '\0';
 4261|       |        break;
 4262|       |      }
 4263|       |      encodingBuf[i] = (char)parser->m_protocolEncodingName[i];
 4264|       |    }
 4265|       |    encodingBuf[i] = '\0';
 4266|       |    s = encodingBuf;
 4267|       |  }
 4268|       |#else
 4269|  19.7k|  s = parser->m_protocolEncodingName;
 4270|  19.7k|#endif
 4271|  19.7k|  if ((parser->m_ns ? XmlInitEncodingNS : XmlInitEncoding)(
  ------------------
  |  Branch (4271:7): [True: 19.7k, False: 0]
  |  Branch (4271:8): [True: 0, False: 19.7k]
  ------------------
 4272|  19.7k|          &parser->m_initEncoding, &parser->m_encoding, s))
 4273|  19.7k|    return XML_ERROR_NONE;
 4274|      0|  return handleUnknownEncoding(parser, parser->m_protocolEncodingName);
 4275|  19.7k|}
xmlparse.c:prologProcessor:
 4605|  19.7k|                const char **nextPtr) {
 4606|  19.7k|  const char *next = s;
 4607|  19.7k|  int tok = XmlPrologTok(parser->m_encoding, s, end, &next);
  ------------------
  |  |  227|  19.7k|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  19.7k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 4608|  19.7k|  return doProlog(parser, parser->m_encoding, s, end, tok, next, nextPtr,
 4609|  19.7k|                  (XML_Bool)! parser->m_parsingStatus.finalBuffer, XML_TRUE,
  ------------------
  |  |   55|  19.7k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4610|  19.7k|                  XML_ACCOUNT_DIRECT);
 4611|  19.7k|}
xmlparse.c:doProlog:
 4616|  19.7k|         XML_Bool allowClosingDoctype, enum XML_Account account) {
 4617|  19.7k|#ifdef XML_DTD
 4618|  19.7k|  static const XML_Char externalSubsetName[] = {ASCII_HASH, '\0'};
  ------------------
  |  |  121|  19.7k|#define ASCII_HASH 0x23
  ------------------
 4619|  19.7k|#endif /* XML_DTD */
 4620|  19.7k|  static const XML_Char atypeCDATA[]
 4621|  19.7k|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   38|  19.7k|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   39|  19.7k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   36|  19.7k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   55|  19.7k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   36|  19.7k|#define ASCII_A 0x41
  ------------------
 4622|  19.7k|  static const XML_Char atypeID[] = {ASCII_I, ASCII_D, '\0'};
  ------------------
  |  |   44|  19.7k|#define ASCII_I 0x49
  ------------------
                static const XML_Char atypeID[] = {ASCII_I, ASCII_D, '\0'};
  ------------------
  |  |   39|  19.7k|#define ASCII_D 0x44
  ------------------
 4623|  19.7k|  static const XML_Char atypeIDREF[]
 4624|  19.7k|      = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   44|  19.7k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   39|  19.7k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   53|  19.7k|#define ASCII_R 0x52
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   40|  19.7k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   41|  19.7k|#define ASCII_F 0x46
  ------------------
 4625|  19.7k|  static const XML_Char atypeIDREFS[]
 4626|  19.7k|      = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   44|  19.7k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   39|  19.7k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   53|  19.7k|#define ASCII_R 0x52
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   40|  19.7k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   41|  19.7k|#define ASCII_F 0x46
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   54|  19.7k|#define ASCII_S 0x53
  ------------------
 4627|  19.7k|  static const XML_Char atypeENTITY[]
 4628|  19.7k|      = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   40|  19.7k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   49|  19.7k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   55|  19.7k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   44|  19.7k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   55|  19.7k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   60|  19.7k|#define ASCII_Y 0x59
  ------------------
 4629|  19.7k|  static const XML_Char atypeENTITIES[]
 4630|  19.7k|      = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   40|  19.7k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   49|  19.7k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   55|  19.7k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   44|  19.7k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   55|  19.7k|#define ASCII_T 0x54
  ------------------
 4631|  19.7k|         ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   44|  19.7k|#define ASCII_I 0x49
  ------------------
                       ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   40|  19.7k|#define ASCII_E 0x45
  ------------------
                       ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   54|  19.7k|#define ASCII_S 0x53
  ------------------
 4632|  19.7k|  static const XML_Char atypeNMTOKEN[]
 4633|  19.7k|      = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   49|  19.7k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   48|  19.7k|#define ASCII_M 0x4D
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   55|  19.7k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   50|  19.7k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   46|  19.7k|#define ASCII_K 0x4B
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   40|  19.7k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   49|  19.7k|#define ASCII_N 0x4E
  ------------------
 4634|  19.7k|  static const XML_Char atypeNMTOKENS[]
 4635|  19.7k|      = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   49|  19.7k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   48|  19.7k|#define ASCII_M 0x4D
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   55|  19.7k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   50|  19.7k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   46|  19.7k|#define ASCII_K 0x4B
  ------------------
 4636|  19.7k|         ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   40|  19.7k|#define ASCII_E 0x45
  ------------------
                       ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   49|  19.7k|#define ASCII_N 0x4E
  ------------------
                       ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   54|  19.7k|#define ASCII_S 0x53
  ------------------
 4637|  19.7k|  static const XML_Char notationPrefix[]
 4638|  19.7k|      = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   49|  19.7k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   50|  19.7k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   55|  19.7k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   36|  19.7k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   55|  19.7k|#define ASCII_T 0x54
  ------------------
 4639|  19.7k|         ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   44|  19.7k|#define ASCII_I 0x49
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   50|  19.7k|#define ASCII_O 0x4F
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   49|  19.7k|#define ASCII_N 0x4E
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |  117|  19.7k|#define ASCII_LPAREN 0x28
  ------------------
 4640|  19.7k|  static const XML_Char enumValueSep[] = {ASCII_PIPE, '\0'};
  ------------------
  |  |  122|  19.7k|#define ASCII_PIPE 0x7C
  ------------------
 4641|  19.7k|  static const XML_Char enumValueStart[] = {ASCII_LPAREN, '\0'};
  ------------------
  |  |  117|  19.7k|#define ASCII_LPAREN 0x28
  ------------------
 4642|       |
 4643|       |#ifndef XML_DTD
 4644|       |  UNUSED_P(account);
 4645|       |#endif
 4646|       |
 4647|       |  /* save one level of indirection */
 4648|  19.7k|  DTD *const dtd = parser->m_dtd;
 4649|       |
 4650|  19.7k|  const char **eventPP;
 4651|  19.7k|  const char **eventEndPP;
 4652|  19.7k|  enum XML_Content_Quant quant;
 4653|       |
 4654|  19.7k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (4654:7): [True: 19.7k, False: 0]
  ------------------
 4655|  19.7k|    eventPP = &parser->m_eventPtr;
 4656|  19.7k|    eventEndPP = &parser->m_eventEndPtr;
 4657|  19.7k|  } else {
 4658|      0|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 4659|      0|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 4660|      0|  }
 4661|       |
 4662|  4.77M|  for (;;) {
 4663|  4.77M|    int role;
 4664|  4.77M|    XML_Bool handleDefault = XML_TRUE;
  ------------------
  |  |   55|  4.77M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4665|  4.77M|    *eventPP = s;
 4666|  4.77M|    *eventEndPP = next;
 4667|  4.77M|    if (tok <= 0) {
  ------------------
  |  Branch (4667:9): [True: 6.64k, False: 4.77M]
  ------------------
 4668|  6.64k|      if (haveMore && tok != XML_TOK_INVALID) {
  ------------------
  |  |   57|  6.64k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4668:11): [True: 6.64k, False: 0]
  |  Branch (4668:23): [True: 4.65k, False: 1.98k]
  ------------------
 4669|  4.65k|        *nextPtr = s;
 4670|  4.65k|        return XML_ERROR_NONE;
 4671|  4.65k|      }
 4672|  1.98k|      switch (tok) {
 4673|  1.98k|      case XML_TOK_INVALID:
  ------------------
  |  |   57|  1.98k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4673:7): [True: 1.98k, False: 0]
  ------------------
 4674|  1.98k|        *eventPP = next;
 4675|  1.98k|        return XML_ERROR_INVALID_TOKEN;
 4676|      0|      case XML_TOK_PARTIAL:
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (4676:7): [True: 0, False: 1.98k]
  ------------------
 4677|      0|        return XML_ERROR_UNCLOSED_TOKEN;
 4678|      0|      case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (4678:7): [True: 0, False: 1.98k]
  ------------------
 4679|      0|        return XML_ERROR_PARTIAL_CHAR;
 4680|      0|      case -XML_TOK_PROLOG_S:
  ------------------
  |  |   82|      0|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (4680:7): [True: 0, False: 1.98k]
  ------------------
 4681|      0|        tok = -tok;
 4682|      0|        break;
 4683|      0|      case XML_TOK_NONE:
  ------------------
  |  |   51|      0|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (4683:7): [True: 0, False: 1.98k]
  ------------------
 4684|      0|#ifdef XML_DTD
 4685|       |        /* for internal PE NOT referenced between declarations */
 4686|      0|        if (enc != parser->m_encoding
  ------------------
  |  Branch (4686:13): [True: 0, False: 0]
  ------------------
 4687|      0|            && ! parser->m_openInternalEntities->betweenDecl) {
  ------------------
  |  Branch (4687:16): [True: 0, False: 0]
  ------------------
 4688|      0|          *nextPtr = s;
 4689|      0|          return XML_ERROR_NONE;
 4690|      0|        }
 4691|       |        /* WFC: PE Between Declarations - must check that PE contains
 4692|       |           complete markup, not only for external PEs, but also for
 4693|       |           internal PEs if the reference occurs between declarations.
 4694|       |        */
 4695|      0|        if (parser->m_isParamEntity || enc != parser->m_encoding) {
  ------------------
  |  Branch (4695:13): [True: 0, False: 0]
  |  Branch (4695:40): [True: 0, False: 0]
  ------------------
 4696|      0|          if (XmlTokenRole(&parser->m_prologState, XML_TOK_NONE, end, end, enc)
  ------------------
  |  |  136|      0|  (((state)->handler)(state, tok, ptr, end, enc))
  ------------------
  |  Branch (4696:15): [True: 0, False: 0]
  ------------------
 4697|      0|              == XML_ROLE_ERROR)
 4698|      0|            return XML_ERROR_INCOMPLETE_PE;
 4699|      0|          *nextPtr = s;
 4700|      0|          return XML_ERROR_NONE;
 4701|      0|        }
 4702|      0|#endif /* XML_DTD */
 4703|      0|        return XML_ERROR_NO_ELEMENTS;
 4704|      0|      default:
  ------------------
  |  Branch (4704:7): [True: 0, False: 1.98k]
  ------------------
 4705|      0|        tok = -tok;
 4706|      0|        next = end;
 4707|      0|        break;
 4708|  1.98k|      }
 4709|  1.98k|    }
 4710|  4.77M|    role = XmlTokenRole(&parser->m_prologState, tok, s, next, enc);
  ------------------
  |  |  136|  4.77M|  (((state)->handler)(state, tok, ptr, end, enc))
  ------------------
 4711|  4.77M|#ifdef XML_DTD
 4712|  4.77M|    switch (role) {
 4713|  11.3k|    case XML_ROLE_INSTANCE_START: // bytes accounted in contentProcessor
  ------------------
  |  Branch (4713:5): [True: 11.3k, False: 4.76M]
  ------------------
 4714|  11.7k|    case XML_ROLE_XML_DECL:       // bytes accounted in processXmlDecl
  ------------------
  |  Branch (4714:5): [True: 317, False: 4.77M]
  ------------------
 4715|  11.7k|    case XML_ROLE_TEXT_DECL:      // bytes accounted in processXmlDecl
  ------------------
  |  Branch (4715:5): [True: 0, False: 4.77M]
  ------------------
 4716|  11.7k|      break;
 4717|  4.76M|    default:
  ------------------
  |  Branch (4717:5): [True: 4.76M, False: 11.7k]
  ------------------
 4718|  4.76M|      if (! accountingDiffTolerated(parser, tok, s, next, __LINE__, account)) {
  ------------------
  |  Branch (4718:11): [True: 1, False: 4.76M]
  ------------------
 4719|      1|        accountingOnAbort(parser);
 4720|      1|        return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4721|      1|      }
 4722|  4.77M|    }
 4723|  4.77M|#endif
 4724|  4.77M|    switch (role) {
  ------------------
  |  Branch (4724:13): [True: 0, False: 4.77M]
  ------------------
 4725|    317|    case XML_ROLE_XML_DECL: {
  ------------------
  |  Branch (4725:5): [True: 317, False: 4.77M]
  ------------------
 4726|    317|      enum XML_Error result = processXmlDecl(parser, 0, s, next);
 4727|    317|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4727:11): [True: 242, False: 75]
  ------------------
 4728|    242|        return result;
 4729|     75|      enc = parser->m_encoding;
 4730|     75|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|     75|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4731|     75|    } break;
 4732|  5.95k|    case XML_ROLE_DOCTYPE_NAME:
  ------------------
  |  Branch (4732:5): [True: 5.95k, False: 4.76M]
  ------------------
 4733|  5.95k|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4733:11): [True: 0, False: 5.95k]
  ------------------
 4734|      0|        parser->m_doctypeName
 4735|      0|            = poolStoreString(&parser->m_tempPool, enc, s, next);
 4736|      0|        if (! parser->m_doctypeName)
  ------------------
  |  Branch (4736:13): [True: 0, False: 0]
  ------------------
 4737|      0|          return XML_ERROR_NO_MEMORY;
 4738|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4739|      0|        parser->m_doctypePubid = NULL;
 4740|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4741|      0|      }
 4742|  5.95k|      parser->m_doctypeSysid = NULL; /* always initialize to NULL */
 4743|  5.95k|      break;
 4744|  5.13k|    case XML_ROLE_DOCTYPE_INTERNAL_SUBSET:
  ------------------
  |  Branch (4744:5): [True: 5.13k, False: 4.76M]
  ------------------
 4745|  5.13k|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4745:11): [True: 0, False: 5.13k]
  ------------------
 4746|      0|        parser->m_startDoctypeDeclHandler(
 4747|      0|            parser->m_handlerArg, parser->m_doctypeName, parser->m_doctypeSysid,
 4748|      0|            parser->m_doctypePubid, 1);
 4749|      0|        parser->m_doctypeName = NULL;
 4750|      0|        poolClear(&parser->m_tempPool);
 4751|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4752|      0|      }
 4753|  5.13k|      break;
 4754|      0|#ifdef XML_DTD
 4755|      0|    case XML_ROLE_TEXT_DECL: {
  ------------------
  |  Branch (4755:5): [True: 0, False: 4.77M]
  ------------------
 4756|      0|      enum XML_Error result = processXmlDecl(parser, 1, s, next);
 4757|      0|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4757:11): [True: 0, False: 0]
  ------------------
 4758|      0|        return result;
 4759|      0|      enc = parser->m_encoding;
 4760|      0|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4761|      0|    } break;
 4762|      0|#endif /* XML_DTD */
 4763|    716|    case XML_ROLE_DOCTYPE_PUBLIC_ID:
  ------------------
  |  Branch (4763:5): [True: 716, False: 4.77M]
  ------------------
 4764|    716|#ifdef XML_DTD
 4765|    716|      parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|    716|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4766|    716|      parser->m_declEntity = (ENTITY *)lookup(
 4767|    716|          parser, &dtd->paramEntities, externalSubsetName, sizeof(ENTITY));
 4768|    716|      if (! parser->m_declEntity)
  ------------------
  |  Branch (4768:11): [True: 0, False: 716]
  ------------------
 4769|      0|        return XML_ERROR_NO_MEMORY;
 4770|    716|#endif /* XML_DTD */
 4771|    716|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|    716|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4772|    716|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4772:11): [True: 0, False: 716]
  ------------------
 4773|      0|        XML_Char *pubId;
 4774|      0|        if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|      0|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (4774:13): [True: 0, False: 0]
  ------------------
 4775|      0|          return XML_ERROR_PUBLICID;
 4776|      0|        pubId = poolStoreString(&parser->m_tempPool, enc,
 4777|      0|                                s + enc->minBytesPerChar,
 4778|      0|                                next - enc->minBytesPerChar);
 4779|      0|        if (! pubId)
  ------------------
  |  Branch (4779:13): [True: 0, False: 0]
  ------------------
 4780|      0|          return XML_ERROR_NO_MEMORY;
 4781|      0|        normalizePublicId(pubId);
 4782|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4783|      0|        parser->m_doctypePubid = pubId;
 4784|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4785|      0|        goto alreadyChecked;
 4786|      0|      }
 4787|       |      /* fall through */
 4788|  3.49k|    case XML_ROLE_ENTITY_PUBLIC_ID:
  ------------------
  |  Branch (4788:5): [True: 2.77k, False: 4.77M]
  ------------------
 4789|  3.49k|      if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|  3.49k|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (4789:11): [True: 86, False: 3.40k]
  ------------------
 4790|     86|        return XML_ERROR_PUBLICID;
 4791|  3.40k|    alreadyChecked:
 4792|  3.40k|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (4792:11): [True: 3.17k, False: 225]
  |  Branch (4792:34): [True: 1.02k, False: 2.15k]
  ------------------
 4793|  1.02k|        XML_Char *tem
 4794|  1.02k|            = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 4795|  1.02k|                              next - enc->minBytesPerChar);
 4796|  1.02k|        if (! tem)
  ------------------
  |  Branch (4796:13): [True: 0, False: 1.02k]
  ------------------
 4797|      0|          return XML_ERROR_NO_MEMORY;
 4798|  1.02k|        normalizePublicId(tem);
 4799|  1.02k|        parser->m_declEntity->publicId = tem;
 4800|  1.02k|        poolFinish(&dtd->pool);
  ------------------
  |  |  600|  1.02k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4801|       |        /* Don't suppress the default handler if we fell through from
 4802|       |         * the XML_ROLE_DOCTYPE_PUBLIC_ID case.
 4803|       |         */
 4804|  1.02k|        if (parser->m_entityDeclHandler && role == XML_ROLE_ENTITY_PUBLIC_ID)
  ------------------
  |  Branch (4804:13): [True: 0, False: 1.02k]
  |  Branch (4804:44): [True: 0, False: 0]
  ------------------
 4805|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4806|  1.02k|      }
 4807|  3.40k|      break;
 4808|  3.40k|    case XML_ROLE_DOCTYPE_CLOSE:
  ------------------
  |  Branch (4808:5): [True: 2.24k, False: 4.77M]
  ------------------
 4809|  2.24k|      if (allowClosingDoctype != XML_TRUE) {
  ------------------
  |  |   55|  2.24k|#define XML_TRUE ((XML_Bool)1)
  ------------------
  |  Branch (4809:11): [True: 0, False: 2.24k]
  ------------------
 4810|       |        /* Must not close doctype from within expanded parameter entities */
 4811|      0|        return XML_ERROR_INVALID_TOKEN;
 4812|      0|      }
 4813|       |
 4814|  2.24k|      if (parser->m_doctypeName) {
  ------------------
  |  Branch (4814:11): [True: 0, False: 2.24k]
  ------------------
 4815|      0|        parser->m_startDoctypeDeclHandler(
 4816|      0|            parser->m_handlerArg, parser->m_doctypeName, parser->m_doctypeSysid,
 4817|      0|            parser->m_doctypePubid, 0);
 4818|      0|        poolClear(&parser->m_tempPool);
 4819|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4820|      0|      }
 4821|       |      /* parser->m_doctypeSysid will be non-NULL in the case of a previous
 4822|       |         XML_ROLE_DOCTYPE_SYSTEM_ID, even if parser->m_startDoctypeDeclHandler
 4823|       |         was not set, indicating an external subset
 4824|       |      */
 4825|  2.24k|#ifdef XML_DTD
 4826|  2.24k|      if (parser->m_doctypeSysid || parser->m_useForeignDTD) {
  ------------------
  |  Branch (4826:11): [True: 4, False: 2.24k]
  |  Branch (4826:37): [True: 0, False: 2.24k]
  ------------------
 4827|      4|        XML_Bool hadParamEntityRefs = dtd->hasParamEntityRefs;
 4828|      4|        dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|      4|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4829|      4|        if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4829:13): [True: 0, False: 4]
  ------------------
 4830|      4|            && parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (4830:16): [True: 0, False: 0]
  ------------------
 4831|      0|          ENTITY *entity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 4832|      0|                                            externalSubsetName, sizeof(ENTITY));
 4833|      0|          if (! entity) {
  ------------------
  |  Branch (4833:15): [True: 0, False: 0]
  ------------------
 4834|       |            /* The external subset name "#" will have already been
 4835|       |             * inserted into the hash table at the start of the
 4836|       |             * external entity parsing, so no allocation will happen
 4837|       |             * and lookup() cannot fail.
 4838|       |             */
 4839|      0|            return XML_ERROR_NO_MEMORY; /* LCOV_EXCL_LINE */
 4840|      0|          }
 4841|      0|          if (parser->m_useForeignDTD)
  ------------------
  |  Branch (4841:15): [True: 0, False: 0]
  ------------------
 4842|      0|            entity->base = parser->m_curBase;
 4843|      0|          dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4844|      0|          if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (4844:15): [True: 0, False: 0]
  ------------------
 4845|      0|                  parser->m_externalEntityRefHandlerArg, 0, entity->base,
 4846|      0|                  entity->systemId, entity->publicId))
 4847|      0|            return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 4848|      0|          if (dtd->paramEntityRead) {
  ------------------
  |  Branch (4848:15): [True: 0, False: 0]
  ------------------
 4849|      0|            if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (4849:17): [True: 0, False: 0]
  |  Branch (4849:38): [True: 0, False: 0]
  ------------------
 4850|      0|                && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (4850:20): [True: 0, False: 0]
  ------------------
 4851|      0|              return XML_ERROR_NOT_STANDALONE;
 4852|      0|          }
 4853|       |          /* if we didn't read the foreign DTD then this means that there
 4854|       |             is no external subset and we must reset dtd->hasParamEntityRefs
 4855|       |          */
 4856|      0|          else if (! parser->m_doctypeSysid)
  ------------------
  |  Branch (4856:20): [True: 0, False: 0]
  ------------------
 4857|      0|            dtd->hasParamEntityRefs = hadParamEntityRefs;
 4858|       |          /* end of DTD - no need to update dtd->keepProcessing */
 4859|      0|        }
 4860|      4|        parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|      4|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4861|      4|      }
 4862|  2.24k|#endif /* XML_DTD */
 4863|  2.24k|      if (parser->m_endDoctypeDeclHandler) {
  ------------------
  |  Branch (4863:11): [True: 0, False: 2.24k]
  ------------------
 4864|      0|        parser->m_endDoctypeDeclHandler(parser->m_handlerArg);
 4865|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4866|      0|      }
 4867|  2.24k|      break;
 4868|  11.3k|    case XML_ROLE_INSTANCE_START:
  ------------------
  |  Branch (4868:5): [True: 11.3k, False: 4.76M]
  ------------------
 4869|  11.3k|#ifdef XML_DTD
 4870|       |      /* if there is no DOCTYPE declaration then now is the
 4871|       |         last chance to read the foreign DTD
 4872|       |      */
 4873|  11.3k|      if (parser->m_useForeignDTD) {
  ------------------
  |  Branch (4873:11): [True: 0, False: 11.3k]
  ------------------
 4874|      0|        XML_Bool hadParamEntityRefs = dtd->hasParamEntityRefs;
 4875|      0|        dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4876|      0|        if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4876:13): [True: 0, False: 0]
  ------------------
 4877|      0|            && parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (4877:16): [True: 0, False: 0]
  ------------------
 4878|      0|          ENTITY *entity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 4879|      0|                                            externalSubsetName, sizeof(ENTITY));
 4880|      0|          if (! entity)
  ------------------
  |  Branch (4880:15): [True: 0, False: 0]
  ------------------
 4881|      0|            return XML_ERROR_NO_MEMORY;
 4882|      0|          entity->base = parser->m_curBase;
 4883|      0|          dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4884|      0|          if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (4884:15): [True: 0, False: 0]
  ------------------
 4885|      0|                  parser->m_externalEntityRefHandlerArg, 0, entity->base,
 4886|      0|                  entity->systemId, entity->publicId))
 4887|      0|            return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 4888|      0|          if (dtd->paramEntityRead) {
  ------------------
  |  Branch (4888:15): [True: 0, False: 0]
  ------------------
 4889|      0|            if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (4889:17): [True: 0, False: 0]
  |  Branch (4889:38): [True: 0, False: 0]
  ------------------
 4890|      0|                && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (4890:20): [True: 0, False: 0]
  ------------------
 4891|      0|              return XML_ERROR_NOT_STANDALONE;
 4892|      0|          }
 4893|       |          /* if we didn't read the foreign DTD then this means that there
 4894|       |             is no external subset and we must reset dtd->hasParamEntityRefs
 4895|       |          */
 4896|      0|          else
 4897|      0|            dtd->hasParamEntityRefs = hadParamEntityRefs;
 4898|       |          /* end of DTD - no need to update dtd->keepProcessing */
 4899|      0|        }
 4900|      0|      }
 4901|  11.3k|#endif /* XML_DTD */
 4902|  11.3k|      parser->m_processor = contentProcessor;
 4903|  11.3k|      return contentProcessor(parser, s, end, nextPtr);
 4904|  10.0k|    case XML_ROLE_ATTLIST_ELEMENT_NAME:
  ------------------
  |  Branch (4904:5): [True: 10.0k, False: 4.76M]
  ------------------
 4905|  10.0k|      parser->m_declElementType = getElementType(parser, enc, s, next);
 4906|  10.0k|      if (! parser->m_declElementType)
  ------------------
  |  Branch (4906:11): [True: 0, False: 10.0k]
  ------------------
 4907|      0|        return XML_ERROR_NO_MEMORY;
 4908|  10.0k|      goto checkAttListDeclHandler;
 4909|  36.8k|    case XML_ROLE_ATTRIBUTE_NAME:
  ------------------
  |  Branch (4909:5): [True: 36.8k, False: 4.73M]
  ------------------
 4910|  36.8k|      parser->m_declAttributeId = getAttributeId(parser, enc, s, next);
 4911|  36.8k|      if (! parser->m_declAttributeId)
  ------------------
  |  Branch (4911:11): [True: 0, False: 36.8k]
  ------------------
 4912|      0|        return XML_ERROR_NO_MEMORY;
 4913|  36.8k|      parser->m_declAttributeIsCdata = XML_FALSE;
  ------------------
  |  |   56|  36.8k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4914|  36.8k|      parser->m_declAttributeType = NULL;
 4915|  36.8k|      parser->m_declAttributeIsId = XML_FALSE;
  ------------------
  |  |   56|  36.8k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4916|  36.8k|      goto checkAttListDeclHandler;
 4917|    833|    case XML_ROLE_ATTRIBUTE_TYPE_CDATA:
  ------------------
  |  Branch (4917:5): [True: 833, False: 4.77M]
  ------------------
 4918|    833|      parser->m_declAttributeIsCdata = XML_TRUE;
  ------------------
  |  |   55|    833|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4919|    833|      parser->m_declAttributeType = atypeCDATA;
 4920|    833|      goto checkAttListDeclHandler;
 4921|  3.64k|    case XML_ROLE_ATTRIBUTE_TYPE_ID:
  ------------------
  |  Branch (4921:5): [True: 3.64k, False: 4.76M]
  ------------------
 4922|  3.64k|      parser->m_declAttributeIsId = XML_TRUE;
  ------------------
  |  |   55|  3.64k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4923|  3.64k|      parser->m_declAttributeType = atypeID;
 4924|  3.64k|      goto checkAttListDeclHandler;
 4925|  3.02k|    case XML_ROLE_ATTRIBUTE_TYPE_IDREF:
  ------------------
  |  Branch (4925:5): [True: 3.02k, False: 4.76M]
  ------------------
 4926|  3.02k|      parser->m_declAttributeType = atypeIDREF;
 4927|  3.02k|      goto checkAttListDeclHandler;
 4928|    785|    case XML_ROLE_ATTRIBUTE_TYPE_IDREFS:
  ------------------
  |  Branch (4928:5): [True: 785, False: 4.77M]
  ------------------
 4929|    785|      parser->m_declAttributeType = atypeIDREFS;
 4930|    785|      goto checkAttListDeclHandler;
 4931|    604|    case XML_ROLE_ATTRIBUTE_TYPE_ENTITY:
  ------------------
  |  Branch (4931:5): [True: 604, False: 4.77M]
  ------------------
 4932|    604|      parser->m_declAttributeType = atypeENTITY;
 4933|    604|      goto checkAttListDeclHandler;
 4934|  1.38k|    case XML_ROLE_ATTRIBUTE_TYPE_ENTITIES:
  ------------------
  |  Branch (4934:5): [True: 1.38k, False: 4.77M]
  ------------------
 4935|  1.38k|      parser->m_declAttributeType = atypeENTITIES;
 4936|  1.38k|      goto checkAttListDeclHandler;
 4937|    227|    case XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN:
  ------------------
  |  Branch (4937:5): [True: 227, False: 4.77M]
  ------------------
 4938|    227|      parser->m_declAttributeType = atypeNMTOKEN;
 4939|    227|      goto checkAttListDeclHandler;
 4940|    264|    case XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS:
  ------------------
  |  Branch (4940:5): [True: 264, False: 4.77M]
  ------------------
 4941|    264|      parser->m_declAttributeType = atypeNMTOKENS;
 4942|  57.7k|    checkAttListDeclHandler:
 4943|  57.7k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler)
  ------------------
  |  Branch (4943:11): [True: 55.9k, False: 1.78k]
  |  Branch (4943:34): [True: 0, False: 55.9k]
  ------------------
 4944|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4945|  57.7k|      break;
 4946|  29.7k|    case XML_ROLE_ATTRIBUTE_ENUM_VALUE:
  ------------------
  |  Branch (4946:5): [True: 29.7k, False: 4.74M]
  ------------------
 4947|  31.8k|    case XML_ROLE_ATTRIBUTE_NOTATION_VALUE:
  ------------------
  |  Branch (4947:5): [True: 2.07k, False: 4.77M]
  ------------------
 4948|  31.8k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler) {
  ------------------
  |  Branch (4948:11): [True: 30.7k, False: 1.06k]
  |  Branch (4948:34): [True: 0, False: 30.7k]
  ------------------
 4949|      0|        const XML_Char *prefix;
 4950|      0|        if (parser->m_declAttributeType) {
  ------------------
  |  Branch (4950:13): [True: 0, False: 0]
  ------------------
 4951|      0|          prefix = enumValueSep;
 4952|      0|        } else {
 4953|      0|          prefix = (role == XML_ROLE_ATTRIBUTE_NOTATION_VALUE ? notationPrefix
  ------------------
  |  Branch (4953:21): [True: 0, False: 0]
  ------------------
 4954|      0|                                                              : enumValueStart);
 4955|      0|        }
 4956|      0|        if (! poolAppendString(&parser->m_tempPool, prefix))
  ------------------
  |  Branch (4956:13): [True: 0, False: 0]
  ------------------
 4957|      0|          return XML_ERROR_NO_MEMORY;
 4958|      0|        if (! poolAppend(&parser->m_tempPool, enc, s, next))
  ------------------
  |  Branch (4958:13): [True: 0, False: 0]
  ------------------
 4959|      0|          return XML_ERROR_NO_MEMORY;
 4960|      0|        parser->m_declAttributeType = parser->m_tempPool.start;
 4961|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4962|      0|      }
 4963|  31.8k|      break;
 4964|  31.8k|    case XML_ROLE_IMPLIED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4964:5): [True: 23.9k, False: 4.74M]
  ------------------
 4965|  25.5k|    case XML_ROLE_REQUIRED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4965:5): [True: 1.59k, False: 4.77M]
  ------------------
 4966|  25.5k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (4966:11): [True: 25.3k, False: 194]
  ------------------
 4967|  25.3k|        if (! defineAttribute(parser->m_declElementType,
  ------------------
  |  Branch (4967:13): [True: 0, False: 25.3k]
  ------------------
 4968|  25.3k|                              parser->m_declAttributeId,
 4969|  25.3k|                              parser->m_declAttributeIsCdata,
 4970|  25.3k|                              parser->m_declAttributeIsId, 0, parser))
 4971|      0|          return XML_ERROR_NO_MEMORY;
 4972|  25.3k|        if (parser->m_attlistDeclHandler && parser->m_declAttributeType) {
  ------------------
  |  Branch (4972:13): [True: 0, False: 25.3k]
  |  Branch (4972:45): [True: 0, False: 0]
  ------------------
 4973|      0|          if (*parser->m_declAttributeType == XML_T(ASCII_LPAREN)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (4973:15): [True: 0, False: 0]
  ------------------
 4974|      0|              || (*parser->m_declAttributeType == XML_T(ASCII_N)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (4974:19): [True: 0, False: 0]
  ------------------
 4975|      0|                  && parser->m_declAttributeType[1] == XML_T(ASCII_O))) {
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (4975:22): [True: 0, False: 0]
  ------------------
 4976|       |            /* Enumerated or Notation type */
 4977|      0|            if (! poolAppendChar(&parser->m_tempPool, XML_T(ASCII_RPAREN))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (4977:17): [True: 0, False: 0]
  ------------------
 4978|      0|                || ! poolAppendChar(&parser->m_tempPool, XML_T('\0')))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (4978:20): [True: 0, False: 0]
  ------------------
 4979|      0|              return XML_ERROR_NO_MEMORY;
 4980|      0|            parser->m_declAttributeType = parser->m_tempPool.start;
 4981|      0|            poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4982|      0|          }
 4983|      0|          *eventEndPP = s;
 4984|      0|          parser->m_attlistDeclHandler(
 4985|      0|              parser->m_handlerArg, parser->m_declElementType->name,
 4986|      0|              parser->m_declAttributeId->name, parser->m_declAttributeType, 0,
 4987|      0|              role == XML_ROLE_REQUIRED_ATTRIBUTE_VALUE);
 4988|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4989|      0|        }
 4990|  25.3k|      }
 4991|  25.5k|      poolClear(&parser->m_tempPool);
 4992|  25.5k|      break;
 4993|  9.12k|    case XML_ROLE_DEFAULT_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4993:5): [True: 9.12k, False: 4.76M]
  ------------------
 4994|  10.8k|    case XML_ROLE_FIXED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4994:5): [True: 1.73k, False: 4.77M]
  ------------------
 4995|  10.8k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (4995:11): [True: 10.2k, False: 599]
  ------------------
 4996|  10.2k|        const XML_Char *attVal;
 4997|  10.2k|        enum XML_Error result = storeAttributeValue(
 4998|  10.2k|            parser, enc, parser->m_declAttributeIsCdata,
 4999|  10.2k|            s + enc->minBytesPerChar, next - enc->minBytesPerChar, &dtd->pool,
 5000|  10.2k|            XML_ACCOUNT_NONE);
 5001|  10.2k|        if (result)
  ------------------
  |  Branch (5001:13): [True: 9, False: 10.2k]
  ------------------
 5002|      9|          return result;
 5003|  10.2k|        attVal = poolStart(&dtd->pool);
  ------------------
  |  |  595|  10.2k|#define poolStart(pool) ((pool)->start)
  ------------------
 5004|  10.2k|        poolFinish(&dtd->pool);
  ------------------
  |  |  600|  10.2k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5005|       |        /* ID attributes aren't allowed to have a default */
 5006|  10.2k|        if (! defineAttribute(
  ------------------
  |  Branch (5006:13): [True: 0, False: 10.2k]
  ------------------
 5007|  10.2k|                parser->m_declElementType, parser->m_declAttributeId,
 5008|  10.2k|                parser->m_declAttributeIsCdata, XML_FALSE, attVal, parser))
  ------------------
  |  |   56|  10.2k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5009|      0|          return XML_ERROR_NO_MEMORY;
 5010|  10.2k|        if (parser->m_attlistDeclHandler && parser->m_declAttributeType) {
  ------------------
  |  Branch (5010:13): [True: 0, False: 10.2k]
  |  Branch (5010:45): [True: 0, False: 0]
  ------------------
 5011|      0|          if (*parser->m_declAttributeType == XML_T(ASCII_LPAREN)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (5011:15): [True: 0, False: 0]
  ------------------
 5012|      0|              || (*parser->m_declAttributeType == XML_T(ASCII_N)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (5012:19): [True: 0, False: 0]
  ------------------
 5013|      0|                  && parser->m_declAttributeType[1] == XML_T(ASCII_O))) {
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (5013:22): [True: 0, False: 0]
  ------------------
 5014|       |            /* Enumerated or Notation type */
 5015|      0|            if (! poolAppendChar(&parser->m_tempPool, XML_T(ASCII_RPAREN))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5015:17): [True: 0, False: 0]
  ------------------
 5016|      0|                || ! poolAppendChar(&parser->m_tempPool, XML_T('\0')))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5016:20): [True: 0, False: 0]
  ------------------
 5017|      0|              return XML_ERROR_NO_MEMORY;
 5018|      0|            parser->m_declAttributeType = parser->m_tempPool.start;
 5019|      0|            poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5020|      0|          }
 5021|      0|          *eventEndPP = s;
 5022|      0|          parser->m_attlistDeclHandler(
 5023|      0|              parser->m_handlerArg, parser->m_declElementType->name,
 5024|      0|              parser->m_declAttributeId->name, parser->m_declAttributeType,
 5025|      0|              attVal, role == XML_ROLE_FIXED_ATTRIBUTE_VALUE);
 5026|      0|          poolClear(&parser->m_tempPool);
 5027|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5028|      0|        }
 5029|  10.2k|      }
 5030|  10.8k|      break;
 5031|  10.8k|    case XML_ROLE_ENTITY_VALUE:
  ------------------
  |  Branch (5031:5): [True: 7.93k, False: 4.76M]
  ------------------
 5032|  7.93k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5032:11): [True: 7.51k, False: 428]
  ------------------
 5033|  7.51k|        enum XML_Error result
 5034|  7.51k|            = storeEntityValue(parser, enc, s + enc->minBytesPerChar,
 5035|  7.51k|                               next - enc->minBytesPerChar, XML_ACCOUNT_NONE);
 5036|  7.51k|        if (parser->m_declEntity) {
  ------------------
  |  Branch (5036:13): [True: 3.57k, False: 3.93k]
  ------------------
 5037|  3.57k|          parser->m_declEntity->textPtr = poolStart(&dtd->entityValuePool);
  ------------------
  |  |  595|  3.57k|#define poolStart(pool) ((pool)->start)
  ------------------
 5038|  3.57k|          parser->m_declEntity->textLen
 5039|  3.57k|              = (int)(poolLength(&dtd->entityValuePool));
  ------------------
  |  |  596|  3.57k|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
 5040|  3.57k|          poolFinish(&dtd->entityValuePool);
  ------------------
  |  |  600|  3.57k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5041|  3.57k|          if (parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5041:15): [True: 0, False: 3.57k]
  ------------------
 5042|      0|            *eventEndPP = s;
 5043|      0|            parser->m_entityDeclHandler(
 5044|      0|                parser->m_handlerArg, parser->m_declEntity->name,
 5045|      0|                parser->m_declEntity->is_param, parser->m_declEntity->textPtr,
 5046|      0|                parser->m_declEntity->textLen, parser->m_curBase, 0, 0, 0);
 5047|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5048|      0|          }
 5049|  3.57k|        } else
 5050|  3.93k|          poolDiscard(&dtd->entityValuePool);
  ------------------
  |  |  599|  3.93k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5051|  7.51k|        if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5051:13): [True: 79, False: 7.43k]
  ------------------
 5052|     79|          return result;
 5053|  7.51k|      }
 5054|  7.85k|      break;
 5055|  7.85k|    case XML_ROLE_DOCTYPE_SYSTEM_ID:
  ------------------
  |  Branch (5055:5): [True: 43, False: 4.77M]
  ------------------
 5056|     43|#ifdef XML_DTD
 5057|     43|      parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|     43|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5058|     43|#endif /* XML_DTD */
 5059|     43|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|     43|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5060|     43|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (5060:11): [True: 0, False: 43]
  ------------------
 5061|      0|        parser->m_doctypeSysid = poolStoreString(&parser->m_tempPool, enc,
 5062|      0|                                                 s + enc->minBytesPerChar,
 5063|      0|                                                 next - enc->minBytesPerChar);
 5064|      0|        if (parser->m_doctypeSysid == NULL)
  ------------------
  |  Branch (5064:13): [True: 0, False: 0]
  ------------------
 5065|      0|          return XML_ERROR_NO_MEMORY;
 5066|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5067|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5068|      0|      }
 5069|     43|#ifdef XML_DTD
 5070|     43|      else
 5071|       |        /* use externalSubsetName to make parser->m_doctypeSysid non-NULL
 5072|       |           for the case where no parser->m_startDoctypeDeclHandler is set */
 5073|     43|        parser->m_doctypeSysid = externalSubsetName;
 5074|     43|#endif /* XML_DTD */
 5075|     43|      if (! dtd->standalone
  ------------------
  |  Branch (5075:11): [True: 42, False: 1]
  ------------------
 5076|     43|#ifdef XML_DTD
 5077|     43|          && ! parser->m_paramEntityParsing
  ------------------
  |  Branch (5077:14): [True: 42, False: 0]
  ------------------
 5078|     43|#endif /* XML_DTD */
 5079|     43|          && parser->m_notStandaloneHandler
  ------------------
  |  Branch (5079:14): [True: 0, False: 42]
  ------------------
 5080|     43|          && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (5080:14): [True: 0, False: 0]
  ------------------
 5081|      0|        return XML_ERROR_NOT_STANDALONE;
 5082|       |#ifndef XML_DTD
 5083|       |      break;
 5084|       |#else  /* XML_DTD */
 5085|     43|      if (! parser->m_declEntity) {
  ------------------
  |  Branch (5085:11): [True: 10, False: 33]
  ------------------
 5086|     10|        parser->m_declEntity = (ENTITY *)lookup(
 5087|     10|            parser, &dtd->paramEntities, externalSubsetName, sizeof(ENTITY));
 5088|     10|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5088:13): [True: 0, False: 10]
  ------------------
 5089|      0|          return XML_ERROR_NO_MEMORY;
 5090|     10|        parser->m_declEntity->publicId = NULL;
 5091|     10|      }
 5092|     43|#endif /* XML_DTD */
 5093|       |      /* fall through */
 5094|  4.23k|    case XML_ROLE_ENTITY_SYSTEM_ID:
  ------------------
  |  Branch (5094:5): [True: 4.19k, False: 4.76M]
  ------------------
 5095|  4.23k|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (5095:11): [True: 3.91k, False: 326]
  |  Branch (5095:34): [True: 557, False: 3.35k]
  ------------------
 5096|    557|        parser->m_declEntity->systemId
 5097|    557|            = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 5098|    557|                              next - enc->minBytesPerChar);
 5099|    557|        if (! parser->m_declEntity->systemId)
  ------------------
  |  Branch (5099:13): [True: 0, False: 557]
  ------------------
 5100|      0|          return XML_ERROR_NO_MEMORY;
 5101|    557|        parser->m_declEntity->base = parser->m_curBase;
 5102|    557|        poolFinish(&dtd->pool);
  ------------------
  |  |  600|    557|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5103|       |        /* Don't suppress the default handler if we fell through from
 5104|       |         * the XML_ROLE_DOCTYPE_SYSTEM_ID case.
 5105|       |         */
 5106|    557|        if (parser->m_entityDeclHandler && role == XML_ROLE_ENTITY_SYSTEM_ID)
  ------------------
  |  Branch (5106:13): [True: 0, False: 557]
  |  Branch (5106:44): [True: 0, False: 0]
  ------------------
 5107|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5108|    557|      }
 5109|  4.23k|      break;
 5110|  4.23k|    case XML_ROLE_ENTITY_COMPLETE:
  ------------------
  |  Branch (5110:5): [True: 3.50k, False: 4.76M]
  ------------------
 5111|  3.50k|      if (dtd->keepProcessing && parser->m_declEntity
  ------------------
  |  Branch (5111:11): [True: 3.24k, False: 259]
  |  Branch (5111:34): [True: 468, False: 2.77k]
  ------------------
 5112|  3.50k|          && parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5112:14): [True: 0, False: 468]
  ------------------
 5113|      0|        *eventEndPP = s;
 5114|      0|        parser->m_entityDeclHandler(
 5115|      0|            parser->m_handlerArg, parser->m_declEntity->name,
 5116|      0|            parser->m_declEntity->is_param, 0, 0, parser->m_declEntity->base,
 5117|      0|            parser->m_declEntity->systemId, parser->m_declEntity->publicId, 0);
 5118|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5119|      0|      }
 5120|  3.50k|      break;
 5121|    670|    case XML_ROLE_ENTITY_NOTATION_NAME:
  ------------------
  |  Branch (5121:5): [True: 670, False: 4.77M]
  ------------------
 5122|    670|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (5122:11): [True: 604, False: 66]
  |  Branch (5122:34): [True: 32, False: 572]
  ------------------
 5123|     32|        parser->m_declEntity->notation
 5124|     32|            = poolStoreString(&dtd->pool, enc, s, next);
 5125|     32|        if (! parser->m_declEntity->notation)
  ------------------
  |  Branch (5125:13): [True: 0, False: 32]
  ------------------
 5126|      0|          return XML_ERROR_NO_MEMORY;
 5127|     32|        poolFinish(&dtd->pool);
  ------------------
  |  |  600|     32|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5128|     32|        if (parser->m_unparsedEntityDeclHandler) {
  ------------------
  |  Branch (5128:13): [True: 0, False: 32]
  ------------------
 5129|      0|          *eventEndPP = s;
 5130|      0|          parser->m_unparsedEntityDeclHandler(
 5131|      0|              parser->m_handlerArg, parser->m_declEntity->name,
 5132|      0|              parser->m_declEntity->base, parser->m_declEntity->systemId,
 5133|      0|              parser->m_declEntity->publicId, parser->m_declEntity->notation);
 5134|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5135|     32|        } else if (parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5135:20): [True: 0, False: 32]
  ------------------
 5136|      0|          *eventEndPP = s;
 5137|      0|          parser->m_entityDeclHandler(
 5138|      0|              parser->m_handlerArg, parser->m_declEntity->name, 0, 0, 0,
 5139|      0|              parser->m_declEntity->base, parser->m_declEntity->systemId,
 5140|      0|              parser->m_declEntity->publicId, parser->m_declEntity->notation);
 5141|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5142|      0|        }
 5143|     32|      }
 5144|    670|      break;
 5145|  7.64k|    case XML_ROLE_GENERAL_ENTITY_NAME: {
  ------------------
  |  Branch (5145:5): [True: 7.64k, False: 4.76M]
  ------------------
 5146|  7.64k|      if (XmlPredefinedEntityName(enc, s, next)) {
  ------------------
  |  |  267|  7.64k|  (((enc)->predefinedEntityName)(enc, ptr, end))
  |  |  ------------------
  |  |  |  Branch (267:3): [True: 558, False: 7.09k]
  |  |  ------------------
  ------------------
 5147|    558|        parser->m_declEntity = NULL;
 5148|    558|        break;
 5149|    558|      }
 5150|  7.09k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5150:11): [True: 6.60k, False: 487]
  ------------------
 5151|  6.60k|        const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next);
 5152|  6.60k|        if (! name)
  ------------------
  |  Branch (5152:13): [True: 0, False: 6.60k]
  ------------------
 5153|      0|          return XML_ERROR_NO_MEMORY;
 5154|  6.60k|        parser->m_declEntity = (ENTITY *)lookup(parser, &dtd->generalEntities,
 5155|  6.60k|                                                name, sizeof(ENTITY));
 5156|  6.60k|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5156:13): [True: 0, False: 6.60k]
  ------------------
 5157|      0|          return XML_ERROR_NO_MEMORY;
 5158|  6.60k|        if (parser->m_declEntity->name != name) {
  ------------------
  |  Branch (5158:13): [True: 2.90k, False: 3.69k]
  ------------------
 5159|  2.90k|          poolDiscard(&dtd->pool);
  ------------------
  |  |  599|  2.90k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5160|  2.90k|          parser->m_declEntity = NULL;
 5161|  3.69k|        } else {
 5162|  3.69k|          poolFinish(&dtd->pool);
  ------------------
  |  |  600|  3.69k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5163|  3.69k|          parser->m_declEntity->publicId = NULL;
 5164|  3.69k|          parser->m_declEntity->is_param = XML_FALSE;
  ------------------
  |  |   56|  3.69k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5165|       |          /* if we have a parent parser or are reading an internal parameter
 5166|       |             entity, then the entity declaration is not considered "internal"
 5167|       |          */
 5168|  3.69k|          parser->m_declEntity->is_internal
 5169|  3.69k|              = ! (parser->m_parentParser || parser->m_openInternalEntities);
  ------------------
  |  Branch (5169:20): [True: 0, False: 3.69k]
  |  Branch (5169:46): [True: 0, False: 3.69k]
  ------------------
 5170|  3.69k|          if (parser->m_entityDeclHandler)
  ------------------
  |  Branch (5170:15): [True: 0, False: 3.69k]
  ------------------
 5171|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5172|  3.69k|        }
 5173|  6.60k|      } else {
 5174|    487|        poolDiscard(&dtd->pool);
  ------------------
  |  |  599|    487|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5175|    487|        parser->m_declEntity = NULL;
 5176|    487|      }
 5177|  7.09k|    } break;
 5178|  7.09k|    case XML_ROLE_PARAM_ENTITY_NAME:
  ------------------
  |  Branch (5178:5): [True: 4.67k, False: 4.76M]
  ------------------
 5179|  4.67k|#ifdef XML_DTD
 5180|  4.67k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5180:11): [True: 4.41k, False: 261]
  ------------------
 5181|  4.41k|        const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next);
 5182|  4.41k|        if (! name)
  ------------------
  |  Branch (5182:13): [True: 0, False: 4.41k]
  ------------------
 5183|      0|          return XML_ERROR_NO_MEMORY;
 5184|  4.41k|        parser->m_declEntity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 5185|  4.41k|                                                name, sizeof(ENTITY));
 5186|  4.41k|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5186:13): [True: 0, False: 4.41k]
  ------------------
 5187|      0|          return XML_ERROR_NO_MEMORY;
 5188|  4.41k|        if (parser->m_declEntity->name != name) {
  ------------------
  |  Branch (5188:13): [True: 3.92k, False: 488]
  ------------------
 5189|  3.92k|          poolDiscard(&dtd->pool);
  ------------------
  |  |  599|  3.92k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5190|  3.92k|          parser->m_declEntity = NULL;
 5191|  3.92k|        } else {
 5192|    488|          poolFinish(&dtd->pool);
  ------------------
  |  |  600|    488|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5193|    488|          parser->m_declEntity->publicId = NULL;
 5194|    488|          parser->m_declEntity->is_param = XML_TRUE;
  ------------------
  |  |   55|    488|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5195|       |          /* if we have a parent parser or are reading an internal parameter
 5196|       |             entity, then the entity declaration is not considered "internal"
 5197|       |          */
 5198|    488|          parser->m_declEntity->is_internal
 5199|    488|              = ! (parser->m_parentParser || parser->m_openInternalEntities);
  ------------------
  |  Branch (5199:20): [True: 0, False: 488]
  |  Branch (5199:46): [True: 0, False: 488]
  ------------------
 5200|    488|          if (parser->m_entityDeclHandler)
  ------------------
  |  Branch (5200:15): [True: 0, False: 488]
  ------------------
 5201|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5202|    488|        }
 5203|  4.41k|      } else {
 5204|    261|        poolDiscard(&dtd->pool);
  ------------------
  |  |  599|    261|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5205|    261|        parser->m_declEntity = NULL;
 5206|    261|      }
 5207|       |#else  /* not XML_DTD */
 5208|       |      parser->m_declEntity = NULL;
 5209|       |#endif /* XML_DTD */
 5210|  4.67k|      break;
 5211|  4.67k|    case XML_ROLE_NOTATION_NAME:
  ------------------
  |  Branch (5211:5): [True: 3.06k, False: 4.76M]
  ------------------
 5212|  3.06k|      parser->m_declNotationPublicId = NULL;
 5213|  3.06k|      parser->m_declNotationName = NULL;
 5214|  3.06k|      if (parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5214:11): [True: 0, False: 3.06k]
  ------------------
 5215|      0|        parser->m_declNotationName
 5216|      0|            = poolStoreString(&parser->m_tempPool, enc, s, next);
 5217|      0|        if (! parser->m_declNotationName)
  ------------------
  |  Branch (5217:13): [True: 0, False: 0]
  ------------------
 5218|      0|          return XML_ERROR_NO_MEMORY;
 5219|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5220|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5221|      0|      }
 5222|  3.06k|      break;
 5223|  3.06k|    case XML_ROLE_NOTATION_PUBLIC_ID:
  ------------------
  |  Branch (5223:5): [True: 2.77k, False: 4.77M]
  ------------------
 5224|  2.77k|      if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|  2.77k|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (5224:11): [True: 2, False: 2.77k]
  ------------------
 5225|      2|        return XML_ERROR_PUBLICID;
 5226|  2.77k|      if (parser
  ------------------
  |  Branch (5226:11): [True: 0, False: 2.77k]
  ------------------
 5227|  2.77k|              ->m_declNotationName) { /* means m_notationDeclHandler != NULL */
 5228|      0|        XML_Char *tem = poolStoreString(&parser->m_tempPool, enc,
 5229|      0|                                        s + enc->minBytesPerChar,
 5230|      0|                                        next - enc->minBytesPerChar);
 5231|      0|        if (! tem)
  ------------------
  |  Branch (5231:13): [True: 0, False: 0]
  ------------------
 5232|      0|          return XML_ERROR_NO_MEMORY;
 5233|      0|        normalizePublicId(tem);
 5234|      0|        parser->m_declNotationPublicId = tem;
 5235|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5236|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5237|      0|      }
 5238|  2.77k|      break;
 5239|  2.77k|    case XML_ROLE_NOTATION_SYSTEM_ID:
  ------------------
  |  Branch (5239:5): [True: 871, False: 4.77M]
  ------------------
 5240|    871|      if (parser->m_declNotationName && parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5240:11): [True: 0, False: 871]
  |  Branch (5240:41): [True: 0, False: 0]
  ------------------
 5241|      0|        const XML_Char *systemId = poolStoreString(&parser->m_tempPool, enc,
 5242|      0|                                                   s + enc->minBytesPerChar,
 5243|      0|                                                   next - enc->minBytesPerChar);
 5244|      0|        if (! systemId)
  ------------------
  |  Branch (5244:13): [True: 0, False: 0]
  ------------------
 5245|      0|          return XML_ERROR_NO_MEMORY;
 5246|      0|        *eventEndPP = s;
 5247|      0|        parser->m_notationDeclHandler(
 5248|      0|            parser->m_handlerArg, parser->m_declNotationName, parser->m_curBase,
 5249|      0|            systemId, parser->m_declNotationPublicId);
 5250|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5251|      0|      }
 5252|    871|      poolClear(&parser->m_tempPool);
 5253|    871|      break;
 5254|  2.15k|    case XML_ROLE_NOTATION_NO_SYSTEM_ID:
  ------------------
  |  Branch (5254:5): [True: 2.15k, False: 4.77M]
  ------------------
 5255|  2.15k|      if (parser->m_declNotationPublicId && parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5255:11): [True: 0, False: 2.15k]
  |  Branch (5255:45): [True: 0, False: 0]
  ------------------
 5256|      0|        *eventEndPP = s;
 5257|      0|        parser->m_notationDeclHandler(
 5258|      0|            parser->m_handlerArg, parser->m_declNotationName, parser->m_curBase,
 5259|      0|            0, parser->m_declNotationPublicId);
 5260|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5261|      0|      }
 5262|  2.15k|      poolClear(&parser->m_tempPool);
 5263|  2.15k|      break;
 5264|  1.34k|    case XML_ROLE_ERROR:
  ------------------
  |  Branch (5264:5): [True: 1.34k, False: 4.77M]
  ------------------
 5265|  1.34k|      switch (tok) {
 5266|      3|      case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|      3|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (5266:7): [True: 3, False: 1.34k]
  ------------------
 5267|       |        /* PE references in internal subset are
 5268|       |           not allowed within declarations. */
 5269|      3|        return XML_ERROR_PARAM_ENTITY_REF;
 5270|      1|      case XML_TOK_XML_DECL:
  ------------------
  |  |   77|      1|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (5270:7): [True: 1, False: 1.34k]
  ------------------
 5271|      1|        return XML_ERROR_MISPLACED_XML_PI;
 5272|  1.33k|      default:
  ------------------
  |  Branch (5272:7): [True: 1.33k, False: 4]
  ------------------
 5273|  1.33k|        return XML_ERROR_SYNTAX;
 5274|  1.34k|      }
 5275|      0|#ifdef XML_DTD
 5276|      0|    case XML_ROLE_IGNORE_SECT: {
  ------------------
  |  Branch (5276:5): [True: 0, False: 4.77M]
  ------------------
 5277|      0|      enum XML_Error result;
 5278|      0|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (5278:11): [True: 0, False: 0]
  ------------------
 5279|      0|        reportDefault(parser, enc, s, next);
 5280|      0|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5281|      0|      result = doIgnoreSection(parser, enc, &next, end, nextPtr, haveMore);
 5282|      0|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5282:11): [True: 0, False: 0]
  ------------------
 5283|      0|        return result;
 5284|      0|      else if (! next) {
  ------------------
  |  Branch (5284:16): [True: 0, False: 0]
  ------------------
 5285|      0|        parser->m_processor = ignoreSectionProcessor;
 5286|      0|        return result;
 5287|      0|      }
 5288|      0|    } break;
 5289|      0|#endif /* XML_DTD */
 5290|  4.09M|    case XML_ROLE_GROUP_OPEN:
  ------------------
  |  Branch (5290:5): [True: 4.09M, False: 674k]
  ------------------
 5291|  4.09M|      if (parser->m_prologState.level >= parser->m_groupSize) {
  ------------------
  |  Branch (5291:11): [True: 1.18k, False: 4.09M]
  ------------------
 5292|  1.18k|        if (parser->m_groupSize) {
  ------------------
  |  Branch (5292:13): [True: 436, False: 751]
  ------------------
 5293|    436|          {
 5294|       |            /* Detect and prevent integer overflow */
 5295|    436|            if (parser->m_groupSize > (unsigned int)(-1) / 2u) {
  ------------------
  |  Branch (5295:17): [True: 0, False: 436]
  ------------------
 5296|      0|              return XML_ERROR_NO_MEMORY;
 5297|      0|            }
 5298|       |
 5299|    436|            char *const new_connector = (char *)REALLOC(
  ------------------
  |  |  714|    436|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 5300|    436|                parser, parser->m_groupConnector, parser->m_groupSize *= 2);
 5301|    436|            if (new_connector == NULL) {
  ------------------
  |  Branch (5301:17): [True: 0, False: 436]
  ------------------
 5302|      0|              parser->m_groupSize /= 2;
 5303|      0|              return XML_ERROR_NO_MEMORY;
 5304|      0|            }
 5305|    436|            parser->m_groupConnector = new_connector;
 5306|    436|          }
 5307|       |
 5308|    436|          if (dtd->scaffIndex) {
  ------------------
  |  Branch (5308:15): [True: 0, False: 436]
  ------------------
 5309|       |            /* Detect and prevent integer overflow.
 5310|       |             * The preprocessor guard addresses the "always false" warning
 5311|       |             * from -Wtype-limits on platforms where
 5312|       |             * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 5313|       |#if UINT_MAX >= SIZE_MAX
 5314|       |            if (parser->m_groupSize > (size_t)(-1) / sizeof(int)) {
 5315|       |              return XML_ERROR_NO_MEMORY;
 5316|       |            }
 5317|       |#endif
 5318|       |
 5319|      0|            int *const new_scaff_index = (int *)REALLOC(
  ------------------
  |  |  714|      0|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 5320|      0|                parser, dtd->scaffIndex, parser->m_groupSize * sizeof(int));
 5321|      0|            if (new_scaff_index == NULL)
  ------------------
  |  Branch (5321:17): [True: 0, False: 0]
  ------------------
 5322|      0|              return XML_ERROR_NO_MEMORY;
 5323|      0|            dtd->scaffIndex = new_scaff_index;
 5324|      0|          }
 5325|    751|        } else {
 5326|    751|          parser->m_groupConnector
 5327|    751|              = (char *)MALLOC(parser, parser->m_groupSize = 32);
  ------------------
  |  |  713|    751|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5328|    751|          if (! parser->m_groupConnector) {
  ------------------
  |  Branch (5328:15): [True: 0, False: 751]
  ------------------
 5329|      0|            parser->m_groupSize = 0;
 5330|      0|            return XML_ERROR_NO_MEMORY;
 5331|      0|          }
 5332|    751|        }
 5333|  1.18k|      }
 5334|  4.09M|      parser->m_groupConnector[parser->m_prologState.level] = 0;
 5335|  4.09M|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5335:11): [True: 0, False: 4.09M]
  ------------------
 5336|      0|        int myindex = nextScaffoldPart(parser);
 5337|      0|        if (myindex < 0)
  ------------------
  |  Branch (5337:13): [True: 0, False: 0]
  ------------------
 5338|      0|          return XML_ERROR_NO_MEMORY;
 5339|      0|        assert(dtd->scaffIndex != NULL);
 5340|      0|        dtd->scaffIndex[dtd->scaffLevel] = myindex;
 5341|      0|        dtd->scaffLevel++;
 5342|      0|        dtd->scaffold[myindex].type = XML_CTYPE_SEQ;
 5343|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5343:13): [True: 0, False: 0]
  ------------------
 5344|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5345|      0|      }
 5346|  4.09M|      break;
 5347|  4.09M|    case XML_ROLE_GROUP_SEQUENCE:
  ------------------
  |  Branch (5347:5): [True: 11.6k, False: 4.76M]
  ------------------
 5348|  11.6k|      if (parser->m_groupConnector[parser->m_prologState.level] == ASCII_PIPE)
  ------------------
  |  |  122|  11.6k|#define ASCII_PIPE 0x7C
  ------------------
  |  Branch (5348:11): [True: 1, False: 11.6k]
  ------------------
 5349|      1|        return XML_ERROR_SYNTAX;
 5350|  11.6k|      parser->m_groupConnector[parser->m_prologState.level] = ASCII_COMMA;
  ------------------
  |  |  123|  11.6k|#define ASCII_COMMA 0x2C
  ------------------
 5351|  11.6k|      if (dtd->in_eldecl && parser->m_elementDeclHandler)
  ------------------
  |  Branch (5351:11): [True: 0, False: 11.6k]
  |  Branch (5351:29): [True: 0, False: 0]
  ------------------
 5352|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5353|  11.6k|      break;
 5354|  15.2k|    case XML_ROLE_GROUP_CHOICE:
  ------------------
  |  Branch (5354:5): [True: 15.2k, False: 4.75M]
  ------------------
 5355|  15.2k|      if (parser->m_groupConnector[parser->m_prologState.level] == ASCII_COMMA)
  ------------------
  |  |  123|  15.2k|#define ASCII_COMMA 0x2C
  ------------------
  |  Branch (5355:11): [True: 1, False: 15.2k]
  ------------------
 5356|      1|        return XML_ERROR_SYNTAX;
 5357|  15.2k|      if (dtd->in_eldecl
  ------------------
  |  Branch (5357:11): [True: 0, False: 15.2k]
  ------------------
 5358|  15.2k|          && ! parser->m_groupConnector[parser->m_prologState.level]
  ------------------
  |  Branch (5358:14): [True: 0, False: 0]
  ------------------
 5359|  15.2k|          && (dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type
  ------------------
  |  Branch (5359:14): [True: 0, False: 0]
  ------------------
 5360|      0|              != XML_CTYPE_MIXED)) {
 5361|      0|        dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type
 5362|      0|            = XML_CTYPE_CHOICE;
 5363|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5363:13): [True: 0, False: 0]
  ------------------
 5364|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5365|      0|      }
 5366|  15.2k|      parser->m_groupConnector[parser->m_prologState.level] = ASCII_PIPE;
  ------------------
  |  |  122|  15.2k|#define ASCII_PIPE 0x7C
  ------------------
 5367|  15.2k|      break;
 5368|  3.29k|    case XML_ROLE_PARAM_ENTITY_REF:
  ------------------
  |  Branch (5368:5): [True: 3.29k, False: 4.76M]
  ------------------
 5369|  3.29k|#ifdef XML_DTD
 5370|  3.29k|    case XML_ROLE_INNER_PARAM_ENTITY_REF:
  ------------------
  |  Branch (5370:5): [True: 0, False: 4.77M]
  ------------------
 5371|  3.29k|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|  3.29k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5372|  3.29k|      if (! parser->m_paramEntityParsing)
  ------------------
  |  Branch (5372:11): [True: 3.29k, False: 0]
  ------------------
 5373|  3.29k|        dtd->keepProcessing = dtd->standalone;
 5374|      0|      else {
 5375|      0|        const XML_Char *name;
 5376|      0|        ENTITY *entity;
 5377|      0|        name = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 5378|      0|                               next - enc->minBytesPerChar);
 5379|      0|        if (! name)
  ------------------
  |  Branch (5379:13): [True: 0, False: 0]
  ------------------
 5380|      0|          return XML_ERROR_NO_MEMORY;
 5381|      0|        entity = (ENTITY *)lookup(parser, &dtd->paramEntities, name, 0);
 5382|      0|        poolDiscard(&dtd->pool);
  ------------------
  |  |  599|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5383|       |        /* first, determine if a check for an existing declaration is needed;
 5384|       |           if yes, check that the entity exists, and that it is internal,
 5385|       |           otherwise call the skipped entity handler
 5386|       |        */
 5387|      0|        if (parser->m_prologState.documentEntity
  ------------------
  |  Branch (5387:13): [True: 0, False: 0]
  ------------------
 5388|      0|            && (dtd->standalone ? ! parser->m_openInternalEntities
  ------------------
  |  Branch (5388:16): [True: 0, False: 0]
  |  Branch (5388:17): [True: 0, False: 0]
  ------------------
 5389|      0|                                : ! dtd->hasParamEntityRefs)) {
 5390|      0|          if (! entity)
  ------------------
  |  Branch (5390:15): [True: 0, False: 0]
  ------------------
 5391|      0|            return XML_ERROR_UNDEFINED_ENTITY;
 5392|      0|          else if (! entity->is_internal) {
  ------------------
  |  Branch (5392:20): [True: 0, False: 0]
  ------------------
 5393|       |            /* It's hard to exhaustively search the code to be sure,
 5394|       |             * but there doesn't seem to be a way of executing the
 5395|       |             * following line.  There are two cases:
 5396|       |             *
 5397|       |             * If 'standalone' is false, the DTD must have no
 5398|       |             * parameter entities or we wouldn't have passed the outer
 5399|       |             * 'if' statement.  That means the only entity in the hash
 5400|       |             * table is the external subset name "#" which cannot be
 5401|       |             * given as a parameter entity name in XML syntax, so the
 5402|       |             * lookup must have returned NULL and we don't even reach
 5403|       |             * the test for an internal entity.
 5404|       |             *
 5405|       |             * If 'standalone' is true, it does not seem to be
 5406|       |             * possible to create entities taking this code path that
 5407|       |             * are not internal entities, so fail the test above.
 5408|       |             *
 5409|       |             * Because this analysis is very uncertain, the code is
 5410|       |             * being left in place and merely removed from the
 5411|       |             * coverage test statistics.
 5412|       |             */
 5413|      0|            return XML_ERROR_ENTITY_DECLARED_IN_PE; /* LCOV_EXCL_LINE */
 5414|      0|          }
 5415|      0|        } else if (! entity) {
  ------------------
  |  Branch (5415:20): [True: 0, False: 0]
  ------------------
 5416|      0|          dtd->keepProcessing = dtd->standalone;
 5417|       |          /* cannot report skipped entities in declarations */
 5418|      0|          if ((role == XML_ROLE_PARAM_ENTITY_REF)
  ------------------
  |  Branch (5418:15): [True: 0, False: 0]
  ------------------
 5419|      0|              && parser->m_skippedEntityHandler) {
  ------------------
  |  Branch (5419:18): [True: 0, False: 0]
  ------------------
 5420|      0|            parser->m_skippedEntityHandler(parser->m_handlerArg, name, 1);
 5421|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5422|      0|          }
 5423|      0|          break;
 5424|      0|        }
 5425|      0|        if (entity->open)
  ------------------
  |  Branch (5425:13): [True: 0, False: 0]
  ------------------
 5426|      0|          return XML_ERROR_RECURSIVE_ENTITY_REF;
 5427|      0|        if (entity->textPtr) {
  ------------------
  |  Branch (5427:13): [True: 0, False: 0]
  ------------------
 5428|      0|          enum XML_Error result;
 5429|      0|          XML_Bool betweenDecl
 5430|      0|              = (role == XML_ROLE_PARAM_ENTITY_REF ? XML_TRUE : XML_FALSE);
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
                            = (role == XML_ROLE_PARAM_ENTITY_REF ? XML_TRUE : XML_FALSE);
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
  |  Branch (5430:18): [True: 0, False: 0]
  ------------------
 5431|      0|          result = processInternalEntity(parser, entity, betweenDecl);
 5432|      0|          if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5432:15): [True: 0, False: 0]
  ------------------
 5433|      0|            return result;
 5434|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5435|      0|          break;
 5436|      0|        }
 5437|      0|        if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (5437:13): [True: 0, False: 0]
  ------------------
 5438|      0|          dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5439|      0|          entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5440|      0|          entityTrackingOnOpen(parser, entity, __LINE__);
 5441|      0|          if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (5441:15): [True: 0, False: 0]
  ------------------
 5442|      0|                  parser->m_externalEntityRefHandlerArg, 0, entity->base,
 5443|      0|                  entity->systemId, entity->publicId)) {
 5444|      0|            entityTrackingOnClose(parser, entity, __LINE__);
 5445|      0|            entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5446|      0|            return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 5447|      0|          }
 5448|      0|          entityTrackingOnClose(parser, entity, __LINE__);
 5449|      0|          entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5450|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5451|      0|          if (! dtd->paramEntityRead) {
  ------------------
  |  Branch (5451:15): [True: 0, False: 0]
  ------------------
 5452|      0|            dtd->keepProcessing = dtd->standalone;
 5453|      0|            break;
 5454|      0|          }
 5455|      0|        } else {
 5456|      0|          dtd->keepProcessing = dtd->standalone;
 5457|      0|          break;
 5458|      0|        }
 5459|      0|      }
 5460|  3.29k|#endif /* XML_DTD */
 5461|  3.29k|      if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (5461:11): [True: 3.09k, False: 202]
  |  Branch (5461:32): [True: 0, False: 3.09k]
  ------------------
 5462|  3.29k|          && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (5462:14): [True: 0, False: 0]
  ------------------
 5463|      0|        return XML_ERROR_NOT_STANDALONE;
 5464|  3.29k|      break;
 5465|       |
 5466|       |      /* Element declaration stuff */
 5467|       |
 5468|  5.85k|    case XML_ROLE_ELEMENT_NAME:
  ------------------
  |  Branch (5468:5): [True: 5.85k, False: 4.76M]
  ------------------
 5469|  5.85k|      if (parser->m_elementDeclHandler) {
  ------------------
  |  Branch (5469:11): [True: 0, False: 5.85k]
  ------------------
 5470|      0|        parser->m_declElementType = getElementType(parser, enc, s, next);
 5471|      0|        if (! parser->m_declElementType)
  ------------------
  |  Branch (5471:13): [True: 0, False: 0]
  ------------------
 5472|      0|          return XML_ERROR_NO_MEMORY;
 5473|      0|        dtd->scaffLevel = 0;
 5474|      0|        dtd->scaffCount = 0;
 5475|      0|        dtd->in_eldecl = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5476|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5477|      0|      }
 5478|  5.85k|      break;
 5479|       |
 5480|  5.85k|    case XML_ROLE_CONTENT_ANY:
  ------------------
  |  Branch (5480:5): [True: 196, False: 4.77M]
  ------------------
 5481|    214|    case XML_ROLE_CONTENT_EMPTY:
  ------------------
  |  Branch (5481:5): [True: 18, False: 4.77M]
  ------------------
 5482|    214|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5482:11): [True: 0, False: 214]
  ------------------
 5483|      0|        if (parser->m_elementDeclHandler) {
  ------------------
  |  Branch (5483:13): [True: 0, False: 0]
  ------------------
 5484|      0|          XML_Content *content
 5485|      0|              = (XML_Content *)MALLOC(parser, sizeof(XML_Content));
  ------------------
  |  |  713|      0|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5486|      0|          if (! content)
  ------------------
  |  Branch (5486:15): [True: 0, False: 0]
  ------------------
 5487|      0|            return XML_ERROR_NO_MEMORY;
 5488|      0|          content->quant = XML_CQUANT_NONE;
 5489|      0|          content->name = NULL;
 5490|      0|          content->numchildren = 0;
 5491|      0|          content->children = NULL;
 5492|      0|          content->type = ((role == XML_ROLE_CONTENT_ANY) ? XML_CTYPE_ANY
  ------------------
  |  Branch (5492:28): [True: 0, False: 0]
  ------------------
 5493|      0|                                                          : XML_CTYPE_EMPTY);
 5494|      0|          *eventEndPP = s;
 5495|      0|          parser->m_elementDeclHandler(
 5496|      0|              parser->m_handlerArg, parser->m_declElementType->name, content);
 5497|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5498|      0|        }
 5499|      0|        dtd->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5500|      0|      }
 5501|    214|      break;
 5502|       |
 5503|  2.75k|    case XML_ROLE_CONTENT_PCDATA:
  ------------------
  |  Branch (5503:5): [True: 2.75k, False: 4.77M]
  ------------------
 5504|  2.75k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5504:11): [True: 0, False: 2.75k]
  ------------------
 5505|      0|        dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type
 5506|      0|            = XML_CTYPE_MIXED;
 5507|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5507:13): [True: 0, False: 0]
  ------------------
 5508|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5509|      0|      }
 5510|  2.75k|      break;
 5511|       |
 5512|  24.0k|    case XML_ROLE_CONTENT_ELEMENT:
  ------------------
  |  Branch (5512:5): [True: 24.0k, False: 4.74M]
  ------------------
 5513|  24.0k|      quant = XML_CQUANT_NONE;
 5514|  24.0k|      goto elementContent;
 5515|  1.82k|    case XML_ROLE_CONTENT_ELEMENT_OPT:
  ------------------
  |  Branch (5515:5): [True: 1.82k, False: 4.77M]
  ------------------
 5516|  1.82k|      quant = XML_CQUANT_OPT;
 5517|  1.82k|      goto elementContent;
 5518|  1.22k|    case XML_ROLE_CONTENT_ELEMENT_REP:
  ------------------
  |  Branch (5518:5): [True: 1.22k, False: 4.77M]
  ------------------
 5519|  1.22k|      quant = XML_CQUANT_REP;
 5520|  1.22k|      goto elementContent;
 5521|  4.12k|    case XML_ROLE_CONTENT_ELEMENT_PLUS:
  ------------------
  |  Branch (5521:5): [True: 4.12k, False: 4.76M]
  ------------------
 5522|  4.12k|      quant = XML_CQUANT_PLUS;
 5523|  31.1k|    elementContent:
 5524|  31.1k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5524:11): [True: 0, False: 31.1k]
  ------------------
 5525|      0|        ELEMENT_TYPE *el;
 5526|      0|        const XML_Char *name;
 5527|      0|        size_t nameLen;
 5528|      0|        const char *nxt
 5529|      0|            = (quant == XML_CQUANT_NONE ? next : next - enc->minBytesPerChar);
  ------------------
  |  Branch (5529:16): [True: 0, False: 0]
  ------------------
 5530|      0|        int myindex = nextScaffoldPart(parser);
 5531|      0|        if (myindex < 0)
  ------------------
  |  Branch (5531:13): [True: 0, False: 0]
  ------------------
 5532|      0|          return XML_ERROR_NO_MEMORY;
 5533|      0|        dtd->scaffold[myindex].type = XML_CTYPE_NAME;
 5534|      0|        dtd->scaffold[myindex].quant = quant;
 5535|      0|        el = getElementType(parser, enc, s, nxt);
 5536|      0|        if (! el)
  ------------------
  |  Branch (5536:13): [True: 0, False: 0]
  ------------------
 5537|      0|          return XML_ERROR_NO_MEMORY;
 5538|      0|        name = el->name;
 5539|      0|        dtd->scaffold[myindex].name = name;
 5540|      0|        nameLen = 0;
 5541|      0|        for (; name[nameLen++];)
  ------------------
  |  Branch (5541:16): [True: 0, False: 0]
  ------------------
 5542|      0|          ;
 5543|       |
 5544|       |        /* Detect and prevent integer overflow */
 5545|      0|        if (nameLen > UINT_MAX - dtd->contentStringLen) {
  ------------------
  |  Branch (5545:13): [True: 0, False: 0]
  ------------------
 5546|      0|          return XML_ERROR_NO_MEMORY;
 5547|      0|        }
 5548|       |
 5549|      0|        dtd->contentStringLen += (unsigned)nameLen;
 5550|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5550:13): [True: 0, False: 0]
  ------------------
 5551|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5552|      0|      }
 5553|  31.1k|      break;
 5554|       |
 5555|  31.1k|    case XML_ROLE_GROUP_CLOSE:
  ------------------
  |  Branch (5555:5): [True: 25.2k, False: 4.74M]
  ------------------
 5556|  25.2k|      quant = XML_CQUANT_NONE;
 5557|  25.2k|      goto closeGroup;
 5558|  3.73k|    case XML_ROLE_GROUP_CLOSE_OPT:
  ------------------
  |  Branch (5558:5): [True: 3.73k, False: 4.76M]
  ------------------
 5559|  3.73k|      quant = XML_CQUANT_OPT;
 5560|  3.73k|      goto closeGroup;
 5561|  5.24k|    case XML_ROLE_GROUP_CLOSE_REP:
  ------------------
  |  Branch (5561:5): [True: 5.24k, False: 4.76M]
  ------------------
 5562|  5.24k|      quant = XML_CQUANT_REP;
 5563|  5.24k|      goto closeGroup;
 5564|  5.14k|    case XML_ROLE_GROUP_CLOSE_PLUS:
  ------------------
  |  Branch (5564:5): [True: 5.14k, False: 4.76M]
  ------------------
 5565|  5.14k|      quant = XML_CQUANT_PLUS;
 5566|  39.4k|    closeGroup:
 5567|  39.4k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5567:11): [True: 0, False: 39.4k]
  ------------------
 5568|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5568:13): [True: 0, False: 0]
  ------------------
 5569|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5570|      0|        dtd->scaffLevel--;
 5571|      0|        dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel]].quant = quant;
 5572|      0|        if (dtd->scaffLevel == 0) {
  ------------------
  |  Branch (5572:13): [True: 0, False: 0]
  ------------------
 5573|      0|          if (! handleDefault) {
  ------------------
  |  Branch (5573:15): [True: 0, False: 0]
  ------------------
 5574|      0|            XML_Content *model = build_model(parser);
 5575|      0|            if (! model)
  ------------------
  |  Branch (5575:17): [True: 0, False: 0]
  ------------------
 5576|      0|              return XML_ERROR_NO_MEMORY;
 5577|      0|            *eventEndPP = s;
 5578|      0|            parser->m_elementDeclHandler(
 5579|      0|                parser->m_handlerArg, parser->m_declElementType->name, model);
 5580|      0|          }
 5581|      0|          dtd->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5582|      0|          dtd->contentStringLen = 0;
 5583|      0|        }
 5584|      0|      }
 5585|  39.4k|      break;
 5586|       |      /* End element declaration stuff */
 5587|       |
 5588|  39.4k|    case XML_ROLE_PI:
  ------------------
  |  Branch (5588:5): [True: 6.07k, False: 4.76M]
  ------------------
 5589|  6.07k|      if (! reportProcessingInstruction(parser, enc, s, next))
  ------------------
  |  Branch (5589:11): [True: 0, False: 6.07k]
  ------------------
 5590|      0|        return XML_ERROR_NO_MEMORY;
 5591|  6.07k|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|  6.07k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5592|  6.07k|      break;
 5593|  1.36k|    case XML_ROLE_COMMENT:
  ------------------
  |  Branch (5593:5): [True: 1.36k, False: 4.77M]
  ------------------
 5594|  1.36k|      if (! reportComment(parser, enc, s, next))
  ------------------
  |  Branch (5594:11): [True: 0, False: 1.36k]
  ------------------
 5595|      0|        return XML_ERROR_NO_MEMORY;
 5596|  1.36k|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|  1.36k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5597|  1.36k|      break;
 5598|  11.5k|    case XML_ROLE_NONE:
  ------------------
  |  Branch (5598:5): [True: 11.5k, False: 4.76M]
  ------------------
 5599|  11.5k|      switch (tok) {
  ------------------
  |  Branch (5599:15): [True: 4.32k, False: 7.23k]
  ------------------
 5600|  7.23k|      case XML_TOK_BOM:
  ------------------
  |  |   79|  7.23k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
  |  Branch (5600:7): [True: 7.23k, False: 4.32k]
  ------------------
 5601|  7.23k|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|  7.23k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5602|  7.23k|        break;
 5603|  11.5k|      }
 5604|  11.5k|      break;
 5605|  17.2k|    case XML_ROLE_DOCTYPE_NONE:
  ------------------
  |  Branch (5605:5): [True: 17.2k, False: 4.75M]
  ------------------
 5606|  17.2k|      if (parser->m_startDoctypeDeclHandler)
  ------------------
  |  Branch (5606:11): [True: 0, False: 17.2k]
  ------------------
 5607|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5608|  17.2k|      break;
 5609|  71.3k|    case XML_ROLE_ENTITY_NONE:
  ------------------
  |  Branch (5609:5): [True: 71.3k, False: 4.70M]
  ------------------
 5610|  71.3k|      if (dtd->keepProcessing && parser->m_entityDeclHandler)
  ------------------
  |  Branch (5610:11): [True: 66.5k, False: 4.80k]
  |  Branch (5610:34): [True: 0, False: 66.5k]
  ------------------
 5611|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5612|  71.3k|      break;
 5613|  18.2k|    case XML_ROLE_NOTATION_NONE:
  ------------------
  |  Branch (5613:5): [True: 18.2k, False: 4.75M]
  ------------------
 5614|  18.2k|      if (parser->m_notationDeclHandler)
  ------------------
  |  Branch (5614:11): [True: 0, False: 18.2k]
  ------------------
 5615|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5616|  18.2k|      break;
 5617|   206k|    case XML_ROLE_ATTLIST_NONE:
  ------------------
  |  Branch (5617:5): [True: 206k, False: 4.56M]
  ------------------
 5618|   206k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler)
  ------------------
  |  Branch (5618:11): [True: 202k, False: 4.27k]
  |  Branch (5618:34): [True: 0, False: 202k]
  ------------------
 5619|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5620|   206k|      break;
 5621|  38.9k|    case XML_ROLE_ELEMENT_NONE:
  ------------------
  |  Branch (5621:5): [True: 38.9k, False: 4.73M]
  ------------------
 5622|  38.9k|      if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5622:11): [True: 0, False: 38.9k]
  ------------------
 5623|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5624|  38.9k|      break;
 5625|  4.77M|    } /* end of big switch */
 5626|       |
 5627|  4.75M|    if (handleDefault && parser->m_defaultHandler)
  ------------------
  |  Branch (5627:9): [True: 4.74M, False: 14.7k]
  |  Branch (5627:26): [True: 0, False: 4.74M]
  ------------------
 5628|      0|      reportDefault(parser, enc, s, next);
 5629|       |
 5630|  4.75M|    switch (parser->m_parsingStatus.parsing) {
 5631|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (5631:5): [True: 0, False: 4.75M]
  ------------------
 5632|      0|      *nextPtr = next;
 5633|      0|      return XML_ERROR_NONE;
 5634|      0|    case XML_FINISHED:
  ------------------
  |  Branch (5634:5): [True: 0, False: 4.75M]
  ------------------
 5635|      0|      return XML_ERROR_ABORTED;
 5636|  4.75M|    default:
  ------------------
  |  Branch (5636:5): [True: 4.75M, False: 0]
  ------------------
 5637|  4.75M|      s = next;
 5638|  4.75M|      tok = XmlPrologTok(enc, s, end, &next);
  ------------------
  |  |  227|  4.75M|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  4.75M|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5639|  4.75M|    }
 5640|  4.75M|  }
 5641|       |  /* not reached */
 5642|  19.7k|}
xmlparse.c:accountingDiffTolerated:
 7736|  59.1M|                        enum XML_Account account) {
 7737|       |  /* Note: We need to check the token type *first* to be sure that
 7738|       |   *       we can even access variable <after>, safely.
 7739|       |   *       E.g. for XML_TOK_NONE <after> may hold an invalid pointer. */
 7740|  59.1M|  switch (tok) {
  ------------------
  |  Branch (7740:11): [True: 58.3M, False: 867k]
  ------------------
 7741|  2.45k|  case XML_TOK_INVALID:
  ------------------
  |  |   57|  2.45k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (7741:3): [True: 2.45k, False: 59.1M]
  ------------------
 7742|  4.93k|  case XML_TOK_PARTIAL:
  ------------------
  |  |   56|  4.93k|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (7742:3): [True: 2.48k, False: 59.1M]
  ------------------
 7743|  5.38k|  case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|  5.38k|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (7743:3): [True: 448, False: 59.1M]
  ------------------
 7744|   867k|  case XML_TOK_NONE:
  ------------------
  |  |   51|   867k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (7744:3): [True: 861k, False: 58.3M]
  ------------------
 7745|   867k|    return XML_TRUE;
  ------------------
  |  |   55|   867k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7746|  59.1M|  }
 7747|       |
 7748|  58.3M|  if (account == XML_ACCOUNT_NONE)
  ------------------
  |  Branch (7748:7): [True: 1.15M, False: 57.1M]
  ------------------
 7749|  1.15M|    return XML_TRUE; /* because these bytes have been accounted for, already */
  ------------------
  |  |   55|  1.15M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7750|       |
 7751|  57.1M|  unsigned int levelsAwayFromRootParser;
 7752|  57.1M|  const XML_Parser rootParser
 7753|  57.1M|      = getRootParserOf(originParser, &levelsAwayFromRootParser);
 7754|  57.1M|  assert(! rootParser->m_parentParser);
 7755|       |
 7756|  57.1M|  const int isDirect
 7757|  57.1M|      = (account == XML_ACCOUNT_DIRECT) && (originParser == rootParser);
  ------------------
  |  Branch (7757:9): [True: 6.85M, False: 50.3M]
  |  Branch (7757:44): [True: 6.85M, False: 0]
  ------------------
 7758|  57.1M|  const ptrdiff_t bytesMore = after - before;
 7759|       |
 7760|  57.1M|  XmlBigCount *const additionTarget
 7761|  57.1M|      = isDirect ? &rootParser->m_accounting.countBytesDirect
  ------------------
  |  Branch (7761:9): [True: 6.85M, False: 50.3M]
  ------------------
 7762|  57.1M|                 : &rootParser->m_accounting.countBytesIndirect;
 7763|       |
 7764|       |  /* Detect and avoid integer overflow */
 7765|  57.1M|  if (*additionTarget > (XmlBigCount)(-1) - (XmlBigCount)bytesMore)
  ------------------
  |  Branch (7765:7): [True: 0, False: 57.1M]
  ------------------
 7766|      0|    return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7767|  57.1M|  *additionTarget += bytesMore;
 7768|       |
 7769|  57.1M|  const XmlBigCount countBytesOutput
 7770|  57.1M|      = rootParser->m_accounting.countBytesDirect
 7771|  57.1M|        + rootParser->m_accounting.countBytesIndirect;
 7772|  57.1M|  const float amplificationFactor
 7773|  57.1M|      = accountingGetCurrentAmplification(rootParser);
 7774|  57.1M|  const XML_Bool tolerated
 7775|  57.1M|      = (countBytesOutput < rootParser->m_accounting.activationThresholdBytes)
  ------------------
  |  Branch (7775:9): [True: 35.1M, False: 21.9M]
  ------------------
 7776|  57.1M|        || (amplificationFactor
  ------------------
  |  Branch (7776:12): [True: 21.9M, False: 36]
  ------------------
 7777|  21.9M|            <= rootParser->m_accounting.maximumAmplificationFactor);
 7778|       |
 7779|  57.1M|  if (rootParser->m_accounting.debugLevel >= 2u) {
  ------------------
  |  Branch (7779:7): [True: 0, False: 57.1M]
  ------------------
 7780|      0|    accountingReportStats(rootParser, "");
 7781|      0|    accountingReportDiff(rootParser, levelsAwayFromRootParser, before, after,
 7782|      0|                         bytesMore, source_line, account);
 7783|      0|  }
 7784|       |
 7785|  57.1M|  return tolerated;
 7786|  57.1M|}
xmlparse.c:getRootParserOf:
 7851|  58.8M|getRootParserOf(XML_Parser parser, unsigned int *outLevelDiff) {
 7852|  58.8M|  XML_Parser rootParser = parser;
 7853|  58.8M|  unsigned int stepsTakenUpwards = 0;
 7854|  58.8M|  while (rootParser->m_parentParser) {
  ------------------
  |  Branch (7854:10): [True: 0, False: 58.8M]
  ------------------
 7855|      0|    rootParser = rootParser->m_parentParser;
 7856|      0|    stepsTakenUpwards++;
 7857|      0|  }
 7858|  58.8M|  assert(! rootParser->m_parentParser);
 7859|  58.8M|  if (outLevelDiff != NULL) {
  ------------------
  |  Branch (7859:7): [True: 57.1M, False: 1.66M]
  ------------------
 7860|  57.1M|    *outLevelDiff = stepsTakenUpwards;
 7861|  57.1M|  }
 7862|  58.8M|  return rootParser;
 7863|  58.8M|}
xmlparse.c:accountingGetCurrentAmplification:
 7659|  57.1M|accountingGetCurrentAmplification(XML_Parser rootParser) {
 7660|  57.1M|  const XmlBigCount countBytesOutput
 7661|  57.1M|      = rootParser->m_accounting.countBytesDirect
 7662|  57.1M|        + rootParser->m_accounting.countBytesIndirect;
 7663|  57.1M|  const float amplificationFactor
 7664|  57.1M|      = rootParser->m_accounting.countBytesDirect
  ------------------
  |  Branch (7664:9): [True: 57.1M, False: 0]
  ------------------
 7665|  57.1M|            ? (countBytesOutput
 7666|  57.1M|               / (float)(rootParser->m_accounting.countBytesDirect))
 7667|  57.1M|            : 1.0f;
 7668|  57.1M|  assert(! rootParser->m_parentParser);
 7669|  57.1M|  return amplificationFactor;
 7670|  57.1M|}
xmlparse.c:accountingReportStats:
 7673|     36|accountingReportStats(XML_Parser originParser, const char *epilog) {
 7674|     36|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7675|     36|  assert(! rootParser->m_parentParser);
 7676|       |
 7677|     36|  if (rootParser->m_accounting.debugLevel == 0u) {
  ------------------
  |  Branch (7677:7): [True: 36, False: 0]
  ------------------
 7678|     36|    return;
 7679|     36|  }
 7680|       |
 7681|      0|  const float amplificationFactor
 7682|      0|      = accountingGetCurrentAmplification(rootParser);
 7683|      0|  fprintf(stderr,
 7684|      0|          "expat: Accounting(%p): Direct " EXPAT_FMT_ULL(
 7685|      0|              "10") ", indirect " EXPAT_FMT_ULL("10") ", amplification %8.2f%s",
 7686|      0|          (void *)rootParser, rootParser->m_accounting.countBytesDirect,
 7687|      0|          rootParser->m_accounting.countBytesIndirect,
 7688|      0|          (double)amplificationFactor, epilog);
 7689|      0|}
xmlparse.c:accountingOnAbort:
 7692|     36|accountingOnAbort(XML_Parser originParser) {
 7693|     36|  accountingReportStats(originParser, " ABORTING\n");
 7694|     36|}
xmlparse.c:processXmlDecl:
 4279|    317|               const char *next) {
 4280|    317|  const char *encodingName = NULL;
 4281|    317|  const XML_Char *storedEncName = NULL;
 4282|    317|  const ENCODING *newEncoding = NULL;
 4283|    317|  const char *version = NULL;
 4284|    317|  const char *versionend = NULL;
 4285|    317|  const XML_Char *storedversion = NULL;
 4286|    317|  int standalone = -1;
 4287|       |
 4288|    317|#ifdef XML_DTD
 4289|    317|  if (! accountingDiffTolerated(parser, XML_TOK_XML_DECL, s, next, __LINE__,
  ------------------
  |  |   77|    317|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (4289:7): [True: 0, False: 317]
  ------------------
 4290|    317|                                XML_ACCOUNT_DIRECT)) {
 4291|      0|    accountingOnAbort(parser);
 4292|      0|    return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4293|      0|  }
 4294|    317|#endif
 4295|       |
 4296|    317|  if (! (parser->m_ns ? XmlParseXmlDeclNS : XmlParseXmlDecl)(
  ------------------
  |  Branch (4296:7): [True: 242, False: 75]
  |  Branch (4296:10): [True: 0, False: 317]
  ------------------
 4297|    317|          isGeneralTextEntity, parser->m_encoding, s, next, &parser->m_eventPtr,
 4298|    317|          &version, &versionend, &encodingName, &newEncoding, &standalone)) {
 4299|    242|    if (isGeneralTextEntity)
  ------------------
  |  Branch (4299:9): [True: 0, False: 242]
  ------------------
 4300|      0|      return XML_ERROR_TEXT_DECL;
 4301|    242|    else
 4302|    242|      return XML_ERROR_XML_DECL;
 4303|    242|  }
 4304|     75|  if (! isGeneralTextEntity && standalone == 1) {
  ------------------
  |  Branch (4304:7): [True: 75, False: 0]
  |  Branch (4304:32): [True: 27, False: 48]
  ------------------
 4305|     27|    parser->m_dtd->standalone = XML_TRUE;
  ------------------
  |  |   55|     27|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4306|     27|#ifdef XML_DTD
 4307|     27|    if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4307:9): [True: 0, False: 27]
  ------------------
 4308|     27|        == XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE)
 4309|      0|      parser->m_paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER;
 4310|     27|#endif /* XML_DTD */
 4311|     27|  }
 4312|     75|  if (parser->m_xmlDeclHandler) {
  ------------------
  |  Branch (4312:7): [True: 0, False: 75]
  ------------------
 4313|      0|    if (encodingName != NULL) {
  ------------------
  |  Branch (4313:9): [True: 0, False: 0]
  ------------------
 4314|      0|      storedEncName = poolStoreString(
 4315|      0|          &parser->m_temp2Pool, parser->m_encoding, encodingName,
 4316|      0|          encodingName + XmlNameLength(parser->m_encoding, encodingName));
  ------------------
  |  |  257|      0|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 4317|      0|      if (! storedEncName)
  ------------------
  |  Branch (4317:11): [True: 0, False: 0]
  ------------------
 4318|      0|        return XML_ERROR_NO_MEMORY;
 4319|      0|      poolFinish(&parser->m_temp2Pool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4320|      0|    }
 4321|      0|    if (version) {
  ------------------
  |  Branch (4321:9): [True: 0, False: 0]
  ------------------
 4322|      0|      storedversion
 4323|      0|          = poolStoreString(&parser->m_temp2Pool, parser->m_encoding, version,
 4324|      0|                            versionend - parser->m_encoding->minBytesPerChar);
 4325|      0|      if (! storedversion)
  ------------------
  |  Branch (4325:11): [True: 0, False: 0]
  ------------------
 4326|      0|        return XML_ERROR_NO_MEMORY;
 4327|      0|    }
 4328|      0|    parser->m_xmlDeclHandler(parser->m_handlerArg, storedversion, storedEncName,
 4329|      0|                             standalone);
 4330|     75|  } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4330:14): [True: 0, False: 75]
  ------------------
 4331|      0|    reportDefault(parser, parser->m_encoding, s, next);
 4332|     75|  if (parser->m_protocolEncodingName == NULL) {
  ------------------
  |  Branch (4332:7): [True: 0, False: 75]
  ------------------
 4333|      0|    if (newEncoding) {
  ------------------
  |  Branch (4333:9): [True: 0, False: 0]
  ------------------
 4334|       |      /* Check that the specified encoding does not conflict with what
 4335|       |       * the parser has already deduced.  Do we have the same number
 4336|       |       * of bytes in the smallest representation of a character?  If
 4337|       |       * this is UTF-16, is it the same endianness?
 4338|       |       */
 4339|      0|      if (newEncoding->minBytesPerChar != parser->m_encoding->minBytesPerChar
  ------------------
  |  Branch (4339:11): [True: 0, False: 0]
  ------------------
 4340|      0|          || (newEncoding->minBytesPerChar == 2
  ------------------
  |  Branch (4340:15): [True: 0, False: 0]
  ------------------
 4341|      0|              && newEncoding != parser->m_encoding)) {
  ------------------
  |  Branch (4341:18): [True: 0, False: 0]
  ------------------
 4342|      0|        parser->m_eventPtr = encodingName;
 4343|      0|        return XML_ERROR_INCORRECT_ENCODING;
 4344|      0|      }
 4345|      0|      parser->m_encoding = newEncoding;
 4346|      0|    } else if (encodingName) {
  ------------------
  |  Branch (4346:16): [True: 0, False: 0]
  ------------------
 4347|      0|      enum XML_Error result;
 4348|      0|      if (! storedEncName) {
  ------------------
  |  Branch (4348:11): [True: 0, False: 0]
  ------------------
 4349|      0|        storedEncName = poolStoreString(
 4350|      0|            &parser->m_temp2Pool, parser->m_encoding, encodingName,
 4351|      0|            encodingName + XmlNameLength(parser->m_encoding, encodingName));
  ------------------
  |  |  257|      0|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 4352|      0|        if (! storedEncName)
  ------------------
  |  Branch (4352:13): [True: 0, False: 0]
  ------------------
 4353|      0|          return XML_ERROR_NO_MEMORY;
 4354|      0|      }
 4355|      0|      result = handleUnknownEncoding(parser, storedEncName);
 4356|      0|      poolClear(&parser->m_temp2Pool);
 4357|      0|      if (result == XML_ERROR_UNKNOWN_ENCODING)
  ------------------
  |  Branch (4357:11): [True: 0, False: 0]
  ------------------
 4358|      0|        parser->m_eventPtr = encodingName;
 4359|      0|      return result;
 4360|      0|    }
 4361|      0|  }
 4362|       |
 4363|     75|  if (storedEncName || storedversion)
  ------------------
  |  Branch (4363:7): [True: 0, False: 75]
  |  Branch (4363:24): [True: 0, False: 75]
  ------------------
 4364|      0|    poolClear(&parser->m_temp2Pool);
 4365|       |
 4366|     75|  return XML_ERROR_NONE;
 4367|     75|}
xmlparse.c:poolStoreString:
 7283|   952k|                const char *end) {
 7284|   952k|  if (! poolAppend(pool, enc, ptr, end))
  ------------------
  |  Branch (7284:7): [True: 0, False: 952k]
  ------------------
 7285|      0|    return NULL;
 7286|   952k|  if (pool->ptr == pool->end && ! poolGrow(pool))
  ------------------
  |  Branch (7286:7): [True: 237, False: 952k]
  |  Branch (7286:33): [True: 0, False: 237]
  ------------------
 7287|      0|    return NULL;
 7288|   952k|  *(pool->ptr)++ = 0;
 7289|   952k|  return pool->start;
 7290|   952k|}
xmlparse.c:lookup:
 7042|  3.20M|lookup(XML_Parser parser, HASH_TABLE *table, KEY name, size_t createSize) {
 7043|  3.20M|  size_t i;
 7044|  3.20M|  if (table->size == 0) {
  ------------------
  |  Branch (7044:7): [True: 38.2k, False: 3.16M]
  ------------------
 7045|  38.2k|    size_t tsize;
 7046|  38.2k|    if (! createSize)
  ------------------
  |  Branch (7046:9): [True: 20.9k, False: 17.2k]
  ------------------
 7047|  20.9k|      return NULL;
 7048|  17.2k|    table->power = INIT_POWER;
  ------------------
  |  | 7006|  17.2k|#define INIT_POWER 6
  ------------------
 7049|       |    /* table->size is a power of 2 */
 7050|  17.2k|    table->size = (size_t)1 << INIT_POWER;
  ------------------
  |  | 7006|  17.2k|#define INIT_POWER 6
  ------------------
 7051|  17.2k|    tsize = table->size * sizeof(NAMED *);
 7052|  17.2k|    table->v = table->mem->malloc_fcn(tsize);
 7053|  17.2k|    if (! table->v) {
  ------------------
  |  Branch (7053:9): [True: 0, False: 17.2k]
  ------------------
 7054|      0|      table->size = 0;
 7055|      0|      return NULL;
 7056|      0|    }
 7057|  17.2k|    memset(table->v, 0, tsize);
 7058|  17.2k|    i = hash(parser, name) & ((unsigned long)table->size - 1);
 7059|  3.16M|  } else {
 7060|  3.16M|    unsigned long h = hash(parser, name);
 7061|  3.16M|    unsigned long mask = (unsigned long)table->size - 1;
 7062|  3.16M|    unsigned char step = 0;
 7063|  3.16M|    i = h & mask;
 7064|  3.44M|    while (table->v[i]) {
  ------------------
  |  Branch (7064:12): [True: 3.40M, False: 37.9k]
  ------------------
 7065|  3.40M|      if (keyeq(name, table->v[i]->name))
  ------------------
  |  Branch (7065:11): [True: 3.12M, False: 281k]
  ------------------
 7066|  3.12M|        return table->v[i];
 7067|   281k|      if (! step)
  ------------------
  |  Branch (7067:11): [True: 275k, False: 5.42k]
  ------------------
 7068|   275k|        step = PROBE_STEP(h, mask, table->power);
  ------------------
  |  |  234|   275k|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  232|   275k|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7069|   281k|      i < step ? (i += table->size - step) : (i -= step);
  ------------------
  |  Branch (7069:7): [True: 2.37k, False: 278k]
  ------------------
 7070|   281k|    }
 7071|  37.9k|    if (! createSize)
  ------------------
  |  Branch (7071:9): [True: 17.8k, False: 20.1k]
  ------------------
 7072|  17.8k|      return NULL;
 7073|       |
 7074|       |    /* check for overflow (table is half full) */
 7075|  20.1k|    if (table->used >> (table->power - 1)) {
  ------------------
  |  Branch (7075:9): [True: 253, False: 19.8k]
  ------------------
 7076|    253|      unsigned char newPower = table->power + 1;
 7077|       |
 7078|       |      /* Detect and prevent invalid shift */
 7079|    253|      if (newPower >= sizeof(unsigned long) * 8 /* bits per byte */) {
  ------------------
  |  Branch (7079:11): [True: 0, False: 253]
  ------------------
 7080|      0|        return NULL;
 7081|      0|      }
 7082|       |
 7083|    253|      size_t newSize = (size_t)1 << newPower;
 7084|    253|      unsigned long newMask = (unsigned long)newSize - 1;
 7085|       |
 7086|       |      /* Detect and prevent integer overflow */
 7087|    253|      if (newSize > (size_t)(-1) / sizeof(NAMED *)) {
  ------------------
  |  Branch (7087:11): [True: 0, False: 253]
  ------------------
 7088|      0|        return NULL;
 7089|      0|      }
 7090|       |
 7091|    253|      size_t tsize = newSize * sizeof(NAMED *);
 7092|    253|      NAMED **newV = table->mem->malloc_fcn(tsize);
 7093|    253|      if (! newV)
  ------------------
  |  Branch (7093:11): [True: 0, False: 253]
  ------------------
 7094|      0|        return NULL;
 7095|    253|      memset(newV, 0, tsize);
 7096|  30.0k|      for (i = 0; i < table->size; i++)
  ------------------
  |  Branch (7096:19): [True: 29.8k, False: 253]
  ------------------
 7097|  29.8k|        if (table->v[i]) {
  ------------------
  |  Branch (7097:13): [True: 14.9k, False: 14.9k]
  ------------------
 7098|  14.9k|          unsigned long newHash = hash(parser, table->v[i]->name);
 7099|  14.9k|          size_t j = newHash & newMask;
 7100|  14.9k|          step = 0;
 7101|  17.4k|          while (newV[j]) {
  ------------------
  |  Branch (7101:18): [True: 2.53k, False: 14.9k]
  ------------------
 7102|  2.53k|            if (! step)
  ------------------
  |  Branch (7102:17): [True: 2.01k, False: 518]
  ------------------
 7103|  2.01k|              step = PROBE_STEP(newHash, newMask, newPower);
  ------------------
  |  |  234|  2.01k|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  232|  2.01k|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7104|  2.53k|            j < step ? (j += newSize - step) : (j -= step);
  ------------------
  |  Branch (7104:13): [True: 347, False: 2.19k]
  ------------------
 7105|  2.53k|          }
 7106|  14.9k|          newV[j] = table->v[i];
 7107|  14.9k|        }
 7108|    253|      table->mem->free_fcn(table->v);
 7109|    253|      table->v = newV;
 7110|    253|      table->power = newPower;
 7111|    253|      table->size = newSize;
 7112|    253|      i = h & newMask;
 7113|    253|      step = 0;
 7114|    429|      while (table->v[i]) {
  ------------------
  |  Branch (7114:14): [True: 176, False: 253]
  ------------------
 7115|    176|        if (! step)
  ------------------
  |  Branch (7115:13): [True: 98, False: 78]
  ------------------
 7116|     98|          step = PROBE_STEP(h, newMask, newPower);
  ------------------
  |  |  234|     98|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  232|     98|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7117|    176|        i < step ? (i += newSize - step) : (i -= step);
  ------------------
  |  Branch (7117:9): [True: 26, False: 150]
  ------------------
 7118|    176|      }
 7119|    253|    }
 7120|  20.1k|  }
 7121|  37.3k|  table->v[i] = table->mem->malloc_fcn(createSize);
 7122|  37.3k|  if (! table->v[i])
  ------------------
  |  Branch (7122:7): [True: 0, False: 37.3k]
  ------------------
 7123|      0|    return NULL;
 7124|  37.3k|  memset(table->v[i], 0, createSize);
 7125|  37.3k|  table->v[i]->name = name;
 7126|  37.3k|  (table->used)++;
 7127|  37.3k|  return table->v[i];
 7128|  37.3k|}
xmlparse.c:hash:
 7031|  3.19M|hash(XML_Parser parser, KEY s) {
 7032|  3.19M|  struct siphash state;
 7033|  3.19M|  struct sipkey key;
 7034|  3.19M|  (void)sip24_valid;
 7035|  3.19M|  copy_salt_to_sipkey(parser, &key);
 7036|  3.19M|  sip24_init(&state, &key);
 7037|  3.19M|  sip24_update(&state, s, keylen(s) * sizeof(XML_Char));
 7038|  3.19M|  return (unsigned long)sip24_final(&state);
 7039|  3.19M|}
xmlparse.c:copy_salt_to_sipkey:
 7025|  3.19M|copy_salt_to_sipkey(XML_Parser parser, struct sipkey *key) {
 7026|  3.19M|  key->k[0] = 0;
 7027|  3.19M|  key->k[1] = get_hash_secret_salt(parser);
 7028|  3.19M|}
xmlparse.c:get_hash_secret_salt:
  946|  3.19M|get_hash_secret_salt(XML_Parser parser) {
  947|  3.19M|  if (parser->m_parentParser != NULL)
  ------------------
  |  Branch (947:7): [True: 0, False: 3.19M]
  ------------------
  948|      0|    return get_hash_secret_salt(parser->m_parentParser);
  949|  3.19M|  return parser->m_hash_secret_salt;
  950|  3.19M|}
xmlparse.c:keylen:
 7017|  3.19M|keylen(KEY s) {
 7018|  3.19M|  size_t len = 0;
 7019|  14.0M|  for (; *s; s++, len++)
  ------------------
  |  Branch (7019:10): [True: 10.8M, False: 3.19M]
  ------------------
 7020|  10.8M|    ;
 7021|  3.19M|  return len;
 7022|  3.19M|}
xmlparse.c:keyeq:
 7009|  3.40M|keyeq(KEY s1, KEY s2) {
 7010|  8.48M|  for (; *s1 == *s2; s1++, s2++)
  ------------------
  |  Branch (7010:10): [True: 8.19M, False: 281k]
  ------------------
 7011|  8.19M|    if (*s1 == 0)
  ------------------
  |  Branch (7011:9): [True: 3.12M, False: 5.07M]
  ------------------
 7012|  3.12M|      return XML_TRUE;
  ------------------
  |  |   55|  3.12M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7013|   281k|  return XML_FALSE;
  ------------------
  |  |   56|   281k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7014|  3.40M|}
xmlparse.c:normalizePublicId:
 6694|  1.02k|normalizePublicId(XML_Char *publicId) {
 6695|  1.02k|  XML_Char *p = publicId;
 6696|  1.02k|  XML_Char *s;
 6697|  24.3k|  for (s = publicId; *s; s++) {
  ------------------
  |  Branch (6697:22): [True: 23.2k, False: 1.02k]
  ------------------
 6698|  23.2k|    switch (*s) {
 6699|    841|    case 0x20:
  ------------------
  |  Branch (6699:5): [True: 841, False: 22.4k]
  ------------------
 6700|  1.90k|    case 0xD:
  ------------------
  |  Branch (6700:5): [True: 1.06k, False: 22.2k]
  ------------------
 6701|  2.76k|    case 0xA:
  ------------------
  |  Branch (6701:5): [True: 859, False: 22.4k]
  ------------------
 6702|  2.76k|      if (p != publicId && p[-1] != 0x20)
  ------------------
  |  Branch (6702:11): [True: 1.31k, False: 1.44k]
  |  Branch (6702:28): [True: 525, False: 794]
  ------------------
 6703|    525|        *p++ = 0x20;
 6704|  2.76k|      break;
 6705|  20.5k|    default:
  ------------------
  |  Branch (6705:5): [True: 20.5k, False: 2.76k]
  ------------------
 6706|  20.5k|      *p++ = *s;
 6707|  23.2k|    }
 6708|  23.2k|  }
 6709|  1.02k|  if (p != publicId && p[-1] == 0x20)
  ------------------
  |  Branch (6709:7): [True: 608, False: 420]
  |  Branch (6709:24): [True: 73, False: 535]
  ------------------
 6710|     73|    --p;
 6711|  1.02k|  *p = XML_T('\0');
  ------------------
  |  |  190|  1.02k|#  define XML_T(x) x
  ------------------
 6712|  1.02k|}
xmlparse.c:contentProcessor:
 2621|  11.3k|                 const char **endPtr) {
 2622|  11.3k|  enum XML_Error result = doContent(
 2623|  11.3k|      parser, 0, parser->m_encoding, start, end, endPtr,
 2624|  11.3k|      (XML_Bool)! parser->m_parsingStatus.finalBuffer, XML_ACCOUNT_DIRECT);
 2625|  11.3k|  if (result == XML_ERROR_NONE) {
  ------------------
  |  Branch (2625:7): [True: 7.13k, False: 4.25k]
  ------------------
 2626|  7.13k|    if (! storeRawNames(parser))
  ------------------
  |  Branch (2626:9): [True: 0, False: 7.13k]
  ------------------
 2627|      0|      return XML_ERROR_NO_MEMORY;
 2628|  7.13k|  }
 2629|  11.3k|  return result;
 2630|  11.3k|}
xmlparse.c:doContent:
 2751|   117k|          XML_Bool haveMore, enum XML_Account account) {
 2752|       |  /* save one level of indirection */
 2753|   117k|  DTD *const dtd = parser->m_dtd;
 2754|       |
 2755|   117k|  const char **eventPP;
 2756|   117k|  const char **eventEndPP;
 2757|   117k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (2757:7): [True: 11.3k, False: 105k]
  ------------------
 2758|  11.3k|    eventPP = &parser->m_eventPtr;
 2759|  11.3k|    eventEndPP = &parser->m_eventEndPtr;
 2760|   105k|  } else {
 2761|   105k|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 2762|   105k|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 2763|   105k|  }
 2764|   117k|  *eventPP = s;
 2765|       |
 2766|  4.31M|  for (;;) {
 2767|  4.31M|    const char *next = s; /* XmlContentTok doesn't always set the last arg */
 2768|  4.31M|    int tok = XmlContentTok(enc, s, end, &next);
  ------------------
  |  |  230|  4.31M|  XmlTok(enc, XML_CONTENT_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  4.31M|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 2769|  4.31M|#ifdef XML_DTD
 2770|  4.31M|    const char *accountAfter
 2771|  4.31M|        = ((tok == XML_TOK_TRAILING_RSQB) || (tok == XML_TOK_TRAILING_CR))
  ------------------
  |  |   46|  4.31M|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
                      = ((tok == XML_TOK_TRAILING_RSQB) || (tok == XML_TOK_TRAILING_CR))
  ------------------
  |  |   53|  4.30M|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (2771:12): [True: 689, False: 4.30M]
  |  Branch (2771:46): [True: 52, False: 4.30M]
  ------------------
 2772|  4.31M|              ? (haveMore ? s /* i.e. 0 bytes */ : end)
  ------------------
  |  Branch (2772:18): [True: 75, False: 666]
  ------------------
 2773|  4.31M|              : next;
 2774|  4.31M|    if (! accountingDiffTolerated(parser, tok, s, accountAfter, __LINE__,
  ------------------
  |  Branch (2774:9): [True: 10, False: 4.31M]
  ------------------
 2775|  4.31M|                                  account)) {
 2776|     10|      accountingOnAbort(parser);
 2777|     10|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 2778|     10|    }
 2779|  4.31M|#endif
 2780|  4.31M|    *eventEndPP = next;
 2781|  4.31M|    switch (tok) {
 2782|     52|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|     52|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (2782:5): [True: 52, False: 4.31M]
  ------------------
 2783|     52|      if (haveMore) {
  ------------------
  |  Branch (2783:11): [True: 52, False: 0]
  ------------------
 2784|     52|        *nextPtr = s;
 2785|     52|        return XML_ERROR_NONE;
 2786|     52|      }
 2787|      0|      *eventEndPP = end;
 2788|      0|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (2788:11): [True: 0, False: 0]
  ------------------
 2789|      0|        XML_Char c = 0xA;
 2790|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 2791|      0|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2791:18): [True: 0, False: 0]
  ------------------
 2792|      0|        reportDefault(parser, enc, s, end);
 2793|       |      /* We are at the end of the final buffer, should we check for
 2794|       |         XML_SUSPENDED, XML_FINISHED?
 2795|       |      */
 2796|      0|      if (startTagLevel == 0)
  ------------------
  |  Branch (2796:11): [True: 0, False: 0]
  ------------------
 2797|      0|        return XML_ERROR_NO_ELEMENTS;
 2798|      0|      if (parser->m_tagLevel != startTagLevel)
  ------------------
  |  Branch (2798:11): [True: 0, False: 0]
  ------------------
 2799|      0|        return XML_ERROR_ASYNC_ENTITY;
 2800|      0|      *nextPtr = end;
 2801|      0|      return XML_ERROR_NONE;
 2802|   108k|    case XML_TOK_NONE:
  ------------------
  |  |   51|   108k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (2802:5): [True: 108k, False: 4.20M]
  ------------------
 2803|   108k|      if (haveMore) {
  ------------------
  |  Branch (2803:11): [True: 3.88k, False: 104k]
  ------------------
 2804|  3.88k|        *nextPtr = s;
 2805|  3.88k|        return XML_ERROR_NONE;
 2806|  3.88k|      }
 2807|   104k|      if (startTagLevel > 0) {
  ------------------
  |  Branch (2807:11): [True: 104k, False: 0]
  ------------------
 2808|   104k|        if (parser->m_tagLevel != startTagLevel)
  ------------------
  |  Branch (2808:13): [True: 38, False: 104k]
  ------------------
 2809|     38|          return XML_ERROR_ASYNC_ENTITY;
 2810|   104k|        *nextPtr = s;
 2811|   104k|        return XML_ERROR_NONE;
 2812|   104k|      }
 2813|      0|      return XML_ERROR_NO_ELEMENTS;
 2814|  2.22k|    case XML_TOK_INVALID:
  ------------------
  |  |   57|  2.22k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (2814:5): [True: 2.22k, False: 4.30M]
  ------------------
 2815|  2.22k|      *eventPP = next;
 2816|  2.22k|      return XML_ERROR_INVALID_TOKEN;
 2817|  2.34k|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|  2.34k|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (2817:5): [True: 2.34k, False: 4.30M]
  ------------------
 2818|  2.34k|      if (haveMore) {
  ------------------
  |  Branch (2818:11): [True: 2.15k, False: 194]
  ------------------
 2819|  2.15k|        *nextPtr = s;
 2820|  2.15k|        return XML_ERROR_NONE;
 2821|  2.15k|      }
 2822|    194|      return XML_ERROR_UNCLOSED_TOKEN;
 2823|    310|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|    310|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (2823:5): [True: 310, False: 4.31M]
  ------------------
 2824|    310|      if (haveMore) {
  ------------------
  |  Branch (2824:11): [True: 310, False: 0]
  ------------------
 2825|    310|        *nextPtr = s;
 2826|    310|        return XML_ERROR_NONE;
 2827|    310|      }
 2828|      0|      return XML_ERROR_PARTIAL_CHAR;
 2829|   124k|    case XML_TOK_ENTITY_REF: {
  ------------------
  |  |   70|   124k|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (2829:5): [True: 124k, False: 4.18M]
  ------------------
 2830|   124k|      const XML_Char *name;
 2831|   124k|      ENTITY *entity;
 2832|   124k|      XML_Char ch = (XML_Char)XmlPredefinedEntityName(
  ------------------
  |  |  267|   124k|  (((enc)->predefinedEntityName)(enc, ptr, end))
  ------------------
 2833|   124k|          enc, s + enc->minBytesPerChar, next - enc->minBytesPerChar);
 2834|   124k|      if (ch) {
  ------------------
  |  Branch (2834:11): [True: 2.64k, False: 121k]
  ------------------
 2835|  2.64k|#ifdef XML_DTD
 2836|       |        /* NOTE: We are replacing 4-6 characters original input for 1 character
 2837|       |         *       so there is no amplification and hence recording without
 2838|       |         *       protection. */
 2839|  2.64k|        accountingDiffTolerated(parser, tok, (char *)&ch,
 2840|  2.64k|                                ((char *)&ch) + sizeof(XML_Char), __LINE__,
 2841|  2.64k|                                XML_ACCOUNT_ENTITY_EXPANSION);
 2842|  2.64k|#endif /* XML_DTD */
 2843|  2.64k|        if (parser->m_characterDataHandler)
  ------------------
  |  Branch (2843:13): [True: 0, False: 2.64k]
  ------------------
 2844|      0|          parser->m_characterDataHandler(parser->m_handlerArg, &ch, 1);
 2845|  2.64k|        else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2845:18): [True: 0, False: 2.64k]
  ------------------
 2846|      0|          reportDefault(parser, enc, s, next);
 2847|  2.64k|        break;
 2848|  2.64k|      }
 2849|   121k|      name = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 2850|   121k|                             next - enc->minBytesPerChar);
 2851|   121k|      if (! name)
  ------------------
  |  Branch (2851:11): [True: 0, False: 121k]
  ------------------
 2852|      0|        return XML_ERROR_NO_MEMORY;
 2853|   121k|      entity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, 0);
 2854|   121k|      poolDiscard(&dtd->pool);
  ------------------
  |  |  599|   121k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 2855|       |      /* First, determine if a check for an existing declaration is needed;
 2856|       |         if yes, check that the entity exists, and that it is internal,
 2857|       |         otherwise call the skipped entity or default handler.
 2858|       |      */
 2859|   121k|      if (! dtd->hasParamEntityRefs || dtd->standalone) {
  ------------------
  |  Branch (2859:11): [True: 101k, False: 19.9k]
  |  Branch (2859:40): [True: 197, False: 19.7k]
  ------------------
 2860|   101k|        if (! entity)
  ------------------
  |  Branch (2860:13): [True: 335, False: 101k]
  ------------------
 2861|    335|          return XML_ERROR_UNDEFINED_ENTITY;
 2862|   101k|        else if (! entity->is_internal)
  ------------------
  |  Branch (2862:18): [True: 0, False: 101k]
  ------------------
 2863|      0|          return XML_ERROR_ENTITY_DECLARED_IN_PE;
 2864|   101k|      } else if (! entity) {
  ------------------
  |  Branch (2864:18): [True: 15.3k, False: 4.45k]
  ------------------
 2865|  15.3k|        if (parser->m_skippedEntityHandler)
  ------------------
  |  Branch (2865:13): [True: 0, False: 15.3k]
  ------------------
 2866|      0|          parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 2867|  15.3k|        else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2867:18): [True: 0, False: 15.3k]
  ------------------
 2868|      0|          reportDefault(parser, enc, s, next);
 2869|  15.3k|        break;
 2870|  15.3k|      }
 2871|   106k|      if (entity->open)
  ------------------
  |  Branch (2871:11): [True: 3, False: 106k]
  ------------------
 2872|      3|        return XML_ERROR_RECURSIVE_ENTITY_REF;
 2873|   106k|      if (entity->notation)
  ------------------
  |  Branch (2873:11): [True: 1, False: 106k]
  ------------------
 2874|      1|        return XML_ERROR_BINARY_ENTITY_REF;
 2875|   106k|      if (entity->textPtr) {
  ------------------
  |  Branch (2875:11): [True: 105k, False: 194]
  ------------------
 2876|   105k|        enum XML_Error result;
 2877|   105k|        if (! parser->m_defaultExpandInternalEntities) {
  ------------------
  |  Branch (2877:13): [True: 0, False: 105k]
  ------------------
 2878|      0|          if (parser->m_skippedEntityHandler)
  ------------------
  |  Branch (2878:15): [True: 0, False: 0]
  ------------------
 2879|      0|            parser->m_skippedEntityHandler(parser->m_handlerArg, entity->name,
 2880|      0|                                           0);
 2881|      0|          else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2881:20): [True: 0, False: 0]
  ------------------
 2882|      0|            reportDefault(parser, enc, s, next);
 2883|      0|          break;
 2884|      0|        }
 2885|   105k|        result = processInternalEntity(parser, entity, XML_FALSE);
  ------------------
  |  |   56|   105k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2886|   105k|        if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (2886:13): [True: 759, False: 105k]
  ------------------
 2887|    759|          return result;
 2888|   105k|      } else if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (2888:18): [True: 0, False: 194]
  ------------------
 2889|      0|        const XML_Char *context;
 2890|      0|        entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2891|      0|        context = getContext(parser);
 2892|      0|        entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2893|      0|        if (! context)
  ------------------
  |  Branch (2893:13): [True: 0, False: 0]
  ------------------
 2894|      0|          return XML_ERROR_NO_MEMORY;
 2895|      0|        if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (2895:13): [True: 0, False: 0]
  ------------------
 2896|      0|                parser->m_externalEntityRefHandlerArg, context, entity->base,
 2897|      0|                entity->systemId, entity->publicId))
 2898|      0|          return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 2899|      0|        poolDiscard(&parser->m_tempPool);
  ------------------
  |  |  599|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 2900|    194|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2900:18): [True: 0, False: 194]
  ------------------
 2901|      0|        reportDefault(parser, enc, s, next);
 2902|   105k|      break;
 2903|   106k|    }
 2904|  2.23M|    case XML_TOK_START_TAG_NO_ATTS:
  ------------------
  |  |   63|  2.23M|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  |  Branch (2904:5): [True: 2.23M, False: 2.08M]
  ------------------
 2905|       |      /* fall through */
 2906|  2.23M|    case XML_TOK_START_TAG_WITH_ATTS: {
  ------------------
  |  |   62|  2.23M|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  |  Branch (2906:5): [True: 8.26k, False: 4.30M]
  ------------------
 2907|  2.23M|      TAG *tag;
 2908|  2.23M|      enum XML_Error result;
 2909|  2.23M|      XML_Char *toPtr;
 2910|  2.23M|      if (parser->m_freeTagList) {
  ------------------
  |  Branch (2910:11): [True: 20.6k, False: 2.21M]
  ------------------
 2911|  20.6k|        tag = parser->m_freeTagList;
 2912|  20.6k|        parser->m_freeTagList = parser->m_freeTagList->parent;
 2913|  2.21M|      } else {
 2914|  2.21M|        tag = (TAG *)MALLOC(parser, sizeof(TAG));
  ------------------
  |  |  713|  2.21M|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2915|  2.21M|        if (! tag)
  ------------------
  |  Branch (2915:13): [True: 0, False: 2.21M]
  ------------------
 2916|      0|          return XML_ERROR_NO_MEMORY;
 2917|  2.21M|        tag->buf = (char *)MALLOC(parser, INIT_TAG_BUF_SIZE);
  ------------------
  |  |  713|  2.21M|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2918|  2.21M|        if (! tag->buf) {
  ------------------
  |  Branch (2918:13): [True: 0, False: 2.21M]
  ------------------
 2919|      0|          FREE(parser, tag);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 2920|      0|          return XML_ERROR_NO_MEMORY;
 2921|      0|        }
 2922|  2.21M|        tag->bufEnd = tag->buf + INIT_TAG_BUF_SIZE;
  ------------------
  |  |  241|  2.21M|#define INIT_TAG_BUF_SIZE 32 /* must be a multiple of sizeof(XML_Char) */
  ------------------
 2923|  2.21M|      }
 2924|  2.23M|      tag->bindings = NULL;
 2925|  2.23M|      tag->parent = parser->m_tagStack;
 2926|  2.23M|      parser->m_tagStack = tag;
 2927|  2.23M|      tag->name.localPart = NULL;
 2928|  2.23M|      tag->name.prefix = NULL;
 2929|  2.23M|      tag->rawName = s + enc->minBytesPerChar;
 2930|  2.23M|      tag->rawNameLength = XmlNameLength(enc, tag->rawName);
  ------------------
  |  |  257|  2.23M|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 2931|  2.23M|      ++parser->m_tagLevel;
 2932|  2.23M|      {
 2933|  2.23M|        const char *rawNameEnd = tag->rawName + tag->rawNameLength;
 2934|  2.23M|        const char *fromPtr = tag->rawName;
 2935|  2.23M|        toPtr = (XML_Char *)tag->buf;
 2936|  2.24M|        for (;;) {
 2937|  2.24M|          int bufSize;
 2938|  2.24M|          int convLen;
 2939|  2.24M|          const enum XML_Convert_Result convert_res
 2940|  2.24M|              = XmlConvert(enc, &fromPtr, rawNameEnd, (ICHAR **)&toPtr,
  ------------------
  |  |  160|  2.24M|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|  2.24M|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 2941|  2.24M|                           (ICHAR *)tag->bufEnd - 1);
 2942|  2.24M|          convLen = (int)(toPtr - (XML_Char *)tag->buf);
 2943|  2.24M|          if ((fromPtr >= rawNameEnd)
  ------------------
  |  Branch (2943:15): [True: 2.23M, False: 1.54k]
  ------------------
 2944|  2.24M|              || (convert_res == XML_CONVERT_INPUT_INCOMPLETE)) {
  ------------------
  |  Branch (2944:18): [True: 0, False: 1.54k]
  ------------------
 2945|  2.23M|            tag->name.strLen = convLen;
 2946|  2.23M|            break;
 2947|  2.23M|          }
 2948|  1.54k|          bufSize = (int)(tag->bufEnd - tag->buf) << 1;
 2949|  1.54k|          {
 2950|  1.54k|            char *temp = (char *)REALLOC(parser, tag->buf, bufSize);
  ------------------
  |  |  714|  1.54k|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 2951|  1.54k|            if (temp == NULL)
  ------------------
  |  Branch (2951:17): [True: 0, False: 1.54k]
  ------------------
 2952|      0|              return XML_ERROR_NO_MEMORY;
 2953|  1.54k|            tag->buf = temp;
 2954|  1.54k|            tag->bufEnd = temp + bufSize;
 2955|  1.54k|            toPtr = (XML_Char *)temp + convLen;
 2956|  1.54k|          }
 2957|  1.54k|        }
 2958|  2.23M|      }
 2959|  2.23M|      tag->name.str = (XML_Char *)tag->buf;
 2960|  2.23M|      *toPtr = XML_T('\0');
  ------------------
  |  |  190|  2.23M|#  define XML_T(x) x
  ------------------
 2961|  2.23M|      result
 2962|  2.23M|          = storeAtts(parser, enc, s, &(tag->name), &(tag->bindings), account);
 2963|  2.23M|      if (result)
  ------------------
  |  Branch (2963:11): [True: 638, False: 2.23M]
  ------------------
 2964|    638|        return result;
 2965|  2.23M|      if (parser->m_startElementHandler)
  ------------------
  |  Branch (2965:11): [True: 2.23M, False: 0]
  ------------------
 2966|  2.23M|        parser->m_startElementHandler(parser->m_handlerArg, tag->name.str,
 2967|  2.23M|                                      (const XML_Char **)parser->m_atts);
 2968|      0|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2968:16): [True: 0, False: 0]
  ------------------
 2969|      0|        reportDefault(parser, enc, s, next);
 2970|  2.23M|      poolClear(&parser->m_tempPool);
 2971|  2.23M|      break;
 2972|  2.23M|    }
 2973|  2.61k|    case XML_TOK_EMPTY_ELEMENT_NO_ATTS:
  ------------------
  |  |   65|  2.61k|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  |  Branch (2973:5): [True: 2.61k, False: 4.30M]
  ------------------
 2974|       |      /* fall through */
 2975|  8.64k|    case XML_TOK_EMPTY_ELEMENT_WITH_ATTS: {
  ------------------
  |  |   64|  8.64k|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  |  Branch (2975:5): [True: 6.03k, False: 4.30M]
  ------------------
 2976|  8.64k|      const char *rawName = s + enc->minBytesPerChar;
 2977|  8.64k|      enum XML_Error result;
 2978|  8.64k|      BINDING *bindings = NULL;
 2979|  8.64k|      XML_Bool noElmHandlers = XML_TRUE;
  ------------------
  |  |   55|  8.64k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2980|  8.64k|      TAG_NAME name;
 2981|  8.64k|      name.str = poolStoreString(&parser->m_tempPool, enc, rawName,
 2982|  8.64k|                                 rawName + XmlNameLength(enc, rawName));
  ------------------
  |  |  257|  8.64k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 2983|  8.64k|      if (! name.str)
  ------------------
  |  Branch (2983:11): [True: 0, False: 8.64k]
  ------------------
 2984|      0|        return XML_ERROR_NO_MEMORY;
 2985|  8.64k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|  8.64k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 2986|  8.64k|      result = storeAtts(parser, enc, s, &name, &bindings,
 2987|  8.64k|                         XML_ACCOUNT_NONE /* token spans whole start tag */);
 2988|  8.64k|      if (result != XML_ERROR_NONE) {
  ------------------
  |  Branch (2988:11): [True: 56, False: 8.59k]
  ------------------
 2989|     56|        freeBindings(parser, bindings);
 2990|     56|        return result;
 2991|     56|      }
 2992|  8.59k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|  8.59k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 2993|  8.59k|      if (parser->m_startElementHandler) {
  ------------------
  |  Branch (2993:11): [True: 8.59k, False: 0]
  ------------------
 2994|  8.59k|        parser->m_startElementHandler(parser->m_handlerArg, name.str,
 2995|  8.59k|                                      (const XML_Char **)parser->m_atts);
 2996|  8.59k|        noElmHandlers = XML_FALSE;
  ------------------
  |  |   56|  8.59k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2997|  8.59k|      }
 2998|  8.59k|      if (parser->m_endElementHandler) {
  ------------------
  |  Branch (2998:11): [True: 8.59k, False: 0]
  ------------------
 2999|  8.59k|        if (parser->m_startElementHandler)
  ------------------
  |  Branch (2999:13): [True: 8.59k, False: 0]
  ------------------
 3000|  8.59k|          *eventPP = *eventEndPP;
 3001|  8.59k|        parser->m_endElementHandler(parser->m_handlerArg, name.str);
 3002|  8.59k|        noElmHandlers = XML_FALSE;
  ------------------
  |  |   56|  8.59k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 3003|  8.59k|      }
 3004|  8.59k|      if (noElmHandlers && parser->m_defaultHandler)
  ------------------
  |  Branch (3004:11): [True: 0, False: 8.59k]
  |  Branch (3004:28): [True: 0, False: 0]
  ------------------
 3005|      0|        reportDefault(parser, enc, s, next);
 3006|  8.59k|      poolClear(&parser->m_tempPool);
 3007|  8.59k|      freeBindings(parser, bindings);
 3008|  8.59k|    }
 3009|  8.59k|      if ((parser->m_tagLevel == 0)
  ------------------
  |  Branch (3009:11): [True: 131, False: 8.46k]
  ------------------
 3010|  8.59k|          && (parser->m_parsingStatus.parsing != XML_FINISHED)) {
  ------------------
  |  Branch (3010:14): [True: 131, False: 0]
  ------------------
 3011|    131|        if (parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (3011:13): [True: 0, False: 131]
  ------------------
 3012|      0|          parser->m_processor = epilogProcessor;
 3013|    131|        else
 3014|    131|          return epilogProcessor(parser, next, end, nextPtr);
 3015|    131|      }
 3016|  8.46k|      break;
 3017|  21.2k|    case XML_TOK_END_TAG:
  ------------------
  |  |   66|  21.2k|#define XML_TOK_END_TAG 5
  ------------------
  |  Branch (3017:5): [True: 21.2k, False: 4.28M]
  ------------------
 3018|  21.2k|      if (parser->m_tagLevel == startTagLevel)
  ------------------
  |  Branch (3018:11): [True: 3, False: 21.2k]
  ------------------
 3019|      3|        return XML_ERROR_ASYNC_ENTITY;
 3020|  21.2k|      else {
 3021|  21.2k|        int len;
 3022|  21.2k|        const char *rawName;
 3023|  21.2k|        TAG *tag = parser->m_tagStack;
 3024|  21.2k|        rawName = s + enc->minBytesPerChar * 2;
 3025|  21.2k|        len = XmlNameLength(enc, rawName);
  ------------------
  |  |  257|  21.2k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 3026|  21.2k|        if (len != tag->rawNameLength
  ------------------
  |  Branch (3026:13): [True: 21, False: 21.1k]
  ------------------
 3027|  21.2k|            || memcmp(tag->rawName, rawName, len) != 0) {
  ------------------
  |  Branch (3027:16): [True: 171, False: 21.0k]
  ------------------
 3028|    192|          *eventPP = rawName;
 3029|    192|          return XML_ERROR_TAG_MISMATCH;
 3030|    192|        }
 3031|  21.0k|        parser->m_tagStack = tag->parent;
 3032|  21.0k|        tag->parent = parser->m_freeTagList;
 3033|  21.0k|        parser->m_freeTagList = tag;
 3034|  21.0k|        --parser->m_tagLevel;
 3035|  21.0k|        if (parser->m_endElementHandler) {
  ------------------
  |  Branch (3035:13): [True: 21.0k, False: 0]
  ------------------
 3036|  21.0k|          const XML_Char *localPart;
 3037|  21.0k|          const XML_Char *prefix;
 3038|  21.0k|          XML_Char *uri;
 3039|  21.0k|          localPart = tag->name.localPart;
 3040|  21.0k|          if (parser->m_ns && localPart) {
  ------------------
  |  Branch (3040:15): [True: 0, False: 21.0k]
  |  Branch (3040:31): [True: 0, False: 0]
  ------------------
 3041|       |            /* localPart and prefix may have been overwritten in
 3042|       |               tag->name.str, since this points to the binding->uri
 3043|       |               buffer which gets re-used; so we have to add them again
 3044|       |            */
 3045|      0|            uri = (XML_Char *)tag->name.str + tag->name.uriLen;
 3046|       |            /* don't need to check for space - already done in storeAtts() */
 3047|      0|            while (*localPart)
  ------------------
  |  Branch (3047:20): [True: 0, False: 0]
  ------------------
 3048|      0|              *uri++ = *localPart++;
 3049|      0|            prefix = tag->name.prefix;
 3050|      0|            if (parser->m_ns_triplets && prefix) {
  ------------------
  |  Branch (3050:17): [True: 0, False: 0]
  |  Branch (3050:42): [True: 0, False: 0]
  ------------------
 3051|      0|              *uri++ = parser->m_namespaceSeparator;
 3052|      0|              while (*prefix)
  ------------------
  |  Branch (3052:22): [True: 0, False: 0]
  ------------------
 3053|      0|                *uri++ = *prefix++;
 3054|      0|            }
 3055|      0|            *uri = XML_T('\0');
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
 3056|      0|          }
 3057|  21.0k|          parser->m_endElementHandler(parser->m_handlerArg, tag->name.str);
 3058|  21.0k|        } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3058:20): [True: 0, False: 0]
  ------------------
 3059|      0|          reportDefault(parser, enc, s, next);
 3060|  21.0k|        while (tag->bindings) {
  ------------------
  |  Branch (3060:16): [True: 0, False: 21.0k]
  ------------------
 3061|      0|          BINDING *b = tag->bindings;
 3062|      0|          if (parser->m_endNamespaceDeclHandler)
  ------------------
  |  Branch (3062:15): [True: 0, False: 0]
  ------------------
 3063|      0|            parser->m_endNamespaceDeclHandler(parser->m_handlerArg,
 3064|      0|                                              b->prefix->name);
 3065|      0|          tag->bindings = tag->bindings->nextTagBinding;
 3066|      0|          b->nextTagBinding = parser->m_freeBindingList;
 3067|      0|          parser->m_freeBindingList = b;
 3068|      0|          b->prefix->binding = b->prevPrefixBinding;
 3069|      0|        }
 3070|  21.0k|        if ((parser->m_tagLevel == 0)
  ------------------
  |  Branch (3070:13): [True: 21, False: 20.9k]
  ------------------
 3071|  21.0k|            && (parser->m_parsingStatus.parsing != XML_FINISHED)) {
  ------------------
  |  Branch (3071:16): [True: 21, False: 0]
  ------------------
 3072|     21|          if (parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (3072:15): [True: 0, False: 21]
  ------------------
 3073|      0|            parser->m_processor = epilogProcessor;
 3074|     21|          else
 3075|     21|            return epilogProcessor(parser, next, end, nextPtr);
 3076|     21|        }
 3077|  21.0k|      }
 3078|  20.9k|      break;
 3079|  20.9k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  7.14k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (3079:5): [True: 7.14k, False: 4.30M]
  ------------------
 3080|  7.14k|      int n = XmlCharRefNumber(enc, s);
  ------------------
  |  |  264|  7.14k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 3081|  7.14k|      if (n < 0)
  ------------------
  |  Branch (3081:11): [True: 214, False: 6.92k]
  ------------------
 3082|    214|        return XML_ERROR_BAD_CHAR_REF;
 3083|  6.92k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3083:11): [True: 0, False: 6.92k]
  ------------------
 3084|      0|        XML_Char buf[XML_ENCODE_MAX];
 3085|      0|        parser->m_characterDataHandler(parser->m_handlerArg, buf,
 3086|      0|                                       XmlEncode(n, (ICHAR *)buf));
  ------------------
  |  |  163|      0|#  define XmlEncode XmlUtf8Encode
  ------------------
 3087|  6.92k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3087:18): [True: 0, False: 6.92k]
  ------------------
 3088|      0|        reportDefault(parser, enc, s, next);
 3089|  6.92k|    } break;
 3090|     10|    case XML_TOK_XML_DECL:
  ------------------
  |  |   77|     10|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (3090:5): [True: 10, False: 4.31M]
  ------------------
 3091|     10|      return XML_ERROR_MISPLACED_XML_PI;
 3092|  1.31M|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|  1.31M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (3092:5): [True: 1.31M, False: 2.99M]
  ------------------
 3093|  1.31M|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3093:11): [True: 0, False: 1.31M]
  ------------------
 3094|      0|        XML_Char c = 0xA;
 3095|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 3096|  1.31M|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3096:18): [True: 0, False: 1.31M]
  ------------------
 3097|      0|        reportDefault(parser, enc, s, next);
 3098|  1.31M|      break;
 3099|  2.59k|    case XML_TOK_CDATA_SECT_OPEN: {
  ------------------
  |  |   69|  2.59k|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  |  Branch (3099:5): [True: 2.59k, False: 4.30M]
  ------------------
 3100|  2.59k|      enum XML_Error result;
 3101|  2.59k|      if (parser->m_startCdataSectionHandler)
  ------------------
  |  Branch (3101:11): [True: 0, False: 2.59k]
  ------------------
 3102|      0|        parser->m_startCdataSectionHandler(parser->m_handlerArg);
 3103|       |      /* BEGIN disabled code */
 3104|       |      /* Suppose you doing a transformation on a document that involves
 3105|       |         changing only the character data.  You set up a defaultHandler
 3106|       |         and a characterDataHandler.  The defaultHandler simply copies
 3107|       |         characters through.  The characterDataHandler does the
 3108|       |         transformation and writes the characters out escaping them as
 3109|       |         necessary.  This case will fail to work if we leave out the
 3110|       |         following two lines (because & and < inside CDATA sections will
 3111|       |         be incorrectly escaped).
 3112|       |
 3113|       |         However, now we have a start/endCdataSectionHandler, so it seems
 3114|       |         easier to let the user deal with this.
 3115|       |      */
 3116|  2.59k|      else if ((0) && parser->m_characterDataHandler)
  ------------------
  |  Branch (3116:16): [Folded - Ignored]
  |  Branch (3116:23): [True: 0, False: 0]
  ------------------
 3117|      0|        parser->m_characterDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 3118|      0|                                       0);
 3119|       |      /* END disabled code */
 3120|  2.59k|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3120:16): [True: 0, False: 2.59k]
  ------------------
 3121|      0|        reportDefault(parser, enc, s, next);
 3122|  2.59k|      result
 3123|  2.59k|          = doCdataSection(parser, enc, &next, end, nextPtr, haveMore, account);
 3124|  2.59k|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (3124:11): [True: 227, False: 2.37k]
  ------------------
 3125|    227|        return result;
 3126|  2.37k|      else if (! next) {
  ------------------
  |  Branch (3126:16): [True: 635, False: 1.73k]
  ------------------
 3127|    635|        parser->m_processor = cdataSectionProcessor;
 3128|    635|        return result;
 3129|    635|      }
 3130|  2.59k|    } break;
 3131|  1.73k|    case XML_TOK_TRAILING_RSQB:
  ------------------
  |  |   46|    689|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  |  Branch (3131:5): [True: 689, False: 4.30M]
  ------------------
 3132|    689|      if (haveMore) {
  ------------------
  |  Branch (3132:11): [True: 23, False: 666]
  ------------------
 3133|     23|        *nextPtr = s;
 3134|     23|        return XML_ERROR_NONE;
 3135|     23|      }
 3136|    666|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3136:11): [True: 0, False: 666]
  ------------------
 3137|      0|        if (MUST_CONVERT(enc, s)) {
  ------------------
  |  |  164|      0|#  define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
  |  |  ------------------
  |  |  |  Branch (164:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3138|      0|          ICHAR *dataPtr = (ICHAR *)parser->m_dataBuf;
 3139|      0|          XmlConvert(enc, &s, end, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
  ------------------
  |  |  160|      0|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|      0|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 3140|      0|          parser->m_characterDataHandler(
 3141|      0|              parser->m_handlerArg, parser->m_dataBuf,
 3142|      0|              (int)(dataPtr - (ICHAR *)parser->m_dataBuf));
 3143|      0|        } else
 3144|      0|          parser->m_characterDataHandler(
 3145|      0|              parser->m_handlerArg, (const XML_Char *)s,
 3146|      0|              (int)((const XML_Char *)end - (const XML_Char *)s));
 3147|    666|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3147:18): [True: 0, False: 666]
  ------------------
 3148|      0|        reportDefault(parser, enc, s, end);
 3149|       |      /* We are at the end of the final buffer, should we check for
 3150|       |         XML_SUSPENDED, XML_FINISHED?
 3151|       |      */
 3152|    666|      if (startTagLevel == 0) {
  ------------------
  |  Branch (3152:11): [True: 0, False: 666]
  ------------------
 3153|      0|        *eventPP = end;
 3154|      0|        return XML_ERROR_NO_ELEMENTS;
 3155|      0|      }
 3156|    666|      if (parser->m_tagLevel != startTagLevel) {
  ------------------
  |  Branch (3156:11): [True: 32, False: 634]
  ------------------
 3157|     32|        *eventPP = end;
 3158|     32|        return XML_ERROR_ASYNC_ENTITY;
 3159|     32|      }
 3160|    634|      *nextPtr = end;
 3161|    634|      return XML_ERROR_NONE;
 3162|   470k|    case XML_TOK_DATA_CHARS: {
  ------------------
  |  |   67|   470k|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (3162:5): [True: 470k, False: 3.83M]
  ------------------
 3163|   470k|      XML_CharacterDataHandler charDataHandler = parser->m_characterDataHandler;
 3164|   470k|      if (charDataHandler) {
  ------------------
  |  Branch (3164:11): [True: 0, False: 470k]
  ------------------
 3165|      0|        if (MUST_CONVERT(enc, s)) {
  ------------------
  |  |  164|      0|#  define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
  |  |  ------------------
  |  |  |  Branch (164:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3166|      0|          for (;;) {
 3167|      0|            ICHAR *dataPtr = (ICHAR *)parser->m_dataBuf;
 3168|      0|            const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  160|      0|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|      0|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 3169|      0|                enc, &s, next, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
 3170|      0|            *eventEndPP = s;
 3171|      0|            charDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 3172|      0|                            (int)(dataPtr - (ICHAR *)parser->m_dataBuf));
 3173|      0|            if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (3173:17): [True: 0, False: 0]
  ------------------
 3174|      0|                || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (3174:20): [True: 0, False: 0]
  ------------------
 3175|      0|              break;
 3176|      0|            *eventPP = s;
 3177|      0|          }
 3178|      0|        } else
 3179|      0|          charDataHandler(parser->m_handlerArg, (const XML_Char *)s,
 3180|      0|                          (int)((const XML_Char *)next - (const XML_Char *)s));
 3181|   470k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3181:18): [True: 0, False: 470k]
  ------------------
 3182|      0|        reportDefault(parser, enc, s, next);
 3183|   470k|    } break;
 3184|  10.5k|    case XML_TOK_PI:
  ------------------
  |  |   76|  10.5k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (3184:5): [True: 10.5k, False: 4.29M]
  ------------------
 3185|  10.5k|      if (! reportProcessingInstruction(parser, enc, s, next))
  ------------------
  |  Branch (3185:11): [True: 0, False: 10.5k]
  ------------------
 3186|      0|        return XML_ERROR_NO_MEMORY;
 3187|  10.5k|      break;
 3188|  10.5k|    case XML_TOK_COMMENT:
  ------------------
  |  |   78|    879|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (3188:5): [True: 879, False: 4.30M]
  ------------------
 3189|    879|      if (! reportComment(parser, enc, s, next))
  ------------------
  |  Branch (3189:11): [True: 0, False: 879]
  ------------------
 3190|      0|        return XML_ERROR_NO_MEMORY;
 3191|    879|      break;
 3192|    879|    default:
  ------------------
  |  Branch (3192:5): [True: 0, False: 4.31M]
  ------------------
 3193|       |      /* All of the tokens produced by XmlContentTok() have their own
 3194|       |       * explicit cases, so this default is not strictly necessary.
 3195|       |       * However it is a useful safety net, so we retain the code and
 3196|       |       * simply exclude it from the coverage tests.
 3197|       |       *
 3198|       |       * LCOV_EXCL_START
 3199|       |       */
 3200|      0|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (3200:11): [True: 0, False: 0]
  ------------------
 3201|      0|        reportDefault(parser, enc, s, next);
 3202|      0|      break;
 3203|       |      /* LCOV_EXCL_STOP */
 3204|  4.31M|    }
 3205|  4.19M|    *eventPP = s = next;
 3206|  4.19M|    switch (parser->m_parsingStatus.parsing) {
 3207|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (3207:5): [True: 0, False: 4.19M]
  ------------------
 3208|      0|      *nextPtr = next;
 3209|      0|      return XML_ERROR_NONE;
 3210|      0|    case XML_FINISHED:
  ------------------
  |  Branch (3210:5): [True: 0, False: 4.19M]
  ------------------
 3211|      0|      return XML_ERROR_ABORTED;
 3212|  4.19M|    default:;
  ------------------
  |  Branch (3212:5): [True: 4.19M, False: 0]
  ------------------
 3213|  4.19M|    }
 3214|  4.19M|  }
 3215|       |  /* not reached */
 3216|   117k|}
xmlparse.c:hashTableIterInit:
 7158|  19.7k|hashTableIterInit(HASH_TABLE_ITER *iter, const HASH_TABLE *table) {
 7159|  19.7k|  iter->p = table->v;
 7160|  19.7k|  iter->end = iter->p ? iter->p + table->size : NULL;
  ------------------
  |  Branch (7160:15): [True: 10.4k, False: 9.38k]
  ------------------
 7161|  19.7k|}
xmlparse.c:hashTableIterNext:
 7164|  42.1k|hashTableIterNext(HASH_TABLE_ITER *iter) {
 7165|   708k|  while (iter->p != iter->end) {
  ------------------
  |  Branch (7165:10): [True: 688k, False: 19.7k]
  ------------------
 7166|   688k|    NAMED *tem = *(iter->p)++;
 7167|   688k|    if (tem)
  ------------------
  |  Branch (7167:9): [True: 22.3k, False: 666k]
  ------------------
 7168|  22.3k|      return tem;
 7169|   688k|  }
 7170|  19.7k|  return NULL;
 7171|  42.1k|}
xmlparse.c:storeAtts:
 3253|  2.24M|          enum XML_Account account) {
 3254|  2.24M|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 3255|  2.24M|  ELEMENT_TYPE *elementType;
 3256|  2.24M|  int nDefaultAtts;
 3257|  2.24M|  const XML_Char **appAtts; /* the attribute list for the application */
 3258|  2.24M|  int attIndex = 0;
 3259|  2.24M|  int prefixLen;
 3260|  2.24M|  int i;
 3261|  2.24M|  int n;
 3262|  2.24M|  XML_Char *uri;
 3263|  2.24M|  int nPrefixes = 0;
 3264|  2.24M|  BINDING *binding;
 3265|  2.24M|  const XML_Char *localPart;
 3266|       |
 3267|       |  /* lookup the element type name */
 3268|  2.24M|  elementType
 3269|  2.24M|      = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, tagNamePtr->str, 0);
 3270|  2.24M|  if (! elementType) {
  ------------------
  |  Branch (3270:7): [True: 15.0k, False: 2.23M]
  ------------------
 3271|  15.0k|    const XML_Char *name = poolCopyString(&dtd->pool, tagNamePtr->str);
 3272|  15.0k|    if (! name)
  ------------------
  |  Branch (3272:9): [True: 0, False: 15.0k]
  ------------------
 3273|      0|      return XML_ERROR_NO_MEMORY;
 3274|  15.0k|    elementType = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, name,
 3275|  15.0k|                                         sizeof(ELEMENT_TYPE));
 3276|  15.0k|    if (! elementType)
  ------------------
  |  Branch (3276:9): [True: 0, False: 15.0k]
  ------------------
 3277|      0|      return XML_ERROR_NO_MEMORY;
 3278|  15.0k|    if (parser->m_ns && ! setElementTypePrefix(parser, elementType))
  ------------------
  |  Branch (3278:9): [True: 0, False: 15.0k]
  |  Branch (3278:25): [True: 0, False: 0]
  ------------------
 3279|      0|      return XML_ERROR_NO_MEMORY;
 3280|  15.0k|  }
 3281|  2.24M|  nDefaultAtts = elementType->nDefaultAtts;
 3282|       |
 3283|       |  /* get the attributes from the tokenizer */
 3284|  2.24M|  n = XmlGetAttributes(enc, attStr, parser->m_attsSize, parser->m_atts);
  ------------------
  |  |  262|  2.24M|  (((enc)->getAtts)(enc, ptr, attsMax, atts))
  ------------------
 3285|       |
 3286|       |  /* Detect and prevent integer overflow */
 3287|  2.24M|  if (n > INT_MAX - nDefaultAtts) {
  ------------------
  |  Branch (3287:7): [True: 0, False: 2.24M]
  ------------------
 3288|      0|    return XML_ERROR_NO_MEMORY;
 3289|      0|  }
 3290|       |
 3291|  2.24M|  if (n + nDefaultAtts > parser->m_attsSize) {
  ------------------
  |  Branch (3291:7): [True: 424, False: 2.24M]
  ------------------
 3292|    424|    int oldAttsSize = parser->m_attsSize;
 3293|    424|    ATTRIBUTE *temp;
 3294|       |#ifdef XML_ATTR_INFO
 3295|       |    XML_AttrInfo *temp2;
 3296|       |#endif
 3297|       |
 3298|       |    /* Detect and prevent integer overflow */
 3299|    424|    if ((nDefaultAtts > INT_MAX - INIT_ATTS_SIZE)
  ------------------
  |  |  243|    424|#define INIT_ATTS_SIZE 16
  ------------------
  |  Branch (3299:9): [True: 0, False: 424]
  ------------------
 3300|    424|        || (n > INT_MAX - (nDefaultAtts + INIT_ATTS_SIZE))) {
  ------------------
  |  |  243|    424|#define INIT_ATTS_SIZE 16
  ------------------
  |  Branch (3300:12): [True: 0, False: 424]
  ------------------
 3301|      0|      return XML_ERROR_NO_MEMORY;
 3302|      0|    }
 3303|       |
 3304|    424|    parser->m_attsSize = n + nDefaultAtts + INIT_ATTS_SIZE;
  ------------------
  |  |  243|    424|#define INIT_ATTS_SIZE 16
  ------------------
 3305|       |
 3306|       |    /* Detect and prevent integer overflow.
 3307|       |     * The preprocessor guard addresses the "always false" warning
 3308|       |     * from -Wtype-limits on platforms where
 3309|       |     * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3310|       |#if UINT_MAX >= SIZE_MAX
 3311|       |    if ((unsigned)parser->m_attsSize > (size_t)(-1) / sizeof(ATTRIBUTE)) {
 3312|       |      parser->m_attsSize = oldAttsSize;
 3313|       |      return XML_ERROR_NO_MEMORY;
 3314|       |    }
 3315|       |#endif
 3316|       |
 3317|    424|    temp = (ATTRIBUTE *)REALLOC(parser, (void *)parser->m_atts,
  ------------------
  |  |  714|    424|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 3318|    424|                                parser->m_attsSize * sizeof(ATTRIBUTE));
 3319|    424|    if (temp == NULL) {
  ------------------
  |  Branch (3319:9): [True: 0, False: 424]
  ------------------
 3320|      0|      parser->m_attsSize = oldAttsSize;
 3321|      0|      return XML_ERROR_NO_MEMORY;
 3322|      0|    }
 3323|    424|    parser->m_atts = temp;
 3324|       |#ifdef XML_ATTR_INFO
 3325|       |    /* Detect and prevent integer overflow.
 3326|       |     * The preprocessor guard addresses the "always false" warning
 3327|       |     * from -Wtype-limits on platforms where
 3328|       |     * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3329|       |#  if UINT_MAX >= SIZE_MAX
 3330|       |    if ((unsigned)parser->m_attsSize > (size_t)(-1) / sizeof(XML_AttrInfo)) {
 3331|       |      parser->m_attsSize = oldAttsSize;
 3332|       |      return XML_ERROR_NO_MEMORY;
 3333|       |    }
 3334|       |#  endif
 3335|       |
 3336|       |    temp2 = (XML_AttrInfo *)REALLOC(parser, (void *)parser->m_attInfo,
 3337|       |                                    parser->m_attsSize * sizeof(XML_AttrInfo));
 3338|       |    if (temp2 == NULL) {
 3339|       |      parser->m_attsSize = oldAttsSize;
 3340|       |      return XML_ERROR_NO_MEMORY;
 3341|       |    }
 3342|       |    parser->m_attInfo = temp2;
 3343|       |#endif
 3344|    424|    if (n > oldAttsSize)
  ------------------
  |  Branch (3344:9): [True: 406, False: 18]
  ------------------
 3345|    406|      XmlGetAttributes(enc, attStr, n, parser->m_atts);
  ------------------
  |  |  262|    406|  (((enc)->getAtts)(enc, ptr, attsMax, atts))
  ------------------
 3346|    424|  }
 3347|       |
 3348|  2.24M|  appAtts = (const XML_Char **)parser->m_atts;
 3349|  2.26M|  for (i = 0; i < n; i++) {
  ------------------
  |  Branch (3349:15): [True: 18.4k, False: 2.24M]
  ------------------
 3350|  18.4k|    ATTRIBUTE *currAtt = &parser->m_atts[i];
 3351|       |#ifdef XML_ATTR_INFO
 3352|       |    XML_AttrInfo *currAttInfo = &parser->m_attInfo[i];
 3353|       |#endif
 3354|       |    /* add the name and value to the attribute list */
 3355|  18.4k|    ATTRIBUTE_ID *attId
 3356|  18.4k|        = getAttributeId(parser, enc, currAtt->name,
 3357|  18.4k|                         currAtt->name + XmlNameLength(enc, currAtt->name));
  ------------------
  |  |  257|  18.4k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 3358|  18.4k|    if (! attId)
  ------------------
  |  Branch (3358:9): [True: 0, False: 18.4k]
  ------------------
 3359|      0|      return XML_ERROR_NO_MEMORY;
 3360|       |#ifdef XML_ATTR_INFO
 3361|       |    currAttInfo->nameStart
 3362|       |        = parser->m_parseEndByteIndex - (parser->m_parseEndPtr - currAtt->name);
 3363|       |    currAttInfo->nameEnd
 3364|       |        = currAttInfo->nameStart + XmlNameLength(enc, currAtt->name);
 3365|       |    currAttInfo->valueStart = parser->m_parseEndByteIndex
 3366|       |                              - (parser->m_parseEndPtr - currAtt->valuePtr);
 3367|       |    currAttInfo->valueEnd = parser->m_parseEndByteIndex
 3368|       |                            - (parser->m_parseEndPtr - currAtt->valueEnd);
 3369|       |#endif
 3370|       |    /* Detect duplicate attributes by their QNames. This does not work when
 3371|       |       namespace processing is turned on and different prefixes for the same
 3372|       |       namespace are used. For this case we have a check further down.
 3373|       |    */
 3374|  18.4k|    if ((attId->name)[-1]) {
  ------------------
  |  Branch (3374:9): [True: 482, False: 17.9k]
  ------------------
 3375|    482|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (3375:11): [True: 479, False: 3]
  ------------------
 3376|    479|        parser->m_eventPtr = parser->m_atts[i].name;
 3377|    482|      return XML_ERROR_DUPLICATE_ATTRIBUTE;
 3378|    482|    }
 3379|  17.9k|    (attId->name)[-1] = 1;
 3380|  17.9k|    appAtts[attIndex++] = attId->name;
 3381|  17.9k|    if (! parser->m_atts[i].normalized) {
  ------------------
  |  Branch (3381:9): [True: 8.65k, False: 9.30k]
  ------------------
 3382|  8.65k|      enum XML_Error result;
 3383|  8.65k|      XML_Bool isCdata = XML_TRUE;
  ------------------
  |  |   55|  8.65k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 3384|       |
 3385|       |      /* figure out whether declared as other than CDATA */
 3386|  8.65k|      if (attId->maybeTokenized) {
  ------------------
  |  Branch (3386:11): [True: 1.16k, False: 7.48k]
  ------------------
 3387|  1.16k|        int j;
 3388|  46.5k|        for (j = 0; j < nDefaultAtts; j++) {
  ------------------
  |  Branch (3388:21): [True: 46.2k, False: 260]
  ------------------
 3389|  46.2k|          if (attId == elementType->defaultAtts[j].id) {
  ------------------
  |  Branch (3389:15): [True: 909, False: 45.3k]
  ------------------
 3390|    909|            isCdata = elementType->defaultAtts[j].isCdata;
 3391|    909|            break;
 3392|    909|          }
 3393|  46.2k|        }
 3394|  1.16k|      }
 3395|       |
 3396|       |      /* normalize the attribute value */
 3397|  8.65k|      result = storeAttributeValue(
 3398|  8.65k|          parser, enc, isCdata, parser->m_atts[i].valuePtr,
 3399|  8.65k|          parser->m_atts[i].valueEnd, &parser->m_tempPool, account);
 3400|  8.65k|      if (result)
  ------------------
  |  Branch (3400:11): [True: 212, False: 8.44k]
  ------------------
 3401|    212|        return result;
 3402|  8.44k|      appAtts[attIndex] = poolStart(&parser->m_tempPool);
  ------------------
  |  |  595|  8.44k|#define poolStart(pool) ((pool)->start)
  ------------------
 3403|  8.44k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|  8.44k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3404|  9.30k|    } else {
 3405|       |      /* the value did not need normalizing */
 3406|  9.30k|      appAtts[attIndex] = poolStoreString(&parser->m_tempPool, enc,
 3407|  9.30k|                                          parser->m_atts[i].valuePtr,
 3408|  9.30k|                                          parser->m_atts[i].valueEnd);
 3409|  9.30k|      if (appAtts[attIndex] == 0)
  ------------------
  |  Branch (3409:11): [True: 0, False: 9.30k]
  ------------------
 3410|      0|        return XML_ERROR_NO_MEMORY;
 3411|  9.30k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|  9.30k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3412|  9.30k|    }
 3413|       |    /* handle prefixed attribute names */
 3414|  17.7k|    if (attId->prefix) {
  ------------------
  |  Branch (3414:9): [True: 0, False: 17.7k]
  ------------------
 3415|      0|      if (attId->xmlns) {
  ------------------
  |  Branch (3415:11): [True: 0, False: 0]
  ------------------
 3416|       |        /* deal with namespace declarations here */
 3417|      0|        enum XML_Error result = addBinding(parser, attId->prefix, attId,
 3418|      0|                                           appAtts[attIndex], bindingsPtr);
 3419|      0|        if (result)
  ------------------
  |  Branch (3419:13): [True: 0, False: 0]
  ------------------
 3420|      0|          return result;
 3421|      0|        --attIndex;
 3422|      0|      } else {
 3423|       |        /* deal with other prefixed names later */
 3424|      0|        attIndex++;
 3425|      0|        nPrefixes++;
 3426|      0|        (attId->name)[-1] = 2;
 3427|      0|      }
 3428|      0|    } else
 3429|  17.7k|      attIndex++;
 3430|  17.7k|  }
 3431|       |
 3432|       |  /* set-up for XML_GetSpecifiedAttributeCount and XML_GetIdAttributeIndex */
 3433|  2.24M|  parser->m_nSpecifiedAtts = attIndex;
 3434|  2.24M|  if (elementType->idAtt && (elementType->idAtt->name)[-1]) {
  ------------------
  |  Branch (3434:7): [True: 428, False: 2.24M]
  |  Branch (3434:29): [True: 216, False: 212]
  ------------------
 3435|    282|    for (i = 0; i < attIndex; i += 2)
  ------------------
  |  Branch (3435:17): [True: 282, False: 0]
  ------------------
 3436|    282|      if (appAtts[i] == elementType->idAtt->name) {
  ------------------
  |  Branch (3436:11): [True: 216, False: 66]
  ------------------
 3437|    216|        parser->m_idAttIndex = i;
 3438|    216|        break;
 3439|    216|      }
 3440|    216|  } else
 3441|  2.24M|    parser->m_idAttIndex = -1;
 3442|       |
 3443|       |  /* do attribute defaulting */
 3444|  2.31M|  for (i = 0; i < nDefaultAtts; i++) {
  ------------------
  |  Branch (3444:15): [True: 69.7k, False: 2.24M]
  ------------------
 3445|  69.7k|    const DEFAULT_ATTRIBUTE *da = elementType->defaultAtts + i;
 3446|  69.7k|    if (! (da->id->name)[-1] && da->value) {
  ------------------
  |  Branch (3446:9): [True: 68.7k, False: 1.01k]
  |  Branch (3446:33): [True: 990, False: 67.7k]
  ------------------
 3447|    990|      if (da->id->prefix) {
  ------------------
  |  Branch (3447:11): [True: 0, False: 990]
  ------------------
 3448|      0|        if (da->id->xmlns) {
  ------------------
  |  Branch (3448:13): [True: 0, False: 0]
  ------------------
 3449|      0|          enum XML_Error result = addBinding(parser, da->id->prefix, da->id,
 3450|      0|                                             da->value, bindingsPtr);
 3451|      0|          if (result)
  ------------------
  |  Branch (3451:15): [True: 0, False: 0]
  ------------------
 3452|      0|            return result;
 3453|      0|        } else {
 3454|      0|          (da->id->name)[-1] = 2;
 3455|      0|          nPrefixes++;
 3456|      0|          appAtts[attIndex++] = da->id->name;
 3457|      0|          appAtts[attIndex++] = da->value;
 3458|      0|        }
 3459|    990|      } else {
 3460|    990|        (da->id->name)[-1] = 1;
 3461|    990|        appAtts[attIndex++] = da->id->name;
 3462|    990|        appAtts[attIndex++] = da->value;
 3463|    990|      }
 3464|    990|    }
 3465|  69.7k|  }
 3466|  2.24M|  appAtts[attIndex] = 0;
 3467|       |
 3468|       |  /* expand prefixed attribute names, check for duplicates,
 3469|       |     and clear flags that say whether attributes were specified */
 3470|  2.24M|  i = 0;
 3471|  2.24M|  if (nPrefixes) {
  ------------------
  |  Branch (3471:7): [True: 0, False: 2.24M]
  ------------------
 3472|      0|    int j; /* hash table index */
 3473|      0|    unsigned long version = parser->m_nsAttsVersion;
 3474|       |
 3475|       |    /* Detect and prevent invalid shift */
 3476|      0|    if (parser->m_nsAttsPower >= sizeof(unsigned int) * 8 /* bits per byte */) {
  ------------------
  |  Branch (3476:9): [True: 0, False: 0]
  ------------------
 3477|      0|      return XML_ERROR_NO_MEMORY;
 3478|      0|    }
 3479|       |
 3480|      0|    unsigned int nsAttsSize = 1u << parser->m_nsAttsPower;
 3481|      0|    unsigned char oldNsAttsPower = parser->m_nsAttsPower;
 3482|       |    /* size of hash table must be at least 2 * (# of prefixed attributes) */
 3483|      0|    if ((nPrefixes << 1)
  ------------------
  |  Branch (3483:9): [True: 0, False: 0]
  ------------------
 3484|      0|        >> parser->m_nsAttsPower) { /* true for m_nsAttsPower = 0 */
 3485|      0|      NS_ATT *temp;
 3486|       |      /* hash table size must also be a power of 2 and >= 8 */
 3487|      0|      while (nPrefixes >> parser->m_nsAttsPower++)
  ------------------
  |  Branch (3487:14): [True: 0, False: 0]
  ------------------
 3488|      0|        ;
 3489|      0|      if (parser->m_nsAttsPower < 3)
  ------------------
  |  Branch (3489:11): [True: 0, False: 0]
  ------------------
 3490|      0|        parser->m_nsAttsPower = 3;
 3491|       |
 3492|       |      /* Detect and prevent invalid shift */
 3493|      0|      if (parser->m_nsAttsPower >= sizeof(nsAttsSize) * 8 /* bits per byte */) {
  ------------------
  |  Branch (3493:11): [True: 0, False: 0]
  ------------------
 3494|       |        /* Restore actual size of memory in m_nsAtts */
 3495|      0|        parser->m_nsAttsPower = oldNsAttsPower;
 3496|      0|        return XML_ERROR_NO_MEMORY;
 3497|      0|      }
 3498|       |
 3499|      0|      nsAttsSize = 1u << parser->m_nsAttsPower;
 3500|       |
 3501|       |      /* Detect and prevent integer overflow.
 3502|       |       * The preprocessor guard addresses the "always false" warning
 3503|       |       * from -Wtype-limits on platforms where
 3504|       |       * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3505|       |#if UINT_MAX >= SIZE_MAX
 3506|       |      if (nsAttsSize > (size_t)(-1) / sizeof(NS_ATT)) {
 3507|       |        /* Restore actual size of memory in m_nsAtts */
 3508|       |        parser->m_nsAttsPower = oldNsAttsPower;
 3509|       |        return XML_ERROR_NO_MEMORY;
 3510|       |      }
 3511|       |#endif
 3512|       |
 3513|      0|      temp = (NS_ATT *)REALLOC(parser, parser->m_nsAtts,
  ------------------
  |  |  714|      0|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 3514|      0|                               nsAttsSize * sizeof(NS_ATT));
 3515|      0|      if (! temp) {
  ------------------
  |  Branch (3515:11): [True: 0, False: 0]
  ------------------
 3516|       |        /* Restore actual size of memory in m_nsAtts */
 3517|      0|        parser->m_nsAttsPower = oldNsAttsPower;
 3518|      0|        return XML_ERROR_NO_MEMORY;
 3519|      0|      }
 3520|      0|      parser->m_nsAtts = temp;
 3521|      0|      version = 0; /* force re-initialization of m_nsAtts hash table */
 3522|      0|    }
 3523|       |    /* using a version flag saves us from initializing m_nsAtts every time */
 3524|      0|    if (! version) { /* initialize version flags when version wraps around */
  ------------------
  |  Branch (3524:9): [True: 0, False: 0]
  ------------------
 3525|      0|      version = INIT_ATTS_VERSION;
  ------------------
  |  |  244|      0|#define INIT_ATTS_VERSION 0xFFFFFFFF
  ------------------
 3526|      0|      for (j = nsAttsSize; j != 0;)
  ------------------
  |  Branch (3526:28): [True: 0, False: 0]
  ------------------
 3527|      0|        parser->m_nsAtts[--j].version = version;
 3528|      0|    }
 3529|      0|    parser->m_nsAttsVersion = --version;
 3530|       |
 3531|       |    /* expand prefixed names and check for duplicates */
 3532|      0|    for (; i < attIndex; i += 2) {
  ------------------
  |  Branch (3532:12): [True: 0, False: 0]
  ------------------
 3533|      0|      const XML_Char *s = appAtts[i];
 3534|      0|      if (s[-1] == 2) { /* prefixed */
  ------------------
  |  Branch (3534:11): [True: 0, False: 0]
  ------------------
 3535|      0|        ATTRIBUTE_ID *id;
 3536|      0|        const BINDING *b;
 3537|      0|        unsigned long uriHash;
 3538|      0|        struct siphash sip_state;
 3539|      0|        struct sipkey sip_key;
 3540|       |
 3541|      0|        copy_salt_to_sipkey(parser, &sip_key);
 3542|      0|        sip24_init(&sip_state, &sip_key);
 3543|       |
 3544|      0|        ((XML_Char *)s)[-1] = 0; /* clear flag */
 3545|      0|        id = (ATTRIBUTE_ID *)lookup(parser, &dtd->attributeIds, s, 0);
 3546|      0|        if (! id || ! id->prefix) {
  ------------------
  |  Branch (3546:13): [True: 0, False: 0]
  |  Branch (3546:21): [True: 0, False: 0]
  ------------------
 3547|       |          /* This code is walking through the appAtts array, dealing
 3548|       |           * with (in this case) a prefixed attribute name.  To be in
 3549|       |           * the array, the attribute must have already been bound, so
 3550|       |           * has to have passed through the hash table lookup once
 3551|       |           * already.  That implies that an entry for it already
 3552|       |           * exists, so the lookup above will return a pointer to
 3553|       |           * already allocated memory.  There is no opportunaity for
 3554|       |           * the allocator to fail, so the condition above cannot be
 3555|       |           * fulfilled.
 3556|       |           *
 3557|       |           * Since it is difficult to be certain that the above
 3558|       |           * analysis is complete, we retain the test and merely
 3559|       |           * remove the code from coverage tests.
 3560|       |           */
 3561|      0|          return XML_ERROR_NO_MEMORY; /* LCOV_EXCL_LINE */
 3562|      0|        }
 3563|      0|        b = id->prefix->binding;
 3564|      0|        if (! b)
  ------------------
  |  Branch (3564:13): [True: 0, False: 0]
  ------------------
 3565|      0|          return XML_ERROR_UNBOUND_PREFIX;
 3566|       |
 3567|      0|        for (j = 0; j < b->uriLen; j++) {
  ------------------
  |  Branch (3567:21): [True: 0, False: 0]
  ------------------
 3568|      0|          const XML_Char c = b->uri[j];
 3569|      0|          if (! poolAppendChar(&parser->m_tempPool, c))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3569:15): [True: 0, False: 0]
  ------------------
 3570|      0|            return XML_ERROR_NO_MEMORY;
 3571|      0|        }
 3572|       |
 3573|      0|        sip24_update(&sip_state, b->uri, b->uriLen * sizeof(XML_Char));
 3574|       |
 3575|      0|        while (*s++ != XML_T(ASCII_COLON))
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (3575:16): [True: 0, False: 0]
  ------------------
 3576|      0|          ;
 3577|       |
 3578|      0|        sip24_update(&sip_state, s, keylen(s) * sizeof(XML_Char));
 3579|       |
 3580|      0|        do { /* copies null terminator */
 3581|      0|          if (! poolAppendChar(&parser->m_tempPool, *s))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3581:15): [True: 0, False: 0]
  ------------------
 3582|      0|            return XML_ERROR_NO_MEMORY;
 3583|      0|        } while (*s++);
  ------------------
  |  Branch (3583:18): [True: 0, False: 0]
  ------------------
 3584|       |
 3585|      0|        uriHash = (unsigned long)sip24_final(&sip_state);
 3586|       |
 3587|      0|        { /* Check hash table for duplicate of expanded name (uriName).
 3588|       |             Derived from code in lookup(parser, HASH_TABLE *table, ...).
 3589|       |          */
 3590|      0|          unsigned char step = 0;
 3591|      0|          unsigned long mask = nsAttsSize - 1;
 3592|      0|          j = uriHash & mask; /* index into hash table */
 3593|      0|          while (parser->m_nsAtts[j].version == version) {
  ------------------
  |  Branch (3593:18): [True: 0, False: 0]
  ------------------
 3594|       |            /* for speed we compare stored hash values first */
 3595|      0|            if (uriHash == parser->m_nsAtts[j].hash) {
  ------------------
  |  Branch (3595:17): [True: 0, False: 0]
  ------------------
 3596|      0|              const XML_Char *s1 = poolStart(&parser->m_tempPool);
  ------------------
  |  |  595|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 3597|      0|              const XML_Char *s2 = parser->m_nsAtts[j].uriName;
 3598|       |              /* s1 is null terminated, but not s2 */
 3599|      0|              for (; *s1 == *s2 && *s1 != 0; s1++, s2++)
  ------------------
  |  Branch (3599:22): [True: 0, False: 0]
  |  Branch (3599:36): [True: 0, False: 0]
  ------------------
 3600|      0|                ;
 3601|      0|              if (*s1 == 0)
  ------------------
  |  Branch (3601:19): [True: 0, False: 0]
  ------------------
 3602|      0|                return XML_ERROR_DUPLICATE_ATTRIBUTE;
 3603|      0|            }
 3604|      0|            if (! step)
  ------------------
  |  Branch (3604:17): [True: 0, False: 0]
  ------------------
 3605|      0|              step = PROBE_STEP(uriHash, mask, parser->m_nsAttsPower);
  ------------------
  |  |  234|      0|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  232|      0|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 3606|      0|            j < step ? (j += nsAttsSize - step) : (j -= step);
  ------------------
  |  Branch (3606:13): [True: 0, False: 0]
  ------------------
 3607|      0|          }
 3608|      0|        }
 3609|       |
 3610|      0|        if (parser->m_ns_triplets) { /* append namespace separator and prefix */
  ------------------
  |  Branch (3610:13): [True: 0, False: 0]
  ------------------
 3611|      0|          parser->m_tempPool.ptr[-1] = parser->m_namespaceSeparator;
 3612|      0|          s = b->prefix->name;
 3613|      0|          do {
 3614|      0|            if (! poolAppendChar(&parser->m_tempPool, *s))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3614:17): [True: 0, False: 0]
  ------------------
 3615|      0|              return XML_ERROR_NO_MEMORY;
 3616|      0|          } while (*s++);
  ------------------
  |  Branch (3616:20): [True: 0, False: 0]
  ------------------
 3617|      0|        }
 3618|       |
 3619|       |        /* store expanded name in attribute list */
 3620|      0|        s = poolStart(&parser->m_tempPool);
  ------------------
  |  |  595|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 3621|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3622|      0|        appAtts[i] = s;
 3623|       |
 3624|       |        /* fill empty slot with new version, uriName and hash value */
 3625|      0|        parser->m_nsAtts[j].version = version;
 3626|      0|        parser->m_nsAtts[j].hash = uriHash;
 3627|      0|        parser->m_nsAtts[j].uriName = s;
 3628|       |
 3629|      0|        if (! --nPrefixes) {
  ------------------
  |  Branch (3629:13): [True: 0, False: 0]
  ------------------
 3630|      0|          i += 2;
 3631|      0|          break;
 3632|      0|        }
 3633|      0|      } else                     /* not prefixed */
 3634|      0|        ((XML_Char *)s)[-1] = 0; /* clear flag */
 3635|      0|    }
 3636|      0|  }
 3637|       |  /* clear flags for the remaining attributes */
 3638|  2.26M|  for (; i < attIndex; i += 2)
  ------------------
  |  Branch (3638:10): [True: 17.7k, False: 2.24M]
  ------------------
 3639|  17.7k|    ((XML_Char *)(appAtts[i]))[-1] = 0;
 3640|  2.24M|  for (binding = *bindingsPtr; binding; binding = binding->nextTagBinding)
  ------------------
  |  Branch (3640:32): [True: 0, False: 2.24M]
  ------------------
 3641|      0|    binding->attId->name[-1] = 0;
 3642|       |
 3643|  2.24M|  if (! parser->m_ns)
  ------------------
  |  Branch (3643:7): [True: 2.24M, False: 0]
  ------------------
 3644|  2.24M|    return XML_ERROR_NONE;
 3645|       |
 3646|       |  /* expand the element type name */
 3647|      0|  if (elementType->prefix) {
  ------------------
  |  Branch (3647:7): [True: 0, False: 0]
  ------------------
 3648|      0|    binding = elementType->prefix->binding;
 3649|      0|    if (! binding)
  ------------------
  |  Branch (3649:9): [True: 0, False: 0]
  ------------------
 3650|      0|      return XML_ERROR_UNBOUND_PREFIX;
 3651|      0|    localPart = tagNamePtr->str;
 3652|      0|    while (*localPart++ != XML_T(ASCII_COLON))
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (3652:12): [True: 0, False: 0]
  ------------------
 3653|      0|      ;
 3654|      0|  } else if (dtd->defaultPrefix.binding) {
  ------------------
  |  Branch (3654:14): [True: 0, False: 0]
  ------------------
 3655|      0|    binding = dtd->defaultPrefix.binding;
 3656|      0|    localPart = tagNamePtr->str;
 3657|      0|  } else
 3658|      0|    return XML_ERROR_NONE;
 3659|      0|  prefixLen = 0;
 3660|      0|  if (parser->m_ns_triplets && binding->prefix->name) {
  ------------------
  |  Branch (3660:7): [True: 0, False: 0]
  |  Branch (3660:32): [True: 0, False: 0]
  ------------------
 3661|      0|    for (; binding->prefix->name[prefixLen++];)
  ------------------
  |  Branch (3661:12): [True: 0, False: 0]
  ------------------
 3662|      0|      ; /* prefixLen includes null terminator */
 3663|      0|  }
 3664|      0|  tagNamePtr->localPart = localPart;
 3665|      0|  tagNamePtr->uriLen = binding->uriLen;
 3666|      0|  tagNamePtr->prefix = binding->prefix->name;
 3667|      0|  tagNamePtr->prefixLen = prefixLen;
 3668|      0|  for (i = 0; localPart[i++];)
  ------------------
  |  Branch (3668:15): [True: 0, False: 0]
  ------------------
 3669|      0|    ; /* i includes null terminator */
 3670|       |
 3671|       |  /* Detect and prevent integer overflow */
 3672|      0|  if (binding->uriLen > INT_MAX - prefixLen
  ------------------
  |  Branch (3672:7): [True: 0, False: 0]
  ------------------
 3673|      0|      || i > INT_MAX - (binding->uriLen + prefixLen)) {
  ------------------
  |  Branch (3673:10): [True: 0, False: 0]
  ------------------
 3674|      0|    return XML_ERROR_NO_MEMORY;
 3675|      0|  }
 3676|       |
 3677|      0|  n = i + binding->uriLen + prefixLen;
 3678|      0|  if (n > binding->uriAlloc) {
  ------------------
  |  Branch (3678:7): [True: 0, False: 0]
  ------------------
 3679|      0|    TAG *p;
 3680|       |
 3681|       |    /* Detect and prevent integer overflow */
 3682|      0|    if (n > INT_MAX - EXPAND_SPARE) {
  ------------------
  |  |  248|      0|#define EXPAND_SPARE 24
  ------------------
  |  Branch (3682:9): [True: 0, False: 0]
  ------------------
 3683|      0|      return XML_ERROR_NO_MEMORY;
 3684|      0|    }
 3685|       |    /* Detect and prevent integer overflow.
 3686|       |     * The preprocessor guard addresses the "always false" warning
 3687|       |     * from -Wtype-limits on platforms where
 3688|       |     * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3689|       |#if UINT_MAX >= SIZE_MAX
 3690|       |    if ((unsigned)(n + EXPAND_SPARE) > (size_t)(-1) / sizeof(XML_Char)) {
 3691|       |      return XML_ERROR_NO_MEMORY;
 3692|       |    }
 3693|       |#endif
 3694|       |
 3695|      0|    uri = (XML_Char *)MALLOC(parser, (n + EXPAND_SPARE) * sizeof(XML_Char));
  ------------------
  |  |  713|      0|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 3696|      0|    if (! uri)
  ------------------
  |  Branch (3696:9): [True: 0, False: 0]
  ------------------
 3697|      0|      return XML_ERROR_NO_MEMORY;
 3698|      0|    binding->uriAlloc = n + EXPAND_SPARE;
  ------------------
  |  |  248|      0|#define EXPAND_SPARE 24
  ------------------
 3699|      0|    memcpy(uri, binding->uri, binding->uriLen * sizeof(XML_Char));
 3700|      0|    for (p = parser->m_tagStack; p; p = p->parent)
  ------------------
  |  Branch (3700:34): [True: 0, False: 0]
  ------------------
 3701|      0|      if (p->name.str == binding->uri)
  ------------------
  |  Branch (3701:11): [True: 0, False: 0]
  ------------------
 3702|      0|        p->name.str = uri;
 3703|      0|    FREE(parser, binding->uri);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 3704|      0|    binding->uri = uri;
 3705|      0|  }
 3706|       |  /* if m_namespaceSeparator != '\0' then uri includes it already */
 3707|      0|  uri = binding->uri + binding->uriLen;
 3708|      0|  memcpy(uri, localPart, i * sizeof(XML_Char));
 3709|       |  /* we always have a namespace separator between localPart and prefix */
 3710|      0|  if (prefixLen) {
  ------------------
  |  Branch (3710:7): [True: 0, False: 0]
  ------------------
 3711|      0|    uri += i - 1;
 3712|      0|    *uri = parser->m_namespaceSeparator; /* replace null terminator */
 3713|      0|    memcpy(uri + 1, binding->prefix->name, prefixLen * sizeof(XML_Char));
 3714|      0|  }
 3715|      0|  tagNamePtr->str = binding->uri;
 3716|      0|  return XML_ERROR_NONE;
 3717|      0|}
xmlparse.c:setElementTypePrefix:
 6446|  7.21k|setElementTypePrefix(XML_Parser parser, ELEMENT_TYPE *elementType) {
 6447|  7.21k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6448|  7.21k|  const XML_Char *name;
 6449|   238k|  for (name = elementType->name; *name; name++) {
  ------------------
  |  Branch (6449:34): [True: 235k, False: 3.07k]
  ------------------
 6450|   235k|    if (*name == XML_T(ASCII_COLON)) {
  ------------------
  |  |  190|   235k|#  define XML_T(x) x
  ------------------
  |  Branch (6450:9): [True: 4.14k, False: 231k]
  ------------------
 6451|  4.14k|      PREFIX *prefix;
 6452|  4.14k|      const XML_Char *s;
 6453|   116k|      for (s = elementType->name; s != name; s++) {
  ------------------
  |  Branch (6453:35): [True: 112k, False: 4.14k]
  ------------------
 6454|   112k|        if (! poolAppendChar(&dtd->pool, *s))
  ------------------
  |  |  602|   112k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 134, False: 112k]
  |  |  |  Branch (602:35): [True: 0, False: 134]
  |  |  ------------------
  |  |  603|   112k|       ? 0                                                                     \
  |  |  604|   112k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6454:13): [True: 0, False: 112k]
  ------------------
 6455|      0|          return 0;
 6456|   112k|      }
 6457|  4.14k|      if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  602|  4.14k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 12, False: 4.12k]
  |  |  |  Branch (602:35): [True: 0, False: 12]
  |  |  ------------------
  |  |  603|  4.14k|       ? 0                                                                     \
  |  |  604|  4.14k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6457:11): [True: 0, False: 4.14k]
  ------------------
 6458|      0|        return 0;
 6459|  4.14k|      prefix = (PREFIX *)lookup(parser, &dtd->prefixes, poolStart(&dtd->pool),
  ------------------
  |  |  595|  4.14k|#define poolStart(pool) ((pool)->start)
  ------------------
 6460|  4.14k|                                sizeof(PREFIX));
 6461|  4.14k|      if (! prefix)
  ------------------
  |  Branch (6461:11): [True: 0, False: 4.14k]
  ------------------
 6462|      0|        return 0;
 6463|  4.14k|      if (prefix->name == poolStart(&dtd->pool))
  ------------------
  |  |  595|  4.14k|#define poolStart(pool) ((pool)->start)
  ------------------
  |  Branch (6463:11): [True: 3.18k, False: 958]
  ------------------
 6464|  3.18k|        poolFinish(&dtd->pool);
  ------------------
  |  |  600|  3.18k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6465|    958|      else
 6466|    958|        poolDiscard(&dtd->pool);
  ------------------
  |  |  599|    958|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6467|  4.14k|      elementType->prefix = prefix;
 6468|  4.14k|      break;
 6469|  4.14k|    }
 6470|   235k|  }
 6471|  7.21k|  return 1;
 6472|  7.21k|}
xmlparse.c:freeBindings:
 3223|  8.64k|freeBindings(XML_Parser parser, BINDING *bindings) {
 3224|  8.64k|  while (bindings) {
  ------------------
  |  Branch (3224:10): [True: 0, False: 8.64k]
  ------------------
 3225|      0|    BINDING *b = bindings;
 3226|       |
 3227|       |    /* m_startNamespaceDeclHandler will have been called for this
 3228|       |     * binding in addBindings(), so call the end handler now.
 3229|       |     */
 3230|      0|    if (parser->m_endNamespaceDeclHandler)
  ------------------
  |  Branch (3230:9): [True: 0, False: 0]
  ------------------
 3231|      0|      parser->m_endNamespaceDeclHandler(parser->m_handlerArg, b->prefix->name);
 3232|       |
 3233|      0|    bindings = bindings->nextTagBinding;
 3234|      0|    b->nextTagBinding = parser->m_freeBindingList;
 3235|      0|    parser->m_freeBindingList = b;
 3236|      0|    b->prefix->binding = b->prevPrefixBinding;
 3237|      0|  }
 3238|  8.64k|}
xmlparse.c:epilogProcessor:
 5646|    152|                const char **nextPtr) {
 5647|    152|  parser->m_processor = epilogProcessor;
 5648|    152|  parser->m_eventPtr = s;
 5649|  1.03k|  for (;;) {
 5650|  1.03k|    const char *next = NULL;
 5651|  1.03k|    int tok = XmlPrologTok(parser->m_encoding, s, end, &next);
  ------------------
  |  |  227|  1.03k|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  1.03k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5652|  1.03k|#ifdef XML_DTD
 5653|  1.03k|    if (! accountingDiffTolerated(parser, tok, s, next, __LINE__,
  ------------------
  |  Branch (5653:9): [True: 0, False: 1.03k]
  ------------------
 5654|  1.03k|                                  XML_ACCOUNT_DIRECT)) {
 5655|      0|      accountingOnAbort(parser);
 5656|      0|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 5657|      0|    }
 5658|  1.03k|#endif
 5659|  1.03k|    parser->m_eventEndPtr = next;
 5660|  1.03k|    switch (tok) {
 5661|       |    /* report partial linebreak - it might be the last token */
 5662|      2|    case -XML_TOK_PROLOG_S:
  ------------------
  |  |   82|      2|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (5662:5): [True: 2, False: 1.03k]
  ------------------
 5663|      2|      if (parser->m_defaultHandler) {
  ------------------
  |  Branch (5663:11): [True: 0, False: 2]
  ------------------
 5664|      0|        reportDefault(parser, parser->m_encoding, s, next);
 5665|      0|        if (parser->m_parsingStatus.parsing == XML_FINISHED)
  ------------------
  |  Branch (5665:13): [True: 0, False: 0]
  ------------------
 5666|      0|          return XML_ERROR_ABORTED;
 5667|      0|      }
 5668|      2|      *nextPtr = next;
 5669|      2|      return XML_ERROR_NONE;
 5670|     70|    case XML_TOK_NONE:
  ------------------
  |  |   51|     70|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (5670:5): [True: 70, False: 968]
  ------------------
 5671|     70|      *nextPtr = s;
 5672|     70|      return XML_ERROR_NONE;
 5673|    345|    case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    345|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (5673:5): [True: 345, False: 693]
  ------------------
 5674|    345|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (5674:11): [True: 0, False: 345]
  ------------------
 5675|      0|        reportDefault(parser, parser->m_encoding, s, next);
 5676|    345|      break;
 5677|    475|    case XML_TOK_PI:
  ------------------
  |  |   76|    475|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (5677:5): [True: 475, False: 563]
  ------------------
 5678|    475|      if (! reportProcessingInstruction(parser, parser->m_encoding, s, next))
  ------------------
  |  Branch (5678:11): [True: 0, False: 475]
  ------------------
 5679|      0|        return XML_ERROR_NO_MEMORY;
 5680|    475|      break;
 5681|    475|    case XML_TOK_COMMENT:
  ------------------
  |  |   78|     66|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (5681:5): [True: 66, False: 972]
  ------------------
 5682|     66|      if (! reportComment(parser, parser->m_encoding, s, next))
  ------------------
  |  Branch (5682:11): [True: 0, False: 66]
  ------------------
 5683|      0|        return XML_ERROR_NO_MEMORY;
 5684|     66|      break;
 5685|     66|    case XML_TOK_INVALID:
  ------------------
  |  |   57|     25|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (5685:5): [True: 25, False: 1.01k]
  ------------------
 5686|     25|      parser->m_eventPtr = next;
 5687|     25|      return XML_ERROR_INVALID_TOKEN;
 5688|      2|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (5688:5): [True: 2, False: 1.03k]
  ------------------
 5689|      2|      if (! parser->m_parsingStatus.finalBuffer) {
  ------------------
  |  Branch (5689:11): [True: 2, False: 0]
  ------------------
 5690|      2|        *nextPtr = s;
 5691|      2|        return XML_ERROR_NONE;
 5692|      2|      }
 5693|      0|      return XML_ERROR_UNCLOSED_TOKEN;
 5694|      1|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (5694:5): [True: 1, False: 1.03k]
  ------------------
 5695|      1|      if (! parser->m_parsingStatus.finalBuffer) {
  ------------------
  |  Branch (5695:11): [True: 1, False: 0]
  ------------------
 5696|      1|        *nextPtr = s;
 5697|      1|        return XML_ERROR_NONE;
 5698|      1|      }
 5699|      0|      return XML_ERROR_PARTIAL_CHAR;
 5700|     52|    default:
  ------------------
  |  Branch (5700:5): [True: 52, False: 986]
  ------------------
 5701|     52|      return XML_ERROR_JUNK_AFTER_DOC_ELEMENT;
 5702|  1.03k|    }
 5703|    886|    parser->m_eventPtr = s = next;
 5704|    886|    switch (parser->m_parsingStatus.parsing) {
 5705|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (5705:5): [True: 0, False: 886]
  ------------------
 5706|      0|      *nextPtr = next;
 5707|      0|      return XML_ERROR_NONE;
 5708|      0|    case XML_FINISHED:
  ------------------
  |  Branch (5708:5): [True: 0, False: 886]
  ------------------
 5709|      0|      return XML_ERROR_ABORTED;
 5710|    886|    default:;
  ------------------
  |  Branch (5710:5): [True: 886, False: 0]
  ------------------
 5711|    886|    }
 5712|    886|  }
 5713|    152|}
xmlparse.c:doCdataSection:
 4026|  2.59k|               enum XML_Account account) {
 4027|  2.59k|  const char *s = *startPtr;
 4028|  2.59k|  const char **eventPP;
 4029|  2.59k|  const char **eventEndPP;
 4030|  2.59k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (4030:7): [True: 1.52k, False: 1.07k]
  ------------------
 4031|  1.52k|    eventPP = &parser->m_eventPtr;
 4032|  1.52k|    *eventPP = s;
 4033|  1.52k|    eventEndPP = &parser->m_eventEndPtr;
 4034|  1.52k|  } else {
 4035|  1.07k|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 4036|  1.07k|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 4037|  1.07k|  }
 4038|  2.59k|  *eventPP = s;
 4039|  2.59k|  *startPtr = NULL;
 4040|       |
 4041|   139k|  for (;;) {
 4042|   139k|    const char *next = s; /* in case of XML_TOK_NONE or XML_TOK_PARTIAL */
 4043|   139k|    int tok = XmlCdataSectionTok(enc, s, end, &next);
  ------------------
  |  |  233|   139k|  XmlTok(enc, XML_CDATA_SECTION_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|   139k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 4044|   139k|#ifdef XML_DTD
 4045|   139k|    if (! accountingDiffTolerated(parser, tok, s, next, __LINE__, account)) {
  ------------------
  |  Branch (4045:9): [True: 1, False: 139k]
  ------------------
 4046|      1|      accountingOnAbort(parser);
 4047|      1|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4048|      1|    }
 4049|       |#else
 4050|       |    UNUSED_P(account);
 4051|       |#endif
 4052|   139k|    *eventEndPP = next;
 4053|   139k|    switch (tok) {
 4054|  1.73k|    case XML_TOK_CDATA_SECT_CLOSE:
  ------------------
  |  |  113|  1.73k|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  |  Branch (4054:5): [True: 1.73k, False: 137k]
  ------------------
 4055|  1.73k|      if (parser->m_endCdataSectionHandler)
  ------------------
  |  Branch (4055:11): [True: 0, False: 1.73k]
  ------------------
 4056|      0|        parser->m_endCdataSectionHandler(parser->m_handlerArg);
 4057|       |      /* BEGIN disabled code */
 4058|       |      /* see comment under XML_TOK_CDATA_SECT_OPEN */
 4059|  1.73k|      else if ((0) && parser->m_characterDataHandler)
  ------------------
  |  Branch (4059:16): [Folded - Ignored]
  |  Branch (4059:23): [True: 0, False: 0]
  ------------------
 4060|      0|        parser->m_characterDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 4061|      0|                                       0);
 4062|       |      /* END disabled code */
 4063|  1.73k|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4063:16): [True: 0, False: 1.73k]
  ------------------
 4064|      0|        reportDefault(parser, enc, s, next);
 4065|  1.73k|      *startPtr = next;
 4066|  1.73k|      *nextPtr = next;
 4067|  1.73k|      if (parser->m_parsingStatus.parsing == XML_FINISHED)
  ------------------
  |  Branch (4067:11): [True: 0, False: 1.73k]
  ------------------
 4068|      0|        return XML_ERROR_ABORTED;
 4069|  1.73k|      else
 4070|  1.73k|        return XML_ERROR_NONE;
 4071|  63.7k|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|  63.7k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (4071:5): [True: 63.7k, False: 75.3k]
  ------------------
 4072|  63.7k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (4072:11): [True: 0, False: 63.7k]
  ------------------
 4073|      0|        XML_Char c = 0xA;
 4074|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 4075|  63.7k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4075:18): [True: 0, False: 63.7k]
  ------------------
 4076|      0|        reportDefault(parser, enc, s, next);
 4077|  63.7k|      break;
 4078|  72.7k|    case XML_TOK_DATA_CHARS: {
  ------------------
  |  |   67|  72.7k|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (4078:5): [True: 72.7k, False: 66.3k]
  ------------------
 4079|  72.7k|      XML_CharacterDataHandler charDataHandler = parser->m_characterDataHandler;
 4080|  72.7k|      if (charDataHandler) {
  ------------------
  |  Branch (4080:11): [True: 0, False: 72.7k]
  ------------------
 4081|      0|        if (MUST_CONVERT(enc, s)) {
  ------------------
  |  |  164|      0|#  define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
  |  |  ------------------
  |  |  |  Branch (164:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4082|      0|          for (;;) {
 4083|      0|            ICHAR *dataPtr = (ICHAR *)parser->m_dataBuf;
 4084|      0|            const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  160|      0|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|      0|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 4085|      0|                enc, &s, next, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
 4086|      0|            *eventEndPP = next;
 4087|      0|            charDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 4088|      0|                            (int)(dataPtr - (ICHAR *)parser->m_dataBuf));
 4089|      0|            if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (4089:17): [True: 0, False: 0]
  ------------------
 4090|      0|                || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (4090:20): [True: 0, False: 0]
  ------------------
 4091|      0|              break;
 4092|      0|            *eventPP = s;
 4093|      0|          }
 4094|      0|        } else
 4095|      0|          charDataHandler(parser->m_handlerArg, (const XML_Char *)s,
 4096|      0|                          (int)((const XML_Char *)next - (const XML_Char *)s));
 4097|  72.7k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4097:18): [True: 0, False: 72.7k]
  ------------------
 4098|      0|        reportDefault(parser, enc, s, next);
 4099|  72.7k|    } break;
 4100|    162|    case XML_TOK_INVALID:
  ------------------
  |  |   57|    162|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4100:5): [True: 162, False: 138k]
  ------------------
 4101|    162|      *eventPP = next;
 4102|    162|      return XML_ERROR_INVALID_TOKEN;
 4103|    137|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|    137|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (4103:5): [True: 137, False: 138k]
  ------------------
 4104|    137|      if (haveMore) {
  ------------------
  |  Branch (4104:11): [True: 137, False: 0]
  ------------------
 4105|    137|        *nextPtr = s;
 4106|    137|        return XML_ERROR_NONE;
 4107|    137|      }
 4108|      0|      return XML_ERROR_PARTIAL_CHAR;
 4109|     92|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|     92|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (4109:5): [True: 92, False: 138k]
  ------------------
 4110|    562|    case XML_TOK_NONE:
  ------------------
  |  |   51|    562|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (4110:5): [True: 470, False: 138k]
  ------------------
 4111|    562|      if (haveMore) {
  ------------------
  |  Branch (4111:11): [True: 498, False: 64]
  ------------------
 4112|    498|        *nextPtr = s;
 4113|    498|        return XML_ERROR_NONE;
 4114|    498|      }
 4115|     64|      return XML_ERROR_UNCLOSED_CDATA_SECTION;
 4116|      0|    default:
  ------------------
  |  Branch (4116:5): [True: 0, False: 139k]
  ------------------
 4117|       |      /* Every token returned by XmlCdataSectionTok() has its own
 4118|       |       * explicit case, so this default case will never be executed.
 4119|       |       * We retain it as a safety net and exclude it from the coverage
 4120|       |       * statistics.
 4121|       |       *
 4122|       |       * LCOV_EXCL_START
 4123|       |       */
 4124|      0|      *eventPP = next;
 4125|      0|      return XML_ERROR_UNEXPECTED_STATE;
 4126|       |      /* LCOV_EXCL_STOP */
 4127|   139k|    }
 4128|       |
 4129|   136k|    *eventPP = s = next;
 4130|   136k|    switch (parser->m_parsingStatus.parsing) {
 4131|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (4131:5): [True: 0, False: 136k]
  ------------------
 4132|      0|      *nextPtr = next;
 4133|      0|      return XML_ERROR_NONE;
 4134|      0|    case XML_FINISHED:
  ------------------
  |  Branch (4134:5): [True: 0, False: 136k]
  ------------------
 4135|      0|      return XML_ERROR_ABORTED;
 4136|   136k|    default:;
  ------------------
  |  Branch (4136:5): [True: 136k, False: 0]
  ------------------
 4137|   136k|    }
 4138|   136k|  }
 4139|       |  /* not reached */
 4140|  2.59k|}
xmlparse.c:storeRawNames:
 2571|  7.13k|storeRawNames(XML_Parser parser) {
 2572|  7.13k|  TAG *tag = parser->m_tagStack;
 2573|  39.0k|  while (tag) {
  ------------------
  |  Branch (2573:10): [True: 31.9k, False: 7.13k]
  ------------------
 2574|  31.9k|    int bufSize;
 2575|  31.9k|    int nameLen = sizeof(XML_Char) * (tag->name.strLen + 1);
 2576|  31.9k|    size_t rawNameLen;
 2577|  31.9k|    char *rawNameBuf = tag->buf + nameLen;
 2578|       |    /* Stop if already stored.  Since m_tagStack is a stack, we can stop
 2579|       |       at the first entry that has already been copied; everything
 2580|       |       below it in the stack is already been accounted for in a
 2581|       |       previous call to this function.
 2582|       |    */
 2583|  31.9k|    if (tag->rawName == rawNameBuf)
  ------------------
  |  Branch (2583:9): [True: 0, False: 31.9k]
  ------------------
 2584|      0|      break;
 2585|       |    /* For re-use purposes we need to ensure that the
 2586|       |       size of tag->buf is a multiple of sizeof(XML_Char).
 2587|       |    */
 2588|  31.9k|    rawNameLen = ROUND_UP(tag->rawNameLength, sizeof(XML_Char));
  ------------------
  |  |  196|  31.9k|#define ROUND_UP(n, sz) (((n) + ((sz)-1)) & ~((sz)-1))
  ------------------
 2589|       |    /* Detect and prevent integer overflow. */
 2590|  31.9k|    if (rawNameLen > (size_t)INT_MAX - nameLen)
  ------------------
  |  Branch (2590:9): [True: 0, False: 31.9k]
  ------------------
 2591|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2592|  31.9k|    bufSize = nameLen + (int)rawNameLen;
 2593|  31.9k|    if (bufSize > tag->bufEnd - tag->buf) {
  ------------------
  |  Branch (2593:9): [True: 459, False: 31.5k]
  ------------------
 2594|    459|      char *temp = (char *)REALLOC(parser, tag->buf, bufSize);
  ------------------
  |  |  714|    459|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 2595|    459|      if (temp == NULL)
  ------------------
  |  Branch (2595:11): [True: 0, False: 459]
  ------------------
 2596|      0|        return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2597|       |      /* if tag->name.str points to tag->buf (only when namespace
 2598|       |         processing is off) then we have to update it
 2599|       |      */
 2600|    459|      if (tag->name.str == (XML_Char *)tag->buf)
  ------------------
  |  Branch (2600:11): [True: 459, False: 0]
  ------------------
 2601|    459|        tag->name.str = (XML_Char *)temp;
 2602|       |      /* if tag->name.localPart is set (when namespace processing is on)
 2603|       |         then update it as well, since it will always point into tag->buf
 2604|       |      */
 2605|    459|      if (tag->name.localPart)
  ------------------
  |  Branch (2605:11): [True: 0, False: 459]
  ------------------
 2606|      0|        tag->name.localPart
 2607|      0|            = (XML_Char *)temp + (tag->name.localPart - (XML_Char *)tag->buf);
 2608|    459|      tag->buf = temp;
 2609|    459|      tag->bufEnd = temp + bufSize;
 2610|    459|      rawNameBuf = temp + nameLen;
 2611|    459|    }
 2612|  31.9k|    memcpy(rawNameBuf, tag->rawName, tag->rawNameLength);
 2613|  31.9k|    tag->rawName = rawNameBuf;
 2614|  31.9k|    tag = tag->parent;
 2615|  31.9k|  }
 2616|  7.13k|  return XML_TRUE;
  ------------------
  |  |   55|  7.13k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2617|  7.13k|}
xmlparse.c:getElementType:
 7614|  10.0k|               const char *end) {
 7615|  10.0k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 7616|  10.0k|  const XML_Char *name = poolStoreString(&dtd->pool, enc, ptr, end);
 7617|  10.0k|  ELEMENT_TYPE *ret;
 7618|       |
 7619|  10.0k|  if (! name)
  ------------------
  |  Branch (7619:7): [True: 0, False: 10.0k]
  ------------------
 7620|      0|    return NULL;
 7621|  10.0k|  ret = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, name,
 7622|  10.0k|                               sizeof(ELEMENT_TYPE));
 7623|  10.0k|  if (! ret)
  ------------------
  |  Branch (7623:7): [True: 0, False: 10.0k]
  ------------------
 7624|      0|    return NULL;
 7625|  10.0k|  if (ret->name != name)
  ------------------
  |  Branch (7625:7): [True: 2.85k, False: 7.21k]
  ------------------
 7626|  2.85k|    poolDiscard(&dtd->pool);
  ------------------
  |  |  599|  2.85k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 7627|  7.21k|  else {
 7628|  7.21k|    poolFinish(&dtd->pool);
  ------------------
  |  |  600|  7.21k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 7629|  7.21k|    if (! setElementTypePrefix(parser, ret))
  ------------------
  |  Branch (7629:9): [True: 0, False: 7.21k]
  ------------------
 7630|      0|      return NULL;
 7631|  7.21k|  }
 7632|  10.0k|  return ret;
 7633|  10.0k|}
xmlparse.c:getAttributeId:
 6476|  55.3k|               const char *end) {
 6477|  55.3k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6478|  55.3k|  ATTRIBUTE_ID *id;
 6479|  55.3k|  const XML_Char *name;
 6480|  55.3k|  if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  602|  55.3k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 238, False: 55.0k]
  |  |  |  Branch (602:35): [True: 0, False: 238]
  |  |  ------------------
  |  |  603|  55.3k|       ? 0                                                                     \
  |  |  604|  55.3k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6480:7): [True: 0, False: 55.3k]
  ------------------
 6481|      0|    return NULL;
 6482|  55.3k|  name = poolStoreString(&dtd->pool, enc, start, end);
 6483|  55.3k|  if (! name)
  ------------------
  |  Branch (6483:7): [True: 0, False: 55.3k]
  ------------------
 6484|      0|    return NULL;
 6485|       |  /* skip quotation mark - its storage will be re-used (like in name[-1]) */
 6486|  55.3k|  ++name;
 6487|  55.3k|  id = (ATTRIBUTE_ID *)lookup(parser, &dtd->attributeIds, name,
 6488|  55.3k|                              sizeof(ATTRIBUTE_ID));
 6489|  55.3k|  if (! id)
  ------------------
  |  Branch (6489:7): [True: 0, False: 55.3k]
  ------------------
 6490|      0|    return NULL;
 6491|  55.3k|  if (id->name != name)
  ------------------
  |  Branch (6491:7): [True: 48.3k, False: 6.96k]
  ------------------
 6492|  48.3k|    poolDiscard(&dtd->pool);
  ------------------
  |  |  599|  48.3k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6493|  6.96k|  else {
 6494|  6.96k|    poolFinish(&dtd->pool);
  ------------------
  |  |  600|  6.96k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6495|  6.96k|    if (! parser->m_ns)
  ------------------
  |  Branch (6495:9): [True: 6.96k, False: 0]
  ------------------
 6496|  6.96k|      ;
 6497|      0|    else if (name[0] == XML_T(ASCII_x) && name[1] == XML_T(ASCII_m)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
                  else if (name[0] == XML_T(ASCII_x) && name[1] == XML_T(ASCII_m)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6497:14): [True: 0, False: 0]
  |  Branch (6497:43): [True: 0, False: 0]
  ------------------
 6498|      0|             && name[2] == XML_T(ASCII_l) && name[3] == XML_T(ASCII_n)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
                           && name[2] == XML_T(ASCII_l) && name[3] == XML_T(ASCII_n)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6498:17): [True: 0, False: 0]
  |  Branch (6498:46): [True: 0, False: 0]
  ------------------
 6499|      0|             && name[4] == XML_T(ASCII_s)
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6499:17): [True: 0, False: 0]
  ------------------
 6500|      0|             && (name[5] == XML_T('\0') || name[5] == XML_T(ASCII_COLON))) {
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
                           && (name[5] == XML_T('\0') || name[5] == XML_T(ASCII_COLON))) {
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6500:18): [True: 0, False: 0]
  |  Branch (6500:44): [True: 0, False: 0]
  ------------------
 6501|      0|      if (name[5] == XML_T('\0'))
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6501:11): [True: 0, False: 0]
  ------------------
 6502|      0|        id->prefix = &dtd->defaultPrefix;
 6503|      0|      else
 6504|      0|        id->prefix = (PREFIX *)lookup(parser, &dtd->prefixes, name + 6,
 6505|      0|                                      sizeof(PREFIX));
 6506|      0|      id->xmlns = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6507|      0|    } else {
 6508|      0|      int i;
 6509|      0|      for (i = 0; name[i]; i++) {
  ------------------
  |  Branch (6509:19): [True: 0, False: 0]
  ------------------
 6510|       |        /* attributes without prefix are *not* in the default namespace */
 6511|      0|        if (name[i] == XML_T(ASCII_COLON)) {
  ------------------
  |  |  190|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6511:13): [True: 0, False: 0]
  ------------------
 6512|      0|          int j;
 6513|      0|          for (j = 0; j < i; j++) {
  ------------------
  |  Branch (6513:23): [True: 0, False: 0]
  ------------------
 6514|      0|            if (! poolAppendChar(&dtd->pool, name[j]))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6514:17): [True: 0, False: 0]
  ------------------
 6515|      0|              return NULL;
 6516|      0|          }
 6517|      0|          if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  602|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 0, False: 0]
  |  |  |  Branch (602:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  603|      0|       ? 0                                                                     \
  |  |  604|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6517:15): [True: 0, False: 0]
  ------------------
 6518|      0|            return NULL;
 6519|      0|          id->prefix = (PREFIX *)lookup(parser, &dtd->prefixes,
 6520|      0|                                        poolStart(&dtd->pool), sizeof(PREFIX));
  ------------------
  |  |  595|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 6521|      0|          if (! id->prefix)
  ------------------
  |  Branch (6521:15): [True: 0, False: 0]
  ------------------
 6522|      0|            return NULL;
 6523|      0|          if (id->prefix->name == poolStart(&dtd->pool))
  ------------------
  |  |  595|      0|#define poolStart(pool) ((pool)->start)
  ------------------
  |  Branch (6523:15): [True: 0, False: 0]
  ------------------
 6524|      0|            poolFinish(&dtd->pool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6525|      0|          else
 6526|      0|            poolDiscard(&dtd->pool);
  ------------------
  |  |  599|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6527|      0|          break;
 6528|      0|        }
 6529|      0|      }
 6530|      0|    }
 6531|  6.96k|  }
 6532|  55.3k|  return id;
 6533|  55.3k|}
xmlparse.c:poolAppend:
 7220|  18.3M|           const char *end) {
 7221|  18.3M|  if (! pool->ptr && ! poolGrow(pool))
  ------------------
  |  Branch (7221:7): [True: 18.6k, False: 18.3M]
  |  Branch (7221:22): [True: 0, False: 18.6k]
  ------------------
 7222|      0|    return NULL;
 7223|  18.3M|  for (;;) {
 7224|  18.3M|    const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  160|  18.3M|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|  18.3M|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 7225|  18.3M|        enc, &ptr, end, (ICHAR **)&(pool->ptr), (const ICHAR *)pool->end);
 7226|  18.3M|    if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (7226:9): [True: 18.3M, False: 11.0k]
  ------------------
 7227|  18.3M|        || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (7227:12): [True: 0, False: 11.0k]
  ------------------
 7228|  18.3M|      break;
 7229|  11.0k|    if (! poolGrow(pool))
  ------------------
  |  Branch (7229:9): [True: 0, False: 11.0k]
  ------------------
 7230|      0|      return NULL;
 7231|  11.0k|  }
 7232|  18.3M|  return pool->start;
 7233|  18.3M|}
xmlparse.c:defineAttribute:
 6386|  35.5k|                XML_Bool isId, const XML_Char *value, XML_Parser parser) {
 6387|  35.5k|  DEFAULT_ATTRIBUTE *att;
 6388|  35.5k|  if (value || isId) {
  ------------------
  |  Branch (6388:7): [True: 10.2k, False: 25.3k]
  |  Branch (6388:16): [True: 598, False: 24.7k]
  ------------------
 6389|       |    /* The handling of default attributes gets messed up if we have
 6390|       |       a default which duplicates a non-default. */
 6391|  10.8k|    int i;
 6392|  53.5k|    for (i = 0; i < type->nDefaultAtts; i++)
  ------------------
  |  Branch (6392:17): [True: 50.9k, False: 2.55k]
  ------------------
 6393|  50.9k|      if (attId == type->defaultAtts[i].id)
  ------------------
  |  Branch (6393:11): [True: 8.29k, False: 42.6k]
  ------------------
 6394|  8.29k|        return 1;
 6395|  2.55k|    if (isId && ! type->idAtt && ! attId->xmlns)
  ------------------
  |  Branch (6395:9): [True: 305, False: 2.24k]
  |  Branch (6395:17): [True: 127, False: 178]
  |  Branch (6395:34): [True: 127, False: 0]
  ------------------
 6396|    127|      type->idAtt = attId;
 6397|  2.55k|  }
 6398|  27.2k|  if (type->nDefaultAtts == type->allocDefaultAtts) {
  ------------------
  |  Branch (6398:7): [True: 1.28k, False: 25.9k]
  ------------------
 6399|  1.28k|    if (type->allocDefaultAtts == 0) {
  ------------------
  |  Branch (6399:9): [True: 1.03k, False: 258]
  ------------------
 6400|  1.03k|      type->allocDefaultAtts = 8;
 6401|  1.03k|      type->defaultAtts = (DEFAULT_ATTRIBUTE *)MALLOC(
  ------------------
  |  |  713|  1.03k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 6402|  1.03k|          parser, type->allocDefaultAtts * sizeof(DEFAULT_ATTRIBUTE));
 6403|  1.03k|      if (! type->defaultAtts) {
  ------------------
  |  Branch (6403:11): [True: 0, False: 1.03k]
  ------------------
 6404|      0|        type->allocDefaultAtts = 0;
 6405|      0|        return 0;
 6406|      0|      }
 6407|  1.03k|    } else {
 6408|    258|      DEFAULT_ATTRIBUTE *temp;
 6409|       |
 6410|       |      /* Detect and prevent integer overflow */
 6411|    258|      if (type->allocDefaultAtts > INT_MAX / 2) {
  ------------------
  |  Branch (6411:11): [True: 0, False: 258]
  ------------------
 6412|      0|        return 0;
 6413|      0|      }
 6414|       |
 6415|    258|      int count = type->allocDefaultAtts * 2;
 6416|       |
 6417|       |      /* Detect and prevent integer overflow.
 6418|       |       * The preprocessor guard addresses the "always false" warning
 6419|       |       * from -Wtype-limits on platforms where
 6420|       |       * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 6421|       |#if UINT_MAX >= SIZE_MAX
 6422|       |      if ((unsigned)count > (size_t)(-1) / sizeof(DEFAULT_ATTRIBUTE)) {
 6423|       |        return 0;
 6424|       |      }
 6425|       |#endif
 6426|       |
 6427|    258|      temp = (DEFAULT_ATTRIBUTE *)REALLOC(parser, type->defaultAtts,
  ------------------
  |  |  714|    258|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 6428|    258|                                          (count * sizeof(DEFAULT_ATTRIBUTE)));
 6429|    258|      if (temp == NULL)
  ------------------
  |  Branch (6429:11): [True: 0, False: 258]
  ------------------
 6430|      0|        return 0;
 6431|    258|      type->allocDefaultAtts = count;
 6432|    258|      type->defaultAtts = temp;
 6433|    258|    }
 6434|  1.28k|  }
 6435|  27.2k|  att = type->defaultAtts + type->nDefaultAtts;
 6436|  27.2k|  att->id = attId;
 6437|  27.2k|  att->value = value;
 6438|  27.2k|  att->isCdata = isCdata;
 6439|  27.2k|  if (! isCdata)
  ------------------
  |  Branch (6439:7): [True: 26.8k, False: 394]
  ------------------
 6440|  26.8k|    attId->maybeTokenized = XML_TRUE;
  ------------------
  |  |   55|  26.8k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6441|  27.2k|  type->nDefaultAtts += 1;
 6442|  27.2k|  return 1;
 6443|  27.2k|}
xmlparse.c:poolGrow:
 7321|  44.5k|poolGrow(STRING_POOL *pool) {
 7322|  44.5k|  if (pool->freeBlocks) {
  ------------------
  |  Branch (7322:7): [True: 16.0k, False: 28.4k]
  ------------------
 7323|  16.0k|    if (pool->start == 0) {
  ------------------
  |  Branch (7323:9): [True: 14.1k, False: 1.87k]
  ------------------
 7324|  14.1k|      pool->blocks = pool->freeBlocks;
 7325|  14.1k|      pool->freeBlocks = pool->freeBlocks->next;
 7326|  14.1k|      pool->blocks->next = NULL;
 7327|  14.1k|      pool->start = pool->blocks->s;
 7328|  14.1k|      pool->end = pool->start + pool->blocks->size;
 7329|  14.1k|      pool->ptr = pool->start;
 7330|  14.1k|      return XML_TRUE;
  ------------------
  |  |   55|  14.1k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7331|  14.1k|    }
 7332|  1.87k|    if (pool->end - pool->start < pool->freeBlocks->size) {
  ------------------
  |  Branch (7332:9): [True: 1.63k, False: 242]
  ------------------
 7333|  1.63k|      BLOCK *tem = pool->freeBlocks->next;
 7334|  1.63k|      pool->freeBlocks->next = pool->blocks;
 7335|  1.63k|      pool->blocks = pool->freeBlocks;
 7336|  1.63k|      pool->freeBlocks = tem;
 7337|  1.63k|      memcpy(pool->blocks->s, pool->start,
 7338|  1.63k|             (pool->end - pool->start) * sizeof(XML_Char));
 7339|  1.63k|      pool->ptr = pool->blocks->s + (pool->ptr - pool->start);
 7340|  1.63k|      pool->start = pool->blocks->s;
 7341|  1.63k|      pool->end = pool->start + pool->blocks->size;
 7342|  1.63k|      return XML_TRUE;
  ------------------
  |  |   55|  1.63k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7343|  1.63k|    }
 7344|  1.87k|  }
 7345|  28.7k|  if (pool->blocks && pool->start == pool->blocks->s) {
  ------------------
  |  Branch (7345:7): [True: 11.0k, False: 17.6k]
  |  Branch (7345:23): [True: 8.39k, False: 2.68k]
  ------------------
 7346|  8.39k|    BLOCK *temp;
 7347|  8.39k|    int blockSize = (int)((unsigned)(pool->end - pool->start) * 2U);
 7348|  8.39k|    size_t bytesToAllocate;
 7349|       |
 7350|       |    /* NOTE: Needs to be calculated prior to calling `realloc`
 7351|       |             to avoid dangling pointers: */
 7352|  8.39k|    const ptrdiff_t offsetInsideBlock = pool->ptr - pool->start;
 7353|       |
 7354|  8.39k|    if (blockSize < 0) {
  ------------------
  |  Branch (7354:9): [True: 0, False: 8.39k]
  ------------------
 7355|       |      /* This condition traps a situation where either more than
 7356|       |       * INT_MAX/2 bytes have already been allocated.  This isn't
 7357|       |       * readily testable, since it is unlikely that an average
 7358|       |       * machine will have that much memory, so we exclude it from the
 7359|       |       * coverage statistics.
 7360|       |       */
 7361|      0|      return XML_FALSE; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7362|      0|    }
 7363|       |
 7364|  8.39k|    bytesToAllocate = poolBytesToAllocateFor(blockSize);
 7365|  8.39k|    if (bytesToAllocate == 0)
  ------------------
  |  Branch (7365:9): [True: 0, False: 8.39k]
  ------------------
 7366|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7367|       |
 7368|  8.39k|    temp = (BLOCK *)pool->mem->realloc_fcn(pool->blocks,
 7369|  8.39k|                                           (unsigned)bytesToAllocate);
 7370|  8.39k|    if (temp == NULL)
  ------------------
  |  Branch (7370:9): [True: 0, False: 8.39k]
  ------------------
 7371|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7372|  8.39k|    pool->blocks = temp;
 7373|  8.39k|    pool->blocks->size = blockSize;
 7374|  8.39k|    pool->ptr = pool->blocks->s + offsetInsideBlock;
 7375|  8.39k|    pool->start = pool->blocks->s;
 7376|  8.39k|    pool->end = pool->start + blockSize;
 7377|  20.3k|  } else {
 7378|  20.3k|    BLOCK *tem;
 7379|  20.3k|    int blockSize = (int)(pool->end - pool->start);
 7380|  20.3k|    size_t bytesToAllocate;
 7381|       |
 7382|  20.3k|    if (blockSize < 0) {
  ------------------
  |  Branch (7382:9): [True: 0, False: 20.3k]
  ------------------
 7383|       |      /* This condition traps a situation where either more than
 7384|       |       * INT_MAX bytes have already been allocated (which is prevented
 7385|       |       * by various pieces of program logic, not least this one, never
 7386|       |       * mind the unlikelihood of actually having that much memory) or
 7387|       |       * the pool control fields have been corrupted (which could
 7388|       |       * conceivably happen in an extremely buggy user handler
 7389|       |       * function).  Either way it isn't readily testable, so we
 7390|       |       * exclude it from the coverage statistics.
 7391|       |       */
 7392|      0|      return XML_FALSE; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7393|      0|    }
 7394|       |
 7395|  20.3k|    if (blockSize < INIT_BLOCK_SIZE)
  ------------------
  |  |  245|  20.3k|#define INIT_BLOCK_SIZE 1024
  ------------------
  |  Branch (7395:9): [True: 19.8k, False: 443]
  ------------------
 7396|  19.8k|      blockSize = INIT_BLOCK_SIZE;
  ------------------
  |  |  245|  19.8k|#define INIT_BLOCK_SIZE 1024
  ------------------
 7397|    443|    else {
 7398|       |      /* Detect overflow, avoiding _signed_ overflow undefined behavior */
 7399|    443|      if ((int)((unsigned)blockSize * 2U) < 0) {
  ------------------
  |  Branch (7399:11): [True: 0, False: 443]
  ------------------
 7400|      0|        return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7401|      0|      }
 7402|    443|      blockSize *= 2;
 7403|    443|    }
 7404|       |
 7405|  20.3k|    bytesToAllocate = poolBytesToAllocateFor(blockSize);
 7406|  20.3k|    if (bytesToAllocate == 0)
  ------------------
  |  Branch (7406:9): [True: 0, False: 20.3k]
  ------------------
 7407|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7408|       |
 7409|  20.3k|    tem = pool->mem->malloc_fcn(bytesToAllocate);
 7410|  20.3k|    if (! tem)
  ------------------
  |  Branch (7410:9): [True: 0, False: 20.3k]
  ------------------
 7411|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7412|  20.3k|    tem->size = blockSize;
 7413|  20.3k|    tem->next = pool->blocks;
 7414|  20.3k|    pool->blocks = tem;
 7415|  20.3k|    if (pool->ptr != pool->start)
  ------------------
  |  Branch (7415:9): [True: 2.42k, False: 17.8k]
  ------------------
 7416|  2.42k|      memcpy(tem->s, pool->start, (pool->ptr - pool->start) * sizeof(XML_Char));
 7417|  20.3k|    pool->ptr = tem->s + (pool->ptr - pool->start);
 7418|  20.3k|    pool->start = tem->s;
 7419|  20.3k|    pool->end = tem->s + blockSize;
 7420|  20.3k|  }
 7421|  28.7k|  return XML_TRUE;
  ------------------
  |  |   55|  28.7k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7422|  28.7k|}
xmlparse.c:poolBytesToAllocateFor:
 7293|  28.7k|poolBytesToAllocateFor(int blockSize) {
 7294|       |  /* Unprotected math would be:
 7295|       |  ** return offsetof(BLOCK, s) + blockSize * sizeof(XML_Char);
 7296|       |  **
 7297|       |  ** Detect overflow, avoiding _signed_ overflow undefined behavior
 7298|       |  ** For a + b * c we check b * c in isolation first, so that addition of a
 7299|       |  ** on top has no chance of making us accept a small non-negative number
 7300|       |  */
 7301|  28.7k|  const size_t stretch = sizeof(XML_Char); /* can be 4 bytes */
 7302|       |
 7303|  28.7k|  if (blockSize <= 0)
  ------------------
  |  Branch (7303:7): [True: 0, False: 28.7k]
  ------------------
 7304|      0|    return 0;
 7305|       |
 7306|  28.7k|  if (blockSize > (int)(INT_MAX / stretch))
  ------------------
  |  Branch (7306:7): [True: 0, False: 28.7k]
  ------------------
 7307|      0|    return 0;
 7308|       |
 7309|  28.7k|  {
 7310|  28.7k|    const int stretchedBlockSize = blockSize * (int)stretch;
 7311|  28.7k|    const int bytesToAllocate
 7312|  28.7k|        = (int)(offsetof(BLOCK, s) + (unsigned)stretchedBlockSize);
 7313|  28.7k|    if (bytesToAllocate < 0)
  ------------------
  |  Branch (7313:9): [True: 0, False: 28.7k]
  ------------------
 7314|      0|      return 0;
 7315|       |
 7316|  28.7k|    return (size_t)bytesToAllocate;
 7317|  28.7k|  }
 7318|  28.7k|}
xmlparse.c:storeAttributeValue:
 5871|  18.9k|                    enum XML_Account account) {
 5872|  18.9k|  enum XML_Error result
 5873|  18.9k|      = appendAttributeValue(parser, enc, isCdata, ptr, end, pool, account);
 5874|  18.9k|  if (result)
  ------------------
  |  Branch (5874:7): [True: 221, False: 18.6k]
  ------------------
 5875|    221|    return result;
 5876|  18.6k|  if (! isCdata && poolLength(pool) && poolLastChar(pool) == 0x20)
  ------------------
  |  |  596|  29.3k|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  |  |  ------------------
  |  |  |  Branch (596:26): [True: 3.48k, False: 7.16k]
  |  |  ------------------
  ------------------
                if (! isCdata && poolLength(pool) && poolLastChar(pool) == 0x20)
  ------------------
  |  |  598|  3.48k|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5876:7): [True: 10.6k, False: 8.05k]
  |  Branch (5876:40): [True: 777, False: 2.70k]
  ------------------
 5877|    777|    poolChop(pool);
  ------------------
  |  |  597|    777|#define poolChop(pool) ((void)--(pool->ptr))
  ------------------
 5878|  18.6k|  if (! poolAppendChar(pool, XML_T('\0')))
  ------------------
  |  |  602|  18.6k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 1.28k, False: 17.4k]
  |  |  |  Branch (602:35): [True: 0, False: 1.28k]
  |  |  ------------------
  |  |  603|  18.6k|       ? 0                                                                     \
  |  |  604|  18.6k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5878:7): [True: 0, False: 18.6k]
  ------------------
 5879|      0|    return XML_ERROR_NO_MEMORY;
 5880|  18.6k|  return XML_ERROR_NONE;
 5881|  18.6k|}
xmlparse.c:appendAttributeValue:
 5886|   745k|                     enum XML_Account account) {
 5887|   745k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 5888|       |#ifndef XML_DTD
 5889|       |  UNUSED_P(account);
 5890|       |#endif
 5891|       |
 5892|  47.9M|  for (;;) {
 5893|  47.9M|    const char *next
 5894|  47.9M|        = ptr; /* XmlAttributeValueTok doesn't always set the last arg */
 5895|  47.9M|    int tok = XmlAttributeValueTok(enc, ptr, end, &next);
  ------------------
  |  |  249|  47.9M|  XmlLiteralTok(enc, XML_ATTRIBUTE_VALUE_LITERAL, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  246|  47.9M|  (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5896|  47.9M|#ifdef XML_DTD
 5897|  47.9M|    if (! accountingDiffTolerated(parser, tok, ptr, next, __LINE__, account)) {
  ------------------
  |  Branch (5897:9): [True: 24, False: 47.9M]
  ------------------
 5898|     24|      accountingOnAbort(parser);
 5899|     24|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 5900|     24|    }
 5901|  47.9M|#endif
 5902|  47.9M|    switch (tok) {
 5903|   745k|    case XML_TOK_NONE:
  ------------------
  |  |   51|   745k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (5903:5): [True: 745k, False: 47.2M]
  ------------------
 5904|   745k|      return XML_ERROR_NONE;
 5905|      7|    case XML_TOK_INVALID:
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (5905:5): [True: 7, False: 47.9M]
  ------------------
 5906|      7|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (5906:11): [True: 5, False: 2]
  ------------------
 5907|      5|        parser->m_eventPtr = next;
 5908|      7|      return XML_ERROR_INVALID_TOKEN;
 5909|      2|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (5909:5): [True: 2, False: 47.9M]
  ------------------
 5910|      2|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (5910:11): [True: 1, False: 1]
  ------------------
 5911|      1|        parser->m_eventPtr = ptr;
 5912|      2|      return XML_ERROR_INVALID_TOKEN;
 5913|  6.84k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  6.84k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (5913:5): [True: 6.84k, False: 47.9M]
  ------------------
 5914|  6.84k|      XML_Char buf[XML_ENCODE_MAX];
 5915|  6.84k|      int i;
 5916|  6.84k|      int n = XmlCharRefNumber(enc, ptr);
  ------------------
  |  |  264|  6.84k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 5917|  6.84k|      if (n < 0) {
  ------------------
  |  Branch (5917:11): [True: 41, False: 6.80k]
  ------------------
 5918|     41|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (5918:13): [True: 40, False: 1]
  ------------------
 5919|     40|          parser->m_eventPtr = ptr;
 5920|     41|        return XML_ERROR_BAD_CHAR_REF;
 5921|     41|      }
 5922|  6.80k|      if (! isCdata && n == 0x20 /* space */
  ------------------
  |  Branch (5922:11): [True: 831, False: 5.97k]
  |  Branch (5922:24): [True: 586, False: 245]
  ------------------
 5923|  6.80k|          && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  596|    586|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
                        && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  598|    392|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5923:15): [True: 194, False: 392]
  |  Branch (5923:40): [True: 194, False: 198]
  ------------------
 5924|    388|        break;
 5925|  6.41k|      n = XmlEncode(n, (ICHAR *)buf);
  ------------------
  |  |  163|  6.41k|#  define XmlEncode XmlUtf8Encode
  ------------------
 5926|       |      /* The XmlEncode() functions can never return 0 here.  That
 5927|       |       * error return happens if the code point passed in is either
 5928|       |       * negative or greater than or equal to 0x110000.  The
 5929|       |       * XmlCharRefNumber() functions will all return a number
 5930|       |       * strictly less than 0x110000 or a negative value if an error
 5931|       |       * occurred.  The negative value is intercepted above, so
 5932|       |       * XmlEncode() is never passed a value it might return an
 5933|       |       * error for.
 5934|       |       */
 5935|  19.4k|      for (i = 0; i < n; i++) {
  ------------------
  |  Branch (5935:19): [True: 13.0k, False: 6.41k]
  ------------------
 5936|  13.0k|        if (! poolAppendChar(pool, buf[i]))
  ------------------
  |  |  602|  13.0k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 357, False: 12.7k]
  |  |  |  Branch (602:35): [True: 0, False: 357]
  |  |  ------------------
  |  |  603|  13.0k|       ? 0                                                                     \
  |  |  604|  13.0k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5936:13): [True: 0, False: 13.0k]
  ------------------
 5937|      0|          return XML_ERROR_NO_MEMORY;
 5938|  13.0k|      }
 5939|  6.41k|    } break;
 5940|  17.2M|    case XML_TOK_DATA_CHARS:
  ------------------
  |  |   67|  17.2M|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (5940:5): [True: 17.2M, False: 30.6M]
  ------------------
 5941|  17.2M|      if (! poolAppend(pool, enc, ptr, next))
  ------------------
  |  Branch (5941:11): [True: 0, False: 17.2M]
  ------------------
 5942|      0|        return XML_ERROR_NO_MEMORY;
 5943|  17.2M|      break;
 5944|  17.2M|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|  1.59k|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (5944:5): [True: 1.59k, False: 47.9M]
  ------------------
 5945|  1.59k|      next = ptr + enc->minBytesPerChar;
 5946|       |      /* fall through */
 5947|  2.55M|    case XML_TOK_ATTRIBUTE_VALUE_S:
  ------------------
  |  |  110|  2.55M|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
  |  Branch (5947:5): [True: 2.54M, False: 45.4M]
  ------------------
 5948|  28.3M|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|  28.3M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (5948:5): [True: 25.7M, False: 22.2M]
  ------------------
 5949|  28.3M|      if (! isCdata && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  596|  70.5k|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
                    if (! isCdata && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  598|  69.2k|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5949:11): [True: 70.5k, False: 28.2M]
  |  Branch (5949:25): [True: 1.22k, False: 69.2k]
  |  Branch (5949:50): [True: 11.3k, False: 57.9k]
  ------------------
 5950|  12.6k|        break;
 5951|  28.3M|      if (! poolAppendChar(pool, 0x20))
  ------------------
  |  |  602|  28.3M|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 1.84k, False: 28.2M]
  |  |  |  Branch (602:35): [True: 0, False: 1.84k]
  |  |  ------------------
  |  |  603|  28.3M|       ? 0                                                                     \
  |  |  604|  28.3M|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5951:11): [True: 0, False: 28.3M]
  ------------------
 5952|      0|        return XML_ERROR_NO_MEMORY;
 5953|  28.3M|      break;
 5954|  28.3M|    case XML_TOK_ENTITY_REF: {
  ------------------
  |  |   70|  1.61M|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (5954:5): [True: 1.61M, False: 46.3M]
  ------------------
 5955|  1.61M|      const XML_Char *name;
 5956|  1.61M|      ENTITY *entity;
 5957|  1.61M|      char checkEntityDecl;
 5958|  1.61M|      XML_Char ch = (XML_Char)XmlPredefinedEntityName(
  ------------------
  |  |  267|  1.61M|  (((enc)->predefinedEntityName)(enc, ptr, end))
  ------------------
 5959|  1.61M|          enc, ptr + enc->minBytesPerChar, next - enc->minBytesPerChar);
 5960|  1.61M|      if (ch) {
  ------------------
  |  Branch (5960:11): [True: 875k, False: 734k]
  ------------------
 5961|   875k|#ifdef XML_DTD
 5962|       |        /* NOTE: We are replacing 4-6 characters original input for 1 character
 5963|       |         *       so there is no amplification and hence recording without
 5964|       |         *       protection. */
 5965|   875k|        accountingDiffTolerated(parser, tok, (char *)&ch,
 5966|   875k|                                ((char *)&ch) + sizeof(XML_Char), __LINE__,
 5967|   875k|                                XML_ACCOUNT_ENTITY_EXPANSION);
 5968|   875k|#endif /* XML_DTD */
 5969|   875k|        if (! poolAppendChar(pool, ch))
  ------------------
  |  |  602|   875k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 311, False: 875k]
  |  |  |  Branch (602:35): [True: 0, False: 311]
  |  |  ------------------
  |  |  603|   875k|       ? 0                                                                     \
  |  |  604|   875k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5969:13): [True: 0, False: 875k]
  ------------------
 5970|      0|          return XML_ERROR_NO_MEMORY;
 5971|   875k|        break;
 5972|   875k|      }
 5973|   734k|      name = poolStoreString(&parser->m_temp2Pool, enc,
 5974|   734k|                             ptr + enc->minBytesPerChar,
 5975|   734k|                             next - enc->minBytesPerChar);
 5976|   734k|      if (! name)
  ------------------
  |  Branch (5976:11): [True: 0, False: 734k]
  ------------------
 5977|      0|        return XML_ERROR_NO_MEMORY;
 5978|   734k|      entity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, 0);
 5979|   734k|      poolDiscard(&parser->m_temp2Pool);
  ------------------
  |  |  599|   734k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5980|       |      /* First, determine if a check for an existing declaration is needed;
 5981|       |         if yes, check that the entity exists, and that it is internal.
 5982|       |      */
 5983|   734k|      if (pool == &dtd->pool) /* are we called from prolog? */
  ------------------
  |  Branch (5983:11): [True: 20.9k, False: 713k]
  ------------------
 5984|  20.9k|        checkEntityDecl =
 5985|  20.9k|#ifdef XML_DTD
 5986|  20.9k|            parser->m_prologState.documentEntity &&
  ------------------
  |  Branch (5986:13): [True: 20.9k, False: 0]
  ------------------
 5987|  20.9k|#endif /* XML_DTD */
 5988|  20.9k|            (dtd->standalone ? ! parser->m_openInternalEntities
  ------------------
  |  Branch (5988:13): [True: 20.9k, False: 0]
  |  Branch (5988:14): [True: 194, False: 20.7k]
  ------------------
 5989|  20.9k|                             : ! dtd->hasParamEntityRefs);
 5990|   713k|      else /* if (pool == &parser->m_tempPool): we are called from content */
 5991|   713k|        checkEntityDecl = ! dtd->hasParamEntityRefs || dtd->standalone;
  ------------------
  |  Branch (5991:27): [True: 609k, False: 104k]
  |  Branch (5991:56): [True: 0, False: 104k]
  ------------------
 5992|   734k|      if (checkEntityDecl) {
  ------------------
  |  Branch (5992:11): [True: 630k, False: 104k]
  ------------------
 5993|   630k|        if (! entity)
  ------------------
  |  Branch (5993:13): [True: 137, False: 630k]
  ------------------
 5994|    137|          return XML_ERROR_UNDEFINED_ENTITY;
 5995|   630k|        else if (! entity->is_internal)
  ------------------
  |  Branch (5995:18): [True: 0, False: 630k]
  ------------------
 5996|      0|          return XML_ERROR_ENTITY_DECLARED_IN_PE;
 5997|   630k|      } else if (! entity) {
  ------------------
  |  Branch (5997:18): [True: 7.92k, False: 96.1k]
  ------------------
 5998|       |        /* Cannot report skipped entity here - see comments on
 5999|       |           parser->m_skippedEntityHandler.
 6000|       |        if (parser->m_skippedEntityHandler)
 6001|       |          parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 6002|       |        */
 6003|       |        /* Cannot call the default handler because this would be
 6004|       |           out of sync with the call to the startElementHandler.
 6005|       |        if ((pool == &parser->m_tempPool) && parser->m_defaultHandler)
 6006|       |          reportDefault(parser, enc, ptr, next);
 6007|       |        */
 6008|  7.92k|        break;
 6009|  7.92k|      }
 6010|   726k|      if (entity->open) {
  ------------------
  |  Branch (6010:11): [True: 6, False: 726k]
  ------------------
 6011|      6|        if (enc == parser->m_encoding) {
  ------------------
  |  Branch (6011:13): [True: 0, False: 6]
  ------------------
 6012|       |          /* It does not appear that this line can be executed.
 6013|       |           *
 6014|       |           * The "if (entity->open)" check catches recursive entity
 6015|       |           * definitions.  In order to be called with an open
 6016|       |           * entity, it must have gone through this code before and
 6017|       |           * been through the recursive call to
 6018|       |           * appendAttributeValue() some lines below.  That call
 6019|       |           * sets the local encoding ("enc") to the parser's
 6020|       |           * internal encoding (internal_utf8 or internal_utf16),
 6021|       |           * which can never be the same as the principle encoding.
 6022|       |           * It doesn't appear there is another code path that gets
 6023|       |           * here with entity->open being TRUE.
 6024|       |           *
 6025|       |           * Since it is not certain that this logic is watertight,
 6026|       |           * we keep the line and merely exclude it from coverage
 6027|       |           * tests.
 6028|       |           */
 6029|      0|          parser->m_eventPtr = ptr; /* LCOV_EXCL_LINE */
 6030|      0|        }
 6031|      6|        return XML_ERROR_RECURSIVE_ENTITY_REF;
 6032|      6|      }
 6033|   726k|      if (entity->notation) {
  ------------------
  |  Branch (6033:11): [True: 2, False: 726k]
  ------------------
 6034|      2|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (6034:13): [True: 1, False: 1]
  ------------------
 6035|      1|          parser->m_eventPtr = ptr;
 6036|      2|        return XML_ERROR_BINARY_ENTITY_REF;
 6037|      2|      }
 6038|   726k|      if (! entity->textPtr) {
  ------------------
  |  Branch (6038:11): [True: 2, False: 726k]
  ------------------
 6039|      2|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (6039:13): [True: 1, False: 1]
  ------------------
 6040|      1|          parser->m_eventPtr = ptr;
 6041|      2|        return XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF;
 6042|   726k|      } else {
 6043|   726k|        enum XML_Error result;
 6044|   726k|        const XML_Char *textEnd = entity->textPtr + entity->textLen;
 6045|   726k|        entity->open = XML_TRUE;
  ------------------
  |  |   55|   726k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6046|   726k|#ifdef XML_DTD
 6047|   726k|        entityTrackingOnOpen(parser, entity, __LINE__);
 6048|   726k|#endif
 6049|   726k|        result = appendAttributeValue(parser, parser->m_internalEncoding,
 6050|   726k|                                      isCdata, (const char *)entity->textPtr,
 6051|   726k|                                      (const char *)textEnd, pool,
 6052|   726k|                                      XML_ACCOUNT_ENTITY_EXPANSION);
 6053|   726k|#ifdef XML_DTD
 6054|   726k|        entityTrackingOnClose(parser, entity, __LINE__);
 6055|   726k|#endif
 6056|   726k|        entity->open = XML_FALSE;
  ------------------
  |  |   56|   726k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6057|   726k|        if (result)
  ------------------
  |  Branch (6057:13): [True: 55, False: 726k]
  ------------------
 6058|     55|          return result;
 6059|   726k|      }
 6060|   726k|    } break;
 6061|   726k|    default:
  ------------------
  |  Branch (6061:5): [True: 0, False: 47.9M]
  ------------------
 6062|       |      /* The only token returned by XmlAttributeValueTok() that does
 6063|       |       * not have an explicit case here is XML_TOK_PARTIAL_CHAR.
 6064|       |       * Getting that would require an entity name to contain an
 6065|       |       * incomplete XML character (e.g. \xE2\x82); however previous
 6066|       |       * tokenisers will have already recognised and rejected such
 6067|       |       * names before XmlAttributeValueTok() gets a look-in.  This
 6068|       |       * default case should be retained as a safety net, but the code
 6069|       |       * excluded from coverage tests.
 6070|       |       *
 6071|       |       * LCOV_EXCL_START
 6072|       |       */
 6073|      0|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6073:11): [True: 0, False: 0]
  ------------------
 6074|      0|        parser->m_eventPtr = ptr;
 6075|      0|      return XML_ERROR_UNEXPECTED_STATE;
 6076|       |      /* LCOV_EXCL_STOP */
 6077|  47.9M|    }
 6078|  47.2M|    ptr = next;
 6079|  47.2M|  }
 6080|       |  /* not reached */
 6081|   745k|}
xmlparse.c:storeEntityValue:
 6086|  7.51k|                 enum XML_Account account) {
 6087|  7.51k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6088|  7.51k|  STRING_POOL *pool = &(dtd->entityValuePool);
 6089|  7.51k|  enum XML_Error result = XML_ERROR_NONE;
 6090|  7.51k|#ifdef XML_DTD
 6091|  7.51k|  int oldInEntityValue = parser->m_prologState.inEntityValue;
 6092|  7.51k|  parser->m_prologState.inEntityValue = 1;
 6093|       |#else
 6094|       |  UNUSED_P(account);
 6095|       |#endif /* XML_DTD */
 6096|       |  /* never return Null for the value argument in EntityDeclHandler,
 6097|       |     since this would indicate an external entity; therefore we
 6098|       |     have to make sure that entityValuePool.start is not null */
 6099|  7.51k|  if (! pool->blocks) {
  ------------------
  |  Branch (6099:7): [True: 2.47k, False: 5.03k]
  ------------------
 6100|  2.47k|    if (! poolGrow(pool))
  ------------------
  |  Branch (6100:9): [True: 0, False: 2.47k]
  ------------------
 6101|      0|      return XML_ERROR_NO_MEMORY;
 6102|  2.47k|  }
 6103|       |
 6104|  1.12M|  for (;;) {
 6105|  1.12M|    const char *next
 6106|  1.12M|        = entityTextPtr; /* XmlEntityValueTok doesn't always set the last arg */
 6107|  1.12M|    int tok = XmlEntityValueTok(enc, entityTextPtr, entityTextEnd, &next);
  ------------------
  |  |  252|  1.12M|  XmlLiteralTok(enc, XML_ENTITY_VALUE_LITERAL, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  246|  1.12M|  (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 6108|       |
 6109|  1.12M|#ifdef XML_DTD
 6110|  1.12M|    if (! accountingDiffTolerated(parser, tok, entityTextPtr, next, __LINE__,
  ------------------
  |  Branch (6110:9): [True: 0, False: 1.12M]
  ------------------
 6111|  1.12M|                                  account)) {
 6112|      0|      accountingOnAbort(parser);
 6113|      0|      result = XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 6114|      0|      goto endEntityValue;
 6115|      0|    }
 6116|  1.12M|#endif
 6117|       |
 6118|  1.12M|    switch (tok) {
 6119|      2|    case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|      2|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (6119:5): [True: 2, False: 1.12M]
  ------------------
 6120|      2|#ifdef XML_DTD
 6121|      2|      if (parser->m_isParamEntity || enc != parser->m_encoding) {
  ------------------
  |  Branch (6121:11): [True: 0, False: 2]
  |  Branch (6121:38): [True: 0, False: 2]
  ------------------
 6122|      0|        const XML_Char *name;
 6123|      0|        ENTITY *entity;
 6124|      0|        name = poolStoreString(&parser->m_tempPool, enc,
 6125|      0|                               entityTextPtr + enc->minBytesPerChar,
 6126|      0|                               next - enc->minBytesPerChar);
 6127|      0|        if (! name) {
  ------------------
  |  Branch (6127:13): [True: 0, False: 0]
  ------------------
 6128|      0|          result = XML_ERROR_NO_MEMORY;
 6129|      0|          goto endEntityValue;
 6130|      0|        }
 6131|      0|        entity = (ENTITY *)lookup(parser, &dtd->paramEntities, name, 0);
 6132|      0|        poolDiscard(&parser->m_tempPool);
  ------------------
  |  |  599|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6133|      0|        if (! entity) {
  ------------------
  |  Branch (6133:13): [True: 0, False: 0]
  ------------------
 6134|       |          /* not a well-formedness error - see XML 1.0: WFC Entity Declared */
 6135|       |          /* cannot report skipped entity here - see comments on
 6136|       |             parser->m_skippedEntityHandler
 6137|       |          if (parser->m_skippedEntityHandler)
 6138|       |            parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 6139|       |          */
 6140|      0|          dtd->keepProcessing = dtd->standalone;
 6141|      0|          goto endEntityValue;
 6142|      0|        }
 6143|      0|        if (entity->open) {
  ------------------
  |  Branch (6143:13): [True: 0, False: 0]
  ------------------
 6144|      0|          if (enc == parser->m_encoding)
  ------------------
  |  Branch (6144:15): [True: 0, False: 0]
  ------------------
 6145|      0|            parser->m_eventPtr = entityTextPtr;
 6146|      0|          result = XML_ERROR_RECURSIVE_ENTITY_REF;
 6147|      0|          goto endEntityValue;
 6148|      0|        }
 6149|      0|        if (entity->systemId) {
  ------------------
  |  Branch (6149:13): [True: 0, False: 0]
  ------------------
 6150|      0|          if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (6150:15): [True: 0, False: 0]
  ------------------
 6151|      0|            dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6152|      0|            entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6153|      0|            entityTrackingOnOpen(parser, entity, __LINE__);
 6154|      0|            if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (6154:17): [True: 0, False: 0]
  ------------------
 6155|      0|                    parser->m_externalEntityRefHandlerArg, 0, entity->base,
 6156|      0|                    entity->systemId, entity->publicId)) {
 6157|      0|              entityTrackingOnClose(parser, entity, __LINE__);
 6158|      0|              entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6159|      0|              result = XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 6160|      0|              goto endEntityValue;
 6161|      0|            }
 6162|      0|            entityTrackingOnClose(parser, entity, __LINE__);
 6163|      0|            entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6164|      0|            if (! dtd->paramEntityRead)
  ------------------
  |  Branch (6164:17): [True: 0, False: 0]
  ------------------
 6165|      0|              dtd->keepProcessing = dtd->standalone;
 6166|      0|          } else
 6167|      0|            dtd->keepProcessing = dtd->standalone;
 6168|      0|        } else {
 6169|      0|          entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6170|      0|          entityTrackingOnOpen(parser, entity, __LINE__);
 6171|      0|          result = storeEntityValue(
 6172|      0|              parser, parser->m_internalEncoding, (const char *)entity->textPtr,
 6173|      0|              (const char *)(entity->textPtr + entity->textLen),
 6174|      0|              XML_ACCOUNT_ENTITY_EXPANSION);
 6175|      0|          entityTrackingOnClose(parser, entity, __LINE__);
 6176|      0|          entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6177|      0|          if (result)
  ------------------
  |  Branch (6177:15): [True: 0, False: 0]
  ------------------
 6178|      0|            goto endEntityValue;
 6179|      0|        }
 6180|      0|        break;
 6181|      0|      }
 6182|      2|#endif /* XML_DTD */
 6183|       |      /* In the internal subset, PE references are not legal
 6184|       |         within markup declarations, e.g entity values in this case. */
 6185|      2|      parser->m_eventPtr = entityTextPtr;
 6186|      2|      result = XML_ERROR_PARAM_ENTITY_REF;
 6187|      2|      goto endEntityValue;
 6188|  7.43k|    case XML_TOK_NONE:
  ------------------
  |  |   51|  7.43k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (6188:5): [True: 7.43k, False: 1.11M]
  ------------------
 6189|  7.43k|      result = XML_ERROR_NONE;
 6190|  7.43k|      goto endEntityValue;
 6191|  13.7k|    case XML_TOK_ENTITY_REF:
  ------------------
  |  |   70|  13.7k|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (6191:5): [True: 13.7k, False: 1.10M]
  ------------------
 6192|   104k|    case XML_TOK_DATA_CHARS:
  ------------------
  |  |   67|   104k|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (6192:5): [True: 91.1k, False: 1.03M]
  ------------------
 6193|   104k|      if (! poolAppend(pool, enc, entityTextPtr, next)) {
  ------------------
  |  Branch (6193:11): [True: 0, False: 104k]
  ------------------
 6194|      0|        result = XML_ERROR_NO_MEMORY;
 6195|      0|        goto endEntityValue;
 6196|      0|      }
 6197|   104k|      break;
 6198|   104k|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|  1.15k|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (6198:5): [True: 1.15k, False: 1.12M]
  ------------------
 6199|  1.15k|      next = entityTextPtr + enc->minBytesPerChar;
 6200|       |      /* fall through */
 6201|  1.00M|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|  1.00M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (6201:5): [True: 1.00M, False: 117k]
  ------------------
 6202|  1.00M|      if (pool->end == pool->ptr && ! poolGrow(pool)) {
  ------------------
  |  Branch (6202:11): [True: 71, False: 1.00M]
  |  Branch (6202:37): [True: 0, False: 71]
  ------------------
 6203|      0|        result = XML_ERROR_NO_MEMORY;
 6204|      0|        goto endEntityValue;
 6205|      0|      }
 6206|  1.00M|      *(pool->ptr)++ = 0xA;
 6207|  1.00M|      break;
 6208|  4.25k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  4.25k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (6208:5): [True: 4.25k, False: 1.11M]
  ------------------
 6209|  4.25k|      XML_Char buf[XML_ENCODE_MAX];
 6210|  4.25k|      int i;
 6211|  4.25k|      int n = XmlCharRefNumber(enc, entityTextPtr);
  ------------------
  |  |  264|  4.25k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 6212|  4.25k|      if (n < 0) {
  ------------------
  |  Branch (6212:11): [True: 3, False: 4.25k]
  ------------------
 6213|      3|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (6213:13): [True: 3, False: 0]
  ------------------
 6214|      3|          parser->m_eventPtr = entityTextPtr;
 6215|      3|        result = XML_ERROR_BAD_CHAR_REF;
 6216|      3|        goto endEntityValue;
 6217|      3|      }
 6218|  4.25k|      n = XmlEncode(n, (ICHAR *)buf);
  ------------------
  |  |  163|  4.25k|#  define XmlEncode XmlUtf8Encode
  ------------------
 6219|       |      /* The XmlEncode() functions can never return 0 here.  That
 6220|       |       * error return happens if the code point passed in is either
 6221|       |       * negative or greater than or equal to 0x110000.  The
 6222|       |       * XmlCharRefNumber() functions will all return a number
 6223|       |       * strictly less than 0x110000 or a negative value if an error
 6224|       |       * occurred.  The negative value is intercepted above, so
 6225|       |       * XmlEncode() is never passed a value it might return an
 6226|       |       * error for.
 6227|       |       */
 6228|  15.2k|      for (i = 0; i < n; i++) {
  ------------------
  |  Branch (6228:19): [True: 10.9k, False: 4.25k]
  ------------------
 6229|  10.9k|        if (pool->end == pool->ptr && ! poolGrow(pool)) {
  ------------------
  |  Branch (6229:13): [True: 10, False: 10.9k]
  |  Branch (6229:39): [True: 0, False: 10]
  ------------------
 6230|      0|          result = XML_ERROR_NO_MEMORY;
 6231|      0|          goto endEntityValue;
 6232|      0|        }
 6233|  10.9k|        *(pool->ptr)++ = buf[i];
 6234|  10.9k|      }
 6235|  4.25k|    } break;
 6236|  4.25k|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|     43|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (6236:5): [True: 43, False: 1.12M]
  ------------------
 6237|     43|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6237:11): [True: 43, False: 0]
  ------------------
 6238|     43|        parser->m_eventPtr = entityTextPtr;
 6239|     43|      result = XML_ERROR_INVALID_TOKEN;
 6240|     43|      goto endEntityValue;
 6241|     31|    case XML_TOK_INVALID:
  ------------------
  |  |   57|     31|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (6241:5): [True: 31, False: 1.12M]
  ------------------
 6242|     31|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6242:11): [True: 31, False: 0]
  ------------------
 6243|     31|        parser->m_eventPtr = next;
 6244|     31|      result = XML_ERROR_INVALID_TOKEN;
 6245|     31|      goto endEntityValue;
 6246|      0|    default:
  ------------------
  |  Branch (6246:5): [True: 0, False: 1.12M]
  ------------------
 6247|       |      /* This default case should be unnecessary -- all the tokens
 6248|       |       * that XmlEntityValueTok() can return have their own explicit
 6249|       |       * cases -- but should be retained for safety.  We do however
 6250|       |       * exclude it from the coverage statistics.
 6251|       |       *
 6252|       |       * LCOV_EXCL_START
 6253|       |       */
 6254|      0|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6254:11): [True: 0, False: 0]
  ------------------
 6255|      0|        parser->m_eventPtr = entityTextPtr;
 6256|      0|      result = XML_ERROR_UNEXPECTED_STATE;
 6257|      0|      goto endEntityValue;
 6258|       |      /* LCOV_EXCL_STOP */
 6259|  1.12M|    }
 6260|  1.11M|    entityTextPtr = next;
 6261|  1.11M|  }
 6262|  7.51k|endEntityValue:
 6263|  7.51k|#ifdef XML_DTD
 6264|  7.51k|  parser->m_prologState.inEntityValue = oldInEntityValue;
 6265|  7.51k|#endif /* XML_DTD */
 6266|  7.51k|  return result;
 6267|  7.51k|}
xmlparse.c:processInternalEntity:
 5716|   105k|processInternalEntity(XML_Parser parser, ENTITY *entity, XML_Bool betweenDecl) {
 5717|   105k|  const char *textStart, *textEnd;
 5718|   105k|  const char *next;
 5719|   105k|  enum XML_Error result;
 5720|   105k|  OPEN_INTERNAL_ENTITY *openEntity;
 5721|       |
 5722|   105k|  if (parser->m_freeInternalEntities) {
  ------------------
  |  Branch (5722:7): [True: 104k, False: 1.71k]
  ------------------
 5723|   104k|    openEntity = parser->m_freeInternalEntities;
 5724|   104k|    parser->m_freeInternalEntities = openEntity->next;
 5725|   104k|  } else {
 5726|  1.71k|    openEntity
 5727|  1.71k|        = (OPEN_INTERNAL_ENTITY *)MALLOC(parser, sizeof(OPEN_INTERNAL_ENTITY));
  ------------------
  |  |  713|  1.71k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5728|  1.71k|    if (! openEntity)
  ------------------
  |  Branch (5728:9): [True: 0, False: 1.71k]
  ------------------
 5729|      0|      return XML_ERROR_NO_MEMORY;
 5730|  1.71k|  }
 5731|   105k|  entity->open = XML_TRUE;
  ------------------
  |  |   55|   105k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5732|   105k|#ifdef XML_DTD
 5733|   105k|  entityTrackingOnOpen(parser, entity, __LINE__);
 5734|   105k|#endif
 5735|   105k|  entity->processed = 0;
 5736|   105k|  openEntity->next = parser->m_openInternalEntities;
 5737|   105k|  parser->m_openInternalEntities = openEntity;
 5738|   105k|  openEntity->entity = entity;
 5739|   105k|  openEntity->startTagLevel = parser->m_tagLevel;
 5740|   105k|  openEntity->betweenDecl = betweenDecl;
 5741|   105k|  openEntity->internalEventPtr = NULL;
 5742|   105k|  openEntity->internalEventEndPtr = NULL;
 5743|   105k|  textStart = (const char *)entity->textPtr;
 5744|   105k|  textEnd = (const char *)(entity->textPtr + entity->textLen);
 5745|       |  /* Set a safe default value in case 'next' does not get set */
 5746|   105k|  next = textStart;
 5747|       |
 5748|   105k|#ifdef XML_DTD
 5749|   105k|  if (entity->is_param) {
  ------------------
  |  Branch (5749:7): [True: 0, False: 105k]
  ------------------
 5750|      0|    int tok
 5751|      0|        = XmlPrologTok(parser->m_internalEncoding, textStart, textEnd, &next);
  ------------------
  |  |  227|      0|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|      0|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5752|      0|    result = doProlog(parser, parser->m_internalEncoding, textStart, textEnd,
 5753|      0|                      tok, next, &next, XML_FALSE, XML_FALSE,
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
                                    tok, next, &next, XML_FALSE, XML_FALSE,
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5754|      0|                      XML_ACCOUNT_ENTITY_EXPANSION);
 5755|      0|  } else
 5756|   105k|#endif /* XML_DTD */
 5757|   105k|    result = doContent(parser, parser->m_tagLevel, parser->m_internalEncoding,
 5758|   105k|                       textStart, textEnd, &next, XML_FALSE,
  ------------------
  |  |   56|   105k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5759|   105k|                       XML_ACCOUNT_ENTITY_EXPANSION);
 5760|       |
 5761|   105k|  if (result == XML_ERROR_NONE) {
  ------------------
  |  Branch (5761:7): [True: 105k, False: 759]
  ------------------
 5762|   105k|    if (textEnd != next && parser->m_parsingStatus.parsing == XML_SUSPENDED) {
  ------------------
  |  Branch (5762:9): [True: 0, False: 105k]
  |  Branch (5762:28): [True: 0, False: 0]
  ------------------
 5763|      0|      entity->processed = (int)(next - textStart);
 5764|      0|      parser->m_processor = internalEntityProcessor;
 5765|   105k|    } else {
 5766|   105k|#ifdef XML_DTD
 5767|   105k|      entityTrackingOnClose(parser, entity, __LINE__);
 5768|   105k|#endif /* XML_DTD */
 5769|   105k|      entity->open = XML_FALSE;
  ------------------
  |  |   56|   105k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5770|   105k|      parser->m_openInternalEntities = openEntity->next;
 5771|       |      /* put openEntity back in list of free instances */
 5772|   105k|      openEntity->next = parser->m_freeInternalEntities;
 5773|   105k|      parser->m_freeInternalEntities = openEntity;
 5774|   105k|    }
 5775|   105k|  }
 5776|   105k|  return result;
 5777|   105k|}
xmlparse.c:entityTrackingOnOpen:
 7827|   832k|entityTrackingOnOpen(XML_Parser originParser, ENTITY *entity, int sourceLine) {
 7828|   832k|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7829|   832k|  assert(! rootParser->m_parentParser);
 7830|       |
 7831|   832k|  rootParser->m_entity_stats.countEverOpened++;
 7832|   832k|  rootParser->m_entity_stats.currentDepth++;
 7833|   832k|  if (rootParser->m_entity_stats.currentDepth
  ------------------
  |  Branch (7833:7): [True: 2.35k, False: 830k]
  ------------------
 7834|   832k|      > rootParser->m_entity_stats.maximumDepthSeen) {
 7835|  2.35k|    rootParser->m_entity_stats.maximumDepthSeen++;
 7836|  2.35k|  }
 7837|       |
 7838|   832k|  entityTrackingReportStats(rootParser, entity, "OPEN ", sourceLine);
 7839|   832k|}
xmlparse.c:entityTrackingReportStats:
 7804|  1.66M|                          const char *action, int sourceLine) {
 7805|  1.66M|  assert(! rootParser->m_parentParser);
 7806|  1.66M|  if (rootParser->m_entity_stats.debugLevel == 0u)
  ------------------
  |  Branch (7806:7): [True: 1.66M, False: 0]
  ------------------
 7807|  1.66M|    return;
 7808|       |
 7809|       |#  if defined(XML_UNICODE)
 7810|       |  const char *const entityName = "[..]";
 7811|       |#  else
 7812|      0|  const char *const entityName = entity->name;
 7813|      0|#  endif
 7814|       |
 7815|      0|  fprintf(
 7816|      0|      stderr,
 7817|      0|      "expat: Entities(%p): Count %9d, depth %2d/%2d %*s%s%s; %s length %d (xmlparse.c:%d)\n",
 7818|      0|      (void *)rootParser, rootParser->m_entity_stats.countEverOpened,
 7819|      0|      rootParser->m_entity_stats.currentDepth,
 7820|      0|      rootParser->m_entity_stats.maximumDepthSeen,
 7821|      0|      (rootParser->m_entity_stats.currentDepth - 1) * 2, "",
 7822|      0|      entity->is_param ? "%" : "&", entityName, action, entity->textLen,
  ------------------
  |  Branch (7822:7): [True: 0, False: 0]
  ------------------
 7823|      0|      sourceLine);
 7824|      0|}
xmlparse.c:entityTrackingOnClose:
 7842|   831k|entityTrackingOnClose(XML_Parser originParser, ENTITY *entity, int sourceLine) {
 7843|   831k|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7844|   831k|  assert(! rootParser->m_parentParser);
 7845|       |
 7846|   831k|  entityTrackingReportStats(rootParser, entity, "CLOSE", sourceLine);
 7847|   831k|  rootParser->m_entity_stats.currentDepth--;
 7848|   831k|}
xmlparse.c:reportProcessingInstruction:
 6292|  17.0k|                            const char *start, const char *end) {
 6293|  17.0k|  const XML_Char *target;
 6294|  17.0k|  XML_Char *data;
 6295|  17.0k|  const char *tem;
 6296|  17.0k|  if (! parser->m_processingInstructionHandler) {
  ------------------
  |  Branch (6296:7): [True: 17.0k, False: 0]
  ------------------
 6297|  17.0k|    if (parser->m_defaultHandler)
  ------------------
  |  Branch (6297:9): [True: 0, False: 17.0k]
  ------------------
 6298|      0|      reportDefault(parser, enc, start, end);
 6299|  17.0k|    return 1;
 6300|  17.0k|  }
 6301|      0|  start += enc->minBytesPerChar * 2;
 6302|      0|  tem = start + XmlNameLength(enc, start);
  ------------------
  |  |  257|      0|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 6303|      0|  target = poolStoreString(&parser->m_tempPool, enc, start, tem);
 6304|      0|  if (! target)
  ------------------
  |  Branch (6304:7): [True: 0, False: 0]
  ------------------
 6305|      0|    return 0;
 6306|      0|  poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6307|      0|  data = poolStoreString(&parser->m_tempPool, enc, XmlSkipS(enc, tem),
  ------------------
  |  |  259|      0|#define XmlSkipS(enc, ptr) (((enc)->skipS)(enc, ptr))
  ------------------
 6308|      0|                         end - enc->minBytesPerChar * 2);
 6309|      0|  if (! data)
  ------------------
  |  Branch (6309:7): [True: 0, False: 0]
  ------------------
 6310|      0|    return 0;
 6311|      0|  normalizeLines(data);
 6312|      0|  parser->m_processingInstructionHandler(parser->m_handlerArg, target, data);
 6313|      0|  poolClear(&parser->m_tempPool);
 6314|      0|  return 1;
 6315|      0|}
xmlparse.c:reportComment:
 6319|  2.30k|              const char *end) {
 6320|  2.30k|  XML_Char *data;
 6321|  2.30k|  if (! parser->m_commentHandler) {
  ------------------
  |  Branch (6321:7): [True: 2.30k, False: 0]
  ------------------
 6322|  2.30k|    if (parser->m_defaultHandler)
  ------------------
  |  Branch (6322:9): [True: 0, False: 2.30k]
  ------------------
 6323|      0|      reportDefault(parser, enc, start, end);
 6324|  2.30k|    return 1;
 6325|  2.30k|  }
 6326|      0|  data = poolStoreString(&parser->m_tempPool, enc,
 6327|      0|                         start + enc->minBytesPerChar * 4,
 6328|      0|                         end - enc->minBytesPerChar * 3);
 6329|      0|  if (! data)
  ------------------
  |  Branch (6329:7): [True: 0, False: 0]
  ------------------
 6330|      0|    return 0;
 6331|      0|  normalizeLines(data);
 6332|      0|  parser->m_commentHandler(parser->m_handlerArg, data);
 6333|      0|  poolClear(&parser->m_tempPool);
 6334|      0|  return 1;
 6335|      0|}
xmlparse.c:getDebugLevel:
 8390|  39.5k|getDebugLevel(const char *variableName, unsigned long defaultDebugLevel) {
 8391|  39.5k|  const char *const valueOrNull = getenv(variableName);
 8392|  39.5k|  if (valueOrNull == NULL) {
  ------------------
  |  Branch (8392:7): [True: 39.5k, False: 0]
  ------------------
 8393|  39.5k|    return defaultDebugLevel;
 8394|  39.5k|  }
 8395|      0|  const char *const value = valueOrNull;
 8396|       |
 8397|      0|  errno = 0;
 8398|      0|  char *afterValue = NULL;
 8399|      0|  unsigned long debugLevel = strtoul(value, &afterValue, 10);
 8400|      0|  if ((errno != 0) || (afterValue == value) || (afterValue[0] != '\0')) {
  ------------------
  |  Branch (8400:7): [True: 0, False: 0]
  |  Branch (8400:23): [True: 0, False: 0]
  |  Branch (8400:48): [True: 0, False: 0]
  ------------------
 8401|      0|    errno = 0;
 8402|      0|    return defaultDebugLevel;
 8403|      0|  }
 8404|       |
 8405|      0|  return debugLevel;
 8406|      0|}
xmlparse.c:destroyBindings:
 1428|  2.25M|destroyBindings(BINDING *bindings, XML_Parser parser) {
 1429|  2.25M|  for (;;) {
 1430|  2.25M|    BINDING *b = bindings;
 1431|  2.25M|    if (! b)
  ------------------
  |  Branch (1431:9): [True: 2.25M, False: 0]
  ------------------
 1432|  2.25M|      break;
 1433|      0|    bindings = b->nextTagBinding;
 1434|      0|    FREE(parser, b->uri);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1435|      0|    FREE(parser, b);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1436|      0|  }
 1437|  2.25M|}
xmlparse.c:startParsing:
  953|  19.7k|startParsing(XML_Parser parser) {
  954|       |  /* hash functions must be initialized before setContext() is called */
  955|  19.7k|  if (parser->m_hash_secret_salt == 0)
  ------------------
  |  Branch (955:7): [True: 0, False: 19.7k]
  ------------------
  956|      0|    parser->m_hash_secret_salt = generate_hash_secret_salt(parser);
  957|  19.7k|  if (parser->m_ns) {
  ------------------
  |  Branch (957:7): [True: 0, False: 19.7k]
  ------------------
  958|       |    /* implicit context only set for root parser, since child
  959|       |       parsers (i.e. external entity parsers) will inherit it
  960|       |    */
  961|      0|    return setContext(parser, implicitContext);
  962|      0|  }
  963|  19.7k|  return XML_TRUE;
  ------------------
  |  |   55|  19.7k|#define XML_TRUE ((XML_Bool)1)
  ------------------
  964|  19.7k|}
xmlparse.c:dtdDestroy:
 6788|  19.7k|dtdDestroy(DTD *p, XML_Bool isDocEntity, const XML_Memory_Handling_Suite *ms) {
 6789|  19.7k|  HASH_TABLE_ITER iter;
 6790|  19.7k|  hashTableIterInit(&iter, &(p->elementTypes));
 6791|  42.1k|  for (;;) {
 6792|  42.1k|    ELEMENT_TYPE *e = (ELEMENT_TYPE *)hashTableIterNext(&iter);
 6793|  42.1k|    if (! e)
  ------------------
  |  Branch (6793:9): [True: 19.7k, False: 22.3k]
  ------------------
 6794|  19.7k|      break;
 6795|  22.3k|    if (e->allocDefaultAtts != 0)
  ------------------
  |  Branch (6795:9): [True: 1.03k, False: 21.2k]
  ------------------
 6796|  1.03k|      ms->free_fcn(e->defaultAtts);
 6797|  22.3k|  }
 6798|  19.7k|  hashTableDestroy(&(p->generalEntities));
 6799|  19.7k|#ifdef XML_DTD
 6800|  19.7k|  hashTableDestroy(&(p->paramEntities));
 6801|  19.7k|#endif /* XML_DTD */
 6802|  19.7k|  hashTableDestroy(&(p->elementTypes));
 6803|  19.7k|  hashTableDestroy(&(p->attributeIds));
 6804|  19.7k|  hashTableDestroy(&(p->prefixes));
 6805|  19.7k|  poolDestroy(&(p->pool));
 6806|  19.7k|  poolDestroy(&(p->entityValuePool));
 6807|  19.7k|  if (isDocEntity) {
  ------------------
  |  Branch (6807:7): [True: 19.7k, False: 0]
  ------------------
 6808|  19.7k|    ms->free_fcn(p->scaffIndex);
 6809|  19.7k|    ms->free_fcn(p->scaffold);
 6810|  19.7k|  }
 6811|  19.7k|  ms->free_fcn(p);
 6812|  19.7k|}
xmlparse.c:hashTableDestroy:
 7141|  98.9k|hashTableDestroy(HASH_TABLE *table) {
 7142|  98.9k|  size_t i;
 7143|  1.23M|  for (i = 0; i < table->size; i++)
  ------------------
  |  Branch (7143:15): [True: 1.13M, False: 98.9k]
  ------------------
 7144|  1.13M|    table->mem->free_fcn(table->v[i]);
 7145|  98.9k|  table->mem->free_fcn(table->v);
 7146|  98.9k|}
xmlparse.c:poolClear:
 7184|  2.27M|poolClear(STRING_POOL *pool) {
 7185|  2.27M|  if (! pool->freeBlocks)
  ------------------
  |  Branch (7185:7): [True: 1.72M, False: 554k]
  ------------------
 7186|  1.72M|    pool->freeBlocks = pool->blocks;
 7187|   554k|  else {
 7188|   554k|    BLOCK *p = pool->blocks;
 7189|   555k|    while (p) {
  ------------------
  |  Branch (7189:12): [True: 1.35k, False: 554k]
  ------------------
 7190|  1.35k|      BLOCK *tem = p->next;
 7191|  1.35k|      p->next = pool->freeBlocks;
 7192|  1.35k|      pool->freeBlocks = p;
 7193|  1.35k|      p = tem;
 7194|  1.35k|    }
 7195|   554k|  }
 7196|  2.27M|  pool->blocks = NULL;
 7197|  2.27M|  pool->start = NULL;
 7198|  2.27M|  pool->ptr = NULL;
 7199|  2.27M|  pool->end = NULL;
 7200|  2.27M|}
xmlparse.c:poolDestroy:
 7203|  79.1k|poolDestroy(STRING_POOL *pool) {
 7204|  79.1k|  BLOCK *p = pool->blocks;
 7205|  96.8k|  while (p) {
  ------------------
  |  Branch (7205:10): [True: 17.7k, False: 79.1k]
  ------------------
 7206|  17.7k|    BLOCK *tem = p->next;
 7207|  17.7k|    pool->mem->free_fcn(p);
 7208|  17.7k|    p = tem;
 7209|  17.7k|  }
 7210|  79.1k|  p = pool->freeBlocks;
 7211|  81.7k|  while (p) {
  ------------------
  |  Branch (7211:10): [True: 2.60k, False: 79.1k]
  ------------------
 7212|  2.60k|    BLOCK *tem = p->next;
 7213|  2.60k|    pool->mem->free_fcn(p);
 7214|  2.60k|    p = tem;
 7215|  2.60k|  }
 7216|  79.1k|}
xmlparse.c:poolCopyString:
 7236|  15.0k|poolCopyString(STRING_POOL *pool, const XML_Char *s) {
 7237|  4.76M|  do {
 7238|  4.76M|    if (! poolAppendChar(pool, *s))
  ------------------
  |  |  602|  4.76M|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 7.89k, False: 4.75M]
  |  |  |  Branch (602:35): [True: 0, False: 7.89k]
  |  |  ------------------
  |  |  603|  4.76M|       ? 0                                                                     \
  |  |  604|  4.76M|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (7238:9): [True: 0, False: 4.76M]
  ------------------
 7239|      0|      return NULL;
 7240|  4.76M|  } while (*s++);
  ------------------
  |  Branch (7240:12): [True: 4.74M, False: 15.0k]
  ------------------
 7241|  15.0k|  s = pool->start;
 7242|  15.0k|  poolFinish(pool);
  ------------------
  |  |  600|  15.0k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 7243|  15.0k|  return s;
 7244|  15.0k|}
xmlparse.c:copyString:
 7636|  19.7k|copyString(const XML_Char *s, const XML_Memory_Handling_Suite *memsuite) {
 7637|  19.7k|  size_t charsRequired = 0;
 7638|  19.7k|  XML_Char *result;
 7639|       |
 7640|       |  /* First determine how long the string is */
 7641|   178k|  while (s[charsRequired] != 0) {
  ------------------
  |  Branch (7641:10): [True: 158k, False: 19.7k]
  ------------------
 7642|   158k|    charsRequired++;
 7643|   158k|  }
 7644|       |  /* Include the terminator */
 7645|  19.7k|  charsRequired++;
 7646|       |
 7647|       |  /* Now allocate space for the copy */
 7648|  19.7k|  result = memsuite->malloc_fcn(charsRequired * sizeof(XML_Char));
 7649|  19.7k|  if (result == NULL)
  ------------------
  |  Branch (7649:7): [True: 0, False: 19.7k]
  ------------------
 7650|      0|    return NULL;
 7651|       |  /* Copy the original into place */
 7652|  19.7k|  memcpy(result, s, charsRequired * sizeof(XML_Char));
 7653|  19.7k|  return result;
 7654|  19.7k|}

XmlPrologStateInit:
 1237|  19.7k|XmlPrologStateInit(PROLOG_STATE *state) {
 1238|  19.7k|  state->handler = prolog0;
 1239|  19.7k|#ifdef XML_DTD
 1240|  19.7k|  state->documentEntity = 1;
 1241|  19.7k|  state->includeLevel = 0;
 1242|  19.7k|  state->inEntityValue = 0;
 1243|  19.7k|#endif /* XML_DTD */
 1244|  19.7k|}
xmlrole.c:prolog0:
  142|  23.7k|        const ENCODING *enc) {
  143|  23.7k|  switch (tok) {
  ------------------
  |  Branch (143:11): [True: 288, False: 23.4k]
  ------------------
  144|    546|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    546|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (144:3): [True: 546, False: 23.1k]
  ------------------
  145|    546|    state->handler = prolog1;
  146|    546|    return XML_ROLE_NONE;
  147|    317|  case XML_TOK_XML_DECL:
  ------------------
  |  |   77|    317|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (147:3): [True: 317, False: 23.3k]
  ------------------
  148|    317|    state->handler = prolog1;
  149|    317|    return XML_ROLE_XML_DECL;
  150|    328|  case XML_TOK_PI:
  ------------------
  |  |   76|    328|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (150:3): [True: 328, False: 23.3k]
  ------------------
  151|    328|    state->handler = prolog1;
  152|    328|    return XML_ROLE_PI;
  153|     56|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|     56|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (153:3): [True: 56, False: 23.6k]
  ------------------
  154|     56|    state->handler = prolog1;
  155|     56|    return XML_ROLE_COMMENT;
  156|  7.23k|  case XML_TOK_BOM:
  ------------------
  |  |   79|  7.23k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
  |  Branch (156:3): [True: 7.23k, False: 16.4k]
  ------------------
  157|  7.23k|    return XML_ROLE_NONE;
  158|  5.78k|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|  5.78k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (158:3): [True: 5.78k, False: 17.9k]
  ------------------
  159|  5.78k|    if (! XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  5.78k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (159:9): [True: 105, False: 5.68k]
  ------------------
  160|  5.78k|                              KW_DOCTYPE))
  161|    105|      break;
  162|  5.68k|    state->handler = doctype0;
  163|  5.68k|    return XML_ROLE_DOCTYPE_NONE;
  164|  9.15k|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|  9.15k|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (164:3): [True: 9.15k, False: 14.5k]
  ------------------
  165|  9.15k|    state->handler = error;
  166|  9.15k|    return XML_ROLE_INSTANCE_START;
  167|  23.7k|  }
  168|    393|  return common(state, tok);
  169|  23.7k|}
xmlrole.c:prolog1:
  173|  4.93k|        const ENCODING *enc) {
  174|  4.93k|  switch (tok) {
  ------------------
  |  Branch (174:11): [True: 14, False: 4.92k]
  ------------------
  175|    387|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    387|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (175:3): [True: 387, False: 4.55k]
  ------------------
  176|    387|    return XML_ROLE_NONE;
  177|  3.40k|  case XML_TOK_PI:
  ------------------
  |  |   76|  3.40k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (177:3): [True: 3.40k, False: 1.53k]
  ------------------
  178|  3.40k|    return XML_ROLE_PI;
  179|    791|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    791|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (179:3): [True: 791, False: 4.14k]
  ------------------
  180|    791|    return XML_ROLE_COMMENT;
  181|      0|  case XML_TOK_BOM:
  ------------------
  |  |   79|      0|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
  |  Branch (181:3): [True: 0, False: 4.93k]
  ------------------
  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|    302|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|    302|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (190:3): [True: 302, False: 4.63k]
  ------------------
  191|    302|    if (! XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|    302|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (191:9): [True: 4, False: 298]
  ------------------
  192|    302|                              KW_DOCTYPE))
  193|      4|      break;
  194|    298|    state->handler = doctype0;
  195|    298|    return XML_ROLE_DOCTYPE_NONE;
  196|     44|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|     44|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (196:3): [True: 44, False: 4.89k]
  ------------------
  197|     44|    state->handler = error;
  198|     44|    return XML_ROLE_INSTANCE_START;
  199|  4.93k|  }
  200|     18|  return common(state, tok);
  201|  4.93k|}
xmlrole.c:doctype0:
  225|  11.9k|         const ENCODING *enc) {
  226|  11.9k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  11.9k|#  define UNUSED_P(p) (void)p
  ------------------
  227|  11.9k|  UNUSED_P(end);
  ------------------
  |  |  135|  11.9k|#  define UNUSED_P(p) (void)p
  ------------------
  228|  11.9k|  UNUSED_P(enc);
  ------------------
  |  |  135|  11.9k|#  define UNUSED_P(p) (void)p
  ------------------
  229|  11.9k|  switch (tok) {
  ------------------
  |  Branch (229:11): [True: 10, False: 11.9k]
  ------------------
  230|  5.97k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  5.97k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (230:3): [True: 5.97k, False: 5.96k]
  ------------------
  231|  5.97k|    return XML_ROLE_DOCTYPE_NONE;
  232|  5.95k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  5.95k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (232:3): [True: 5.95k, False: 5.98k]
  ------------------
  233|  5.95k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  5.95k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (233:3): [True: 0, False: 11.9k]
  ------------------
  234|  5.95k|    state->handler = doctype1;
  235|  5.95k|    return XML_ROLE_DOCTYPE_NAME;
  236|  11.9k|  }
  237|     10|  return common(state, tok);
  238|  11.9k|}
xmlrole.c:doctype1:
  242|  7.09k|         const ENCODING *enc) {
  243|  7.09k|  switch (tok) {
  ------------------
  |  Branch (243:11): [True: 2, False: 7.09k]
  ------------------
  244|  1.15k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.15k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (244:3): [True: 1.15k, False: 5.93k]
  ------------------
  245|  1.15k|    return XML_ROLE_DOCTYPE_NONE;
  246|  5.12k|  case XML_TOK_OPEN_BRACKET:
  ------------------
  |  |   92|  5.12k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
  |  Branch (246:3): [True: 5.12k, False: 1.97k]
  ------------------
  247|  5.12k|    state->handler = internalSubset;
  248|  5.12k|    return XML_ROLE_DOCTYPE_INTERNAL_SUBSET;
  249|     41|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|     41|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (249:3): [True: 41, False: 7.05k]
  ------------------
  250|     41|    state->handler = prolog2;
  251|     41|    return XML_ROLE_DOCTYPE_CLOSE;
  252|    772|  case XML_TOK_NAME:
  ------------------
  |  |   85|    772|#define XML_TOK_NAME 18
  ------------------
  |  Branch (252:3): [True: 772, False: 6.32k]
  ------------------
  253|    772|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|    772|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 16, False: 756]
  |  |  ------------------
  ------------------
  254|     16|      state->handler = doctype3;
  255|     16|      return XML_ROLE_DOCTYPE_NONE;
  256|     16|    }
  257|    756|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|    756|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 729, False: 27]
  |  |  ------------------
  ------------------
  258|    729|      state->handler = doctype2;
  259|    729|      return XML_ROLE_DOCTYPE_NONE;
  260|    729|    }
  261|     27|    break;
  262|  7.09k|  }
  263|     29|  return common(state, tok);
  264|  7.09k|}
xmlrole.c:internalSubset:
  335|  42.3k|               const ENCODING *enc) {
  336|  42.3k|  switch (tok) {
  ------------------
  |  Branch (336:11): [True: 89, False: 42.2k]
  ------------------
  337|  3.00k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  3.00k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (337:3): [True: 3.00k, False: 39.3k]
  ------------------
  338|  3.00k|    return XML_ROLE_NONE;
  339|  31.5k|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|  31.5k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (339:3): [True: 31.5k, False: 10.8k]
  ------------------
  340|  31.5k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  31.5k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 12.4k, False: 19.1k]
  |  |  ------------------
  ------------------
  341|  31.5k|                            KW_ENTITY)) {
  342|  12.4k|      state->handler = entity0;
  343|  12.4k|      return XML_ROLE_ENTITY_NONE;
  344|  12.4k|    }
  345|  19.1k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  19.1k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 10.1k, False: 8.99k]
  |  |  ------------------
  ------------------
  346|  19.1k|                            KW_ATTLIST)) {
  347|  10.1k|      state->handler = attlist0;
  348|  10.1k|      return XML_ROLE_ATTLIST_NONE;
  349|  10.1k|    }
  350|  8.99k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  8.99k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 5.87k, False: 3.12k]
  |  |  ------------------
  ------------------
  351|  8.99k|                            KW_ELEMENT)) {
  352|  5.87k|      state->handler = element0;
  353|  5.87k|      return XML_ROLE_ELEMENT_NONE;
  354|  5.87k|    }
  355|  3.12k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  3.12k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 3.08k, False: 33]
  |  |  ------------------
  ------------------
  356|  3.12k|                            KW_NOTATION)) {
  357|  3.08k|      state->handler = notation0;
  358|  3.08k|      return XML_ROLE_NOTATION_NONE;
  359|  3.08k|    }
  360|     33|    break;
  361|  2.05k|  case XML_TOK_PI:
  ------------------
  |  |   76|  2.05k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (361:3): [True: 2.05k, False: 40.3k]
  ------------------
  362|  2.05k|    return XML_ROLE_PI;
  363|    194|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    194|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (363:3): [True: 194, False: 42.1k]
  ------------------
  364|    194|    return XML_ROLE_COMMENT;
  365|  3.29k|  case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|  3.29k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (365:3): [True: 3.29k, False: 39.0k]
  ------------------
  366|  3.29k|    return XML_ROLE_PARAM_ENTITY_REF;
  367|  2.21k|  case XML_TOK_CLOSE_BRACKET:
  ------------------
  |  |   93|  2.21k|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
  |  Branch (367:3): [True: 2.21k, False: 40.1k]
  ------------------
  368|  2.21k|    state->handler = doctype5;
  369|  2.21k|    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: 42.3k]
  ------------------
  371|      0|    return XML_ROLE_NONE;
  372|  42.3k|  }
  373|    122|  return common(state, tok);
  374|  42.3k|}
xmlrole.c:entity0:
  417|  24.7k|        const ENCODING *enc) {
  418|  24.7k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  24.7k|#  define UNUSED_P(p) (void)p
  ------------------
  419|  24.7k|  UNUSED_P(end);
  ------------------
  |  |  135|  24.7k|#  define UNUSED_P(p) (void)p
  ------------------
  420|  24.7k|  UNUSED_P(enc);
  ------------------
  |  |  135|  24.7k|#  define UNUSED_P(p) (void)p
  ------------------
  421|  24.7k|  switch (tok) {
  ------------------
  |  Branch (421:11): [True: 8, False: 24.7k]
  ------------------
  422|  12.4k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  12.4k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (422:3): [True: 12.4k, False: 12.3k]
  ------------------
  423|  12.4k|    return XML_ROLE_ENTITY_NONE;
  424|  4.73k|  case XML_TOK_PERCENT:
  ------------------
  |  |   89|  4.73k|#define XML_TOK_PERCENT 22
  ------------------
  |  Branch (424:3): [True: 4.73k, False: 20.0k]
  ------------------
  425|  4.73k|    state->handler = entity1;
  426|  4.73k|    return XML_ROLE_ENTITY_NONE;
  427|  7.64k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  7.64k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (427:3): [True: 7.64k, False: 17.1k]
  ------------------
  428|  7.64k|    state->handler = entity2;
  429|  7.64k|    return XML_ROLE_GENERAL_ENTITY_NAME;
  430|  24.7k|  }
  431|      8|  return common(state, tok);
  432|  24.7k|}
xmlrole.c:entity1:
  436|  9.44k|        const ENCODING *enc) {
  437|  9.44k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  9.44k|#  define UNUSED_P(p) (void)p
  ------------------
  438|  9.44k|  UNUSED_P(end);
  ------------------
  |  |  135|  9.44k|#  define UNUSED_P(p) (void)p
  ------------------
  439|  9.44k|  UNUSED_P(enc);
  ------------------
  |  |  135|  9.44k|#  define UNUSED_P(p) (void)p
  ------------------
  440|  9.44k|  switch (tok) {
  ------------------
  |  Branch (440:11): [True: 40, False: 9.40k]
  ------------------
  441|  4.73k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  4.73k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (441:3): [True: 4.73k, False: 4.71k]
  ------------------
  442|  4.73k|    return XML_ROLE_ENTITY_NONE;
  443|  4.67k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  4.67k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (443:3): [True: 4.67k, False: 4.77k]
  ------------------
  444|  4.67k|    state->handler = entity7;
  445|  4.67k|    return XML_ROLE_PARAM_ENTITY_NAME;
  446|  9.44k|  }
  447|     40|  return common(state, tok);
  448|  9.44k|}
xmlrole.c:entity7:
  544|  9.31k|        const ENCODING *enc) {
  545|  9.31k|  switch (tok) {
  ------------------
  |  Branch (545:11): [True: 10, False: 9.30k]
  ------------------
  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.64k]
  ------------------
  547|  4.67k|    return XML_ROLE_ENTITY_NONE;
  548|  1.98k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.98k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (548:3): [True: 1.98k, False: 7.33k]
  ------------------
  549|  1.98k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  1.98k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 565, False: 1.42k]
  |  |  ------------------
  ------------------
  550|    565|      state->handler = entity9;
  551|    565|      return XML_ROLE_ENTITY_NONE;
  552|    565|    }
  553|  1.42k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|  1.42k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.41k, False: 5]
  |  |  ------------------
  ------------------
  554|  1.41k|      state->handler = entity8;
  555|  1.41k|      return XML_ROLE_ENTITY_NONE;
  556|  1.41k|    }
  557|      5|    break;
  558|  2.65k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  2.65k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (558:3): [True: 2.65k, False: 6.66k]
  ------------------
  559|  2.65k|    state->handler = declClose;
  560|  2.65k|    state->role_none = XML_ROLE_ENTITY_NONE;
  561|  2.65k|    return XML_ROLE_ENTITY_VALUE;
  562|  9.31k|  }
  563|     15|  return common(state, tok);
  564|  9.31k|}
xmlrole.c:entity9:
  584|  3.91k|        const ENCODING *enc) {
  585|  3.91k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.91k|#  define UNUSED_P(p) (void)p
  ------------------
  586|  3.91k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.91k|#  define UNUSED_P(p) (void)p
  ------------------
  587|  3.91k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.91k|#  define UNUSED_P(p) (void)p
  ------------------
  588|  3.91k|  switch (tok) {
  ------------------
  |  Branch (588:11): [True: 11, False: 3.90k]
  ------------------
  589|  1.96k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.96k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (589:3): [True: 1.96k, False: 1.95k]
  ------------------
  590|  1.96k|    return XML_ROLE_ENTITY_NONE;
  591|  1.94k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.94k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (591:3): [True: 1.94k, False: 1.97k]
  ------------------
  592|  1.94k|    state->handler = entity10;
  593|  1.94k|    return XML_ROLE_ENTITY_SYSTEM_ID;
  594|  3.91k|  }
  595|     11|  return common(state, tok);
  596|  3.91k|}
xmlrole.c:entity10:
  600|  3.16k|         const ENCODING *enc) {
  601|  3.16k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.16k|#  define UNUSED_P(p) (void)p
  ------------------
  602|  3.16k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.16k|#  define UNUSED_P(p) (void)p
  ------------------
  603|  3.16k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.16k|#  define UNUSED_P(p) (void)p
  ------------------
  604|  3.16k|  switch (tok) {
  ------------------
  |  Branch (604:11): [True: 2, False: 3.16k]
  ------------------
  605|  1.22k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.22k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (605:3): [True: 1.22k, False: 1.93k]
  ------------------
  606|  1.22k|    return XML_ROLE_ENTITY_NONE;
  607|  1.93k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  1.93k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (607:3): [True: 1.93k, False: 1.23k]
  ------------------
  608|  1.93k|    setTopLevel(state);
  ------------------
  |  |  116|  1.93k|    ((state)->handler                                                          \
  |  |  117|  1.93k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 1.93k, False: 0]
  |  |  ------------------
  ------------------
  609|  1.93k|    return XML_ROLE_ENTITY_COMPLETE;
  610|  3.16k|  }
  611|      2|  return common(state, tok);
  612|  3.16k|}
xmlrole.c:entity8:
  568|  2.82k|        const ENCODING *enc) {
  569|  2.82k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.82k|#  define UNUSED_P(p) (void)p
  ------------------
  570|  2.82k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.82k|#  define UNUSED_P(p) (void)p
  ------------------
  571|  2.82k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.82k|#  define UNUSED_P(p) (void)p
  ------------------
  572|  2.82k|  switch (tok) {
  ------------------
  |  Branch (572:11): [True: 2, False: 2.82k]
  ------------------
  573|  1.41k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.41k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (573:3): [True: 1.41k, False: 1.40k]
  ------------------
  574|  1.41k|    return XML_ROLE_ENTITY_NONE;
  575|  1.40k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.40k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (575:3): [True: 1.40k, False: 1.41k]
  ------------------
  576|  1.40k|    state->handler = entity9;
  577|  1.40k|    return XML_ROLE_ENTITY_PUBLIC_ID;
  578|  2.82k|  }
  579|      2|  return common(state, tok);
  580|  2.82k|}
xmlrole.c:declClose:
 1178|  16.5k|          const ENCODING *enc) {
 1179|  16.5k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  16.5k|#  define UNUSED_P(p) (void)p
  ------------------
 1180|  16.5k|  UNUSED_P(end);
  ------------------
  |  |  135|  16.5k|#  define UNUSED_P(p) (void)p
  ------------------
 1181|  16.5k|  UNUSED_P(enc);
  ------------------
  |  |  135|  16.5k|#  define UNUSED_P(p) (void)p
  ------------------
 1182|  16.5k|  switch (tok) {
  ------------------
  |  Branch (1182:11): [True: 144, False: 16.3k]
  ------------------
 1183|  1.96k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.96k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1183:3): [True: 1.96k, False: 14.5k]
  ------------------
 1184|  1.96k|    return state->role_none;
 1185|  14.4k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  14.4k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (1185:3): [True: 14.4k, False: 2.10k]
  ------------------
 1186|  14.4k|    setTopLevel(state);
  ------------------
  |  |  116|  14.4k|    ((state)->handler                                                          \
  |  |  117|  14.4k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 14.4k, False: 0]
  |  |  ------------------
  ------------------
 1187|  14.4k|    return state->role_none;
 1188|  16.5k|  }
 1189|    144|  return common(state, tok);
 1190|  16.5k|}
xmlrole.c:entity2:
  452|  15.2k|        const ENCODING *enc) {
  453|  15.2k|  switch (tok) {
  ------------------
  |  Branch (453:11): [True: 7, False: 15.2k]
  ------------------
  454|  7.64k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  7.64k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (454:3): [True: 7.64k, False: 7.60k]
  ------------------
  455|  7.64k|    return XML_ROLE_ENTITY_NONE;
  456|  2.31k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  2.31k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (456:3): [True: 2.31k, False: 12.9k]
  ------------------
  457|  2.31k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  2.31k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 930, False: 1.38k]
  |  |  ------------------
  ------------------
  458|    930|      state->handler = entity4;
  459|    930|      return XML_ROLE_ENTITY_NONE;
  460|    930|    }
  461|  1.38k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|  1.38k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.37k, False: 5]
  |  |  ------------------
  ------------------
  462|  1.37k|      state->handler = entity3;
  463|  1.37k|      return XML_ROLE_ENTITY_NONE;
  464|  1.37k|    }
  465|      5|    break;
  466|  5.28k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  5.28k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (466:3): [True: 5.28k, False: 9.96k]
  ------------------
  467|  5.28k|    state->handler = declClose;
  468|  5.28k|    state->role_none = XML_ROLE_ENTITY_NONE;
  469|  5.28k|    return XML_ROLE_ENTITY_VALUE;
  470|  15.2k|  }
  471|     12|  return common(state, tok);
  472|  15.2k|}
xmlrole.c:entity4:
  492|  4.54k|        const ENCODING *enc) {
  493|  4.54k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  4.54k|#  define UNUSED_P(p) (void)p
  ------------------
  494|  4.54k|  UNUSED_P(end);
  ------------------
  |  |  135|  4.54k|#  define UNUSED_P(p) (void)p
  ------------------
  495|  4.54k|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.54k|#  define UNUSED_P(p) (void)p
  ------------------
  496|  4.54k|  switch (tok) {
  ------------------
  |  Branch (496:11): [True: 10, False: 4.53k]
  ------------------
  497|  2.28k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  2.28k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (497:3): [True: 2.28k, False: 2.26k]
  ------------------
  498|  2.28k|    return XML_ROLE_ENTITY_NONE;
  499|  2.25k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  2.25k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (499:3): [True: 2.25k, False: 2.29k]
  ------------------
  500|  2.25k|    state->handler = entity5;
  501|  2.25k|    return XML_ROLE_ENTITY_SYSTEM_ID;
  502|  4.54k|  }
  503|     10|  return common(state, tok);
  504|  4.54k|}
xmlrole.c:entity5:
  508|  3.49k|        const ENCODING *enc) {
  509|  3.49k|  switch (tok) {
  ------------------
  |  Branch (509:11): [True: 1, False: 3.49k]
  ------------------
  510|  1.24k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.24k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (510:3): [True: 1.24k, False: 2.25k]
  ------------------
  511|  1.24k|    return XML_ROLE_ENTITY_NONE;
  512|  1.56k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  1.56k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (512:3): [True: 1.56k, False: 1.92k]
  ------------------
  513|  1.56k|    setTopLevel(state);
  ------------------
  |  |  116|  1.56k|    ((state)->handler                                                          \
  |  |  117|  1.56k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 1.56k, False: 0]
  |  |  ------------------
  ------------------
  514|  1.56k|    return XML_ROLE_ENTITY_COMPLETE;
  515|    680|  case XML_TOK_NAME:
  ------------------
  |  |   85|    680|#define XML_TOK_NAME 18
  ------------------
  |  Branch (515:3): [True: 680, False: 2.81k]
  ------------------
  516|    680|    if (XmlNameMatchesAscii(enc, ptr, end, KW_NDATA)) {
  ------------------
  |  |  255|    680|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 677, False: 3]
  |  |  ------------------
  ------------------
  517|    677|      state->handler = entity6;
  518|    677|      return XML_ROLE_ENTITY_NONE;
  519|    677|    }
  520|      3|    break;
  521|  3.49k|  }
  522|      4|  return common(state, tok);
  523|  3.49k|}
xmlrole.c:entity6:
  527|  1.35k|        const ENCODING *enc) {
  528|  1.35k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.35k|#  define UNUSED_P(p) (void)p
  ------------------
  529|  1.35k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.35k|#  define UNUSED_P(p) (void)p
  ------------------
  530|  1.35k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.35k|#  define UNUSED_P(p) (void)p
  ------------------
  531|  1.35k|  switch (tok) {
  ------------------
  |  Branch (531:11): [True: 4, False: 1.34k]
  ------------------
  532|    676|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    676|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (532:3): [True: 676, False: 674]
  ------------------
  533|    676|    return XML_ROLE_ENTITY_NONE;
  534|    670|  case XML_TOK_NAME:
  ------------------
  |  |   85|    670|#define XML_TOK_NAME 18
  ------------------
  |  Branch (534:3): [True: 670, False: 680]
  ------------------
  535|    670|    state->handler = declClose;
  536|    670|    state->role_none = XML_ROLE_ENTITY_NONE;
  537|    670|    return XML_ROLE_ENTITY_NOTATION_NAME;
  538|  1.35k|  }
  539|      4|  return common(state, tok);
  540|  1.35k|}
xmlrole.c:entity3:
  476|  2.74k|        const ENCODING *enc) {
  477|  2.74k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.74k|#  define UNUSED_P(p) (void)p
  ------------------
  478|  2.74k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.74k|#  define UNUSED_P(p) (void)p
  ------------------
  479|  2.74k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.74k|#  define UNUSED_P(p) (void)p
  ------------------
  480|  2.74k|  switch (tok) {
  ------------------
  |  Branch (480:11): [True: 2, False: 2.74k]
  ------------------
  481|  1.37k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.37k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (481:3): [True: 1.37k, False: 1.37k]
  ------------------
  482|  1.37k|    return XML_ROLE_ENTITY_NONE;
  483|  1.36k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.36k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (483:3): [True: 1.36k, False: 1.37k]
  ------------------
  484|  1.36k|    state->handler = entity4;
  485|  1.36k|    return XML_ROLE_ENTITY_PUBLIC_ID;
  486|  2.74k|  }
  487|      2|  return common(state, tok);
  488|  2.74k|}
xmlrole.c:attlist0:
  705|  20.1k|         const ENCODING *enc) {
  706|  20.1k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  20.1k|#  define UNUSED_P(p) (void)p
  ------------------
  707|  20.1k|  UNUSED_P(end);
  ------------------
  |  |  135|  20.1k|#  define UNUSED_P(p) (void)p
  ------------------
  708|  20.1k|  UNUSED_P(enc);
  ------------------
  |  |  135|  20.1k|#  define UNUSED_P(p) (void)p
  ------------------
  709|  20.1k|  switch (tok) {
  ------------------
  |  Branch (709:11): [True: 16, False: 20.1k]
  ------------------
  710|  10.1k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  10.1k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (710:3): [True: 10.1k, False: 10.0k]
  ------------------
  711|  10.1k|    return XML_ROLE_ATTLIST_NONE;
  712|  10.0k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  10.0k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (712:3): [True: 10.0k, False: 10.1k]
  ------------------
  713|  10.0k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  10.0k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (713:3): [True: 0, False: 20.1k]
  ------------------
  714|  10.0k|    state->handler = attlist1;
  715|  10.0k|    return XML_ROLE_ATTLIST_ELEMENT_NAME;
  716|  20.1k|  }
  717|     16|  return common(state, tok);
  718|  20.1k|}
xmlrole.c:attlist1:
  722|  83.2k|         const ENCODING *enc) {
  723|  83.2k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  83.2k|#  define UNUSED_P(p) (void)p
  ------------------
  724|  83.2k|  UNUSED_P(end);
  ------------------
  |  |  135|  83.2k|#  define UNUSED_P(p) (void)p
  ------------------
  725|  83.2k|  UNUSED_P(enc);
  ------------------
  |  |  135|  83.2k|#  define UNUSED_P(p) (void)p
  ------------------
  726|  83.2k|  switch (tok) {
  ------------------
  |  Branch (726:11): [True: 43, False: 83.2k]
  ------------------
  727|  37.0k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  37.0k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (727:3): [True: 37.0k, False: 46.2k]
  ------------------
  728|  37.0k|    return XML_ROLE_ATTLIST_NONE;
  729|  9.30k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  9.30k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (729:3): [True: 9.30k, False: 73.9k]
  ------------------
  730|  9.30k|    setTopLevel(state);
  ------------------
  |  |  116|  9.30k|    ((state)->handler                                                          \
  |  |  117|  9.30k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 9.30k, False: 0]
  |  |  ------------------
  ------------------
  731|  9.30k|    return XML_ROLE_ATTLIST_NONE;
  732|  36.8k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  36.8k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (732:3): [True: 36.8k, False: 46.4k]
  ------------------
  733|  36.8k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  36.8k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (733:3): [True: 0, False: 83.2k]
  ------------------
  734|  36.8k|    state->handler = attlist2;
  735|  36.8k|    return XML_ROLE_ATTRIBUTE_NAME;
  736|  83.2k|  }
  737|     43|  return common(state, tok);
  738|  83.2k|}
xmlrole.c:attlist2:
  742|  73.6k|         const ENCODING *enc) {
  743|  73.6k|  switch (tok) {
  ------------------
  |  Branch (743:11): [True: 11, False: 73.6k]
  ------------------
  744|  36.8k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  36.8k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (744:3): [True: 36.8k, False: 36.8k]
  ------------------
  745|  36.8k|    return XML_ROLE_ATTLIST_NONE;
  746|  12.3k|  case XML_TOK_NAME: {
  ------------------
  |  |   85|  12.3k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (746:3): [True: 12.3k, False: 61.3k]
  ------------------
  747|  12.3k|    static const char *const types[] = {
  748|  12.3k|        KW_CDATA,  KW_ID,       KW_IDREF,   KW_IDREFS,
  749|  12.3k|        KW_ENTITY, KW_ENTITIES, KW_NMTOKEN, KW_NMTOKENS,
  750|  12.3k|    };
  751|  12.3k|    int i;
  752|  49.2k|    for (i = 0; i < (int)(sizeof(types) / sizeof(types[0])); i++)
  ------------------
  |  Branch (752:17): [True: 47.6k, False: 1.53k]
  ------------------
  753|  47.6k|      if (XmlNameMatchesAscii(enc, ptr, end, types[i])) {
  ------------------
  |  |  255|  47.6k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 10.7k, False: 36.8k]
  |  |  ------------------
  ------------------
  754|  10.7k|        state->handler = attlist8;
  755|  10.7k|        return XML_ROLE_ATTRIBUTE_TYPE_CDATA + i;
  756|  10.7k|      }
  757|  12.3k|  }
  758|  1.53k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_NOTATION)) {
  ------------------
  |  |  255|  1.53k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.48k, False: 52]
  |  |  ------------------
  ------------------
  759|  1.48k|      state->handler = attlist5;
  760|  1.48k|      return XML_ROLE_ATTLIST_NONE;
  761|  1.48k|    }
  762|     52|    break;
  763|  24.4k|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  24.4k|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (763:3): [True: 24.4k, False: 49.1k]
  ------------------
  764|  24.4k|    state->handler = attlist3;
  765|  24.4k|    return XML_ROLE_ATTLIST_NONE;
  766|  73.6k|  }
  767|     63|  return common(state, tok);
  768|  73.6k|}
xmlrole.c:attlist8:
  861|  72.9k|         const ENCODING *enc) {
  862|  72.9k|  switch (tok) {
  ------------------
  |  Branch (862:11): [True: 11, False: 72.9k]
  ------------------
  863|  36.4k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  36.4k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (863:3): [True: 36.4k, False: 36.4k]
  ------------------
  864|  36.4k|    return XML_ROLE_ATTLIST_NONE;
  865|  27.3k|  case XML_TOK_POUND_NAME:
  ------------------
  |  |   87|  27.3k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  |  Branch (865:3): [True: 27.3k, False: 45.6k]
  ------------------
  866|  27.3k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  27.3k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 23.9k, False: 3.38k]
  |  |  ------------------
  ------------------
  867|  27.3k|                            KW_IMPLIED)) {
  868|  23.9k|      state->handler = attlist1;
  869|  23.9k|      return XML_ROLE_IMPLIED_ATTRIBUTE_VALUE;
  870|  23.9k|    }
  871|  3.38k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  3.38k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.59k, False: 1.78k]
  |  |  ------------------
  ------------------
  872|  3.38k|                            KW_REQUIRED)) {
  873|  1.59k|      state->handler = attlist1;
  874|  1.59k|      return XML_ROLE_REQUIRED_ATTRIBUTE_VALUE;
  875|  1.59k|    }
  876|  1.78k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  1.78k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.78k, False: 8]
  |  |  ------------------
  ------------------
  877|  1.78k|                            KW_FIXED)) {
  878|  1.78k|      state->handler = attlist9;
  879|  1.78k|      return XML_ROLE_ATTLIST_NONE;
  880|  1.78k|    }
  881|      8|    break;
  882|  9.12k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  9.12k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (882:3): [True: 9.12k, False: 63.8k]
  ------------------
  883|  9.12k|    state->handler = attlist1;
  884|  9.12k|    return XML_ROLE_DEFAULT_ATTRIBUTE_VALUE;
  885|  72.9k|  }
  886|     19|  return common(state, tok);
  887|  72.9k|}
xmlrole.c:attlist9:
  891|  3.54k|         const ENCODING *enc) {
  892|  3.54k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.54k|#  define UNUSED_P(p) (void)p
  ------------------
  893|  3.54k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.54k|#  define UNUSED_P(p) (void)p
  ------------------
  894|  3.54k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.54k|#  define UNUSED_P(p) (void)p
  ------------------
  895|  3.54k|  switch (tok) {
  ------------------
  |  Branch (895:11): [True: 22, False: 3.52k]
  ------------------
  896|  1.78k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.78k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (896:3): [True: 1.78k, False: 1.76k]
  ------------------
  897|  1.78k|    return XML_ROLE_ATTLIST_NONE;
  898|  1.73k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.73k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (898:3): [True: 1.73k, False: 1.80k]
  ------------------
  899|  1.73k|    state->handler = attlist1;
  900|  1.73k|    return XML_ROLE_FIXED_ATTRIBUTE_VALUE;
  901|  3.54k|  }
  902|     22|  return common(state, tok);
  903|  3.54k|}
xmlrole.c:attlist5:
  809|  2.96k|         const ENCODING *enc) {
  810|  2.96k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.96k|#  define UNUSED_P(p) (void)p
  ------------------
  811|  2.96k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.96k|#  define UNUSED_P(p) (void)p
  ------------------
  812|  2.96k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.96k|#  define UNUSED_P(p) (void)p
  ------------------
  813|  2.96k|  switch (tok) {
  ------------------
  |  Branch (813:11): [True: 2, False: 2.95k]
  ------------------
  814|  1.48k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.48k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (814:3): [True: 1.48k, False: 1.47k]
  ------------------
  815|  1.48k|    return XML_ROLE_ATTLIST_NONE;
  816|  1.47k|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  1.47k|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (816:3): [True: 1.47k, False: 1.48k]
  ------------------
  817|  1.47k|    state->handler = attlist6;
  818|  1.47k|    return XML_ROLE_ATTLIST_NONE;
  819|  2.96k|  }
  820|      2|  return common(state, tok);
  821|  2.96k|}
xmlrole.c:attlist6:
  825|  2.35k|         const ENCODING *enc) {
  826|  2.35k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.35k|#  define UNUSED_P(p) (void)p
  ------------------
  827|  2.35k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.35k|#  define UNUSED_P(p) (void)p
  ------------------
  828|  2.35k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.35k|#  define UNUSED_P(p) (void)p
  ------------------
  829|  2.35k|  switch (tok) {
  ------------------
  |  Branch (829:11): [True: 6, False: 2.34k]
  ------------------
  830|    274|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    274|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (830:3): [True: 274, False: 2.07k]
  ------------------
  831|    274|    return XML_ROLE_ATTLIST_NONE;
  832|  2.07k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  2.07k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (832:3): [True: 2.07k, False: 280]
  ------------------
  833|  2.07k|    state->handler = attlist7;
  834|  2.07k|    return XML_ROLE_ATTRIBUTE_NOTATION_VALUE;
  835|  2.35k|  }
  836|      6|  return common(state, tok);
  837|  2.35k|}
xmlrole.c:attlist7:
  841|  2.35k|         const ENCODING *enc) {
  842|  2.35k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.35k|#  define UNUSED_P(p) (void)p
  ------------------
  843|  2.35k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.35k|#  define UNUSED_P(p) (void)p
  ------------------
  844|  2.35k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.35k|#  define UNUSED_P(p) (void)p
  ------------------
  845|  2.35k|  switch (tok) {
  ------------------
  |  Branch (845:11): [True: 2, False: 2.35k]
  ------------------
  846|    296|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    296|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (846:3): [True: 296, False: 2.06k]
  ------------------
  847|    296|    return XML_ROLE_ATTLIST_NONE;
  848|  1.44k|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|  1.44k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (848:3): [True: 1.44k, False: 919]
  ------------------
  849|  1.44k|    state->handler = attlist8;
  850|  1.44k|    return XML_ROLE_ATTLIST_NONE;
  851|    621|  case XML_TOK_OR:
  ------------------
  |  |   88|    621|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (851:3): [True: 621, False: 1.73k]
  ------------------
  852|    621|    state->handler = attlist6;
  853|    621|    return XML_ROLE_ATTLIST_NONE;
  854|  2.35k|  }
  855|      2|  return common(state, tok);
  856|  2.35k|}
xmlrole.c:attlist3:
  772|  30.5k|         const ENCODING *enc) {
  773|  30.5k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  30.5k|#  define UNUSED_P(p) (void)p
  ------------------
  774|  30.5k|  UNUSED_P(end);
  ------------------
  |  |  135|  30.5k|#  define UNUSED_P(p) (void)p
  ------------------
  775|  30.5k|  UNUSED_P(enc);
  ------------------
  |  |  135|  30.5k|#  define UNUSED_P(p) (void)p
  ------------------
  776|  30.5k|  switch (tok) {
  ------------------
  |  Branch (776:11): [True: 6, False: 30.5k]
  ------------------
  777|    795|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    795|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (777:3): [True: 795, False: 29.7k]
  ------------------
  778|    795|    return XML_ROLE_ATTLIST_NONE;
  779|  4.27k|  case XML_TOK_NMTOKEN:
  ------------------
  |  |   86|  4.27k|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (779:3): [True: 4.27k, False: 26.3k]
  ------------------
  780|  29.7k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  29.7k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (780:3): [True: 25.5k, False: 5.07k]
  ------------------
  781|  29.7k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  29.7k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (781:3): [True: 0, False: 30.5k]
  ------------------
  782|  29.7k|    state->handler = attlist4;
  783|  29.7k|    return XML_ROLE_ATTRIBUTE_ENUM_VALUE;
  784|  30.5k|  }
  785|      6|  return common(state, tok);
  786|  30.5k|}
xmlrole.c:attlist4:
  790|  30.9k|         const ENCODING *enc) {
  791|  30.9k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  30.9k|#  define UNUSED_P(p) (void)p
  ------------------
  792|  30.9k|  UNUSED_P(end);
  ------------------
  |  |  135|  30.9k|#  define UNUSED_P(p) (void)p
  ------------------
  793|  30.9k|  UNUSED_P(enc);
  ------------------
  |  |  135|  30.9k|#  define UNUSED_P(p) (void)p
  ------------------
  794|  30.9k|  switch (tok) {
  ------------------
  |  Branch (794:11): [True: 16, False: 30.8k]
  ------------------
  795|  1.15k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.15k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (795:3): [True: 1.15k, False: 29.7k]
  ------------------
  796|  1.15k|    return XML_ROLE_ATTLIST_NONE;
  797|  24.3k|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|  24.3k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (797:3): [True: 24.3k, False: 6.60k]
  ------------------
  798|  24.3k|    state->handler = attlist8;
  799|  24.3k|    return XML_ROLE_ATTLIST_NONE;
  800|  5.43k|  case XML_TOK_OR:
  ------------------
  |  |   88|  5.43k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (800:3): [True: 5.43k, False: 25.4k]
  ------------------
  801|  5.43k|    state->handler = attlist3;
  802|  5.43k|    return XML_ROLE_ATTLIST_NONE;
  803|  30.9k|  }
  804|     16|  return common(state, tok);
  805|  30.9k|}
xmlrole.c:element0:
  907|  11.7k|         const ENCODING *enc) {
  908|  11.7k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  11.7k|#  define UNUSED_P(p) (void)p
  ------------------
  909|  11.7k|  UNUSED_P(end);
  ------------------
  |  |  135|  11.7k|#  define UNUSED_P(p) (void)p
  ------------------
  910|  11.7k|  UNUSED_P(enc);
  ------------------
  |  |  135|  11.7k|#  define UNUSED_P(p) (void)p
  ------------------
  911|  11.7k|  switch (tok) {
  ------------------
  |  Branch (911:11): [True: 8, False: 11.7k]
  ------------------
  912|  5.87k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  5.87k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (912:3): [True: 5.87k, False: 5.86k]
  ------------------
  913|  5.87k|    return XML_ROLE_ELEMENT_NONE;
  914|  5.85k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  5.85k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (914:3): [True: 5.85k, False: 5.87k]
  ------------------
  915|  5.85k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  5.85k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (915:3): [True: 0, False: 11.7k]
  ------------------
  916|  5.85k|    state->handler = element1;
  917|  5.85k|    return XML_ROLE_ELEMENT_NAME;
  918|  11.7k|  }
  919|      8|  return common(state, tok);
  920|  11.7k|}
xmlrole.c:element1:
  924|  11.7k|         const ENCODING *enc) {
  925|  11.7k|  switch (tok) {
  ------------------
  |  Branch (925:11): [True: 5, False: 11.7k]
  ------------------
  926|  5.85k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  5.85k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (926:3): [True: 5.85k, False: 5.85k]
  ------------------
  927|  5.85k|    return XML_ROLE_ELEMENT_NONE;
  928|    220|  case XML_TOK_NAME:
  ------------------
  |  |   85|    220|#define XML_TOK_NAME 18
  ------------------
  |  Branch (928:3): [True: 220, False: 11.4k]
  ------------------
  929|    220|    if (XmlNameMatchesAscii(enc, ptr, end, KW_EMPTY)) {
  ------------------
  |  |  255|    220|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 18, False: 202]
  |  |  ------------------
  ------------------
  930|     18|      state->handler = declClose;
  931|     18|      state->role_none = XML_ROLE_ELEMENT_NONE;
  932|     18|      return XML_ROLE_CONTENT_EMPTY;
  933|     18|    }
  934|    202|    if (XmlNameMatchesAscii(enc, ptr, end, KW_ANY)) {
  ------------------
  |  |  255|    202|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 196, False: 6]
  |  |  ------------------
  ------------------
  935|    196|      state->handler = declClose;
  936|    196|      state->role_none = XML_ROLE_ELEMENT_NONE;
  937|    196|      return XML_ROLE_CONTENT_ANY;
  938|    196|    }
  939|      6|    break;
  940|  5.62k|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  5.62k|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (940:3): [True: 5.62k, False: 6.07k]
  ------------------
  941|  5.62k|    state->handler = element2;
  942|  5.62k|    state->level = 1;
  943|  5.62k|    return XML_ROLE_GROUP_OPEN;
  944|  11.7k|  }
  945|     11|  return common(state, tok);
  946|  11.7k|}
xmlrole.c:element2:
  950|  6.37k|         const ENCODING *enc) {
  951|  6.37k|  switch (tok) {
  ------------------
  |  Branch (951:11): [True: 1, False: 6.37k]
  ------------------
  952|    756|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    756|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (952:3): [True: 756, False: 5.61k]
  ------------------
  953|    756|    return XML_ROLE_ELEMENT_NONE;
  954|  2.76k|  case XML_TOK_POUND_NAME:
  ------------------
  |  |   87|  2.76k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  |  Branch (954:3): [True: 2.76k, False: 3.60k]
  ------------------
  955|  2.76k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  2.76k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 2.75k, False: 10]
  |  |  ------------------
  ------------------
  956|  2.76k|                            KW_PCDATA)) {
  957|  2.75k|      state->handler = element3;
  958|  2.75k|      return XML_ROLE_CONTENT_PCDATA;
  959|  2.75k|    }
  960|     10|    break;
  961|    408|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|    408|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (961:3): [True: 408, False: 5.96k]
  ------------------
  962|    408|    state->level = 2;
  963|    408|    state->handler = element6;
  964|    408|    return XML_ROLE_GROUP_OPEN;
  965|  1.14k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.14k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (965:3): [True: 1.14k, False: 5.23k]
  ------------------
  966|  1.14k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  1.14k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (966:3): [True: 0, False: 6.37k]
  ------------------
  967|  1.14k|    state->handler = element7;
  968|  1.14k|    return XML_ROLE_CONTENT_ELEMENT;
  969|    816|  case XML_TOK_NAME_QUESTION:
  ------------------
  |  |   99|    816|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
  |  Branch (969:3): [True: 816, False: 5.55k]
  ------------------
  970|    816|    state->handler = element7;
  971|    816|    return XML_ROLE_CONTENT_ELEMENT_OPT;
  972|    248|  case XML_TOK_NAME_ASTERISK:
  ------------------
  |  |  100|    248|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
  |  Branch (972:3): [True: 248, False: 6.12k]
  ------------------
  973|    248|    state->handler = element7;
  974|    248|    return XML_ROLE_CONTENT_ELEMENT_REP;
  975|    238|  case XML_TOK_NAME_PLUS:
  ------------------
  |  |  101|    238|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
  |  Branch (975:3): [True: 238, False: 6.13k]
  ------------------
  976|    238|    state->handler = element7;
  977|    238|    return XML_ROLE_CONTENT_ELEMENT_PLUS;
  978|  6.37k|  }
  979|     11|  return common(state, tok);
  980|  6.37k|}
xmlrole.c:element3:
  984|  3.59k|         const ENCODING *enc) {
  985|  3.59k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.59k|#  define UNUSED_P(p) (void)p
  ------------------
  986|  3.59k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.59k|#  define UNUSED_P(p) (void)p
  ------------------
  987|  3.59k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.59k|#  define UNUSED_P(p) (void)p
  ------------------
  988|  3.59k|  switch (tok) {
  ------------------
  |  Branch (988:11): [True: 10, False: 3.58k]
  ------------------
  989|    840|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    840|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (989:3): [True: 840, False: 2.75k]
  ------------------
  990|    840|    return XML_ROLE_ELEMENT_NONE;
  991|  1.02k|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|  1.02k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (991:3): [True: 1.02k, False: 2.56k]
  ------------------
  992|  1.02k|    state->handler = declClose;
  993|  1.02k|    state->role_none = XML_ROLE_ELEMENT_NONE;
  994|  1.02k|    return XML_ROLE_GROUP_CLOSE;
  995|  1.03k|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|  1.03k|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (995:3): [True: 1.03k, False: 2.55k]
  ------------------
  996|  1.03k|    state->handler = declClose;
  997|  1.03k|    state->role_none = XML_ROLE_ELEMENT_NONE;
  998|  1.03k|    return XML_ROLE_GROUP_CLOSE_REP;
  999|    680|  case XML_TOK_OR:
  ------------------
  |  |   88|    680|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (999:3): [True: 680, False: 2.91k]
  ------------------
 1000|    680|    state->handler = element4;
 1001|    680|    return XML_ROLE_ELEMENT_NONE;
 1002|  3.59k|  }
 1003|     10|  return common(state, tok);
 1004|  3.59k|}
xmlrole.c:element4:
 1008|  1.95k|         const ENCODING *enc) {
 1009|  1.95k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.95k|#  define UNUSED_P(p) (void)p
  ------------------
 1010|  1.95k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.95k|#  define UNUSED_P(p) (void)p
  ------------------
 1011|  1.95k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.95k|#  define UNUSED_P(p) (void)p
  ------------------
 1012|  1.95k|  switch (tok) {
  ------------------
  |  Branch (1012:11): [True: 18, False: 1.93k]
  ------------------
 1013|    278|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    278|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1013:3): [True: 278, False: 1.67k]
  ------------------
 1014|    278|    return XML_ROLE_ELEMENT_NONE;
 1015|  1.65k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.65k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1015:3): [True: 1.65k, False: 296]
  ------------------
 1016|  1.65k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  1.65k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1016:3): [True: 0, False: 1.95k]
  ------------------
 1017|  1.65k|    state->handler = element5;
 1018|  1.65k|    return XML_ROLE_CONTENT_ELEMENT;
 1019|  1.95k|  }
 1020|     18|  return common(state, tok);
 1021|  1.95k|}
xmlrole.c:element5:
 1025|  1.97k|         const ENCODING *enc) {
 1026|  1.97k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.97k|#  define UNUSED_P(p) (void)p
  ------------------
 1027|  1.97k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.97k|#  define UNUSED_P(p) (void)p
  ------------------
 1028|  1.97k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.97k|#  define UNUSED_P(p) (void)p
  ------------------
 1029|  1.97k|  switch (tok) {
  ------------------
  |  Branch (1029:11): [True: 2, False: 1.97k]
  ------------------
 1030|    321|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    321|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1030:3): [True: 321, False: 1.65k]
  ------------------
 1031|    321|    return XML_ROLE_ELEMENT_NONE;
 1032|    628|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|    628|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (1032:3): [True: 628, False: 1.34k]
  ------------------
 1033|    628|    state->handler = declClose;
 1034|    628|    state->role_none = XML_ROLE_ELEMENT_NONE;
 1035|    628|    return XML_ROLE_GROUP_CLOSE_REP;
 1036|  1.02k|  case XML_TOK_OR:
  ------------------
  |  |   88|  1.02k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (1036:3): [True: 1.02k, False: 951]
  ------------------
 1037|  1.02k|    state->handler = element4;
 1038|  1.02k|    return XML_ROLE_ELEMENT_NONE;
 1039|  1.97k|  }
 1040|      2|  return common(state, tok);
 1041|  1.97k|}
xmlrole.c:element6:
 1045|  4.12M|         const ENCODING *enc) {
 1046|  4.12M|  UNUSED_P(ptr);
  ------------------
  |  |  135|  4.12M|#  define UNUSED_P(p) (void)p
  ------------------
 1047|  4.12M|  UNUSED_P(end);
  ------------------
  |  |  135|  4.12M|#  define UNUSED_P(p) (void)p
  ------------------
 1048|  4.12M|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.12M|#  define UNUSED_P(p) (void)p
  ------------------
 1049|  4.12M|  switch (tok) {
  ------------------
  |  Branch (1049:11): [True: 51, False: 4.12M]
  ------------------
 1050|  7.08k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  7.08k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1050:3): [True: 7.08k, False: 4.11M]
  ------------------
 1051|  7.08k|    return XML_ROLE_ELEMENT_NONE;
 1052|  4.09M|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  4.09M|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (1052:3): [True: 4.09M, False: 34.2k]
  ------------------
 1053|  4.09M|    state->level += 1;
 1054|  4.09M|    return XML_ROLE_GROUP_OPEN;
 1055|  21.2k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  21.2k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1055:3): [True: 21.2k, False: 4.10M]
  ------------------
 1056|  21.2k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  21.2k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1056:3): [True: 0, False: 4.12M]
  ------------------
 1057|  21.2k|    state->handler = element7;
 1058|  21.2k|    return XML_ROLE_CONTENT_ELEMENT;
 1059|  1.01k|  case XML_TOK_NAME_QUESTION:
  ------------------
  |  |   99|  1.01k|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
  |  Branch (1059:3): [True: 1.01k, False: 4.12M]
  ------------------
 1060|  1.01k|    state->handler = element7;
 1061|  1.01k|    return XML_ROLE_CONTENT_ELEMENT_OPT;
 1062|    976|  case XML_TOK_NAME_ASTERISK:
  ------------------
  |  |  100|    976|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
  |  Branch (1062:3): [True: 976, False: 4.12M]
  ------------------
 1063|    976|    state->handler = element7;
 1064|    976|    return XML_ROLE_CONTENT_ELEMENT_REP;
 1065|  3.88k|  case XML_TOK_NAME_PLUS:
  ------------------
  |  |  101|  3.88k|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
  |  Branch (1065:3): [True: 3.88k, False: 4.12M]
  ------------------
 1066|  3.88k|    state->handler = element7;
 1067|  3.88k|    return XML_ROLE_CONTENT_ELEMENT_PLUS;
 1068|  4.12M|  }
 1069|     51|  return common(state, tok);
 1070|  4.12M|}
xmlrole.c:element7:
 1074|  68.5k|         const ENCODING *enc) {
 1075|  68.5k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  68.5k|#  define UNUSED_P(p) (void)p
  ------------------
 1076|  68.5k|  UNUSED_P(end);
  ------------------
  |  |  135|  68.5k|#  define UNUSED_P(p) (void)p
  ------------------
 1077|  68.5k|  UNUSED_P(enc);
  ------------------
  |  |  135|  68.5k|#  define UNUSED_P(p) (void)p
  ------------------
 1078|  68.5k|  switch (tok) {
  ------------------
  |  Branch (1078:11): [True: 64, False: 68.4k]
  ------------------
 1079|  4.87k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  4.87k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1079:3): [True: 4.87k, False: 63.6k]
  ------------------
 1080|  4.87k|    return XML_ROLE_ELEMENT_NONE;
 1081|  24.2k|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|  24.2k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (1081:3): [True: 24.2k, False: 44.2k]
  ------------------
 1082|  24.2k|    state->level -= 1;
 1083|  24.2k|    if (state->level == 0) {
  ------------------
  |  Branch (1083:9): [True: 1.52k, False: 22.7k]
  ------------------
 1084|  1.52k|      state->handler = declClose;
 1085|  1.52k|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1086|  1.52k|    }
 1087|  24.2k|    return XML_ROLE_GROUP_CLOSE;
 1088|  3.57k|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|  3.57k|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (1088:3): [True: 3.57k, False: 64.9k]
  ------------------
 1089|  3.57k|    state->level -= 1;
 1090|  3.57k|    if (state->level == 0) {
  ------------------
  |  Branch (1090:9): [True: 193, False: 3.38k]
  ------------------
 1091|    193|      state->handler = declClose;
 1092|    193|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1093|    193|    }
 1094|  3.57k|    return XML_ROLE_GROUP_CLOSE_REP;
 1095|  3.73k|  case XML_TOK_CLOSE_PAREN_QUESTION:
  ------------------
  |  |  104|  3.73k|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
  |  Branch (1095:3): [True: 3.73k, False: 64.8k]
  ------------------
 1096|  3.73k|    state->level -= 1;
 1097|  3.73k|    if (state->level == 0) {
  ------------------
  |  Branch (1097:9): [True: 371, False: 3.36k]
  ------------------
 1098|    371|      state->handler = declClose;
 1099|    371|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1100|    371|    }
 1101|  3.73k|    return XML_ROLE_GROUP_CLOSE_OPT;
 1102|  5.14k|  case XML_TOK_CLOSE_PAREN_PLUS:
  ------------------
  |  |  106|  5.14k|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
  |  Branch (1102:3): [True: 5.14k, False: 63.4k]
  ------------------
 1103|  5.14k|    state->level -= 1;
 1104|  5.14k|    if (state->level == 0) {
  ------------------
  |  Branch (1104:9): [True: 346, False: 4.79k]
  ------------------
 1105|    346|      state->handler = declClose;
 1106|    346|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1107|    346|    }
 1108|  5.14k|    return XML_ROLE_GROUP_CLOSE_PLUS;
 1109|  11.6k|  case XML_TOK_COMMA:
  ------------------
  |  |  107|  11.6k|#define XML_TOK_COMMA 38
  ------------------
  |  Branch (1109:3): [True: 11.6k, False: 56.9k]
  ------------------
 1110|  11.6k|    state->handler = element6;
 1111|  11.6k|    return XML_ROLE_GROUP_SEQUENCE;
 1112|  15.2k|  case XML_TOK_OR:
  ------------------
  |  |   88|  15.2k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (1112:3): [True: 15.2k, False: 53.3k]
  ------------------
 1113|  15.2k|    state->handler = element6;
 1114|  15.2k|    return XML_ROLE_GROUP_CHOICE;
 1115|  68.5k|  }
 1116|     64|  return common(state, tok);
 1117|  68.5k|}
xmlrole.c:notation0:
  616|  6.15k|          const ENCODING *enc) {
  617|  6.15k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  6.15k|#  define UNUSED_P(p) (void)p
  ------------------
  618|  6.15k|  UNUSED_P(end);
  ------------------
  |  |  135|  6.15k|#  define UNUSED_P(p) (void)p
  ------------------
  619|  6.15k|  UNUSED_P(enc);
  ------------------
  |  |  135|  6.15k|#  define UNUSED_P(p) (void)p
  ------------------
  620|  6.15k|  switch (tok) {
  ------------------
  |  Branch (620:11): [True: 2, False: 6.15k]
  ------------------
  621|  3.08k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  3.08k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (621:3): [True: 3.08k, False: 3.07k]
  ------------------
  622|  3.08k|    return XML_ROLE_NOTATION_NONE;
  623|  3.06k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  3.06k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (623:3): [True: 3.06k, False: 3.08k]
  ------------------
  624|  3.06k|    state->handler = notation1;
  625|  3.06k|    return XML_ROLE_NOTATION_NAME;
  626|  6.15k|  }
  627|      2|  return common(state, tok);
  628|  6.15k|}
xmlrole.c:notation1:
  632|  6.13k|          const ENCODING *enc) {
  633|  6.13k|  switch (tok) {
  ------------------
  |  Branch (633:11): [True: 3, False: 6.12k]
  ------------------
  634|  3.06k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  3.06k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (634:3): [True: 3.06k, False: 3.06k]
  ------------------
  635|  3.06k|    return XML_ROLE_NOTATION_NONE;
  636|  3.05k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  3.05k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (636:3): [True: 3.05k, False: 3.07k]
  ------------------
  637|  3.05k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  3.05k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 271, False: 2.78k]
  |  |  ------------------
  ------------------
  638|    271|      state->handler = notation3;
  639|    271|      return XML_ROLE_NOTATION_NONE;
  640|    271|    }
  641|  2.78k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|  2.78k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 2.78k, False: 4]
  |  |  ------------------
  ------------------
  642|  2.78k|      state->handler = notation2;
  643|  2.78k|      return XML_ROLE_NOTATION_NONE;
  644|  2.78k|    }
  645|      4|    break;
  646|  6.13k|  }
  647|      7|  return common(state, tok);
  648|  6.13k|}
xmlrole.c:notation3:
  668|    538|          const ENCODING *enc) {
  669|    538|  UNUSED_P(ptr);
  ------------------
  |  |  135|    538|#  define UNUSED_P(p) (void)p
  ------------------
  670|    538|  UNUSED_P(end);
  ------------------
  |  |  135|    538|#  define UNUSED_P(p) (void)p
  ------------------
  671|    538|  UNUSED_P(enc);
  ------------------
  |  |  135|    538|#  define UNUSED_P(p) (void)p
  ------------------
  672|    538|  switch (tok) {
  ------------------
  |  Branch (672:11): [True: 2, False: 536]
  ------------------
  673|    270|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    270|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (673:3): [True: 270, False: 268]
  ------------------
  674|    270|    return XML_ROLE_NOTATION_NONE;
  675|    266|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    266|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (675:3): [True: 266, False: 272]
  ------------------
  676|    266|    state->handler = declClose;
  677|    266|    state->role_none = XML_ROLE_NOTATION_NONE;
  678|    266|    return XML_ROLE_NOTATION_SYSTEM_ID;
  679|    538|  }
  680|      2|  return common(state, tok);
  681|    538|}
xmlrole.c:notation2:
  652|  5.56k|          const ENCODING *enc) {
  653|  5.56k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  5.56k|#  define UNUSED_P(p) (void)p
  ------------------
  654|  5.56k|  UNUSED_P(end);
  ------------------
  |  |  135|  5.56k|#  define UNUSED_P(p) (void)p
  ------------------
  655|  5.56k|  UNUSED_P(enc);
  ------------------
  |  |  135|  5.56k|#  define UNUSED_P(p) (void)p
  ------------------
  656|  5.56k|  switch (tok) {
  ------------------
  |  Branch (656:11): [True: 6, False: 5.55k]
  ------------------
  657|  2.78k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  2.78k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (657:3): [True: 2.78k, False: 2.78k]
  ------------------
  658|  2.78k|    return XML_ROLE_NOTATION_NONE;
  659|  2.77k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  2.77k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (659:3): [True: 2.77k, False: 2.78k]
  ------------------
  660|  2.77k|    state->handler = notation4;
  661|  2.77k|    return XML_ROLE_NOTATION_PUBLIC_ID;
  662|  5.56k|  }
  663|      6|  return common(state, tok);
  664|  5.56k|}
xmlrole.c:notation4:
  685|  4.46k|          const ENCODING *enc) {
  686|  4.46k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  4.46k|#  define UNUSED_P(p) (void)p
  ------------------
  687|  4.46k|  UNUSED_P(end);
  ------------------
  |  |  135|  4.46k|#  define UNUSED_P(p) (void)p
  ------------------
  688|  4.46k|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.46k|#  define UNUSED_P(p) (void)p
  ------------------
  689|  4.46k|  switch (tok) {
  ------------------
  |  Branch (689:11): [True: 3, False: 4.46k]
  ------------------
  690|  1.70k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.70k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (690:3): [True: 1.70k, False: 2.76k]
  ------------------
  691|  1.70k|    return XML_ROLE_NOTATION_NONE;
  692|    605|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    605|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (692:3): [True: 605, False: 3.86k]
  ------------------
  693|    605|    state->handler = declClose;
  694|    605|    state->role_none = XML_ROLE_NOTATION_NONE;
  695|    605|    return XML_ROLE_NOTATION_SYSTEM_ID;
  696|  2.15k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  2.15k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (696:3): [True: 2.15k, False: 2.30k]
  ------------------
  697|  2.15k|    setTopLevel(state);
  ------------------
  |  |  116|  2.15k|    ((state)->handler                                                          \
  |  |  117|  2.15k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 2.15k, False: 0]
  |  |  ------------------
  ------------------
  698|  2.15k|    return XML_ROLE_NOTATION_NO_SYSTEM_ID;
  699|  4.46k|  }
  700|      3|  return common(state, tok);
  701|  4.46k|}
xmlrole.c:doctype5:
  319|  2.25k|         const ENCODING *enc) {
  320|  2.25k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.25k|#  define UNUSED_P(p) (void)p
  ------------------
  321|  2.25k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.25k|#  define UNUSED_P(p) (void)p
  ------------------
  322|  2.25k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.25k|#  define UNUSED_P(p) (void)p
  ------------------
  323|  2.25k|  switch (tok) {
  ------------------
  |  Branch (323:11): [True: 7, False: 2.24k]
  ------------------
  324|     42|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|     42|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (324:3): [True: 42, False: 2.20k]
  ------------------
  325|     42|    return XML_ROLE_DOCTYPE_NONE;
  326|  2.20k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  2.20k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (326:3): [True: 2.20k, False: 49]
  ------------------
  327|  2.20k|    state->handler = prolog2;
  328|  2.20k|    return XML_ROLE_DOCTYPE_CLOSE;
  329|  2.25k|  }
  330|      7|  return common(state, tok);
  331|  2.25k|}
xmlrole.c:prolog2:
  205|  3.22k|        const ENCODING *enc) {
  206|  3.22k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.22k|#  define UNUSED_P(p) (void)p
  ------------------
  207|  3.22k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.22k|#  define UNUSED_P(p) (void)p
  ------------------
  208|  3.22k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.22k|#  define UNUSED_P(p) (void)p
  ------------------
  209|  3.22k|  switch (tok) {
  ------------------
  |  Branch (209:11): [True: 21, False: 3.20k]
  ------------------
  210|    395|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    395|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (210:3): [True: 395, False: 2.83k]
  ------------------
  211|    395|    return XML_ROLE_NONE;
  212|    295|  case XML_TOK_PI:
  ------------------
  |  |   76|    295|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (212:3): [True: 295, False: 2.93k]
  ------------------
  213|    295|    return XML_ROLE_PI;
  214|    322|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    322|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (214:3): [True: 322, False: 2.90k]
  ------------------
  215|    322|    return XML_ROLE_COMMENT;
  216|  2.19k|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|  2.19k|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (216:3): [True: 2.19k, False: 1.03k]
  ------------------
  217|  2.19k|    state->handler = error;
  218|  2.19k|    return XML_ROLE_INSTANCE_START;
  219|  3.22k|  }
  220|     21|  return common(state, tok);
  221|  3.22k|}
xmlrole.c:doctype3:
  284|    552|         const ENCODING *enc) {
  285|    552|  UNUSED_P(ptr);
  ------------------
  |  |  135|    552|#  define UNUSED_P(p) (void)p
  ------------------
  286|    552|  UNUSED_P(end);
  ------------------
  |  |  135|    552|#  define UNUSED_P(p) (void)p
  ------------------
  287|    552|  UNUSED_P(enc);
  ------------------
  |  |  135|    552|#  define UNUSED_P(p) (void)p
  ------------------
  288|    552|  switch (tok) {
  ------------------
  |  Branch (288:11): [True: 81, False: 471]
  ------------------
  289|    428|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    428|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (289:3): [True: 428, False: 124]
  ------------------
  290|    428|    return XML_ROLE_DOCTYPE_NONE;
  291|     43|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|     43|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (291:3): [True: 43, False: 509]
  ------------------
  292|     43|    state->handler = doctype4;
  293|     43|    return XML_ROLE_DOCTYPE_SYSTEM_ID;
  294|    552|  }
  295|     81|  return common(state, tok);
  296|    552|}
xmlrole.c:doctype4:
  300|     51|         const ENCODING *enc) {
  301|     51|  UNUSED_P(ptr);
  ------------------
  |  |  135|     51|#  define UNUSED_P(p) (void)p
  ------------------
  302|     51|  UNUSED_P(end);
  ------------------
  |  |  135|     51|#  define UNUSED_P(p) (void)p
  ------------------
  303|     51|  UNUSED_P(enc);
  ------------------
  |  |  135|     51|#  define UNUSED_P(p) (void)p
  ------------------
  304|     51|  switch (tok) {
  ------------------
  |  Branch (304:11): [True: 9, False: 42]
  ------------------
  305|     26|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|     26|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (305:3): [True: 26, False: 25]
  ------------------
  306|     26|    return XML_ROLE_DOCTYPE_NONE;
  307|     12|  case XML_TOK_OPEN_BRACKET:
  ------------------
  |  |   92|     12|#define XML_TOK_OPEN_BRACKET 25
  ------------------
  |  Branch (307:3): [True: 12, False: 39]
  ------------------
  308|     12|    state->handler = internalSubset;
  309|     12|    return XML_ROLE_DOCTYPE_INTERNAL_SUBSET;
  310|      4|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|      4|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (310:3): [True: 4, False: 47]
  ------------------
  311|      4|    state->handler = prolog2;
  312|      4|    return XML_ROLE_DOCTYPE_CLOSE;
  313|     51|  }
  314|      9|  return common(state, tok);
  315|     51|}
xmlrole.c:doctype2:
  268|  1.45k|         const ENCODING *enc) {
  269|  1.45k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.45k|#  define UNUSED_P(p) (void)p
  ------------------
  270|  1.45k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.45k|#  define UNUSED_P(p) (void)p
  ------------------
  271|  1.45k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.45k|#  define UNUSED_P(p) (void)p
  ------------------
  272|  1.45k|  switch (tok) {
  ------------------
  |  Branch (272:11): [True: 9, False: 1.44k]
  ------------------
  273|    728|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    728|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (273:3): [True: 728, False: 725]
  ------------------
  274|    728|    return XML_ROLE_DOCTYPE_NONE;
  275|    716|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    716|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (275:3): [True: 716, False: 737]
  ------------------
  276|    716|    state->handler = doctype3;
  277|    716|    return XML_ROLE_DOCTYPE_PUBLIC_ID;
  278|  1.45k|  }
  279|      9|  return common(state, tok);
  280|  1.45k|}
xmlrole.c:common:
 1225|  1.34k|common(PROLOG_STATE *state, int tok) {
 1226|  1.34k|#ifdef XML_DTD
 1227|  1.34k|  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.34k]
  |  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.34k|  state->handler = error;
 1233|  1.34k|  return XML_ROLE_ERROR;
 1234|  1.34k|}

_INTERNAL_trim_to_complete_utf8_characters:
  327|  20.3M|                                           const char **fromLimRef) {
  328|  20.3M|  const char *fromLim = *fromLimRef;
  329|  20.3M|  size_t walked = 0;
  330|  30.7M|  for (; fromLim > from; fromLim--, walked++) {
  ------------------
  |  Branch (330:10): [True: 30.7M, False: 6.07k]
  ------------------
  331|  30.7M|    const unsigned char prev = (unsigned char)fromLim[-1];
  332|  30.7M|    if ((prev & 0xf8u)
  ------------------
  |  Branch (332:9): [True: 773k, False: 29.9M]
  ------------------
  333|  30.7M|        == 0xf0u) { /* 4-byte character, lead by 0b11110xxx byte */
  334|   773k|      if (walked + 1 >= 4) {
  ------------------
  |  Branch (334:11): [True: 773k, False: 255]
  ------------------
  335|   773k|        fromLim += 4 - 1;
  336|   773k|        break;
  337|   773k|      } else {
  338|    255|        walked = 0;
  339|    255|      }
  340|  29.9M|    } else if ((prev & 0xf0u)
  ------------------
  |  Branch (340:16): [True: 3.93M, False: 26.0M]
  ------------------
  341|  29.9M|               == 0xe0u) { /* 3-byte character, lead by 0b1110xxxx byte */
  342|  3.93M|      if (walked + 1 >= 3) {
  ------------------
  |  Branch (342:11): [True: 3.92M, False: 906]
  ------------------
  343|  3.92M|        fromLim += 3 - 1;
  344|  3.92M|        break;
  345|  3.92M|      } else {
  346|    906|        walked = 0;
  347|    906|      }
  348|  26.0M|    } else if ((prev & 0xe0u)
  ------------------
  |  Branch (348:16): [True: 264k, False: 25.7M]
  ------------------
  349|  26.0M|               == 0xc0u) { /* 2-byte character, lead by 0b110xxxxx byte */
  350|   264k|      if (walked + 1 >= 2) {
  ------------------
  |  Branch (350:11): [True: 263k, False: 206]
  ------------------
  351|   263k|        fromLim += 2 - 1;
  352|   263k|        break;
  353|   263k|      } else {
  354|    206|        walked = 0;
  355|    206|      }
  356|  25.7M|    } else if ((prev & 0x80u)
  ------------------
  |  Branch (356:16): [True: 15.3M, False: 10.4M]
  ------------------
  357|  25.7M|               == 0x00u) { /* 1-byte character, matching 0b0xxxxxxx */
  358|  15.3M|      break;
  359|  15.3M|    }
  360|  30.7M|  }
  361|  20.3M|  *fromLimRef = fromLim;
  362|  20.3M|}
XmlUtf8Encode:
 1255|  10.6k|XmlUtf8Encode(int c, char *buf) {
 1256|  10.6k|  enum {
 1257|       |    /* minN is minimum legal resulting value for N byte sequence */
 1258|  10.6k|    min2 = 0x80,
 1259|  10.6k|    min3 = 0x800,
 1260|  10.6k|    min4 = 0x10000
 1261|  10.6k|  };
 1262|       |
 1263|  10.6k|  if (c < 0)
  ------------------
  |  Branch (1263:7): [True: 0, False: 10.6k]
  ------------------
 1264|      0|    return 0; /* LCOV_EXCL_LINE: this case is always eliminated beforehand */
 1265|  10.6k|  if (c < min2) {
  ------------------
  |  Branch (1265:7): [True: 4.01k, False: 6.65k]
  ------------------
 1266|  4.01k|    buf[0] = (char)(c | UTF8_cval1);
 1267|  4.01k|    return 1;
 1268|  4.01k|  }
 1269|  6.65k|  if (c < min3) {
  ------------------
  |  Branch (1269:7): [True: 1.95k, False: 4.69k]
  ------------------
 1270|  1.95k|    buf[0] = (char)((c >> 6) | UTF8_cval2);
 1271|  1.95k|    buf[1] = (char)((c & 0x3f) | 0x80);
 1272|  1.95k|    return 2;
 1273|  1.95k|  }
 1274|  4.69k|  if (c < min4) {
  ------------------
  |  Branch (1274:7): [True: 2.66k, False: 2.03k]
  ------------------
 1275|  2.66k|    buf[0] = (char)((c >> 12) | UTF8_cval3);
 1276|  2.66k|    buf[1] = (char)(((c >> 6) & 0x3f) | 0x80);
 1277|  2.66k|    buf[2] = (char)((c & 0x3f) | 0x80);
 1278|  2.66k|    return 3;
 1279|  2.66k|  }
 1280|  2.03k|  if (c < 0x110000) {
  ------------------
  |  Branch (1280:7): [True: 2.03k, False: 0]
  ------------------
 1281|  2.03k|    buf[0] = (char)((c >> 18) | UTF8_cval4);
 1282|  2.03k|    buf[1] = (char)(((c >> 12) & 0x3f) | 0x80);
 1283|  2.03k|    buf[2] = (char)(((c >> 6) & 0x3f) | 0x80);
 1284|  2.03k|    buf[3] = (char)((c & 0x3f) | 0x80);
 1285|  2.03k|    return 4;
 1286|  2.03k|  }
 1287|      0|  return 0; /* LCOV_EXCL_LINE: this case too is eliminated before calling */
 1288|  2.03k|}
xmltok.c:checkCharRefNumber:
 1231|  18.1k|checkCharRefNumber(int result) {
 1232|  18.1k|  switch (result >> 8) {
  ------------------
  |  Branch (1232:11): [True: 8.85k, False: 9.29k]
  ------------------
 1233|      3|  case 0xD8:
  ------------------
  |  Branch (1233:3): [True: 3, False: 18.1k]
  ------------------
 1234|      6|  case 0xD9:
  ------------------
  |  Branch (1234:3): [True: 3, False: 18.1k]
  ------------------
 1235|     10|  case 0xDA:
  ------------------
  |  Branch (1235:3): [True: 4, False: 18.1k]
  ------------------
 1236|     14|  case 0xDB:
  ------------------
  |  Branch (1236:3): [True: 4, False: 18.1k]
  ------------------
 1237|     19|  case 0xDC:
  ------------------
  |  Branch (1237:3): [True: 5, False: 18.1k]
  ------------------
 1238|     26|  case 0xDD:
  ------------------
  |  Branch (1238:3): [True: 7, False: 18.1k]
  ------------------
 1239|     29|  case 0xDE:
  ------------------
  |  Branch (1239:3): [True: 3, False: 18.1k]
  ------------------
 1240|     34|  case 0xDF:
  ------------------
  |  Branch (1240:3): [True: 5, False: 18.1k]
  ------------------
 1241|     34|    return -1;
 1242|  8.31k|  case 0:
  ------------------
  |  Branch (1242:3): [True: 8.31k, False: 9.83k]
  ------------------
 1243|  8.31k|    if (latin1_encoding.type[result] == BT_NONXML)
  ------------------
  |  Branch (1243:9): [True: 118, False: 8.19k]
  ------------------
 1244|    118|      return -1;
 1245|  8.19k|    break;
 1246|  8.19k|  case 0xFF:
  ------------------
  |  Branch (1246:3): [True: 946, False: 17.2k]
  ------------------
 1247|    946|    if (result == 0xFFFE || result == 0xFFFF)
  ------------------
  |  Branch (1247:9): [True: 3, False: 943]
  |  Branch (1247:29): [True: 9, False: 934]
  ------------------
 1248|     12|      return -1;
 1249|    934|    break;
 1250|  18.1k|  }
 1251|  17.9k|  return result;
 1252|  18.1k|}
xmltok.c:utf8_toUtf8:
  366|  20.3M|            char **toP, const char *toLim) {
  367|  20.3M|  bool input_incomplete = false;
  368|  20.3M|  bool output_exhausted = false;
  369|       |
  370|       |  /* Avoid copying partial characters (due to limited space). */
  371|  20.3M|  const ptrdiff_t bytesAvailable = fromLim - *fromP;
  372|  20.3M|  const ptrdiff_t bytesStorable = toLim - *toP;
  373|  20.3M|  UNUSED_P(enc);
  ------------------
  |  |  135|  20.3M|#  define UNUSED_P(p) (void)p
  ------------------
  374|  20.3M|  if (bytesAvailable > bytesStorable) {
  ------------------
  |  Branch (374:7): [True: 11.9k, False: 20.3M]
  ------------------
  375|  11.9k|    fromLim = *fromP + bytesStorable;
  376|  11.9k|    output_exhausted = true;
  377|  11.9k|  }
  378|       |
  379|       |  /* Avoid copying partial characters (from incomplete input). */
  380|  20.3M|  {
  381|  20.3M|    const char *const fromLimBefore = fromLim;
  382|  20.3M|    _INTERNAL_trim_to_complete_utf8_characters(*fromP, &fromLim);
  383|  20.3M|    if (fromLim < fromLimBefore) {
  ------------------
  |  Branch (383:9): [True: 1.36k, False: 20.3M]
  ------------------
  384|  1.36k|      input_incomplete = true;
  385|  1.36k|    }
  386|  20.3M|  }
  387|       |
  388|  20.3M|  {
  389|  20.3M|    const ptrdiff_t bytesToCopy = fromLim - *fromP;
  390|  20.3M|    memcpy(*toP, *fromP, bytesToCopy);
  391|  20.3M|    *fromP += bytesToCopy;
  392|  20.3M|    *toP += bytesToCopy;
  393|  20.3M|  }
  394|       |
  395|  20.3M|  if (output_exhausted) /* needs to go first */
  ------------------
  |  Branch (395:7): [True: 11.9k, False: 20.3M]
  ------------------
  396|  11.9k|    return XML_CONVERT_OUTPUT_EXHAUSTED;
  397|  20.3M|  else if (input_incomplete)
  ------------------
  |  Branch (397:12): [True: 0, False: 20.3M]
  ------------------
  398|      0|    return XML_CONVERT_INPUT_INCOMPLETE;
  399|  20.3M|  else
  400|  20.3M|    return XML_CONVERT_COMPLETED;
  401|  20.3M|}
xmltok.c:utf8_isName2:
  140|   271k|utf8_isName2(const ENCODING *enc, const char *p) {
  141|   271k|  UNUSED_P(enc);
  ------------------
  |  |  135|   271k|#  define UNUSED_P(p) (void)p
  ------------------
  142|   271k|  return UTF8_GET_NAMING2(namePages, (const unsigned char *)p);
  ------------------
  |  |   86|   271k|  (namingBitmap[((pages)[(((byte)[0]) >> 2) & 7] << 3)                         \
  |  |   87|   271k|                + ((((byte)[0]) & 3) << 1) + ((((byte)[1]) >> 5) & 1)]         \
  |  |   88|   271k|   & (1u << (((byte)[1]) & 0x1F)))
  ------------------
  143|   271k|}
xmltok.c:utf8_isName3:
  146|  1.01M|utf8_isName3(const ENCODING *enc, const char *p) {
  147|  1.01M|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.01M|#  define UNUSED_P(p) (void)p
  ------------------
  148|  1.01M|  return UTF8_GET_NAMING3(namePages, (const unsigned char *)p);
  ------------------
  |  |   96|  1.01M|  (namingBitmap                                                                \
  |  |   97|  1.01M|       [((pages)[((((byte)[0]) & 0xF) << 4) + ((((byte)[1]) >> 2) & 0xF)]      \
  |  |   98|  1.01M|         << 3)                                                                 \
  |  |   99|  1.01M|        + ((((byte)[1]) & 3) << 1) + ((((byte)[2]) >> 5) & 1)]                 \
  |  |  100|  1.01M|   & (1u << (((byte)[2]) & 0x1F)))
  ------------------
  149|  1.01M|}
xmltok.c:isNever:
  133|    118|isNever(const ENCODING *enc, const char *p) {
  134|    118|  UNUSED_P(enc);
  ------------------
  |  |  135|    118|#  define UNUSED_P(p) (void)p
  ------------------
  135|    118|  UNUSED_P(p);
  ------------------
  |  |  135|    118|#  define UNUSED_P(p) (void)p
  ------------------
  136|    118|  return 0;
  137|    118|}
xmltok.c:utf8_isNmstrt2:
  154|   248k|utf8_isNmstrt2(const ENCODING *enc, const char *p) {
  155|   248k|  UNUSED_P(enc);
  ------------------
  |  |  135|   248k|#  define UNUSED_P(p) (void)p
  ------------------
  156|   248k|  return UTF8_GET_NAMING2(nmstrtPages, (const unsigned char *)p);
  ------------------
  |  |   86|   248k|  (namingBitmap[((pages)[(((byte)[0]) >> 2) & 7] << 3)                         \
  |  |   87|   248k|                + ((((byte)[0]) & 3) << 1) + ((((byte)[1]) >> 5) & 1)]         \
  |  |   88|   248k|   & (1u << (((byte)[1]) & 0x1F)))
  ------------------
  157|   248k|}
xmltok.c:utf8_isNmstrt3:
  160|  7.25k|utf8_isNmstrt3(const ENCODING *enc, const char *p) {
  161|  7.25k|  UNUSED_P(enc);
  ------------------
  |  |  135|  7.25k|#  define UNUSED_P(p) (void)p
  ------------------
  162|  7.25k|  return UTF8_GET_NAMING3(nmstrtPages, (const unsigned char *)p);
  ------------------
  |  |   96|  7.25k|  (namingBitmap                                                                \
  |  |   97|  7.25k|       [((pages)[((((byte)[0]) & 0xF) << 4) + ((((byte)[1]) >> 2) & 0xF)]      \
  |  |   98|  7.25k|         << 3)                                                                 \
  |  |   99|  7.25k|        + ((((byte)[1]) & 3) << 1) + ((((byte)[2]) >> 5) & 1)]                 \
  |  |  100|  7.25k|   & (1u << (((byte)[2]) & 0x1F)))
  ------------------
  163|  7.25k|}
xmltok.c:utf8_isInvalid2:
  168|   647k|utf8_isInvalid2(const ENCODING *enc, const char *p) {
  169|   647k|  UNUSED_P(enc);
  ------------------
  |  |  135|   647k|#  define UNUSED_P(p) (void)p
  ------------------
  170|   647k|  return UTF8_INVALID2((const unsigned char *)p);
  ------------------
  |  |  113|   647k|  ((*p) < 0xC2 || ((p)[1] & 0x80) == 0 || ((p)[1] & 0xC0) == 0xC0)
  |  |  ------------------
  |  |  |  Branch (113:4): [True: 16, False: 646k]
  |  |  |  Branch (113:19): [True: 106, False: 646k]
  |  |  |  Branch (113:43): [True: 63, False: 646k]
  |  |  ------------------
  ------------------
  171|   647k|}
xmltok.c:utf8_isInvalid3:
  174|  23.0M|utf8_isInvalid3(const ENCODING *enc, const char *p) {
  175|  23.0M|  UNUSED_P(enc);
  ------------------
  |  |  135|  23.0M|#  define UNUSED_P(p) (void)p
  ------------------
  176|  23.0M|  return UTF8_INVALID3((const unsigned char *)p);
  ------------------
  |  |  116|  23.0M|  (((p)[2] & 0x80) == 0                                                        \
  |  |  ------------------
  |  |  |  Branch (116:4): [True: 57, False: 23.0M]
  |  |  ------------------
  |  |  117|  23.0M|   || ((*p) == 0xEF && (p)[1] == 0xBF ? (p)[2] > 0xBD                          \
  |  |  ------------------
  |  |  |  Branch (117:7): [True: 43, False: 23.0M]
  |  |  |  Branch (117:8): [True: 71.7k, False: 22.9M]
  |  |  |  Branch (117:24): [True: 7.12k, False: 64.6k]
  |  |  ------------------
  |  |  118|  23.0M|                                      : ((p)[2] & 0xC0) == 0xC0)               \
  |  |  119|  23.0M|   || ((*p) == 0xE0                                                            \
  |  |  ------------------
  |  |  |  Branch (119:7): [True: 40, False: 22.9M]
  |  |  |  Branch (119:8): [True: 5.61M, False: 17.3M]
  |  |  ------------------
  |  |  120|  23.0M|           ? (p)[1] < 0xA0 || ((p)[1] & 0xC0) == 0xC0                          \
  |  |  ------------------
  |  |  |  Branch (120:14): [True: 10, False: 5.61M]
  |  |  |  Branch (120:31): [True: 6, False: 5.61M]
  |  |  ------------------
  |  |  121|  23.0M|           : ((p)[1] & 0x80) == 0                                              \
  |  |  ------------------
  |  |  |  Branch (121:14): [True: 14, False: 17.3M]
  |  |  ------------------
  |  |  122|  17.3M|                 || ((*p) == 0xED ? (p)[1] > 0x9F : ((p)[1] & 0xC0) == 0xC0)))
  |  |  ------------------
  |  |  |  Branch (122:21): [True: 10, False: 17.3M]
  |  |  |  Branch (122:22): [True: 63.7k, False: 17.3M]
  |  |  ------------------
  ------------------
  177|  23.0M|}
xmltok.c:utf8_isInvalid4:
  180|  81.8k|utf8_isInvalid4(const ENCODING *enc, const char *p) {
  181|  81.8k|  UNUSED_P(enc);
  ------------------
  |  |  135|  81.8k|#  define UNUSED_P(p) (void)p
  ------------------
  182|  81.8k|  return UTF8_INVALID4((const unsigned char *)p);
  ------------------
  |  |  125|  81.8k|  (((p)[3] & 0x80) == 0 || ((p)[3] & 0xC0) == 0xC0 || ((p)[2] & 0x80) == 0     \
  |  |  ------------------
  |  |  |  Branch (125:4): [True: 131, False: 81.7k]
  |  |  |  Branch (125:28): [True: 61, False: 81.6k]
  |  |  |  Branch (125:55): [True: 14, False: 81.6k]
  |  |  ------------------
  |  |  126|  81.8k|   || ((p)[2] & 0xC0) == 0xC0                                                  \
  |  |  ------------------
  |  |  |  Branch (126:7): [True: 10, False: 81.6k]
  |  |  ------------------
  |  |  127|  81.8k|   || ((*p) == 0xF0                                                            \
  |  |  ------------------
  |  |  |  Branch (127:7): [True: 54, False: 81.5k]
  |  |  |  Branch (127:8): [True: 16.1k, False: 65.4k]
  |  |  ------------------
  |  |  128|  81.6k|           ? (p)[1] < 0x90 || ((p)[1] & 0xC0) == 0xC0                          \
  |  |  ------------------
  |  |  |  Branch (128:14): [True: 15, False: 16.1k]
  |  |  |  Branch (128:31): [True: 11, False: 16.1k]
  |  |  ------------------
  |  |  129|  81.6k|           : ((p)[1] & 0x80) == 0                                              \
  |  |  ------------------
  |  |  |  Branch (129:14): [True: 5, False: 65.4k]
  |  |  ------------------
  |  |  130|  65.4k|                 || ((*p) == 0xF4 ? (p)[1] > 0x8F : ((p)[1] & 0xC0) == 0xC0)))
  |  |  ------------------
  |  |  |  Branch (130:21): [True: 23, False: 65.4k]
  |  |  |  Branch (130:22): [True: 15.7k, False: 49.6k]
  |  |  ------------------
  ------------------
  183|  81.8k|}
xmltok.c:unicode_byte_type:
  595|   149M|unicode_byte_type(char hi, char lo) {
  596|   149M|  switch ((unsigned char)hi) {
  ------------------
  |  Branch (596:11): [True: 148M, False: 1.48M]
  ------------------
  597|       |  /* 0xD800-0xDBFF first 16-bit code unit or high surrogate (W1) */
  598|   503k|  case 0xD8:
  ------------------
  |  Branch (598:3): [True: 503k, False: 149M]
  ------------------
  599|   584k|  case 0xD9:
  ------------------
  |  Branch (599:3): [True: 80.7k, False: 149M]
  ------------------
  600|   829k|  case 0xDA:
  ------------------
  |  Branch (600:3): [True: 245k, False: 149M]
  ------------------
  601|  1.33M|  case 0xDB:
  ------------------
  |  Branch (601:3): [True: 505k, False: 149M]
  ------------------
  602|  1.33M|    return BT_LEAD4;
  603|       |  /* 0xDC00-0xDFFF second 16-bit code unit or low surrogate (W2) */
  604|     97|  case 0xDC:
  ------------------
  |  Branch (604:3): [True: 97, False: 149M]
  ------------------
  605|    195|  case 0xDD:
  ------------------
  |  Branch (605:3): [True: 98, False: 149M]
  ------------------
  606|    283|  case 0xDE:
  ------------------
  |  Branch (606:3): [True: 88, False: 149M]
  ------------------
  607|    380|  case 0xDF:
  ------------------
  |  Branch (607:3): [True: 97, False: 149M]
  ------------------
  608|    380|    return BT_TRAIL;
  609|   146k|  case 0xFF:
  ------------------
  |  Branch (609:3): [True: 146k, False: 149M]
  ------------------
  610|   146k|    switch ((unsigned char)lo) {
  ------------------
  |  Branch (610:13): [True: 146k, False: 180]
  ------------------
  611|    168|    case 0xFF: /* noncharacter-FFFF */
  ------------------
  |  Branch (611:5): [True: 168, False: 146k]
  ------------------
  612|    180|    case 0xFE: /* noncharacter-FFFE */
  ------------------
  |  Branch (612:5): [True: 12, False: 146k]
  ------------------
  613|    180|      return BT_NONXML;
  614|   146k|    }
  615|   146k|    break;
  616|   149M|  }
  617|   148M|  return BT_NONASCII;
  618|   149M|}
xmltok.c:little2_toUtf8:
  623|  70.7k|      char **toP, const char *toLim) {                                         \
  624|  70.7k|    const char *from = *fromP;                                                 \
  625|  70.7k|    UNUSED_P(enc);                                                             \
  ------------------
  |  |  135|  70.7k|#  define UNUSED_P(p) (void)p
  ------------------
  626|  70.7k|    fromLim = from + (((fromLim - from) >> 1) << 1); /* shrink to even */      \
  627|  12.2M|    for (; from < fromLim; from += 2) {                                        \
  ------------------
  |  Branch (627:12): [True: 12.2M, False: 67.9k]
  ------------------
  628|  12.2M|      int plane;                                                               \
  629|  12.2M|      unsigned char lo2;                                                       \
  630|  12.2M|      unsigned char lo = GET_LO(from);                                         \
  ------------------
  |  |  718|  12.2M|#define GET_LO(ptr) ((unsigned char)(ptr)[0])
  ------------------
  631|  12.2M|      unsigned char hi = GET_HI(from);                                         \
  ------------------
  |  |  719|  12.2M|#define GET_HI(ptr) ((unsigned char)(ptr)[1])
  ------------------
  632|  12.2M|      switch (hi) {                                                            \
  633|   159k|      case 0:                                                                  \
  ------------------
  |  Branch (633:7): [True: 159k, False: 12.0M]
  ------------------
  634|   159k|        if (lo < 0x80) {                                                       \
  ------------------
  |  Branch (634:13): [True: 145k, False: 14.3k]
  ------------------
  635|   145k|          if (*toP == toLim) {                                                 \
  ------------------
  |  Branch (635:15): [True: 655, False: 144k]
  ------------------
  636|    655|            *fromP = from;                                                     \
  637|    655|            return XML_CONVERT_OUTPUT_EXHAUSTED;                               \
  638|    655|          }                                                                    \
  639|   145k|          *(*toP)++ = lo;                                                      \
  640|   144k|          break;                                                               \
  641|   145k|        }                                                                      \
  642|   159k|        /* fall through */                                                     \
  643|   159k|      case 0x1:                                                                \
  ------------------
  |  Branch (643:7): [True: 5.68k, False: 12.2M]
  ------------------
  644|  22.2k|      case 0x2:                                                                \
  ------------------
  |  Branch (644:7): [True: 2.19k, False: 12.2M]
  ------------------
  645|  26.0k|      case 0x3:                                                                \
  ------------------
  |  Branch (645:7): [True: 3.88k, False: 12.2M]
  ------------------
  646|  63.5k|      case 0x4:                                                                \
  ------------------
  |  Branch (646:7): [True: 37.4k, False: 12.1M]
  ------------------
  647|  65.3k|      case 0x5:                                                                \
  ------------------
  |  Branch (647:7): [True: 1.82k, False: 12.2M]
  ------------------
  648|  67.0k|      case 0x6:                                                                \
  ------------------
  |  Branch (648:7): [True: 1.69k, False: 12.2M]
  ------------------
  649|  68.5k|      case 0x7:                                                                \
  ------------------
  |  Branch (649:7): [True: 1.51k, False: 12.2M]
  ------------------
  650|  68.5k|        if (toLim - *toP < 2) {                                                \
  ------------------
  |  Branch (650:13): [True: 259, False: 68.3k]
  ------------------
  651|    259|          *fromP = from;                                                       \
  652|    259|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  653|    259|        }                                                                      \
  654|  68.5k|        *(*toP)++ = ((lo >> 6) | (hi << 2) | UTF8_cval2);                      \
  655|  68.3k|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  656|  68.3k|        break;                                                                 \
  657|  11.9M|      default:                                                                 \
  ------------------
  |  Branch (657:7): [True: 11.9M, False: 283k]
  ------------------
  658|  11.9M|        if (toLim - *toP < 3) {                                                \
  ------------------
  |  Branch (658:13): [True: 1.63k, False: 11.9M]
  ------------------
  659|  1.63k|          *fromP = from;                                                       \
  660|  1.63k|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  661|  1.63k|        }                                                                      \
  662|  11.9M|        /* 16 bits divided 4, 6, 6 amongst 3 bytes */                          \
  663|  11.9M|        *(*toP)++ = ((hi >> 4) | UTF8_cval3);                                  \
  664|  11.9M|        *(*toP)++ = (((hi & 0xf) << 2) | (lo >> 6) | 0x80);                    \
  665|  11.9M|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  666|  11.9M|        break;                                                                 \
  667|  11.9M|      case 0xD8:                                                               \
  ------------------
  |  Branch (667:7): [True: 20.5k, False: 12.2M]
  ------------------
  668|  23.0k|      case 0xD9:                                                               \
  ------------------
  |  Branch (668:7): [True: 2.58k, False: 12.2M]
  ------------------
  669|  47.2k|      case 0xDA:                                                               \
  ------------------
  |  Branch (669:7): [True: 24.2k, False: 12.1M]
  ------------------
  670|  68.9k|      case 0xDB:                                                               \
  ------------------
  |  Branch (670:7): [True: 21.6k, False: 12.1M]
  ------------------
  671|  68.9k|        if (toLim - *toP < 4) {                                                \
  ------------------
  |  Branch (671:13): [True: 243, False: 68.7k]
  ------------------
  672|    243|          *fromP = from;                                                       \
  673|    243|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  674|    243|        }                                                                      \
  675|  68.9k|        if (fromLim - from < 4) {                                              \
  ------------------
  |  Branch (675:13): [True: 0, False: 68.7k]
  ------------------
  676|      0|          *fromP = from;                                                       \
  677|      0|          return XML_CONVERT_INPUT_INCOMPLETE;                                 \
  678|      0|        }                                                                      \
  679|  68.7k|        plane = (((hi & 0x3) << 2) | ((lo >> 6) & 0x3)) + 1;                   \
  680|  68.7k|        *(*toP)++ = (char)((plane >> 2) | UTF8_cval4);                         \
  681|  68.7k|        *(*toP)++ = (((lo >> 2) & 0xF) | ((plane & 0x3) << 4) | 0x80);         \
  682|  68.7k|        from += 2;                                                             \
  683|  68.7k|        lo2 = GET_LO(from);                                                    \
  ------------------
  |  |  718|  68.7k|#define GET_LO(ptr) ((unsigned char)(ptr)[0])
  ------------------
  684|  68.7k|        *(*toP)++ = (((lo & 0x3) << 4) | ((GET_HI(from) & 0x3) << 2)           \
  ------------------
  |  |  719|  68.7k|#define GET_HI(ptr) ((unsigned char)(ptr)[1])
  ------------------
  685|  68.7k|                     | (lo2 >> 6) | 0x80);                                     \
  686|  68.7k|        *(*toP)++ = ((lo2 & 0x3f) | 0x80);                                     \
  687|  68.7k|        break;                                                                 \
  688|  12.2M|      }                                                                        \
  689|  12.2M|    }                                                                          \
  690|  70.7k|    *fromP = from;                                                             \
  691|  67.9k|    if (from < fromLim)                                                        \
  ------------------
  |  Branch (691:9): [True: 0, False: 67.9k]
  ------------------
  692|  67.9k|      return XML_CONVERT_INPUT_INCOMPLETE;                                     \
  693|  67.9k|    else                                                                       \
  694|  67.9k|      return XML_CONVERT_COMPLETED;                                            \
  695|  67.9k|  }
xmltok.c:getEncodingIndex:
 1502|  39.6k|getEncodingIndex(const char *name) {
 1503|  39.6k|  static const char *const encodingNames[] = {
 1504|  39.6k|      KW_ISO_8859_1, KW_US_ASCII, KW_UTF_8, KW_UTF_16, KW_UTF_16BE, KW_UTF_16LE,
 1505|  39.6k|  };
 1506|  39.6k|  int i;
 1507|  39.6k|  if (name == NULL)
  ------------------
  |  Branch (1507:7): [True: 19.7k, False: 19.8k]
  ------------------
 1508|  19.7k|    return NO_ENC;
 1509|  99.2k|  for (i = 0; i < (int)(sizeof(encodingNames) / sizeof(encodingNames[0])); i++)
  ------------------
  |  Branch (1509:15): [True: 99.2k, False: 42]
  ------------------
 1510|  99.2k|    if (streqci(name, encodingNames[i]))
  ------------------
  |  Branch (1510:9): [True: 19.7k, False: 79.4k]
  ------------------
 1511|  19.7k|      return i;
 1512|     42|  return UNKNOWN_ENC;
 1513|  19.8k|}
xmltok.c:streqci:
 1005|  99.2k|streqci(const char *s1, const char *s2) {
 1006|   475k|  for (;;) {
 1007|   475k|    char c1 = *s1++;
 1008|   475k|    char c2 = *s2++;
 1009|   475k|    if (ASCII_a <= c1 && c1 <= ASCII_z)
  ------------------
  |  |   63|   475k|#define ASCII_a 0x61
  ------------------
                  if (ASCII_a <= c1 && c1 <= ASCII_z)
  ------------------
  |  |   88|    186|#define ASCII_z 0x7A
  ------------------
  |  Branch (1009:9): [True: 186, False: 475k]
  |  Branch (1009:26): [True: 186, False: 0]
  ------------------
 1010|    186|      c1 += ASCII_A - ASCII_a;
  ------------------
  |  |   36|    186|#define ASCII_A 0x41
  ------------------
                    c1 += ASCII_A - ASCII_a;
  ------------------
  |  |   63|    186|#define ASCII_a 0x61
  ------------------
 1011|   475k|    if (ASCII_a <= c2 && c2 <= ASCII_z)
  ------------------
  |  |   63|   475k|#define ASCII_a 0x61
  ------------------
                  if (ASCII_a <= c2 && c2 <= ASCII_z)
  ------------------
  |  |   88|      0|#define ASCII_z 0x7A
  ------------------
  |  Branch (1011:9): [True: 0, False: 475k]
  |  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|   475k|    if (c1 != c2)
  ------------------
  |  Branch (1017:9): [True: 79.4k, False: 396k]
  ------------------
 1018|  79.4k|      return 0;
 1019|   396k|    if (! c1)
  ------------------
  |  Branch (1019:9): [True: 19.7k, False: 376k]
  ------------------
 1020|  19.7k|      break;
 1021|   396k|  }
 1022|  19.7k|  return 1;
 1023|  99.2k|}
xmltok.c:initScan:
 1531|  19.7k|         int state, const char *ptr, const char *end, const char **nextTokPtr) {
 1532|  19.7k|  const ENCODING **encPtr;
 1533|       |
 1534|  19.7k|  if (ptr >= end)
  ------------------
  |  Branch (1534:7): [True: 0, False: 19.7k]
  ------------------
 1535|      0|    return XML_TOK_NONE;
  ------------------
  |  |   51|      0|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1536|  19.7k|  encPtr = enc->encPtr;
 1537|  19.7k|  if (ptr + 1 == end) {
  ------------------
  |  Branch (1537:7): [True: 23, False: 19.7k]
  ------------------
 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|     23|    switch (INIT_ENC_INDEX(enc)) {
  ------------------
  |  | 1519|     23|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  |  |  ------------------
  |  |  |  Branch (1519:29): [True: 0, False: 23]
  |  |  ------------------
  ------------------
 1547|      0|    case UTF_16_ENC:
  ------------------
  |  Branch (1547:5): [True: 0, False: 23]
  ------------------
 1548|      0|    case UTF_16LE_ENC:
  ------------------
  |  Branch (1548:5): [True: 0, False: 23]
  ------------------
 1549|     23|    case UTF_16BE_ENC:
  ------------------
  |  Branch (1549:5): [True: 23, False: 0]
  ------------------
 1550|     23|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     23|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1551|     23|    }
 1552|      0|    switch ((unsigned char)*ptr) {
  ------------------
  |  Branch (1552:13): [True: 0, False: 0]
  ------------------
 1553|      0|    case 0xFE:
  ------------------
  |  Branch (1553:5): [True: 0, False: 0]
  ------------------
 1554|      0|    case 0xFF:
  ------------------
  |  Branch (1554:5): [True: 0, False: 0]
  ------------------
 1555|      0|    case 0xEF: /* possibly first byte of UTF-8 BOM */
  ------------------
  |  Branch (1555:5): [True: 0, False: 0]
  ------------------
 1556|      0|      if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  | 1519|      0|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
                    if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  |  131|      0|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1556:11): [True: 0, False: 0]
  |  Branch (1556:52): [True: 0, False: 0]
  ------------------
 1557|      0|        break;
 1558|       |      /* fall through */
 1559|      0|    case 0x00:
  ------------------
  |  Branch (1559:5): [True: 0, False: 0]
  ------------------
 1560|      0|    case 0x3C:
  ------------------
  |  Branch (1560:5): [True: 0, False: 0]
  ------------------
 1561|      0|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1562|      0|    }
 1563|  19.7k|  } else {
 1564|  19.7k|    switch (((unsigned char)ptr[0] << 8) | (unsigned char)ptr[1]) {
 1565|      1|    case 0xFEFF:
  ------------------
  |  Branch (1565:5): [True: 1, False: 19.7k]
  ------------------
 1566|      1|      if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  | 1519|      1|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
                    if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  |  131|      0|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1566:11): [True: 0, False: 1]
  |  Branch (1566:52): [True: 0, False: 0]
  ------------------
 1567|      0|        break;
 1568|      1|      *nextTokPtr = ptr + 2;
 1569|      1|      *encPtr = encodingTable[UTF_16BE_ENC];
 1570|      1|      return XML_TOK_BOM;
  ------------------
  |  |   79|      1|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1571|       |    /* 00 3C is handled in the default case */
 1572|  5.09k|    case 0x3C00:
  ------------------
  |  Branch (1572:5): [True: 5.09k, False: 14.6k]
  ------------------
 1573|  5.09k|      if ((INIT_ENC_INDEX(enc) == UTF_16BE_ENC
  ------------------
  |  | 1519|  5.09k|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
  |  Branch (1573:12): [True: 5.09k, False: 0]
  ------------------
 1574|  5.09k|           || INIT_ENC_INDEX(enc) == UTF_16_ENC)
  ------------------
  |  | 1519|      0|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
  |  Branch (1574:15): [True: 0, False: 0]
  ------------------
 1575|  5.09k|          && state == XML_CONTENT_STATE)
  ------------------
  |  |  131|  5.09k|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1575:14): [True: 0, False: 5.09k]
  ------------------
 1576|      0|        break;
 1577|  5.09k|      *encPtr = encodingTable[UTF_16LE_ENC];
 1578|  5.09k|      return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|  5.09k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1579|      3|    case 0xFFFE:
  ------------------
  |  Branch (1579:5): [True: 3, False: 19.7k]
  ------------------
 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|      0|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1580:11): [True: 0, False: 3]
  |  Branch (1580:52): [True: 0, False: 0]
  ------------------
 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|  7.24k|    case 0xEFBB:
  ------------------
  |  Branch (1585:5): [True: 7.24k, False: 12.5k]
  ------------------
 1586|       |      /* Maybe a UTF-8 BOM (EF BB BF) */
 1587|       |      /* If there's an explicitly specified (external) encoding
 1588|       |         of ISO-8859-1 or some flavour of UTF-16
 1589|       |         and this is an external text entity,
 1590|       |         don't look for the BOM,
 1591|       |         because it might be a legal data.
 1592|       |      */
 1593|  7.24k|      if (state == XML_CONTENT_STATE) {
  ------------------
  |  |  131|  7.24k|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1593:11): [True: 0, False: 7.24k]
  ------------------
 1594|      0|        int e = INIT_ENC_INDEX(enc);
  ------------------
  |  | 1519|      0|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
 1595|      0|        if (e == ISO_8859_1_ENC || e == UTF_16BE_ENC || e == UTF_16LE_ENC
  ------------------
  |  Branch (1595:13): [True: 0, False: 0]
  |  Branch (1595:36): [True: 0, False: 0]
  |  Branch (1595:57): [True: 0, False: 0]
  ------------------
 1596|      0|            || e == UTF_16_ENC)
  ------------------
  |  Branch (1596:16): [True: 0, False: 0]
  ------------------
 1597|      0|          break;
 1598|      0|      }
 1599|  7.24k|      if (ptr + 2 == end)
  ------------------
  |  Branch (1599:11): [True: 1, False: 7.24k]
  ------------------
 1600|      1|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1601|  7.24k|      if ((unsigned char)ptr[2] == 0xBF) {
  ------------------
  |  Branch (1601:11): [True: 7.23k, False: 12]
  ------------------
 1602|  7.23k|        *nextTokPtr = ptr + 3;
 1603|  7.23k|        *encPtr = encodingTable[UTF_8_ENC];
 1604|  7.23k|        return XML_TOK_BOM;
  ------------------
  |  |   79|  7.23k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1605|  7.23k|      }
 1606|     12|      break;
 1607|  7.42k|    default:
  ------------------
  |  Branch (1607:5): [True: 7.42k, False: 12.3k]
  ------------------
 1608|  7.42k|      if (ptr[0] == '\0') {
  ------------------
  |  Branch (1608:11): [True: 6.38k, False: 1.04k]
  ------------------
 1609|       |        /* 0 isn't a legal data character. Furthermore a document
 1610|       |           entity can only start with ASCII characters.  So the only
 1611|       |           way this can fail to be big-endian UTF-16 if it it's an
 1612|       |           external parsed general entity that's labelled as
 1613|       |           UTF-16LE.
 1614|       |        */
 1615|  6.38k|        if (state == XML_CONTENT_STATE && INIT_ENC_INDEX(enc) == UTF_16LE_ENC)
  ------------------
  |  |  131|  12.7k|#define XML_CONTENT_STATE 1
  ------------------
                      if (state == XML_CONTENT_STATE && INIT_ENC_INDEX(enc) == UTF_16LE_ENC)
  ------------------
  |  | 1519|      0|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
  |  Branch (1615:13): [True: 0, False: 6.38k]
  |  Branch (1615:43): [True: 0, False: 0]
  ------------------
 1616|      0|          break;
 1617|  6.38k|        *encPtr = encodingTable[UTF_16BE_ENC];
 1618|  6.38k|        return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|  6.38k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1619|  6.38k|      } else if (ptr[1] == '\0') {
  ------------------
  |  Branch (1619:18): [True: 886, False: 159]
  ------------------
 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|    886|        if (state == XML_CONTENT_STATE)
  ------------------
  |  |  131|    886|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1629:13): [True: 0, False: 886]
  ------------------
 1630|      0|          break;
 1631|    886|        *encPtr = encodingTable[UTF_16LE_ENC];
 1632|    886|        return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|    886|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1633|    886|      }
 1634|    159|      break;
 1635|  19.7k|    }
 1636|  19.7k|  }
 1637|    171|  *encPtr = encodingTable[INIT_ENC_INDEX(enc)];
  ------------------
  |  | 1519|    171|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
 1638|    171|  return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|    171|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1639|  19.7k|}
xmltok.c:big2_toUtf8:
  623|   218k|      char **toP, const char *toLim) {                                         \
  624|   218k|    const char *from = *fromP;                                                 \
  625|   218k|    UNUSED_P(enc);                                                             \
  ------------------
  |  |  135|   218k|#  define UNUSED_P(p) (void)p
  ------------------
  626|   218k|    fromLim = from + (((fromLim - from) >> 1) << 1); /* shrink to even */      \
  627|  41.1M|    for (; from < fromLim; from += 2) {                                        \
  ------------------
  |  Branch (627:12): [True: 40.9M, False: 213k]
  ------------------
  628|  40.9M|      int plane;                                                               \
  629|  40.9M|      unsigned char lo2;                                                       \
  630|  40.9M|      unsigned char lo = GET_LO(from);                                         \
  ------------------
  |  |  727|  40.9M|#define GET_LO(ptr) ((unsigned char)(ptr)[1])
  ------------------
  631|  40.9M|      unsigned char hi = GET_HI(from);                                         \
  ------------------
  |  |  728|  40.9M|#define GET_HI(ptr) ((unsigned char)(ptr)[0])
  ------------------
  632|  40.9M|      switch (hi) {                                                            \
  633|   433k|      case 0:                                                                  \
  ------------------
  |  Branch (633:7): [True: 433k, False: 40.4M]
  ------------------
  634|   433k|        if (lo < 0x80) {                                                       \
  ------------------
  |  Branch (634:13): [True: 406k, False: 27.6k]
  ------------------
  635|   406k|          if (*toP == toLim) {                                                 \
  ------------------
  |  Branch (635:15): [True: 450, False: 405k]
  ------------------
  636|    450|            *fromP = from;                                                     \
  637|    450|            return XML_CONVERT_OUTPUT_EXHAUSTED;                               \
  638|    450|          }                                                                    \
  639|   406k|          *(*toP)++ = lo;                                                      \
  640|   405k|          break;                                                               \
  641|   406k|        }                                                                      \
  642|   433k|        /* fall through */                                                     \
  643|   433k|      case 0x1:                                                                \
  ------------------
  |  Branch (643:7): [True: 5.71k, False: 40.9M]
  ------------------
  644|  38.6k|      case 0x2:                                                                \
  ------------------
  |  Branch (644:7): [True: 5.28k, False: 40.9M]
  ------------------
  645|  43.7k|      case 0x3:                                                                \
  ------------------
  |  Branch (645:7): [True: 5.16k, False: 40.9M]
  ------------------
  646|  48.1k|      case 0x4:                                                                \
  ------------------
  |  Branch (646:7): [True: 4.34k, False: 40.9M]
  ------------------
  647|  50.1k|      case 0x5:                                                                \
  ------------------
  |  Branch (647:7): [True: 2.00k, False: 40.9M]
  ------------------
  648|  53.6k|      case 0x6:                                                                \
  ------------------
  |  Branch (648:7): [True: 3.46k, False: 40.9M]
  ------------------
  649|  57.7k|      case 0x7:                                                                \
  ------------------
  |  Branch (649:7): [True: 4.11k, False: 40.9M]
  ------------------
  650|  57.7k|        if (toLim - *toP < 2) {                                                \
  ------------------
  |  Branch (650:13): [True: 252, False: 57.4k]
  ------------------
  651|    252|          *fromP = from;                                                       \
  652|    252|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  653|    252|        }                                                                      \
  654|  57.7k|        *(*toP)++ = ((lo >> 6) | (hi << 2) | UTF8_cval2);                      \
  655|  57.4k|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  656|  57.4k|        break;                                                                 \
  657|  40.2M|      default:                                                                 \
  ------------------
  |  Branch (657:7): [True: 40.2M, False: 659k]
  ------------------
  658|  40.2M|        if (toLim - *toP < 3) {                                                \
  ------------------
  |  Branch (658:13): [True: 3.98k, False: 40.2M]
  ------------------
  659|  3.98k|          *fromP = from;                                                       \
  660|  3.98k|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  661|  3.98k|        }                                                                      \
  662|  40.2M|        /* 16 bits divided 4, 6, 6 amongst 3 bytes */                          \
  663|  40.2M|        *(*toP)++ = ((hi >> 4) | UTF8_cval3);                                  \
  664|  40.2M|        *(*toP)++ = (((hi & 0xf) << 2) | (lo >> 6) | 0x80);                    \
  665|  40.2M|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  666|  40.2M|        break;                                                                 \
  667|  40.2M|      case 0xD8:                                                               \
  ------------------
  |  Branch (667:7): [True: 75.5k, False: 40.8M]
  ------------------
  668|  88.1k|      case 0xD9:                                                               \
  ------------------
  |  Branch (668:7): [True: 12.6k, False: 40.9M]
  ------------------
  669|   113k|      case 0xDA:                                                               \
  ------------------
  |  Branch (669:7): [True: 24.9k, False: 40.9M]
  ------------------
  670|   195k|      case 0xDB:                                                               \
  ------------------
  |  Branch (670:7): [True: 82.2k, False: 40.8M]
  ------------------
  671|   195k|        if (toLim - *toP < 4) {                                                \
  ------------------
  |  Branch (671:13): [True: 269, False: 195k]
  ------------------
  672|    269|          *fromP = from;                                                       \
  673|    269|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  674|    269|        }                                                                      \
  675|   195k|        if (fromLim - from < 4) {                                              \
  ------------------
  |  Branch (675:13): [True: 0, False: 195k]
  ------------------
  676|      0|          *fromP = from;                                                       \
  677|      0|          return XML_CONVERT_INPUT_INCOMPLETE;                                 \
  678|      0|        }                                                                      \
  679|   195k|        plane = (((hi & 0x3) << 2) | ((lo >> 6) & 0x3)) + 1;                   \
  680|   195k|        *(*toP)++ = (char)((plane >> 2) | UTF8_cval4);                         \
  681|   195k|        *(*toP)++ = (((lo >> 2) & 0xF) | ((plane & 0x3) << 4) | 0x80);         \
  682|   195k|        from += 2;                                                             \
  683|   195k|        lo2 = GET_LO(from);                                                    \
  ------------------
  |  |  727|   195k|#define GET_LO(ptr) ((unsigned char)(ptr)[1])
  ------------------
  684|   195k|        *(*toP)++ = (((lo & 0x3) << 4) | ((GET_HI(from) & 0x3) << 2)           \
  ------------------
  |  |  728|   195k|#define GET_HI(ptr) ((unsigned char)(ptr)[0])
  ------------------
  685|   195k|                     | (lo2 >> 6) | 0x80);                                     \
  686|   195k|        *(*toP)++ = ((lo2 & 0x3f) | 0x80);                                     \
  687|   195k|        break;                                                                 \
  688|  40.9M|      }                                                                        \
  689|  40.9M|    }                                                                          \
  690|   218k|    *fromP = from;                                                             \
  691|   213k|    if (from < fromLim)                                                        \
  ------------------
  |  Branch (691:9): [True: 0, False: 213k]
  ------------------
  692|   213k|      return XML_CONVERT_INPUT_INCOMPLETE;                                     \
  693|   213k|    else                                                                       \
  694|   213k|      return XML_CONVERT_COMPLETED;                                            \
  695|   213k|  }
xmltok.c:initUpdatePosition:
 1027|     24|                   POSITION *pos) {
 1028|     24|  UNUSED_P(enc);
  ------------------
  |  |  135|     24|#  define UNUSED_P(p) (void)p
  ------------------
 1029|     24|  normal_updatePosition(&utf8_encoding.enc, ptr, end, pos);
 1030|     24|}
xmltok.c:doParseXmlDecl:
 1155|    317|               const ENCODING **encoding, int *standalone) {
 1156|    317|  const char *val = NULL;
 1157|    317|  const char *name = NULL;
 1158|    317|  const char *nameEnd = NULL;
 1159|    317|  ptr += 5 * enc->minBytesPerChar;
 1160|    317|  end -= 2 * enc->minBytesPerChar;
 1161|    317|  if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)
  ------------------
  |  Branch (1161:7): [True: 182, False: 135]
  ------------------
 1162|    317|      || ! name) {
  ------------------
  |  Branch (1162:10): [True: 14, False: 121]
  ------------------
 1163|    196|    *badPtr = ptr;
 1164|    196|    return 0;
 1165|    196|  }
 1166|    121|  if (! XmlNameMatchesAscii(enc, name, nameEnd, KW_version)) {
  ------------------
  |  |  255|    121|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (1166:7): [True: 4, False: 117]
  ------------------
 1167|      4|    if (! isGeneralTextEntity) {
  ------------------
  |  Branch (1167:9): [True: 4, False: 0]
  ------------------
 1168|      4|      *badPtr = name;
 1169|      4|      return 0;
 1170|      4|    }
 1171|    117|  } else {
 1172|    117|    if (versionPtr)
  ------------------
  |  Branch (1172:9): [True: 117, False: 0]
  ------------------
 1173|    117|      *versionPtr = val;
 1174|    117|    if (versionEndPtr)
  ------------------
  |  Branch (1174:9): [True: 117, False: 0]
  ------------------
 1175|    117|      *versionEndPtr = ptr;
 1176|    117|    if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) {
  ------------------
  |  Branch (1176:9): [True: 17, False: 100]
  ------------------
 1177|     17|      *badPtr = ptr;
 1178|     17|      return 0;
 1179|     17|    }
 1180|    100|    if (! name) {
  ------------------
  |  Branch (1180:9): [True: 6, False: 94]
  ------------------
 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|    100|  }
 1189|     94|  if (XmlNameMatchesAscii(enc, name, nameEnd, KW_encoding)) {
  ------------------
  |  |  255|     94|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 50, False: 44]
  |  |  ------------------
  ------------------
 1190|     50|    int c = toAscii(enc, val, end);
 1191|     50|    if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   63|     50|#define ASCII_a 0x61
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   88|     21|#define ASCII_z 0x7A
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   36|     29|#define ASCII_A 0x41
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   61|     27|#define ASCII_Z 0x5A
  ------------------
  |  Branch (1191:12): [True: 21, False: 29]
  |  Branch (1191:28): [True: 21, False: 0]
  |  Branch (1191:48): [True: 27, False: 2]
  |  Branch (1191:64): [True: 26, False: 1]
  ------------------
 1192|      3|      *badPtr = val;
 1193|      3|      return 0;
 1194|      3|    }
 1195|     47|    if (encodingName)
  ------------------
  |  Branch (1195:9): [True: 47, False: 0]
  ------------------
 1196|     47|      *encodingName = val;
 1197|     47|    if (encoding)
  ------------------
  |  Branch (1197:9): [True: 47, False: 0]
  ------------------
 1198|     47|      *encoding = encodingFinder(enc, val, ptr - enc->minBytesPerChar);
 1199|     47|    if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) {
  ------------------
  |  Branch (1199:9): [True: 12, False: 35]
  ------------------
 1200|     12|      *badPtr = ptr;
 1201|     12|      return 0;
 1202|     12|    }
 1203|     35|    if (! name)
  ------------------
  |  Branch (1203:9): [True: 34, False: 1]
  ------------------
 1204|     34|      return 1;
 1205|     35|  }
 1206|     45|  if (! XmlNameMatchesAscii(enc, name, nameEnd, KW_standalone)
  ------------------
  |  |  255|     90|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (1206:7): [True: 4, False: 41]
  ------------------
 1207|     45|      || isGeneralTextEntity) {
  ------------------
  |  Branch (1207:10): [True: 0, False: 41]
  ------------------
 1208|      4|    *badPtr = name;
 1209|      4|    return 0;
 1210|      4|  }
 1211|     41|  if (XmlNameMatchesAscii(enc, val, ptr - enc->minBytesPerChar, KW_yes)) {
  ------------------
  |  |  255|     41|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 27, False: 14]
  |  |  ------------------
  ------------------
 1212|     27|    if (standalone)
  ------------------
  |  Branch (1212:9): [True: 27, False: 0]
  ------------------
 1213|     27|      *standalone = 1;
 1214|     27|  } else if (XmlNameMatchesAscii(enc, val, ptr - enc->minBytesPerChar, KW_no)) {
  ------------------
  |  |  255|     14|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 13, False: 1]
  |  |  ------------------
  ------------------
 1215|     13|    if (standalone)
  ------------------
  |  Branch (1215:9): [True: 13, False: 0]
  ------------------
 1216|     13|      *standalone = 0;
 1217|     13|  } else {
 1218|      1|    *badPtr = val;
 1219|      1|    return 0;
 1220|      1|  }
 1221|    241|  while (isSpace(toAscii(enc, ptr, end)))
  ------------------
  |  Branch (1221:10): [True: 201, False: 40]
  ------------------
 1222|    201|    ptr += enc->minBytesPerChar;
 1223|     40|  if (ptr != end) {
  ------------------
  |  Branch (1223:7): [True: 5, False: 35]
  ------------------
 1224|      5|    *badPtr = ptr;
 1225|      5|    return 0;
 1226|      5|  }
 1227|     35|  return 1;
 1228|     40|}
xmltok.c:parsePseudoAttribute:
 1061|    481|                     const char **valPtr, const char **nextTokPtr) {
 1062|    481|  int c;
 1063|    481|  char open;
 1064|    481|  if (ptr == end) {
  ------------------
  |  Branch (1064:7): [True: 39, False: 442]
  ------------------
 1065|     39|    *namePtr = NULL;
 1066|     39|    return 1;
 1067|     39|  }
 1068|    442|  if (! isSpace(toAscii(enc, ptr, end))) {
  ------------------
  |  Branch (1068:7): [True: 3, False: 439]
  ------------------
 1069|      3|    *nextTokPtr = ptr;
 1070|      3|    return 0;
 1071|      3|  }
 1072|    890|  do {
 1073|    890|    ptr += enc->minBytesPerChar;
 1074|    890|  } while (isSpace(toAscii(enc, ptr, end)));
  ------------------
  |  Branch (1074:12): [True: 451, False: 439]
  ------------------
 1075|    439|  if (ptr == end) {
  ------------------
  |  Branch (1075:7): [True: 15, False: 424]
  ------------------
 1076|     15|    *namePtr = NULL;
 1077|     15|    return 1;
 1078|     15|  }
 1079|    424|  *namePtr = ptr;
 1080|  2.90k|  for (;;) {
 1081|  2.90k|    c = toAscii(enc, ptr, end);
 1082|  2.90k|    if (c == -1) {
  ------------------
  |  Branch (1082:9): [True: 43, False: 2.86k]
  ------------------
 1083|     43|      *nextTokPtr = ptr;
 1084|     43|      return 0;
 1085|     43|    }
 1086|  2.86k|    if (c == ASCII_EQUALS) {
  ------------------
  |  |  112|  2.86k|#define ASCII_EQUALS 0x3D
  ------------------
  |  Branch (1086:9): [True: 331, False: 2.53k]
  ------------------
 1087|    331|      *nameEndPtr = ptr;
 1088|    331|      break;
 1089|    331|    }
 1090|  2.53k|    if (isSpace(c)) {
  ------------------
  |  Branch (1090:9): [True: 50, False: 2.48k]
  ------------------
 1091|     50|      *nameEndPtr = ptr;
 1092|    303|      do {
 1093|    303|        ptr += enc->minBytesPerChar;
 1094|    303|      } while (isSpace(c = toAscii(enc, ptr, end)));
  ------------------
  |  Branch (1094:16): [True: 253, False: 50]
  ------------------
 1095|     50|      if (c != ASCII_EQUALS) {
  ------------------
  |  |  112|     50|#define ASCII_EQUALS 0x3D
  ------------------
  |  Branch (1095:11): [True: 36, False: 14]
  ------------------
 1096|     36|        *nextTokPtr = ptr;
 1097|     36|        return 0;
 1098|     36|      }
 1099|     14|      break;
 1100|     50|    }
 1101|  2.48k|    ptr += enc->minBytesPerChar;
 1102|  2.48k|  }
 1103|    345|  if (ptr == *namePtr) {
  ------------------
  |  Branch (1103:7): [True: 11, False: 334]
  ------------------
 1104|     11|    *nextTokPtr = ptr;
 1105|     11|    return 0;
 1106|     11|  }
 1107|    334|  ptr += enc->minBytesPerChar;
 1108|    334|  c = toAscii(enc, ptr, end);
 1109|    566|  while (isSpace(c)) {
  ------------------
  |  Branch (1109:10): [True: 232, False: 334]
  ------------------
 1110|    232|    ptr += enc->minBytesPerChar;
 1111|    232|    c = toAscii(enc, ptr, end);
 1112|    232|  }
 1113|    334|  if (c != ASCII_QUOT && c != ASCII_APOS) {
  ------------------
  |  |  104|    668|#define ASCII_QUOT 0x22
  ------------------
                if (c != ASCII_QUOT && c != ASCII_APOS) {
  ------------------
  |  |  106|    106|#define ASCII_APOS 0x27
  ------------------
  |  Branch (1113:7): [True: 106, False: 228]
  |  Branch (1113:26): [True: 35, False: 71]
  ------------------
 1114|     35|    *nextTokPtr = ptr;
 1115|     35|    return 0;
 1116|     35|  }
 1117|    299|  open = (char)c;
 1118|    299|  ptr += enc->minBytesPerChar;
 1119|    299|  *valPtr = ptr;
 1120|  2.21k|  for (;; ptr += enc->minBytesPerChar) {
 1121|  2.21k|    c = toAscii(enc, ptr, end);
 1122|  2.21k|    if (c == open)
  ------------------
  |  Branch (1122:9): [True: 216, False: 1.99k]
  ------------------
 1123|    216|      break;
 1124|  1.99k|    if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   63|  1.99k|#define ASCII_a 0x61
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   88|    395|#define ASCII_z 0x7A
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   36|  1.60k|#define ASCII_A 0x41
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   61|    707|#define ASCII_Z 0x5A
  ------------------
  |  Branch (1124:12): [True: 395, False: 1.60k]
  |  Branch (1124:28): [True: 394, False: 1]
  |  Branch (1124:48): [True: 707, False: 897]
  |  Branch (1124:64): [True: 490, False: 217]
  ------------------
 1125|  1.99k|        && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |   90|  1.11k|#define ASCII_0 0x30
  ------------------
                      && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |   99|    467|#define ASCII_9 0x39
  ------------------
                      && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |  108|  2.86k|#define ASCII_PERIOD 0x2E
  ------------------
  |  Branch (1125:15): [True: 467, False: 647]
  |  Branch (1125:31): [True: 245, False: 222]
  |  Branch (1125:48): [True: 662, False: 207]
  ------------------
 1126|  1.99k|        && c != ASCII_MINUS && c != ASCII_UNDERSCORE) {
  ------------------
  |  |  107|  2.66k|#define ASCII_MINUS 0x2D
  ------------------
                      && c != ASCII_MINUS && c != ASCII_UNDERSCORE) {
  ------------------
  |  |  116|    296|#define ASCII_UNDERSCORE 0x5F
  ------------------
  |  Branch (1126:12): [True: 296, False: 366]
  |  Branch (1126:32): [True: 83, False: 213]
  ------------------
 1127|     83|      *nextTokPtr = ptr;
 1128|     83|      return 0;
 1129|     83|    }
 1130|  1.99k|  }
 1131|    216|  *nextTokPtr = ptr + enc->minBytesPerChar;
 1132|    216|  return 1;
 1133|    299|}
xmltok.c:toAscii:
 1033|  7.61k|toAscii(const ENCODING *enc, const char *ptr, const char *end) {
 1034|  7.61k|  char buf[1];
 1035|  7.61k|  char *p = buf;
 1036|  7.61k|  XmlUtf8Convert(enc, &ptr, end, &p, p + 1);
  ------------------
  |  |  276|  7.61k|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  ------------------
 1037|  7.61k|  if (p == buf)
  ------------------
  |  Branch (1037:7): [True: 228, False: 7.38k]
  ------------------
 1038|    228|    return -1;
 1039|  7.38k|  else
 1040|  7.38k|    return buf[0];
 1041|  7.61k|}
xmltok.c:isSpace:
 1044|  4.97k|isSpace(int c) {
 1045|  4.97k|  switch (c) {
  ------------------
  |  Branch (1045:11): [True: 3.35k, False: 1.62k]
  ------------------
 1046|    776|  case 0x20:
  ------------------
  |  Branch (1046:3): [True: 776, False: 4.20k]
  ------------------
 1047|  1.08k|  case 0xD:
  ------------------
  |  Branch (1047:3): [True: 304, False: 4.67k]
  ------------------
 1048|  1.57k|  case 0xA:
  ------------------
  |  Branch (1048:3): [True: 492, False: 4.48k]
  ------------------
 1049|  1.62k|  case 0x9:
  ------------------
  |  Branch (1049:3): [True: 54, False: 4.92k]
  ------------------
 1050|  1.62k|    return 1;
 1051|  4.97k|  }
 1052|  3.35k|  return 0;
 1053|  4.97k|}

xmltok.c:normal_prologTok:
 1018|  4.57M|                  const char **nextTokPtr) {
 1019|  4.57M|  int tok;
 1020|  4.57M|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 1.19k, False: 4.57M]
  ------------------
 1021|  1.19k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.19k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  4.57M|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|  4.57M|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|      0|    size_t n = end - ptr;
 1024|      0|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1024:9): [True: 0, False: 0]
  ------------------
 1025|      0|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
 1026|      0|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 0, False: 0]
  ------------------
 1027|      0|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|      0|      end = ptr + n;
 1029|      0|    }
 1030|      0|  }
 1031|  4.57M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.57M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.57M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1032|  4.50k|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 4.50k, False: 4.57M]
  ------------------
 1033|  4.50k|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  4.50k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  4.50k|#  define MINBPC(enc) 1
  ------------------
 1034|  13.2k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 13.2k, False: 4.56M]
  ------------------
 1035|  13.2k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  13.2k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  13.2k|#  define MINBPC(enc) 1
  ------------------
 1036|  30.8k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 30.8k, False: 4.54M]
  ------------------
 1037|  30.8k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  30.8k|#  define MINBPC(enc) 1
  ------------------
 1038|  30.8k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  30.8k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  30.8k|    {                                                                          \
  |  |  |  |  135|  30.8k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  30.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  30.8k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 14, False: 30.8k]
  |  |  |  |  ------------------
  |  |  |  |  136|     14|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     14|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     14|      }                                                                        \
  |  |  |  |  138|  30.8k|    }
  |  |  ------------------
  ------------------
 1039|  30.8k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  30.8k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  30.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 11, False: 30.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  23.7k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 23.7k, False: 7.06k]
  ------------------
 1041|  23.7k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  23.7k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  23.7k|#  define MINBPC(enc) 1
  ------------------
 1042|  3.35k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 3.35k, False: 27.4k]
  ------------------
 1043|  3.35k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  3.35k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  3.35k|#  define MINBPC(enc) 1
  ------------------
 1044|  2.74k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 2.74k, False: 28.0k]
  ------------------
 1045|  3.63k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 885, False: 29.9k]
  ------------------
 1046|  3.63k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 0, False: 30.8k]
  ------------------
 1047|  3.67k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 37, False: 30.7k]
  ------------------
 1048|  3.69k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 26, False: 30.7k]
  ------------------
 1049|  3.70k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 5, False: 30.8k]
  ------------------
 1050|  3.70k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  242|  3.70k|#  define MINBPC(enc) 1
  ------------------
 1051|  3.70k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  3.70k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  30.8k|    }
 1053|     11|    *nextTokPtr = ptr;
 1054|     11|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
 1055|  30.8k|  }
 1056|  76.0k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 76.0k, False: 4.50M]
  ------------------
 1057|  76.0k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  242|  76.0k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1057:9): [True: 169, False: 75.8k]
  ------------------
 1058|    169|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|    169|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    169|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|    169|    }
 1062|       |    /* fall through */
 1063|   134k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 58.9k, False: 4.51M]
  ------------------
 1064|   160k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 25.4k, False: 4.55M]
  ------------------
 1065|   165k|    for (;;) {
 1066|   165k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   165k|#  define MINBPC(enc) 1
  ------------------
 1067|   165k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   165k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   165k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   165k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 613, False: 164k]
  ------------------
 1068|    613|        break;
 1069|   164k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   164k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   164k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1070|  1.26k|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 1.26k, False: 163k]
  ------------------
 1071|  2.24k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 973, False: 163k]
  ------------------
 1072|  2.24k|        break;
 1073|  2.73k|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 2.73k, False: 161k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|  2.73k|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  242|  2.73k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1075:13): [True: 2.72k, False: 8]
  ------------------
 1076|  2.72k|          break;
 1077|       |        /* fall through */
 1078|   159k|      default:
  ------------------
  |  Branch (1078:7): [True: 159k, False: 4.97k]
  ------------------
 1079|   159k|        *nextTokPtr = ptr;
 1080|   159k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|   159k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|   164k|      }
 1082|   164k|    }
 1083|    613|    *nextTokPtr = ptr;
 1084|    613|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    613|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  3.13k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 3.13k, False: 4.57M]
  ------------------
 1086|  3.13k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  3.13k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  3.13k|#  define MINBPC(enc) 1
  ------------------
 1087|  6.85k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 6.85k, False: 4.57M]
  ------------------
 1088|  6.85k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  6.85k|#  define MINBPC(enc) 1
  ------------------
 1089|  6.85k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  6.85k|#define XML_TOK_COMMA 38
  ------------------
 1090|  2.73k|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 2.73k, False: 4.57M]
  ------------------
 1091|  2.73k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.73k|#  define MINBPC(enc) 1
  ------------------
 1092|  2.73k|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|  2.73k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|  1.01k|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 1.01k, False: 4.57M]
  ------------------
 1094|  1.01k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.01k|#  define MINBPC(enc) 1
  ------------------
 1095|  1.01k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  1.01k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.01k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.01k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 2, False: 1.01k]
  ------------------
 1096|      2|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      2|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|  1.01k|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  300|  1.01k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 15, False: 997]
  |  |  ------------------
  ------------------
 1098|     15|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     15|    {                                                                          \
  |  |  135|     15|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     15|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|     15|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 14]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     15|    }
  ------------------
 1099|     14|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  300|     14|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 2, False: 12]
  |  |  ------------------
  ------------------
 1100|      2|        *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  242|      2|#  define MINBPC(enc) 1
  ------------------
 1101|      2|        return XML_TOK_COND_SECT_CLOSE;
  ------------------
  |  |  103|      2|#define XML_TOK_COND_SECT_CLOSE 34      /* ]]> */
  ------------------
 1102|      2|      }
 1103|     14|    }
 1104|  1.00k|    *nextTokPtr = ptr;
 1105|  1.00k|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|  1.00k|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  4.11M|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 4.11M, False: 464k]
  ------------------
 1107|  4.11M|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  4.11M|#  define MINBPC(enc) 1
  ------------------
 1108|  4.11M|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  4.11M|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|  56.8k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 56.8k, False: 4.52M]
  ------------------
 1110|  56.8k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  56.8k|#  define MINBPC(enc) 1
  ------------------
 1111|  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 (1111:9): [True: 21, False: 56.8k]
  ------------------
 1112|     21|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|     21|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|  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)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 7, False: 56.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|  4.33k|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 4.33k, False: 52.4k]
  ------------------
 1115|  4.33k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  4.33k|#  define MINBPC(enc) 1
  ------------------
 1116|  4.33k|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|  4.33k|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|  3.17k|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 3.17k, False: 53.6k]
  ------------------
 1118|  3.17k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.17k|#  define MINBPC(enc) 1
  ------------------
 1119|  3.17k|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|  3.17k|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|  4.66k|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 4.66k, False: 52.1k]
  ------------------
 1121|  4.66k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  4.66k|#  define MINBPC(enc) 1
  ------------------
 1122|  4.66k|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|  4.66k|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|    892|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 892, False: 55.9k]
  ------------------
 1124|  1.21k|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 321, False: 56.4k]
  ------------------
 1125|  26.3k|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 25.0k, False: 31.7k]
  ------------------
 1126|  27.8k|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 1.50k, False: 55.3k]
  ------------------
 1127|  32.2k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 4.43k, False: 52.3k]
  ------------------
 1128|  41.8k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 9.59k, False: 47.2k]
  ------------------
 1129|  44.6k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 2.79k, False: 54.0k]
  ------------------
 1130|  44.6k|      *nextTokPtr = ptr;
 1131|  44.6k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  44.6k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|  56.8k|    }
 1133|      7|    *nextTokPtr = ptr;
 1134|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
 1135|  18.2k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 18.2k, False: 4.55M]
  ------------------
 1136|  18.2k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  18.2k|#  define MINBPC(enc) 1
  ------------------
 1137|  18.2k|    return XML_TOK_OR;
  ------------------
  |  |   88|  18.2k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  19.5k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 19.5k, False: 4.55M]
  ------------------
 1139|  19.5k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  19.5k|#  define MINBPC(enc) 1
  ------------------
 1140|  19.5k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  19.5k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  26.4k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 26.4k, False: 4.55M]
  ------------------
 1142|  26.4k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  26.4k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  26.4k|#  define MINBPC(enc) 1
  ------------------
 1143|      0|#  define LEAD_CASE(n)                                                         \
 1144|      0|  case BT_LEAD##n:                                                             \
 1145|      0|    if (end - ptr < n)                                                         \
 1146|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
 1147|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
 1148|      0|      *nextTokPtr = ptr;                                                       \
 1149|      0|      return XML_TOK_INVALID;                                                  \
 1150|      0|    }                                                                          \
 1151|      0|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
 1152|      0|      ptr += n;                                                                \
 1153|      0|      tok = XML_TOK_NAME;                                                      \
 1154|      0|      break;                                                                   \
 1155|      0|    }                                                                          \
 1156|      0|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
 1157|      0|      ptr += n;                                                                \
 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
 1159|      0|      break;                                                                   \
 1160|      0|    }                                                                          \
 1161|      0|    *nextTokPtr = ptr;                                                         \
 1162|      0|    return XML_TOK_INVALID;
 1163|  1.56k|    LEAD_CASE(2)
  ------------------
  |  | 1144|      2|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 460, False: 4.57M]
  |  |  ------------------
  |  | 1145|    460|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 6, False: 454]
  |  |  ------------------
  |  | 1146|      6|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      6|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|    454|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|    454|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    454|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 5, False: 449]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      5|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      5|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      5|    }                                                                          \
  |  | 1151|    454|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|    449|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    449|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 249, False: 200]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|    249|      ptr += n;                                                                \
  |  | 1153|    249|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|    249|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|    249|      break;                                                                   \
  |  | 1155|    249|    }                                                                          \
  |  | 1156|    449|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|    200|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    200|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 198, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|    198|      ptr += n;                                                                \
  |  | 1158|    198|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|    198|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|    198|      break;                                                                   \
  |  | 1160|    198|    }                                                                          \
  |  | 1161|    200|    *nextTokPtr = ptr;                                                         \
  |  | 1162|      2|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1164|  1.58k|    LEAD_CASE(3)
  ------------------
  |  | 1144|     16|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 472, False: 4.57M]
  |  |  ------------------
  |  | 1145|    472|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 3, False: 469]
  |  |  ------------------
  |  | 1146|     16|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|    469|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|    469|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    469|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 41, False: 428]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|     41|      *nextTokPtr = ptr;                                                       \
  |  | 1149|     41|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     41|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|     41|    }                                                                          \
  |  | 1151|    469|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|    428|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    428|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 212, False: 216]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|    212|      ptr += n;                                                                \
  |  | 1153|    212|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|    212|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|    212|      break;                                                                   \
  |  | 1155|    212|    }                                                                          \
  |  | 1156|    428|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|    216|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    216|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 200, False: 16]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|    200|      ptr += n;                                                                \
  |  | 1158|    200|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|    200|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|    200|      break;                                                                   \
  |  | 1160|    200|    }                                                                          \
  |  | 1161|    216|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     16|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1165|    152|    LEAD_CASE(4)
  ------------------
  |  | 1144|     17|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 60, False: 4.57M]
  |  |  ------------------
  |  | 1145|     60|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 2, False: 58]
  |  |  ------------------
  |  | 1146|     17|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     58|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|     58|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     58|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 41, False: 17]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|     41|      *nextTokPtr = ptr;                                                       \
  |  | 1149|     41|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     41|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|     41|    }                                                                          \
  |  | 1151|     58|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|     17|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     17|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 0, False: 17]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|     17|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|     17|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     17|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 0, False: 17]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|     17|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     17|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|  80.3k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 80.3k, False: 4.49M]
  ------------------
 1168|   118k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 37.7k, False: 4.54M]
  ------------------
 1169|   118k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|   118k|#define XML_TOK_NAME 18
  ------------------
 1170|   118k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|   118k|#  define MINBPC(enc) 1
  ------------------
 1171|   118k|    break;
 1172|  1.25k|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 1.25k, False: 4.57M]
  ------------------
 1173|  1.56k|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 313, False: 4.57M]
  ------------------
 1174|  1.78k|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 216, False: 4.57M]
  ------------------
 1175|  1.78k|#  ifdef XML_NS
 1176|  1.78k|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 4.57M]
  ------------------
 1177|  1.78k|#  endif
 1178|  1.78k|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|  1.78k|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|  1.78k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.78k|#  define MINBPC(enc) 1
  ------------------
 1180|  1.78k|    break;
 1181|      0|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 0, False: 4.57M]
  ------------------
 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|     54|  default:
  ------------------
  |  Branch (1193:3): [True: 54, False: 4.57M]
  ------------------
 1194|     54|    *nextTokPtr = ptr;
 1195|     54|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     54|#define XML_TOK_INVALID 0
  ------------------
 1196|  4.57M|  }
 1197|  2.14M|  while (HAS_CHAR(enc, ptr, end)) {
 1198|  2.14M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.14M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.14M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1199|  6.29M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  2.02M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 2.14M]
  |  |  ------------------
  |  |   82|  2.02M|    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.02M|    /* fall through */                                                         \
  |  |   87|  2.02M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 259k, False: 1.88M]
  |  |  ------------------
  |  |   88|  1.99M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.73M, False: 416k]
  |  |  ------------------
  |  |   89|  2.01M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 29.2k, False: 2.11M]
  |  |  ------------------
  |  |   90|  2.02M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 3.97k, False: 2.14M]
  |  |  ------------------
  |  |   91|  2.02M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 2.39k, False: 2.14M]
  |  |  ------------------
  |  |   92|  2.02M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  2.02M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  2.02M|    break;                                                                     \
  |  |   94|  2.02M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    280|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 301, False: 2.14M]
  |  |  |  |  ------------------
  |  |  |  |   71|    301|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 298]
  |  |  |  |  ------------------
  |  |  |  |   72|    280|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    298|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    596|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    298|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 14, False: 284]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    284|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    284|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 4, False: 280]
  |  |  |  |  ------------------
  |  |  |  |   74|     18|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     18|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     18|    }                                                                          \
  |  |  |  |   77|    298|    ptr += n;                                                                  \
  |  |  |  |   78|    280|    break;
  |  |  ------------------
  |  |   95|    280|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    266|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 273, False: 2.14M]
  |  |  |  |  ------------------
  |  |  |  |   71|    273|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 271]
  |  |  |  |  ------------------
  |  |  |  |   72|    266|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    271|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    542|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    271|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 267]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    267|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    267|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 266]
  |  |  |  |  ------------------
  |  |  |  |   74|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      5|    }                                                                          \
  |  |  |  |   77|    271|    ptr += n;                                                                  \
  |  |  |  |   78|    266|    break;
  |  |  ------------------
  |  |   96|    266|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 19, False: 2.14M]
  |  |  |  |  ------------------
  |  |  |  |   71|     19|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 17]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     17|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     34|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     17|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 14, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      3|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      3|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     17|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     17|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     17|    }                                                                          \
  |  |  |  |   77|     17|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
 1200|  6.73k|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 6.73k, False: 2.14M]
  ------------------
 1201|  46.9k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 40.2k, False: 2.10M]
  ------------------
 1202|  47.2k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 333, False: 2.14M]
  ------------------
 1203|  51.2k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 3.96k, False: 2.14M]
  ------------------
 1204|  53.9k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 2.70k, False: 2.14M]
  ------------------
 1205|  53.9k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 6, False: 2.14M]
  ------------------
 1206|  66.4k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 12.4k, False: 2.13M]
  ------------------
 1207|   103k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 36.9k, False: 2.11M]
  ------------------
 1208|   114k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 11.3k, False: 2.13M]
  ------------------
 1209|   114k|      *nextTokPtr = ptr;
 1210|   114k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 2.14M]
  ------------------
 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|  3.64k|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 3.64k, False: 2.14M]
  ------------------
 1232|  3.64k|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|  3.64k|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 1, False: 3.63k]
  ------------------
 1233|      1|        *nextTokPtr = ptr;
 1234|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1235|      1|      }
 1236|  3.63k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.63k|#  define MINBPC(enc) 1
  ------------------
 1237|  3.63k|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|  3.63k|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    688|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 688, False: 2.14M]
  ------------------
 1239|    688|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    688|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 687]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|    687|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|    687|#  define MINBPC(enc) 1
  ------------------
 1244|    687|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    687|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|  1.36k|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 1.36k, False: 2.14M]
  ------------------
 1246|  1.36k|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|  1.36k|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 1, False: 1.36k]
  ------------------
 1247|      1|        *nextTokPtr = ptr;
 1248|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1249|      1|      }
 1250|  1.36k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.36k|#  define MINBPC(enc) 1
  ------------------
 1251|  1.36k|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|  1.36k|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     37|    default:
  ------------------
  |  Branch (1252:5): [True: 37, False: 2.14M]
  ------------------
 1253|     37|      *nextTokPtr = ptr;
 1254|     37|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     37|#define XML_TOK_INVALID 0
  ------------------
 1255|  2.14M|    }
 1256|  2.14M|  }
 1257|    215|  return -tok;
 1258|   120k|}
xmltok.c:normal_scanLit:
  984|  17.7k|                const char **nextTokPtr) {
  985|  10.2M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  10.2M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  10.2M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  10.2M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  987|  10.2M|    switch (t) {
  988|   182k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  56.3k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  56.3k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 56.3k, False: 10.1M]
  |  |  |  |  ------------------
  |  |  |  |   50|  56.3k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 56.3k]
  |  |  |  |  ------------------
  |  |  |  |   51|  56.3k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  56.3k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  56.3k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  56.3k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 15, False: 56.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     15|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     15|    }                                                                          \
  |  |  |  |   56|  56.3k|    ptr += n;                                                                  \
  |  |  |  |   57|  56.3k|    break;
  |  |  ------------------
  |  |   61|  56.3k|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  31.0k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 31.0k, False: 10.2M]
  |  |  |  |  ------------------
  |  |  |  |   50|  31.0k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 31.0k]
  |  |  |  |  ------------------
  |  |  |  |   51|  31.0k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  31.0k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  31.0k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  31.0k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 31.0k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      2|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      2|    }                                                                          \
  |  |  |  |   56|  31.0k|    ptr += n;                                                                  \
  |  |  |  |   57|  31.0k|    break;
  |  |  ------------------
  |  |   62|  31.0k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  4.02k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 4.04k, False: 10.2M]
  |  |  |  |  ------------------
  |  |  |  |   50|  4.04k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 4.04k]
  |  |  |  |  ------------------
  |  |  |  |   51|  4.02k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  4.04k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  4.04k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  4.04k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 4.02k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     11|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     11|    }                                                                          \
  |  |  |  |   56|  4.04k|    ptr += n;                                                                  \
  |  |  |  |   57|  4.02k|    break;
  |  |  ------------------
  |  |   63|  4.02k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 9, False: 10.2M]
  |  |  ------------------
  |  |   64|     10|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 1, False: 10.2M]
  |  |  ------------------
  |  |   65|     14|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 10.2M]
  |  |  ------------------
  |  |   66|     14|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     14|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  7.32k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 7.32k, False: 10.2M]
  ------------------
  990|   450k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 443k, False: 9.79M]
  ------------------
  991|   450k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   450k|#  define MINBPC(enc) 1
  ------------------
  992|   450k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 432k, False: 17.6k]
  ------------------
  993|   432k|        break;
  994|  17.6k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  17.6k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  17.6k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  17.6k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 3, False: 17.6k]
  ------------------
  995|      3|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      3|#define XML_TOK_LITERAL 27
  ------------------
  996|  17.6k|      *nextTokPtr = ptr;
  997|  17.6k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  17.6k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  17.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  998|  8.54k|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 8.54k, False: 9.07k]
  ------------------
  999|  10.6k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 2.07k, False: 15.5k]
  ------------------
 1000|  11.9k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 1.34k, False: 16.2k]
  ------------------
 1001|  17.5k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 5.61k, False: 12.0k]
  ------------------
 1002|  17.6k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 27, False: 17.5k]
  ------------------
 1003|  17.6k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 10, False: 17.6k]
  ------------------
 1004|  17.6k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  17.6k|#define XML_TOK_LITERAL 27
  ------------------
 1005|      7|      default:
  ------------------
  |  Branch (1005:7): [True: 7, False: 17.6k]
  ------------------
 1006|      7|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
 1007|  17.6k|      }
 1008|  9.69M|    default:
  ------------------
  |  Branch (1008:5): [True: 9.69M, False: 541k]
  ------------------
 1009|  9.69M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  9.69M|#  define MINBPC(enc) 1
  ------------------
 1010|  9.69M|      break;
 1011|  10.2M|    }
 1012|  10.2M|  }
 1013|     69|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     69|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  17.7k|}
xmltok.c:normal_scanDecl:
  183|  23.7k|                 const char **nextTokPtr) {
  184|  23.7k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  23.7k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  23.7k|    {                                                                          \
  |  |  |  |  135|  23.7k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  23.7k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  23.7k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 9, False: 23.7k]
  |  |  |  |  ------------------
  |  |  |  |  136|      9|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      9|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      9|      }                                                                        \
  |  |  |  |  138|  23.7k|    }
  |  |  ------------------
  ------------------
  185|  23.7k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  23.7k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  23.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  186|    809|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 809, False: 22.9k]
  ------------------
  187|    809|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|    809|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|    809|#  define MINBPC(enc) 1
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 23.7k]
  ------------------
  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.44k|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 1.44k, False: 22.2k]
  ------------------
  192|  22.9k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 21.4k, False: 2.25k]
  ------------------
  193|  22.9k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  22.9k|#  define MINBPC(enc) 1
  ------------------
  194|  22.9k|    break;
  195|      5|  default:
  ------------------
  |  Branch (195:3): [True: 5, False: 23.7k]
  ------------------
  196|      5|    *nextTokPtr = ptr;
  197|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  198|  23.7k|  }
  199|   155k|  while (HAS_CHAR(enc, ptr, end)) {
  200|   155k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   155k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   155k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  201|     10|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 10, False: 155k]
  ------------------
  202|     10|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     10|    {                                                                          \
  |  |  135|     10|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     10|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|     10|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 2, False: 8]
  |  |  ------------------
  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      2|      }                                                                        \
  |  |  138|     10|    }
  ------------------
  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|  7.76k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 7.76k, False: 147k]
  ------------------
  214|  16.2k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 8.46k, False: 146k]
  ------------------
  215|  22.8k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 6.63k, False: 148k]
  ------------------
  216|  22.8k|      *nextTokPtr = ptr;
  217|  22.8k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  22.8k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|   116k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 116k, False: 38.7k]
  ------------------
  219|   132k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 15.8k, False: 139k]
  ------------------
  220|   132k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   132k|#  define MINBPC(enc) 1
  ------------------
  221|   132k|      break;
  222|     16|    default:
  ------------------
  |  Branch (222:5): [True: 16, False: 155k]
  ------------------
  223|     16|      *nextTokPtr = ptr;
  224|     16|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  225|   155k|    }
  226|   155k|  }
  227|     34|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     34|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  22.9k|}
xmltok.c:normal_scanComment:
  146|  1.25k|                    const char **nextTokPtr) {
  147|  1.25k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  1.25k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.25k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.25k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 1.24k, False: 8]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|  1.24k|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  300|  1.24k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (148:9): [True: 12, False: 1.23k]
  ------------------
  149|     12|      *nextTokPtr = ptr;
  150|     12|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  151|     12|    }
  152|  1.23k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.23k|#  define MINBPC(enc) 1
  ------------------
  153|  2.43M|    while (HAS_CHAR(enc, ptr, end)) {
  154|  2.43M|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.43M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.43M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  155|  4.76M|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  4.74k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  4.73k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 4.74k, False: 2.43M]
  |  |  |  |  ------------------
  |  |  |  |   50|  4.74k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 4.74k]
  |  |  |  |  ------------------
  |  |  |  |   51|  4.73k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  4.74k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  4.74k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  4.74k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 8, False: 4.73k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      8|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      8|    }                                                                          \
  |  |  |  |   56|  4.74k|    ptr += n;                                                                  \
  |  |  |  |   57|  4.73k|    break;
  |  |  ------------------
  |  |   61|  2.35M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.35M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.35M, False: 79.5k]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.35M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 2.35M]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.35M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.35M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.35M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.35M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 2.35M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      1|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      1|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      1|    }                                                                          \
  |  |  |  |   56|  2.35M|    ptr += n;                                                                  \
  |  |  |  |   57|  2.35M|    break;
  |  |  ------------------
  |  |   62|  2.35M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  17.6k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 17.6k, False: 2.42M]
  |  |  |  |  ------------------
  |  |  |  |   50|  17.6k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 17.6k]
  |  |  |  |  ------------------
  |  |  |  |   51|  17.6k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  17.6k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  17.6k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  17.6k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 17.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      1|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      1|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      1|    }                                                                          \
  |  |  |  |   56|  17.6k|    ptr += n;                                                                  \
  |  |  |  |   57|  17.6k|    break;
  |  |  ------------------
  |  |   63|  17.6k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 7, False: 2.43M]
  |  |  ------------------
  |  |   64|     10|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 3, False: 2.43M]
  |  |  ------------------
  |  |   65|     13|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 3, False: 2.43M]
  |  |  ------------------
  |  |   66|     13|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     13|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  1.54k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 1.54k, False: 2.43M]
  ------------------
  157|  1.54k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.54k|#  define MINBPC(enc) 1
  ------------------
  158|  1.54k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.54k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.54k|    {                                                                          \
  |  |  |  |  135|  1.54k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.54k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.54k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 1.54k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  1.54k|    }
  |  |  ------------------
  ------------------
  159|  1.54k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  300|  1.54k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1.11k, False: 436]
  |  |  ------------------
  ------------------
  160|  1.11k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.11k|#  define MINBPC(enc) 1
  ------------------
  161|  1.11k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.11k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.11k|    {                                                                          \
  |  |  |  |  135|  1.11k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.11k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.11k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.11k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.11k|    }
  |  |  ------------------
  ------------------
  162|  1.11k|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  1.11k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (162:15): [True: 26, False: 1.08k]
  ------------------
  163|     26|            *nextTokPtr = ptr;
  164|     26|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     26|#define XML_TOK_INVALID 0
  ------------------
  165|     26|          }
  166|  1.08k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.08k|#  define MINBPC(enc) 1
  ------------------
  167|  1.08k|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|  1.08k|#define XML_TOK_COMMENT 13
  ------------------
  168|  1.11k|        }
  169|    436|        break;
  170|  55.6k|      default:
  ------------------
  |  Branch (170:7): [True: 55.6k, False: 2.38M]
  ------------------
  171|  55.6k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  55.6k|#  define MINBPC(enc) 1
  ------------------
  172|  55.6k|        break;
  173|  2.43M|      }
  174|  2.43M|    }
  175|  1.23k|  }
  176|     99|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     99|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|  1.25k|}
xmltok.c:normal_scanPi:
  277|  6.74k|               const char **nextTokPtr) {
  278|  6.74k|  int tok;
  279|  6.74k|  const char *target = ptr;
  280|  6.74k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.74k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.74k|    {                                                                          \
  |  |  |  |  135|  6.74k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.74k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  6.74k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 10, False: 6.73k]
  |  |  |  |  ------------------
  |  |  |  |  136|     10|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     10|      }                                                                        \
  |  |  |  |  138|  6.74k|    }
  |  |  ------------------
  ------------------
  281|  6.73k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  6.73k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  6.73k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  282|  5.40k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  6.05k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 6.73k]
  |  |  ------------------
  |  |  111|  6.05k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  6.05k|    /* fall through */                                                         \
  |  |  116|  6.05k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.05k, False: 2.68k]
  |  |  ------------------
  |  |  117|  6.05k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 2.00k, False: 4.73k]
  |  |  ------------------
  |  |  118|  6.05k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  6.05k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  6.05k|    break;                                                                     \
  |  |  120|  6.05k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    347|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 353, False: 6.38k]
  |  |  |  |  ------------------
  |  |  |  |  100|    353|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 352]
  |  |  |  |  ------------------
  |  |  |  |  101|    347|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    352|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    704|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    352|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 351]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    351|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    351|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 4, False: 347]
  |  |  |  |  ------------------
  |  |  |  |  103|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      5|    }                                                                          \
  |  |  |  |  106|    352|    ptr += n;                                                                  \
  |  |  |  |  107|    347|    break;
  |  |  ------------------
  |  |  121|    347|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    301|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 312, False: 6.42k]
  |  |  |  |  ------------------
  |  |  |  |  100|    312|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 310]
  |  |  |  |  ------------------
  |  |  |  |  101|    301|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    310|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    620|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    310|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 307]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    307|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    307|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 6, False: 301]
  |  |  |  |  ------------------
  |  |  |  |  103|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      9|    }                                                                          \
  |  |  |  |  106|    310|    ptr += n;                                                                  \
  |  |  |  |  107|    301|    break;
  |  |  ------------------
  |  |  122|    301|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 12, False: 6.72k]
  |  |  |  |  ------------------
  |  |  |  |  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: 6, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      4|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      4|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 4, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|     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;
  |  |  ------------------
  ------------------
  283|      3|  default:
  ------------------
  |  Branch (283:3): [True: 3, False: 6.73k]
  ------------------
  284|      3|    *nextTokPtr = ptr;
  285|      3|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  286|  6.73k|  }
  287|  1.34M|  while (HAS_CHAR(enc, ptr, end)) {
  288|  1.34M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.34M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.34M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  289|  5.22M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.33M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 1.34M]
  |  |  ------------------
  |  |   82|  1.33M|    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.33M|    /* fall through */                                                         \
  |  |   87|  1.33M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.26M, False: 81.5k]
  |  |  ------------------
  |  |   88|  1.27M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 4.90k, False: 1.34M]
  |  |  ------------------
  |  |   89|  1.33M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 60.5k, False: 1.28M]
  |  |  ------------------
  |  |   90|  1.33M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 279, False: 1.34M]
  |  |  ------------------
  |  |   91|  1.33M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 3.80k, False: 1.34M]
  |  |  ------------------
  |  |   92|  1.33M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.33M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  1.33M|    break;                                                                     \
  |  |   94|  1.33M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    471|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 483, False: 1.34M]
  |  |  |  |  ------------------
  |  |  |  |   71|    483|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 482]
  |  |  |  |  ------------------
  |  |  |  |   72|    471|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    482|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    964|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    482|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 475]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    475|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    475|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 4, False: 471]
  |  |  |  |  ------------------
  |  |  |  |   74|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     11|    }                                                                          \
  |  |  |  |   77|    482|    ptr += n;                                                                  \
  |  |  |  |   78|    471|    break;
  |  |  ------------------
  |  |   95|  5.00k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  4.99k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 5.00k, False: 1.34M]
  |  |  |  |  ------------------
  |  |  |  |   71|  5.00k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 5.00k]
  |  |  |  |  ------------------
  |  |  |  |   72|  4.99k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  5.00k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  10.0k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  5.00k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 5.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  5.00k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  5.00k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 10, False: 4.99k]
  |  |  |  |  ------------------
  |  |  |  |   74|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     13|    }                                                                          \
  |  |  |  |   77|  5.00k|    ptr += n;                                                                  \
  |  |  |  |   78|  4.99k|    break;
  |  |  ------------------
  |  |   96|  4.99k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 19, False: 1.34M]
  |  |  |  |  ------------------
  |  |  |  |   71|     19|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 17]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     17|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     34|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     17|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 13, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      4|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      4|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 4, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     17|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     17|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     17|    }                                                                          \
  |  |  |  |   77|     17|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  290|  1.52k|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 1.52k, False: 1.34M]
  ------------------
  291|  2.00k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 478, False: 1.34M]
  ------------------
  292|  2.92k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 926, False: 1.34M]
  ------------------
  293|  2.92k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  303|  2.92k|#define PREFIX(ident) normal_##ident
  ------------------
  |  Branch (293:11): [True: 2, False: 2.92k]
  ------------------
  294|      2|        *nextTokPtr = ptr;
  295|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  296|      2|      }
  297|  2.92k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.92k|#  define MINBPC(enc) 1
  ------------------
  298|  6.15M|      while (HAS_CHAR(enc, ptr, end)) {
  299|  6.15M|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  6.15M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  6.15M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  300|  12.2M|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  1.55k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.54k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.55k, False: 6.15M]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.55k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 4, False: 1.55k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.54k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.55k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.55k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.55k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 1.54k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      4|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      4|    }                                                                          \
  |  |  |  |   56|  1.55k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.54k|    break;
  |  |  ------------------
  |  |   61|  6.12M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  6.12M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 6.12M, False: 27.8k]
  |  |  |  |  ------------------
  |  |  |  |   50|  6.12M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 6.12M]
  |  |  |  |  ------------------
  |  |  |  |   51|  6.12M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  6.12M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  6.12M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  6.12M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 6.12M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      3|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      3|    }                                                                          \
  |  |  |  |   56|  6.12M|    ptr += n;                                                                  \
  |  |  |  |   57|  6.12M|    break;
  |  |  ------------------
  |  |   62|  6.12M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.27k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.28k, False: 6.15M]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.28k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 1.27k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.27k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.27k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.27k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.27k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 8, False: 1.27k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      8|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      8|    }                                                                          \
  |  |  |  |   56|  1.27k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.27k|    break;
  |  |  ------------------
  |  |   63|  1.27k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 6, False: 6.15M]
  |  |  ------------------
  |  |   64|      7|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 1, False: 6.15M]
  |  |  ------------------
  |  |   65|     13|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 6, False: 6.15M]
  |  |  ------------------
  |  |   66|     13|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     13|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  3.82k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 3.82k, False: 6.14M]
  ------------------
  302|  3.82k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.82k|#  define MINBPC(enc) 1
  ------------------
  303|  3.82k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.82k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.82k|    {                                                                          \
  |  |  |  |  135|  3.82k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.82k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.82k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 3.82k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  3.82k|    }
  |  |  ------------------
  ------------------
  304|  3.82k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  3.82k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 2.73k, False: 1.08k]
  |  |  ------------------
  ------------------
  305|  2.73k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.73k|#  define MINBPC(enc) 1
  ------------------
  306|  2.73k|            return tok;
  307|  2.73k|          }
  308|  1.08k|          break;
  309|  21.1k|        default:
  ------------------
  |  Branch (309:9): [True: 21.1k, False: 6.13M]
  ------------------
  310|  21.1k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  21.1k|#  define MINBPC(enc) 1
  ------------------
  311|  21.1k|          break;
  312|  6.15M|        }
  313|  6.15M|      }
  314|    153|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    153|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  3.64k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 3.64k, False: 1.34M]
  ------------------
  316|  3.64k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  303|  3.64k|#define PREFIX(ident) normal_##ident
  ------------------
  |  Branch (316:11): [True: 2, False: 3.64k]
  ------------------
  317|      2|        *nextTokPtr = ptr;
  318|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  319|      2|      }
  320|  3.64k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.64k|#  define MINBPC(enc) 1
  ------------------
  321|  3.64k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.64k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.64k|    {                                                                          \
  |  |  |  |  135|  3.64k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.64k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.64k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 29, False: 3.61k]
  |  |  |  |  ------------------
  |  |  |  |  136|     29|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     29|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     29|      }                                                                        \
  |  |  |  |  138|  3.64k|    }
  |  |  ------------------
  ------------------
  322|  3.61k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  3.61k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 3.59k, False: 25]
  |  |  ------------------
  ------------------
  323|  3.59k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.59k|#  define MINBPC(enc) 1
  ------------------
  324|  3.59k|        return tok;
  325|  3.59k|      }
  326|       |      /* fall through */
  327|     35|    default:
  ------------------
  |  Branch (327:5): [True: 10, False: 1.34M]
  ------------------
  328|     35|      *nextTokPtr = ptr;
  329|     35|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     35|#define XML_TOK_INVALID 0
  ------------------
  330|  1.34M|    }
  331|  1.34M|  }
  332|     69|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     69|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  6.70k|}
xmltok.c:normal_checkPiTarget:
  232|  6.57k|                      int *tokPtr) {
  233|  6.57k|  int upper = 0;
  234|  6.57k|  UNUSED_P(enc);
  ------------------
  |  |  135|  6.57k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  6.57k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  6.57k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  6.57k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  242|  6.57k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (236:7): [True: 4.36k, False: 2.21k]
  ------------------
  237|  4.36k|    return 1;
  238|  2.21k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  2.21k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  239|  1.19k|  case ASCII_x:
  ------------------
  |  |   86|  1.19k|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 1.19k, False: 1.01k]
  ------------------
  240|  1.19k|    break;
  241|    428|  case ASCII_X:
  ------------------
  |  |   59|    428|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 428, False: 1.78k]
  ------------------
  242|    428|    upper = 1;
  243|    428|    break;
  244|    589|  default:
  ------------------
  |  Branch (244:3): [True: 589, False: 1.62k]
  ------------------
  245|    589|    return 1;
  246|  2.21k|  }
  247|  1.62k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.62k|#  define MINBPC(enc) 1
  ------------------
  248|  1.62k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  1.62k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  249|    767|  case ASCII_m:
  ------------------
  |  |   75|    767|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 767, False: 854]
  ------------------
  250|    767|    break;
  251|    455|  case ASCII_M:
  ------------------
  |  |   48|    455|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 455, False: 1.16k]
  ------------------
  252|    455|    upper = 1;
  253|    455|    break;
  254|    399|  default:
  ------------------
  |  Branch (254:3): [True: 399, False: 1.22k]
  ------------------
  255|    399|    return 1;
  256|  1.62k|  }
  257|  1.22k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.22k|#  define MINBPC(enc) 1
  ------------------
  258|  1.22k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  1.22k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  259|    259|  case ASCII_l:
  ------------------
  |  |   74|    259|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 259, False: 963]
  ------------------
  260|    259|    break;
  261|      2|  case ASCII_L:
  ------------------
  |  |   47|      2|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 2, False: 1.22k]
  ------------------
  262|      2|    upper = 1;
  263|      2|    break;
  264|    961|  default:
  ------------------
  |  Branch (264:3): [True: 961, False: 261]
  ------------------
  265|    961|    return 1;
  266|  1.22k|  }
  267|    261|  if (upper)
  ------------------
  |  Branch (267:7): [True: 4, False: 257]
  ------------------
  268|      4|    return 0;
  269|    257|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|    257|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|    257|  return 1;
  271|    261|}
xmltok.c:normal_scanPercent:
  924|  3.14k|                    const char **nextTokPtr) {
  925|  3.14k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.14k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.14k|    {                                                                          \
  |  |  |  |  135|  3.14k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.14k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.14k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 31, False: 3.11k]
  |  |  |  |  ------------------
  |  |  |  |  136|     31|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     31|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     31|      }                                                                        \
  |  |  |  |  138|  3.14k|    }
  |  |  ------------------
  ------------------
  926|  3.11k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.11k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.11k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  927|  1.46k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.00k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 3.11k]
  |  |  ------------------
  |  |  111|  1.00k|    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.00k|    /* fall through */                                                         \
  |  |  116|  1.00k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 626, False: 2.48k]
  |  |  ------------------
  |  |  117|  1.00k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 380, False: 2.73k]
  |  |  ------------------
  |  |  118|  1.00k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.00k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  1.00k|    break;                                                                     \
  |  |  120|  1.00k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    310|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 332, False: 2.78k]
  |  |  |  |  ------------------
  |  |  |  |  100|    332|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 330]
  |  |  |  |  ------------------
  |  |  |  |  101|    310|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    330|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    660|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    330|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 16, False: 314]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    314|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    314|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 4, False: 310]
  |  |  |  |  ------------------
  |  |  |  |  103|     20|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     20|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     20|    }                                                                          \
  |  |  |  |  106|    330|    ptr += n;                                                                  \
  |  |  |  |  107|    310|    break;
  |  |  ------------------
  |  |  121|    310|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|     70|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 74, False: 3.03k]
  |  |  |  |  ------------------
  |  |  |  |  100|     74|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 73]
  |  |  |  |  ------------------
  |  |  |  |  101|     70|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     73|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    146|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     73|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 71]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|     71|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     71|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 70]
  |  |  |  |  ------------------
  |  |  |  |  103|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|     73|    ptr += n;                                                                  \
  |  |  |  |  107|     70|    break;
  |  |  ------------------
  |  |  122|     70|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 15, False: 3.09k]
  |  |  |  |  ------------------
  |  |  |  |  100|     15|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 13]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     13|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     26|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     13|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 12, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      1|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      1|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     13|    }                                                                          \
  |  |  |  |  106|     13|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  928|    338|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 338, False: 2.77k]
  ------------------
  929|    936|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 598, False: 2.51k]
  ------------------
  930|  1.68k|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 744, False: 2.36k]
  ------------------
  931|  1.68k|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 4, False: 3.10k]
  ------------------
  932|  1.68k|    *nextTokPtr = ptr;
  933|  1.68k|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|  1.68k|#define XML_TOK_PERCENT 22
  ------------------
  934|      1|  default:
  ------------------
  |  Branch (934:3): [True: 1, False: 3.11k]
  ------------------
  935|      1|    *nextTokPtr = ptr;
  936|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  937|  3.11k|  }
  938|  4.44k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  4.44k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.44k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.44k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  940|  8.37k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  2.69k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 4.44k]
  |  |  ------------------
  |  |   82|  2.69k|    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.69k|    /* fall through */                                                         \
  |  |   87|  2.69k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 553, False: 3.89k]
  |  |  ------------------
  |  |   88|  2.04k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.48k, False: 2.95k]
  |  |  ------------------
  |  |   89|  2.30k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 261, False: 4.18k]
  |  |  ------------------
  |  |   90|  2.50k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 197, False: 4.25k]
  |  |  ------------------
  |  |   91|  2.69k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 197, False: 4.25k]
  |  |  ------------------
  |  |   92|  2.69k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  2.69k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  2.69k|    break;                                                                     \
  |  |   94|  2.69k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    238|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 253, False: 4.19k]
  |  |  |  |  ------------------
  |  |  |  |   71|    253|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 252]
  |  |  |  |  ------------------
  |  |  |  |   72|    238|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    252|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    504|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    252|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 241]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    241|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    241|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 238]
  |  |  |  |  ------------------
  |  |  |  |   74|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     14|    }                                                                          \
  |  |  |  |   77|    252|    ptr += n;                                                                  \
  |  |  |  |   78|    238|    break;
  |  |  ------------------
  |  |   95|    238|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    215|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 225, False: 4.22k]
  |  |  |  |  ------------------
  |  |  |  |   71|    225|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 224]
  |  |  |  |  ------------------
  |  |  |  |   72|    215|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    224|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    448|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    224|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 219]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    219|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    219|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 4, False: 215]
  |  |  |  |  ------------------
  |  |  |  |   74|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      9|    }                                                                          \
  |  |  |  |   77|    224|    ptr += n;                                                                  \
  |  |  |  |   78|    215|    break;
  |  |  ------------------
  |  |   96|    215|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 11, False: 4.43k]
  |  |  |  |  ------------------
  |  |  |  |   71|     11|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 10]
  |  |  |  |  ------------------
  |  |  |  |   72|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     10|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      5|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      5|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 5, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     10|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     10|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     10|    }                                                                          \
  |  |  |  |   77|     10|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  941|  1.24k|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 1.24k, False: 3.20k]
  ------------------
  942|  1.24k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.24k|#  define MINBPC(enc) 1
  ------------------
  943|  1.24k|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|  1.24k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|     15|    default:
  ------------------
  |  Branch (944:5): [True: 15, False: 4.43k]
  ------------------
  945|     15|      *nextTokPtr = ptr;
  946|     15|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  947|  4.44k|    }
  948|  4.44k|  }
  949|     89|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     89|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|  1.38k|}
xmltok.c:normal_scanPoundName:
  954|  26.4k|                      const char **nextTokPtr) {
  955|  26.4k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  26.4k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  26.4k|    {                                                                          \
  |  |  |  |  135|  26.4k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  26.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  26.4k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 26.4k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  26.4k|    }
  |  |  ------------------
  ------------------
  956|  26.4k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  26.4k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  26.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  957|  26.0k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  26.3k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 26.4k]
  |  |  ------------------
  |  |  111|  26.3k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  26.3k|    /* fall through */                                                         \
  |  |  116|  26.3k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 25.9k, False: 546]
  |  |  ------------------
  |  |  117|  26.3k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 491, False: 25.9k]
  |  |  ------------------
  |  |  118|  26.3k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  26.3k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  26.3k|    break;                                                                     \
  |  |  120|  26.3k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      6|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 22, False: 26.4k]
  |  |  |  |  ------------------
  |  |  |  |  100|     22|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 21]
  |  |  |  |  ------------------
  |  |  |  |  101|      6|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     21|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     42|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     21|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 13, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      8|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      8|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 6]
  |  |  |  |  ------------------
  |  |  |  |  103|     15|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     15|    }                                                                          \
  |  |  |  |  106|     21|    ptr += n;                                                                  \
  |  |  |  |  107|      6|    break;
  |  |  ------------------
  |  |  121|     14|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      6|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 14, False: 26.4k]
  |  |  |  |  ------------------
  |  |  |  |  100|     14|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 12]
  |  |  |  |  ------------------
  |  |  |  |  101|      6|      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: 4, False: 8]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      8|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      8|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 6]
  |  |  |  |  ------------------
  |  |  |  |  103|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      6|    }                                                                          \
  |  |  |  |  106|     12|    ptr += n;                                                                  \
  |  |  |  |  107|      6|    break;
  |  |  ------------------
  |  |  122|     18|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 18, False: 26.4k]
  |  |  |  |  ------------------
  |  |  |  |  100|     18|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 16]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     16|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     32|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     16|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 14, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      2|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      2|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|     16|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     16|    }                                                                          \
  |  |  |  |  106|     16|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  958|      1|  default:
  ------------------
  |  Branch (958:3): [True: 1, False: 26.4k]
  ------------------
  959|      1|    *nextTokPtr = ptr;
  960|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  961|  26.4k|  }
  962|   184k|  while (HAS_CHAR(enc, ptr, end)) {
  963|   184k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   184k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   184k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  964|   572k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   157k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 184k]
  |  |  ------------------
  |  |   82|   157k|    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|   157k|    /* fall through */                                                         \
  |  |   87|   157k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 99.4k, False: 85.1k]
  |  |  ------------------
  |  |   88|   156k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 57.3k, False: 127k]
  |  |  ------------------
  |  |   89|   157k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 450, False: 184k]
  |  |  ------------------
  |  |   90|   157k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 199, False: 184k]
  |  |  ------------------
  |  |   91|   157k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 213, False: 184k]
  |  |  ------------------
  |  |   92|   157k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   157k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|   157k|    break;                                                                     \
  |  |   94|   157k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    342|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 361, False: 184k]
  |  |  |  |  ------------------
  |  |  |  |   71|    361|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 359]
  |  |  |  |  ------------------
  |  |  |  |   72|    342|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    359|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    718|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    359|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 16, False: 343]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    343|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    343|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 342]
  |  |  |  |  ------------------
  |  |  |  |   74|     17|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     17|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     17|    }                                                                          \
  |  |  |  |   77|    359|    ptr += n;                                                                  \
  |  |  |  |   78|    342|    break;
  |  |  ------------------
  |  |   95|    342|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    269|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 292, False: 184k]
  |  |  |  |  ------------------
  |  |  |  |   71|    292|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 289]
  |  |  |  |  ------------------
  |  |  |  |   72|    269|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    289|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    578|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    289|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 10, False: 279]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    279|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    279|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 10, False: 269]
  |  |  |  |  ------------------
  |  |  |  |   74|     20|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     20|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     20|    }                                                                          \
  |  |  |  |   77|    289|    ptr += n;                                                                  \
  |  |  |  |   78|    269|    break;
  |  |  ------------------
  |  |   96|    269|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 25, False: 184k]
  |  |  |  |  ------------------
  |  |  |  |   71|     25|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 23]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     23|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     46|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     23|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 20, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      3|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      3|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     23|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     23|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     23|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     23|    }                                                                          \
  |  |  |  |   77|     23|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  965|  22.8k|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 22.8k, False: 161k]
  ------------------
  966|  23.5k|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 720, False: 183k]
  ------------------
  967|  24.3k|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 750, False: 183k]
  ------------------
  968|  24.9k|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 688, False: 183k]
  ------------------
  969|  26.0k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 1.01k, False: 183k]
  ------------------
  970|  26.0k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 2, False: 184k]
  ------------------
  971|  26.2k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 241, False: 184k]
  ------------------
  972|  26.2k|      *nextTokPtr = ptr;
  973|  26.2k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  26.2k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|     17|    default:
  ------------------
  |  Branch (974:5): [True: 17, False: 184k]
  ------------------
  975|     17|      *nextTokPtr = ptr;
  976|     17|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
  977|   184k|    }
  978|   184k|  }
  979|     68|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     68|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  26.4k|}
xmltok.c:normal_contentTok:
  824|  4.19M|                   const char **nextTokPtr) {
  825|  4.19M|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 106k, False: 4.08M]
  ------------------
  826|   106k|    return XML_TOK_NONE;
  ------------------
  |  |   51|   106k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|  4.08M|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|  4.08M|#  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.08M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.08M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.08M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  837|  2.25M|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 2.25M, False: 1.83M]
  ------------------
  838|  2.25M|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  2.25M|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  2.25M|#  define MINBPC(enc) 1
  ------------------
  839|   110k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 110k, False: 3.97M]
  ------------------
  840|   110k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|   110k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|   110k|#  define MINBPC(enc) 1
  ------------------
  841|  8.23k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 8.23k, False: 4.07M]
  ------------------
  842|  8.23k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  8.23k|#  define MINBPC(enc) 1
  ------------------
  843|  8.23k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  8.23k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  8.23k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  8.23k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 23, False: 8.21k]
  ------------------
  844|     23|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     23|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  8.21k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  8.21k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  8.21k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 5.16k, False: 3.04k]
  ------------------
  846|  5.16k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  5.16k|#  define MINBPC(enc) 1
  ------------------
  847|  8.21k|    *nextTokPtr = ptr;
  848|  8.21k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  8.21k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|  1.27M|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 1.27M, False: 2.80M]
  ------------------
  850|  1.27M|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.27M|#  define MINBPC(enc) 1
  ------------------
  851|  1.27M|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  1.27M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  4.58k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 4.58k, False: 4.08M]
  ------------------
  853|  4.58k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  4.58k|#  define MINBPC(enc) 1
  ------------------
  854|  4.58k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  4.58k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  4.58k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  4.58k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 404, False: 4.18k]
  ------------------
  855|    404|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|    404|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  4.18k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  300|  4.18k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (856:9): [True: 3.14k, False: 1.03k]
  ------------------
  857|  3.14k|      break;
  858|  1.03k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.03k|#  define MINBPC(enc) 1
  ------------------
  859|  1.03k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  1.03k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.03k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.03k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 269, False: 770]
  ------------------
  860|    269|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|    269|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|    770|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|    770|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (861:9): [True: 768, False: 2]
  ------------------
  862|    768|      ptr -= MINBPC(enc);
  ------------------
  |  |  242|    768|#  define MINBPC(enc) 1
  ------------------
  863|    768|      break;
  864|    768|    }
  865|      2|    *nextTokPtr = ptr;
  866|      2|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  867|  19.9k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  2.00k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.98k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.00k, False: 4.08M]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.00k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 9, False: 1.99k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.98k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      9|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.99k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.99k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.99k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 1.98k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     11|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     11|    }                                                                          \
  |  |  |  |   56|  1.99k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.98k|    break;
  |  |  ------------------
  |  |   61|  3.73k|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  3.71k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.73k, False: 4.08M]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.73k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 5, False: 3.72k]
  |  |  |  |  ------------------
  |  |  |  |   51|  3.71k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  3.72k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.72k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.72k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 13, False: 3.71k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     13|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     13|    }                                                                          \
  |  |  |  |   56|  3.72k|    ptr += n;                                                                  \
  |  |  |  |   57|  3.71k|    break;
  |  |  ------------------
  |  |   62|  4.17k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  4.13k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 4.17k, False: 4.08M]
  |  |  |  |  ------------------
  |  |  |  |   50|  4.17k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 7, False: 4.16k]
  |  |  |  |  ------------------
  |  |  |  |   51|  4.13k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      7|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  4.16k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  4.16k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  4.16k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 27, False: 4.13k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     27|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     27|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     27|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     27|    }                                                                          \
  |  |  |  |   56|  4.16k|    ptr += n;                                                                  \
  |  |  |  |   57|  4.13k|    break;
  |  |  ------------------
  |  |   63|  4.13k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 61, False: 4.08M]
  |  |  ------------------
  |  |   64|     68|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 7, False: 4.08M]
  |  |  ------------------
  |  |   65|     79|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 11, False: 4.08M]
  |  |  ------------------
  |  |   66|     79|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     79|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     79|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|   420k|  default:
  ------------------
  |  Branch (868:3): [True: 420k, False: 3.66M]
  ------------------
  869|   420k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|   420k|#  define MINBPC(enc) 1
  ------------------
  870|   420k|    break;
  871|  4.08M|  }
  872|  84.2M|  while (HAS_CHAR(enc, ptr, end)) {
  873|  84.2M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  84.2M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  84.2M|  (((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|  20.2k|      LEAD_CASE(2)
  ------------------
  |  |  875|  20.2k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 20.2k, False: 84.2M]
  |  |  ------------------
  |  |  876|  20.2k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  20.2k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  20.2k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 8, False: 20.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 8, False: 20.2k]
  |  |  ------------------
  |  |  877|     16|      *nextTokPtr = ptr;                                                       \
  |  |  878|     16|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     16|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     16|    }                                                                          \
  |  |  880|  20.2k|    ptr += n;                                                                  \
  |  |  881|  20.2k|    break;
  ------------------
  883|  3.00M|      LEAD_CASE(3)
  ------------------
  |  |  875|  3.00M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 3.00M, False: 81.2M]
  |  |  ------------------
  |  |  876|  3.00M|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  3.00M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  3.00M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 11, False: 3.00M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 2, False: 3.00M]
  |  |  ------------------
  |  |  877|     13|      *nextTokPtr = ptr;                                                       \
  |  |  878|     13|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     13|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     13|    }                                                                          \
  |  |  880|  3.00M|    ptr += n;                                                                  \
  |  |  881|  3.00M|    break;
  ------------------
  884|  20.8k|      LEAD_CASE(4)
  ------------------
  |  |  875|  20.8k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 20.8k, False: 84.2M]
  |  |  ------------------
  |  |  876|  20.8k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  20.8k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  20.8k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 23, False: 20.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 4, False: 20.8k]
  |  |  ------------------
  |  |  877|     27|      *nextTokPtr = ptr;                                                       \
  |  |  878|     27|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     27|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     27|    }                                                                          \
  |  |  880|  20.8k|    ptr += n;                                                                  \
  |  |  881|  20.8k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|   619k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 619k, False: 83.6M]
  ------------------
  887|   619k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|   619k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  242|   619k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 619k, False: 225]
  |  |  ------------------
  ------------------
  888|   619k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  300|   619k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (888:13): [True: 454k, False: 165k]
  ------------------
  889|   454k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|   454k|#  define MINBPC(enc) 1
  ------------------
  890|   454k|          break;
  891|   454k|        }
  892|   165k|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|   165k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  242|   165k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 165k, False: 220]
  |  |  ------------------
  ------------------
  893|   165k|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  300|   165k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (893:15): [True: 165k, False: 5]
  ------------------
  894|   165k|            ptr += MINBPC(enc);
  ------------------
  |  |  242|   165k|#  define MINBPC(enc) 1
  ------------------
  895|   165k|            break;
  896|   165k|          }
  897|      5|          *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  242|      5|#  define MINBPC(enc) 1
  ------------------
  898|      5|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  899|   165k|        }
  900|   165k|      }
  901|       |      /* fall through */
  902|  28.0k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 27.6k, False: 84.2M]
  ------------------
  903|   144k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 116k, False: 84.1M]
  ------------------
  904|   144k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 45, False: 84.2M]
  ------------------
  905|   144k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 6, False: 84.2M]
  ------------------
  906|   144k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 8, False: 84.2M]
  ------------------
  907|   146k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 1.71k, False: 84.2M]
  ------------------
  908|   344k|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 198k, False: 84.0M]
  ------------------
  909|   344k|      *nextTokPtr = ptr;
  910|   344k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   344k|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|  80.2M|    default:
  ------------------
  |  Branch (911:5): [True: 80.2M, False: 4.01M]
  ------------------
  912|  80.2M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  80.2M|#  define MINBPC(enc) 1
  ------------------
  913|  80.2M|      break;
  914|  84.2M|    }
  915|  84.2M|  }
  916|  88.9k|  *nextTokPtr = ptr;
  917|  88.9k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  88.9k|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|   434k|}
xmltok.c:normal_scanLt:
  726|  2.25M|               const char **nextTokPtr) {
  727|  2.25M|#  ifdef XML_NS
  728|  2.25M|  int hadColon;
  729|  2.25M|#  endif
  730|  2.25M|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.25M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.25M|    {                                                                          \
  |  |  |  |  135|  2.25M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.25M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.25M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 68, False: 2.25M]
  |  |  |  |  ------------------
  |  |  |  |  136|     68|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     68|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     68|      }                                                                        \
  |  |  |  |  138|  2.25M|    }
  |  |  ------------------
  ------------------
  731|  2.25M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.25M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.25M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  732|  2.21M|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.22M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 2.25M]
  |  |  ------------------
  |  |  111|  2.22M|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  2.22M|    /* fall through */                                                         \
  |  |  116|  2.22M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 2.21M, False: 41.8k]
  |  |  ------------------
  |  |  117|  2.22M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 16.5k, False: 2.23M]
  |  |  ------------------
  |  |  118|  2.22M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  2.22M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  2.22M|    break;                                                                     \
  |  |  120|  2.22M|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    631|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 642, False: 2.25M]
  |  |  |  |  ------------------
  |  |  |  |  100|    642|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 640]
  |  |  |  |  ------------------
  |  |  |  |  101|    631|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    640|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.28k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    640|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 633]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    633|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    633|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 631]
  |  |  |  |  ------------------
  |  |  |  |  103|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      9|    }                                                                          \
  |  |  |  |  106|    640|    ptr += n;                                                                  \
  |  |  |  |  107|    631|    break;
  |  |  ------------------
  |  |  121|    631|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    612|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 625, False: 2.25M]
  |  |  |  |  ------------------
  |  |  |  |  100|    625|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 624]
  |  |  |  |  ------------------
  |  |  |  |  101|    612|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    624|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.24k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    624|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 620]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    620|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    620|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 8, False: 612]
  |  |  |  |  ------------------
  |  |  |  |  103|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     12|    }                                                                          \
  |  |  |  |  106|    624|    ptr += n;                                                                  \
  |  |  |  |  107|    612|    break;
  |  |  ------------------
  |  |  122|    612|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 5, False: 2.25M]
  |  |  |  |  ------------------
  |  |  |  |  100|      5|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 3]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      3|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      6|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      3|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      1|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      1|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|      3|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  733|  1.78k|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 1.78k, False: 2.25M]
  ------------------
  734|  1.78k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.78k|#  define MINBPC(enc) 1
  ------------------
  735|  1.78k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.78k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.78k|    {                                                                          \
  |  |  |  |  135|  1.78k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.78k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.78k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.78k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.78k|    }
  |  |  ------------------
  ------------------
  736|  1.78k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.78k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.78k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 13, False: 1.77k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    444|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 444, False: 1.34k]
  ------------------
  738|    444|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|    444|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|    444|#  define MINBPC(enc) 1
  ------------------
  739|  1.32k|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 1.32k, False: 457]
  ------------------
  740|  1.32k|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  1.32k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  1.32k|#  define MINBPC(enc) 1
  ------------------
  741|  1.78k|    }
  742|     13|    *nextTokPtr = ptr;
  743|     13|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  744|  3.39k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 3.39k, False: 2.25M]
  ------------------
  745|  3.39k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  3.39k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  3.39k|#  define MINBPC(enc) 1
  ------------------
  746|  18.8k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 18.8k, False: 2.23M]
  ------------------
  747|  18.8k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  18.8k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  18.8k|#  define MINBPC(enc) 1
  ------------------
  748|     22|  default:
  ------------------
  |  Branch (748:3): [True: 22, False: 2.25M]
  ------------------
  749|     22|    *nextTokPtr = ptr;
  750|     22|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     22|#define XML_TOK_INVALID 0
  ------------------
  751|  2.25M|  }
  752|  2.23M|#  ifdef XML_NS
  753|  2.23M|  hadColon = 0;
  754|  2.23M|#  endif
  755|       |  /* we have a start-tag */
  756|  2.31M|  while (HAS_CHAR(enc, ptr, end)) {
  757|  2.31M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.31M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.31M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  758|   194k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  78.8k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 2.31M]
  |  |  ------------------
  |  |   82|  78.8k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  286|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (82:9): [Folded - Ignored]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|  78.8k|    /* fall through */                                                         \
  |  |   87|  78.8k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 29.5k, False: 2.29M]
  |  |  ------------------
  |  |   88|  36.0k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 6.49k, False: 2.31M]
  |  |  ------------------
  |  |   89|  53.0k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 17.0k, False: 2.30M]
  |  |  ------------------
  |  |   90|  53.5k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 436, False: 2.31M]
  |  |  ------------------
  |  |   91|  78.8k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 25.2k, False: 2.29M]
  |  |  ------------------
  |  |   92|  78.8k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  78.8k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  78.8k|    break;                                                                     \
  |  |   94|  78.8k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    720|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 735, False: 2.31M]
  |  |  |  |  ------------------
  |  |  |  |   71|    735|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 734]
  |  |  |  |  ------------------
  |  |  |  |   72|    720|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    734|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.46k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    734|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 9, False: 725]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    725|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    725|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 5, False: 720]
  |  |  |  |  ------------------
  |  |  |  |   74|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     14|    }                                                                          \
  |  |  |  |   77|    734|    ptr += n;                                                                  \
  |  |  |  |   78|    720|    break;
  |  |  ------------------
  |  |   95|  10.3k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  10.3k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 10.3k, False: 2.30M]
  |  |  |  |  ------------------
  |  |  |  |   71|  10.3k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 10.3k]
  |  |  |  |  ------------------
  |  |  |  |   72|  10.3k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  10.3k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  20.7k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  10.3k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 10.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  10.3k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  10.3k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 21, False: 10.3k]
  |  |  |  |  ------------------
  |  |  |  |   74|     25|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     25|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     25|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     25|    }                                                                          \
  |  |  |  |   77|  10.3k|    ptr += n;                                                                  \
  |  |  |  |   78|  10.3k|    break;
  |  |  ------------------
  |  |   96|  10.3k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 15, False: 2.31M]
  |  |  |  |  ------------------
  |  |  |  |   71|     15|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 13]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     13|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     26|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     13|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 8, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      5|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      5|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 5, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     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: 2.31M]
  ------------------
  761|      0|      if (hadColon) {
  ------------------
  |  Branch (761:11): [True: 0, False: 0]
  ------------------
  762|      0|        *nextTokPtr = ptr;
  763|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  764|      0|      }
  765|      0|      hadColon = 1;
  766|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
  767|      0|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|      0|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|      0|    {                                                                          \
  |  |  |  |  135|      0|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|      0|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|      0|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      0|      }                                                                        \
  |  |  |  |  138|      0|    }
  |  |  ------------------
  ------------------
  768|      0|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|      0|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|      0|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  769|      0|        CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|      0|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  111|      0|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|      0|    /* fall through */                                                         \
  |  |  116|      0|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  117|      0|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  118|      0|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|      0|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|      0|    break;                                                                     \
  |  |  120|      0|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      0|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      0|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      0|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      0|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|      0|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      0|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      0|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  770|      0|      default:
  ------------------
  |  Branch (770:7): [True: 0, False: 0]
  ------------------
  771|      0|        *nextTokPtr = ptr;
  772|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  773|      0|      }
  774|      0|      break;
  775|      0|#  endif
  776|  7.49k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 7.49k, False: 2.31M]
  ------------------
  777|  8.37k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 888, False: 2.31M]
  ------------------
  778|  11.1k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 2.81k, False: 2.31M]
  ------------------
  779|  11.1k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  11.1k|#  define MINBPC(enc) 1
  ------------------
  780|  13.1k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  13.1k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  13.1k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  13.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  782|  9.87k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  8.06k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 13.1k]
  |  |  ------------------
  |  |  111|  8.06k|    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|  8.06k|    /* fall through */                                                         \
  |  |  116|  8.06k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 6.37k, False: 6.76k]
  |  |  ------------------
  |  |  117|  8.06k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 1.69k, False: 11.4k]
  |  |  ------------------
  |  |  118|  8.06k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  8.06k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  8.06k|    break;                                                                     \
  |  |  120|  8.06k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    485|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 492, False: 12.6k]
  |  |  |  |  ------------------
  |  |  |  |  100|    492|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 491]
  |  |  |  |  ------------------
  |  |  |  |  101|    485|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    491|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    982|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    491|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 489]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    489|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    489|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 4, False: 485]
  |  |  |  |  ------------------
  |  |  |  |  103|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      6|    }                                                                          \
  |  |  |  |  106|    491|    ptr += n;                                                                  \
  |  |  |  |  107|    485|    break;
  |  |  ------------------
  |  |  121|  1.25k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  1.23k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 1.25k, False: 11.8k]
  |  |  |  |  ------------------
  |  |  |  |  100|  1.25k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 1.25k]
  |  |  |  |  ------------------
  |  |  |  |  101|  1.23k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  1.25k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.50k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.25k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 1.24k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  1.24k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.24k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 7, False: 1.23k]
  |  |  |  |  ------------------
  |  |  |  |  103|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     12|    }                                                                          \
  |  |  |  |  106|  1.25k|    ptr += n;                                                                  \
  |  |  |  |  107|  1.23k|    break;
  |  |  ------------------
  |  |  122|  1.23k|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 9, False: 13.1k]
  |  |  |  |  ------------------
  |  |  |  |  100|      9|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 7]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      7|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     14|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      7|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, 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|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      7|    }                                                                          \
  |  |  |  |  106|      7|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  783|    760|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 760, False: 12.3k]
  ------------------
  784|    760|          goto gt;
  785|    548|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 548, False: 12.5k]
  ------------------
  786|    548|          goto sol;
  787|    289|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 289, False: 12.8k]
  ------------------
  788|    865|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 576, False: 12.5k]
  ------------------
  789|  1.99k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 1.12k, False: 12.0k]
  ------------------
  790|  1.99k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.99k|#  define MINBPC(enc) 1
  ------------------
  791|  1.99k|          continue;
  792|     19|        default:
  ------------------
  |  Branch (792:9): [True: 19, False: 13.1k]
  ------------------
  793|     19|          *nextTokPtr = ptr;
  794|     19|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     19|#define XML_TOK_INVALID 0
  ------------------
  795|  13.1k|        }
  796|  9.79k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  303|  9.79k|#define PREFIX(ident) normal_##ident
  ------------------
  797|  13.1k|      }
  798|     40|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     40|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  11.1k|    }
  800|  2.21M|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 2.21M, False: 102k]
  ------------------
  801|  2.21M|    gt:
  802|  2.21M|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.21M|#  define MINBPC(enc) 1
  ------------------
  803|  2.21M|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  2.21M|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|    911|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 911, False: 2.31M]
  ------------------
  805|  1.45k|    sol:
  806|  1.45k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.45k|#  define MINBPC(enc) 1
  ------------------
  807|  1.45k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.45k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.45k|    {                                                                          \
  |  |  |  |  135|  1.45k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.45k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.45k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 7, False: 1.45k]
  |  |  |  |  ------------------
  |  |  |  |  136|      7|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      7|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      7|      }                                                                        \
  |  |  |  |  138|  1.45k|    }
  |  |  ------------------
  ------------------
  808|  1.45k|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  1.45k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (808:11): [True: 14, False: 1.43k]
  ------------------
  809|     14|        *nextTokPtr = ptr;
  810|     14|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  811|     14|      }
  812|  1.43k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.43k|#  define MINBPC(enc) 1
  ------------------
  813|  1.43k|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|  1.43k|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|     28|    default:
  ------------------
  |  Branch (814:5): [True: 28, False: 2.31M]
  ------------------
  815|     28|      *nextTokPtr = ptr;
  816|     28|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     28|#define XML_TOK_INVALID 0
  ------------------
  817|  2.31M|    }
  818|  2.31M|  }
  819|     77|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     77|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  2.23M|}
xmltok.c:normal_scanCdataSection:
  337|  1.32k|                         const char **nextTokPtr) {
  338|  1.32k|  static const char CDATA_LSQB[]
  339|  1.32k|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|  1.32k|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|  1.32k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|  1.32k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|  1.32k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|  1.32k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|  1.32k|#define ASCII_LSQB 0x5B
  ------------------
  340|  1.32k|  int i;
  341|  1.32k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.32k|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|  1.32k|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|  1.32k|    {                                                                          \
  |  |  135|  1.32k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|  1.32k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.32k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 2, False: 1.32k]
  |  |  ------------------
  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      2|      }                                                                        \
  |  |  138|  1.32k|    }
  ------------------
  344|  9.23k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  7.91k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (344:15): [True: 7.92k, False: 1.31k]
  ------------------
  345|  7.92k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  300|  7.92k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (345:9): [True: 9, False: 7.91k]
  ------------------
  346|      9|      *nextTokPtr = ptr;
  347|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  348|      9|    }
  349|  7.92k|  }
  350|  1.31k|  *nextTokPtr = ptr;
  351|  1.31k|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|  1.31k|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|  1.32k|}
xmltok.c:normal_scanEndTag:
  432|  18.8k|                   const char **nextTokPtr) {
  433|  18.8k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  18.8k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  18.8k|    {                                                                          \
  |  |  |  |  135|  18.8k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  18.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  18.8k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 18.8k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  18.8k|    }
  |  |  ------------------
  ------------------
  434|  18.8k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  18.8k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  18.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  435|  18.8k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  18.3k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 18.8k]
  |  |  ------------------
  |  |  111|  18.3k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  18.3k|    /* fall through */                                                         \
  |  |  116|  18.3k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 17.7k, False: 1.16k]
  |  |  ------------------
  |  |  117|  18.3k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 600, False: 18.2k]
  |  |  ------------------
  |  |  118|  18.3k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  18.3k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  18.3k|    break;                                                                     \
  |  |  120|  18.3k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    276|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 286, False: 18.5k]
  |  |  |  |  ------------------
  |  |  |  |  100|    286|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 285]
  |  |  |  |  ------------------
  |  |  |  |  101|    276|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    285|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    570|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    285|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 279]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    279|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    279|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 276]
  |  |  |  |  ------------------
  |  |  |  |  103|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      9|    }                                                                          \
  |  |  |  |  106|    285|    ptr += n;                                                                  \
  |  |  |  |  107|    276|    break;
  |  |  ------------------
  |  |  121|    276|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    271|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 276, False: 18.6k]
  |  |  |  |  ------------------
  |  |  |  |  100|    276|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 275]
  |  |  |  |  ------------------
  |  |  |  |  101|    271|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    275|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    550|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    275|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 273]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    273|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    273|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 271]
  |  |  |  |  ------------------
  |  |  |  |  103|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      4|    }                                                                          \
  |  |  |  |  106|    275|    ptr += n;                                                                  \
  |  |  |  |  107|    271|    break;
  |  |  ------------------
  |  |  122|    271|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 6, False: 18.8k]
  |  |  |  |  ------------------
  |  |  |  |  100|      6|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 5]
  |  |  |  |  ------------------
  |  |  |  |  101|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      5|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     10|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      5|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_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|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      5|    }                                                                          \
  |  |  |  |  106|      5|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  436|      1|  default:
  ------------------
  |  Branch (436:3): [True: 1, False: 18.8k]
  ------------------
  437|      1|    *nextTokPtr = ptr;
  438|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  439|  18.8k|  }
  440|   772k|  while (HAS_CHAR(enc, ptr, end)) {
  441|   772k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   772k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   772k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  442|  1.51M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  5.87k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 772k]
  |  |  ------------------
  |  |   82|  5.87k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  286|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (82:9): [Folded - Ignored]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|  5.87k|    /* fall through */                                                         \
  |  |   87|  5.87k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 2.51k, False: 769k]
  |  |  ------------------
  |  |   88|  3.85k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.33k, False: 770k]
  |  |  ------------------
  |  |   89|  5.03k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 1.17k, False: 771k]
  |  |  ------------------
  |  |   90|  5.22k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 198, False: 772k]
  |  |  ------------------
  |  |   91|  5.87k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 649, False: 771k]
  |  |  ------------------
  |  |   92|  5.87k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  5.87k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  5.87k|    break;                                                                     \
  |  |   94|  5.87k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    723|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 730, False: 771k]
  |  |  |  |  ------------------
  |  |  |  |   71|    730|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 729]
  |  |  |  |  ------------------
  |  |  |  |   72|    723|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    729|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.45k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    729|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 727]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    727|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    727|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 4, False: 723]
  |  |  |  |  ------------------
  |  |  |  |   74|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      6|    }                                                                          \
  |  |  |  |   77|    729|    ptr += n;                                                                  \
  |  |  |  |   78|    723|    break;
  |  |  ------------------
  |  |   95|   746k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|   746k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 746k, False: 25.3k]
  |  |  |  |  ------------------
  |  |  |  |   71|   746k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 746k]
  |  |  |  |  ------------------
  |  |  |  |   72|   746k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|   746k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.49M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   746k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 746k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|   746k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   746k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 51, False: 746k]
  |  |  |  |  ------------------
  |  |  |  |   74|     52|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     52|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     52|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     52|    }                                                                          \
  |  |  |  |   77|   746k|    ptr += n;                                                                  \
  |  |  |  |   78|   746k|    break;
  |  |  ------------------
  |  |   96|   746k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 28, False: 772k]
  |  |  |  |  ------------------
  |  |  |  |   71|     28|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 27]
  |  |  |  |  ------------------
  |  |  |  |   72|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     27|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     54|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     27|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 25]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|     25|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     25|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 25, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     27|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     27|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     27|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     27|    }                                                                          \
  |  |  |  |   77|     27|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  443|    442|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 442, False: 771k]
  ------------------
  444|    888|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 446, False: 771k]
  ------------------
  445|  16.1k|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 15.2k, False: 756k]
  ------------------
  446|  32.0k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  16.1k|#  define MINBPC(enc) 1
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  15.9k|#  define MINBPC(enc) 1
  ------------------
  447|  32.0k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  32.0k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  32.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  448|    255|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 255, False: 31.8k]
  ------------------
  449|    687|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 432, False: 31.6k]
  ------------------
  450|  15.9k|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 15.2k, False: 16.8k]
  ------------------
  451|  15.9k|          break;
  452|  16.1k|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 16.1k, False: 15.9k]
  ------------------
  453|  16.1k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  16.1k|#  define MINBPC(enc) 1
  ------------------
  454|  16.1k|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|  16.1k|#define XML_TOK_END_TAG 5
  ------------------
  455|     13|        default:
  ------------------
  |  Branch (455:9): [True: 13, False: 32.0k]
  ------------------
  456|     13|          *nextTokPtr = ptr;
  457|     13|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  458|  32.0k|        }
  459|  32.0k|      }
  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: 772k]
  ------------------
  463|       |      /* no need to check qname syntax here,
  464|       |         since end-tag must match exactly */
  465|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
  466|      0|      break;
  467|      0|#  endif
  468|  2.51k|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 2.51k, False: 769k]
  ------------------
  469|  2.51k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.51k|#  define MINBPC(enc) 1
  ------------------
  470|  2.51k|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|  2.51k|#define XML_TOK_END_TAG 5
  ------------------
  471|     11|    default:
  ------------------
  |  Branch (471:5): [True: 11, False: 772k]
  ------------------
  472|     11|      *nextTokPtr = ptr;
  473|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  474|   772k|    }
  475|   772k|  }
  476|     77|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     77|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  18.8k|}
xmltok.c:normal_scanAtts:
  573|  9.79k|                 const char **nextTokPtr) {
  574|  9.79k|#  ifdef XML_NS
  575|  9.79k|  int hadColon = 0;
  576|  9.79k|#  endif
  577|  4.76M|  while (HAS_CHAR(enc, ptr, end)) {
  578|  4.76M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.76M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.76M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  579|  9.65M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  2.20M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 4.76M]
  |  |  ------------------
  |  |   82|  2.20M|    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.20M|    /* fall through */                                                         \
  |  |   87|  2.20M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 2.15M, False: 2.61M]
  |  |  ------------------
  |  |   88|  2.15M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 519, False: 4.76M]
  |  |  ------------------
  |  |   89|  2.15M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 3.17k, False: 4.76M]
  |  |  ------------------
  |  |   90|  2.15M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 372, False: 4.76M]
  |  |  ------------------
  |  |   91|  2.20M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 45.8k, False: 4.72M]
  |  |  ------------------
  |  |   92|  2.20M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  2.20M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  2.20M|    break;                                                                     \
  |  |   94|  2.20M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|   267k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 267k, False: 4.50M]
  |  |  |  |  ------------------
  |  |  |  |   71|   267k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 267k]
  |  |  |  |  ------------------
  |  |  |  |   72|   267k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|   267k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   535k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   267k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 267k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|   267k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   267k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 267k]
  |  |  |  |  ------------------
  |  |  |  |   74|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      3|    }                                                                          \
  |  |  |  |   77|   267k|    ptr += n;                                                                  \
  |  |  |  |   78|   267k|    break;
  |  |  ------------------
  |  |   95|   267k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|   254k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 254k, False: 4.51M]
  |  |  |  |  ------------------
  |  |  |  |   71|   254k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 254k]
  |  |  |  |  ------------------
  |  |  |  |   72|   254k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|   254k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   508k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   254k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 254k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|   254k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   254k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 21, False: 254k]
  |  |  |  |  ------------------
  |  |  |  |   74|     25|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     25|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     25|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     25|    }                                                                          \
  |  |  |  |   77|   254k|    ptr += n;                                                                  \
  |  |  |  |   78|   254k|    break;
  |  |  ------------------
  |  |   96|   254k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 20, False: 4.76M]
  |  |  |  |  ------------------
  |  |  |  |   71|     20|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 19]
  |  |  |  |  ------------------
  |  |  |  |   72|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     19|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     38|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     19|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|     13|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     13|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 13, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     19|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     19|    }                                                                          \
  |  |  |  |   77|     19|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  580|      0|#  ifdef XML_NS
  581|      0|    case BT_COLON:
  ------------------
  |  Branch (581:5): [True: 0, False: 4.76M]
  ------------------
  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|  1.55k|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 1.55k, False: 4.76M]
  ------------------
  598|  1.84k|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 292, False: 4.76M]
  ------------------
  599|  2.16k|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 318, False: 4.76M]
  ------------------
  600|  2.81k|      for (;;) {
  601|  2.81k|        int t;
  602|       |
  603|  2.81k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.81k|#  define MINBPC(enc) 1
  ------------------
  604|  2.81k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.81k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.81k|    {                                                                          \
  |  |  |  |  135|  2.81k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.81k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.81k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 40, False: 2.77k]
  |  |  |  |  ------------------
  |  |  |  |  136|     40|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     40|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     40|      }                                                                        \
  |  |  |  |  138|  2.81k|    }
  |  |  ------------------
  ------------------
  605|  2.77k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  2.77k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.77k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  606|  2.77k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 2.11k, False: 663]
  ------------------
  607|  2.11k|          break;
  608|    663|        switch (t) {
  609|    200|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 200, False: 463]
  ------------------
  610|    451|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 251, False: 412]
  ------------------
  611|    658|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 207, False: 456]
  ------------------
  612|    658|          break;
  613|      5|        default:
  ------------------
  |  Branch (613:9): [True: 5, False: 658]
  ------------------
  614|      5|          *nextTokPtr = ptr;
  615|      5|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  616|    663|        }
  617|    663|      }
  618|       |      /* fall through */
  619|  2.04M|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 2.04M, False: 2.72M]
  ------------------
  620|  2.04M|      int open;
  621|  2.04M|#  ifdef XML_NS
  622|  2.04M|      hadColon = 0;
  623|  2.04M|#  endif
  624|  2.04M|      for (;;) {
  625|  2.04M|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.04M|#  define MINBPC(enc) 1
  ------------------
  626|  2.04M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.04M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.04M|    {                                                                          \
  |  |  |  |  135|  2.04M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.04M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.04M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 36, False: 2.04M]
  |  |  |  |  ------------------
  |  |  |  |  136|     36|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     36|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     36|      }                                                                        \
  |  |  |  |  138|  2.04M|    }
  |  |  ------------------
  ------------------
  627|  2.04M|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  2.04M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.04M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  628|  2.04M|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 27.7k, False: 2.01M]
  |  Branch (628:32): [True: 2.01M, False: 712]
  ------------------
  629|  2.04M|          break;
  630|    712|        switch (open) {
  631|    205|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 205, False: 507]
  ------------------
  632|    452|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 247, False: 465]
  ------------------
  633|    706|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 254, False: 458]
  ------------------
  634|    706|          break;
  635|      6|        default:
  ------------------
  |  Branch (635:9): [True: 6, False: 706]
  ------------------
  636|      6|          *nextTokPtr = ptr;
  637|      6|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  638|    712|        }
  639|    712|      }
  640|  2.04M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.04M|#  define MINBPC(enc) 1
  ------------------
  641|       |      /* in attribute value */
  642|  11.8M|      for (;;) {
  643|  11.8M|        int t;
  644|  11.8M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  11.8M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  11.8M|    {                                                                          \
  |  |  |  |  135|  11.8M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  11.8M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  11.8M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 76, False: 11.8M]
  |  |  |  |  ------------------
  |  |  |  |  136|     76|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     76|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     76|      }                                                                        \
  |  |  |  |  138|  11.8M|    }
  |  |  ------------------
  ------------------
  645|  11.8M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  11.8M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  11.8M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  646|  11.8M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 2.04M, False: 9.83M]
  ------------------
  647|  2.04M|          break;
  648|  9.83M|        switch (t) {
  649|  11.0M|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  5.85k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  5.85k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 5.85k, False: 9.82M]
  |  |  |  |  ------------------
  |  |  |  |   50|  5.85k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 5.85k]
  |  |  |  |  ------------------
  |  |  |  |   51|  5.85k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  5.85k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  5.85k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  5.85k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 5.85k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      3|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      3|    }                                                                          \
  |  |  |  |   56|  5.85k|    ptr += n;                                                                  \
  |  |  |  |   57|  5.85k|    break;
  |  |  ------------------
  |  |   61|  5.49M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  5.49M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 5.49M, False: 4.33M]
  |  |  |  |  ------------------
  |  |  |  |   50|  5.49M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 5.49M]
  |  |  |  |  ------------------
  |  |  |  |   51|  5.49M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  5.49M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  5.49M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  5.49M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 5.49M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      5|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      5|    }                                                                          \
  |  |  |  |   56|  5.49M|    ptr += n;                                                                  \
  |  |  |  |   57|  5.49M|    break;
  |  |  ------------------
  |  |   62|  5.49M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  5.38k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 5.39k, False: 9.82M]
  |  |  |  |  ------------------
  |  |  |  |   50|  5.39k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 5.39k]
  |  |  |  |  ------------------
  |  |  |  |   51|  5.38k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  5.39k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  5.39k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  5.39k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 9, False: 5.38k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      9|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      9|    }                                                                          \
  |  |  |  |   56|  5.39k|    ptr += n;                                                                  \
  |  |  |  |   57|  5.38k|    break;
  |  |  ------------------
  |  |   63|  5.38k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 6, False: 9.83M]
  |  |  ------------------
  |  |   64|      8|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 2, False: 9.83M]
  |  |  ------------------
  |  |   65|      9|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 1, False: 9.83M]
  |  |  ------------------
  |  |   66|      9|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|      9|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  51.6k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 51.6k, False: 9.77M]
  ------------------
  651|  51.6k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  303|  51.6k|#define PREFIX(ident) normal_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  242|  51.6k|#  define MINBPC(enc) 1
  ------------------
  652|  51.6k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 12, False: 51.6k]
  ------------------
  653|     12|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 8, False: 4]
  ------------------
  654|      8|              *nextTokPtr = ptr;
  655|     12|            return tok;
  656|     12|          }
  657|  51.6k|          break;
  658|  51.6k|        }
  659|  51.6k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 41, False: 9.83M]
  ------------------
  660|     41|          *nextTokPtr = ptr;
  661|     41|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     41|#define XML_TOK_INVALID 0
  ------------------
  662|  4.27M|        default:
  ------------------
  |  Branch (662:9): [True: 4.27M, False: 5.56M]
  ------------------
  663|  4.27M|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  4.27M|#  define MINBPC(enc) 1
  ------------------
  664|  4.27M|          break;
  665|  9.83M|        }
  666|  9.83M|      }
  667|  2.04M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.04M|#  define MINBPC(enc) 1
  ------------------
  668|  2.04M|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.04M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.04M|    {                                                                          \
  |  |  |  |  135|  2.04M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.04M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.04M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 2.04M]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  2.04M|    }
  |  |  ------------------
  ------------------
  669|  2.04M|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.04M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.04M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  670|  13.1k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 13.1k, False: 2.03M]
  ------------------
  671|  2.03M|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 2.02M, False: 22.6k]
  ------------------
  672|  2.03M|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 2.40k, False: 2.04M]
  ------------------
  673|  2.03M|        break;
  674|  3.10k|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 3.10k, False: 2.04M]
  ------------------
  675|  3.10k|        goto sol;
  676|  3.99k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 3.99k, False: 2.04M]
  ------------------
  677|  3.99k|        goto gt;
  678|     35|      default:
  ------------------
  |  Branch (678:7): [True: 35, False: 2.04M]
  ------------------
  679|     35|        *nextTokPtr = ptr;
  680|     35|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     35|#define XML_TOK_INVALID 0
  ------------------
  681|  2.04M|      }
  682|       |      /* ptr points to closing quote */
  683|  2.35M|      for (;;) {
  684|  2.35M|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.35M|#  define MINBPC(enc) 1
  ------------------
  685|  2.35M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.35M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.35M|    {                                                                          \
  |  |  |  |  135|  2.35M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.35M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.35M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 40, False: 2.35M]
  |  |  |  |  ------------------
  |  |  |  |  136|     40|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     40|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     40|      }                                                                        \
  |  |  |  |  138|  2.35M|    }
  |  |  ------------------
  ------------------
  686|  2.35M|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.35M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.35M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  687|  2.28M|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.78M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 2.35M]
  |  |  ------------------
  |  |  111|  1.78M|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  1.78M|    /* fall through */                                                         \
  |  |  116|  1.78M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.78M, False: 565k]
  |  |  ------------------
  |  |  117|  1.78M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 2.03k, False: 2.34M]
  |  |  ------------------
  |  |  118|  1.78M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.78M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  1.78M|    break;                                                                     \
  |  |  120|  1.78M|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|   245k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 245k, False: 2.10M]
  |  |  |  |  ------------------
  |  |  |  |  100|   245k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 245k]
  |  |  |  |  ------------------
  |  |  |  |  101|   245k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|   245k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   490k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   245k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 245k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|   245k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   245k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 245k]
  |  |  |  |  ------------------
  |  |  |  |  103|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      5|    }                                                                          \
  |  |  |  |  106|   245k|    ptr += n;                                                                  \
  |  |  |  |  107|   245k|    break;
  |  |  ------------------
  |  |  121|   245k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  3.84k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 3.85k, False: 2.34M]
  |  |  |  |  ------------------
  |  |  |  |  100|  3.85k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 3.85k]
  |  |  |  |  ------------------
  |  |  |  |  101|  3.84k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  3.85k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  7.70k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.85k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 3.84k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  3.84k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.84k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 5, False: 3.84k]
  |  |  |  |  ------------------
  |  |  |  |  103|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      8|    }                                                                          \
  |  |  |  |  106|  3.85k|    ptr += n;                                                                  \
  |  |  |  |  107|  3.84k|    break;
  |  |  ------------------
  |  |  122|  3.84k|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 22, False: 2.35M]
  |  |  |  |  ------------------
  |  |  |  |  100|     22|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 21]
  |  |  |  |  ------------------
  |  |  |  |  101|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     21|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     42|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     21|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 8, False: 13]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|     13|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     13|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 13, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|     21|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     21|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     21|    }                                                                          \
  |  |  |  |  106|     21|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  688|  1.79k|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 1.79k, False: 2.34M]
  ------------------
  689|   311k|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 309k, False: 2.04M]
  ------------------
  690|   311k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 453, False: 2.34M]
  ------------------
  691|   311k|          continue;
  692|    540|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 540, False: 2.34M]
  ------------------
  693|  4.53k|        gt:
  694|  4.53k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  4.53k|#  define MINBPC(enc) 1
  ------------------
  695|  4.53k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  4.53k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|  1.63k|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 1.63k, False: 2.34M]
  ------------------
  697|  4.74k|        sol:
  698|  4.74k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  4.74k|#  define MINBPC(enc) 1
  ------------------
  699|  4.74k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.74k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.74k|    {                                                                          \
  |  |  |  |  135|  4.74k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.74k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  4.74k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 6, False: 4.73k]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|  4.74k|    }
  |  |  ------------------
  ------------------
  700|  4.73k|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  4.73k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (700:15): [True: 4, False: 4.73k]
  ------------------
  701|      4|            *nextTokPtr = ptr;
  702|      4|            return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  703|      4|          }
  704|  4.73k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  4.73k|#  define MINBPC(enc) 1
  ------------------
  705|  4.73k|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|  4.73k|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|     10|        default:
  ------------------
  |  Branch (706:9): [True: 10, False: 2.35M]
  ------------------
  707|     10|          *nextTokPtr = ptr;
  708|     10|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  709|  2.35M|        }
  710|  2.03M|        break;
  711|  2.35M|      }
  712|  2.03M|      break;
  713|  2.03M|    }
  714|  2.03M|    default:
  ------------------
  |  Branch (714:5): [True: 3, False: 4.76M]
  ------------------
  715|      3|      *nextTokPtr = ptr;
  716|      3|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  717|  4.76M|    }
  718|  4.76M|  }
  719|     92|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     92|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  9.79k|}
xmltok.c:normal_scanRef:
  545|  1.71M|                const char **nextTokPtr) {
  546|  1.71M|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.71M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.71M|    {                                                                          \
  |  |  |  |  135|  1.71M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.71M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.71M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 24, False: 1.71M]
  |  |  |  |  ------------------
  |  |  |  |  136|     24|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     24|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     24|      }                                                                        \
  |  |  |  |  138|  1.71M|    }
  |  |  ------------------
  ------------------
  547|  1.71M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.71M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.71M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  548|  1.61M|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.70M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 1.71M]
  |  |  ------------------
  |  |  111|  1.70M|    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.70M|    /* fall through */                                                         \
  |  |  116|  1.70M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.61M, False: 99.1k]
  |  |  ------------------
  |  |  117|  1.70M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 88.6k, False: 1.62M]
  |  |  ------------------
  |  |  118|  1.70M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.70M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  1.70M|    break;                                                                     \
  |  |  120|  1.70M|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    261|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 267, False: 1.71M]
  |  |  |  |  ------------------
  |  |  |  |  100|    267|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 266]
  |  |  |  |  ------------------
  |  |  |  |  101|    261|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    266|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    532|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    266|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 263]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    263|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    263|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 261]
  |  |  |  |  ------------------
  |  |  |  |  103|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      5|    }                                                                          \
  |  |  |  |  106|    266|    ptr += n;                                                                  \
  |  |  |  |  107|    261|    break;
  |  |  ------------------
  |  |  121|    455|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    449|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 455, False: 1.71M]
  |  |  |  |  ------------------
  |  |  |  |  100|    455|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 451]
  |  |  |  |  ------------------
  |  |  |  |  101|    449|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    451|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    902|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    451|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 450]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    450|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    450|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 449]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      2|    }                                                                          \
  |  |  |  |  106|    451|    ptr += n;                                                                  \
  |  |  |  |  107|    449|    break;
  |  |  ------------------
  |  |  122|    449|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 10, False: 1.71M]
  |  |  |  |  ------------------
  |  |  |  |  100|     10|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 8]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      8|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     16|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      8|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, 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|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      8|    }                                                                          \
  |  |  |  |  106|      8|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  549|  9.77k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 9.77k, False: 1.70M]
  ------------------
  550|  9.77k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  9.77k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  9.77k|#  define MINBPC(enc) 1
  ------------------
  551|      7|  default:
  ------------------
  |  Branch (551:3): [True: 7, False: 1.71M]
  ------------------
  552|      7|    *nextTokPtr = ptr;
  553|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  554|  1.71M|  }
  555|  4.38M|  while (HAS_CHAR(enc, ptr, end)) {
  556|  4.38M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.38M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.38M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  557|  10.6M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  2.67M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 4.38M]
  |  |  ------------------
  |  |   82|  2.67M|    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.67M|    /* fall through */                                                         \
  |  |   87|  2.67M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 2.63M, False: 1.74M]
  |  |  ------------------
  |  |   88|  2.66M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 32.8k, False: 4.34M]
  |  |  ------------------
  |  |   89|  2.67M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 12.2k, False: 4.36M]
  |  |  ------------------
  |  |   90|  2.67M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 943, False: 4.38M]
  |  |  ------------------
  |  |   91|  2.67M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 763, False: 4.38M]
  |  |  ------------------
  |  |   92|  2.67M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  2.67M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  2.67M|    break;                                                                     \
  |  |   94|  2.67M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    373|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 381, False: 4.38M]
  |  |  |  |  ------------------
  |  |  |  |   71|    381|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 380]
  |  |  |  |  ------------------
  |  |  |  |   72|    373|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    380|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    760|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    380|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 375]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    375|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    375|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 2, False: 373]
  |  |  |  |  ------------------
  |  |  |  |   74|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      7|    }                                                                          \
  |  |  |  |   77|    380|    ptr += n;                                                                  \
  |  |  |  |   78|    373|    break;
  |  |  ------------------
  |  |   95|    572|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    568|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 572, False: 4.38M]
  |  |  |  |  ------------------
  |  |  |  |   71|    572|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 571]
  |  |  |  |  ------------------
  |  |  |  |   72|    568|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    571|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.14k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    571|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 570]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    570|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    570|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 2, False: 568]
  |  |  |  |  ------------------
  |  |  |  |   74|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      3|    }                                                                          \
  |  |  |  |   77|    571|    ptr += n;                                                                  \
  |  |  |  |   78|    568|    break;
  |  |  ------------------
  |  |   96|    568|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 22, False: 4.38M]
  |  |  |  |  ------------------
  |  |  |  |   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: 18, False: 2]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      2|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      2|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 2, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     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|  1.70M|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 1.70M, False: 2.68M]
  ------------------
  559|  1.70M|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.70M|#  define MINBPC(enc) 1
  ------------------
  560|  1.70M|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|  1.70M|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|     14|    default:
  ------------------
  |  Branch (561:5): [True: 14, False: 4.38M]
  ------------------
  562|     14|      *nextTokPtr = ptr;
  563|     14|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  564|  4.38M|    }
  565|  4.38M|  }
  566|     43|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     43|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|  1.70M|}
xmltok.c:normal_scanCharRef:
  514|  9.77k|                    const char **nextTokPtr) {
  515|  9.77k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  9.77k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  9.77k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  9.77k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 9.77k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  9.77k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  300|  9.77k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 6.69k, False: 3.08k]
  |  |  ------------------
  ------------------
  517|  6.69k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  6.69k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  6.69k|#  define MINBPC(enc) 1
  ------------------
  518|  3.08k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.08k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.08k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  519|  3.06k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 3.06k, False: 16]
  ------------------
  520|  3.06k|      break;
  521|     16|    default:
  ------------------
  |  Branch (521:5): [True: 16, False: 3.06k]
  ------------------
  522|     16|      *nextTokPtr = ptr;
  523|     16|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  524|  3.08k|    }
  525|  6.86k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  3.06k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  3.80k|#  define MINBPC(enc) 1
  ------------------
  526|  6.86k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  6.86k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  6.86k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  527|  3.80k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 3.80k, False: 3.05k]
  ------------------
  528|  3.80k|        break;
  529|  3.04k|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 3.04k, False: 3.81k]
  ------------------
  530|  3.04k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.04k|#  define MINBPC(enc) 1
  ------------------
  531|  3.04k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  3.04k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     10|      default:
  ------------------
  |  Branch (532:7): [True: 10, False: 6.85k]
  ------------------
  533|     10|        *nextTokPtr = ptr;
  534|     10|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  535|  6.86k|      }
  536|  6.86k|    }
  537|  3.06k|  }
  538|      9|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      9|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  9.77k|}
xmltok.c:normal_scanHexCharRef:
  483|  6.69k|                       const char **nextTokPtr) {
  484|  6.69k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  6.69k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  6.69k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  6.69k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 6.69k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  6.69k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  6.69k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  6.69k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  486|  2.44k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 2.44k, False: 4.24k]
  ------------------
  487|  6.68k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 4.23k, False: 2.45k]
  ------------------
  488|  6.68k|      break;
  489|      8|    default:
  ------------------
  |  Branch (489:5): [True: 8, False: 6.68k]
  ------------------
  490|      8|      *nextTokPtr = ptr;
  491|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  492|  6.69k|    }
  493|  22.1k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  6.68k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  15.4k|#  define MINBPC(enc) 1
  ------------------
  494|  22.1k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  22.1k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  22.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  495|  4.93k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 4.93k, False: 17.2k]
  ------------------
  496|  15.4k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 10.5k, False: 11.6k]
  ------------------
  497|  15.4k|        break;
  498|  6.66k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 6.66k, False: 15.4k]
  ------------------
  499|  6.66k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  6.66k|#  define MINBPC(enc) 1
  ------------------
  500|  6.66k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  6.66k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|     10|      default:
  ------------------
  |  Branch (501:7): [True: 10, False: 22.1k]
  ------------------
  502|     10|        *nextTokPtr = ptr;
  503|     10|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  504|  22.1k|      }
  505|  22.1k|    }
  506|  6.68k|  }
  507|     14|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     14|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  6.69k|}
xmltok.c:normal_cdataSectionTok:
  356|  55.1k|                        const char **nextTokPtr) {
  357|  55.1k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 167, False: 54.9k]
  ------------------
  358|    167|    return XML_TOK_NONE;
  ------------------
  |  |   51|    167|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|  54.9k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|  54.9k|#  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|  54.9k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  54.9k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  54.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  369|  9.83k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 9.83k, False: 45.1k]
  ------------------
  370|  9.83k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  9.83k|#  define MINBPC(enc) 1
  ------------------
  371|  9.83k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  9.83k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  9.83k|    {                                                                          \
  |  |  |  |  135|  9.83k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  9.83k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  9.83k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 9.83k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  9.83k|    }
  |  |  ------------------
  ------------------
  372|  9.83k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  300|  9.83k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (372:9): [True: 6.17k, False: 3.66k]
  ------------------
  373|  6.17k|      break;
  374|  3.66k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.66k|#  define MINBPC(enc) 1
  ------------------
  375|  3.66k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.66k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.66k|    {                                                                          \
  |  |  |  |  135|  3.66k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.66k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.66k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 3.65k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  3.66k|    }
  |  |  ------------------
  ------------------
  376|  3.65k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  3.65k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (376:9): [True: 2.58k, False: 1.07k]
  ------------------
  377|  2.58k|      ptr -= MINBPC(enc);
  ------------------
  |  |  242|  2.58k|#  define MINBPC(enc) 1
  ------------------
  378|  2.58k|      break;
  379|  2.58k|    }
  380|  1.07k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.07k|#  define MINBPC(enc) 1
  ------------------
  381|  1.07k|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|  1.07k|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  3.65k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 3.65k, False: 51.3k]
  ------------------
  383|  3.65k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.65k|#  define MINBPC(enc) 1
  ------------------
  384|  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: 13, False: 3.63k]
  |  |  |  |  ------------------
  |  |  |  |  136|     13|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     13|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     13|      }                                                                        \
  |  |  |  |  138|  3.65k|    }
  |  |  ------------------
  ------------------
  385|  3.63k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  3.63k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.63k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 1.43k, False: 2.20k]
  ------------------
  386|  1.43k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.43k|#  define MINBPC(enc) 1
  ------------------
  387|  3.63k|    *nextTokPtr = ptr;
  388|  3.63k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  3.63k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  20.4k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 20.4k, False: 34.4k]
  ------------------
  390|  20.4k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  20.4k|#  define MINBPC(enc) 1
  ------------------
  391|  20.4k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  20.4k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  20.4k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|    530|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|    518|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 530, False: 54.4k]
  |  |  |  |  ------------------
  |  |  |  |   50|    530|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 4, False: 526]
  |  |  |  |  ------------------
  |  |  |  |   51|    518|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|    526|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    526|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    526|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 8, False: 518]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      8|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      8|    }                                                                          \
  |  |  |  |   56|    526|    ptr += n;                                                                  \
  |  |  |  |   57|    518|    break;
  |  |  ------------------
  |  |   61|  7.00k|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  6.99k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 7.00k, False: 47.9k]
  |  |  |  |  ------------------
  |  |  |  |   50|  7.00k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 8, False: 6.99k]
  |  |  |  |  ------------------
  |  |  |  |   51|  6.99k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      8|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  6.99k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  6.99k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  6.99k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 6.99k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      5|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      5|    }                                                                          \
  |  |  |  |   56|  6.99k|    ptr += n;                                                                  \
  |  |  |  |   57|  6.99k|    break;
  |  |  ------------------
  |  |   62|  6.99k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|    586|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 593, False: 54.3k]
  |  |  |  |  ------------------
  |  |  |  |   50|    593|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 4, False: 589]
  |  |  |  |  ------------------
  |  |  |  |   51|    586|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|    589|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    589|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    589|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 586]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      3|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      3|    }                                                                          \
  |  |  |  |   56|    589|    ptr += n;                                                                  \
  |  |  |  |   57|    586|    break;
  |  |  ------------------
  |  |   63|    586|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 16, False: 54.9k]
  |  |  ------------------
  |  |   64|     22|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 6, False: 54.9k]
  |  |  ------------------
  |  |   65|     25|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 3, False: 54.9k]
  |  |  ------------------
  |  |   66|     25|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     25|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     25|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  12.8k|  default:
  ------------------
  |  Branch (393:3): [True: 12.8k, False: 42.1k]
  ------------------
  394|  12.8k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  12.8k|#  define MINBPC(enc) 1
  ------------------
  395|  12.8k|    break;
  396|  54.9k|  }
  397|  5.24M|  while (HAS_CHAR(enc, ptr, end)) {
  398|  5.24M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  5.24M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  5.24M|  (((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|  36.5k|      LEAD_CASE(2)
  ------------------
  |  |  400|  36.5k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 36.5k, False: 5.20M]
  |  |  ------------------
  |  |  401|  36.5k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  36.5k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  36.5k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 5, False: 36.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 3, False: 36.5k]
  |  |  ------------------
  |  |  402|      8|      *nextTokPtr = ptr;                                                       \
  |  |  403|      8|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      8|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      8|    }                                                                          \
  |  |  405|  36.5k|    ptr += n;                                                                  \
  |  |  406|  36.5k|    break;
  ------------------
  408|  4.94M|      LEAD_CASE(3)
  ------------------
  |  |  400|  4.94M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 4.94M, False: 300k]
  |  |  ------------------
  |  |  401|  4.94M|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  4.94M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  4.94M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 3, False: 4.94M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 7, False: 4.94M]
  |  |  ------------------
  |  |  402|     10|      *nextTokPtr = ptr;                                                       \
  |  |  403|     10|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     10|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|     10|    }                                                                          \
  |  |  405|  4.94M|    ptr += n;                                                                  \
  |  |  406|  4.94M|    break;
  ------------------
  409|  27.6k|      LEAD_CASE(4)
  ------------------
  |  |  400|  27.6k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 27.6k, False: 5.21M]
  |  |  ------------------
  |  |  401|  27.6k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  27.6k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  27.6k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 2, False: 27.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 2, False: 27.6k]
  |  |  ------------------
  |  |  402|      4|      *nextTokPtr = ptr;                                                       \
  |  |  403|      4|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      4|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      4|    }                                                                          \
  |  |  405|  27.6k|    ptr += n;                                                                  \
  |  |  406|  27.6k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|     10|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 10, False: 5.24M]
  ------------------
  412|     13|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 3, False: 5.24M]
  ------------------
  413|     15|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 2, False: 5.24M]
  ------------------
  414|  1.59k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 1.57k, False: 5.24M]
  ------------------
  415|  21.1k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 19.5k, False: 5.22M]
  ------------------
  416|  29.5k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 8.37k, False: 5.23M]
  ------------------
  417|  29.5k|      *nextTokPtr = ptr;
  418|  29.5k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  29.5k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|   206k|    default:
  ------------------
  |  Branch (419:5): [True: 206k, False: 5.03M]
  ------------------
  420|   206k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   206k|#  define MINBPC(enc) 1
  ------------------
  421|   206k|      break;
  422|  5.24M|    }
  423|  5.24M|  }
  424|    136|  *nextTokPtr = ptr;
  425|    136|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    136|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  29.6k|}
xmltok.c:normal_attributeValueTok:
 1262|  47.7M|                          const char **nextTokPtr) {
 1263|  47.7M|  const char *start;
 1264|  47.7M|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 740k, False: 46.9M]
  ------------------
 1265|   740k|    return XML_TOK_NONE;
  ------------------
  |  |   51|   740k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|  46.9M|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  46.9M|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  46.9M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  46.9M|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 46.9M]
  ------------------
 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|  46.9M|  start = ptr;
 1275|  1.08G|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  1.08G|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.08G|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.08G|  (((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|  10.7M|      LEAD_CASE(2)
  ------------------
  |  | 1278|  10.7M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 10.7M, False: 1.07G]
  |  |  ------------------
  |  | 1279|  10.7M|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  10.7M|    break;
  ------------------
 1282|   638M|      LEAD_CASE(3)
  ------------------
  |  | 1278|   638M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 638M, False: 443M]
  |  |  ------------------
  |  | 1279|   638M|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|   638M|    break;
  ------------------
 1283|  48.2M|      LEAD_CASE(4)
  ------------------
  |  | 1278|  48.2M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 48.2M, False: 1.03G]
  |  |  ------------------
  |  | 1279|  48.2M|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  48.2M|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|  2.59M|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 2.59M, False: 1.07G]
  ------------------
 1286|  2.59M|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 1.53M, False: 1.06M]
  ------------------
 1287|  1.53M|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  1.53M|#define PREFIX(ident) normal_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  1.53M|#  define MINBPC(enc) 1
  ------------------
 1288|  1.06M|      *nextTokPtr = ptr;
 1289|  1.06M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.06M|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      3|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 3, False: 1.08G]
  ------------------
 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|  37.5M|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 37.5M, False: 1.04G]
  ------------------
 1295|  37.5M|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 24.5M, False: 12.9M]
  ------------------
 1296|  24.5M|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  24.5M|#  define MINBPC(enc) 1
  ------------------
 1297|  24.5M|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  24.5M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|  24.5M|      }
 1299|  12.9M|      *nextTokPtr = ptr;
 1300|  12.9M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  12.9M|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|  1.24M|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 1.24M, False: 1.08G]
  ------------------
 1302|  1.24M|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 1.10M, False: 136k]
  ------------------
 1303|  1.10M|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.10M|#  define MINBPC(enc) 1
  ------------------
 1304|  1.10M|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  1.10M|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.10M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.10M|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 1.04k, False: 1.10M]
  ------------------
 1305|  1.04k|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|  1.04k|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|  1.10M|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  1.10M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.10M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 755k, False: 348k]
  ------------------
 1307|   755k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|   755k|#  define MINBPC(enc) 1
  ------------------
 1308|  1.10M|        *nextTokPtr = ptr;
 1309|  1.10M|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  1.10M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|  1.10M|      }
 1311|   136k|      *nextTokPtr = ptr;
 1312|   136k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   136k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  4.86M|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 4.86M, False: 1.07G]
  ------------------
 1314|  4.86M|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 2.53M, False: 2.32M]
  ------------------
 1315|  2.53M|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.53M|#  define MINBPC(enc) 1
  ------------------
 1316|  2.53M|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  2.53M|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  2.53M|      }
 1318|  2.32M|      *nextTokPtr = ptr;
 1319|  2.32M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.32M|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|   338M|    default:
  ------------------
  |  Branch (1320:5): [True: 338M, False: 743M]
  ------------------
 1321|   338M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   338M|#  define MINBPC(enc) 1
  ------------------
 1322|   338M|      break;
 1323|  1.08G|    }
 1324|  1.08G|  }
 1325|   669k|  *nextTokPtr = ptr;
 1326|   669k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   669k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|  46.9M|}
xmltok.c:normal_entityValueTok:
 1331|  1.03M|                       const char **nextTokPtr) {
 1332|  1.03M|  const char *start;
 1333|  1.03M|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 3.70k, False: 1.02M]
  ------------------
 1334|  3.70k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  3.70k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|  1.02M|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  1.02M|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.02M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.02M|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 1.02M]
  ------------------
 1336|       |    /* This line cannot be executed.  The incoming data has already
 1337|       |     * been tokenized once, so incomplete characters like this have
 1338|       |     * already been eliminated from the input.  Retaining the paranoia
 1339|       |     * check is still valuable, however.
 1340|       |     */
 1341|      0|    return XML_TOK_PARTIAL; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1342|      0|  }
 1343|  1.02M|  start = ptr;
 1344|  8.47M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  8.47M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  8.47M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  8.47M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1346|      0|#  define LEAD_CASE(n)                                                         \
 1347|      0|  case BT_LEAD##n:                                                             \
 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1349|      0|    break;
 1350|  1.41k|      LEAD_CASE(2)
  ------------------
  |  | 1347|  1.41k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 1.41k, False: 8.46M]
  |  |  ------------------
  |  | 1348|  1.41k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|  1.41k|    break;
  ------------------
 1351|  3.23k|      LEAD_CASE(3)
  ------------------
  |  | 1347|  3.23k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 3.23k, False: 8.46M]
  |  |  ------------------
  |  | 1348|  3.23k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|  3.23k|    break;
  ------------------
 1352|  3.61k|      LEAD_CASE(4)
  ------------------
  |  | 1347|  3.61k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 3.61k, False: 8.46M]
  |  |  ------------------
  |  | 1348|  3.61k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|  3.61k|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  18.2k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 18.2k, False: 8.45M]
  ------------------
 1355|  18.2k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 14.0k, False: 4.21k]
  ------------------
 1356|  14.0k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  14.0k|#define PREFIX(ident) normal_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  14.0k|#  define MINBPC(enc) 1
  ------------------
 1357|  4.21k|      *nextTokPtr = ptr;
 1358|  4.21k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  4.21k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      8|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 8, False: 8.47M]
  ------------------
 1360|      8|      if (ptr == start) {
  ------------------
  |  Branch (1360:11): [True: 6, False: 2]
  ------------------
 1361|      6|        int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|      6|#define PREFIX(ident) normal_##ident
  ------------------
                      int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|      6|#  define MINBPC(enc) 1
  ------------------
 1362|      6|        return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   89|      6|#define XML_TOK_PERCENT 22
  ------------------
                      return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (1362:16): [True: 2, False: 4]
  ------------------
 1363|      6|      }
 1364|      2|      *nextTokPtr = ptr;
 1365|      2|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|      2|#define XML_TOK_DATA_CHARS 6
  ------------------
 1366|  34.2k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 34.2k, False: 8.43M]
  ------------------
 1367|  34.2k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 19.8k, False: 14.3k]
  ------------------
 1368|  19.8k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  19.8k|#  define MINBPC(enc) 1
  ------------------
 1369|  19.8k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  19.8k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|  19.8k|      }
 1371|  14.3k|      *nextTokPtr = ptr;
 1372|  14.3k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  14.3k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|   972k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 972k, False: 7.49M]
  ------------------
 1374|   972k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 943k, False: 29.7k]
  ------------------
 1375|   943k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   943k|#  define MINBPC(enc) 1
  ------------------
 1376|   943k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   943k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   943k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   943k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 263, False: 942k]
  ------------------
 1377|    263|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    263|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|   942k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|   942k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   942k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 13.6k, False: 929k]
  ------------------
 1379|  13.6k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  13.6k|#  define MINBPC(enc) 1
  ------------------
 1380|   942k|        *nextTokPtr = ptr;
 1381|   942k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   942k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|   943k|      }
 1383|  29.7k|      *nextTokPtr = ptr;
 1384|  29.7k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  29.7k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  7.43M|    default:
  ------------------
  |  Branch (1385:5): [True: 7.43M, False: 1.03M]
  ------------------
 1386|  7.43M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  7.43M|#  define MINBPC(enc) 1
  ------------------
 1387|  7.43M|      break;
 1388|  8.47M|    }
 1389|  8.47M|  }
 1390|  1.11k|  *nextTokPtr = ptr;
 1391|  1.11k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.11k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|  1.02M|}
xmltok.c:normal_nameMatchesAscii:
 1715|   113k|                         const char *end1, const char *ptr2) {
 1716|   113k|  UNUSED_P(enc);
  ------------------
  |  |  135|   113k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|   540k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  242|   427k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1717:10): [True: 477k, False: 63.8k]
  ------------------
 1718|   477k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  242|   477k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1718:9): [True: 48, False: 477k]
  ------------------
 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|     48|      return 0; /* LCOV_EXCL_LINE */
 1725|     48|    }
 1726|   477k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  300|   477k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (1726:9): [True: 50.0k, False: 427k]
  ------------------
 1727|  50.0k|      return 0;
 1728|   477k|  }
 1729|  63.8k|  return ptr1 == end1;
 1730|   113k|}
xmltok.c:normal_nameLength:
 1733|  2.26M|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  2.26M|  const char *start = ptr;
 1735|  5.33M|  for (;;) {
 1736|  5.33M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  5.33M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  5.33M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1737|      0|#  define LEAD_CASE(n)                                                         \
 1738|      0|  case BT_LEAD##n:                                                             \
 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1740|      0|    break;
 1741|  2.35k|      LEAD_CASE(2)
  ------------------
  |  | 1738|  2.35k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 2.35k, False: 5.33M]
  |  |  ------------------
  |  | 1739|  2.35k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|  2.35k|    break;
  ------------------
 1742|   731k|      LEAD_CASE(3)
  ------------------
  |  | 1738|   731k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 731k, False: 4.60M]
  |  |  ------------------
  |  | 1739|   731k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|   731k|    break;
  ------------------
 1743|      0|      LEAD_CASE(4)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 5.33M]
  |  |  ------------------
  |  | 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: 5.33M]
  ------------------
 1746|  2.27M|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 2.27M, False: 3.06M]
  ------------------
 1747|  2.27M|#  ifdef XML_NS
 1748|  2.27M|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 5.33M]
  ------------------
 1749|  2.27M|#  endif
 1750|  2.29M|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 26.6k, False: 5.31M]
  ------------------
 1751|  2.31M|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 20.8k, False: 5.31M]
  ------------------
 1752|  2.31M|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 666, False: 5.33M]
  ------------------
 1753|  2.34M|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 25.6k, False: 5.31M]
  ------------------
 1754|  2.34M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.34M|#  define MINBPC(enc) 1
  ------------------
 1755|  2.34M|      break;
 1756|  2.26M|    default:
  ------------------
  |  Branch (1756:5): [True: 2.26M, False: 3.07M]
  ------------------
 1757|  2.26M|      return (int)(ptr - start);
 1758|  5.33M|    }
 1759|  5.33M|  }
 1760|  2.26M|}
xmltok.c:normal_getAtts:
 1510|  2.22M|                ATTRIBUTE *atts) {
 1511|  2.22M|  enum { other, inName, inValue } state = inName;
 1512|  2.22M|  int nAtts = 0;
 1513|  2.22M|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  37.3M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  2.22M|#  define MINBPC(enc) 1
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  35.1M|#  define MINBPC(enc) 1
  ------------------
 1517|  37.3M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  37.3M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  37.3M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1518|      0|#  define START_NAME                                                           \
 1519|      0|    if (state == other) {                                                      \
 1520|      0|      if (nAtts < attsMax) {                                                   \
 1521|      0|        atts[nAtts].name = ptr;                                                \
 1522|      0|        atts[nAtts].normalized = 1;                                            \
 1523|      0|      }                                                                        \
 1524|      0|      state = inName;                                                          \
 1525|      0|    }
 1526|      0|#  define LEAD_CASE(n)                                                         \
 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
 1529|      0|    break;
 1530|  1.02M|      LEAD_CASE(2)
  ------------------
  |  | 1527|  1.02M|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 1.02M, False: 36.3M]
  |  |  ------------------
  |  | 1528|  1.02M|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  1.02M|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 489k, False: 539k]
  |  |  |  |  ------------------
  |  |  |  | 1520|   489k|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 245k, False: 244k]
  |  |  |  |  ------------------
  |  |  |  | 1521|   245k|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|   245k|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|   245k|      }                                                                        \
  |  |  |  | 1524|   489k|      state = inName;                                                          \
  |  |  |  | 1525|   489k|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  242|  1.02M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|  1.02M|    break;
  ------------------
 1531|  2.53M|      LEAD_CASE(3)
  ------------------
  |  | 1527|  2.53M|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 2.53M, False: 34.8M]
  |  |  ------------------
  |  | 1528|  2.53M|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  2.53M|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 8.43k, False: 2.52M]
  |  |  |  |  ------------------
  |  |  |  | 1520|  8.43k|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 4.98k, False: 3.44k]
  |  |  |  |  ------------------
  |  |  |  | 1521|  4.98k|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|  4.98k|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|  4.98k|      }                                                                        \
  |  |  |  | 1524|  8.43k|      state = inName;                                                          \
  |  |  |  | 1525|  8.43k|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  242|  2.53M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|  2.53M|    break;
  ------------------
 1532|  4.94k|      LEAD_CASE(4)
  ------------------
  |  | 1527|  4.94k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 4.94k, False: 37.3M]
  |  |  ------------------
  |  | 1528|  4.94k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  4.94k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 4.94k]
  |  |  |  |  ------------------
  |  |  |  | 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|  4.94k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|  4.94k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|      0|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 0, False: 37.3M]
  ------------------
 1535|  10.4M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 10.4M, False: 26.9M]
  ------------------
 1536|  10.8M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 398k, False: 36.9M]
  ------------------
 1537|  10.8M|      START_NAME
  ------------------
  |  | 1519|  10.8M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 3.56M, False: 7.24M]
  |  |  ------------------
  |  | 1520|  3.56M|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 1.78M, False: 1.77M]
  |  |  ------------------
  |  | 1521|  1.78M|        atts[nAtts].name = ptr;                                                \
  |  | 1522|  1.78M|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|  1.78M|      }                                                                        \
  |  | 1524|  3.56M|      state = inName;                                                          \
  |  | 1525|  3.56M|    }
  ------------------
 1538|  10.8M|      break;
 1539|      0|#  undef START_NAME
 1540|  89.5k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 89.5k, False: 37.2M]
  ------------------
 1541|  89.5k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 44.3k, False: 45.1k]
  ------------------
 1542|  44.3k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 28.2k, False: 16.1k]
  ------------------
 1543|  28.2k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  28.2k|#  define MINBPC(enc) 1
  ------------------
 1544|  44.3k|        state = inValue;
 1545|  44.3k|        open = BT_QUOT;
 1546|  45.1k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 44.3k, False: 810]
  ------------------
 1547|  44.3k|        state = other;
 1548|  44.3k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 28.2k, False: 16.1k]
  ------------------
 1549|  28.2k|          atts[nAtts].valueEnd = ptr;
 1550|  44.3k|        nAtts++;
 1551|  44.3k|      }
 1552|  89.5k|      break;
 1553|  8.16M|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 8.16M, False: 29.1M]
  ------------------
 1554|  8.16M|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 4.01M, False: 4.14M]
  ------------------
 1555|  4.01M|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 2.01M, False: 2.00M]
  ------------------
 1556|  2.01M|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.01M|#  define MINBPC(enc) 1
  ------------------
 1557|  4.01M|        state = inValue;
 1558|  4.01M|        open = BT_APOS;
 1559|  4.14M|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 4.01M, False: 129k]
  ------------------
 1560|  4.01M|        state = other;
 1561|  4.01M|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 2.01M, False: 2.00M]
  ------------------
 1562|  2.01M|          atts[nAtts].valueEnd = ptr;
 1563|  4.01M|        nAtts++;
 1564|  4.01M|      }
 1565|  8.16M|      break;
 1566|  51.7k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 51.7k, False: 37.3M]
  ------------------
 1567|  51.7k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 51.5k, False: 246]
  ------------------
 1568|  51.5k|        atts[nAtts].normalized = 0;
 1569|  51.7k|      break;
 1570|  39.9k|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 39.9k, False: 37.3M]
  ------------------
 1571|  39.9k|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 8.92k, False: 30.9k]
  ------------------
 1572|  8.92k|        state = other;
 1573|  30.9k|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 5.75k, False: 25.2k]
  |  Branch (1573:36): [True: 5.24k, False: 508]
  |  Branch (1573:55): [True: 1.98k, False: 3.26k]
  ------------------
 1574|  30.9k|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 954, False: 1.03k]
  ------------------
 1575|  1.98k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  266|  1.03k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|  3.01k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 245, False: 786]
  ------------------
 1576|  1.98k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  266|    786|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|  2.77k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 203, False: 583]
  ------------------
 1577|  1.98k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  255|    583|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|    583|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 300, False: 283]
  ------------------
 1578|  1.70k|        atts[nAtts].normalized = 0;
 1579|  39.9k|      break;
 1580|  5.75M|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 5.75M, False: 31.6M]
  ------------------
 1581|  6.73M|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 984k, False: 36.3M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|  6.73M|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 3.99k, False: 6.73M]
  ------------------
 1585|  3.99k|        state = other;
 1586|  6.73M|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 2.08M, False: 4.65M]
  |  Branch (1586:36): [True: 2.08M, False: 932]
  ------------------
 1587|  2.08M|        atts[nAtts].normalized = 0;
 1588|  6.73M|      break;
 1589|  2.37M|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 2.37M, False: 34.9M]
  ------------------
 1590|  2.45M|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 80.2k, False: 37.2M]
  ------------------
 1591|  2.45M|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 2.22M, False: 222k]
  ------------------
 1592|  2.22M|        return nAtts;
 1593|   222k|      break;
 1594|  5.43M|    default:
  ------------------
  |  Branch (1594:5): [True: 5.43M, False: 31.9M]
  ------------------
 1595|  5.43M|      break;
 1596|  37.3M|    }
 1597|  37.3M|  }
 1598|       |  /* not reached */
 1599|  2.22M|}
xmltok.c:normal_charRefNumber:
 1602|  8.26k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  8.26k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  8.26k|  UNUSED_P(enc);
  ------------------
  |  |  135|  8.26k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  8.26k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  242|  8.26k|#  define MINBPC(enc) 1
  ------------------
 1607|  8.26k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  300|  8.26k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 6.24k, False: 2.02k]
  |  |  ------------------
  ------------------
 1608|  26.5k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  242|  6.24k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  300|  26.5k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (1608:30): [True: 20.3k, False: 6.20k]
  ------------------
 1609|  20.3k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  20.2k|#  define MINBPC(enc) 1
  ------------------
 1610|  20.3k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  266|  20.3k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1611|  20.3k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 20.3k]
  ------------------
 1612|    781|      case ASCII_0:
  ------------------
  |  |   90|    781|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 781, False: 19.5k]
  ------------------
 1613|  1.26k|      case ASCII_1:
  ------------------
  |  |   91|  1.26k|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 483, False: 19.8k]
  ------------------
 1614|  1.80k|      case ASCII_2:
  ------------------
  |  |   92|  1.80k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 536, False: 19.7k]
  ------------------
 1615|  2.13k|      case ASCII_3:
  ------------------
  |  |   93|  2.13k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 331, False: 19.9k]
  ------------------
 1616|  3.26k|      case ASCII_4:
  ------------------
  |  |   94|  3.26k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 1.13k, False: 19.1k]
  ------------------
 1617|  4.05k|      case ASCII_5:
  ------------------
  |  |   95|  4.05k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 794, False: 19.5k]
  ------------------
 1618|  4.37k|      case ASCII_6:
  ------------------
  |  |   96|  4.37k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 318, False: 20.0k]
  ------------------
 1619|  4.72k|      case ASCII_7:
  ------------------
  |  |   97|  4.72k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 345, False: 19.9k]
  ------------------
 1620|  5.73k|      case ASCII_8:
  ------------------
  |  |   98|  5.73k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 1.01k, False: 19.3k]
  ------------------
 1621|  6.18k|      case ASCII_9:
  ------------------
  |  |   99|  6.18k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 454, False: 19.8k]
  ------------------
 1622|  6.18k|        result <<= 4;
 1623|  6.18k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  6.18k|#define ASCII_0 0x30
  ------------------
 1624|  6.18k|        break;
 1625|    696|      case ASCII_A:
  ------------------
  |  |   36|    696|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 696, False: 19.6k]
  ------------------
 1626|  1.15k|      case ASCII_B:
  ------------------
  |  |   37|  1.15k|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 458, False: 19.8k]
  ------------------
 1627|  5.23k|      case ASCII_C:
  ------------------
  |  |   38|  5.23k|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 4.08k, False: 16.2k]
  ------------------
 1628|  8.46k|      case ASCII_D:
  ------------------
  |  |   39|  8.46k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 3.22k, False: 17.0k]
  ------------------
 1629|  8.93k|      case ASCII_E:
  ------------------
  |  |   40|  8.93k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 467, False: 19.8k]
  ------------------
 1630|  9.82k|      case ASCII_F:
  ------------------
  |  |   41|  9.82k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 891, False: 19.4k]
  ------------------
 1631|  9.82k|        result <<= 4;
 1632|  9.82k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  9.82k|#define ASCII_A 0x41
  ------------------
 1633|  9.82k|        break;
 1634|    390|      case ASCII_a:
  ------------------
  |  |   63|    390|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 390, False: 19.9k]
  ------------------
 1635|    781|      case ASCII_b:
  ------------------
  |  |   64|    781|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 391, False: 19.9k]
  ------------------
 1636|  2.56k|      case ASCII_c:
  ------------------
  |  |   65|  2.56k|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 1.78k, False: 18.5k]
  ------------------
 1637|  3.11k|      case ASCII_d:
  ------------------
  |  |   66|  3.11k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 542, False: 19.7k]
  ------------------
 1638|  3.66k|      case ASCII_e:
  ------------------
  |  |   67|  3.66k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 558, False: 19.7k]
  ------------------
 1639|  4.31k|      case ASCII_f:
  ------------------
  |  |   68|  4.31k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 648, False: 19.6k]
  ------------------
 1640|  4.31k|        result <<= 4;
 1641|  4.31k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  4.31k|#define ASCII_a 0x61
  ------------------
 1642|  4.31k|        break;
 1643|  20.3k|      }
 1644|  20.3k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 33, False: 20.2k]
  ------------------
 1645|     33|        return -1;
 1646|  20.3k|    }
 1647|  6.24k|  } else {
 1648|  6.29k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  300|  6.29k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  4.26k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1648:12): [True: 4.27k, False: 2.02k]
  ------------------
 1649|  4.27k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  266|  4.27k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1650|  4.27k|      result *= 10;
 1651|  4.27k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  4.27k|#define ASCII_0 0x30
  ------------------
 1652|  4.27k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 5, False: 4.26k]
  ------------------
 1653|      5|        return -1;
 1654|  4.27k|    }
 1655|  2.02k|  }
 1656|  8.23k|  return checkCharRefNumber(result);
 1657|  8.26k|}
xmltok.c:normal_predefinedEntityName:
 1661|  1.64M|                             const char *end) {
 1662|  1.64M|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.64M|#  define UNUSED_P(p) (void)p
  ------------------
 1663|  1.64M|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  242|  1.64M|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1663:11): [True: 766k, False: 879k]
  ------------------
 1664|  2.46k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 2.46k, False: 1.64M]
  ------------------
 1665|  2.46k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  300|  2.46k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1.37k, False: 1.08k]
  |  |  ------------------
  ------------------
 1666|  1.37k|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  1.37k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  |  |  ------------------
  |  |  |  Branch (266:33): [True: 132, False: 1.24k]
  |  |  ------------------
  ------------------
 1667|    303|      case ASCII_l:
  ------------------
  |  |   74|    303|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 303, False: 1.07k]
  ------------------
 1668|    303|        return ASCII_LT;
  ------------------
  |  |  111|    303|#define ASCII_LT 0x3C
  ------------------
 1669|    942|      case ASCII_g:
  ------------------
  |  |   69|    942|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 942, False: 435]
  ------------------
 1670|    942|        return ASCII_GT;
  ------------------
  |  |  113|    942|#define ASCII_GT 0x3E
  ------------------
 1671|  1.37k|      }
 1672|  1.37k|    }
 1673|  1.22k|    break;
 1674|  1.22k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 970, False: 1.64M]
  ------------------
 1675|    970|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  300|    970|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 626, False: 344]
  |  |  ------------------
  ------------------
 1676|    626|      ptr += MINBPC(enc);
  ------------------
  |  |  242|    626|#  define MINBPC(enc) 1
  ------------------
 1677|    626|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  300|    626|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 420, False: 206]
  |  |  ------------------
  ------------------
 1678|    420|        ptr += MINBPC(enc);
  ------------------
  |  |  242|    420|#  define MINBPC(enc) 1
  ------------------
 1679|    420|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  300|    420|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 222, False: 198]
  |  |  ------------------
  ------------------
 1680|    222|          return ASCII_AMP;
  ------------------
  |  |  105|    222|#define ASCII_AMP 0x26
  ------------------
 1681|    420|      }
 1682|    626|    }
 1683|    748|    break;
 1684|   875k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 875k, False: 769k]
  ------------------
 1685|   875k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|   875k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  |  |  ------------------
  |  |  |  Branch (266:33): [True: 258, False: 875k]
  |  |  ------------------
  ------------------
 1686|   874k|    case ASCII_q:
  ------------------
  |  |   79|   874k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 874k, False: 1.11k]
  ------------------
 1687|   874k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   874k|#  define MINBPC(enc) 1
  ------------------
 1688|   874k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  300|   874k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 874k, False: 224]
  |  |  ------------------
  ------------------
 1689|   874k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   874k|#  define MINBPC(enc) 1
  ------------------
 1690|   874k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  300|   874k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 874k, False: 206]
  |  |  ------------------
  ------------------
 1691|   874k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|   874k|#  define MINBPC(enc) 1
  ------------------
 1692|   874k|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  300|   874k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 874k, False: 215]
  |  |  ------------------
  ------------------
 1693|   874k|            return ASCII_QUOT;
  ------------------
  |  |  104|   874k|#define ASCII_QUOT 0x22
  ------------------
 1694|   874k|        }
 1695|   874k|      }
 1696|    645|      break;
 1697|    852|    case ASCII_a:
  ------------------
  |  |   63|    852|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 852, False: 874k]
  ------------------
 1698|    852|      ptr += MINBPC(enc);
  ------------------
  |  |  242|    852|#  define MINBPC(enc) 1
  ------------------
 1699|    852|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  300|    852|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 653, False: 199]
  |  |  ------------------
  ------------------
 1700|    653|        ptr += MINBPC(enc);
  ------------------
  |  |  242|    653|#  define MINBPC(enc) 1
  ------------------
 1701|    653|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  300|    653|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 450, False: 203]
  |  |  ------------------
  ------------------
 1702|    450|          ptr += MINBPC(enc);
  ------------------
  |  |  242|    450|#  define MINBPC(enc) 1
  ------------------
 1703|    450|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  300|    450|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 216, False: 234]
  |  |  ------------------
  ------------------
 1704|    216|            return ASCII_APOS;
  ------------------
  |  |  106|    216|#define ASCII_APOS 0x27
  ------------------
 1705|    450|        }
 1706|    653|      }
 1707|    636|      break;
 1708|   875k|    }
 1709|  1.64M|  }
 1710|   769k|  return 0;
 1711|  1.64M|}
xmltok.c:normal_updatePosition:
 1779|  4.68k|                       POSITION *pos) {
 1780|  4.21M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  4.21M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.21M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.21M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1782|      0|#  define LEAD_CASE(n)                                                         \
 1783|      0|  case BT_LEAD##n:                                                             \
 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1785|      0|    pos->columnNumber++;                                                       \
 1786|      0|    break;
 1787|  2.71k|      LEAD_CASE(2)
  ------------------
  |  | 1783|  2.71k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 2.71k, False: 4.21M]
  |  |  ------------------
  |  | 1784|  2.71k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  2.71k|    pos->columnNumber++;                                                       \
  |  | 1786|  2.71k|    break;
  ------------------
 1788|  8.85k|      LEAD_CASE(3)
  ------------------
  |  | 1783|  8.85k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 8.85k, False: 4.21M]
  |  |  ------------------
  |  | 1784|  8.85k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  8.85k|    pos->columnNumber++;                                                       \
  |  | 1786|  8.85k|    break;
  ------------------
 1789|  3.95k|      LEAD_CASE(4)
  ------------------
  |  | 1783|  3.95k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 3.95k, False: 4.21M]
  |  |  ------------------
  |  | 1784|  3.95k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  3.95k|    pos->columnNumber++;                                                       \
  |  | 1786|  3.95k|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|   210k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 210k, False: 4.00M]
  ------------------
 1792|   210k|      pos->columnNumber = 0;
 1793|   210k|      pos->lineNumber++;
 1794|   210k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   210k|#  define MINBPC(enc) 1
  ------------------
 1795|   210k|      break;
 1796|  1.91M|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 1.91M, False: 2.30M]
  ------------------
 1797|  1.91M|      pos->lineNumber++;
 1798|  1.91M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.91M|#  define MINBPC(enc) 1
  ------------------
 1799|  1.91M|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|  1.91M|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  3.83M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.91M|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 1.91M, False: 54]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  1.91M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.91M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 771k, False: 1.14M]
  ------------------
 1800|   771k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   771k|#  define MINBPC(enc) 1
  ------------------
 1801|  1.91M|      pos->columnNumber = 0;
 1802|  1.91M|      break;
 1803|  2.07M|    default:
  ------------------
  |  Branch (1803:5): [True: 2.07M, False: 2.14M]
  ------------------
 1804|  2.07M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.07M|#  define MINBPC(enc) 1
  ------------------
 1805|  2.07M|      pos->columnNumber++;
 1806|  2.07M|      break;
 1807|  4.21M|    }
 1808|  4.21M|  }
 1809|  4.68k|}
xmltok.c:normal_isPublicId:
 1450|  2.88k|                   const char **badPtr) {
 1451|  2.88k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.88k|#  define MINBPC(enc) 1
  ------------------
 1452|  2.88k|  end -= MINBPC(enc);
  ------------------
  |  |  242|  2.88k|#  define MINBPC(enc) 1
  ------------------
 1453|  10.6k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  10.6k|#  define MINBPC(enc) 1
  ------------------
 1454|  10.6k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  10.6k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  10.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1455|    436|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 436, False: 10.2k]
  ------------------
 1456|  1.41k|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 974, False: 9.68k]
  ------------------
 1457|  1.63k|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 222, False: 10.4k]
  ------------------
 1458|  1.93k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 304, False: 10.3k]
  ------------------
 1459|  2.16k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 232, False: 10.4k]
  ------------------
 1460|  2.36k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 199, False: 10.4k]
  ------------------
 1461|  2.67k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 311, False: 10.3k]
  ------------------
 1462|  3.12k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 442, False: 10.2k]
  ------------------
 1463|  3.33k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 215, False: 10.4k]
  ------------------
 1464|  3.61k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 277, False: 10.3k]
  ------------------
 1465|  3.85k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 246, False: 10.4k]
  ------------------
 1466|  4.46k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 602, False: 10.0k]
  ------------------
 1467|  4.87k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 413, False: 10.2k]
  ------------------
 1468|  5.06k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 194, False: 10.4k]
  ------------------
 1469|  5.26k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 195, False: 10.4k]
  ------------------
 1470|  5.45k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 195, False: 10.4k]
  ------------------
 1471|  5.68k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 232, False: 10.4k]
  ------------------
 1472|  5.88k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 197, False: 10.4k]
  ------------------
 1473|  5.88k|#  ifdef XML_NS
 1474|  5.88k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 10.6k]
  ------------------
 1475|  5.88k|#  endif
 1476|  5.88k|      break;
 1477|    255|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 255, False: 10.4k]
  ------------------
 1478|    255|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  300|    255|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1, False: 254]
  |  |  ------------------
  ------------------
 1479|      1|        *badPtr = ptr;
 1480|      1|        return 0;
 1481|      1|      }
 1482|    254|      break;
 1483|    254|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 203, False: 10.4k]
  ------------------
 1484|  4.10k|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 3.90k, False: 6.75k]
  ------------------
 1485|  4.10k|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  266|  4.10k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  |  Branch (1485:11): [True: 4.10k, False: 0]
  ------------------
 1486|  4.10k|        break;
 1487|       |      /* fall through */
 1488|    410|    default:
  ------------------
  |  Branch (1488:5): [True: 410, False: 10.2k]
  ------------------
 1489|    410|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|    410|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1490|    203|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 203, False: 207]
  ------------------
 1491|    398|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 195, False: 215]
  ------------------
 1492|    398|        break;
 1493|     12|      default:
  ------------------
  |  Branch (1493:7): [True: 12, False: 398]
  ------------------
 1494|     12|        *badPtr = ptr;
 1495|     12|        return 0;
 1496|    410|      }
 1497|    398|      break;
 1498|  10.6k|    }
 1499|  10.6k|  }
 1500|  2.86k|  return 1;
 1501|  2.88k|}
xmltok.c:little2_prologTok:
 1018|   100k|                  const char **nextTokPtr) {
 1019|   100k|  int tok;
 1020|   100k|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 320, False: 99.8k]
  ------------------
 1021|    320|    return XML_TOK_NONE;
  ------------------
  |  |   51|    320|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  99.8k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  99.8k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|  99.8k|    size_t n = end - ptr;
 1024|  99.8k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  99.8k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1024:9): [True: 37.6k, False: 62.1k]
  ------------------
 1025|  37.6k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  37.6k|#  define MINBPC(enc) 2
  ------------------
 1026|  37.6k|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 27, False: 37.6k]
  ------------------
 1027|     27|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     27|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|  37.6k|      end = ptr + n;
 1029|  37.6k|    }
 1030|  99.8k|  }
 1031|  99.8k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  99.8k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  99.8k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  95.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 95.9k, False: 3.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1032|  2.29k|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 2.29k, False: 97.5k]
  ------------------
 1033|  2.29k|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.29k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.29k|#  define MINBPC(enc) 2
  ------------------
 1034|  4.50k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 4.50k, False: 95.3k]
  ------------------
 1035|  4.50k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  4.50k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  4.50k|#  define MINBPC(enc) 2
  ------------------
 1036|  13.4k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 13.4k, False: 86.3k]
  ------------------
 1037|  13.4k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  13.4k|#  define MINBPC(enc) 2
  ------------------
 1038|  13.4k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  13.4k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  13.4k|    {                                                                          \
  |  |  |  |  135|  13.4k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  13.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  13.4k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 6, False: 13.4k]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|  13.4k|    }
  |  |  ------------------
  ------------------
 1039|  13.4k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  13.4k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  13.4k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  12.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 9, False: 13.4k]
  |  |  |  |  |  Branch (737:4): [True: 12.1k, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  7.61k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 7.61k, False: 5.87k]
  ------------------
 1041|  7.61k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  7.61k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  7.61k|#  define MINBPC(enc) 2
  ------------------
 1042|  2.28k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 2.28k, False: 11.2k]
  ------------------
 1043|  2.28k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.28k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.28k|#  define MINBPC(enc) 2
  ------------------
 1044|  1.56k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 1.56k, False: 11.9k]
  ------------------
 1045|  2.25k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 688, False: 12.7k]
  ------------------
 1046|  3.55k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 1.30k, False: 12.1k]
  ------------------
 1047|  3.55k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 0, False: 13.4k]
  ------------------
 1048|  3.55k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 0, False: 13.4k]
  ------------------
 1049|  3.58k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 25, False: 13.4k]
  ------------------
 1050|  3.58k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  783|  3.58k|#  define MINBPC(enc) 2
  ------------------
 1051|  3.58k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  3.58k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  13.4k|    }
 1053|      9|    *nextTokPtr = ptr;
 1054|      9|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
 1055|  13.4k|  }
 1056|  4.71k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 4.71k, False: 95.1k]
  ------------------
 1057|  4.71k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  783|  4.71k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1057:9): [True: 64, False: 4.65k]
  ------------------
 1058|     64|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|     64|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|     64|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|     64|    }
 1062|       |    /* fall through */
 1063|  22.7k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 18.1k, False: 81.7k]
  ------------------
 1064|  30.8k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 8.07k, False: 91.7k]
  ------------------
 1065|  36.8k|    for (;;) {
 1066|  36.8k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  36.8k|#  define MINBPC(enc) 2
  ------------------
 1067|  36.8k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  36.8k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  36.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  36.8k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 184, False: 36.6k]
  ------------------
 1068|    184|        break;
 1069|  36.6k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  36.6k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  36.6k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  33.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 33.6k, False: 2.96k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1070|  4.11k|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 4.11k, False: 32.5k]
  ------------------
 1071|  5.50k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 1.38k, False: 35.2k]
  ------------------
 1072|  5.50k|        break;
 1073|    479|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 479, False: 36.1k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|    479|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  783|    479|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1075:13): [True: 473, False: 6]
  ------------------
 1076|    473|          break;
 1077|       |        /* fall through */
 1078|  30.6k|      default:
  ------------------
  |  Branch (1078:7): [True: 30.6k, False: 5.98k]
  ------------------
 1079|  30.6k|        *nextTokPtr = ptr;
 1080|  30.6k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|  30.6k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|  36.6k|      }
 1082|  36.6k|    }
 1083|    184|    *nextTokPtr = ptr;
 1084|    184|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    184|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  3.48k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 3.48k, False: 96.3k]
  ------------------
 1086|  3.48k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  3.48k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  3.48k|#  define MINBPC(enc) 2
  ------------------
 1087|  2.66k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 2.66k, False: 97.1k]
  ------------------
 1088|  2.66k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.66k|#  define MINBPC(enc) 2
  ------------------
 1089|  2.66k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  2.66k|#define XML_TOK_COMMA 38
  ------------------
 1090|    985|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 985, False: 98.8k]
  ------------------
 1091|    985|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    985|#  define MINBPC(enc) 2
  ------------------
 1092|    985|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|    985|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|    424|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 424, False: 99.4k]
  ------------------
 1094|    424|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    424|#  define MINBPC(enc) 2
  ------------------
 1095|    424|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    424|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    424|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    424|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 1, False: 423]
  ------------------
 1096|      1|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      1|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|    423|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  787|    423|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    423|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 415, False: 8]
  |  |  |  |  |  Branch (739:52): [True: 42, False: 373]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1098|     42|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     42|    {                                                                          \
  |  |  135|     42|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     42|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|     42|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 41]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     42|    }
  ------------------
 1099|     41|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  787|     41|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|     41|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 24, False: 17]
  |  |  |  |  |  Branch (739:52): [True: 2, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1100|      2|        *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  783|      2|#  define MINBPC(enc) 2
  ------------------
 1101|      2|        return XML_TOK_COND_SECT_CLOSE;
  ------------------
  |  |  103|      2|#define XML_TOK_COND_SECT_CLOSE 34      /* ]]> */
  ------------------
 1102|      2|      }
 1103|     41|    }
 1104|    420|    *nextTokPtr = ptr;
 1105|    420|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|    420|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  5.51k|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 5.51k, False: 94.3k]
  ------------------
 1107|  5.51k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  5.51k|#  define MINBPC(enc) 2
  ------------------
 1108|  5.51k|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  5.51k|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|  4.60k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 4.60k, False: 95.2k]
  ------------------
 1110|  4.60k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.60k|#  define MINBPC(enc) 2
  ------------------
 1111|  4.60k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  4.60k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  4.60k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  4.60k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 5, False: 4.60k]
  ------------------
 1112|      5|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|      5|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|  4.60k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  4.60k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  4.60k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.57k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 35, False: 4.56k]
  |  |  |  |  |  Branch (737:4): [True: 4.57k, False: 29]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|    510|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 510, False: 4.09k]
  ------------------
 1115|    510|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    510|#  define MINBPC(enc) 2
  ------------------
 1116|    510|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|    510|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|    195|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 195, False: 4.40k]
  ------------------
 1118|    195|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    195|#  define MINBPC(enc) 2
  ------------------
 1119|    195|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|    195|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|    207|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 207, False: 4.39k]
  ------------------
 1121|    207|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    207|#  define MINBPC(enc) 2
  ------------------
 1122|    207|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|    207|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|    195|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 195, False: 4.40k]
  ------------------
 1124|    399|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 204, False: 4.39k]
  ------------------
 1125|    625|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 226, False: 4.37k]
  ------------------
 1126|  1.10k|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 483, False: 4.11k]
  ------------------
 1127|  2.05k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 947, False: 3.65k]
  ------------------
 1128|  2.31k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 260, False: 4.34k]
  ------------------
 1129|  3.65k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 1.33k, False: 3.26k]
  ------------------
 1130|  3.65k|      *nextTokPtr = ptr;
 1131|  3.65k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  3.65k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|  4.60k|    }
 1133|     35|    *nextTokPtr = ptr;
 1134|     35|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     35|#define XML_TOK_INVALID 0
  ------------------
 1135|  2.72k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 2.72k, False: 97.1k]
  ------------------
 1136|  2.72k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.72k|#  define MINBPC(enc) 2
  ------------------
 1137|  2.72k|    return XML_TOK_OR;
  ------------------
  |  |   88|  2.72k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  5.58k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 5.58k, False: 94.2k]
  ------------------
 1139|  5.58k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  5.58k|#  define MINBPC(enc) 2
  ------------------
 1140|  5.58k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  5.58k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  2.46k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 2.46k, False: 97.3k]
  ------------------
 1142|  2.46k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.46k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.46k|#  define MINBPC(enc) 2
  ------------------
 1143|      0|#  define LEAD_CASE(n)                                                         \
 1144|      0|  case BT_LEAD##n:                                                             \
 1145|      0|    if (end - ptr < n)                                                         \
 1146|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
 1147|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
 1148|      0|      *nextTokPtr = ptr;                                                       \
 1149|      0|      return XML_TOK_INVALID;                                                  \
 1150|      0|    }                                                                          \
 1151|      0|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
 1152|      0|      ptr += n;                                                                \
 1153|      0|      tok = XML_TOK_NAME;                                                      \
 1154|      0|      break;                                                                   \
 1155|      0|    }                                                                          \
 1156|      0|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
 1157|      0|      ptr += n;                                                                \
 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
 1159|      0|      break;                                                                   \
 1160|      0|    }                                                                          \
 1161|      0|    *nextTokPtr = ptr;                                                         \
 1162|      0|    return XML_TOK_INVALID;
 1163|      0|    LEAD_CASE(2)
  ------------------
  |  | 1144|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 0, False: 99.8k]
  |  |  ------------------
  |  | 1145|      0|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 0, False: 0]
  |  |  ------------------
  |  | 1146|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      0|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      0|    }                                                                          \
  |  | 1151|      0|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (790:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|      0|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (788:35): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|      0|    *nextTokPtr = ptr;                                                         \
  |  | 1162|      0|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1164|      0|    LEAD_CASE(3)
  ------------------
  |  | 1144|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 0, False: 99.8k]
  |  |  ------------------
  |  | 1145|      0|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 0, False: 0]
  |  |  ------------------
  |  | 1146|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      0|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      0|    }                                                                          \
  |  | 1151|      0|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (790:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|      0|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (788:35): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|      0|    *nextTokPtr = ptr;                                                         \
  |  | 1162|      0|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1165|     78|    LEAD_CASE(4)
  ------------------
  |  | 1144|     18|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 24, False: 99.8k]
  |  |  ------------------
  |  | 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|  9.59k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 9.59k, False: 90.2k]
  ------------------
 1168|  15.5k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 5.94k, False: 93.9k]
  ------------------
 1169|  15.5k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|  15.5k|#define XML_TOK_NAME 18
  ------------------
 1170|  15.5k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  15.5k|#  define MINBPC(enc) 2
  ------------------
 1171|  15.5k|    break;
 1172|    376|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 376, False: 99.4k]
  ------------------
 1173|    579|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 203, False: 99.6k]
  ------------------
 1174|    815|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 236, False: 99.6k]
  ------------------
 1175|    815|#  ifdef XML_NS
 1176|    815|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 99.8k]
  ------------------
 1177|    815|#  endif
 1178|    815|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    815|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|    815|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    815|#  define MINBPC(enc) 2
  ------------------
 1180|    815|    break;
 1181|  3.82k|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 3.82k, False: 96.0k]
  ------------------
 1182|  3.82k|    if (IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  791|  3.82k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  743|  3.82k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  3.82k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 3.29k, False: 524]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1183|  3.29k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.29k|#  define MINBPC(enc) 2
  ------------------
 1184|  3.29k|      tok = XML_TOK_NAME;
  ------------------
  |  |   85|  3.29k|#define XML_TOK_NAME 18
  ------------------
 1185|  3.29k|      break;
 1186|  3.29k|    }
 1187|    524|    if (IS_NAME_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  789|    524|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  741|    524|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|    524|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 482, False: 42]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1188|    482|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    482|#  define MINBPC(enc) 2
  ------------------
 1189|    482|      tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    482|#define XML_TOK_NMTOKEN 19
  ------------------
 1190|    482|      break;
 1191|    482|    }
 1192|       |    /* fall through */
 1193|     57|  default:
  ------------------
  |  Branch (1193:3): [True: 15, False: 99.8k]
  ------------------
 1194|     57|    *nextTokPtr = ptr;
 1195|     57|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     57|#define XML_TOK_INVALID 0
  ------------------
 1196|  99.8k|  }
 1197|  53.0k|  while (HAS_CHAR(enc, ptr, end)) {
 1198|  53.0k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  53.0k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  53.0k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  46.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 46.1k, False: 6.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1199|   126k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  33.1k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 6.89k, False: 46.1k]
  |  |  ------------------
  |  |   82|  33.1k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  6.89k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  6.89k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  6.89k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 33, False: 6.86k]
  |  |  ------------------
  |  |   83|     33|      *nextTokPtr = ptr;                                                       \
  |  |   84|     33|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     33|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     33|    }                                                                          \
  |  |   86|  33.1k|    /* fall through */                                                         \
  |  |   87|  33.1k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 14.8k, False: 38.2k]
  |  |  ------------------
  |  |   88|  32.2k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 10.5k, False: 42.5k]
  |  |  ------------------
  |  |   89|  32.5k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 275, False: 52.8k]
  |  |  ------------------
  |  |   90|  32.7k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 261, False: 52.8k]
  |  |  ------------------
  |  |   91|  33.1k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 314, False: 52.7k]
  |  |  ------------------
  |  |   92|  33.1k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  33.1k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  33.1k|    break;                                                                     \
  |  |   94|  33.1k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 53.0k]
  |  |  |  |  ------------------
  |  |  |  |   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: 53.0k]
  |  |  |  |  ------------------
  |  |  |  |   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: 53.0k]
  |  |  |  |  ------------------
  |  |  |  |   71|     23|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 19]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     19|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     38|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     19|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     19|    }                                                                          \
  |  |  |  |   77|     19|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
 1200|    311|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 311, False: 52.7k]
  ------------------
 1201|  2.39k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 2.08k, False: 51.0k]
  ------------------
 1202|  3.27k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 878, False: 52.2k]
  ------------------
 1203|  4.52k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 1.25k, False: 51.8k]
  ------------------
 1204|  5.40k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 883, False: 52.2k]
  ------------------
 1205|  5.40k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 2, False: 53.0k]
  ------------------
 1206|  13.9k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 8.56k, False: 44.5k]
  ------------------
 1207|  15.0k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 1.05k, False: 52.0k]
  ------------------
 1208|  19.1k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 4.10k, False: 48.9k]
  ------------------
 1209|  19.1k|      *nextTokPtr = ptr;
 1210|  19.1k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 53.0k]
  ------------------
 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|    229|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 229, False: 52.8k]
  ------------------
 1232|    229|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    229|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 1, False: 228]
  ------------------
 1233|      1|        *nextTokPtr = ptr;
 1234|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1235|      1|      }
 1236|    228|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    228|#  define MINBPC(enc) 2
  ------------------
 1237|    228|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|    228|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    338|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 338, False: 52.7k]
  ------------------
 1239|    338|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    338|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 337]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|    337|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    337|#  define MINBPC(enc) 2
  ------------------
 1244|    337|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    337|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|    213|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 213, False: 52.8k]
  ------------------
 1246|    213|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    213|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 1, False: 212]
  ------------------
 1247|      1|        *nextTokPtr = ptr;
 1248|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1249|      1|      }
 1250|    212|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    212|#  define MINBPC(enc) 2
  ------------------
 1251|    212|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|    212|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     13|    default:
  ------------------
  |  Branch (1252:5): [True: 13, False: 53.0k]
  ------------------
 1253|     13|      *nextTokPtr = ptr;
 1254|     13|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
 1255|  53.0k|    }
 1256|  53.0k|  }
 1257|    144|  return -tok;
 1258|  20.1k|}
xmltok.c:little2_scanLit:
  984|  6.80k|                const char **nextTokPtr) {
  985|  9.31M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  9.31M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  9.31M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  9.31M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   104k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 104k, False: 9.21M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  987|  9.31M|    switch (t) {
  988|  88.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: 9.31M]
  |  |  |  |  ------------------
  |  |  |  |   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: 9.31M]
  |  |  |  |  ------------------
  |  |  |  |   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|  44.4k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  44.4k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 44.4k, False: 9.27M]
  |  |  |  |  ------------------
  |  |  |  |   50|  44.4k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 29, False: 44.4k]
  |  |  |  |  ------------------
  |  |  |  |   51|  44.4k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     29|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  44.4k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  44.4k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  44.4k|    ptr += n;                                                                  \
  |  |  |  |   57|  44.4k|    break;
  |  |  ------------------
  |  |   63|  44.4k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 15, False: 9.31M]
  |  |  ------------------
  |  |   64|     15|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 9.31M]
  |  |  ------------------
  |  |   65|     21|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 6, False: 9.31M]
  |  |  ------------------
  |  |   66|     21|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     21|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  4.35k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 4.35k, False: 9.31M]
  ------------------
  990|  10.2k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 5.86k, False: 9.30M]
  ------------------
  991|  10.2k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  10.2k|#  define MINBPC(enc) 2
  ------------------
  992|  10.2k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 3.52k, False: 6.68k]
  ------------------
  993|  3.52k|        break;
  994|  6.68k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  6.68k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  6.68k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  6.68k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 1, False: 6.68k]
  ------------------
  995|      1|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      1|#define XML_TOK_LITERAL 27
  ------------------
  996|  6.68k|      *nextTokPtr = ptr;
  997|  6.68k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  6.68k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  6.68k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  6.65k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 6.65k, False: 31]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  998|  1.09k|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 1.09k, False: 5.59k]
  ------------------
  999|  2.36k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 1.26k, False: 5.42k]
  ------------------
 1000|  4.05k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 1.69k, False: 4.99k]
  ------------------
 1001|  6.60k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 2.54k, False: 4.14k]
  ------------------
 1002|  6.62k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 28, False: 6.65k]
  ------------------
 1003|  6.64k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 20, False: 6.66k]
  ------------------
 1004|  6.64k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  6.64k|#define XML_TOK_LITERAL 27
  ------------------
 1005|     39|      default:
  ------------------
  |  Branch (1005:7): [True: 39, False: 6.64k]
  ------------------
 1006|     39|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     39|#define XML_TOK_INVALID 0
  ------------------
 1007|  6.68k|      }
 1008|  9.26M|    default:
  ------------------
  |  Branch (1008:5): [True: 9.26M, False: 54.7k]
  ------------------
 1009|  9.26M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  9.26M|#  define MINBPC(enc) 2
  ------------------
 1010|  9.26M|      break;
 1011|  9.31M|    }
 1012|  9.31M|  }
 1013|     62|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     62|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  6.80k|}
xmltok.c:little2_scanDecl:
  183|  7.61k|                 const char **nextTokPtr) {
  184|  7.61k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  7.61k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  7.61k|    {                                                                          \
  |  |  |  |  135|  7.61k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  7.61k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  7.61k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 6, False: 7.60k]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|  7.61k|    }
  |  |  ------------------
  ------------------
  185|  7.60k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  7.60k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  7.60k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.58k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 7.58k, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|    594|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 594, False: 7.01k]
  ------------------
  187|    594|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    594|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    594|#  define MINBPC(enc) 2
  ------------------
  188|      2|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 2, False: 7.60k]
  ------------------
  189|      2|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|      2|#  define MINBPC(enc) 2
  ------------------
  190|      2|    return XML_TOK_COND_SECT_OPEN;
  ------------------
  |  |  102|      2|#define XML_TOK_COND_SECT_OPEN 33       /* <![ */
  ------------------
  191|    493|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 493, False: 7.11k]
  ------------------
  192|  6.99k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 6.49k, False: 1.11k]
  ------------------
  193|  6.99k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  6.99k|#  define MINBPC(enc) 2
  ------------------
  194|  6.99k|    break;
  195|     22|  default:
  ------------------
  |  Branch (195:3): [True: 22, False: 7.58k]
  ------------------
  196|     22|    *nextTokPtr = ptr;
  197|     22|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     22|#define XML_TOK_INVALID 0
  ------------------
  198|  7.60k|  }
  199|  45.8k|  while (HAS_CHAR(enc, ptr, end)) {
  200|  45.8k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  45.8k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  45.8k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  45.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 45.8k, False: 29]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|     40|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 40, False: 45.8k]
  ------------------
  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: 2, False: 38]
  |  |  ------------------
  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      2|      }                                                                        \
  |  |  138|     40|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|     38|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  785|     38|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|     38|  ((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: 33, False: 5]
  |  |  |  |  |  Branch (737:4): [True: 16, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      1|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 1, False: 37]
  ------------------
  206|      2|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 37]
  ------------------
  207|      3|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 1, False: 37]
  ------------------
  208|      5|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 2, False: 36]
  ------------------
  209|      5|        *nextTokPtr = ptr;
  210|      5|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  211|     38|      }
  212|       |      /* fall through */
  213|  5.09k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 5.06k, False: 40.8k]
  ------------------
  214|  6.28k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 1.18k, False: 44.6k]
  ------------------
  215|  6.92k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 639, False: 45.2k]
  ------------------
  216|  6.92k|      *nextTokPtr = ptr;
  217|  6.92k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  6.92k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|  33.5k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 33.5k, False: 12.3k]
  ------------------
  219|  38.9k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 5.35k, False: 40.5k]
  ------------------
  220|  38.9k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  38.9k|#  define MINBPC(enc) 2
  ------------------
  221|  38.9k|      break;
  222|     29|    default:
  ------------------
  |  Branch (222:5): [True: 29, False: 45.8k]
  ------------------
  223|     29|      *nextTokPtr = ptr;
  224|     29|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     29|#define XML_TOK_INVALID 0
  ------------------
  225|  45.8k|    }
  226|  45.8k|  }
  227|     29|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     29|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  6.99k|}
xmltok.c:little2_scanComment:
  146|    808|                    const char **nextTokPtr) {
  147|    808|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|    808|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    808|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    808|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 794, False: 14]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|    794|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  787|    794|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    794|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 787, False: 7]
  |  |  |  |  |  Branch (739:52): [True: 777, False: 10]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  149|     17|      *nextTokPtr = ptr;
  150|     17|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
  151|     17|    }
  152|    777|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    777|#  define MINBPC(enc) 2
  ------------------
  153|   335k|    while (HAS_CHAR(enc, ptr, end)) {
  154|   335k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   335k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   335k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  14.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 14.5k, False: 321k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|  7.55k|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 335k]
  |  |  |  |  ------------------
  |  |  |  |   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: 335k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  3.76k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  3.73k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.76k, False: 332k]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.76k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 31, False: 3.73k]
  |  |  |  |  ------------------
  |  |  |  |   51|  3.73k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     31|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  3.73k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  3.73k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  3.73k|    ptr += n;                                                                  \
  |  |  |  |   57|  3.73k|    break;
  |  |  ------------------
  |  |   63|  3.73k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 27, False: 335k]
  |  |  ------------------
  |  |   64|     27|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 335k]
  |  |  ------------------
  |  |   65|     32|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 5, False: 335k]
  |  |  ------------------
  |  |   66|     32|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     32|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     32|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  1.23k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 1.23k, False: 334k]
  ------------------
  157|  1.23k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.23k|#  define MINBPC(enc) 2
  ------------------
  158|  1.23k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.23k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.23k|    {                                                                          \
  |  |  |  |  135|  1.23k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.23k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.23k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.23k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.23k|    }
  |  |  ------------------
  ------------------
  159|  1.23k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  787|  1.23k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.23k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.01k, False: 222]
  |  |  |  |  |  Branch (739:52): [True: 646, False: 365]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|    646|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    646|#  define MINBPC(enc) 2
  ------------------
  161|    646|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    646|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    646|    {                                                                          \
  |  |  |  |  135|    646|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    646|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    646|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 645]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    646|    }
  |  |  ------------------
  ------------------
  162|    645|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    645|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    645|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 637, False: 8]
  |  |  |  |  |  Branch (739:52): [True: 622, False: 15]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|     23|            *nextTokPtr = ptr;
  164|     23|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     23|#define XML_TOK_INVALID 0
  ------------------
  165|     23|          }
  166|    622|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    622|#  define MINBPC(enc) 2
  ------------------
  167|    622|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|    622|#define XML_TOK_COMMENT 13
  ------------------
  168|    645|        }
  169|    587|        break;
  170|   330k|      default:
  ------------------
  |  Branch (170:7): [True: 330k, False: 5.03k]
  ------------------
  171|   330k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   330k|#  define MINBPC(enc) 2
  ------------------
  172|   330k|        break;
  173|   335k|      }
  174|   335k|    }
  175|    777|  }
  176|     81|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     81|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|    808|}
xmltok.c:little2_scanPi:
  277|  5.36k|               const char **nextTokPtr) {
  278|  5.36k|  int tok;
  279|  5.36k|  const char *target = ptr;
  280|  5.36k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.36k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.36k|    {                                                                          \
  |  |  |  |  135|  5.36k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.36k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  5.36k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 11, False: 5.35k]
  |  |  |  |  ------------------
  |  |  |  |  136|     11|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     11|      }                                                                        \
  |  |  |  |  138|  5.36k|    }
  |  |  ------------------
  ------------------
  281|  5.35k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  5.35k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.35k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.26k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.26k, False: 1.09k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  282|  5.93k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  5.31k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.06k, False: 4.29k]
  |  |  ------------------
  |  |  111|  5.31k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  1.06k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  1.06k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.06k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 12, False: 1.05k]
  |  |  ------------------
  |  |  112|     12|      *nextTokPtr = ptr;                                                       \
  |  |  113|     12|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     12|    }                                                                          \
  |  |  115|  5.31k|    /* fall through */                                                         \
  |  |  116|  5.31k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.77k, False: 1.58k]
  |  |  ------------------
  |  |  117|  5.31k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 487, False: 4.86k]
  |  |  ------------------
  |  |  118|  5.31k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  5.31k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  5.31k|    break;                                                                     \
  |  |  120|  5.31k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 5.35k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 5.35k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     25|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 25, False: 5.32k]
  |  |  |  |  ------------------
  |  |  |  |  100|     25|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 21]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     21|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     42|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     21|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     21|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     21|    }                                                                          \
  |  |  |  |  106|     21|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  283|      6|  default:
  ------------------
  |  Branch (283:3): [True: 6, False: 5.34k]
  ------------------
  284|      6|    *nextTokPtr = ptr;
  285|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  286|  5.35k|  }
  287|   379k|  while (HAS_CHAR(enc, ptr, end)) {
  288|   379k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   379k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   379k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  12.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 12.4k, False: 367k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  289|  1.86M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   374k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 367k, False: 12.4k]
  |  |  ------------------
  |  |   82|   374k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|   367k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   367k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|   367k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 13, False: 367k]
  |  |  ------------------
  |  |   83|     13|      *nextTokPtr = ptr;                                                       \
  |  |   84|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     13|    }                                                                          \
  |  |   86|   374k|    /* fall through */                                                         \
  |  |   87|   374k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 5.06k, False: 374k]
  |  |  ------------------
  |  |   88|   373k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.08k, False: 378k]
  |  |  ------------------
  |  |   89|   374k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 563, False: 379k]
  |  |  ------------------
  |  |   90|   374k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 195, False: 379k]
  |  |  ------------------
  |  |   91|   374k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 293, False: 379k]
  |  |  ------------------
  |  |   92|   374k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|   374k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|   374k|    break;                                                                     \
  |  |   94|   374k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 379k]
  |  |  |  |  ------------------
  |  |  |  |   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: 379k]
  |  |  |  |  ------------------
  |  |  |  |   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: 379k]
  |  |  |  |  ------------------
  |  |  |  |   71|     23|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 19]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     19|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     38|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     19|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     19|    }                                                                          \
  |  |  |  |   77|     19|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  290|  1.35k|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 1.35k, False: 378k]
  ------------------
  291|  1.68k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 327, False: 379k]
  ------------------
  292|  2.75k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 1.07k, False: 378k]
  ------------------
  293|  2.75k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  782|  2.75k|#  define PREFIX(ident) little2_##ident
  ------------------
  |  Branch (293:11): [True: 1, False: 2.75k]
  ------------------
  294|      1|        *nextTokPtr = ptr;
  295|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  296|      1|      }
  297|  2.75k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.75k|#  define MINBPC(enc) 2
  ------------------
  298|   194k|      while (HAS_CHAR(enc, ptr, end)) {
  299|   194k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   194k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   194k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  27.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 27.8k, False: 166k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  300|  17.9k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 194k]
  |  |  |  |  ------------------
  |  |  |  |   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: 194k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  8.96k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  8.93k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 8.96k, False: 185k]
  |  |  |  |  ------------------
  |  |  |  |   50|  8.96k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 31, False: 8.93k]
  |  |  |  |  ------------------
  |  |  |  |   51|  8.93k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     31|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  8.93k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  8.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|  8.93k|    ptr += n;                                                                  \
  |  |  |  |   57|  8.93k|    break;
  |  |  ------------------
  |  |   63|  8.93k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 16, False: 194k]
  |  |  ------------------
  |  |   64|     16|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 194k]
  |  |  ------------------
  |  |   65|     20|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 194k]
  |  |  ------------------
  |  |   66|     20|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     20|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  3.63k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 3.63k, False: 191k]
  ------------------
  302|  3.63k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.63k|#  define MINBPC(enc) 2
  ------------------
  303|  3.63k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.63k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.63k|    {                                                                          \
  |  |  |  |  135|  3.63k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.63k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  3.63k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 3.63k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  3.63k|    }
  |  |  ------------------
  ------------------
  304|  3.63k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  3.63k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  3.63k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 3.12k, False: 504]
  |  |  |  |  |  Branch (739:52): [True: 2.55k, False: 575]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  305|  2.55k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.55k|#  define MINBPC(enc) 2
  ------------------
  306|  2.55k|            return tok;
  307|  2.55k|          }
  308|  1.07k|          break;
  309|   182k|        default:
  ------------------
  |  Branch (309:9): [True: 182k, False: 12.6k]
  ------------------
  310|   182k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|   182k|#  define MINBPC(enc) 2
  ------------------
  311|   182k|          break;
  312|   194k|        }
  313|   194k|      }
  314|    144|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    144|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  2.43k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 2.43k, False: 377k]
  ------------------
  316|  2.43k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  782|  2.43k|#  define PREFIX(ident) little2_##ident
  ------------------
  |  Branch (316:11): [True: 1, False: 2.43k]
  ------------------
  317|      1|        *nextTokPtr = ptr;
  318|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  319|      1|      }
  320|  2.43k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.43k|#  define MINBPC(enc) 2
  ------------------
  321|  2.43k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.43k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.43k|    {                                                                          \
  |  |  |  |  135|  2.43k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.43k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.43k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 45, False: 2.39k]
  |  |  |  |  ------------------
  |  |  |  |  136|     45|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     45|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     45|      }                                                                        \
  |  |  |  |  138|  2.43k|    }
  |  |  ------------------
  ------------------
  322|  2.39k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  2.39k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.39k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 2.38k, False: 12]
  |  |  |  |  |  Branch (739:52): [True: 2.36k, False: 18]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  323|  2.36k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.36k|#  define MINBPC(enc) 2
  ------------------
  324|  2.36k|        return tok;
  325|  2.36k|      }
  326|       |      /* fall through */
  327|     37|    default:
  ------------------
  |  Branch (327:5): [True: 7, False: 379k]
  ------------------
  328|     37|      *nextTokPtr = ptr;
  329|     37|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     37|#define XML_TOK_INVALID 0
  ------------------
  330|   379k|    }
  331|   379k|  }
  332|     74|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     74|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  5.31k|}
xmltok.c:little2_checkPiTarget:
  232|  5.19k|                      int *tokPtr) {
  233|  5.19k|  int upper = 0;
  234|  5.19k|  UNUSED_P(enc);
  ------------------
  |  |  135|  5.19k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  5.19k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  5.19k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  5.19k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  783|  5.19k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (236:7): [True: 1.90k, False: 3.28k]
  ------------------
  237|  1.90k|    return 1;
  238|  3.28k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  3.28k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  3.28k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 2.73k, False: 556]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  239|  1.43k|  case ASCII_x:
  ------------------
  |  |   86|  1.43k|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 1.43k, False: 1.85k]
  ------------------
  240|  1.43k|    break;
  241|  1.07k|  case ASCII_X:
  ------------------
  |  |   59|  1.07k|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 1.07k, False: 2.21k]
  ------------------
  242|  1.07k|    upper = 1;
  243|  1.07k|    break;
  244|    778|  default:
  ------------------
  |  Branch (244:3): [True: 778, False: 2.51k]
  ------------------
  245|    778|    return 1;
  246|  3.28k|  }
  247|  2.51k|  ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.51k|#  define MINBPC(enc) 2
  ------------------
  248|  2.51k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  2.51k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  2.51k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 1.86k, False: 641]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|  1.14k|  case ASCII_m:
  ------------------
  |  |   75|  1.14k|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 1.14k, False: 1.36k]
  ------------------
  250|  1.14k|    break;
  251|    667|  case ASCII_M:
  ------------------
  |  |   48|    667|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 667, False: 1.84k]
  ------------------
  252|    667|    upper = 1;
  253|    667|    break;
  254|    702|  default:
  ------------------
  |  Branch (254:3): [True: 702, False: 1.80k]
  ------------------
  255|    702|    return 1;
  256|  2.51k|  }
  257|  1.80k|  ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.80k|#  define MINBPC(enc) 2
  ------------------
  258|  1.80k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  1.80k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  1.80k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 1.25k, False: 552]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|     43|  case ASCII_l:
  ------------------
  |  |   74|     43|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 43, False: 1.76k]
  ------------------
  260|     43|    break;
  261|      2|  case ASCII_L:
  ------------------
  |  |   47|      2|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 2, False: 1.80k]
  ------------------
  262|      2|    upper = 1;
  263|      2|    break;
  264|  1.76k|  default:
  ------------------
  |  Branch (264:3): [True: 1.76k, False: 45]
  ------------------
  265|  1.76k|    return 1;
  266|  1.80k|  }
  267|     45|  if (upper)
  ------------------
  |  Branch (267:7): [True: 2, False: 43]
  ------------------
  268|      2|    return 0;
  269|     43|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|     43|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|     43|  return 1;
  271|     45|}
xmltok.c:little2_scanPercent:
  924|  3.49k|                    const char **nextTokPtr) {
  925|  3.49k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.49k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.49k|    {                                                                          \
  |  |  |  |  135|  3.49k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.49k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  3.49k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 26, False: 3.46k]
  |  |  |  |  ------------------
  |  |  |  |  136|     26|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     26|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     26|      }                                                                        \
  |  |  |  |  138|  3.49k|    }
  |  |  ------------------
  ------------------
  926|  3.46k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  3.46k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  3.46k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.05k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 3.05k, False: 415]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  927|  1.15k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|    989|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 395, False: 3.07k]
  |  |  ------------------
  |  |  111|    989|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    395|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    395|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    395|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 15, False: 380]
  |  |  ------------------
  |  |  112|     15|      *nextTokPtr = ptr;                                                       \
  |  |  113|     15|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     15|    }                                                                          \
  |  |  115|    989|    /* fall through */                                                         \
  |  |  116|    989|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 358, False: 3.10k]
  |  |  ------------------
  |  |  117|    989|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 251, False: 3.21k]
  |  |  ------------------
  |  |  118|    989|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|    989|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|    989|    break;                                                                     \
  |  |  120|    989|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 3.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: 3.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: 3.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;
  |  |  ------------------
  ------------------
  928|  1.05k|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 1.05k, False: 2.41k]
  ------------------
  929|  1.83k|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 788, False: 2.67k]
  ------------------
  930|  2.43k|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 599, False: 2.86k]
  ------------------
  931|  2.44k|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 3, False: 3.46k]
  ------------------
  932|  2.44k|    *nextTokPtr = ptr;
  933|  2.44k|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|  2.44k|#define XML_TOK_PERCENT 22
  ------------------
  934|      5|  default:
  ------------------
  |  Branch (934:3): [True: 5, False: 3.46k]
  ------------------
  935|      5|    *nextTokPtr = ptr;
  936|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  937|  3.46k|  }
  938|  2.52k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  2.52k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.52k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.52k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.13k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.13k, False: 397]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  940|  4.54k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.61k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 385, False: 2.14k]
  |  |  ------------------
  |  |   82|  1.61k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    385|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    385|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    385|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 28, False: 357]
  |  |  ------------------
  |  |   83|     28|      *nextTokPtr = ptr;                                                       \
  |  |   84|     28|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     28|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     28|    }                                                                          \
  |  |   86|  1.61k|    /* fall through */                                                         \
  |  |   87|  1.61k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 314, False: 2.21k]
  |  |  ------------------
  |  |   88|    933|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 262, False: 2.26k]
  |  |  ------------------
  |  |   89|  1.17k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 244, False: 2.28k]
  |  |  ------------------
  |  |   90|  1.37k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 194, False: 2.33k]
  |  |  ------------------
  |  |   91|  1.61k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 240, False: 2.28k]
  |  |  ------------------
  |  |   92|  1.61k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.61k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.61k|    break;                                                                     \
  |  |   94|  1.61k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 2.52k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 2.52k]
  |  |  |  |  ------------------
  |  |  |  |   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: 2.52k]
  |  |  |  |  ------------------
  |  |  |  |   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|    870|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 870, False: 1.65k]
  ------------------
  942|    870|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    870|#  define MINBPC(enc) 2
  ------------------
  943|    870|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|    870|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|     12|    default:
  ------------------
  |  Branch (944:5): [True: 12, False: 2.51k]
  ------------------
  945|     12|      *nextTokPtr = ptr;
  946|     12|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  947|  2.52k|    }
  948|  2.52k|  }
  949|     72|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     72|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|    989|}
xmltok.c:little2_scanPoundName:
  954|  2.46k|                      const char **nextTokPtr) {
  955|  2.46k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.46k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.46k|    {                                                                          \
  |  |  |  |  135|  2.46k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.46k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.46k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 2.45k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  2.46k|    }
  |  |  ------------------
  ------------------
  956|  2.45k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.45k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.45k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.36k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.36k, False: 92]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  957|  1.54k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.41k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 64, False: 2.39k]
  |  |  ------------------
  |  |  111|  2.41k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|     64|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|     64|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|     64|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 13, False: 51]
  |  |  ------------------
  |  |  112|     13|      *nextTokPtr = ptr;                                                       \
  |  |  113|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     13|    }                                                                          \
  |  |  115|  2.41k|    /* fall through */                                                         \
  |  |  116|  2.41k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.38k, False: 1.06k]
  |  |  ------------------
  |  |  117|  2.41k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 977, False: 1.48k]
  |  |  ------------------
  |  |  118|  2.41k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  2.41k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  2.41k|    break;                                                                     \
  |  |  120|  2.41k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.45k]
  |  |  |  |  ------------------
  |  |  |  |  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.45k]
  |  |  |  |  ------------------
  |  |  |  |  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: 2.43k]
  |  |  |  |  ------------------
  |  |  |  |  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;
  |  |  ------------------
  ------------------
  958|      5|  default:
  ------------------
  |  Branch (958:3): [True: 5, False: 2.45k]
  ------------------
  959|      5|    *nextTokPtr = ptr;
  960|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  961|  2.45k|  }
  962|  15.5k|  while (HAS_CHAR(enc, ptr, end)) {
  963|  15.5k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  15.5k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  15.5k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  15.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 15.0k, False: 483]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  964|  44.8k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  13.2k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 468, False: 15.1k]
  |  |  ------------------
  |  |   82|  13.2k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    468|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    468|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    468|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 26, False: 442]
  |  |  ------------------
  |  |   83|     26|      *nextTokPtr = ptr;                                                       \
  |  |   84|     26|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     26|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     26|    }                                                                          \
  |  |   86|  13.2k|    /* fall through */                                                         \
  |  |   87|  13.2k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 5.79k, False: 9.78k]
  |  |  ------------------
  |  |   88|  12.4k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 6.21k, False: 9.35k]
  |  |  ------------------
  |  |   89|  12.6k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 238, False: 15.3k]
  |  |  ------------------
  |  |   90|  13.0k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 321, False: 15.2k]
  |  |  ------------------
  |  |   91|  13.2k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 215, False: 15.3k]
  |  |  ------------------
  |  |   92|  13.2k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  13.2k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  13.2k|    break;                                                                     \
  |  |   94|  13.2k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 15.5k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 15.5k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|      9|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 9, False: 15.5k]
  |  |  |  |  ------------------
  |  |  |  |   71|      9|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 4]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#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;
  |  |  ------------------
  ------------------
  965|    194|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 194, False: 15.3k]
  ------------------
  966|    827|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 633, False: 14.9k]
  ------------------
  967|  1.67k|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 848, False: 14.7k]
  ------------------
  968|  1.97k|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 297, False: 15.2k]
  ------------------
  969|  2.04k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 70, False: 15.5k]
  ------------------
  970|  2.04k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 1, False: 15.5k]
  ------------------
  971|  2.30k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 261, False: 15.3k]
  ------------------
  972|  2.30k|      *nextTokPtr = ptr;
  973|  2.30k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  2.30k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|     11|    default:
  ------------------
  |  Branch (974:5): [True: 11, False: 15.5k]
  ------------------
  975|     11|      *nextTokPtr = ptr;
  976|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  977|  15.5k|    }
  978|  15.5k|  }
  979|     67|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     67|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  2.41k|}
xmltok.c:little2_contentTok:
  824|  55.0k|                   const char **nextTokPtr) {
  825|  55.0k|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 1.14k, False: 53.9k]
  ------------------
  826|  1.14k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.14k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|  53.9k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  53.9k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (827:7): [Folded - Ignored]
  ------------------
  828|  53.9k|    size_t n = end - ptr;
  829|  53.9k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  53.9k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (829:9): [True: 11.8k, False: 42.0k]
  ------------------
  830|  11.8k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  11.8k|#  define MINBPC(enc) 2
  ------------------
  831|  11.8k|      if (n == 0)
  ------------------
  |  Branch (831:11): [True: 63, False: 11.8k]
  ------------------
  832|     63|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     63|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  833|  11.8k|      end = ptr + n;
  834|  11.8k|    }
  835|  53.9k|  }
  836|  53.8k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  53.8k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  53.8k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  44.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 44.3k, False: 9.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  837|  14.0k|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 14.0k, False: 39.8k]
  ------------------
  838|  14.0k|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  14.0k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  14.0k|#  define MINBPC(enc) 2
  ------------------
  839|  9.27k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 9.27k, False: 44.6k]
  ------------------
  840|  9.27k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  9.27k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  9.27k|#  define MINBPC(enc) 2
  ------------------
  841|  9.38k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 9.38k, False: 44.4k]
  ------------------
  842|  9.38k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  9.38k|#  define MINBPC(enc) 2
  ------------------
  843|  9.38k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  9.38k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  9.38k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  9.38k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 18, False: 9.37k]
  ------------------
  844|     18|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     18|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  9.37k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  9.37k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  9.37k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.78k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.78k, False: 6.59k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 446, False: 8.92k]
  ------------------
  846|    446|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    446|#  define MINBPC(enc) 2
  ------------------
  847|  9.37k|    *nextTokPtr = ptr;
  848|  9.37k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  9.37k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|  3.42k|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 3.42k, False: 50.4k]
  ------------------
  850|  3.42k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  3.42k|#  define MINBPC(enc) 2
  ------------------
  851|  3.42k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  3.42k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  2.00k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 2.00k, False: 51.8k]
  ------------------
  853|  2.00k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.00k|#  define MINBPC(enc) 2
  ------------------
  854|  2.00k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  2.00k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  2.00k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  2.00k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 4, False: 1.99k]
  ------------------
  855|      4|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      4|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  1.99k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  787|  1.99k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.99k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.41k, False: 588]
  |  |  |  |  |  Branch (739:52): [True: 825, False: 585]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  857|  1.17k|      break;
  858|    825|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    825|#  define MINBPC(enc) 2
  ------------------
  859|    825|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    825|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    825|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    825|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 5, False: 820]
  ------------------
  860|      5|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      5|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|    820|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    820|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    820|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 490, False: 330]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 489]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  862|    819|      ptr -= MINBPC(enc);
  ------------------
  |  |  783|    819|#  define MINBPC(enc) 2
  ------------------
  863|    819|      break;
  864|    819|    }
  865|      1|    *nextTokPtr = ptr;
  866|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  867|  11.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: 53.8k]
  |  |  |  |  ------------------
  |  |  |  |   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: 53.8k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  5.55k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  5.49k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 5.55k, False: 48.3k]
  |  |  |  |  ------------------
  |  |  |  |   50|  5.55k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 55, False: 5.49k]
  |  |  |  |  ------------------
  |  |  |  |   51|  5.49k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     55|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  5.49k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  5.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|  5.49k|    ptr += n;                                                                  \
  |  |  |  |   57|  5.49k|    break;
  |  |  ------------------
  |  |   63|  5.49k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 40, False: 53.8k]
  |  |  ------------------
  |  |   64|     40|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 53.8k]
  |  |  ------------------
  |  |   65|     51|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 11, False: 53.8k]
  |  |  ------------------
  |  |   66|     51|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     51|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     51|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|  10.1k|  default:
  ------------------
  |  Branch (868:3): [True: 10.1k, False: 43.7k]
  ------------------
  869|  10.1k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  10.1k|#  define MINBPC(enc) 2
  ------------------
  870|  10.1k|    break;
  871|  53.8k|  }
  872|   386k|  while (HAS_CHAR(enc, ptr, end)) {
  873|   386k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   386k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   386k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  49.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 49.6k, False: 336k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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: 386k]
  |  |  ------------------
  |  |  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: 386k]
  |  |  ------------------
  |  |  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|  15.5k|      LEAD_CASE(4)
  ------------------
  |  |  875|  15.5k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 15.5k, False: 370k]
  |  |  ------------------
  |  |  876|  15.5k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  15.5k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 51, False: 15.5k]
  |  |  ------------------
  |  |  877|     51|      *nextTokPtr = ptr;                                                       \
  |  |  878|     51|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     51|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     51|    }                                                                          \
  |  |  880|  15.5k|    ptr += n;                                                                  \
  |  |  881|  15.5k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|  3.19k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 3.19k, False: 383k]
  ------------------
  887|  3.19k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|  3.19k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  783|  3.19k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 3.19k, False: 1]
  |  |  ------------------
  ------------------
  888|  3.19k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  787|  3.19k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  3.19k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.98k, False: 1.20k]
  |  |  |  |  |  Branch (739:52): [True: 942, False: 1.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  889|  2.25k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.25k|#  define MINBPC(enc) 2
  ------------------
  890|  2.25k|          break;
  891|  2.25k|        }
  892|    942|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|    942|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  783|    942|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 938, False: 4]
  |  |  ------------------
  ------------------
  893|    938|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  787|    938|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    938|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 491, False: 447]
  |  |  |  |  |  Branch (739:52): [True: 2, False: 489]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  894|    936|            ptr += MINBPC(enc);
  ------------------
  |  |  783|    936|#  define MINBPC(enc) 2
  ------------------
  895|    936|            break;
  896|    936|          }
  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|    938|        }
  900|    942|      }
  901|       |      /* fall through */
  902|  2.77k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 2.76k, False: 383k]
  ------------------
  903|  5.76k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 2.99k, False: 383k]
  ------------------
  904|  5.80k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 36, False: 386k]
  ------------------
  905|  5.80k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 0, False: 386k]
  ------------------
  906|  5.81k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 6, False: 386k]
  ------------------
  907|  14.2k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 8.47k, False: 377k]
  ------------------
  908|  17.2k|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 2.93k, False: 383k]
  ------------------
  909|  17.2k|      *nextTokPtr = ptr;
  910|  17.2k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  17.2k|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|   350k|    default:
  ------------------
  |  Branch (911:5): [True: 350k, False: 36.0k]
  ------------------
  912|   350k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   350k|#  define MINBPC(enc) 2
  ------------------
  913|   350k|      break;
  914|   386k|    }
  915|   386k|  }
  916|    333|  *nextTokPtr = ptr;
  917|    333|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    333|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|  17.6k|}
xmltok.c:little2_scanLt:
  726|  14.0k|               const char **nextTokPtr) {
  727|  14.0k|#  ifdef XML_NS
  728|  14.0k|  int hadColon;
  729|  14.0k|#  endif
  730|  14.0k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  14.0k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  14.0k|    {                                                                          \
  |  |  |  |  135|  14.0k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  14.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  14.0k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 14, False: 14.0k]
  |  |  |  |  ------------------
  |  |  |  |  136|     14|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     14|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     14|      }                                                                        \
  |  |  |  |  138|  14.0k|    }
  |  |  ------------------
  ------------------
  731|  14.0k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  14.0k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  14.0k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  11.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 11.4k, False: 2.60k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  732|  9.68k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  8.75k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 2.57k, False: 11.4k]
  |  |  ------------------
  |  |  111|  8.75k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  2.57k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  2.57k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  2.57k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 23, False: 2.55k]
  |  |  ------------------
  |  |  112|     23|      *nextTokPtr = ptr;                                                       \
  |  |  113|     23|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     23|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     23|    }                                                                          \
  |  |  115|  8.75k|    /* fall through */                                                         \
  |  |  116|  8.75k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.50k, False: 9.55k]
  |  |  ------------------
  |  |  117|  8.75k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 1.69k, False: 12.3k]
  |  |  ------------------
  |  |  118|  8.75k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  8.75k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  8.75k|    break;                                                                     \
  |  |  120|  8.75k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 14.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: 14.0k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     25|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 25, False: 14.0k]
  |  |  |  |  ------------------
  |  |  |  |  100|     25|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 6, False: 19]
  |  |  |  |  ------------------
  |  |  |  |  101|      6|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      6|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     19|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     38|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     19|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     19|    }                                                                          \
  |  |  |  |  106|     19|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  733|    920|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 920, False: 13.1k]
  ------------------
  734|    920|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    920|#  define MINBPC(enc) 2
  ------------------
  735|    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)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    920|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 919]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    920|    }
  |  |  ------------------
  ------------------
  736|    919|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|    919|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|    919|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    896|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 23, False: 896]
  |  |  |  |  |  Branch (737:4): [True: 896, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    214|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 214, False: 705]
  ------------------
  738|    214|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    214|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    214|#  define MINBPC(enc) 2
  ------------------
  739|    682|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 682, False: 237]
  ------------------
  740|    682|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    682|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    682|#  define MINBPC(enc) 2
  ------------------
  741|    919|    }
  742|     23|    *nextTokPtr = ptr;
  743|     23|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     23|#define XML_TOK_INVALID 0
  ------------------
  744|  3.08k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 3.08k, False: 10.9k]
  ------------------
  745|  3.08k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  3.08k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  3.08k|#  define MINBPC(enc) 2
  ------------------
  746|  1.24k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 1.24k, False: 12.8k]
  ------------------
  747|  1.24k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.24k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.24k|#  define MINBPC(enc) 2
  ------------------
  748|      8|  default:
  ------------------
  |  Branch (748:3): [True: 8, False: 14.0k]
  ------------------
  749|      8|    *nextTokPtr = ptr;
  750|      8|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  751|  14.0k|  }
  752|  8.75k|#  ifdef XML_NS
  753|  8.75k|  hadColon = 0;
  754|  8.75k|#  endif
  755|       |  /* we have a start-tag */
  756|  1.57M|  while (HAS_CHAR(enc, ptr, end)) {
  757|  1.57M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.57M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.57M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  11.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 11.7k, False: 1.56M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  758|  7.80M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.56M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 1.56M, False: 11.7k]
  |  |  ------------------
  |  |   82|  1.56M|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  1.56M|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  1.56M|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.56M|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 21, False: 1.56M]
  |  |  ------------------
  |  |   83|     21|      *nextTokPtr = ptr;                                                       \
  |  |   84|     21|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     21|    }                                                                          \
  |  |   86|  1.56M|    /* fall through */                                                         \
  |  |   87|  1.56M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.07k, False: 1.57M]
  |  |  ------------------
  |  |   88|  1.56M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 723, False: 1.57M]
  |  |  ------------------
  |  |   89|  1.56M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 254, False: 1.57M]
  |  |  ------------------
  |  |   90|  1.56M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 585, False: 1.57M]
  |  |  ------------------
  |  |   91|  1.56M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 473, False: 1.57M]
  |  |  ------------------
  |  |   92|  1.56M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.56M|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.56M|    break;                                                                     \
  |  |   94|  1.56M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 1.57M]
  |  |  |  |  ------------------
  |  |  |  |   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.57M]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|      9|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 9, False: 1.57M]
  |  |  |  |  ------------------
  |  |  |  |   71|      9|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 5]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      5|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     10|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      5|    }                                                                          \
  |  |  |  |   77|      5|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 1.57M]
  ------------------
  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.22k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 2.22k, False: 1.56M]
  ------------------
  777|  3.23k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 1.01k, False: 1.57M]
  ------------------
  778|  4.15k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 915, False: 1.57M]
  ------------------
  779|  4.15k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.15k|#  define MINBPC(enc) 2
  ------------------
  780|  5.09k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  5.09k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  5.09k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.09k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.02k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.02k, False: 1.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  782|  3.41k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  3.02k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.03k, False: 4.05k]
  |  |  ------------------
  |  |  111|  3.02k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  1.03k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  1.03k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.03k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 13, False: 1.02k]
  |  |  ------------------
  |  |  112|     13|      *nextTokPtr = ptr;                                                       \
  |  |  113|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     13|    }                                                                          \
  |  |  115|  3.02k|    /* fall through */                                                         \
  |  |  116|  3.02k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.31k, False: 3.77k]
  |  |  ------------------
  |  |  117|  3.02k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 690, False: 4.40k]
  |  |  ------------------
  |  |  118|  3.02k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  3.02k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  3.02k|    break;                                                                     \
  |  |  120|  3.02k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 5.09k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 5.09k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     24|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 24, False: 5.06k]
  |  |  |  |  ------------------
  |  |  |  |  100|     24|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 20]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     20|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     40|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     20|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     20|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     20|    }                                                                          \
  |  |  |  |  106|     20|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  783|    836|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 836, False: 4.25k]
  ------------------
  784|    836|          goto gt;
  785|    204|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 204, False: 4.88k]
  ------------------
  786|    204|          goto sol;
  787|    276|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 276, False: 4.81k]
  ------------------
  788|    661|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 385, False: 4.70k]
  ------------------
  789|    983|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 322, False: 4.77k]
  ------------------
  790|    983|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    983|#  define MINBPC(enc) 2
  ------------------
  791|    983|          continue;
  792|      5|        default:
  ------------------
  |  Branch (792:9): [True: 5, False: 5.08k]
  ------------------
  793|      5|          *nextTokPtr = ptr;
  794|      5|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  795|  5.09k|        }
  796|  3.02k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  782|  3.02k|#  define PREFIX(ident) little2_##ident
  ------------------
  797|  5.09k|      }
  798|     41|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     41|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  4.15k|    }
  800|  4.24k|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 4.24k, False: 1.56M]
  ------------------
  801|  5.08k|    gt:
  802|  5.08k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  5.08k|#  define MINBPC(enc) 2
  ------------------
  803|  5.08k|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  5.08k|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|    253|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 253, False: 1.57M]
  ------------------
  805|    457|    sol:
  806|    457|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    457|#  define MINBPC(enc) 2
  ------------------
  807|    457|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    457|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    457|    {                                                                          \
  |  |  |  |  135|    457|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    457|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    457|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 11, False: 446]
  |  |  |  |  ------------------
  |  |  |  |  136|     11|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     11|      }                                                                        \
  |  |  |  |  138|    457|    }
  |  |  ------------------
  ------------------
  808|    446|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    446|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    446|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 441, False: 5]
  |  |  |  |  |  Branch (739:52): [True: 424, False: 17]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  809|     22|        *nextTokPtr = ptr;
  810|     22|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     22|#define XML_TOK_INVALID 0
  ------------------
  811|     22|      }
  812|    424|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    424|#  define MINBPC(enc) 2
  ------------------
  813|    424|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|    424|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|      6|    default:
  ------------------
  |  Branch (814:5): [True: 6, False: 1.57M]
  ------------------
  815|      6|      *nextTokPtr = ptr;
  816|      6|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  817|  1.57M|    }
  818|  1.57M|  }
  819|     72|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     72|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  8.75k|}
xmltok.c:little2_scanCdataSection:
  337|    682|                         const char **nextTokPtr) {
  338|    682|  static const char CDATA_LSQB[]
  339|    682|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|    682|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|    682|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    682|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|    682|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    682|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|    682|#define ASCII_LSQB 0x5B
  ------------------
  340|    682|  int i;
  341|    682|  UNUSED_P(enc);
  ------------------
  |  |  135|    682|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|    682|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|    682|    {                                                                          \
  |  |  135|    682|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|    682|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    682|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 5, False: 677]
  |  |  ------------------
  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      5|      }                                                                        \
  |  |  138|    682|    }
  ------------------
  344|  4.69k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  4.01k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (344:15): [True: 4.02k, False: 663]
  ------------------
  345|  4.02k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  787|  4.02k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  4.02k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 4.01k, False: 9]
  |  |  |  |  |  Branch (739:52): [True: 4.01k, False: 5]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  346|     14|      *nextTokPtr = ptr;
  347|     14|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  348|     14|    }
  349|  4.02k|  }
  350|    663|  *nextTokPtr = ptr;
  351|    663|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|    663|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|    677|}
xmltok.c:little2_scanEndTag:
  432|  1.24k|                   const char **nextTokPtr) {
  433|  1.24k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.24k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.24k|    {                                                                          \
  |  |  |  |  135|  1.24k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.24k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.24k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.24k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.24k|    }
  |  |  ------------------
  ------------------
  434|  1.24k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.24k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.24k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    929|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 929, False: 311]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  435|  1.21k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.21k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 292, False: 948]
  |  |  ------------------
  |  |  111|  1.21k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    292|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    292|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    292|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 4, False: 288]
  |  |  ------------------
  |  |  112|      4|      *nextTokPtr = ptr;                                                       \
  |  |  113|      4|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      4|    }                                                                          \
  |  |  115|  1.21k|    /* fall through */                                                         \
  |  |  116|  1.21k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 612, False: 628]
  |  |  ------------------
  |  |  117|  1.21k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 317, False: 923]
  |  |  ------------------
  |  |  118|  1.21k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.21k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.21k|    break;                                                                     \
  |  |  120|  1.21k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.24k]
  |  |  |  |  ------------------
  |  |  |  |  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.24k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     14|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 14, False: 1.22k]
  |  |  |  |  ------------------
  |  |  |  |  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;
  |  |  ------------------
  ------------------
  436|      5|  default:
  ------------------
  |  Branch (436:3): [True: 5, False: 1.23k]
  ------------------
  437|      5|    *nextTokPtr = ptr;
  438|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  439|  1.24k|  }
  440|  2.79k|  while (HAS_CHAR(enc, ptr, end)) {
  441|  2.79k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.79k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.79k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.25k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.25k, False: 536]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  442|  4.75k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.64k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 508, False: 2.28k]
  |  |  ------------------
  |  |   82|  1.64k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    508|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    508|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    508|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 16, False: 492]
  |  |  ------------------
  |  |   83|     16|      *nextTokPtr = ptr;                                                       \
  |  |   84|     16|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     16|    }                                                                          \
  |  |   86|  1.64k|    /* fall through */                                                         \
  |  |   87|  1.64k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 233, False: 2.56k]
  |  |  ------------------
  |  |   88|    930|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 205, False: 2.58k]
  |  |  ------------------
  |  |   89|  1.13k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 200, False: 2.59k]
  |  |  ------------------
  |  |   90|  1.41k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 289, False: 2.50k]
  |  |  ------------------
  |  |   91|  1.64k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 223, False: 2.57k]
  |  |  ------------------
  |  |   92|  1.64k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.64k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.64k|    break;                                                                     \
  |  |   94|  1.64k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 2.79k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 2.79k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 2.77k]
  |  |  |  |  ------------------
  |  |  |  |   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;
  |  |  ------------------
  ------------------
  443|    209|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 209, False: 2.58k]
  ------------------
  444|    423|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 214, False: 2.57k]
  ------------------
  445|    650|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 227, False: 2.56k]
  ------------------
  446|  1.25k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|    650|#  define MINBPC(enc) 2
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|    645|#  define MINBPC(enc) 2
  ------------------
  447|  1.25k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.25k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.25k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.23k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.23k, False: 16]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  448|    229|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 229, False: 1.02k]
  ------------------
  449|    424|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 195, False: 1.06k]
  ------------------
  450|    645|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 221, False: 1.03k]
  ------------------
  451|    645|          break;
  452|    591|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 591, False: 664]
  ------------------
  453|    591|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    591|#  define MINBPC(enc) 2
  ------------------
  454|    591|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|    591|#define XML_TOK_END_TAG 5
  ------------------
  455|     19|        default:
  ------------------
  |  Branch (455:9): [True: 19, False: 1.23k]
  ------------------
  456|     19|          *nextTokPtr = ptr;
  457|     19|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     19|#define XML_TOK_INVALID 0
  ------------------
  458|  1.25k|        }
  459|  1.25k|      }
  460|     40|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     40|#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.79k]
  ------------------
  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|    456|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 456, False: 2.33k]
  ------------------
  469|    456|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    456|#  define MINBPC(enc) 2
  ------------------
  470|    456|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|    456|#define XML_TOK_END_TAG 5
  ------------------
  471|      8|    default:
  ------------------
  |  Branch (471:5): [True: 8, False: 2.78k]
  ------------------
  472|      8|      *nextTokPtr = ptr;
  473|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  474|  2.79k|    }
  475|  2.79k|  }
  476|     66|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     66|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  1.21k|}
xmltok.c:little2_scanAtts:
  573|  3.02k|                 const char **nextTokPtr) {
  574|  3.02k|#  ifdef XML_NS
  575|  3.02k|  int hadColon = 0;
  576|  3.02k|#  endif
  577|   295k|  while (HAS_CHAR(enc, ptr, end)) {
  578|   295k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   295k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   295k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   295k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 295k, False: 582]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  579|  8.31k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  2.51k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 568, False: 295k]
  |  |  ------------------
  |  |   82|  2.51k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    568|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    568|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    568|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 16, False: 552]
  |  |  ------------------
  |  |   83|     16|      *nextTokPtr = ptr;                                                       \
  |  |   84|     16|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     16|    }                                                                          \
  |  |   86|  2.51k|    /* fall through */                                                         \
  |  |   87|  2.51k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 835, False: 295k]
  |  |  ------------------
  |  |   88|  1.91k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 528, False: 295k]
  |  |  ------------------
  |  |   89|  2.12k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 205, False: 295k]
  |  |  ------------------
  |  |   90|  2.31k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 194, False: 295k]
  |  |  ------------------
  |  |   91|  2.51k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 199, False: 295k]
  |  |  ------------------
  |  |   92|  2.51k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  2.51k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  2.51k|    break;                                                                     \
  |  |   94|  2.51k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 295k]
  |  |  |  |  ------------------
  |  |  |  |   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: 295k]
  |  |  |  |  ------------------
  |  |  |  |   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: 295k]
  |  |  |  |  ------------------
  |  |  |  |   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: 295k]
  ------------------
  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|    300|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 300, False: 295k]
  ------------------
  598|  1.18k|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 883, False: 295k]
  ------------------
  599|  1.40k|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 223, False: 295k]
  ------------------
  600|  2.20k|      for (;;) {
  601|  2.20k|        int t;
  602|       |
  603|  2.20k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.20k|#  define MINBPC(enc) 2
  ------------------
  604|  2.20k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.20k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.20k|    {                                                                          \
  |  |  |  |  135|  2.20k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.20k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.20k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 44, False: 2.16k]
  |  |  |  |  ------------------
  |  |  |  |  136|     44|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     44|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     44|      }                                                                        \
  |  |  |  |  138|  2.20k|    }
  |  |  ------------------
  ------------------
  605|  2.16k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  2.16k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.16k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.15k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.15k, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  606|  2.16k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 1.34k, False: 815]
  ------------------
  607|  1.34k|          break;
  608|    815|        switch (t) {
  609|    333|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 333, False: 482]
  ------------------
  610|    573|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 240, False: 575]
  ------------------
  611|    800|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 227, False: 588]
  ------------------
  612|    800|          break;
  613|     15|        default:
  ------------------
  |  Branch (613:9): [True: 15, False: 800]
  ------------------
  614|     15|          *nextTokPtr = ptr;
  615|     15|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  616|    815|        }
  617|    815|      }
  618|       |      /* fall through */
  619|   293k|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 292k, False: 3.95k]
  ------------------
  620|   293k|      int open;
  621|   293k|#  ifdef XML_NS
  622|   293k|      hadColon = 0;
  623|   293k|#  endif
  624|   294k|      for (;;) {
  625|   294k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   294k|#  define MINBPC(enc) 2
  ------------------
  626|   294k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   294k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   294k|    {                                                                          \
  |  |  |  |  135|   294k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   294k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   294k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 44, False: 294k]
  |  |  |  |  ------------------
  |  |  |  |  136|     44|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     44|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     44|      }                                                                        \
  |  |  |  |  138|   294k|    }
  |  |  ------------------
  ------------------
  627|   294k|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|   294k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   294k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   294k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 294k, False: 27]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  628|   294k|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 7.04k, False: 287k]
  |  Branch (628:32): [True: 286k, False: 900]
  ------------------
  629|   293k|          break;
  630|    900|        switch (open) {
  631|    335|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 335, False: 565]
  ------------------
  632|    545|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 210, False: 690]
  ------------------
  633|    870|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 325, False: 575]
  ------------------
  634|    870|          break;
  635|     30|        default:
  ------------------
  |  Branch (635:9): [True: 30, False: 870]
  ------------------
  636|     30|          *nextTokPtr = ptr;
  637|     30|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     30|#define XML_TOK_INVALID 0
  ------------------
  638|    900|        }
  639|    900|      }
  640|   293k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   293k|#  define MINBPC(enc) 2
  ------------------
  641|       |      /* in attribute value */
  642|  5.37M|      for (;;) {
  643|  5.37M|        int t;
  644|  5.37M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.37M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.37M|    {                                                                          \
  |  |  |  |  135|  5.37M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.37M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  5.37M|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 61, False: 5.37M]
  |  |  |  |  ------------------
  |  |  |  |  136|     61|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     61|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     61|      }                                                                        \
  |  |  |  |  138|  5.37M|    }
  |  |  ------------------
  ------------------
  645|  5.37M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  5.37M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.37M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.44M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.44M, False: 3.93M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  646|  5.37M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 293k, False: 5.08M]
  ------------------
  647|   293k|          break;
  648|  5.08M|        switch (t) {
  649|   437k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 5.08M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 5.08M]
  |  |  |  |  ------------------
  |  |  |  |   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|   218k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|   218k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 218k, False: 4.86M]
  |  |  |  |  ------------------
  |  |  |  |   50|   218k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 30, False: 218k]
  |  |  |  |  ------------------
  |  |  |  |   51|   218k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     30|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|   218k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   218k|#    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|   218k|    ptr += n;                                                                  \
  |  |  |  |   57|   218k|    break;
  |  |  ------------------
  |  |   63|   218k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 12, False: 5.08M]
  |  |  ------------------
  |  |   64|     12|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 5.08M]
  |  |  ------------------
  |  |   65|     19|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 7, False: 5.08M]
  |  |  ------------------
  |  |   66|     19|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     19|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  10.2k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 10.2k, False: 5.07M]
  ------------------
  651|  10.2k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  782|  10.2k|#  define PREFIX(ident) little2_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  783|  10.2k|#  define MINBPC(enc) 2
  ------------------
  652|  10.2k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 9, False: 10.1k]
  ------------------
  653|      9|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 4, False: 5]
  ------------------
  654|      4|              *nextTokPtr = ptr;
  655|      9|            return tok;
  656|      9|          }
  657|  10.1k|          break;
  658|  10.2k|        }
  659|  10.1k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 5, False: 5.08M]
  ------------------
  660|      5|          *nextTokPtr = ptr;
  661|      5|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  662|  4.85M|        default:
  ------------------
  |  Branch (662:9): [True: 4.85M, False: 228k]
  ------------------
  663|  4.85M|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.85M|#  define MINBPC(enc) 2
  ------------------
  664|  4.85M|          break;
  665|  5.08M|        }
  666|  5.08M|      }
  667|   293k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   293k|#  define MINBPC(enc) 2
  ------------------
  668|   293k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   293k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   293k|    {                                                                          \
  |  |  |  |  135|   293k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   293k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   293k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 6, False: 293k]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|   293k|    }
  |  |  ------------------
  ------------------
  669|   293k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   293k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   293k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   293k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 293k, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  670|   286k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 286k, False: 6.79k]
  ------------------
  671|   287k|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 1.60k, False: 291k]
  ------------------
  672|   291k|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 3.25k, False: 289k]
  ------------------
  673|   291k|        break;
  674|    328|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 328, False: 292k]
  ------------------
  675|    328|        goto sol;
  676|  1.57k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 1.57k, False: 291k]
  ------------------
  677|  1.57k|        goto gt;
  678|     28|      default:
  ------------------
  |  Branch (678:7): [True: 28, False: 293k]
  ------------------
  679|     28|        *nextTokPtr = ptr;
  680|     28|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     28|#define XML_TOK_INVALID 0
  ------------------
  681|   293k|      }
  682|       |      /* ptr points to closing quote */
  683|   292k|      for (;;) {
  684|   292k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   292k|#  define MINBPC(enc) 2
  ------------------
  685|   292k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   292k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   292k|    {                                                                          \
  |  |  |  |  135|   292k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   292k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   292k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 42, False: 292k]
  |  |  |  |  ------------------
  |  |  |  |  136|     42|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     42|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     42|      }                                                                        \
  |  |  |  |  138|   292k|    }
  |  |  ------------------
  ------------------
  686|   292k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   292k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   292k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   291k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 291k, False: 1.64k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  687|   231k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   290k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.61k, False: 291k]
  |  |  ------------------
  |  |  111|   290k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  1.61k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  1.61k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.61k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 5, False: 1.60k]
  |  |  ------------------
  |  |  112|      5|      *nextTokPtr = ptr;                                                       \
  |  |  113|      5|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      5|    }                                                                          \
  |  |  115|   290k|    /* fall through */                                                         \
  |  |  116|   290k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 228k, False: 64.4k]
  |  |  ------------------
  |  |  117|   290k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 60.5k, False: 232k]
  |  |  ------------------
  |  |  118|   290k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|   290k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   290k|    break;                                                                     \
  |  |  120|   290k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 292k]
  |  |  |  |  ------------------
  |  |  |  |  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: 292k]
  |  |  |  |  ------------------
  |  |  |  |  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: 292k]
  |  |  |  |  ------------------
  |  |  |  |  100|     22|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 18]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     18|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     36|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     18|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     18|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     18|    }                                                                          \
  |  |  |  |  106|     18|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  688|    686|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 686, False: 292k]
  ------------------
  689|  1.16k|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 476, False: 292k]
  ------------------
  690|  1.66k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 498, False: 292k]
  ------------------
  691|  1.66k|          continue;
  692|    263|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 263, False: 292k]
  ------------------
  693|  1.84k|        gt:
  694|  1.84k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.84k|#  define MINBPC(enc) 2
  ------------------
  695|  1.84k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  1.84k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|    360|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 360, False: 292k]
  ------------------
  697|    688|        sol:
  698|    688|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    688|#  define MINBPC(enc) 2
  ------------------
  699|    688|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    688|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    688|    {                                                                          \
  |  |  |  |  135|    688|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    688|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    688|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 11, False: 677]
  |  |  |  |  ------------------
  |  |  |  |  136|     11|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     11|      }                                                                        \
  |  |  |  |  138|    688|    }
  |  |  ------------------
  ------------------
  700|    677|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    677|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    677|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 673, False: 4]
  |  |  |  |  |  Branch (739:52): [True: 664, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  701|     13|            *nextTokPtr = ptr;
  702|     13|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  703|     13|          }
  704|    664|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    664|#  define MINBPC(enc) 2
  ------------------
  705|    664|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|    664|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|     13|        default:
  ------------------
  |  Branch (706:9): [True: 13, False: 292k]
  ------------------
  707|     13|          *nextTokPtr = ptr;
  708|     13|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  709|   292k|        }
  710|   290k|        break;
  711|   292k|      }
  712|   290k|      break;
  713|   291k|    }
  714|   290k|    default:
  ------------------
  |  Branch (714:5): [True: 11, False: 295k]
  ------------------
  715|     11|      *nextTokPtr = ptr;
  716|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  717|   295k|    }
  718|   295k|  }
  719|     91|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     91|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  3.02k|}
xmltok.c:little2_scanRef:
  545|  29.3k|                const char **nextTokPtr) {
  546|  29.3k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  29.3k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  29.3k|    {                                                                          \
  |  |  |  |  135|  29.3k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  29.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  29.3k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 28, False: 29.3k]
  |  |  |  |  ------------------
  |  |  |  |  136|     28|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     28|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     28|      }                                                                        \
  |  |  |  |  138|  29.3k|    }
  |  |  ------------------
  ------------------
  547|  29.3k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  29.3k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  29.3k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  27.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 27.9k, False: 1.39k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  548|  6.38k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  23.4k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.38k, False: 27.9k]
  |  |  ------------------
  |  |  111|  23.4k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  1.38k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  1.38k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.38k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 14, False: 1.36k]
  |  |  ------------------
  |  |  112|     14|      *nextTokPtr = ptr;                                                       \
  |  |  113|     14|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     14|    }                                                                          \
  |  |  115|  23.4k|    /* fall through */                                                         \
  |  |  116|  23.4k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.61k, False: 25.7k]
  |  |  ------------------
  |  |  117|  23.4k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 18.4k, False: 10.8k]
  |  |  ------------------
  |  |  118|  23.4k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  23.4k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  23.4k|    break;                                                                     \
  |  |  120|  23.4k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 29.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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 29.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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     11|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 11, False: 29.3k]
  |  |  |  |  ------------------
  |  |  |  |  100|     11|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 6]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      6|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     12|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      6|    }                                                                          \
  |  |  |  |  106|      6|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  549|  5.87k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 5.87k, False: 23.4k]
  ------------------
  550|  5.87k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  5.87k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  5.87k|#  define MINBPC(enc) 2
  ------------------
  551|     10|  default:
  ------------------
  |  Branch (551:3): [True: 10, False: 29.3k]
  ------------------
  552|     10|    *nextTokPtr = ptr;
  553|     10|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  554|  29.3k|  }
  555|  42.0k|  while (HAS_CHAR(enc, ptr, end)) {
  556|  42.0k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  42.0k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  42.0k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  38.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 38.0k, False: 4.01k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  557|  74.5k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  18.6k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 3.98k, False: 38.0k]
  |  |  ------------------
  |  |   82|  18.6k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  3.98k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  3.98k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  3.98k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 19, False: 3.96k]
  |  |  ------------------
  |  |   83|     19|      *nextTokPtr = ptr;                                                       \
  |  |   84|     19|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     19|    }                                                                          \
  |  |   86|  18.6k|    /* fall through */                                                         \
  |  |   87|  18.6k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 12.3k, False: 29.6k]
  |  |  ------------------
  |  |   88|  17.5k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.24k, False: 40.7k]
  |  |  ------------------
  |  |   89|  18.1k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 541, False: 41.4k]
  |  |  ------------------
  |  |   90|  18.4k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 315, False: 41.7k]
  |  |  ------------------
  |  |   91|  18.6k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 209, False: 41.8k]
  |  |  ------------------
  |  |   92|  18.6k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  18.6k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  18.6k|    break;                                                                     \
  |  |   94|  18.6k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 42.0k]
  |  |  |  |  ------------------
  |  |  |  |   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.0k]
  |  |  |  |  ------------------
  |  |  |  |   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: 41.9k]
  |  |  |  |  ------------------
  |  |  |  |   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;
  |  |  ------------------
  ------------------
  558|  23.3k|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 23.3k, False: 18.6k]
  ------------------
  559|  23.3k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  23.3k|#  define MINBPC(enc) 2
  ------------------
  560|  23.3k|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|  23.3k|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|     11|    default:
  ------------------
  |  Branch (561:5): [True: 11, False: 42.0k]
  ------------------
  562|     11|      *nextTokPtr = ptr;
  563|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  564|  42.0k|    }
  565|  42.0k|  }
  566|     55|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     55|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|  23.4k|}
xmltok.c:little2_scanCharRef:
  514|  5.87k|                    const char **nextTokPtr) {
  515|  5.87k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  5.87k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  5.87k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  5.87k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 5.87k, False: 3]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  5.87k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  787|  5.87k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  5.87k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 5.87k, False: 3]
  |  |  |  |  |  Branch (739:52): [True: 4.53k, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  517|  4.53k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  4.53k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  4.53k|#  define MINBPC(enc) 2
  ------------------
  518|  1.33k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.33k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.33k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.33k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.33k, False: 3]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  519|  1.33k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 1.33k, False: 8]
  ------------------
  520|  1.33k|      break;
  521|      8|    default:
  ------------------
  |  Branch (521:5): [True: 8, False: 1.33k]
  ------------------
  522|      8|      *nextTokPtr = ptr;
  523|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  524|  1.33k|    }
  525|  2.89k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  1.33k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  1.57k|#  define MINBPC(enc) 2
  ------------------
  526|  2.89k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.89k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.89k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.87k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.87k, False: 20]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  527|  1.57k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 1.57k, False: 1.32k]
  ------------------
  528|  1.57k|        break;
  529|  1.30k|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 1.30k, False: 1.59k]
  ------------------
  530|  1.30k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.30k|#  define MINBPC(enc) 2
  ------------------
  531|  1.30k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  1.30k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     21|      default:
  ------------------
  |  Branch (532:7): [True: 21, False: 2.87k]
  ------------------
  533|     21|        *nextTokPtr = ptr;
  534|     21|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  535|  2.89k|      }
  536|  2.89k|    }
  537|  1.33k|  }
  538|     10|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  5.87k|}
xmltok.c:little2_scanHexCharRef:
  483|  4.53k|                       const char **nextTokPtr) {
  484|  4.53k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  4.53k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  4.53k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  4.53k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 4.53k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  4.53k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  4.53k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  4.53k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.53k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.53k, False: 6]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  486|  2.12k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 2.12k, False: 2.41k]
  ------------------
  487|  4.52k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 2.40k, False: 2.13k]
  ------------------
  488|  4.52k|      break;
  489|     10|    default:
  ------------------
  |  Branch (489:5): [True: 10, False: 4.52k]
  ------------------
  490|     10|      *nextTokPtr = ptr;
  491|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  492|  4.53k|    }
  493|  15.4k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  4.52k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  10.9k|#  define MINBPC(enc) 2
  ------------------
  494|  15.4k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  15.4k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  15.4k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  15.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 15.4k, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  495|  5.16k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 5.16k, False: 10.2k]
  ------------------
  496|  10.9k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 5.75k, False: 9.67k]
  ------------------
  497|  10.9k|        break;
  498|  4.48k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 4.48k, False: 10.9k]
  ------------------
  499|  4.48k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  4.48k|#  define MINBPC(enc) 2
  ------------------
  500|  4.48k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  4.48k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|     28|      default:
  ------------------
  |  Branch (501:7): [True: 28, False: 15.4k]
  ------------------
  502|     28|        *nextTokPtr = ptr;
  503|     28|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     28|#define XML_TOK_INVALID 0
  ------------------
  504|  15.4k|      }
  505|  15.4k|    }
  506|  4.52k|  }
  507|     15|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     15|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  4.53k|}
xmltok.c:little2_cdataSectionTok:
  356|  23.6k|                        const char **nextTokPtr) {
  357|  23.6k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 155, False: 23.4k]
  ------------------
  358|    155|    return XML_TOK_NONE;
  ------------------
  |  |   51|    155|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|  23.4k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  23.4k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (359:7): [Folded - Ignored]
  ------------------
  360|  23.4k|    size_t n = end - ptr;
  361|  23.4k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  23.4k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (361:9): [True: 5.92k, False: 17.5k]
  ------------------
  362|  5.92k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  5.92k|#  define MINBPC(enc) 2
  ------------------
  363|  5.92k|      if (n == 0)
  ------------------
  |  Branch (363:11): [True: 11, False: 5.91k]
  ------------------
  364|     11|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  365|  5.91k|      end = ptr + n;
  366|  5.91k|    }
  367|  23.4k|  }
  368|  23.4k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  23.4k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  23.4k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  17.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 17.9k, False: 5.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  369|  5.75k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 5.75k, False: 17.6k]
  ------------------
  370|  5.75k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  5.75k|#  define MINBPC(enc) 2
  ------------------
  371|  5.75k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.75k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.75k|    {                                                                          \
  |  |  |  |  135|  5.75k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.75k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  5.75k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 5.74k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  5.75k|    }
  |  |  ------------------
  ------------------
  372|  5.74k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  787|  5.74k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  5.74k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 4.02k, False: 1.72k]
  |  |  |  |  |  Branch (739:52): [True: 2.30k, False: 1.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  373|  3.44k|      break;
  374|  2.30k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.30k|#  define MINBPC(enc) 2
  ------------------
  375|  2.30k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.30k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.30k|    {                                                                          \
  |  |  |  |  135|  2.30k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.30k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.30k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 2.30k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  2.30k|    }
  |  |  ------------------
  ------------------
  376|  2.30k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  2.30k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.30k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.45k, False: 844]
  |  |  |  |  |  Branch (739:52): [True: 355, False: 1.10k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  377|  1.94k|      ptr -= MINBPC(enc);
  ------------------
  |  |  783|  1.94k|#  define MINBPC(enc) 2
  ------------------
  378|  1.94k|      break;
  379|  1.94k|    }
  380|    355|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    355|#  define MINBPC(enc) 2
  ------------------
  381|    355|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|    355|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  7.45k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 7.45k, False: 15.9k]
  ------------------
  383|  7.45k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  7.45k|#  define MINBPC(enc) 2
  ------------------
  384|  7.45k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  7.45k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  7.45k|    {                                                                          \
  |  |  |  |  135|  7.45k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  7.45k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  7.45k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 17, False: 7.44k]
  |  |  |  |  ------------------
  |  |  |  |  136|     17|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     17|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     17|      }                                                                        \
  |  |  |  |  138|  7.45k|    }
  |  |  ------------------
  ------------------
  385|  7.44k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  7.44k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  7.44k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.86k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.86k, False: 4.57k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 407, False: 7.03k]
  ------------------
  386|    407|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    407|#  define MINBPC(enc) 2
  ------------------
  387|  7.44k|    *nextTokPtr = ptr;
  388|  7.44k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  7.44k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  2.99k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 2.99k, False: 20.4k]
  ------------------
  390|  2.99k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.99k|#  define MINBPC(enc) 2
  ------------------
  391|  2.99k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  2.99k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  4.49k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 23.4k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 23.4k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  2.22k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.16k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.22k, False: 21.2k]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.22k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 61, False: 2.16k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.16k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     61|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.16k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  2.16k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  2.16k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.16k|    break;
  |  |  ------------------
  |  |   63|  2.16k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 50, False: 23.4k]
  |  |  ------------------
  |  |   64|     50|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 23.4k]
  |  |  ------------------
  |  |   65|     60|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 10, False: 23.4k]
  |  |  ------------------
  |  |   66|     60|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     60|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     60|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  4.95k|  default:
  ------------------
  |  Branch (393:3): [True: 4.95k, False: 18.4k]
  ------------------
  394|  4.95k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.95k|#  define MINBPC(enc) 2
  ------------------
  395|  4.95k|    break;
  396|  23.4k|  }
  397|   531k|  while (HAS_CHAR(enc, ptr, end)) {
  398|   531k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   531k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   531k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  35.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 35.6k, False: 495k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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: 531k]
  |  |  ------------------
  |  |  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: 531k]
  |  |  ------------------
  |  |  401|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  402|      0|      *nextTokPtr = ptr;                                                       \
  |  |  403|      0|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      0|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      0|    }                                                                          \
  |  |  405|      0|    ptr += n;                                                                  \
  |  |  406|      0|    break;
  ------------------
  409|  10.1k|      LEAD_CASE(4)
  ------------------
  |  |  400|  10.1k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 10.1k, False: 521k]
  |  |  ------------------
  |  |  401|  10.1k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  10.1k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 54, False: 10.1k]
  |  |  ------------------
  |  |  402|     54|      *nextTokPtr = ptr;                                                       \
  |  |  403|     54|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     54|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|     54|    }                                                                          \
  |  |  405|  10.1k|    ptr += n;                                                                  \
  |  |  406|  10.1k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|     45|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 45, False: 531k]
  ------------------
  412|     45|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 0, False: 531k]
  ------------------
  413|     52|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 7, False: 531k]
  ------------------
  414|  6.37k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 6.32k, False: 525k]
  ------------------
  415|  8.74k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 2.36k, False: 529k]
  ------------------
  416|  12.3k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 3.57k, False: 527k]
  ------------------
  417|  12.3k|      *nextTokPtr = ptr;
  418|  12.3k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  12.3k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|   508k|    default:
  ------------------
  |  Branch (419:5): [True: 508k, False: 22.4k]
  ------------------
  420|   508k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   508k|#  define MINBPC(enc) 2
  ------------------
  421|   508k|      break;
  422|   531k|    }
  423|   531k|  }
  424|    139|  *nextTokPtr = ptr;
  425|    139|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    139|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  12.5k|}
xmltok.c:little2_attributeValueTok:
 1262|  53.3k|                          const char **nextTokPtr) {
 1263|  53.3k|  const char *start;
 1264|  53.3k|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 2.77k, False: 50.5k]
  ------------------
 1265|  2.77k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  2.77k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|  50.5k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  50.5k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  50.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  50.5k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 50.5k]
  ------------------
 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|  50.5k|  start = ptr;
 1275|  1.75M|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  1.75M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.75M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.75M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   117k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 117k, False: 1.63M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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.75M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1282|      0|      LEAD_CASE(3)
  ------------------
  |  | 1278|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 0, False: 1.75M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1283|  35.6k|      LEAD_CASE(4)
  ------------------
  |  | 1278|  35.6k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 35.6k, False: 1.71M]
  |  |  ------------------
  |  | 1279|  35.6k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  35.6k|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|  16.2k|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 16.2k, False: 1.73M]
  ------------------
 1286|  16.2k|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 8.59k, False: 7.64k]
  ------------------
 1287|  8.59k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  8.59k|#  define PREFIX(ident) little2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  8.59k|#  define MINBPC(enc) 2
  ------------------
 1288|  7.64k|      *nextTokPtr = ptr;
 1289|  7.64k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  7.64k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      1|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 1, False: 1.75M]
  ------------------
 1291|       |      /* this is for inside entity references */
 1292|      1|      *nextTokPtr = ptr;
 1293|      1|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1294|  8.76k|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 8.76k, False: 1.74M]
  ------------------
 1295|  8.76k|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 4.83k, False: 3.93k]
  ------------------
 1296|  4.83k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  4.83k|#  define MINBPC(enc) 2
  ------------------
 1297|  4.83k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  4.83k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|  4.83k|      }
 1299|  3.93k|      *nextTokPtr = ptr;
 1300|  3.93k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  3.93k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|  16.6k|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 16.6k, False: 1.73M]
  ------------------
 1302|  16.6k|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 9.05k, False: 7.60k]
  ------------------
 1303|  9.05k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  9.05k|#  define MINBPC(enc) 2
  ------------------
 1304|  9.05k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  9.05k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  9.05k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  9.05k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 241, False: 8.81k]
  ------------------
 1305|    241|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    241|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|  8.81k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  8.81k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  8.81k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.38k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 7.38k, False: 1.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 2.09k, False: 6.72k]
  ------------------
 1307|  2.09k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.09k|#  define MINBPC(enc) 2
  ------------------
 1308|  8.81k|        *nextTokPtr = ptr;
 1309|  8.81k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  8.81k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|  9.05k|      }
 1311|  7.60k|      *nextTokPtr = ptr;
 1312|  7.60k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  7.60k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  7.84k|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 7.84k, False: 1.74M]
  ------------------
 1314|  7.84k|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 4.21k, False: 3.62k]
  ------------------
 1315|  4.21k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  4.21k|#  define MINBPC(enc) 2
  ------------------
 1316|  4.21k|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  4.21k|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  4.21k|      }
 1318|  3.62k|      *nextTokPtr = ptr;
 1319|  3.62k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  3.62k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|  1.66M|    default:
  ------------------
  |  Branch (1320:5): [True: 1.66M, False: 85.1k]
  ------------------
 1321|  1.66M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.66M|#  define MINBPC(enc) 2
  ------------------
 1322|  1.66M|      break;
 1323|  1.75M|    }
 1324|  1.75M|  }
 1325|  1.01k|  *nextTokPtr = ptr;
 1326|  1.01k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.01k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|  50.5k|}
xmltok.c:little2_entityValueTok:
 1331|  24.9k|                       const char **nextTokPtr) {
 1332|  24.9k|  const char *start;
 1333|  24.9k|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 1.87k, False: 23.0k]
  ------------------
 1334|  1.87k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.87k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|  23.0k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  23.0k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  23.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  23.0k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 23.0k]
  ------------------
 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|  23.0k|  start = ptr;
 1344|  8.90M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  8.90M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  8.90M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  8.90M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  60.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 60.8k, False: 8.84M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 8.90M]
  |  |  ------------------
  |  | 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: 8.90M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1352|  32.0k|      LEAD_CASE(4)
  ------------------
  |  | 1347|  32.0k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 32.0k, False: 8.87M]
  |  |  ------------------
  |  | 1348|  32.0k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|  32.0k|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  2.37k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 2.37k, False: 8.90M]
  ------------------
 1355|  2.37k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 1.30k, False: 1.07k]
  ------------------
 1356|  1.30k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.30k|#  define PREFIX(ident) little2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.30k|#  define MINBPC(enc) 2
  ------------------
 1357|  1.07k|      *nextTokPtr = ptr;
 1358|  1.07k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.07k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      9|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 9, False: 8.90M]
  ------------------
 1360|      9|      if (ptr == start) {
  ------------------
  |  Branch (1360:11): [True: 5, False: 4]
  ------------------
 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|      3|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (1362:16): [True: 3, False: 2]
  ------------------
 1363|      5|      }
 1364|      4|      *nextTokPtr = ptr;
 1365|      4|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|      4|#define XML_TOK_DATA_CHARS 6
  ------------------
 1366|  2.87k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 2.87k, False: 8.90M]
  ------------------
 1367|  2.87k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 1.58k, False: 1.28k]
  ------------------
 1368|  1.58k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.58k|#  define MINBPC(enc) 2
  ------------------
 1369|  1.58k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  1.58k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|  1.58k|      }
 1371|  1.28k|      *nextTokPtr = ptr;
 1372|  1.28k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.28k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|  16.8k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 16.8k, False: 8.89M]
  ------------------
 1374|  16.8k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 9.40k, False: 7.40k]
  ------------------
 1375|  9.40k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  9.40k|#  define MINBPC(enc) 2
  ------------------
 1376|  9.40k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  9.40k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  9.40k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  9.40k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 502, False: 8.90k]
  ------------------
 1377|    502|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    502|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|  8.90k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  8.90k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  8.90k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.01k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.01k, False: 4.88k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 1.07k, False: 7.83k]
  ------------------
 1379|  1.07k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.07k|#  define MINBPC(enc) 2
  ------------------
 1380|  8.90k|        *nextTokPtr = ptr;
 1381|  8.90k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  8.90k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|  9.40k|      }
 1383|  7.40k|      *nextTokPtr = ptr;
 1384|  7.40k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  7.40k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  8.85M|    default:
  ------------------
  |  Branch (1385:5): [True: 8.85M, False: 54.0k]
  ------------------
 1386|  8.85M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  8.85M|#  define MINBPC(enc) 2
  ------------------
 1387|  8.85M|      break;
 1388|  8.90M|    }
 1389|  8.90M|  }
 1390|  1.02k|  *nextTokPtr = ptr;
 1391|  1.02k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.02k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|  23.0k|}
xmltok.c:little2_nameMatchesAscii:
 1715|  26.7k|                         const char *end1, const char *ptr2) {
 1716|  26.7k|  UNUSED_P(enc);
  ------------------
  |  |  135|  26.7k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|   113k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  783|  86.8k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1717:10): [True: 98.7k, False: 14.8k]
  ------------------
 1718|  98.7k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  783|  98.7k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1718:9): [True: 38, False: 98.6k]
  ------------------
 1719|       |      /* This line cannot be executed.  The incoming data has already
 1720|       |       * been tokenized once, so incomplete characters like this have
 1721|       |       * already been eliminated from the input.  Retaining the
 1722|       |       * paranoia check is still valuable, however.
 1723|       |       */
 1724|     38|      return 0; /* LCOV_EXCL_LINE */
 1725|     38|    }
 1726|  98.6k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  787|  98.6k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  98.6k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 98.6k, False: 31]
  |  |  |  |  |  Branch (739:52): [True: 86.8k, False: 11.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1727|  11.8k|      return 0;
 1728|  98.6k|  }
 1729|  14.8k|  return ptr1 == end1;
 1730|  26.7k|}
xmltok.c:little2_nameLength:
 1733|  12.0k|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  12.0k|  const char *start = ptr;
 1735|  1.58M|  for (;;) {
 1736|  1.58M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.58M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.58M|  ((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: 1.56M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1737|      0|#  define LEAD_CASE(n)                                                         \
 1738|      0|  case BT_LEAD##n:                                                             \
 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1740|      0|    break;
 1741|      0|      LEAD_CASE(2)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 1.58M]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1742|      0|      LEAD_CASE(3)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 1.58M]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1743|      0|      LEAD_CASE(4)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 1.58M]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1744|      0|#  undef LEAD_CASE
 1745|  1.56M|    case BT_NONASCII:
  ------------------
  |  Branch (1745:5): [True: 1.56M, False: 23.0k]
  ------------------
 1746|  1.56M|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 7.18k, False: 1.57M]
  ------------------
 1747|  1.56M|#  ifdef XML_NS
 1748|  1.56M|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 1.58M]
  ------------------
 1749|  1.56M|#  endif
 1750|  1.57M|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 3.01k, False: 1.58M]
  ------------------
 1751|  1.57M|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 15, False: 1.58M]
  ------------------
 1752|  1.57M|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 497, False: 1.58M]
  ------------------
 1753|  1.57M|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 234, False: 1.58M]
  ------------------
 1754|  1.57M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.57M|#  define MINBPC(enc) 2
  ------------------
 1755|  1.57M|      break;
 1756|  12.0k|    default:
  ------------------
  |  Branch (1756:5): [True: 12.0k, False: 1.57M]
  ------------------
 1757|  12.0k|      return (int)(ptr - start);
 1758|  1.58M|    }
 1759|  1.58M|  }
 1760|  12.0k|}
xmltok.c:little2_getAtts:
 1510|  8.12k|                ATTRIBUTE *atts) {
 1511|  8.12k|  enum { other, inName, inValue } state = inName;
 1512|  8.12k|  int nAtts = 0;
 1513|  8.12k|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  11.8M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  8.12k|#  define MINBPC(enc) 2
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  11.8M|#  define MINBPC(enc) 2
  ------------------
 1517|  11.8M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  11.8M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  11.8M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.07M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 5.07M, False: 6.76M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 11.8M]
  |  |  ------------------
  |  | 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: 11.8M]
  |  |  ------------------
  |  | 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|  83.5k|      LEAD_CASE(4)
  ------------------
  |  | 1527|  83.5k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 83.5k, False: 11.7M]
  |  |  ------------------
  |  | 1528|  83.5k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  83.5k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 83.5k]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  783|  83.5k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|  83.5k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|  6.67M|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 6.67M, False: 5.15M]
  ------------------
 1535|  7.27M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 600k, False: 11.2M]
  ------------------
 1536|  7.43M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 156k, False: 11.6M]
  ------------------
 1537|  7.43M|      START_NAME
  ------------------
  |  | 1519|  7.43M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 579k, False: 6.85M]
  |  |  ------------------
  |  | 1520|   579k|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 293k, False: 286k]
  |  |  ------------------
  |  | 1521|   293k|        atts[nAtts].name = ptr;                                                \
  |  | 1522|   293k|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|   293k|      }                                                                        \
  |  | 1524|   579k|      state = inName;                                                          \
  |  | 1525|   579k|    }
  ------------------
 1538|  7.43M|      break;
 1539|      0|#  undef START_NAME
 1540|  25.3k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 25.3k, False: 11.8M]
  ------------------
 1541|  25.3k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 10.8k, False: 14.4k]
  ------------------
 1542|  10.8k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 6.92k, False: 3.96k]
  ------------------
 1543|  6.92k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  6.92k|#  define MINBPC(enc) 2
  ------------------
 1544|  10.8k|        state = inValue;
 1545|  10.8k|        open = BT_QUOT;
 1546|  14.4k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 10.8k, False: 3.54k]
  ------------------
 1547|  10.8k|        state = other;
 1548|  10.8k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 6.92k, False: 3.96k]
  ------------------
 1549|  6.92k|          atts[nAtts].valueEnd = ptr;
 1550|  10.8k|        nAtts++;
 1551|  10.8k|      }
 1552|  25.3k|      break;
 1553|  1.14M|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 1.14M, False: 10.6M]
  ------------------
 1554|  1.14M|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 568k, False: 571k]
  ------------------
 1555|   568k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 286k, False: 282k]
  ------------------
 1556|   286k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|   286k|#  define MINBPC(enc) 2
  ------------------
 1557|   568k|        state = inValue;
 1558|   568k|        open = BT_APOS;
 1559|   571k|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 568k, False: 2.39k]
  ------------------
 1560|   568k|        state = other;
 1561|   568k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 286k, False: 282k]
  ------------------
 1562|   286k|          atts[nAtts].valueEnd = ptr;
 1563|   568k|        nAtts++;
 1564|   568k|      }
 1565|  1.14M|      break;
 1566|  8.97k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 8.97k, False: 11.8M]
  ------------------
 1567|  8.97k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 8.67k, False: 292]
  ------------------
 1568|  8.67k|        atts[nAtts].normalized = 0;
 1569|  8.97k|      break;
 1570|  1.56M|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 1.56M, False: 10.2M]
  ------------------
 1571|  1.56M|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 2.12k, False: 1.56M]
  ------------------
 1572|  2.12k|        state = other;
 1573|  1.56M|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 995k, False: 571k]
  |  Branch (1573:36): [True: 501k, False: 494k]
  |  Branch (1573:55): [True: 251k, False: 250k]
  ------------------
 1574|  1.56M|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 45.3k, False: 206k]
  ------------------
 1575|   251k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  786|   206k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|   206k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 206k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|   457k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 9.37k, False: 196k]
  ------------------
 1576|   251k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  786|   196k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|   196k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 189k, False: 7.21k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|   448k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 104k, False: 92.4k]
  ------------------
 1577|   251k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  785|  92.4k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  92.4k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  85.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 85.2k, False: 7.21k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 84.7k, False: 7.74k]
  ------------------
 1578|   243k|        atts[nAtts].normalized = 0;
 1579|  1.56M|      break;
 1580|   218k|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 218k, False: 11.6M]
  ------------------
 1581|   232k|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 13.9k, False: 11.8M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|   232k|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 2.54k, False: 229k]
  ------------------
 1585|  2.54k|        state = other;
 1586|   229k|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 222k, False: 7.73k]
  |  Branch (1586:36): [True: 119k, False: 102k]
  ------------------
 1587|   119k|        atts[nAtts].normalized = 0;
 1588|   232k|      break;
 1589|   254k|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 254k, False: 11.5M]
  ------------------
 1590|   312k|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 58.5k, False: 11.7M]
  ------------------
 1591|   312k|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 8.12k, False: 304k]
  ------------------
 1592|  8.12k|        return nAtts;
 1593|   304k|      break;
 1594|  1.02M|    default:
  ------------------
  |  Branch (1594:5): [True: 1.02M, False: 10.8M]
  ------------------
 1595|  1.02M|      break;
 1596|  11.8M|    }
 1597|  11.8M|  }
 1598|       |  /* not reached */
 1599|  8.12k|}
xmltok.c:little2_charRefNumber:
 1602|  4.18k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  4.18k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  4.18k|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.18k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  4.18k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  783|  4.18k|#  define MINBPC(enc) 2
  ------------------
 1607|  4.18k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  787|  4.18k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  4.18k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 4.18k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 3.47k, False: 708]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1608|  15.3k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  783|  3.47k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  787|  15.3k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  15.3k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 15.3k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 3.45k, False: 11.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1609|  11.8k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  11.8k|#  define MINBPC(enc) 2
  ------------------
 1610|  11.8k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  786|  11.8k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  11.8k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 11.8k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1611|  11.8k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 11.8k]
  ------------------
 1612|    456|      case ASCII_0:
  ------------------
  |  |   90|    456|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 456, False: 11.4k]
  ------------------
 1613|  1.07k|      case ASCII_1:
  ------------------
  |  |   91|  1.07k|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 620, False: 11.2k]
  ------------------
 1614|  1.69k|      case ASCII_2:
  ------------------
  |  |   92|  1.69k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 617, False: 11.2k]
  ------------------
 1615|  2.58k|      case ASCII_3:
  ------------------
  |  |   93|  2.58k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 893, False: 10.9k]
  ------------------
 1616|  3.57k|      case ASCII_4:
  ------------------
  |  |   94|  3.57k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 989, False: 10.8k]
  ------------------
 1617|  3.94k|      case ASCII_5:
  ------------------
  |  |   95|  3.94k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 372, False: 11.4k]
  ------------------
 1618|  4.21k|      case ASCII_6:
  ------------------
  |  |   96|  4.21k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 266, False: 11.6k]
  ------------------
 1619|  4.83k|      case ASCII_7:
  ------------------
  |  |   97|  4.83k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 622, False: 11.2k]
  ------------------
 1620|  5.13k|      case ASCII_8:
  ------------------
  |  |   98|  5.13k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 302, False: 11.5k]
  ------------------
 1621|  5.33k|      case ASCII_9:
  ------------------
  |  |   99|  5.33k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 197, False: 11.6k]
  ------------------
 1622|  5.33k|        result <<= 4;
 1623|  5.33k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  5.33k|#define ASCII_0 0x30
  ------------------
 1624|  5.33k|        break;
 1625|    463|      case ASCII_A:
  ------------------
  |  |   36|    463|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 463, False: 11.4k]
  ------------------
 1626|  1.05k|      case ASCII_B:
  ------------------
  |  |   37|  1.05k|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 595, False: 11.2k]
  ------------------
 1627|  1.45k|      case ASCII_C:
  ------------------
  |  |   38|  1.45k|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 392, False: 11.4k]
  ------------------
 1628|  2.04k|      case ASCII_D:
  ------------------
  |  |   39|  2.04k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 594, False: 11.2k]
  ------------------
 1629|  2.55k|      case ASCII_E:
  ------------------
  |  |   40|  2.55k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 509, False: 11.3k]
  ------------------
 1630|  3.59k|      case ASCII_F:
  ------------------
  |  |   41|  3.59k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 1.04k, False: 10.8k]
  ------------------
 1631|  3.59k|        result <<= 4;
 1632|  3.59k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  3.59k|#define ASCII_A 0x41
  ------------------
 1633|  3.59k|        break;
 1634|    343|      case ASCII_a:
  ------------------
  |  |   63|    343|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 343, False: 11.5k]
  ------------------
 1635|    585|      case ASCII_b:
  ------------------
  |  |   64|    585|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 242, False: 11.6k]
  ------------------
 1636|  1.35k|      case ASCII_c:
  ------------------
  |  |   65|  1.35k|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 767, False: 11.1k]
  ------------------
 1637|  1.80k|      case ASCII_d:
  ------------------
  |  |   66|  1.80k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 456, False: 11.4k]
  ------------------
 1638|  2.56k|      case ASCII_e:
  ------------------
  |  |   67|  2.56k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 759, False: 11.1k]
  ------------------
 1639|  2.94k|      case ASCII_f:
  ------------------
  |  |   68|  2.94k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 374, False: 11.4k]
  ------------------
 1640|  2.94k|        result <<= 4;
 1641|  2.94k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  2.94k|#define ASCII_a 0x61
  ------------------
 1642|  2.94k|        break;
 1643|  11.8k|      }
 1644|  11.8k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 24, False: 11.8k]
  ------------------
 1645|     24|        return -1;
 1646|  11.8k|    }
 1647|  3.47k|  } else {
 1648|  2.38k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  787|  2.38k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.38k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 2.38k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 704, False: 1.68k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  1.68k|#  define MINBPC(enc) 2
  ------------------
 1649|  1.68k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  786|  1.68k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  1.68k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 1.68k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1650|  1.68k|      result *= 10;
 1651|  1.68k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  1.68k|#define ASCII_0 0x30
  ------------------
 1652|  1.68k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 4, False: 1.68k]
  ------------------
 1653|      4|        return -1;
 1654|  1.68k|    }
 1655|    708|  }
 1656|  4.15k|  return checkCharRefNumber(result);
 1657|  4.18k|}
xmltok.c:little2_predefinedEntityName:
 1661|  14.5k|                             const char *end) {
 1662|  14.5k|  UNUSED_P(enc);
  ------------------
  |  |  135|  14.5k|#  define UNUSED_P(p) (void)p
  ------------------
 1663|  14.5k|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  783|  14.5k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1663:11): [True: 7.90k, False: 6.67k]
  ------------------
 1664|  1.48k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 1.48k, False: 13.1k]
  ------------------
 1665|  1.48k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  787|  1.48k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.48k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.06k, False: 415]
  |  |  |  |  |  Branch (739:52): [True: 773, False: 295]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1666|    773|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|    773|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|    773|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:34): [True: 216, False: 557]
  |  |  |  |  |  Branch (738:35): [True: 573, False: 200]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1667|    517|      case ASCII_l:
  ------------------
  |  |   74|    517|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 517, False: 256]
  ------------------
 1668|    517|        return ASCII_LT;
  ------------------
  |  |  111|    517|#define ASCII_LT 0x3C
  ------------------
 1669|     40|      case ASCII_g:
  ------------------
  |  |   69|     40|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 40, False: 733]
  ------------------
 1670|     40|        return ASCII_GT;
  ------------------
  |  |  113|     40|#define ASCII_GT 0x3E
  ------------------
 1671|    773|      }
 1672|    773|    }
 1673|    926|    break;
 1674|  1.72k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.72k, False: 12.8k]
  ------------------
 1675|  1.72k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  787|  1.72k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.72k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.45k, False: 271]
  |  |  |  |  |  Branch (739:52): [True: 1.19k, False: 258]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1676|  1.19k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.19k|#  define MINBPC(enc) 2
  ------------------
 1677|  1.19k|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  787|  1.19k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.19k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 976, False: 220]
  |  |  |  |  |  Branch (739:52): [True: 624, False: 352]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1678|    624|        ptr += MINBPC(enc);
  ------------------
  |  |  783|    624|#  define MINBPC(enc) 2
  ------------------
 1679|    624|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  787|    624|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    624|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 424, False: 200]
  |  |  |  |  |  Branch (739:52): [True: 224, False: 200]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1680|    224|          return ASCII_AMP;
  ------------------
  |  |  105|    224|#define ASCII_AMP 0x26
  ------------------
 1681|    624|      }
 1682|  1.19k|    }
 1683|  1.50k|    break;
 1684|  3.47k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 3.47k, False: 11.1k]
  ------------------
 1685|  3.47k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  3.47k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  3.47k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:34): [True: 251, False: 3.22k]
  |  |  |  |  |  Branch (738:35): [True: 3.23k, False: 235]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1686|  1.75k|    case ASCII_q:
  ------------------
  |  |   79|  1.75k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 1.75k, False: 1.71k]
  ------------------
 1687|  1.75k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.75k|#  define MINBPC(enc) 2
  ------------------
 1688|  1.75k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  787|  1.75k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.75k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.55k, False: 194]
  |  |  |  |  |  Branch (739:52): [True: 1.36k, False: 197]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1689|  1.36k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.36k|#  define MINBPC(enc) 2
  ------------------
 1690|  1.36k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  787|  1.36k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.36k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.16k, False: 197]
  |  |  |  |  |  Branch (739:52): [True: 967, False: 197]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1691|    967|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    967|#  define MINBPC(enc) 2
  ------------------
 1692|    967|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  787|    967|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    967|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 765, False: 202]
  |  |  |  |  |  Branch (739:52): [True: 563, False: 202]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1693|    563|            return ASCII_QUOT;
  ------------------
  |  |  104|    563|#define ASCII_QUOT 0x22
  ------------------
 1694|    967|        }
 1695|  1.36k|      }
 1696|  1.18k|      break;
 1697|  1.46k|    case ASCII_a:
  ------------------
  |  |   63|  1.46k|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 1.46k, False: 2.00k]
  ------------------
 1698|  1.46k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.46k|#  define MINBPC(enc) 2
  ------------------
 1699|  1.46k|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  787|  1.46k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.46k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.24k, False: 220]
  |  |  |  |  |  Branch (739:52): [True: 1.03k, False: 213]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1700|  1.03k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.03k|#  define MINBPC(enc) 2
  ------------------
 1701|  1.03k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  787|  1.03k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.03k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 791, False: 244]
  |  |  |  |  |  Branch (739:52): [True: 589, False: 202]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1702|    589|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    589|#  define MINBPC(enc) 2
  ------------------
 1703|    589|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  787|    589|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    589|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 395, False: 194]
  |  |  |  |  |  Branch (739:52): [True: 194, False: 201]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1704|    194|            return ASCII_APOS;
  ------------------
  |  |  106|    194|#define ASCII_APOS 0x27
  ------------------
 1705|    589|        }
 1706|  1.03k|      }
 1707|  1.27k|      break;
 1708|  3.47k|    }
 1709|  14.5k|  }
 1710|  13.0k|  return 0;
 1711|  14.5k|}
xmltok.c:little2_updatePosition:
 1779|  3.55k|                       POSITION *pos) {
 1780|  5.69M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  5.69M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  5.69M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.69M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   291k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 291k, False: 5.40M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1782|      0|#  define LEAD_CASE(n)                                                         \
 1783|      0|  case BT_LEAD##n:                                                             \
 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1785|      0|    pos->columnNumber++;                                                       \
 1786|      0|    break;
 1787|      0|      LEAD_CASE(2)
  ------------------
  |  | 1783|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 0, False: 5.69M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1788|      0|      LEAD_CASE(3)
  ------------------
  |  | 1783|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 0, False: 5.69M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1789|  37.7k|      LEAD_CASE(4)
  ------------------
  |  | 1783|  37.7k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 37.7k, False: 5.65M]
  |  |  ------------------
  |  | 1784|  37.7k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  37.7k|    pos->columnNumber++;                                                       \
  |  | 1786|  37.7k|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|  12.1k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 12.1k, False: 5.68M]
  ------------------
 1792|  12.1k|      pos->columnNumber = 0;
 1793|  12.1k|      pos->lineNumber++;
 1794|  12.1k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  12.1k|#  define MINBPC(enc) 2
  ------------------
 1795|  12.1k|      break;
 1796|  22.1k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 22.1k, False: 5.67M]
  ------------------
 1797|  22.1k|      pos->lineNumber++;
 1798|  22.1k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  22.1k|#  define MINBPC(enc) 2
  ------------------
 1799|  22.1k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|  22.1k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  44.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  22.1k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 22.1k, False: 36]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  22.1k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  22.1k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  13.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 13.3k, False: 8.77k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 2.23k, False: 19.8k]
  ------------------
 1800|  2.23k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.23k|#  define MINBPC(enc) 2
  ------------------
 1801|  22.1k|      pos->columnNumber = 0;
 1802|  22.1k|      break;
 1803|  5.62M|    default:
  ------------------
  |  Branch (1803:5): [True: 5.62M, False: 72.0k]
  ------------------
 1804|  5.62M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  5.62M|#  define MINBPC(enc) 2
  ------------------
 1805|  5.62M|      pos->columnNumber++;
 1806|  5.62M|      break;
 1807|  5.69M|    }
 1808|  5.69M|  }
 1809|  3.55k|}
xmltok.c:little2_isPublicId:
 1450|  1.58k|                   const char **badPtr) {
 1451|  1.58k|  ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.58k|#  define MINBPC(enc) 2
  ------------------
 1452|  1.58k|  end -= MINBPC(enc);
  ------------------
  |  |  783|  1.58k|#  define MINBPC(enc) 2
  ------------------
 1453|  13.2k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  13.1k|#  define MINBPC(enc) 2
  ------------------
 1454|  13.2k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  13.2k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  13.2k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  13.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 13.1k, False: 27]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1455|    234|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 234, False: 12.9k]
  ------------------
 1456|  2.06k|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 1.83k, False: 11.3k]
  ------------------
 1457|  2.27k|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 202, False: 12.9k]
  ------------------
 1458|  3.29k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 1.02k, False: 12.1k]
  ------------------
 1459|  3.85k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 566, False: 12.6k]
  ------------------
 1460|  4.05k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 199, False: 13.0k]
  ------------------
 1461|  4.54k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 488, False: 12.7k]
  ------------------
 1462|  4.99k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 452, False: 12.7k]
  ------------------
 1463|  5.41k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 416, False: 12.7k]
  ------------------
 1464|  5.61k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 199, False: 13.0k]
  ------------------
 1465|  5.96k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 351, False: 12.8k]
  ------------------
 1466|  6.68k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 717, False: 12.4k]
  ------------------
 1467|  7.11k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 433, False: 12.7k]
  ------------------
 1468|  7.31k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 197, False: 13.0k]
  ------------------
 1469|  7.52k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 214, False: 12.9k]
  ------------------
 1470|  7.72k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 199, False: 13.0k]
  ------------------
 1471|  7.97k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 252, False: 12.9k]
  ------------------
 1472|  8.31k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 337, False: 12.8k]
  ------------------
 1473|  8.31k|#  ifdef XML_NS
 1474|  8.31k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 13.2k]
  ------------------
 1475|  8.31k|#  endif
 1476|  8.31k|      break;
 1477|  1.26k|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 1.26k, False: 11.9k]
  ------------------
 1478|  1.26k|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  787|  1.26k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.26k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.26k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 1.26k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1479|      1|        *badPtr = ptr;
 1480|      1|        return 0;
 1481|      1|      }
 1482|  1.26k|      break;
 1483|  1.26k|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 230, False: 12.9k]
  ------------------
 1484|  2.70k|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 2.47k, False: 10.7k]
  ------------------
 1485|  2.70k|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  786|  2.70k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  2.70k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 2.70k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1485:11): [True: 2.69k, False: 7]
  ------------------
 1486|  2.69k|        break;
 1487|       |      /* fall through */
 1488|    922|    default:
  ------------------
  |  Branch (1488:5): [True: 915, False: 12.2k]
  ------------------
 1489|    922|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|    922|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|    922|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 895, False: 27]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1490|    263|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 263, False: 659]
  ------------------
 1491|    887|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 624, False: 298]
  ------------------
 1492|    887|        break;
 1493|     35|      default:
  ------------------
  |  Branch (1493:7): [True: 35, False: 887]
  ------------------
 1494|     35|        *badPtr = ptr;
 1495|     35|        return 0;
 1496|    922|      }
 1497|    887|      break;
 1498|  13.2k|    }
 1499|  13.2k|  }
 1500|  1.54k|  return 1;
 1501|  1.58k|}
xmltok.c:big2_prologTok:
 1018|  93.7k|                  const char **nextTokPtr) {
 1019|  93.7k|  int tok;
 1020|  93.7k|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 302, False: 93.4k]
  ------------------
 1021|    302|    return XML_TOK_NONE;
  ------------------
  |  |   51|    302|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  93.4k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  93.4k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|  93.4k|    size_t n = end - ptr;
 1024|  93.4k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  93.4k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1024:9): [True: 30.7k, False: 62.6k]
  ------------------
 1025|  30.7k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  30.7k|#  define MINBPC(enc) 2
  ------------------
 1026|  30.7k|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 25, False: 30.7k]
  ------------------
 1027|     25|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     25|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|  30.7k|      end = ptr + n;
 1029|  30.7k|    }
 1030|  93.4k|  }
 1031|  93.4k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  93.4k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  93.4k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  91.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 91.3k, False: 2.11k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1032|  1.25k|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 1.25k, False: 92.1k]
  ------------------
 1033|  1.25k|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  1.25k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  1.25k|#  define MINBPC(enc) 2
  ------------------
 1034|  4.88k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 4.88k, False: 88.5k]
  ------------------
 1035|  4.88k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  4.88k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  4.88k|#  define MINBPC(enc) 2
  ------------------
 1036|  14.8k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 14.8k, False: 78.5k]
  ------------------
 1037|  14.8k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  14.8k|#  define MINBPC(enc) 2
  ------------------
 1038|  14.8k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  14.8k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  14.8k|    {                                                                          \
  |  |  |  |  135|  14.8k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  14.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  14.8k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 14.8k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  14.8k|    }
  |  |  ------------------
  ------------------
 1039|  14.8k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  14.8k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  14.8k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  13.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 12, False: 14.8k]
  |  |  |  |  |  Branch (870:4): [True: 13.4k, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  8.40k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 8.40k, False: 6.46k]
  ------------------
 1041|  8.40k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  8.40k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  8.40k|#  define MINBPC(enc) 2
  ------------------
 1042|  2.32k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 2.32k, False: 12.5k]
  ------------------
 1043|  2.32k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  2.32k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  2.32k|#  define MINBPC(enc) 2
  ------------------
 1044|  1.41k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 1.41k, False: 13.4k]
  ------------------
 1045|  2.67k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 1.26k, False: 13.6k]
  ------------------
 1046|  4.11k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 1.44k, False: 13.4k]
  ------------------
 1047|  4.11k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 0, False: 14.8k]
  ------------------
 1048|  4.11k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 0, False: 14.8k]
  ------------------
 1049|  4.13k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 22, False: 14.8k]
  ------------------
 1050|  4.13k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  916|  4.13k|#  define MINBPC(enc) 2
  ------------------
 1051|  4.13k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  4.13k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  14.8k|    }
 1053|     12|    *nextTokPtr = ptr;
 1054|     12|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
 1055|  14.8k|  }
 1056|  3.35k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 3.35k, False: 90.0k]
  ------------------
 1057|  3.35k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  916|  3.35k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1057:9): [True: 44, False: 3.31k]
  ------------------
 1058|     44|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|     44|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|     44|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|     44|    }
 1062|       |    /* fall through */
 1063|  20.0k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 16.7k, False: 76.7k]
  ------------------
 1064|  26.5k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 6.55k, False: 86.8k]
  ------------------
 1065|  29.4k|    for (;;) {
 1066|  29.4k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  29.4k|#  define MINBPC(enc) 2
  ------------------
 1067|  29.4k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  29.4k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  29.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  29.4k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 177, False: 29.3k]
  ------------------
 1068|    177|        break;
 1069|  29.3k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  29.3k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  29.3k|  ((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: 1.26k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1070|  1.92k|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 1.92k, False: 27.3k]
  ------------------
 1071|  2.55k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 629, False: 28.6k]
  ------------------
 1072|  2.55k|        break;
 1073|    378|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 378, False: 28.9k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|    378|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  916|    378|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1075:13): [True: 375, False: 3]
  ------------------
 1076|    375|          break;
 1077|       |        /* fall through */
 1078|  26.3k|      default:
  ------------------
  |  Branch (1078:7): [True: 26.3k, False: 2.93k]
  ------------------
 1079|  26.3k|        *nextTokPtr = ptr;
 1080|  26.3k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|  26.3k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|  29.3k|      }
 1082|  29.3k|    }
 1083|    177|    *nextTokPtr = ptr;
 1084|    177|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    177|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  2.04k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 2.04k, False: 91.3k]
  ------------------
 1086|  2.04k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  2.04k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  2.04k|#  define MINBPC(enc) 2
  ------------------
 1087|  2.15k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 2.15k, False: 91.2k]
  ------------------
 1088|  2.15k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.15k|#  define MINBPC(enc) 2
  ------------------
 1089|  2.15k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  2.15k|#define XML_TOK_COMMA 38
  ------------------
 1090|  1.48k|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 1.48k, False: 91.9k]
  ------------------
 1091|  1.48k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.48k|#  define MINBPC(enc) 2
  ------------------
 1092|  1.48k|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|  1.48k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|    928|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 928, False: 92.4k]
  ------------------
 1094|    928|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    928|#  define MINBPC(enc) 2
  ------------------
 1095|    928|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    928|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    928|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    928|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 1, False: 927]
  ------------------
 1096|      1|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      1|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|    927|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  920|    927|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    927|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 926, False: 1]
  |  |  |  |  |  Branch (872:49): [True: 42, False: 884]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1098|     42|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     42|    {                                                                          \
  |  |  135|     42|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     42|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|     42|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 41]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     42|    }
  ------------------
 1099|     41|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  920|     41|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|     41|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 23, False: 18]
  |  |  |  |  |  Branch (872:49): [True: 3, False: 20]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1100|      3|        *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  916|      3|#  define MINBPC(enc) 2
  ------------------
 1101|      3|        return XML_TOK_COND_SECT_CLOSE;
  ------------------
  |  |  103|      3|#define XML_TOK_COND_SECT_CLOSE 34      /* ]]> */
  ------------------
 1102|      3|      }
 1103|     41|    }
 1104|    923|    *nextTokPtr = ptr;
 1105|    923|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|    923|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  5.39k|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 5.39k, False: 88.0k]
  ------------------
 1107|  5.39k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  5.39k|#  define MINBPC(enc) 2
  ------------------
 1108|  5.39k|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  5.39k|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|  4.02k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 4.02k, False: 89.3k]
  ------------------
 1110|  4.02k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.02k|#  define MINBPC(enc) 2
  ------------------
 1111|  4.02k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  4.02k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  4.02k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  4.02k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 7, False: 4.01k]
  ------------------
 1112|      7|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|      7|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|  4.01k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  4.01k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.01k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.98k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 25, False: 3.98k]
  |  |  |  |  |  Branch (870:4): [True: 3.98k, False: 25]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|    417|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 417, False: 3.59k]
  ------------------
 1115|    417|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    417|#  define MINBPC(enc) 2
  ------------------
 1116|    417|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|    417|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|    383|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 383, False: 3.63k]
  ------------------
 1118|    383|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    383|#  define MINBPC(enc) 2
  ------------------
 1119|    383|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|    383|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|    289|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 289, False: 3.72k]
  ------------------
 1121|    289|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    289|#  define MINBPC(enc) 2
  ------------------
 1122|    289|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|    289|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|    194|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 194, False: 3.81k]
  ------------------
 1124|    406|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 212, False: 3.80k]
  ------------------
 1125|    647|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 241, False: 3.77k]
  ------------------
 1126|  1.10k|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 453, False: 3.56k]
  ------------------
 1127|  1.49k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 394, False: 3.61k]
  ------------------
 1128|  1.84k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 353, False: 3.66k]
  ------------------
 1129|  2.89k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 1.05k, False: 2.96k]
  ------------------
 1130|  2.89k|      *nextTokPtr = ptr;
 1131|  2.89k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  2.89k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|  4.01k|    }
 1133|     25|    *nextTokPtr = ptr;
 1134|     25|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     25|#define XML_TOK_INVALID 0
  ------------------
 1135|  2.05k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 2.05k, False: 91.3k]
  ------------------
 1136|  2.05k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.05k|#  define MINBPC(enc) 2
  ------------------
 1137|  2.05k|    return XML_TOK_OR;
  ------------------
  |  |   88|  2.05k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  6.55k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 6.55k, False: 86.8k]
  ------------------
 1139|  6.55k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  6.55k|#  define MINBPC(enc) 2
  ------------------
 1140|  6.55k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  6.55k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  1.75k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 1.75k, False: 91.6k]
  ------------------
 1142|  1.75k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  1.75k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  1.75k|#  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: 93.4k]
  |  |  ------------------
  |  | 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: 93.4k]
  |  |  ------------------
  |  | 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|     13|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 25, False: 93.3k]
  |  |  ------------------
  |  | 1145|     25|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 12, False: 13]
  |  |  ------------------
  |  | 1146|     13|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|     12|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     13|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|     13|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      0|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      0|    }                                                                          \
  |  | 1151|     13|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  923|     13|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (923:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|     13|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  921|     13|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (921:35): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|     13|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     13|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|  9.86k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 9.86k, False: 83.5k]
  ------------------
 1168|  16.4k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 6.58k, False: 86.8k]
  ------------------
 1169|  16.4k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|  16.4k|#define XML_TOK_NAME 18
  ------------------
 1170|  16.4k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  16.4k|#  define MINBPC(enc) 2
  ------------------
 1171|  16.4k|    break;
 1172|    265|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 265, False: 93.1k]
  ------------------
 1173|    491|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 226, False: 93.1k]
  ------------------
 1174|    818|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 327, False: 93.0k]
  ------------------
 1175|    818|#  ifdef XML_NS
 1176|    818|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 93.4k]
  ------------------
 1177|    818|#  endif
 1178|    818|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    818|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|    818|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    818|#  define MINBPC(enc) 2
  ------------------
 1180|    818|    break;
 1181|  2.07k|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 2.07k, False: 91.3k]
  ------------------
 1182|  2.07k|    if (IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  924|  2.07k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  876|  2.07k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  2.07k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 1.76k, False: 313]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1183|  1.76k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.76k|#  define MINBPC(enc) 2
  ------------------
 1184|  1.76k|      tok = XML_TOK_NAME;
  ------------------
  |  |   85|  1.76k|#define XML_TOK_NAME 18
  ------------------
 1185|  1.76k|      break;
 1186|  1.76k|    }
 1187|    313|    if (IS_NAME_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  922|    313|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  874|    313|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|    313|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 199, False: 114]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1188|    199|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    199|#  define MINBPC(enc) 2
  ------------------
 1189|    199|      tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    199|#define XML_TOK_NMTOKEN 19
  ------------------
 1190|    199|      break;
 1191|    199|    }
 1192|       |    /* fall through */
 1193|    145|  default:
  ------------------
  |  Branch (1193:3): [True: 31, False: 93.3k]
  ------------------
 1194|    145|    *nextTokPtr = ptr;
 1195|    145|    return XML_TOK_INVALID;
  ------------------
  |  |   57|    145|#define XML_TOK_INVALID 0
  ------------------
 1196|  93.4k|  }
 1197|   104k|  while (HAS_CHAR(enc, ptr, end)) {
 1198|   104k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   104k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   104k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  44.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 44.8k, False: 59.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1199|   389k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  85.7k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 59.9k, False: 44.8k]
  |  |  ------------------
  |  |   82|  85.7k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  59.9k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  59.9k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  59.9k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 39, False: 59.8k]
  |  |  ------------------
  |  |   83|     39|      *nextTokPtr = ptr;                                                       \
  |  |   84|     39|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     39|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     39|    }                                                                          \
  |  |   86|  85.7k|    /* fall through */                                                         \
  |  |   87|  85.7k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 14.5k, False: 90.2k]
  |  |  ------------------
  |  |   88|  84.7k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 10.3k, False: 94.4k]
  |  |  ------------------
  |  |   89|  85.0k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 279, False: 104k]
  |  |  ------------------
  |  |   90|  85.3k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 276, False: 104k]
  |  |  ------------------
  |  |   91|  85.7k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 395, False: 104k]
  |  |  ------------------
  |  |   92|  85.7k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  85.7k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  85.7k|    break;                                                                     \
  |  |   94|  85.7k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 104k]
  |  |  |  |  ------------------
  |  |  |  |   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: 104k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     22|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 22, False: 104k]
  |  |  |  |  ------------------
  |  |  |  |   71|     22|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 17]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     17|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     34|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     17|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     17|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     17|    }                                                                          \
  |  |  |  |   77|     17|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
 1200|  1.02k|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 1.02k, False: 103k]
  ------------------
 1201|  2.74k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 1.71k, False: 103k]
  ------------------
 1202|  3.29k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 550, False: 104k]
  ------------------
 1203|  4.21k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 926, False: 103k]
  ------------------
 1204|  5.40k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 1.18k, False: 103k]
  ------------------
 1205|  5.40k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 3, False: 104k]
  ------------------
 1206|  13.8k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 8.48k, False: 96.3k]
  ------------------
 1207|  14.8k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 953, False: 103k]
  ------------------
 1208|  18.2k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 3.39k, False: 101k]
  ------------------
 1209|  18.2k|      *nextTokPtr = ptr;
 1210|  18.2k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 104k]
  ------------------
 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|    281|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 281, False: 104k]
  ------------------
 1232|    281|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    281|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 1, False: 280]
  ------------------
 1233|      1|        *nextTokPtr = ptr;
 1234|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1235|      1|      }
 1236|    280|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    280|#  define MINBPC(enc) 2
  ------------------
 1237|    280|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|    280|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    217|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 217, False: 104k]
  ------------------
 1239|    217|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    217|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 216]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|    216|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    216|#  define MINBPC(enc) 2
  ------------------
 1244|    216|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    216|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|    276|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 276, False: 104k]
  ------------------
 1246|    276|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    276|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 1, False: 275]
  ------------------
 1247|      1|        *nextTokPtr = ptr;
 1248|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1249|      1|      }
 1250|    275|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    275|#  define MINBPC(enc) 2
  ------------------
 1251|    275|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|    275|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     11|    default:
  ------------------
  |  Branch (1252:5): [True: 11, False: 104k]
  ------------------
 1253|     11|      *nextTokPtr = ptr;
 1254|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
 1255|   104k|    }
 1256|   104k|  }
 1257|    142|  return -tok;
 1258|  19.2k|}
xmltok.c:big2_scanLit:
  984|  6.13k|                const char **nextTokPtr) {
  985|  37.6M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  37.6M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  37.6M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  37.6M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   266k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 266k, False: 37.3M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  987|  37.6M|    switch (t) {
  988|   233k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 37.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: 37.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|   116k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|   116k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 116k, False: 37.5M]
  |  |  |  |  ------------------
  |  |  |  |   50|   116k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 31, False: 116k]
  |  |  |  |  ------------------
  |  |  |  |   51|   116k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     31|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|   116k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   116k|#    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|   116k|    ptr += n;                                                                  \
  |  |  |  |   57|   116k|    break;
  |  |  ------------------
  |  |   63|   116k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 7, False: 37.6M]
  |  |  ------------------
  |  |   64|      7|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 37.6M]
  |  |  ------------------
  |  |   65|     12|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 5, False: 37.6M]
  |  |  ------------------
  |  |   66|     12|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     12|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  10.3k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 10.3k, False: 37.6M]
  ------------------
  990|  16.4k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 6.16k, False: 37.6M]
  ------------------
  991|  16.4k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  16.4k|#  define MINBPC(enc) 2
  ------------------
  992|  16.4k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 10.4k, False: 6.02k]
  ------------------
  993|  10.4k|        break;
  994|  6.02k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  6.02k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  6.02k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  6.02k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 6, False: 6.01k]
  ------------------
  995|      6|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      6|#define XML_TOK_LITERAL 27
  ------------------
  996|  6.01k|      *nextTokPtr = ptr;
  997|  6.01k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  6.01k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  6.01k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.99k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 5.99k, False: 25]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  998|  1.34k|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 1.34k, False: 4.67k]
  ------------------
  999|  1.80k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 459, False: 5.55k]
  ------------------
 1000|  3.04k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 1.24k, False: 4.77k]
  ------------------
 1001|  5.92k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 2.88k, False: 3.13k]
  ------------------
 1002|  5.95k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 25, False: 5.99k]
  ------------------
 1003|  5.98k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 36, False: 5.98k]
  ------------------
 1004|  5.98k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  5.98k|#define XML_TOK_LITERAL 27
  ------------------
 1005|     28|      default:
  ------------------
  |  Branch (1005:7): [True: 28, False: 5.98k]
  ------------------
 1006|     28|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     28|#define XML_TOK_INVALID 0
  ------------------
 1007|  6.01k|      }
 1008|  37.4M|    default:
  ------------------
  |  Branch (1008:5): [True: 37.4M, False: 133k]
  ------------------
 1009|  37.4M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  37.4M|#  define MINBPC(enc) 2
  ------------------
 1010|  37.4M|      break;
 1011|  37.6M|    }
 1012|  37.6M|  }
 1013|     74|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     74|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  6.13k|}
xmltok.c:big2_scanDecl:
  183|  8.40k|                 const char **nextTokPtr) {
  184|  8.40k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  8.40k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  8.40k|    {                                                                          \
  |  |  |  |  135|  8.40k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  8.40k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  8.40k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 6, False: 8.39k]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|  8.40k|    }
  |  |  ------------------
  ------------------
  185|  8.39k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  8.39k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  8.39k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  8.37k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 8.37k, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|    463|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 463, False: 7.93k]
  ------------------
  187|    463|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    463|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    463|#  define MINBPC(enc) 2
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 8.39k]
  ------------------
  189|      1|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|      1|#  define MINBPC(enc) 2
  ------------------
  190|      1|    return XML_TOK_COND_SECT_OPEN;
  ------------------
  |  |  102|      1|#define XML_TOK_COND_SECT_OPEN 33       /* <![ */
  ------------------
  191|  1.29k|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 1.29k, False: 7.10k]
  ------------------
  192|  7.90k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 6.61k, False: 1.78k]
  ------------------
  193|  7.90k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  7.90k|#  define MINBPC(enc) 2
  ------------------
  194|  7.90k|    break;
  195|     24|  default:
  ------------------
  |  Branch (195:3): [True: 24, False: 8.37k]
  ------------------
  196|     24|    *nextTokPtr = ptr;
  197|     24|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     24|#define XML_TOK_INVALID 0
  ------------------
  198|  8.39k|  }
  199|  53.7k|  while (HAS_CHAR(enc, ptr, end)) {
  200|  53.7k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  53.7k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  53.7k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  53.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 53.7k, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|     36|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 36, False: 53.7k]
  ------------------
  202|     36|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     36|    {                                                                          \
  |  |  135|     36|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     36|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|     36|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 35]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     36|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|     35|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  918|     35|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|     35|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|      7|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 31, False: 4]
  |  |  |  |  |  Branch (870:4): [True: 7, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      1|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 1, False: 34]
  ------------------
  206|      2|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 34]
  ------------------
  207|      3|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 1, False: 34]
  ------------------
  208|      4|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 1, False: 34]
  ------------------
  209|      4|        *nextTokPtr = ptr;
  210|      4|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  211|     35|      }
  212|       |      /* fall through */
  213|  5.33k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 5.30k, False: 48.4k]
  ------------------
  214|  6.54k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 1.20k, False: 52.5k]
  ------------------
  215|  7.84k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 1.29k, False: 52.4k]
  ------------------
  216|  7.84k|      *nextTokPtr = ptr;
  217|  7.84k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  7.84k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|  39.3k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 39.3k, False: 14.4k]
  ------------------
  219|  45.9k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 6.55k, False: 47.2k]
  ------------------
  220|  45.9k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  45.9k|#  define MINBPC(enc) 2
  ------------------
  221|  45.9k|      break;
  222|     32|    default:
  ------------------
  |  Branch (222:5): [True: 32, False: 53.7k]
  ------------------
  223|     32|      *nextTokPtr = ptr;
  224|     32|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     32|#define XML_TOK_INVALID 0
  ------------------
  225|  53.7k|    }
  226|  53.7k|  }
  227|     29|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     29|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  7.90k|}
xmltok.c:big2_scanComment:
  146|    786|                    const char **nextTokPtr) {
  147|    786|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|    786|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    786|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    786|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 773, False: 13]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|    773|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  920|    773|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    773|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 764, False: 9]
  |  |  |  |  |  Branch (872:49): [True: 762, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  149|     11|      *nextTokPtr = ptr;
  150|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  151|     11|    }
  152|    762|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    762|#  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|  4.98k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 4.98k, False: 56.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|  6.05k|        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|  3.01k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.98k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.01k, False: 58.7k]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.01k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 34, False: 2.98k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.98k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     34|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.98k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  2.98k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  2.98k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.98k|    break;
  |  |  ------------------
  |  |   63|  2.98k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 29, False: 61.7k]
  |  |  ------------------
  |  |   64|     29|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 61.7k]
  |  |  ------------------
  |  |   65|     35|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 6, False: 61.7k]
  |  |  ------------------
  |  |   66|     35|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     35|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     35|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  1.05k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 1.05k, False: 60.6k]
  ------------------
  157|  1.05k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  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)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  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)) {
  ------------------
  |  |  920|  1.05k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.05k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 848, False: 205]
  |  |  |  |  |  Branch (872:49): [True: 624, False: 224]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|    624|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    624|#  define MINBPC(enc) 2
  ------------------
  161|    624|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    624|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    624|    {                                                                          \
  |  |  |  |  135|    624|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    624|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    624|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 623]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    624|    }
  |  |  ------------------
  ------------------
  162|    623|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    623|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    623|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 616, False: 7]
  |  |  |  |  |  Branch (872:49): [True: 602, False: 14]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|     21|            *nextTokPtr = ptr;
  164|     21|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  165|     21|          }
  166|    602|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    602|#  define MINBPC(enc) 2
  ------------------
  167|    602|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|    602|#define XML_TOK_COMMENT 13
  ------------------
  168|    623|        }
  169|    429|        break;
  170|  57.6k|      default:
  ------------------
  |  Branch (170:7): [True: 57.6k, False: 4.10k]
  ------------------
  171|  57.6k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  57.6k|#  define MINBPC(enc) 2
  ------------------
  172|  57.6k|        break;
  173|  61.7k|      }
  174|  61.7k|    }
  175|    762|  }
  176|     81|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     81|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|    786|}
xmltok.c:big2_scanPi:
  277|  6.57k|               const char **nextTokPtr) {
  278|  6.57k|  int tok;
  279|  6.57k|  const char *target = ptr;
  280|  6.57k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.57k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.57k|    {                                                                          \
  |  |  |  |  135|  6.57k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.57k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  6.57k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 9, False: 6.56k]
  |  |  |  |  ------------------
  |  |  |  |  136|      9|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      9|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      9|      }                                                                        \
  |  |  |  |  138|  6.57k|    }
  |  |  ------------------
  ------------------
  281|  6.56k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  6.56k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  6.56k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.11k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 5.11k, False: 1.44k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  282|  6.34k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  6.53k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.42k, False: 5.13k]
  |  |  ------------------
  |  |  111|  6.53k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  1.42k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  1.42k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.42k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 1, False: 1.42k]
  |  |  ------------------
  |  |  112|      1|      *nextTokPtr = ptr;                                                       \
  |  |  113|      1|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      1|    }                                                                          \
  |  |  115|  6.53k|    /* fall through */                                                         \
  |  |  116|  6.53k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.46k, False: 3.10k]
  |  |  ------------------
  |  |  117|  6.53k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 1.64k, False: 4.91k]
  |  |  ------------------
  |  |  118|  6.53k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  6.53k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  6.53k|    break;                                                                     \
  |  |  120|  6.53k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 6.56k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 6.56k]
  |  |  |  |  ------------------
  |  |  |  |  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: 6.54k]
  |  |  |  |  ------------------
  |  |  |  |  100|     18|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 14]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     14|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     28|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     14|    }                                                                          \
  |  |  |  |  106|     14|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  283|      8|  default:
  ------------------
  |  Branch (283:3): [True: 8, False: 6.55k]
  ------------------
  284|      8|    *nextTokPtr = ptr;
  285|      8|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  286|  6.56k|  }
  287|   504k|  while (HAS_CHAR(enc, ptr, end)) {
  288|   504k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   504k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   504k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  16.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 16.6k, False: 487k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  289|  2.47M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   498k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 487k, False: 16.6k]
  |  |  ------------------
  |  |   82|   498k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|   487k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|   487k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|   487k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 19, False: 487k]
  |  |  ------------------
  |  |   83|     19|      *nextTokPtr = ptr;                                                       \
  |  |   84|     19|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     19|    }                                                                          \
  |  |   86|   498k|    /* fall through */                                                         \
  |  |   87|   498k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 5.93k, False: 498k]
  |  |  ------------------
  |  |   88|   495k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 2.24k, False: 502k]
  |  |  ------------------
  |  |   89|   497k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 1.18k, False: 503k]
  |  |  ------------------
  |  |   90|   497k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 235, False: 504k]
  |  |  ------------------
  |  |   91|   498k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 597, False: 503k]
  |  |  ------------------
  |  |   92|   498k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   498k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|   498k|    break;                                                                     \
  |  |   94|   498k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 504k]
  |  |  |  |  ------------------
  |  |  |  |   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: 504k]
  |  |  |  |  ------------------
  |  |  |  |   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: 504k]
  |  |  |  |  ------------------
  |  |  |  |   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;
  |  |  ------------------
  ------------------
  290|  2.97k|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 2.97k, False: 501k]
  ------------------
  291|  3.55k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 581, False: 503k]
  ------------------
  292|  4.04k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 489, False: 503k]
  ------------------
  293|  4.04k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  915|  4.04k|#  define PREFIX(ident) big2_##ident
  ------------------
  |  Branch (293:11): [True: 1, False: 4.04k]
  ------------------
  294|      1|        *nextTokPtr = ptr;
  295|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  296|      1|      }
  297|  4.04k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.04k|#  define MINBPC(enc) 2
  ------------------
  298|   159k|      while (HAS_CHAR(enc, ptr, end)) {
  299|   159k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   159k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   159k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  29.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 29.7k, False: 130k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  300|  16.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: 159k]
  |  |  |  |  ------------------
  |  |  |  |   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: 159k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  8.27k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  8.24k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 8.27k, False: 151k]
  |  |  |  |  ------------------
  |  |  |  |   50|  8.27k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 30, False: 8.24k]
  |  |  |  |  ------------------
  |  |  |  |   51|  8.24k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     30|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  8.24k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  8.24k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  8.24k|    ptr += n;                                                                  \
  |  |  |  |   57|  8.24k|    break;
  |  |  ------------------
  |  |   63|  8.24k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 31, False: 159k]
  |  |  ------------------
  |  |   64|     31|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 159k]
  |  |  ------------------
  |  |   65|     35|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 159k]
  |  |  ------------------
  |  |   66|     35|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     35|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     35|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  6.55k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 6.55k, False: 153k]
  ------------------
  302|  6.55k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  6.55k|#  define MINBPC(enc) 2
  ------------------
  303|  6.55k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.55k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.55k|    {                                                                          \
  |  |  |  |  135|  6.55k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.55k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  6.55k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 6.54k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  6.55k|    }
  |  |  ------------------
  ------------------
  304|  6.54k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  6.54k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  6.54k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 6.20k, False: 345]
  |  |  |  |  |  Branch (872:49): [True: 3.86k, False: 2.34k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  305|  3.86k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  3.86k|#  define MINBPC(enc) 2
  ------------------
  306|  3.86k|            return tok;
  307|  3.86k|          }
  308|  2.68k|          break;
  309|   144k|        default:
  ------------------
  |  Branch (309:9): [True: 144k, False: 14.8k]
  ------------------
  310|   144k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|   144k|#  define MINBPC(enc) 2
  ------------------
  311|   144k|          break;
  312|   159k|        }
  313|   159k|      }
  314|    116|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    116|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  2.36k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 2.36k, False: 502k]
  ------------------
  316|  2.36k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  915|  2.36k|#  define PREFIX(ident) big2_##ident
  ------------------
  |  Branch (316:11): [True: 2, False: 2.36k]
  ------------------
  317|      2|        *nextTokPtr = ptr;
  318|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  319|      2|      }
  320|  2.36k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.36k|#  define MINBPC(enc) 2
  ------------------
  321|  2.36k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.36k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.36k|    {                                                                          \
  |  |  |  |  135|  2.36k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.36k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.36k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 43, False: 2.32k]
  |  |  |  |  ------------------
  |  |  |  |  136|     43|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     43|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     43|      }                                                                        \
  |  |  |  |  138|  2.36k|    }
  |  |  ------------------
  ------------------
  322|  2.32k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  2.32k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.32k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.30k, False: 15]
  |  |  |  |  |  Branch (872:49): [True: 2.29k, False: 10]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  323|  2.29k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.29k|#  define MINBPC(enc) 2
  ------------------
  324|  2.29k|        return tok;
  325|  2.29k|      }
  326|       |      /* fall through */
  327|     33|    default:
  ------------------
  |  Branch (327:5): [True: 8, False: 504k]
  ------------------
  328|     33|      *nextTokPtr = ptr;
  329|     33|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     33|#define XML_TOK_INVALID 0
  ------------------
  330|   504k|    }
  331|   504k|  }
  332|     74|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     74|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  6.53k|}
xmltok.c:big2_checkPiTarget:
  232|  6.41k|                      int *tokPtr) {
  233|  6.41k|  int upper = 0;
  234|  6.41k|  UNUSED_P(enc);
  ------------------
  |  |  135|  6.41k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  6.41k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  6.41k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  6.41k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  916|  6.41k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (236:7): [True: 1.93k, False: 4.47k]
  ------------------
  237|  1.93k|    return 1;
  238|  4.47k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  4.47k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  4.47k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 3.92k, False: 550]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  239|  1.16k|  case ASCII_x:
  ------------------
  |  |   86|  1.16k|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 1.16k, False: 3.30k]
  ------------------
  240|  1.16k|    break;
  241|  1.53k|  case ASCII_X:
  ------------------
  |  |   59|  1.53k|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 1.53k, False: 2.94k]
  ------------------
  242|  1.53k|    upper = 1;
  243|  1.53k|    break;
  244|  1.77k|  default:
  ------------------
  |  Branch (244:3): [True: 1.77k, False: 2.70k]
  ------------------
  245|  1.77k|    return 1;
  246|  4.47k|  }
  247|  2.70k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.70k|#  define MINBPC(enc) 2
  ------------------
  248|  2.70k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  2.70k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  2.70k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.72k, False: 980]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|    782|  case ASCII_m:
  ------------------
  |  |   75|    782|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 782, False: 1.92k]
  ------------------
  250|    782|    break;
  251|    938|  case ASCII_M:
  ------------------
  |  |   48|    938|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 938, False: 1.76k]
  ------------------
  252|    938|    upper = 1;
  253|    938|    break;
  254|    982|  default:
  ------------------
  |  Branch (254:3): [True: 982, False: 1.72k]
  ------------------
  255|    982|    return 1;
  256|  2.70k|  }
  257|  1.72k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.72k|#  define MINBPC(enc) 2
  ------------------
  258|  1.72k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  1.72k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  1.72k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.29k, False: 423]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|     41|  case ASCII_l:
  ------------------
  |  |   74|     41|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 41, False: 1.67k]
  ------------------
  260|     41|    break;
  261|      2|  case ASCII_L:
  ------------------
  |  |   47|      2|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 2, False: 1.71k]
  ------------------
  262|      2|    upper = 1;
  263|      2|    break;
  264|  1.67k|  default:
  ------------------
  |  Branch (264:3): [True: 1.67k, False: 43]
  ------------------
  265|  1.67k|    return 1;
  266|  1.72k|  }
  267|     43|  if (upper)
  ------------------
  |  Branch (267:7): [True: 3, False: 40]
  ------------------
  268|      3|    return 0;
  269|     40|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|     40|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|     40|  return 1;
  271|     43|}
xmltok.c:big2_scanPercent:
  924|  2.04k|                    const char **nextTokPtr) {
  925|  2.04k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.04k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.04k|    {                                                                          \
  |  |  |  |  135|  2.04k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.04k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.04k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 26, False: 2.02k]
  |  |  |  |  ------------------
  |  |  |  |  136|     26|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     26|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     26|      }                                                                        \
  |  |  |  |  138|  2.04k|    }
  |  |  ------------------
  ------------------
  926|  2.02k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.02k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.02k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.64k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.64k, False: 376]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  927|  1.32k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.31k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 358, False: 1.66k]
  |  |  ------------------
  |  |  111|  1.31k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    358|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    358|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    358|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 17, False: 341]
  |  |  ------------------
  |  |  112|     17|      *nextTokPtr = ptr;                                                       \
  |  |  113|     17|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     17|    }                                                                          \
  |  |  115|  1.31k|    /* fall through */                                                         \
  |  |  116|  1.31k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 605, False: 1.41k]
  |  |  ------------------
  |  |  117|  1.31k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 367, False: 1.65k]
  |  |  ------------------
  |  |  118|  1.31k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.31k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.31k|    break;                                                                     \
  |  |  120|  1.31k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.02k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     12|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 12, False: 2.01k]
  |  |  |  |  ------------------
  |  |  |  |  100|     12|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 7]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      7|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     14|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      7|    }                                                                          \
  |  |  |  |  106|      7|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  928|    195|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 195, False: 1.82k]
  ------------------
  929|    430|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 235, False: 1.78k]
  ------------------
  930|    671|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 241, False: 1.78k]
  ------------------
  931|    674|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 3, False: 2.02k]
  ------------------
  932|    674|    *nextTokPtr = ptr;
  933|    674|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|    674|#define XML_TOK_PERCENT 22
  ------------------
  934|      7|  default:
  ------------------
  |  Branch (934:3): [True: 7, False: 2.01k]
  ------------------
  935|      7|    *nextTokPtr = ptr;
  936|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  937|  2.02k|  }
  938|  3.16k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  3.16k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  3.16k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  3.16k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.60k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.60k, False: 551]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  940|  6.04k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.92k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 531, False: 2.62k]
  |  |  ------------------
  |  |   82|  1.92k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    531|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    531|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    531|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 25, False: 506]
  |  |  ------------------
  |  |   83|     25|      *nextTokPtr = ptr;                                                       \
  |  |   84|     25|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     25|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     25|    }                                                                          \
  |  |   86|  1.92k|    /* fall through */                                                         \
  |  |   87|  1.92k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 471, False: 2.68k]
  |  |  ------------------
  |  |   88|  1.29k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 317, False: 2.84k]
  |  |  ------------------
  |  |   89|  1.51k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 218, False: 2.94k]
  |  |  ------------------
  |  |   90|  1.70k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 196, False: 2.96k]
  |  |  ------------------
  |  |   91|  1.92k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 215, False: 2.94k]
  |  |  ------------------
  |  |   92|  1.92k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.92k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.92k|    break;                                                                     \
  |  |   94|  1.92k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 3.16k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 3.16k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     13|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 13, False: 3.14k]
  |  |  |  |  ------------------
  |  |  |  |   71|     13|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 9]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      9|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     18|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      9|    }                                                                          \
  |  |  |  |   77|      9|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  941|  1.18k|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 1.18k, False: 1.97k]
  ------------------
  942|  1.18k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.18k|#  define MINBPC(enc) 2
  ------------------
  943|  1.18k|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|  1.18k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|     15|    default:
  ------------------
  |  Branch (944:5): [True: 15, False: 3.14k]
  ------------------
  945|     15|      *nextTokPtr = ptr;
  946|     15|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  947|  3.16k|    }
  948|  3.16k|  }
  949|     76|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     76|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|  1.31k|}
xmltok.c:big2_scanPoundName:
  954|  1.75k|                      const char **nextTokPtr) {
  955|  1.75k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.75k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.75k|    {                                                                          \
  |  |  |  |  135|  1.75k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.75k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.75k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 1.74k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  1.75k|    }
  |  |  ------------------
  ------------------
  956|  1.74k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.74k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.74k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.67k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.67k, False: 75]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  957|  1.34k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.70k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 44, False: 1.70k]
  |  |  ------------------
  |  |  111|  1.70k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|     44|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|     44|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|     44|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 15, False: 29]
  |  |  ------------------
  |  |  112|     15|      *nextTokPtr = ptr;                                                       \
  |  |  113|     15|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     15|    }                                                                          \
  |  |  115|  1.70k|    /* fall through */                                                         \
  |  |  116|  1.70k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.22k, False: 524]
  |  |  ------------------
  |  |  117|  1.70k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 449, False: 1.30k]
  |  |  ------------------
  |  |  118|  1.70k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.70k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.70k|    break;                                                                     \
  |  |  120|  1.70k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.74k]
  |  |  |  |  ------------------
  |  |  |  |  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.74k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     26|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 26, False: 1.72k]
  |  |  |  |  ------------------
  |  |  |  |  100|     26|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 22]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     22|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     44|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     22|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     22|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     22|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     22|    }                                                                          \
  |  |  |  |  106|     22|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  958|      5|  default:
  ------------------
  |  Branch (958:3): [True: 5, False: 1.74k]
  ------------------
  959|      5|    *nextTokPtr = ptr;
  960|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  961|  1.74k|  }
  962|  11.7k|  while (HAS_CHAR(enc, ptr, end)) {
  963|  11.7k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  11.7k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  11.7k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  11.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 11.2k, False: 465]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  964|  34.2k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  10.1k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 451, False: 11.3k]
  |  |  ------------------
  |  |   82|  10.1k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    451|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    451|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    451|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 12, False: 439]
  |  |  ------------------
  |  |   83|     12|      *nextTokPtr = ptr;                                                       \
  |  |   84|     12|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     12|    }                                                                          \
  |  |   86|  10.1k|    /* fall through */                                                         \
  |  |   87|  10.1k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 4.48k, False: 7.27k]
  |  |  ------------------
  |  |   88|  9.35k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 4.43k, False: 7.32k]
  |  |  ------------------
  |  |   89|  9.57k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 225, False: 11.5k]
  |  |  ------------------
  |  |   90|  9.89k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 320, False: 11.4k]
  |  |  ------------------
  |  |   91|  10.1k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 213, False: 11.5k]
  |  |  ------------------
  |  |   92|  10.1k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  10.1k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  10.1k|    break;                                                                     \
  |  |   94|  10.1k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 11.7k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 11.7k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|      8|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 8, False: 11.7k]
  |  |  |  |  ------------------
  |  |  |  |   71|      8|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 4]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      4|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      8|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      4|    }                                                                          \
  |  |  |  |   77|      4|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  965|    233|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 233, False: 11.5k]
  ------------------
  966|    429|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 196, False: 11.5k]
  ------------------
  967|  1.07k|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 646, False: 11.1k]
  ------------------
  968|  1.34k|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 272, False: 11.4k]
  ------------------
  969|  1.42k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 75, False: 11.6k]
  ------------------
  970|  1.42k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 1, False: 11.7k]
  ------------------
  971|  1.61k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 194, False: 11.5k]
  ------------------
  972|  1.61k|      *nextTokPtr = ptr;
  973|  1.61k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  1.61k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|      8|    default:
  ------------------
  |  Branch (974:5): [True: 8, False: 11.7k]
  ------------------
  975|      8|      *nextTokPtr = ptr;
  976|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  977|  11.7k|    }
  978|  11.7k|  }
  979|     58|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     58|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  1.70k|}
xmltok.c:big2_contentTok:
  824|  62.2k|                   const char **nextTokPtr) {
  825|  62.2k|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 1.13k, False: 61.1k]
  ------------------
  826|  1.13k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.13k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|  61.1k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  61.1k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (827:7): [Folded - Ignored]
  ------------------
  828|  61.1k|    size_t n = end - ptr;
  829|  61.1k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  61.1k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (829:9): [True: 15.9k, False: 45.1k]
  ------------------
  830|  15.9k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  15.9k|#  define MINBPC(enc) 2
  ------------------
  831|  15.9k|      if (n == 0)
  ------------------
  |  Branch (831:11): [True: 103, False: 15.8k]
  ------------------
  832|    103|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    103|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  833|  15.8k|      end = ptr + n;
  834|  15.8k|    }
  835|  61.1k|  }
  836|  61.0k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  61.0k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  61.0k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  52.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 52.9k, False: 8.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  837|  17.6k|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 17.6k, False: 43.3k]
  ------------------
  838|  17.6k|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  17.6k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  17.6k|#  define MINBPC(enc) 2
  ------------------
  839|  11.9k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 11.9k, False: 49.0k]
  ------------------
  840|  11.9k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  11.9k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  11.9k|#  define MINBPC(enc) 2
  ------------------
  841|  9.90k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 9.90k, False: 51.1k]
  ------------------
  842|  9.90k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  9.90k|#  define MINBPC(enc) 2
  ------------------
  843|  9.90k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  9.90k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  9.90k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  9.90k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 11, False: 9.89k]
  ------------------
  844|     11|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     11|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  9.89k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  9.89k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  9.89k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.69k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 5.69k, False: 4.19k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 538, False: 9.35k]
  ------------------
  846|    538|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    538|#  define MINBPC(enc) 2
  ------------------
  847|  9.89k|    *nextTokPtr = ptr;
  848|  9.89k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  9.89k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|  2.56k|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 2.56k, False: 58.4k]
  ------------------
  850|  2.56k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.56k|#  define MINBPC(enc) 2
  ------------------
  851|  2.56k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  2.56k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  3.50k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 3.50k, False: 57.5k]
  ------------------
  853|  3.50k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.50k|#  define MINBPC(enc) 2
  ------------------
  854|  3.50k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  3.50k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  3.50k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  3.50k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 3, False: 3.50k]
  ------------------
  855|      3|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      3|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  3.50k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  920|  3.50k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  3.50k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.90k, False: 605]
  |  |  |  |  |  Branch (872:49): [True: 1.85k, False: 1.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  857|  1.65k|      break;
  858|  1.85k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.85k|#  define MINBPC(enc) 2
  ------------------
  859|  1.85k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  1.85k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.85k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  1.85k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 4, False: 1.84k]
  ------------------
  860|      4|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      4|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|  1.84k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  1.84k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.84k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 857, False: 992]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 856]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  862|  1.84k|      ptr -= MINBPC(enc);
  ------------------
  |  |  916|  1.84k|#  define MINBPC(enc) 2
  ------------------
  863|  1.84k|      break;
  864|  1.84k|    }
  865|      1|    *nextTokPtr = ptr;
  866|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  867|  4.88k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 61.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: 61.0k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  2.42k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.36k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.42k, False: 58.6k]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.42k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 55, False: 2.36k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.36k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     55|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.36k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  2.36k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  2.36k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.36k|    break;
  |  |  ------------------
  |  |   63|  2.36k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 50, False: 60.9k]
  |  |  ------------------
  |  |   64|     50|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 61.0k]
  |  |  ------------------
  |  |   65|     61|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 11, False: 61.0k]
  |  |  ------------------
  |  |   66|     61|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     61|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     61|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|  12.9k|  default:
  ------------------
  |  Branch (868:3): [True: 12.9k, False: 48.0k]
  ------------------
  869|  12.9k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  12.9k|#  define MINBPC(enc) 2
  ------------------
  870|  12.9k|    break;
  871|  61.0k|  }
  872|  1.11M|  while (HAS_CHAR(enc, ptr, end)) {
  873|  1.11M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.11M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.11M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  60.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 60.7k, False: 1.05M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  874|      0|#  define LEAD_CASE(n)                                                         \
  875|      0|  case BT_LEAD##n:                                                             \
  876|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  877|      0|      *nextTokPtr = ptr;                                                       \
  878|      0|      return XML_TOK_DATA_CHARS;                                               \
  879|      0|    }                                                                          \
  880|      0|    ptr += n;                                                                  \
  881|      0|    break;
  882|      0|      LEAD_CASE(2)
  ------------------
  |  |  875|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 0, False: 1.11M]
  |  |  ------------------
  |  |  876|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  877|      0|      *nextTokPtr = ptr;                                                       \
  |  |  878|      0|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      0|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|      0|    }                                                                          \
  |  |  880|      0|    ptr += n;                                                                  \
  |  |  881|      0|    break;
  ------------------
  883|      0|      LEAD_CASE(3)
  ------------------
  |  |  875|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 0, False: 1.11M]
  |  |  ------------------
  |  |  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|  89.3k|      LEAD_CASE(4)
  ------------------
  |  |  875|  89.2k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 89.3k, False: 1.02M]
  |  |  ------------------
  |  |  876|  89.3k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  89.2k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 49, False: 89.2k]
  |  |  ------------------
  |  |  877|     49|      *nextTokPtr = ptr;                                                       \
  |  |  878|     49|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     49|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     49|    }                                                                          \
  |  |  880|  89.2k|    ptr += n;                                                                  \
  |  |  881|  89.2k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|  8.80k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 8.80k, False: 1.10M]
  ------------------
  887|  8.80k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|  8.80k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  916|  8.80k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 8.80k, False: 1]
  |  |  ------------------
  ------------------
  888|  8.80k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  920|  8.80k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  8.80k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 6.09k, False: 2.70k]
  |  |  |  |  |  Branch (872:49): [True: 2.95k, False: 3.13k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  889|  5.84k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  5.84k|#  define MINBPC(enc) 2
  ------------------
  890|  5.84k|          break;
  891|  5.84k|        }
  892|  2.95k|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|  2.95k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  916|  2.95k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 2.95k, False: 3]
  |  |  ------------------
  ------------------
  893|  2.95k|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  920|  2.95k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.95k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.00k, False: 948]
  |  |  |  |  |  Branch (872:49): [True: 3, False: 2.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  894|  2.95k|            ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.95k|#  define MINBPC(enc) 2
  ------------------
  895|  2.95k|            break;
  896|  2.95k|          }
  897|      3|          *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  916|      3|#  define MINBPC(enc) 2
  ------------------
  898|      3|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  899|  2.95k|        }
  900|  2.95k|      }
  901|       |      /* fall through */
  902|  3.75k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 3.75k, False: 1.10M]
  ------------------
  903|  7.71k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 3.95k, False: 1.10M]
  ------------------
  904|  7.74k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 36, False: 1.11M]
  ------------------
  905|  7.74k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 0, False: 1.11M]
  ------------------
  906|  7.75k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 5, False: 1.11M]
  ------------------
  907|  16.3k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 8.62k, False: 1.10M]
  ------------------
  908|  18.4k|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 2.02k, False: 1.10M]
  ------------------
  909|  18.4k|      *nextTokPtr = ptr;
  910|  18.4k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  18.4k|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|   995k|    default:
  ------------------
  |  Branch (911:5): [True: 995k, False: 116k]
  ------------------
  912|   995k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   995k|#  define MINBPC(enc) 2
  ------------------
  913|   995k|      break;
  914|  1.11M|    }
  915|  1.11M|  }
  916|    356|  *nextTokPtr = ptr;
  917|    356|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    356|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|  18.8k|}
xmltok.c:big2_scanLt:
  726|  17.6k|               const char **nextTokPtr) {
  727|  17.6k|#  ifdef XML_NS
  728|  17.6k|  int hadColon;
  729|  17.6k|#  endif
  730|  17.6k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  17.6k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  17.6k|    {                                                                          \
  |  |  |  |  135|  17.6k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  17.6k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  17.6k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 14, False: 17.6k]
  |  |  |  |  ------------------
  |  |  |  |  136|     14|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     14|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     14|      }                                                                        \
  |  |  |  |  138|  17.6k|    }
  |  |  ------------------
  ------------------
  731|  17.6k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  17.6k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  17.6k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  14.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 14.7k, False: 2.93k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  732|  10.6k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  10.6k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 2.90k, False: 14.7k]
  |  |  ------------------
  |  |  111|  10.6k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  2.90k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  2.90k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  2.90k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 15, False: 2.88k]
  |  |  ------------------
  |  |  112|     15|      *nextTokPtr = ptr;                                                       \
  |  |  113|     15|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     15|    }                                                                          \
  |  |  115|  10.6k|    /* fall through */                                                         \
  |  |  116|  10.6k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.82k, False: 12.8k]
  |  |  ------------------
  |  |  117|  10.6k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 2.91k, False: 14.7k]
  |  |  ------------------
  |  |  118|  10.6k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  10.6k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  10.6k|    break;                                                                     \
  |  |  120|  10.6k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 17.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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 17.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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     22|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 22, False: 17.6k]
  |  |  |  |  ------------------
  |  |  |  |  100|     22|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 18]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     18|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     36|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     18|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     18|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     18|    }                                                                          \
  |  |  |  |  106|     18|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  733|    982|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 982, False: 16.6k]
  ------------------
  734|    982|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    982|#  define MINBPC(enc) 2
  ------------------
  735|    982|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    982|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    982|    {                                                                          \
  |  |  |  |  135|    982|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    982|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    982|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 981]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    982|    }
  |  |  ------------------
  ------------------
  736|    981|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|    981|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|    981|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    969|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 16, False: 965]
  |  |  |  |  |  Branch (870:4): [True: 969, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    323|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 323, False: 658]
  ------------------
  738|    323|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    323|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    323|#  define MINBPC(enc) 2
  ------------------
  739|    642|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 642, False: 339]
  ------------------
  740|    642|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    642|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    642|#  define MINBPC(enc) 2
  ------------------
  741|    981|    }
  742|     16|    *nextTokPtr = ptr;
  743|     16|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  744|  4.24k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 4.24k, False: 13.4k]
  ------------------
  745|  4.24k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  4.24k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  4.24k|#  define MINBPC(enc) 2
  ------------------
  746|  1.75k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 1.75k, False: 15.9k]
  ------------------
  747|  1.75k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  1.75k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  1.75k|#  define MINBPC(enc) 2
  ------------------
  748|      8|  default:
  ------------------
  |  Branch (748:3): [True: 8, False: 17.6k]
  ------------------
  749|      8|    *nextTokPtr = ptr;
  750|      8|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  751|  17.6k|  }
  752|  10.6k|#  ifdef XML_NS
  753|  10.6k|  hadColon = 0;
  754|  10.6k|#  endif
  755|       |  /* we have a start-tag */
  756|  30.4k|  while (HAS_CHAR(enc, ptr, end)) {
  757|  30.4k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  30.4k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  30.4k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  13.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 13.6k, False: 16.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  758|  92.0k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  19.9k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 16.7k, False: 13.6k]
  |  |  ------------------
  |  |   82|  19.9k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  16.7k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  16.7k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  16.7k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 17, False: 16.7k]
  |  |  ------------------
  |  |   83|     17|      *nextTokPtr = ptr;                                                       \
  |  |   84|     17|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     17|    }                                                                          \
  |  |   86|  19.9k|    /* fall through */                                                         \
  |  |   87|  19.9k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.07k, False: 29.3k]
  |  |  ------------------
  |  |   88|  18.7k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 923, False: 29.5k]
  |  |  ------------------
  |  |   89|  19.2k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 518, False: 29.9k]
  |  |  ------------------
  |  |   90|  19.4k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 212, False: 30.2k]
  |  |  ------------------
  |  |   91|  19.9k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 429, False: 30.0k]
  |  |  ------------------
  |  |   92|  19.9k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  19.9k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  19.9k|    break;                                                                     \
  |  |   94|  19.9k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 30.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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 30.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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 30.4k]
  |  |  |  |  ------------------
  |  |  |  |   71|     17|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 12]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     12|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     24|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     12|    }                                                                          \
  |  |  |  |   77|     12|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 30.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);
  ------------------
  |  |  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.23k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 2.23k, False: 28.2k]
  ------------------
  777|  3.93k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 1.69k, False: 28.7k]
  ------------------
  778|  4.70k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 769, False: 29.6k]
  ------------------
  779|  4.70k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.70k|#  define MINBPC(enc) 2
  ------------------
  780|  5.80k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  5.80k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  5.80k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  5.80k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.88k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 4.88k, False: 920]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  782|  3.40k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  3.10k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 896, False: 4.91k]
  |  |  ------------------
  |  |  111|  3.10k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    896|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    896|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    896|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 13, False: 883]
  |  |  ------------------
  |  |  112|     13|      *nextTokPtr = ptr;                                                       \
  |  |  113|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     13|    }                                                                          \
  |  |  115|  3.10k|    /* fall through */                                                         \
  |  |  116|  3.10k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.59k, False: 4.21k]
  |  |  ------------------
  |  |  117|  3.10k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 629, False: 5.17k]
  |  |  ------------------
  |  |  118|  3.10k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  3.10k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  3.10k|    break;                                                                     \
  |  |  120|  3.10k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 5.80k]
  |  |  |  |  ------------------
  |  |  |  |  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.80k]
  |  |  |  |  ------------------
  |  |  |  |  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: 5.78k]
  |  |  |  |  ------------------
  |  |  |  |  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;
  |  |  ------------------
  ------------------
  783|  1.08k|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 1.08k, False: 4.72k]
  ------------------
  784|  1.08k|          goto gt;
  785|    436|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 436, False: 5.37k]
  ------------------
  786|    436|          goto sol;
  787|    540|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 540, False: 5.26k]
  ------------------
  788|    843|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 303, False: 5.50k]
  ------------------
  789|  1.14k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 300, False: 5.50k]
  ------------------
  790|  1.14k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.14k|#  define MINBPC(enc) 2
  ------------------
  791|  1.14k|          continue;
  792|      7|        default:
  ------------------
  |  Branch (792:9): [True: 7, False: 5.80k]
  ------------------
  793|      7|          *nextTokPtr = ptr;
  794|      7|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  795|  5.80k|        }
  796|  3.10k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  915|  3.10k|#  define PREFIX(ident) big2_##ident
  ------------------
  797|  5.80k|      }
  798|     38|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     38|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  4.70k|    }
  800|  5.45k|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 5.45k, False: 25.0k]
  ------------------
  801|  6.53k|    gt:
  802|  6.53k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  6.53k|#  define MINBPC(enc) 2
  ------------------
  803|  6.53k|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  6.53k|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|    355|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 355, False: 30.1k]
  ------------------
  805|    791|    sol:
  806|    791|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    791|#  define MINBPC(enc) 2
  ------------------
  807|    791|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    791|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    791|    {                                                                          \
  |  |  |  |  135|    791|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    791|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    791|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 15, False: 776]
  |  |  |  |  ------------------
  |  |  |  |  136|     15|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     15|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     15|      }                                                                        \
  |  |  |  |  138|    791|    }
  |  |  ------------------
  ------------------
  808|    776|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    776|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    776|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 764, False: 12]
  |  |  |  |  |  Branch (872:49): [True: 753, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  809|     23|        *nextTokPtr = ptr;
  810|     23|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     23|#define XML_TOK_INVALID 0
  ------------------
  811|     23|      }
  812|    753|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    753|#  define MINBPC(enc) 2
  ------------------
  813|    753|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|    753|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|      9|    default:
  ------------------
  |  Branch (814:5): [True: 9, False: 30.4k]
  ------------------
  815|      9|      *nextTokPtr = ptr;
  816|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  817|  30.4k|    }
  818|  30.4k|  }
  819|     73|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     73|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  10.6k|}
xmltok.c:big2_scanCdataSection:
  337|    642|                         const char **nextTokPtr) {
  338|    642|  static const char CDATA_LSQB[]
  339|    642|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|    642|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|    642|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    642|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|    642|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    642|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|    642|#define ASCII_LSQB 0x5B
  ------------------
  340|    642|  int i;
  341|    642|  UNUSED_P(enc);
  ------------------
  |  |  135|    642|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|    642|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|    642|    {                                                                          \
  |  |  135|    642|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|    642|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    642|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 3, False: 639]
  |  |  ------------------
  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      3|      }                                                                        \
  |  |  138|    642|    }
  ------------------
  344|  4.39k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  3.75k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (344:15): [True: 3.77k, False: 619]
  ------------------
  345|  3.77k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  920|  3.77k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  3.77k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 3.77k, False: 4]
  |  |  |  |  |  Branch (872:49): [True: 3.75k, False: 16]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  346|     20|      *nextTokPtr = ptr;
  347|     20|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     20|#define XML_TOK_INVALID 0
  ------------------
  348|     20|    }
  349|  3.77k|  }
  350|    619|  *nextTokPtr = ptr;
  351|    619|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|    619|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|    639|}
xmltok.c:big2_scanEndTag:
  432|  1.75k|                   const char **nextTokPtr) {
  433|  1.75k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.75k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.75k|    {                                                                          \
  |  |  |  |  135|  1.75k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.75k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.75k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.75k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.75k|    }
  |  |  ------------------
  ------------------
  434|  1.75k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.75k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.75k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.42k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.42k, False: 330]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  435|  1.75k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.72k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 302, False: 1.45k]
  |  |  ------------------
  |  |  111|  1.72k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    302|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    302|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    302|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 2, False: 300]
  |  |  ------------------
  |  |  112|      2|      *nextTokPtr = ptr;                                                       \
  |  |  113|      2|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      2|    }                                                                          \
  |  |  115|  1.72k|    /* fall through */                                                         \
  |  |  116|  1.72k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.10k, False: 649]
  |  |  ------------------
  |  |  117|  1.72k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 318, False: 1.43k]
  |  |  ------------------
  |  |  118|  1.72k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.72k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.72k|    break;                                                                     \
  |  |  120|  1.72k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.75k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.75k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     23|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 23, False: 1.73k]
  |  |  |  |  ------------------
  |  |  |  |  100|     23|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 19]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     19|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     38|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     19|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     19|    }                                                                          \
  |  |  |  |  106|     19|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  436|      6|  default:
  ------------------
  |  Branch (436:3): [True: 6, False: 1.75k]
  ------------------
  437|      6|    *nextTokPtr = ptr;
  438|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  439|  1.75k|  }
  440|  3.51k|  while (HAS_CHAR(enc, ptr, end)) {
  441|  3.51k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  3.51k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  3.51k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.85k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.85k, False: 659]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  442|  5.93k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.85k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 630, False: 2.88k]
  |  |  ------------------
  |  |   82|  1.85k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    630|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    630|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    630|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 15, False: 615]
  |  |  ------------------
  |  |   83|     15|      *nextTokPtr = ptr;                                                       \
  |  |   84|     15|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     15|    }                                                                          \
  |  |   86|  1.85k|    /* fall through */                                                         \
  |  |   87|  1.85k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 357, False: 3.15k]
  |  |  ------------------
  |  |   88|  1.21k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 238, False: 3.27k]
  |  |  ------------------
  |  |   89|  1.44k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 235, False: 3.27k]
  |  |  ------------------
  |  |   90|  1.64k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 195, False: 3.31k]
  |  |  ------------------
  |  |   91|  1.85k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 211, False: 3.30k]
  |  |  ------------------
  |  |   92|  1.85k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.85k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.85k|    break;                                                                     \
  |  |   94|  1.85k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 3.51k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 3.51k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     23|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 23, False: 3.48k]
  |  |  |  |  ------------------
  |  |  |  |   71|     23|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 19]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     19|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     38|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     19|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     19|    }                                                                          \
  |  |  |  |   77|     19|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  443|    278|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 278, False: 3.23k]
  ------------------
  444|  1.01k|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 732, False: 2.77k]
  ------------------
  445|  1.30k|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 291, False: 3.22k]
  ------------------
  446|  1.96k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  1.30k|#  define MINBPC(enc) 2
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|    698|#  define MINBPC(enc) 2
  ------------------
  447|  1.96k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.96k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.96k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.93k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.93k, False: 25]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  448|    235|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 235, False: 1.72k]
  ------------------
  449|    452|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 217, False: 1.74k]
  ------------------
  450|    698|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 246, False: 1.71k]
  ------------------
  451|    698|          break;
  452|  1.21k|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 1.21k, False: 744]
  ------------------
  453|  1.21k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.21k|#  define MINBPC(enc) 2
  ------------------
  454|  1.21k|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|  1.21k|#define XML_TOK_END_TAG 5
  ------------------
  455|     46|        default:
  ------------------
  |  Branch (455:9): [True: 46, False: 1.91k]
  ------------------
  456|     46|          *nextTokPtr = ptr;
  457|     46|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     46|#define XML_TOK_INVALID 0
  ------------------
  458|  1.96k|        }
  459|  1.96k|      }
  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: 3.51k]
  ------------------
  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|    311|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 311, False: 3.20k]
  ------------------
  469|    311|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    311|#  define MINBPC(enc) 2
  ------------------
  470|    311|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|    311|#define XML_TOK_END_TAG 5
  ------------------
  471|     10|    default:
  ------------------
  |  Branch (471:5): [True: 10, False: 3.50k]
  ------------------
  472|     10|      *nextTokPtr = ptr;
  473|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  474|  3.51k|    }
  475|  3.51k|  }
  476|     66|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     66|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  1.72k|}
xmltok.c:big2_scanAtts:
  573|  3.10k|                 const char **nextTokPtr) {
  574|  3.10k|#  ifdef XML_NS
  575|  3.10k|  int hadColon = 0;
  576|  3.10k|#  endif
  577|   363k|  while (HAS_CHAR(enc, ptr, end)) {
  578|   363k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   363k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   363k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   361k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 361k, False: 1.32k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  579|   132k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  33.4k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 1.29k, False: 361k]
  |  |  ------------------
  |  |   82|  33.4k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  1.29k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  1.29k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.29k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 13, False: 1.28k]
  |  |  ------------------
  |  |   83|     13|      *nextTokPtr = ptr;                                                       \
  |  |   84|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     13|    }                                                                          \
  |  |   86|  33.4k|    /* fall through */                                                         \
  |  |   87|  33.4k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 30.9k, False: 332k]
  |  |  ------------------
  |  |   88|  32.8k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 659, False: 362k]
  |  |  ------------------
  |  |   89|  33.0k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 227, False: 362k]
  |  |  ------------------
  |  |   90|  33.2k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 194, False: 362k]
  |  |  ------------------
  |  |   91|  33.4k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 202, False: 362k]
  |  |  ------------------
  |  |   92|  33.4k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  33.4k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  33.4k|    break;                                                                     \
  |  |   94|  33.4k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 363k]
  |  |  |  |  ------------------
  |  |  |  |   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: 363k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     23|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 23, False: 363k]
  |  |  |  |  ------------------
  |  |  |  |   71|     23|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 19]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     19|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     38|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     19|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     19|    }                                                                          \
  |  |  |  |   77|     19|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  580|      0|#  ifdef XML_NS
  581|      0|    case BT_COLON:
  ------------------
  |  Branch (581:5): [True: 0, False: 363k]
  ------------------
  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|    592|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 592, False: 362k]
  ------------------
  598|  1.09k|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 500, False: 362k]
  ------------------
  599|  1.44k|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 357, False: 362k]
  ------------------
  600|  2.41k|      for (;;) {
  601|  2.41k|        int t;
  602|       |
  603|  2.41k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.41k|#  define MINBPC(enc) 2
  ------------------
  604|  2.41k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.41k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.41k|    {                                                                          \
  |  |  |  |  135|  2.41k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.41k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.41k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 43, False: 2.36k]
  |  |  |  |  ------------------
  |  |  |  |  136|     43|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     43|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     43|      }                                                                        \
  |  |  |  |  138|  2.41k|    }
  |  |  ------------------
  ------------------
  605|  2.36k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  2.36k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.36k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.34k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.34k, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  606|  2.36k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 1.37k, False: 992]
  ------------------
  607|  1.37k|          break;
  608|    992|        switch (t) {
  609|    505|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 505, False: 487]
  ------------------
  610|    704|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 199, False: 793]
  ------------------
  611|    962|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 258, False: 734]
  ------------------
  612|    962|          break;
  613|     30|        default:
  ------------------
  |  Branch (613:9): [True: 30, False: 962]
  ------------------
  614|     30|          *nextTokPtr = ptr;
  615|     30|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     30|#define XML_TOK_INVALID 0
  ------------------
  616|    992|        }
  617|    992|      }
  618|       |      /* fall through */
  619|   329k|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 328k, False: 34.9k]
  ------------------
  620|   329k|      int open;
  621|   329k|#  ifdef XML_NS
  622|   329k|      hadColon = 0;
  623|   329k|#  endif
  624|   330k|      for (;;) {
  625|   330k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|   330k|#  define MINBPC(enc) 2
  ------------------
  626|   330k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   330k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   330k|    {                                                                          \
  |  |  |  |  135|   330k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   330k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   330k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 43, False: 330k]
  |  |  |  |  ------------------
  |  |  |  |  136|     43|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     43|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     43|      }                                                                        \
  |  |  |  |  138|   330k|    }
  |  |  ------------------
  ------------------
  627|   330k|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|   330k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   330k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   330k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 330k, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  628|   330k|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 323k, False: 6.91k]
  |  Branch (628:32): [True: 6.09k, False: 826]
  ------------------
  629|   329k|          break;
  630|    826|        switch (open) {
  631|    344|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 344, False: 482]
  ------------------
  632|    542|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 198, False: 628]
  ------------------
  633|    795|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 253, False: 573]
  ------------------
  634|    795|          break;
  635|     31|        default:
  ------------------
  |  Branch (635:9): [True: 31, False: 795]
  ------------------
  636|     31|          *nextTokPtr = ptr;
  637|     31|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     31|#define XML_TOK_INVALID 0
  ------------------
  638|    826|        }
  639|    826|      }
  640|   329k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   329k|#  define MINBPC(enc) 2
  ------------------
  641|       |      /* in attribute value */
  642|  9.17M|      for (;;) {
  643|  9.17M|        int t;
  644|  9.17M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  9.17M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  9.17M|    {                                                                          \
  |  |  |  |  135|  9.17M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  9.17M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  9.17M|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 81, False: 9.17M]
  |  |  |  |  ------------------
  |  |  |  |  136|     81|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     81|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     81|      }                                                                        \
  |  |  |  |  138|  9.17M|    }
  |  |  ------------------
  ------------------
  645|  9.17M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  9.17M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  9.17M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   647k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 647k, False: 8.52M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  646|  9.17M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 329k, False: 8.84M]
  ------------------
  647|   329k|          break;
  648|  8.84M|        switch (t) {
  649|   205k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 8.84M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 8.84M]
  |  |  |  |  ------------------
  |  |  |  |   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|   102k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|   102k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 102k, False: 8.73M]
  |  |  |  |  ------------------
  |  |  |  |   50|   102k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 28, False: 102k]
  |  |  |  |  ------------------
  |  |  |  |   51|   102k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     28|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|   102k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   102k|#    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|   102k|    ptr += n;                                                                  \
  |  |  |  |   57|   102k|    break;
  |  |  ------------------
  |  |   63|   102k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 16, False: 8.84M]
  |  |  ------------------
  |  |   64|     16|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 8.84M]
  |  |  ------------------
  |  |   65|     20|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 8.84M]
  |  |  ------------------
  |  |   66|     20|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     20|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  84.2k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 84.2k, False: 8.75M]
  ------------------
  651|  84.2k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  915|  84.2k|#  define PREFIX(ident) big2_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  916|  84.2k|#  define MINBPC(enc) 2
  ------------------
  652|  84.2k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 15, False: 84.2k]
  ------------------
  653|     15|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 10, False: 5]
  ------------------
  654|     10|              *nextTokPtr = ptr;
  655|     15|            return tok;
  656|     15|          }
  657|  84.2k|          break;
  658|  84.2k|        }
  659|  84.2k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 8, False: 8.84M]
  ------------------
  660|      8|          *nextTokPtr = ptr;
  661|      8|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  662|  8.65M|        default:
  ------------------
  |  Branch (662:9): [True: 8.65M, False: 187k]
  ------------------
  663|  8.65M|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  8.65M|#  define MINBPC(enc) 2
  ------------------
  664|  8.65M|          break;
  665|  8.84M|        }
  666|  8.84M|      }
  667|   329k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   329k|#  define MINBPC(enc) 2
  ------------------
  668|   329k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   329k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   329k|    {                                                                          \
  |  |  |  |  135|   329k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   329k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   329k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 329k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|   329k|    }
  |  |  ------------------
  ------------------
  669|   329k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   329k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   329k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   329k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 329k, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  670|  6.65k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 6.65k, False: 322k]
  ------------------
  671|  7.58k|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 936, False: 328k]
  ------------------
  672|   327k|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 319k, False: 9.30k]
  ------------------
  673|   327k|        break;
  674|    400|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 400, False: 328k]
  ------------------
  675|    400|        goto sol;
  676|  1.28k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 1.28k, False: 328k]
  ------------------
  677|  1.28k|        goto gt;
  678|     31|      default:
  ------------------
  |  Branch (678:7): [True: 31, False: 329k]
  ------------------
  679|     31|        *nextTokPtr = ptr;
  680|     31|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     31|#define XML_TOK_INVALID 0
  ------------------
  681|   329k|      }
  682|       |      /* ptr points to closing quote */
  683|   333k|      for (;;) {
  684|   333k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|   333k|#  define MINBPC(enc) 2
  ------------------
  685|   333k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   333k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   333k|    {                                                                          \
  |  |  |  |  135|   333k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   333k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   333k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 42, False: 333k]
  |  |  |  |  ------------------
  |  |  |  |  136|     42|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     42|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     42|      }                                                                        \
  |  |  |  |  138|   333k|    }
  |  |  ------------------
  ------------------
  686|   333k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   333k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   333k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   330k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 330k, False: 2.63k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  687|   294k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   326k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 2.60k, False: 330k]
  |  |  ------------------
  |  |  111|   326k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  2.60k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  2.60k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  2.60k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 9, False: 2.59k]
  |  |  ------------------
  |  |  112|      9|      *nextTokPtr = ptr;                                                       \
  |  |  113|      9|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      9|    }                                                                          \
  |  |  115|   326k|    /* fall through */                                                         \
  |  |  116|   326k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 289k, False: 43.5k]
  |  |  ------------------
  |  |  117|   326k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 34.3k, False: 298k]
  |  |  ------------------
  |  |  118|   326k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   326k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   326k|    break;                                                                     \
  |  |  120|   326k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 333k]
  |  |  |  |  ------------------
  |  |  |  |  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: 333k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     23|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 23, False: 333k]
  |  |  |  |  ------------------
  |  |  |  |  100|     23|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 19]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     19|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     38|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     19|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     19|    }                                                                          \
  |  |  |  |  106|     19|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  688|    604|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 604, False: 332k]
  ------------------
  689|  1.07k|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 473, False: 332k]
  ------------------
  690|  5.63k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 4.55k, False: 328k]
  ------------------
  691|  5.63k|          continue;
  692|    603|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 603, False: 332k]
  ------------------
  693|  1.89k|        gt:
  694|  1.89k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.89k|#  define MINBPC(enc) 2
  ------------------
  695|  1.89k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  1.89k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|    261|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 261, False: 332k]
  ------------------
  697|    661|        sol:
  698|    661|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    661|#  define MINBPC(enc) 2
  ------------------
  699|    661|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    661|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    661|    {                                                                          \
  |  |  |  |  135|    661|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    661|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    661|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 10, False: 651]
  |  |  |  |  ------------------
  |  |  |  |  136|     10|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     10|      }                                                                        \
  |  |  |  |  138|    661|    }
  |  |  ------------------
  ------------------
  700|    651|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    651|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    651|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 644, False: 7]
  |  |  |  |  |  Branch (872:49): [True: 636, False: 8]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  701|     15|            *nextTokPtr = ptr;
  702|     15|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  703|     15|          }
  704|    636|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    636|#  define MINBPC(enc) 2
  ------------------
  705|    636|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|    636|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|      8|        default:
  ------------------
  |  Branch (706:9): [True: 8, False: 333k]
  ------------------
  707|      8|          *nextTokPtr = ptr;
  708|      8|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  709|   333k|        }
  710|   326k|        break;
  711|   333k|      }
  712|   326k|      break;
  713|   327k|    }
  714|   326k|    default:
  ------------------
  |  Branch (714:5): [True: 8, False: 363k]
  ------------------
  715|      8|      *nextTokPtr = ptr;
  716|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  717|   363k|    }
  718|   363k|  }
  719|     91|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     91|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  3.10k|}
xmltok.c:big2_scanRef:
  545|   172k|                const char **nextTokPtr) {
  546|   172k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   172k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   172k|    {                                                                          \
  |  |  |  |  135|   172k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   172k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   172k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 33, False: 172k]
  |  |  |  |  ------------------
  |  |  |  |  136|     33|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     33|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     33|      }                                                                        \
  |  |  |  |  138|   172k|    }
  |  |  ------------------
  ------------------
  547|   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|   171k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 171k, False: 1.33k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  548|  8.18k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   163k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.31k, False: 171k]
  |  |  ------------------
  |  |  111|   163k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  1.31k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  1.31k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.31k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 7, False: 1.31k]
  |  |  ------------------
  |  |  112|      7|      *nextTokPtr = ptr;                                                       \
  |  |  113|      7|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      7|    }                                                                          \
  |  |  115|   163k|    /* fall through */                                                         \
  |  |  116|   163k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 5.54k, False: 167k]
  |  |  ------------------
  |  |  117|   163k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 156k, False: 16.2k]
  |  |  ------------------
  |  |  118|   163k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   163k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   163k|    break;                                                                     \
  |  |  120|   163k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 172k]
  |  |  |  |  ------------------
  |  |  |  |  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: 172k]
  |  |  |  |  ------------------
  |  |  |  |  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: 172k]
  |  |  |  |  ------------------
  |  |  |  |  100|      7|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 2]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      2|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      4|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      2|    }                                                                          \
  |  |  |  |  106|      2|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  549|  9.39k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 9.39k, False: 163k]
  ------------------
  550|  9.39k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  9.39k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  9.39k|#  define MINBPC(enc) 2
  ------------------
  551|     14|  default:
  ------------------
  |  Branch (551:3): [True: 14, False: 172k]
  ------------------
  552|     14|    *nextTokPtr = ptr;
  553|     14|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  554|   172k|  }
  555|   192k|  while (HAS_CHAR(enc, ptr, end)) {
  556|   192k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   192k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   192k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   186k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 186k, False: 5.93k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  557|   114k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  28.7k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 5.92k, False: 186k]
  |  |  ------------------
  |  |   82|  28.7k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  5.92k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  5.92k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  5.92k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 24, False: 5.90k]
  |  |  ------------------
  |  |   83|     24|      *nextTokPtr = ptr;                                                       \
  |  |   84|     24|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     24|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     24|    }                                                                          \
  |  |   86|  28.7k|    /* fall through */                                                         \
  |  |   87|  28.7k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 18.8k, False: 173k]
  |  |  ------------------
  |  |   88|  27.3k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 2.63k, False: 189k]
  |  |  ------------------
  |  |   89|  28.2k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 945, False: 191k]
  |  |  ------------------
  |  |   90|  28.5k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 279, False: 191k]
  |  |  ------------------
  |  |   91|  28.7k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 221, False: 191k]
  |  |  ------------------
  |  |   92|  28.7k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  28.7k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  28.7k|    break;                                                                     \
  |  |   94|  28.7k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 192k]
  |  |  |  |  ------------------
  |  |  |  |   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: 192k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|      8|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 8, False: 192k]
  |  |  |  |  ------------------
  |  |  |  |   71|      8|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 4]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      4|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      8|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      4|    }                                                                          \
  |  |  |  |   77|      4|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  558|   163k|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 163k, False: 28.8k]
  ------------------
  559|   163k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|   163k|#  define MINBPC(enc) 2
  ------------------
  560|   163k|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|   163k|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|     11|    default:
  ------------------
  |  Branch (561:5): [True: 11, False: 192k]
  ------------------
  562|     11|      *nextTokPtr = ptr;
  563|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  564|   192k|    }
  565|   192k|  }
  566|     49|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     49|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|   163k|}
xmltok.c:big2_scanCharRef:
  514|  9.39k|                    const char **nextTokPtr) {
  515|  9.39k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  9.39k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  9.39k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  9.39k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 9.39k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  9.39k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  920|  9.39k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  9.39k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 9.38k, False: 7]
  |  |  |  |  |  Branch (872:49): [True: 7.76k, False: 1.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  517|  7.76k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  7.76k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  7.76k|#  define MINBPC(enc) 2
  ------------------
  518|  1.63k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.63k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.63k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.62k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.62k, False: 7]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  519|  1.61k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 1.61k, False: 22]
  ------------------
  520|  1.61k|      break;
  521|     22|    default:
  ------------------
  |  Branch (521:5): [True: 22, False: 1.61k]
  ------------------
  522|     22|      *nextTokPtr = ptr;
  523|     22|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     22|#define XML_TOK_INVALID 0
  ------------------
  524|  1.63k|    }
  525|  3.18k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  1.61k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  1.58k|#  define MINBPC(enc) 2
  ------------------
  526|  3.18k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  3.18k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  3.18k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.16k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 3.16k, False: 27]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  527|  1.58k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 1.58k, False: 1.60k]
  ------------------
  528|  1.58k|        break;
  529|  1.56k|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 1.56k, False: 1.62k]
  ------------------
  530|  1.56k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.56k|#  define MINBPC(enc) 2
  ------------------
  531|  1.56k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  1.56k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     34|      default:
  ------------------
  |  Branch (532:7): [True: 34, False: 3.15k]
  ------------------
  533|     34|        *nextTokPtr = ptr;
  534|     34|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     34|#define XML_TOK_INVALID 0
  ------------------
  535|  3.18k|      }
  536|  3.18k|    }
  537|  1.61k|  }
  538|      8|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      8|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  9.39k|}
xmltok.c:big2_scanHexCharRef:
  483|  7.76k|                       const char **nextTokPtr) {
  484|  7.76k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  7.76k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  7.76k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  7.76k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 7.76k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  7.76k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  7.76k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  7.76k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.75k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 7.75k, False: 5]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  486|  4.99k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 4.99k, False: 2.77k]
  ------------------
  487|  7.74k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 2.75k, False: 5.00k]
  ------------------
  488|  7.74k|      break;
  489|     12|    default:
  ------------------
  |  Branch (489:5): [True: 12, False: 7.74k]
  ------------------
  490|     12|      *nextTokPtr = ptr;
  491|     12|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  492|  7.76k|    }
  493|  27.3k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  7.74k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  19.6k|#  define MINBPC(enc) 2
  ------------------
  494|  27.3k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  27.3k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  27.3k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  27.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 27.3k, False: 30]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  495|  12.7k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 12.7k, False: 14.5k]
  ------------------
  496|  19.6k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 6.86k, False: 20.5k]
  ------------------
  497|  19.6k|        break;
  498|  7.69k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 7.69k, False: 19.6k]
  ------------------
  499|  7.69k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  7.69k|#  define MINBPC(enc) 2
  ------------------
  500|  7.69k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  7.69k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|     35|      default:
  ------------------
  |  Branch (501:7): [True: 35, False: 27.3k]
  ------------------
  502|     35|        *nextTokPtr = ptr;
  503|     35|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     35|#define XML_TOK_INVALID 0
  ------------------
  504|  27.3k|      }
  505|  27.3k|    }
  506|  7.74k|  }
  507|     16|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     16|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  7.76k|}
xmltok.c:big2_cdataSectionTok:
  356|  60.3k|                        const char **nextTokPtr) {
  357|  60.3k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 148, False: 60.1k]
  ------------------
  358|    148|    return XML_TOK_NONE;
  ------------------
  |  |   51|    148|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|  60.1k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  60.1k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (359:7): [Folded - Ignored]
  ------------------
  360|  60.1k|    size_t n = end - ptr;
  361|  60.1k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  60.1k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (361:9): [True: 8.00k, False: 52.1k]
  ------------------
  362|  8.00k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  8.00k|#  define MINBPC(enc) 2
  ------------------
  363|  8.00k|      if (n == 0)
  ------------------
  |  Branch (363:11): [True: 25, False: 7.97k]
  ------------------
  364|     25|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     25|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  365|  7.97k|      end = ptr + n;
  366|  7.97k|    }
  367|  60.1k|  }
  368|  60.1k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  60.1k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  60.1k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  52.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 52.4k, False: 7.67k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  369|  6.96k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 6.96k, False: 53.2k]
  ------------------
  370|  6.96k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  6.96k|#  define MINBPC(enc) 2
  ------------------
  371|  6.96k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.96k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.96k|    {                                                                          \
  |  |  |  |  135|  6.96k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.96k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  6.96k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 6.95k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  6.96k|    }
  |  |  ------------------
  ------------------
  372|  6.95k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  920|  6.95k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  6.95k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 5.34k, False: 1.61k]
  |  |  |  |  |  Branch (872:49): [True: 2.89k, False: 2.44k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  373|  4.05k|      break;
  374|  2.89k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.89k|#  define MINBPC(enc) 2
  ------------------
  375|  2.89k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.89k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.89k|    {                                                                          \
  |  |  |  |  135|  2.89k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.89k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.89k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 2.89k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  2.89k|    }
  |  |  ------------------
  ------------------
  376|  2.89k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  2.89k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.89k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.14k, False: 748]
  |  |  |  |  |  Branch (872:49): [True: 308, False: 1.84k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  377|  2.58k|      ptr -= MINBPC(enc);
  ------------------
  |  |  916|  2.58k|#  define MINBPC(enc) 2
  ------------------
  378|  2.58k|      break;
  379|  2.58k|    }
  380|    308|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    308|#  define MINBPC(enc) 2
  ------------------
  381|    308|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|    308|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  12.7k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 12.7k, False: 47.4k]
  ------------------
  383|  12.7k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  12.7k|#  define MINBPC(enc) 2
  ------------------
  384|  12.7k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  12.7k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  12.7k|    {                                                                          \
  |  |  |  |  135|  12.7k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  12.7k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  12.7k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 12, False: 12.6k]
  |  |  |  |  ------------------
  |  |  |  |  136|     12|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     12|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     12|      }                                                                        \
  |  |  |  |  138|  12.7k|    }
  |  |  ------------------
  ------------------
  385|  12.6k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  12.6k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  12.6k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.66k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 5.66k, False: 7.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 1.07k, False: 11.6k]
  ------------------
  386|  1.07k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.07k|#  define MINBPC(enc) 2
  ------------------
  387|  12.6k|    *nextTokPtr = ptr;
  388|  12.6k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  12.6k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  16.4k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 16.4k, False: 43.6k]
  ------------------
  390|  16.4k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  16.4k|#  define MINBPC(enc) 2
  ------------------
  391|  16.4k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  16.4k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  16.4k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 60.1k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 60.1k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  2.40k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.34k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.40k, False: 57.7k]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.40k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 60, False: 2.34k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.34k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     60|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.34k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  2.34k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  2.34k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.34k|    break;
  |  |  ------------------
  |  |   63|  2.34k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 52, False: 60.1k]
  |  |  ------------------
  |  |   64|     52|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 60.1k]
  |  |  ------------------
  |  |   65|     61|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 9, False: 60.1k]
  |  |  ------------------
  |  |   66|     61|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     61|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     61|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  21.5k|  default:
  ------------------
  |  Branch (393:3): [True: 21.5k, False: 38.6k]
  ------------------
  394|  21.5k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  21.5k|#  define MINBPC(enc) 2
  ------------------
  395|  21.5k|    break;
  396|  60.1k|  }
  397|  2.61M|  while (HAS_CHAR(enc, ptr, end)) {
  398|  2.61M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.61M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.61M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   118k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 118k, False: 2.50M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  399|      0|#  define LEAD_CASE(n)                                                         \
  400|      0|  case BT_LEAD##n:                                                             \
  401|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  402|      0|      *nextTokPtr = ptr;                                                       \
  403|      0|      return XML_TOK_DATA_CHARS;                                               \
  404|      0|    }                                                                          \
  405|      0|    ptr += n;                                                                  \
  406|      0|    break;
  407|      0|      LEAD_CASE(2)
  ------------------
  |  |  400|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 0, False: 2.61M]
  |  |  ------------------
  |  |  401|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  402|      0|      *nextTokPtr = ptr;                                                       \
  |  |  403|      0|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      0|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      0|    }                                                                          \
  |  |  405|      0|    ptr += n;                                                                  \
  |  |  406|      0|    break;
  ------------------
  408|      0|      LEAD_CASE(3)
  ------------------
  |  |  400|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 0, False: 2.61M]
  |  |  ------------------
  |  |  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|  17.7k|      LEAD_CASE(4)
  ------------------
  |  |  400|  17.7k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 17.7k, False: 2.60M]
  |  |  ------------------
  |  |  401|  17.7k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  17.7k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 56, False: 17.7k]
  |  |  ------------------
  |  |  402|     56|      *nextTokPtr = ptr;                                                       \
  |  |  403|     56|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     56|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|     56|    }                                                                          \
  |  |  405|  17.7k|    ptr += n;                                                                  \
  |  |  406|  17.7k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|     44|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 44, False: 2.61M]
  ------------------
  412|     44|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 0, False: 2.61M]
  ------------------
  413|     51|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 7, False: 2.61M]
  ------------------
  414|  9.62k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 9.57k, False: 2.60M]
  ------------------
  415|  25.3k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 15.7k, False: 2.60M]
  ------------------
  416|  30.3k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 4.98k, False: 2.61M]
  ------------------
  417|  30.3k|      *nextTokPtr = ptr;
  418|  30.3k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  30.3k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|  2.57M|    default:
  ------------------
  |  Branch (419:5): [True: 2.57M, False: 48.1k]
  ------------------
  420|  2.57M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.57M|#  define MINBPC(enc) 2
  ------------------
  421|  2.57M|      break;
  422|  2.61M|    }
  423|  2.61M|  }
  424|    140|  *nextTokPtr = ptr;
  425|    140|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    140|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  30.5k|}
xmltok.c:big2_attributeValueTok:
 1262|   209k|                          const char **nextTokPtr) {
 1263|   209k|  const char *start;
 1264|   209k|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 2.37k, False: 207k]
  ------------------
 1265|  2.37k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  2.37k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|   207k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   207k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   207k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|   207k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 207k]
  ------------------
 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|   207k|  start = ptr;
 1275|  4.64M|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  4.64M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  4.64M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.64M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   336k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 336k, False: 4.31M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1277|      0|#  define LEAD_CASE(n)                                                         \
 1278|      0|  case BT_LEAD##n:                                                             \
 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1280|      0|    break;
 1281|      0|      LEAD_CASE(2)
  ------------------
  |  | 1278|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 0, False: 4.64M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1282|      0|      LEAD_CASE(3)
  ------------------
  |  | 1278|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 0, False: 4.64M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1283|  90.1k|      LEAD_CASE(4)
  ------------------
  |  | 1278|  90.1k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 90.1k, False: 4.55M]
  |  |  ------------------
  |  | 1279|  90.1k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  90.1k|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|   107k|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 107k, False: 4.54M]
  ------------------
 1286|   107k|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 73.9k, False: 33.2k]
  ------------------
 1287|  73.9k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  73.9k|#  define PREFIX(ident) big2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  73.9k|#  define MINBPC(enc) 2
  ------------------
 1288|  33.2k|      *nextTokPtr = ptr;
 1289|  33.2k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  33.2k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      1|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 1, False: 4.64M]
  ------------------
 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|  11.6k|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 11.6k, False: 4.63M]
  ------------------
 1295|  11.6k|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 6.40k, False: 5.29k]
  ------------------
 1296|  6.40k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  6.40k|#  define MINBPC(enc) 2
  ------------------
 1297|  6.40k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  6.40k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|  6.40k|      }
 1299|  5.29k|      *nextTokPtr = ptr;
 1300|  5.29k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  5.29k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|  77.4k|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 77.4k, False: 4.57M]
  ------------------
 1302|  77.4k|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 40.2k, False: 37.1k]
  ------------------
 1303|  40.2k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  40.2k|#  define MINBPC(enc) 2
  ------------------
 1304|  40.2k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  40.2k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  40.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  40.2k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 313, False: 39.9k]
  ------------------
 1305|    313|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    313|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|  39.9k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  39.9k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  39.9k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  22.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 22.8k, False: 17.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 2.87k, False: 37.0k]
  ------------------
 1307|  2.87k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.87k|#  define MINBPC(enc) 2
  ------------------
 1308|  39.9k|        *nextTokPtr = ptr;
 1309|  39.9k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  39.9k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|  40.2k|      }
 1311|  37.1k|      *nextTokPtr = ptr;
 1312|  37.1k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  37.1k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  10.0k|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 10.0k, False: 4.63M]
  ------------------
 1314|  10.0k|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 6.60k, False: 3.47k]
  ------------------
 1315|  6.60k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  6.60k|#  define MINBPC(enc) 2
  ------------------
 1316|  6.60k|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  6.60k|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  6.60k|      }
 1318|  3.47k|      *nextTokPtr = ptr;
 1319|  3.47k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  3.47k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|  4.35M|    default:
  ------------------
  |  Branch (1320:5): [True: 4.35M, False: 296k]
  ------------------
 1321|  4.35M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.35M|#  define MINBPC(enc) 2
  ------------------
 1322|  4.35M|      break;
 1323|  4.64M|    }
 1324|  4.64M|  }
 1325|  1.03k|  *nextTokPtr = ptr;
 1326|  1.03k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.03k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|   207k|}
xmltok.c:big2_entityValueTok:
 1331|  68.0k|                       const char **nextTokPtr) {
 1332|  68.0k|  const char *start;
 1333|  68.0k|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 1.85k, False: 66.2k]
  ------------------
 1334|  1.85k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.85k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|  66.2k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  66.2k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  66.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  66.2k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 66.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|  66.2k|  start = ptr;
 1344|  36.3M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  36.3M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  36.3M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  36.3M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   234k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 234k, False: 36.1M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 36.3M]
  |  |  ------------------
  |  | 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: 36.3M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1352|   103k|      LEAD_CASE(4)
  ------------------
  |  | 1347|   103k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 103k, False: 36.2M]
  |  |  ------------------
  |  | 1348|   103k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|   103k|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  5.00k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 5.00k, False: 36.3M]
  ------------------
 1355|  5.00k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 2.73k, False: 2.26k]
  ------------------
 1356|  2.73k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  2.73k|#  define PREFIX(ident) big2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  2.73k|#  define MINBPC(enc) 2
  ------------------
 1357|  2.26k|      *nextTokPtr = ptr;
 1358|  2.26k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.26k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      8|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 8, False: 36.3M]
  ------------------
 1360|      8|      if (ptr == start) {
  ------------------
  |  Branch (1360:11): [True: 6, False: 2]
  ------------------
 1361|      6|        int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|      6|#  define PREFIX(ident) big2_##ident
  ------------------
                      int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|      6|#  define MINBPC(enc) 2
  ------------------
 1362|      6|        return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   89|      6|#define XML_TOK_PERCENT 22
  ------------------
                      return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (1362:16): [True: 1, False: 5]
  ------------------
 1363|      6|      }
 1364|      2|      *nextTokPtr = ptr;
 1365|      2|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|      2|#define XML_TOK_DATA_CHARS 6
  ------------------
 1366|  11.7k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 11.7k, False: 36.3M]
  ------------------
 1367|  11.7k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 6.54k, False: 5.17k]
  ------------------
 1368|  6.54k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  6.54k|#  define MINBPC(enc) 2
  ------------------
 1369|  6.54k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  6.54k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|  6.54k|      }
 1371|  5.17k|      *nextTokPtr = ptr;
 1372|  5.17k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  5.17k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|  48.2k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 48.2k, False: 36.3M]
  ------------------
 1374|  48.2k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 26.0k, False: 22.1k]
  ------------------
 1375|  26.0k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  26.0k|#  define MINBPC(enc) 2
  ------------------
 1376|  26.0k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  26.0k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  26.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  26.0k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 390, False: 25.6k]
  ------------------
 1377|    390|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    390|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|  25.6k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  25.6k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  25.6k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  15.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 15.3k, False: 10.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 3.91k, False: 21.7k]
  ------------------
 1379|  3.91k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.91k|#  define MINBPC(enc) 2
  ------------------
 1380|  25.6k|        *nextTokPtr = ptr;
 1381|  25.6k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  25.6k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|  26.0k|      }
 1383|  22.1k|      *nextTokPtr = ptr;
 1384|  22.1k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  22.1k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  36.1M|    default:
  ------------------
  |  Branch (1385:5): [True: 36.1M, False: 168k]
  ------------------
 1386|  36.1M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  36.1M|#  define MINBPC(enc) 2
  ------------------
 1387|  36.1M|      break;
 1388|  36.3M|    }
 1389|  36.3M|  }
 1390|  1.24k|  *nextTokPtr = ptr;
 1391|  1.24k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.24k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|  66.2k|}
xmltok.c:big2_nameMatchesAscii:
 1715|  28.4k|                         const char *end1, const char *ptr2) {
 1716|  28.4k|  UNUSED_P(enc);
  ------------------
  |  |  135|  28.4k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|   118k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  916|  90.0k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1717:10): [True: 103k, False: 15.1k]
  ------------------
 1718|   103k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  916|   103k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1718:9): [True: 40, False: 103k]
  ------------------
 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|     40|      return 0; /* LCOV_EXCL_LINE */
 1725|     40|    }
 1726|   103k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  920|   103k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|   103k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 103k, False: 53]
  |  |  |  |  |  Branch (872:49): [True: 90.0k, False: 13.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1727|  13.2k|      return 0;
 1728|   103k|  }
 1729|  15.1k|  return ptr1 == end1;
 1730|  28.4k|}
xmltok.c:big2_nameLength:
 1733|  14.3k|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  14.3k|  const char *start = ptr;
 1735|  48.4k|  for (;;) {
 1736|  48.4k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  48.4k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  48.4k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  27.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 27.7k, False: 20.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1737|      0|#  define LEAD_CASE(n)                                                         \
 1738|      0|  case BT_LEAD##n:                                                             \
 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1740|      0|    break;
 1741|      0|      LEAD_CASE(2)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 48.4k]
  |  |  ------------------
  |  | 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: 48.4k]
  |  |  ------------------
  |  | 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: 48.4k]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1744|      0|#  undef LEAD_CASE
 1745|  20.7k|    case BT_NONASCII:
  ------------------
  |  Branch (1745:5): [True: 20.7k, False: 27.7k]
  ------------------
 1746|  28.7k|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 7.96k, False: 40.5k]
  ------------------
 1747|  28.7k|#  ifdef XML_NS
 1748|  28.7k|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 48.4k]
  ------------------
 1749|  28.7k|#  endif
 1750|  33.4k|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 4.64k, False: 43.8k]
  ------------------
 1751|  33.7k|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 323, False: 48.1k]
  ------------------
 1752|  33.8k|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 146, False: 48.3k]
  ------------------
 1753|  34.1k|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 232, False: 48.2k]
  ------------------
 1754|  34.1k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  34.1k|#  define MINBPC(enc) 2
  ------------------
 1755|  34.1k|      break;
 1756|  14.3k|    default:
  ------------------
  |  Branch (1756:5): [True: 14.3k, False: 34.1k]
  ------------------
 1757|  14.3k|      return (int)(ptr - start);
 1758|  48.4k|    }
 1759|  48.4k|  }
 1760|  14.3k|}
xmltok.c:big2_getAtts:
 1510|  9.93k|                ATTRIBUTE *atts) {
 1511|  9.93k|  enum { other, inName, inValue } state = inName;
 1512|  9.93k|  int nAtts = 0;
 1513|  9.93k|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  15.4M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  9.93k|#  define MINBPC(enc) 2
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  15.4M|#  define MINBPC(enc) 2
  ------------------
 1517|  15.4M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  15.4M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  15.4M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.85M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 3.85M, False: 11.5M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 15.4M]
  |  |  ------------------
  |  | 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|      0|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  916|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|      0|    break;
  ------------------
 1531|      0|      LEAD_CASE(3)
  ------------------
  |  | 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 0, False: 15.4M]
  |  |  ------------------
  |  | 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|      0|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  916|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|      0|    break;
  ------------------
 1532|  91.3k|      LEAD_CASE(4)
  ------------------
  |  | 1527|  91.3k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 91.3k, False: 15.3M]
  |  |  ------------------
  |  | 1528|  91.3k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  91.3k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 91.3k]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  916|  91.3k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|  91.3k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|  11.4M|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 11.4M, False: 3.94M]
  ------------------
 1535|  12.1M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 692k, False: 14.7M]
  ------------------
 1536|  12.3M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 174k, False: 15.2M]
  ------------------
 1537|  12.3M|      START_NAME
  ------------------
  |  | 1519|  12.3M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 652k, False: 11.6M]
  |  |  ------------------
  |  | 1520|   652k|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 329k, False: 322k]
  |  |  ------------------
  |  | 1521|   329k|        atts[nAtts].name = ptr;                                                \
  |  | 1522|   329k|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|   329k|      }                                                                        \
  |  | 1524|   652k|      state = inName;                                                          \
  |  | 1525|   652k|    }
  ------------------
 1538|  12.3M|      break;
 1539|      0|#  undef START_NAME
 1540|  1.29M|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 1.29M, False: 14.1M]
  ------------------
 1541|  1.29M|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 644k, False: 648k]
  ------------------
 1542|   644k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 323k, False: 320k]
  ------------------
 1543|   323k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|   323k|#  define MINBPC(enc) 2
  ------------------
 1544|   644k|        state = inValue;
 1545|   644k|        open = BT_QUOT;
 1546|   648k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 644k, False: 4.10k]
  ------------------
 1547|   644k|        state = other;
 1548|   644k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 323k, False: 320k]
  ------------------
 1549|   323k|          atts[nAtts].valueEnd = ptr;
 1550|   644k|        nAtts++;
 1551|   644k|      }
 1552|  1.29M|      break;
 1553|  16.0k|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 16.0k, False: 15.4M]
  ------------------
 1554|  16.0k|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 7.69k, False: 8.34k]
  ------------------
 1555|  7.69k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 5.57k, False: 2.11k]
  ------------------
 1556|  5.57k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  5.57k|#  define MINBPC(enc) 2
  ------------------
 1557|  7.69k|        state = inValue;
 1558|  7.69k|        open = BT_APOS;
 1559|  8.34k|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 7.69k, False: 652]
  ------------------
 1560|  7.69k|        state = other;
 1561|  7.69k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 5.57k, False: 2.11k]
  ------------------
 1562|  5.57k|          atts[nAtts].valueEnd = ptr;
 1563|  7.69k|        nAtts++;
 1564|  7.69k|      }
 1565|  16.0k|      break;
 1566|  78.8k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 78.8k, False: 15.3M]
  ------------------
 1567|  78.8k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 76.6k, False: 2.12k]
  ------------------
 1568|  76.6k|        atts[nAtts].normalized = 0;
 1569|  78.8k|      break;
 1570|  27.6k|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 27.6k, False: 15.3M]
  ------------------
 1571|  27.6k|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 2.27k, False: 25.3k]
  ------------------
 1572|  2.27k|        state = other;
 1573|  25.3k|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 12.7k, False: 12.5k]
  |  Branch (1573:36): [True: 10.6k, False: 2.15k]
  |  Branch (1573:55): [True: 3.62k, False: 7.00k]
  ------------------
 1574|  25.3k|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 638, False: 2.98k]
  ------------------
 1575|  3.62k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  919|  2.98k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  2.98k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 2.98k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|  6.61k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 215, False: 2.77k]
  ------------------
 1576|  3.62k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  919|  2.77k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  2.77k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.10k, False: 1.66k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|  6.39k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 313, False: 2.46k]
  ------------------
 1577|  3.62k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  918|  2.46k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.46k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    791|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 791, False: 1.66k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 360, False: 2.10k]
  ------------------
 1578|  1.52k|        atts[nAtts].normalized = 0;
 1579|  27.6k|      break;
 1580|  45.5k|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 45.5k, False: 15.3M]
  ------------------
 1581|   703k|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 657k, False: 14.7M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|   703k|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 2.58k, False: 700k]
  ------------------
 1585|  2.58k|        state = other;
 1586|   700k|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 53.0k, False: 647k]
  |  Branch (1586:36): [True: 51.5k, False: 1.47k]
  ------------------
 1587|  51.5k|        atts[nAtts].normalized = 0;
 1588|   703k|      break;
 1589|  13.3k|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 13.3k, False: 15.4M]
  ------------------
 1590|  19.3k|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 6.06k, False: 15.4M]
  ------------------
 1591|  19.3k|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 9.93k, False: 9.44k]
  ------------------
 1592|  9.93k|        return nAtts;
 1593|  9.44k|      break;
 1594|   848k|    default:
  ------------------
  |  Branch (1594:5): [True: 848k, False: 14.5M]
  ------------------
 1595|   848k|      break;
 1596|  15.4M|    }
 1597|  15.4M|  }
 1598|       |  /* not reached */
 1599|  9.93k|}
xmltok.c:big2_charRefNumber:
 1602|  5.79k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  5.79k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  5.79k|  UNUSED_P(enc);
  ------------------
  |  |  135|  5.79k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  5.79k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  916|  5.79k|#  define MINBPC(enc) 2
  ------------------
 1607|  5.79k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  920|  5.79k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  5.79k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 5.79k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 4.85k, False: 940]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1608|  19.6k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  916|  4.85k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  920|  19.6k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  19.6k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 19.6k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 4.83k, False: 14.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1609|  14.8k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  14.8k|#  define MINBPC(enc) 2
  ------------------
 1610|  14.8k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  919|  14.8k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  14.8k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 14.8k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1611|  14.8k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 14.8k]
  ------------------
 1612|    711|      case ASCII_0:
  ------------------
  |  |   90|    711|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 711, False: 14.1k]
  ------------------
 1613|  1.37k|      case ASCII_1:
  ------------------
  |  |   91|  1.37k|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 667, False: 14.1k]
  ------------------
 1614|  2.60k|      case ASCII_2:
  ------------------
  |  |   92|  2.60k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 1.22k, False: 13.6k]
  ------------------
 1615|  3.35k|      case ASCII_3:
  ------------------
  |  |   93|  3.35k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 747, False: 14.1k]
  ------------------
 1616|  4.20k|      case ASCII_4:
  ------------------
  |  |   94|  4.20k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 853, False: 14.0k]
  ------------------
 1617|  4.72k|      case ASCII_5:
  ------------------
  |  |   95|  4.72k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 522, False: 14.3k]
  ------------------
 1618|  5.40k|      case ASCII_6:
  ------------------
  |  |   96|  5.40k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 676, False: 14.1k]
  ------------------
 1619|  6.25k|      case ASCII_7:
  ------------------
  |  |   97|  6.25k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 855, False: 14.0k]
  ------------------
 1620|  6.53k|      case ASCII_8:
  ------------------
  |  |   98|  6.53k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 281, False: 14.5k]
  ------------------
 1621|  6.78k|      case ASCII_9:
  ------------------
  |  |   99|  6.78k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 244, False: 14.6k]
  ------------------
 1622|  6.78k|        result <<= 4;
 1623|  6.78k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  6.78k|#define ASCII_0 0x30
  ------------------
 1624|  6.78k|        break;
 1625|    979|      case ASCII_A:
  ------------------
  |  |   36|    979|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 979, False: 13.8k]
  ------------------
 1626|  1.55k|      case ASCII_B:
  ------------------
  |  |   37|  1.55k|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 576, False: 14.2k]
  ------------------
 1627|  2.35k|      case ASCII_C:
  ------------------
  |  |   38|  2.35k|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 800, False: 14.0k]
  ------------------
 1628|  3.09k|      case ASCII_D:
  ------------------
  |  |   39|  3.09k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 742, False: 14.1k]
  ------------------
 1629|  3.72k|      case ASCII_E:
  ------------------
  |  |   40|  3.72k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 631, False: 14.2k]
  ------------------
 1630|  4.80k|      case ASCII_F:
  ------------------
  |  |   41|  4.80k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 1.07k, False: 13.7k]
  ------------------
 1631|  4.80k|        result <<= 4;
 1632|  4.80k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  4.80k|#define ASCII_A 0x41
  ------------------
 1633|  4.80k|        break;
 1634|    716|      case ASCII_a:
  ------------------
  |  |   63|    716|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 716, False: 14.1k]
  ------------------
 1635|  1.16k|      case ASCII_b:
  ------------------
  |  |   64|  1.16k|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 451, False: 14.4k]
  ------------------
 1636|  1.86k|      case ASCII_c:
  ------------------
  |  |   65|  1.86k|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 695, False: 14.1k]
  ------------------
 1637|  2.26k|      case ASCII_d:
  ------------------
  |  |   66|  2.26k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 401, False: 14.4k]
  ------------------
 1638|  2.81k|      case ASCII_e:
  ------------------
  |  |   67|  2.81k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 550, False: 14.3k]
  ------------------
 1639|  3.27k|      case ASCII_f:
  ------------------
  |  |   68|  3.27k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 465, False: 14.3k]
  ------------------
 1640|  3.27k|        result <<= 4;
 1641|  3.27k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  3.27k|#define ASCII_a 0x61
  ------------------
 1642|  3.27k|        break;
 1643|  14.8k|      }
 1644|  14.8k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 24, False: 14.8k]
  ------------------
 1645|     24|        return -1;
 1646|  14.8k|    }
 1647|  4.85k|  } else {
 1648|  2.81k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  920|  2.81k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.81k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.81k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 936, False: 1.87k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  1.87k|#  define MINBPC(enc) 2
  ------------------
 1649|  1.87k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  919|  1.87k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  1.87k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.87k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1650|  1.87k|      result *= 10;
 1651|  1.87k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  1.87k|#define ASCII_0 0x30
  ------------------
 1652|  1.87k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 4, False: 1.87k]
  ------------------
 1653|      4|        return -1;
 1654|  1.87k|    }
 1655|    940|  }
 1656|  5.76k|  return checkCharRefNumber(result);
 1657|  5.79k|}
xmltok.c:big2_predefinedEntityName:
 1661|  82.8k|                             const char *end) {
 1662|  82.8k|  UNUSED_P(enc);
  ------------------
  |  |  135|  82.8k|#  define UNUSED_P(p) (void)p
  ------------------
 1663|  82.8k|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  916|  82.8k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1663:11): [True: 75.5k, False: 7.27k]
  ------------------
 1664|  1.36k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 1.36k, False: 81.4k]
  ------------------
 1665|  1.36k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  920|  1.36k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.36k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.13k, False: 227]
  |  |  |  |  |  Branch (872:49): [True: 740, False: 394]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1666|    740|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|    740|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|    740|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:31): [True: 235, False: 505]
  |  |  |  |  |  Branch (871:32): [True: 529, False: 211]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1667|    503|      case ASCII_l:
  ------------------
  |  |   74|    503|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 503, False: 237]
  ------------------
 1668|    503|        return ASCII_LT;
  ------------------
  |  |  111|    503|#define ASCII_LT 0x3C
  ------------------
 1669|      2|      case ASCII_g:
  ------------------
  |  |   69|      2|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 2, False: 738]
  ------------------
 1670|      2|        return ASCII_GT;
  ------------------
  |  |  113|      2|#define ASCII_GT 0x3E
  ------------------
 1671|    740|      }
 1672|    740|    }
 1673|    856|    break;
 1674|  1.64k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.64k, False: 81.1k]
  ------------------
 1675|  1.64k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  920|  1.64k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.64k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.41k, False: 234]
  |  |  |  |  |  Branch (872:49): [True: 1.17k, False: 241]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1676|  1.17k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.17k|#  define MINBPC(enc) 2
  ------------------
 1677|  1.17k|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  920|  1.17k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.17k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 878, False: 296]
  |  |  |  |  |  Branch (872:49): [True: 668, False: 210]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1678|    668|        ptr += MINBPC(enc);
  ------------------
  |  |  916|    668|#  define MINBPC(enc) 2
  ------------------
 1679|    668|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  920|    668|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    668|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 471, False: 197]
  |  |  |  |  |  Branch (872:49): [True: 262, False: 209]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1680|    262|          return ASCII_AMP;
  ------------------
  |  |  105|    262|#define ASCII_AMP 0x26
  ------------------
 1681|    668|      }
 1682|  1.17k|    }
 1683|  1.38k|    break;
 1684|  4.26k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 4.26k, False: 78.5k]
  ------------------
 1685|  4.26k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  4.26k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  4.26k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:31): [True: 438, False: 3.82k]
  |  |  |  |  |  Branch (871:32): [True: 3.94k, False: 325]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1686|  2.32k|    case ASCII_q:
  ------------------
  |  |   79|  2.32k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 2.32k, False: 1.93k]
  ------------------
 1687|  2.32k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.32k|#  define MINBPC(enc) 2
  ------------------
 1688|  2.32k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  920|  2.32k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.32k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.13k, False: 195]
  |  |  |  |  |  Branch (872:49): [True: 1.88k, False: 248]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1689|  1.88k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.88k|#  define MINBPC(enc) 2
  ------------------
 1690|  1.88k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  920|  1.88k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.88k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.55k, False: 334]
  |  |  |  |  |  Branch (872:49): [True: 1.35k, False: 195]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1691|  1.35k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.35k|#  define MINBPC(enc) 2
  ------------------
 1692|  1.35k|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  920|  1.35k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.35k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.15k, False: 199]
  |  |  |  |  |  Branch (872:49): [True: 937, False: 220]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1693|    937|            return ASCII_QUOT;
  ------------------
  |  |  104|    937|#define ASCII_QUOT 0x22
  ------------------
 1694|  1.35k|        }
 1695|  1.88k|      }
 1696|  1.39k|      break;
 1697|  1.49k|    case ASCII_a:
  ------------------
  |  |   63|  1.49k|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 1.49k, False: 2.76k]
  ------------------
 1698|  1.49k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.49k|#  define MINBPC(enc) 2
  ------------------
 1699|  1.49k|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  920|  1.49k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.49k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.30k, False: 195]
  |  |  |  |  |  Branch (872:49): [True: 982, False: 322]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1700|    982|        ptr += MINBPC(enc);
  ------------------
  |  |  916|    982|#  define MINBPC(enc) 2
  ------------------
 1701|    982|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  920|    982|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    982|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 785, False: 197]
  |  |  |  |  |  Branch (872:49): [True: 591, False: 194]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1702|    591|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    591|#  define MINBPC(enc) 2
  ------------------
 1703|    591|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  920|    591|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    591|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 391, False: 200]
  |  |  |  |  |  Branch (872:49): [True: 194, False: 197]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1704|    194|            return ASCII_APOS;
  ------------------
  |  |  106|    194|#define ASCII_APOS 0x27
  ------------------
 1705|    591|        }
 1706|    982|      }
 1707|  1.30k|      break;
 1708|  4.26k|    }
 1709|  82.8k|  }
 1710|  80.9k|  return 0;
 1711|  82.8k|}
xmltok.c:big2_updatePosition:
 1779|  3.53k|                       POSITION *pos) {
 1780|  7.62M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  7.62M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  7.62M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  7.62M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   624k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 624k, False: 7.00M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1782|      0|#  define LEAD_CASE(n)                                                         \
 1783|      0|  case BT_LEAD##n:                                                             \
 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1785|      0|    pos->columnNumber++;                                                       \
 1786|      0|    break;
 1787|      0|      LEAD_CASE(2)
  ------------------
  |  | 1783|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 0, False: 7.62M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1788|      0|      LEAD_CASE(3)
  ------------------
  |  | 1783|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 0, False: 7.62M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1789|   172k|      LEAD_CASE(4)
  ------------------
  |  | 1783|   172k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 172k, False: 7.45M]
  |  |  ------------------
  |  | 1784|   172k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|   172k|    pos->columnNumber++;                                                       \
  |  | 1786|   172k|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|  27.4k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 27.4k, False: 7.60M]
  ------------------
 1792|  27.4k|      pos->columnNumber = 0;
 1793|  27.4k|      pos->lineNumber++;
 1794|  27.4k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  27.4k|#  define MINBPC(enc) 2
  ------------------
 1795|  27.4k|      break;
 1796|  50.6k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 50.6k, False: 7.57M]
  ------------------
 1797|  50.6k|      pos->lineNumber++;
 1798|  50.6k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  50.6k|#  define MINBPC(enc) 2
  ------------------
 1799|  50.6k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|  50.6k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   101k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  50.6k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 50.5k, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  50.5k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  50.5k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  28.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 28.9k, False: 21.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 3.65k, False: 46.9k]
  ------------------
 1800|  3.65k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.65k|#  define MINBPC(enc) 2
  ------------------
 1801|  50.6k|      pos->columnNumber = 0;
 1802|  50.6k|      break;
 1803|  7.37M|    default:
  ------------------
  |  Branch (1803:5): [True: 7.37M, False: 250k]
  ------------------
 1804|  7.37M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  7.37M|#  define MINBPC(enc) 2
  ------------------
 1805|  7.37M|      pos->columnNumber++;
 1806|  7.37M|      break;
 1807|  7.62M|    }
 1808|  7.62M|  }
 1809|  3.53k|}
xmltok.c:big2_isPublicId:
 1450|  1.80k|                   const char **badPtr) {
 1451|  1.80k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.80k|#  define MINBPC(enc) 2
  ------------------
 1452|  1.80k|  end -= MINBPC(enc);
  ------------------
  |  |  916|  1.80k|#  define MINBPC(enc) 2
  ------------------
 1453|  15.3k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  15.2k|#  define MINBPC(enc) 2
  ------------------
 1454|  15.3k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  15.3k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  15.3k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  15.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 15.2k, False: 26]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1455|    736|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 736, False: 14.5k]
  ------------------
 1456|  2.74k|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 2.00k, False: 13.3k]
  ------------------
 1457|  3.25k|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 513, False: 14.8k]
  ------------------
 1458|  3.84k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 590, False: 14.7k]
  ------------------
 1459|  4.29k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 454, False: 14.8k]
  ------------------
 1460|  4.79k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 491, False: 14.8k]
  ------------------
 1461|  5.08k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 290, False: 15.0k]
  ------------------
 1462|  5.44k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 368, False: 14.9k]
  ------------------
 1463|  6.51k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 1.07k, False: 14.2k]
  ------------------
 1464|  6.80k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 286, False: 15.0k]
  ------------------
 1465|  7.26k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 458, False: 14.8k]
  ------------------
 1466|  7.84k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 581, False: 14.7k]
  ------------------
 1467|  8.04k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 203, False: 15.1k]
  ------------------
 1468|  8.25k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 209, False: 15.1k]
  ------------------
 1469|  8.50k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 253, False: 15.0k]
  ------------------
 1470|  8.76k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 254, False: 15.0k]
  ------------------
 1471|  8.98k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 225, False: 15.0k]
  ------------------
 1472|  9.30k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 322, False: 14.9k]
  ------------------
 1473|  9.30k|#  ifdef XML_NS
 1474|  9.30k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 15.3k]
  ------------------
 1475|  9.30k|#  endif
 1476|  9.30k|      break;
 1477|  1.04k|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 1.04k, False: 14.2k]
  ------------------
 1478|  1.04k|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  920|  1.04k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.04k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.04k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 1.04k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1479|      1|        *badPtr = ptr;
 1480|      1|        return 0;
 1481|      1|      }
 1482|  1.04k|      break;
 1483|  1.04k|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 447, False: 14.8k]
  ------------------
 1484|  4.11k|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 3.66k, False: 11.6k]
  ------------------
 1485|  4.11k|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  919|  4.11k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  4.11k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 4.11k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1485:11): [True: 4.10k, False: 11]
  ------------------
 1486|  4.10k|        break;
 1487|       |      /* fall through */
 1488|    869|    default:
  ------------------
  |  Branch (1488:5): [True: 858, False: 14.4k]
  ------------------
 1489|    869|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|    869|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|    869|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 843, False: 26]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1490|    273|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 273, False: 596]
  ------------------
 1491|    831|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 558, False: 311]
  ------------------
 1492|    831|        break;
 1493|     38|      default:
  ------------------
  |  Branch (1493:7): [True: 38, False: 831]
  ------------------
 1494|     38|        *badPtr = ptr;
 1495|     38|        return 0;
 1496|    869|      }
 1497|    831|      break;
 1498|  15.3k|    }
 1499|  15.3k|  }
 1500|  1.76k|  return 1;
 1501|  1.80k|}

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

