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

xml_parsebuffer_fuzzer.c:sip_tokey:
  148|  19.2k|sip_tokey(struct sipkey *key, const void *src) {
  149|  19.2k|  key->k[0] = SIP_U8TO64_LE((const unsigned char *)src);
  ------------------
  |  |  124|  19.2k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  19.2k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  19.2k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  19.2k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  150|  19.2k|  key->k[1] = SIP_U8TO64_LE((const unsigned char *)src + 8);
  ------------------
  |  |  124|  19.2k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  19.2k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  19.2k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  19.2k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  151|  19.2k|  return key;
  152|  19.2k|} /* sip_tokey() */
xml_parsebuffer_fuzzer.c:siphash24:
  271|  19.2k|siphash24(const void *src, size_t len, const struct sipkey *key) {
  272|  19.2k|  struct siphash state = SIPHASH_INITIALIZER;
  ------------------
  |  |  130|  19.2k|  { 0, 0, 0, 0, {0}, 0, 0 }
  ------------------
  273|  19.2k|  return sip24_final(sip24_update(sip24_init(&state, key), src, len));
  274|  19.2k|} /* siphash24() */
xml_parsebuffer_fuzzer.c:sip24_final:
  231|  19.2k|sip24_final(struct siphash *H) {
  232|  19.2k|  const char left = (char)(H->p - H->buf);
  233|  19.2k|  uint64_t b = (H->c + left) << 56;
  234|       |
  235|  19.2k|  switch (left) {
  ------------------
  |  Branch (235:11): [True: 0, False: 19.2k]
  ------------------
  236|  1.26k|  case 7:
  ------------------
  |  Branch (236:3): [True: 1.26k, False: 17.9k]
  ------------------
  237|  1.26k|    b |= (uint64_t)H->buf[6] << 48;
  238|       |    /* fall through */
  239|  4.77k|  case 6:
  ------------------
  |  Branch (239:3): [True: 3.51k, False: 15.6k]
  ------------------
  240|  4.77k|    b |= (uint64_t)H->buf[5] << 40;
  241|       |    /* fall through */
  242|  5.99k|  case 5:
  ------------------
  |  Branch (242:3): [True: 1.21k, False: 17.9k]
  ------------------
  243|  5.99k|    b |= (uint64_t)H->buf[4] << 32;
  244|       |    /* fall through */
  245|  9.63k|  case 4:
  ------------------
  |  Branch (245:3): [True: 3.64k, False: 15.5k]
  ------------------
  246|  9.63k|    b |= (uint64_t)H->buf[3] << 24;
  247|       |    /* fall through */
  248|  10.9k|  case 3:
  ------------------
  |  Branch (248:3): [True: 1.36k, False: 17.8k]
  ------------------
  249|  10.9k|    b |= (uint64_t)H->buf[2] << 16;
  250|       |    /* fall through */
  251|  14.2k|  case 2:
  ------------------
  |  Branch (251:3): [True: 3.27k, False: 15.9k]
  ------------------
  252|  14.2k|    b |= (uint64_t)H->buf[1] << 8;
  253|       |    /* fall through */
  254|  15.6k|  case 1:
  ------------------
  |  Branch (254:3): [True: 1.33k, False: 17.8k]
  ------------------
  255|  15.6k|    b |= (uint64_t)H->buf[0] << 0;
  256|       |    /* fall through */
  257|  19.2k|  case 0:
  ------------------
  |  Branch (257:3): [True: 3.59k, False: 15.6k]
  ------------------
  258|  19.2k|    break;
  259|  19.2k|  }
  260|       |
  261|  19.2k|  H->v3 ^= b;
  262|  19.2k|  sip_round(H, 2);
  263|  19.2k|  H->v0 ^= b;
  264|  19.2k|  H->v2 ^= 0xff;
  265|  19.2k|  sip_round(H, 4);
  266|       |
  267|  19.2k|  return H->v0 ^ H->v1 ^ H->v2 ^ H->v3;
  268|  19.2k|} /* sip24_final() */
xml_parsebuffer_fuzzer.c:sip_round:
  167|  39.1M|sip_round(struct siphash *H, const int rounds) {
  168|  39.1M|  int i;
  169|       |
  170|   117M|  for (i = 0; i < rounds; i++) {
  ------------------
  |  Branch (170:15): [True: 78.4M, False: 39.1M]
  ------------------
  171|  78.4M|    H->v0 += H->v1;
  172|  78.4M|    H->v1 = SIP_ROTL(H->v1, 13);
  ------------------
  |  |  111|  78.4M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  173|  78.4M|    H->v1 ^= H->v0;
  174|  78.4M|    H->v0 = SIP_ROTL(H->v0, 32);
  ------------------
  |  |  111|  78.4M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  175|       |
  176|  78.4M|    H->v2 += H->v3;
  177|  78.4M|    H->v3 = SIP_ROTL(H->v3, 16);
  ------------------
  |  |  111|  78.4M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  178|  78.4M|    H->v3 ^= H->v2;
  179|       |
  180|  78.4M|    H->v0 += H->v3;
  181|  78.4M|    H->v3 = SIP_ROTL(H->v3, 21);
  ------------------
  |  |  111|  78.4M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  182|  78.4M|    H->v3 ^= H->v0;
  183|       |
  184|  78.4M|    H->v2 += H->v1;
  185|  78.4M|    H->v1 = SIP_ROTL(H->v1, 17);
  ------------------
  |  |  111|  78.4M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  186|  78.4M|    H->v1 ^= H->v2;
  187|  78.4M|    H->v2 = SIP_ROTL(H->v2, 32);
  ------------------
  |  |  111|  78.4M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  188|  78.4M|  }
  189|  39.1M|} /* sip_round() */
xml_parsebuffer_fuzzer.c:sip24_update:
  207|  19.2k|sip24_update(struct siphash *H, const void *src, size_t len) {
  208|  19.2k|  const unsigned char *p = (const unsigned char *)src, *pe = p + len;
  209|  19.2k|  uint64_t m;
  210|       |
  211|  39.1M|  do {
  212|   352M|    while (p < pe && H->p < sip_endof(H->buf))
  ------------------
  |  |  204|   352M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (212:12): [True: 352M, False: 19.2k]
  |  Branch (212:22): [True: 313M, False: 39.1M]
  ------------------
  213|   313M|      *H->p++ = *p++;
  214|       |
  215|  39.1M|    if (H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  39.1M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (215:9): [True: 15.6k, False: 39.1M]
  ------------------
  216|  15.6k|      break;
  217|       |
  218|  39.1M|    m = SIP_U8TO64_LE(H->buf);
  ------------------
  |  |  124|  39.1M|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  39.1M|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  39.1M|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  39.1M|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  219|  39.1M|    H->v3 ^= m;
  220|  39.1M|    sip_round(H, 2);
  221|  39.1M|    H->v0 ^= m;
  222|       |
  223|  39.1M|    H->p = H->buf;
  224|  39.1M|    H->c += 8;
  225|  39.1M|  } while (p < pe);
  ------------------
  |  Branch (225:12): [True: 39.1M, False: 3.59k]
  ------------------
  226|       |
  227|      0|  return H;
  228|  19.2k|} /* sip24_update() */
xml_parsebuffer_fuzzer.c:sip24_init:
  192|  19.2k|sip24_init(struct siphash *H, const struct sipkey *key) {
  193|  19.2k|  H->v0 = SIP_ULL(0x736f6d65U, 0x70736575U) ^ key->k[0];
  ------------------
  |  |  109|  19.2k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  194|  19.2k|  H->v1 = SIP_ULL(0x646f7261U, 0x6e646f6dU) ^ key->k[1];
  ------------------
  |  |  109|  19.2k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  195|  19.2k|  H->v2 = SIP_ULL(0x6c796765U, 0x6e657261U) ^ key->k[0];
  ------------------
  |  |  109|  19.2k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  196|  19.2k|  H->v3 = SIP_ULL(0x74656462U, 0x79746573U) ^ key->k[1];
  ------------------
  |  |  109|  19.2k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  197|       |
  198|  19.2k|  H->p = H->buf;
  199|  19.2k|  H->c = 0;
  200|       |
  201|  19.2k|  return H;
  202|  19.2k|} /* sip24_init() */
xmlparse.c:sip24_init:
  192|  8.13M|sip24_init(struct siphash *H, const struct sipkey *key) {
  193|  8.13M|  H->v0 = SIP_ULL(0x736f6d65U, 0x70736575U) ^ key->k[0];
  ------------------
  |  |  109|  8.13M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  194|  8.13M|  H->v1 = SIP_ULL(0x646f7261U, 0x6e646f6dU) ^ key->k[1];
  ------------------
  |  |  109|  8.13M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  195|  8.13M|  H->v2 = SIP_ULL(0x6c796765U, 0x6e657261U) ^ key->k[0];
  ------------------
  |  |  109|  8.13M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  196|  8.13M|  H->v3 = SIP_ULL(0x74656462U, 0x79746573U) ^ key->k[1];
  ------------------
  |  |  109|  8.13M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  197|       |
  198|  8.13M|  H->p = H->buf;
  199|  8.13M|  H->c = 0;
  200|       |
  201|  8.13M|  return H;
  202|  8.13M|} /* sip24_init() */
xmlparse.c:sip24_update:
  207|  8.13M|sip24_update(struct siphash *H, const void *src, size_t len) {
  208|  8.13M|  const unsigned char *p = (const unsigned char *)src, *pe = p + len;
  209|  8.13M|  uint64_t m;
  210|       |
  211|  9.10M|  do {
  212|  28.4M|    while (p < pe && H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  20.3M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (212:12): [True: 20.3M, False: 8.13M]
  |  Branch (212:22): [True: 19.3M, False: 966k]
  ------------------
  213|  19.3M|      *H->p++ = *p++;
  214|       |
  215|  9.10M|    if (H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  9.10M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (215:9): [True: 8.08M, False: 1.01M]
  ------------------
  216|  8.08M|      break;
  217|       |
  218|  1.01M|    m = SIP_U8TO64_LE(H->buf);
  ------------------
  |  |  124|  1.01M|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  1.01M|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  1.01M|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  1.01M|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  219|  1.01M|    H->v3 ^= m;
  220|  1.01M|    sip_round(H, 2);
  221|  1.01M|    H->v0 ^= m;
  222|       |
  223|  1.01M|    H->p = H->buf;
  224|  1.01M|    H->c += 8;
  225|  1.01M|  } while (p < pe);
  ------------------
  |  Branch (225:12): [True: 966k, False: 51.1k]
  ------------------
  226|       |
  227|      0|  return H;
  228|  8.13M|} /* sip24_update() */
xmlparse.c:sip_round:
  167|  17.2M|sip_round(struct siphash *H, const int rounds) {
  168|  17.2M|  int i;
  169|       |
  170|  68.1M|  for (i = 0; i < rounds; i++) {
  ------------------
  |  Branch (170:15): [True: 50.8M, False: 17.2M]
  ------------------
  171|  50.8M|    H->v0 += H->v1;
  172|  50.8M|    H->v1 = SIP_ROTL(H->v1, 13);
  ------------------
  |  |  111|  50.8M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  173|  50.8M|    H->v1 ^= H->v0;
  174|  50.8M|    H->v0 = SIP_ROTL(H->v0, 32);
  ------------------
  |  |  111|  50.8M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  175|       |
  176|  50.8M|    H->v2 += H->v3;
  177|  50.8M|    H->v3 = SIP_ROTL(H->v3, 16);
  ------------------
  |  |  111|  50.8M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  178|  50.8M|    H->v3 ^= H->v2;
  179|       |
  180|  50.8M|    H->v0 += H->v3;
  181|  50.8M|    H->v3 = SIP_ROTL(H->v3, 21);
  ------------------
  |  |  111|  50.8M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  182|  50.8M|    H->v3 ^= H->v0;
  183|       |
  184|  50.8M|    H->v2 += H->v1;
  185|  50.8M|    H->v1 = SIP_ROTL(H->v1, 17);
  ------------------
  |  |  111|  50.8M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  186|  50.8M|    H->v1 ^= H->v2;
  187|  50.8M|    H->v2 = SIP_ROTL(H->v2, 32);
  ------------------
  |  |  111|  50.8M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  188|  50.8M|  }
  189|  17.2M|} /* sip_round() */
xmlparse.c:sip24_final:
  231|  8.13M|sip24_final(struct siphash *H) {
  232|  8.13M|  const char left = (char)(H->p - H->buf);
  233|  8.13M|  uint64_t b = (H->c + left) << 56;
  234|       |
  235|  8.13M|  switch (left) {
  ------------------
  |  Branch (235:11): [True: 0, False: 8.13M]
  ------------------
  236|  38.6k|  case 7:
  ------------------
  |  Branch (236:3): [True: 38.6k, False: 8.09M]
  ------------------
  237|  38.6k|    b |= (uint64_t)H->buf[6] << 48;
  238|       |    /* fall through */
  239|   494k|  case 6:
  ------------------
  |  Branch (239:3): [True: 455k, False: 7.67M]
  ------------------
  240|   494k|    b |= (uint64_t)H->buf[5] << 40;
  241|       |    /* fall through */
  242|   507k|  case 5:
  ------------------
  |  Branch (242:3): [True: 13.0k, False: 8.12M]
  ------------------
  243|   507k|    b |= (uint64_t)H->buf[4] << 32;
  244|       |    /* fall through */
  245|   571k|  case 4:
  ------------------
  |  Branch (245:3): [True: 64.2k, False: 8.07M]
  ------------------
  246|   571k|    b |= (uint64_t)H->buf[3] << 24;
  247|       |    /* fall through */
  248|   697k|  case 3:
  ------------------
  |  Branch (248:3): [True: 126k, False: 8.00M]
  ------------------
  249|   697k|    b |= (uint64_t)H->buf[2] << 16;
  250|       |    /* fall through */
  251|   850k|  case 2:
  ------------------
  |  Branch (251:3): [True: 153k, False: 7.98M]
  ------------------
  252|   850k|    b |= (uint64_t)H->buf[1] << 8;
  253|       |    /* fall through */
  254|  8.08M|  case 1:
  ------------------
  |  Branch (254:3): [True: 7.23M, False: 902k]
  ------------------
  255|  8.08M|    b |= (uint64_t)H->buf[0] << 0;
  256|       |    /* fall through */
  257|  8.13M|  case 0:
  ------------------
  |  Branch (257:3): [True: 51.4k, False: 8.08M]
  ------------------
  258|  8.13M|    break;
  259|  8.13M|  }
  260|       |
  261|  8.13M|  H->v3 ^= b;
  262|  8.13M|  sip_round(H, 2);
  263|  8.13M|  H->v0 ^= b;
  264|  8.13M|  H->v2 ^= 0xff;
  265|  8.13M|  sip_round(H, 4);
  266|       |
  267|  8.13M|  return H->v0 ^ H->v1 ^ H->v2 ^ H->v3;
  268|  8.13M|} /* sip24_final() */

XML_ParserCreate:
  718|  19.2k|XML_ParserCreate(const XML_Char *encodingName) {
  719|  19.2k|  return XML_ParserCreate_MM(encodingName, NULL, NULL);
  720|  19.2k|}
XML_ParserCreate_MM:
  969|  19.2k|                    const XML_Char *nameSep) {
  970|  19.2k|  return parserCreate(encodingName, memsuite, nameSep, NULL);
  971|  19.2k|}
XML_ParserFree:
 1440|  19.2k|XML_ParserFree(XML_Parser parser) {
 1441|  19.2k|  TAG *tagList;
 1442|  19.2k|  OPEN_INTERNAL_ENTITY *entityList;
 1443|  19.2k|  if (parser == NULL)
  ------------------
  |  Branch (1443:7): [True: 0, False: 19.2k]
  ------------------
 1444|      0|    return;
 1445|       |  /* free m_tagStack and m_freeTagList */
 1446|  19.2k|  tagList = parser->m_tagStack;
 1447|  3.84M|  for (;;) {
 1448|  3.84M|    TAG *p;
 1449|  3.84M|    if (tagList == NULL) {
  ------------------
  |  Branch (1449:9): [True: 19.4k, False: 3.82M]
  ------------------
 1450|  19.4k|      if (parser->m_freeTagList == NULL)
  ------------------
  |  Branch (1450:11): [True: 19.2k, False: 283]
  ------------------
 1451|  19.2k|        break;
 1452|    283|      tagList = parser->m_freeTagList;
 1453|    283|      parser->m_freeTagList = NULL;
 1454|    283|    }
 1455|  3.82M|    p = tagList;
 1456|  3.82M|    tagList = tagList->parent;
 1457|  3.82M|    FREE(parser, p->buf);
  ------------------
  |  |  715|  3.82M|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1458|  3.82M|    destroyBindings(p->bindings, parser);
 1459|  3.82M|    FREE(parser, p);
  ------------------
  |  |  715|  3.82M|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1460|  3.82M|  }
 1461|       |  /* free m_openInternalEntities and m_freeInternalEntities */
 1462|  19.2k|  entityList = parser->m_openInternalEntities;
 1463|  21.1k|  for (;;) {
 1464|  21.1k|    OPEN_INTERNAL_ENTITY *openEntity;
 1465|  21.1k|    if (entityList == NULL) {
  ------------------
  |  Branch (1465:9): [True: 19.8k, False: 1.33k]
  ------------------
 1466|  19.8k|      if (parser->m_freeInternalEntities == NULL)
  ------------------
  |  Branch (1466:11): [True: 19.2k, False: 640]
  ------------------
 1467|  19.2k|        break;
 1468|    640|      entityList = parser->m_freeInternalEntities;
 1469|    640|      parser->m_freeInternalEntities = NULL;
 1470|    640|    }
 1471|  1.97k|    openEntity = entityList;
 1472|  1.97k|    entityList = entityList->next;
 1473|  1.97k|    FREE(parser, openEntity);
  ------------------
  |  |  715|  1.97k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1474|  1.97k|  }
 1475|       |
 1476|  19.2k|  destroyBindings(parser->m_freeBindingList, parser);
 1477|  19.2k|  destroyBindings(parser->m_inheritedBindings, parser);
 1478|  19.2k|  poolDestroy(&parser->m_tempPool);
 1479|  19.2k|  poolDestroy(&parser->m_temp2Pool);
 1480|  19.2k|  FREE(parser, (void *)parser->m_protocolEncodingName);
  ------------------
  |  |  715|  19.2k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1481|  19.2k|#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.2k|  if (! parser->m_isParamEntity && parser->m_dtd)
  ------------------
  |  Branch (1485:7): [True: 19.2k, False: 0]
  |  Branch (1485:36): [True: 19.2k, False: 0]
  ------------------
 1486|       |#else
 1487|       |  if (parser->m_dtd)
 1488|       |#endif /* XML_DTD */
 1489|  19.2k|    dtdDestroy(parser->m_dtd, (XML_Bool)! parser->m_parentParser,
 1490|  19.2k|               &parser->m_mem);
 1491|  19.2k|  FREE(parser, (void *)parser->m_atts);
  ------------------
  |  |  715|  19.2k|#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.2k|  FREE(parser, parser->m_groupConnector);
  ------------------
  |  |  715|  19.2k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1496|  19.2k|  FREE(parser, parser->m_buffer);
  ------------------
  |  |  715|  19.2k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1497|  19.2k|  FREE(parser, parser->m_dataBuf);
  ------------------
  |  |  715|  19.2k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1498|  19.2k|  FREE(parser, parser->m_nsAtts);
  ------------------
  |  |  715|  19.2k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1499|  19.2k|  FREE(parser, parser->m_unknownEncodingMem);
  ------------------
  |  |  715|  19.2k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1500|  19.2k|  if (parser->m_unknownEncodingRelease)
  ------------------
  |  Branch (1500:7): [True: 0, False: 19.2k]
  ------------------
 1501|      0|    parser->m_unknownEncodingRelease(parser->m_unknownEncodingData);
 1502|  19.2k|  FREE(parser, parser);
  ------------------
  |  |  715|  19.2k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1503|  19.2k|}
XML_SetElementHandler:
 1595|  19.2k|                      XML_EndElementHandler end) {
 1596|  19.2k|  if (parser == NULL)
  ------------------
  |  Branch (1596:7): [True: 0, False: 19.2k]
  ------------------
 1597|      0|    return;
 1598|  19.2k|  parser->m_startElementHandler = start;
 1599|  19.2k|  parser->m_endElementHandler = end;
 1600|  19.2k|}
XML_SetHashSalt:
 1815|  19.2k|XML_SetHashSalt(XML_Parser parser, unsigned long hash_salt) {
 1816|  19.2k|  if (parser == NULL)
  ------------------
  |  Branch (1816:7): [True: 0, False: 19.2k]
  ------------------
 1817|      0|    return 0;
 1818|  19.2k|  if (parser->m_parentParser)
  ------------------
  |  Branch (1818:7): [True: 0, False: 19.2k]
  ------------------
 1819|      0|    return XML_SetHashSalt(parser->m_parentParser, hash_salt);
 1820|       |  /* block after XML_Parse()/XML_ParseBuffer() has been called */
 1821|  19.2k|  if (parser->m_parsingStatus.parsing == XML_PARSING
  ------------------
  |  Branch (1821:7): [True: 0, False: 19.2k]
  ------------------
 1822|  19.2k|      || parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (1822:10): [True: 0, False: 19.2k]
  ------------------
 1823|      0|    return 0;
 1824|  19.2k|  parser->m_hash_secret_salt = hash_salt;
 1825|  19.2k|  return 1;
 1826|  19.2k|}
XML_ParseBuffer:
 1983|  19.2k|XML_ParseBuffer(XML_Parser parser, int len, int isFinal) {
 1984|  19.2k|  const char *start;
 1985|  19.2k|  enum XML_Status result = XML_STATUS_OK;
  ------------------
  |  |   75|  19.2k|#define XML_STATUS_OK XML_STATUS_OK
  ------------------
 1986|       |
 1987|  19.2k|  if (parser == NULL)
  ------------------
  |  Branch (1987:7): [True: 0, False: 19.2k]
  ------------------
 1988|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1989|  19.2k|  switch (parser->m_parsingStatus.parsing) {
 1990|      0|  case XML_SUSPENDED:
  ------------------
  |  Branch (1990:3): [True: 0, False: 19.2k]
  ------------------
 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.2k]
  ------------------
 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.2k|  case XML_INITIALIZED:
  ------------------
  |  Branch (1996:3): [True: 19.2k, False: 0]
  ------------------
 1997|       |    /* Has someone called XML_GetBuffer successfully before? */
 1998|  19.2k|    if (! parser->m_bufferPtr) {
  ------------------
  |  Branch (1998:9): [True: 0, False: 19.2k]
  ------------------
 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.2k|    if (parser->m_parentParser == NULL && ! startParsing(parser)) {
  ------------------
  |  Branch (2003:9): [True: 19.2k, False: 0]
  |  Branch (2003:43): [True: 0, False: 19.2k]
  ------------------
 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.2k|  default:
  ------------------
  |  Branch (2008:3): [True: 0, False: 19.2k]
  ------------------
 2009|  19.2k|    parser->m_parsingStatus.parsing = XML_PARSING;
 2010|  19.2k|  }
 2011|       |
 2012|  19.2k|  start = parser->m_bufferPtr;
 2013|  19.2k|  parser->m_positionPtr = start;
 2014|  19.2k|  parser->m_bufferEnd += len;
 2015|  19.2k|  parser->m_parseEndPtr = parser->m_bufferEnd;
 2016|  19.2k|  parser->m_parseEndByteIndex += len;
 2017|  19.2k|  parser->m_parsingStatus.finalBuffer = (XML_Bool)isFinal;
 2018|       |
 2019|  19.2k|  parser->m_errorCode = parser->m_processor(
 2020|  19.2k|      parser, start, parser->m_parseEndPtr, &parser->m_bufferPtr);
 2021|       |
 2022|  19.2k|  if (parser->m_errorCode != XML_ERROR_NONE) {
  ------------------
  |  Branch (2022:7): [True: 7.89k, False: 11.3k]
  ------------------
 2023|  7.89k|    parser->m_eventEndPtr = parser->m_eventPtr;
 2024|  7.89k|    parser->m_processor = errorProcessor;
 2025|  7.89k|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|  7.89k|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2026|  11.3k|  } else {
 2027|  11.3k|    switch (parser->m_parsingStatus.parsing) {
 2028|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (2028:5): [True: 0, False: 11.3k]
  ------------------
 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.3k]
  ------------------
 2032|  11.3k|    case XML_PARSING:
  ------------------
  |  Branch (2032:5): [True: 11.3k, False: 0]
  ------------------
 2033|  11.3k|      if (isFinal) {
  ------------------
  |  Branch (2033:11): [True: 0, False: 11.3k]
  ------------------
 2034|      0|        parser->m_parsingStatus.parsing = XML_FINISHED;
 2035|      0|        return result;
 2036|      0|      }
 2037|  11.3k|    default:; /* should not happen */
  ------------------
  |  Branch (2037:5): [True: 0, False: 11.3k]
  ------------------
 2038|  11.3k|    }
 2039|  11.3k|  }
 2040|       |
 2041|  11.3k|  XmlUpdatePosition(parser->m_encoding, parser->m_positionPtr,
  ------------------
  |  |  270|  11.3k|  (((enc)->updatePosition)(enc, ptr, end, pos))
  ------------------
 2042|  11.3k|                    parser->m_bufferPtr, &parser->m_position);
 2043|  11.3k|  parser->m_positionPtr = parser->m_bufferPtr;
 2044|  11.3k|  return result;
 2045|  19.2k|}
XML_GetBuffer:
 2048|  19.2k|XML_GetBuffer(XML_Parser parser, int len) {
 2049|  19.2k|  if (parser == NULL)
  ------------------
  |  Branch (2049:7): [True: 0, False: 19.2k]
  ------------------
 2050|      0|    return NULL;
 2051|  19.2k|  if (len < 0) {
  ------------------
  |  Branch (2051:7): [True: 0, False: 19.2k]
  ------------------
 2052|      0|    parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2053|      0|    return NULL;
 2054|      0|  }
 2055|  19.2k|  switch (parser->m_parsingStatus.parsing) {
 2056|      0|  case XML_SUSPENDED:
  ------------------
  |  Branch (2056:3): [True: 0, False: 19.2k]
  ------------------
 2057|      0|    parser->m_errorCode = XML_ERROR_SUSPENDED;
 2058|      0|    return NULL;
 2059|      0|  case XML_FINISHED:
  ------------------
  |  Branch (2059:3): [True: 0, False: 19.2k]
  ------------------
 2060|      0|    parser->m_errorCode = XML_ERROR_FINISHED;
 2061|      0|    return NULL;
 2062|  19.2k|  default:;
  ------------------
  |  Branch (2062:3): [True: 19.2k, False: 0]
  ------------------
 2063|  19.2k|  }
 2064|       |
 2065|  19.2k|  if (len > EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_bufferEnd)) {
  ------------------
  |  |  199|  19.2k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 19.2k]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2065:7): [True: 19.2k, False: 0]
  ------------------
 2066|  19.2k|#ifdef XML_CONTEXT_BYTES
 2067|  19.2k|    int keep;
 2068|  19.2k|#endif /* defined XML_CONTEXT_BYTES */
 2069|       |    /* Do not invoke signed arithmetic overflow: */
 2070|  19.2k|    int neededSize = (int)((unsigned)len
 2071|  19.2k|                           + (unsigned)EXPAT_SAFE_PTR_DIFF(
  ------------------
  |  |  199|  19.2k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 19.2k]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2072|  19.2k|                               parser->m_bufferEnd, parser->m_bufferPtr));
 2073|  19.2k|    if (neededSize < 0) {
  ------------------
  |  Branch (2073:9): [True: 0, False: 19.2k]
  ------------------
 2074|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2075|      0|      return NULL;
 2076|      0|    }
 2077|  19.2k|#ifdef XML_CONTEXT_BYTES
 2078|  19.2k|    keep = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer);
  ------------------
  |  |  199|  19.2k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 19.2k]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2079|  19.2k|    if (keep > XML_CONTEXT_BYTES)
  ------------------
  |  |   96|  19.2k|#define XML_CONTEXT_BYTES 1024
  ------------------
  |  Branch (2079:9): [True: 0, False: 19.2k]
  ------------------
 2080|      0|      keep = XML_CONTEXT_BYTES;
  ------------------
  |  |   96|      0|#define XML_CONTEXT_BYTES 1024
  ------------------
 2081|       |    /* Detect and prevent integer overflow */
 2082|  19.2k|    if (keep > INT_MAX - neededSize) {
  ------------------
  |  Branch (2082:9): [True: 0, False: 19.2k]
  ------------------
 2083|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2084|      0|      return NULL;
 2085|      0|    }
 2086|  19.2k|    neededSize += keep;
 2087|  19.2k|#endif /* defined XML_CONTEXT_BYTES */
 2088|  19.2k|    if (neededSize
  ------------------
  |  Branch (2088:9): [True: 0, False: 19.2k]
  ------------------
 2089|  19.2k|        <= EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_buffer)) {
  ------------------
  |  |  199|  19.2k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 19.2k]
  |  |  |  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.2k|    } else {
 2113|  19.2k|      char *newBuf;
 2114|  19.2k|      int bufferSize
 2115|  19.2k|          = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_bufferPtr);
  ------------------
  |  |  199|  19.2k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (199:37): [True: 0, False: 19.2k]
  |  |  |  Branch (199:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2116|  19.2k|      if (bufferSize == 0)
  ------------------
  |  Branch (2116:11): [True: 19.2k, False: 0]
  ------------------
 2117|  19.2k|        bufferSize = INIT_BUFFER_SIZE;
  ------------------
  |  |  246|  19.2k|#define INIT_BUFFER_SIZE 1024
  ------------------
 2118|  30.0k|      do {
 2119|       |        /* Do not invoke signed arithmetic overflow: */
 2120|  30.0k|        bufferSize = (int)(2U * (unsigned)bufferSize);
 2121|  30.0k|      } while (bufferSize < neededSize && bufferSize > 0);
  ------------------
  |  Branch (2121:16): [True: 10.8k, False: 19.2k]
  |  Branch (2121:43): [True: 10.8k, False: 0]
  ------------------
 2122|  19.2k|      if (bufferSize <= 0) {
  ------------------
  |  Branch (2122:11): [True: 0, False: 19.2k]
  ------------------
 2123|      0|        parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2124|      0|        return NULL;
 2125|      0|      }
 2126|  19.2k|      newBuf = (char *)MALLOC(parser, bufferSize);
  ------------------
  |  |  713|  19.2k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2127|  19.2k|      if (newBuf == 0) {
  ------------------
  |  Branch (2127:11): [True: 0, False: 19.2k]
  ------------------
 2128|      0|        parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2129|      0|        return NULL;
 2130|      0|      }
 2131|  19.2k|      parser->m_bufferLim = newBuf + bufferSize;
 2132|  19.2k|#ifdef XML_CONTEXT_BYTES
 2133|  19.2k|      if (parser->m_bufferPtr) {
  ------------------
  |  Branch (2133:11): [True: 0, False: 19.2k]
  ------------------
 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.2k|      } else {
 2145|       |        /* This must be a brand new buffer with no data in it yet */
 2146|  19.2k|        parser->m_bufferEnd = newBuf;
 2147|  19.2k|        parser->m_bufferPtr = parser->m_buffer = newBuf;
 2148|  19.2k|      }
 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.2k|    }
 2164|  19.2k|    parser->m_eventPtr = parser->m_eventEndPtr = NULL;
 2165|  19.2k|    parser->m_positionPtr = NULL;
 2166|  19.2k|  }
 2167|  19.2k|  return parser->m_bufferEnd;
 2168|  19.2k|}
xmlparse.c:parserCreate:
  976|  19.2k|             DTD *dtd) {
  977|  19.2k|  XML_Parser parser;
  978|       |
  979|  19.2k|  if (memsuite) {
  ------------------
  |  Branch (979:7): [True: 0, False: 19.2k]
  ------------------
  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.2k|  } else {
  989|  19.2k|    XML_Memory_Handling_Suite *mtemp;
  990|  19.2k|    parser = (XML_Parser)malloc(sizeof(struct XML_ParserStruct));
  991|  19.2k|    if (parser != NULL) {
  ------------------
  |  Branch (991:9): [True: 19.2k, False: 0]
  ------------------
  992|  19.2k|      mtemp = (XML_Memory_Handling_Suite *)&(parser->m_mem);
  993|  19.2k|      mtemp->malloc_fcn = malloc;
  994|  19.2k|      mtemp->realloc_fcn = realloc;
  995|  19.2k|      mtemp->free_fcn = free;
  996|  19.2k|    }
  997|  19.2k|  }
  998|       |
  999|  19.2k|  if (! parser)
  ------------------
  |  Branch (999:7): [True: 0, False: 19.2k]
  ------------------
 1000|      0|    return parser;
 1001|       |
 1002|  19.2k|  parser->m_buffer = NULL;
 1003|  19.2k|  parser->m_bufferLim = NULL;
 1004|       |
 1005|  19.2k|  parser->m_attsSize = INIT_ATTS_SIZE;
  ------------------
  |  |  243|  19.2k|#define INIT_ATTS_SIZE 16
  ------------------
 1006|  19.2k|  parser->m_atts
 1007|  19.2k|      = (ATTRIBUTE *)MALLOC(parser, parser->m_attsSize * sizeof(ATTRIBUTE));
  ------------------
  |  |  713|  19.2k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 1008|  19.2k|  if (parser->m_atts == NULL) {
  ------------------
  |  Branch (1008:7): [True: 0, False: 19.2k]
  ------------------
 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.2k|  parser->m_dataBuf
 1022|  19.2k|      = (XML_Char *)MALLOC(parser, INIT_DATA_BUF_SIZE * sizeof(XML_Char));
  ------------------
  |  |  713|  19.2k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 1023|  19.2k|  if (parser->m_dataBuf == NULL) {
  ------------------
  |  Branch (1023:7): [True: 0, False: 19.2k]
  ------------------
 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.2k|  parser->m_dataBufEnd = parser->m_dataBuf + INIT_DATA_BUF_SIZE;
  ------------------
  |  |  242|  19.2k|#define INIT_DATA_BUF_SIZE 1024
  ------------------
 1032|       |
 1033|  19.2k|  if (dtd)
  ------------------
  |  Branch (1033:7): [True: 0, False: 19.2k]
  ------------------
 1034|      0|    parser->m_dtd = dtd;
 1035|  19.2k|  else {
 1036|  19.2k|    parser->m_dtd = dtdCreate(&parser->m_mem);
 1037|  19.2k|    if (parser->m_dtd == NULL) {
  ------------------
  |  Branch (1037:9): [True: 0, False: 19.2k]
  ------------------
 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.2k|  }
 1047|       |
 1048|  19.2k|  parser->m_freeBindingList = NULL;
 1049|  19.2k|  parser->m_freeTagList = NULL;
 1050|  19.2k|  parser->m_freeInternalEntities = NULL;
 1051|       |
 1052|  19.2k|  parser->m_groupSize = 0;
 1053|  19.2k|  parser->m_groupConnector = NULL;
 1054|       |
 1055|  19.2k|  parser->m_unknownEncodingHandler = NULL;
 1056|  19.2k|  parser->m_unknownEncodingHandlerData = NULL;
 1057|       |
 1058|  19.2k|  parser->m_namespaceSeparator = ASCII_EXCL;
  ------------------
  |  |  103|  19.2k|#define ASCII_EXCL 0x21
  ------------------
 1059|  19.2k|  parser->m_ns = XML_FALSE;
  ------------------
  |  |   56|  19.2k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1060|  19.2k|  parser->m_ns_triplets = XML_FALSE;
  ------------------
  |  |   56|  19.2k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1061|       |
 1062|  19.2k|  parser->m_nsAtts = NULL;
 1063|  19.2k|  parser->m_nsAttsVersion = 0;
 1064|  19.2k|  parser->m_nsAttsPower = 0;
 1065|       |
 1066|  19.2k|  parser->m_protocolEncodingName = NULL;
 1067|       |
 1068|  19.2k|  poolInit(&parser->m_tempPool, &(parser->m_mem));
 1069|  19.2k|  poolInit(&parser->m_temp2Pool, &(parser->m_mem));
 1070|  19.2k|  parserInit(parser, encodingName);
 1071|       |
 1072|  19.2k|  if (encodingName && ! parser->m_protocolEncodingName) {
  ------------------
  |  Branch (1072:7): [True: 19.2k, False: 0]
  |  Branch (1072:23): [True: 0, False: 19.2k]
  ------------------
 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.2k|  if (nameSep) {
  ------------------
  |  Branch (1085:7): [True: 0, False: 19.2k]
  ------------------
 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.2k|  } else {
 1090|  19.2k|    parser->m_internalEncoding = XmlGetInternalEncoding();
  ------------------
  |  |  161|  19.2k|#  define XmlGetInternalEncoding XmlGetUtf8InternalEncoding
  ------------------
 1091|  19.2k|  }
 1092|       |
 1093|  19.2k|  return parser;
 1094|  19.2k|}
xmlparse.c:dtdCreate:
 6715|  19.2k|dtdCreate(const XML_Memory_Handling_Suite *ms) {
 6716|  19.2k|  DTD *p = ms->malloc_fcn(sizeof(DTD));
 6717|  19.2k|  if (p == NULL)
  ------------------
  |  Branch (6717:7): [True: 0, False: 19.2k]
  ------------------
 6718|      0|    return p;
 6719|  19.2k|  poolInit(&(p->pool), ms);
 6720|  19.2k|  poolInit(&(p->entityValuePool), ms);
 6721|  19.2k|  hashTableInit(&(p->generalEntities), ms);
 6722|  19.2k|  hashTableInit(&(p->elementTypes), ms);
 6723|  19.2k|  hashTableInit(&(p->attributeIds), ms);
 6724|  19.2k|  hashTableInit(&(p->prefixes), ms);
 6725|  19.2k|#ifdef XML_DTD
 6726|  19.2k|  p->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|  19.2k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6727|  19.2k|  hashTableInit(&(p->paramEntities), ms);
 6728|  19.2k|#endif /* XML_DTD */
 6729|  19.2k|  p->defaultPrefix.name = NULL;
 6730|  19.2k|  p->defaultPrefix.binding = NULL;
 6731|       |
 6732|  19.2k|  p->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|  19.2k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6733|  19.2k|  p->scaffIndex = NULL;
 6734|  19.2k|  p->scaffold = NULL;
 6735|  19.2k|  p->scaffLevel = 0;
 6736|  19.2k|  p->scaffSize = 0;
 6737|  19.2k|  p->scaffCount = 0;
 6738|  19.2k|  p->contentStringLen = 0;
 6739|       |
 6740|  19.2k|  p->keepProcessing = XML_TRUE;
  ------------------
  |  |   55|  19.2k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6741|  19.2k|  p->hasParamEntityRefs = XML_FALSE;
  ------------------
  |  |   56|  19.2k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6742|  19.2k|  p->standalone = XML_FALSE;
  ------------------
  |  |   56|  19.2k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6743|  19.2k|  return p;
 6744|  19.2k|}
xmlparse.c:hashTableInit:
 7149|  96.0k|hashTableInit(HASH_TABLE *p, const XML_Memory_Handling_Suite *ms) {
 7150|  96.0k|  p->power = 0;
 7151|  96.0k|  p->size = 0;
 7152|  96.0k|  p->used = 0;
 7153|  96.0k|  p->v = NULL;
 7154|  96.0k|  p->mem = ms;
 7155|  96.0k|}
xmlparse.c:poolInit:
 7174|  76.8k|poolInit(STRING_POOL *pool, const XML_Memory_Handling_Suite *ms) {
 7175|  76.8k|  pool->blocks = NULL;
 7176|  76.8k|  pool->freeBlocks = NULL;
 7177|  76.8k|  pool->start = NULL;
 7178|  76.8k|  pool->ptr = NULL;
 7179|  76.8k|  pool->end = NULL;
 7180|  76.8k|  pool->mem = ms;
 7181|  76.8k|}
xmlparse.c:parserInit:
 1097|  19.2k|parserInit(XML_Parser parser, const XML_Char *encodingName) {
 1098|  19.2k|  parser->m_processor = prologInitProcessor;
 1099|  19.2k|  XmlPrologStateInit(&parser->m_prologState);
 1100|  19.2k|  if (encodingName != NULL) {
  ------------------
  |  Branch (1100:7): [True: 19.2k, False: 0]
  ------------------
 1101|  19.2k|    parser->m_protocolEncodingName = copyString(encodingName, &(parser->m_mem));
 1102|  19.2k|  }
 1103|  19.2k|  parser->m_curBase = NULL;
 1104|  19.2k|  XmlInitEncoding(&parser->m_initEncoding, &parser->m_encoding, 0);
 1105|  19.2k|  parser->m_userData = NULL;
 1106|  19.2k|  parser->m_handlerArg = NULL;
 1107|  19.2k|  parser->m_startElementHandler = NULL;
 1108|  19.2k|  parser->m_endElementHandler = NULL;
 1109|  19.2k|  parser->m_characterDataHandler = NULL;
 1110|  19.2k|  parser->m_processingInstructionHandler = NULL;
 1111|  19.2k|  parser->m_commentHandler = NULL;
 1112|  19.2k|  parser->m_startCdataSectionHandler = NULL;
 1113|  19.2k|  parser->m_endCdataSectionHandler = NULL;
 1114|  19.2k|  parser->m_defaultHandler = NULL;
 1115|  19.2k|  parser->m_startDoctypeDeclHandler = NULL;
 1116|  19.2k|  parser->m_endDoctypeDeclHandler = NULL;
 1117|  19.2k|  parser->m_unparsedEntityDeclHandler = NULL;
 1118|  19.2k|  parser->m_notationDeclHandler = NULL;
 1119|  19.2k|  parser->m_startNamespaceDeclHandler = NULL;
 1120|  19.2k|  parser->m_endNamespaceDeclHandler = NULL;
 1121|  19.2k|  parser->m_notStandaloneHandler = NULL;
 1122|  19.2k|  parser->m_externalEntityRefHandler = NULL;
 1123|  19.2k|  parser->m_externalEntityRefHandlerArg = parser;
 1124|  19.2k|  parser->m_skippedEntityHandler = NULL;
 1125|  19.2k|  parser->m_elementDeclHandler = NULL;
 1126|  19.2k|  parser->m_attlistDeclHandler = NULL;
 1127|  19.2k|  parser->m_entityDeclHandler = NULL;
 1128|  19.2k|  parser->m_xmlDeclHandler = NULL;
 1129|  19.2k|  parser->m_bufferPtr = parser->m_buffer;
 1130|  19.2k|  parser->m_bufferEnd = parser->m_buffer;
 1131|  19.2k|  parser->m_parseEndByteIndex = 0;
 1132|  19.2k|  parser->m_parseEndPtr = NULL;
 1133|  19.2k|  parser->m_declElementType = NULL;
 1134|  19.2k|  parser->m_declAttributeId = NULL;
 1135|  19.2k|  parser->m_declEntity = NULL;
 1136|  19.2k|  parser->m_doctypeName = NULL;
 1137|  19.2k|  parser->m_doctypeSysid = NULL;
 1138|  19.2k|  parser->m_doctypePubid = NULL;
 1139|  19.2k|  parser->m_declAttributeType = NULL;
 1140|  19.2k|  parser->m_declNotationName = NULL;
 1141|  19.2k|  parser->m_declNotationPublicId = NULL;
 1142|  19.2k|  parser->m_declAttributeIsCdata = XML_FALSE;
  ------------------
  |  |   56|  19.2k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1143|  19.2k|  parser->m_declAttributeIsId = XML_FALSE;
  ------------------
  |  |   56|  19.2k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1144|  19.2k|  memset(&parser->m_position, 0, sizeof(POSITION));
 1145|  19.2k|  parser->m_errorCode = XML_ERROR_NONE;
 1146|  19.2k|  parser->m_eventPtr = NULL;
 1147|  19.2k|  parser->m_eventEndPtr = NULL;
 1148|  19.2k|  parser->m_positionPtr = NULL;
 1149|  19.2k|  parser->m_openInternalEntities = NULL;
 1150|  19.2k|  parser->m_defaultExpandInternalEntities = XML_TRUE;
  ------------------
  |  |   55|  19.2k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 1151|  19.2k|  parser->m_tagLevel = 0;
 1152|  19.2k|  parser->m_tagStack = NULL;
 1153|  19.2k|  parser->m_inheritedBindings = NULL;
 1154|  19.2k|  parser->m_nSpecifiedAtts = 0;
 1155|  19.2k|  parser->m_unknownEncodingMem = NULL;
 1156|  19.2k|  parser->m_unknownEncodingRelease = NULL;
 1157|  19.2k|  parser->m_unknownEncodingData = NULL;
 1158|  19.2k|  parser->m_parentParser = NULL;
 1159|  19.2k|  parser->m_parsingStatus.parsing = XML_INITIALIZED;
 1160|  19.2k|#ifdef XML_DTD
 1161|  19.2k|  parser->m_isParamEntity = XML_FALSE;
  ------------------
  |  |   56|  19.2k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1162|  19.2k|  parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|  19.2k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1163|  19.2k|  parser->m_paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER;
 1164|  19.2k|#endif
 1165|  19.2k|  parser->m_hash_secret_salt = 0;
 1166|       |
 1167|  19.2k|#ifdef XML_DTD
 1168|  19.2k|  memset(&parser->m_accounting, 0, sizeof(ACCOUNTING));
 1169|  19.2k|  parser->m_accounting.debugLevel = getDebugLevel("EXPAT_ACCOUNTING_DEBUG", 0u);
 1170|  19.2k|  parser->m_accounting.maximumAmplificationFactor
 1171|  19.2k|      = EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_MAXIMUM_AMPLIFICATION_DEFAULT;
  ------------------
  |  |  143|  19.2k|  100.0f
  ------------------
 1172|  19.2k|  parser->m_accounting.activationThresholdBytes
 1173|  19.2k|      = EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_ACTIVATION_THRESHOLD_DEFAULT;
  ------------------
  |  |  145|  19.2k|  8388608 // 8 MiB, 2^23
  ------------------
 1174|       |
 1175|  19.2k|  memset(&parser->m_entity_stats, 0, sizeof(ENTITY_STATS));
 1176|  19.2k|  parser->m_entity_stats.debugLevel = getDebugLevel("EXPAT_ENTITY_DEBUG", 0u);
 1177|  19.2k|#endif
 1178|  19.2k|}
xmlparse.c:prologInitProcessor:
 4405|  19.2k|                    const char **nextPtr) {
 4406|  19.2k|  enum XML_Error result = initializeEncoding(parser);
 4407|  19.2k|  if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4407:7): [True: 0, False: 19.2k]
  ------------------
 4408|      0|    return result;
 4409|  19.2k|  parser->m_processor = prologProcessor;
 4410|  19.2k|  return prologProcessor(parser, s, end, nextPtr);
 4411|  19.2k|}
xmlparse.c:initializeEncoding:
 4248|  19.2k|initializeEncoding(XML_Parser parser) {
 4249|  19.2k|  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.2k|  s = parser->m_protocolEncodingName;
 4270|  19.2k|#endif
 4271|  19.2k|  if ((parser->m_ns ? XmlInitEncodingNS : XmlInitEncoding)(
  ------------------
  |  Branch (4271:7): [True: 19.2k, False: 0]
  |  Branch (4271:8): [True: 0, False: 19.2k]
  ------------------
 4272|  19.2k|          &parser->m_initEncoding, &parser->m_encoding, s))
 4273|  19.2k|    return XML_ERROR_NONE;
 4274|      0|  return handleUnknownEncoding(parser, parser->m_protocolEncodingName);
 4275|  19.2k|}
xmlparse.c:prologProcessor:
 4605|  19.2k|                const char **nextPtr) {
 4606|  19.2k|  const char *next = s;
 4607|  19.2k|  int tok = XmlPrologTok(parser->m_encoding, s, end, &next);
  ------------------
  |  |  227|  19.2k|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  19.2k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 4608|  19.2k|  return doProlog(parser, parser->m_encoding, s, end, tok, next, nextPtr,
 4609|  19.2k|                  (XML_Bool)! parser->m_parsingStatus.finalBuffer, XML_TRUE,
  ------------------
  |  |   55|  19.2k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4610|  19.2k|                  XML_ACCOUNT_DIRECT);
 4611|  19.2k|}
xmlparse.c:doProlog:
 4616|  19.2k|         XML_Bool allowClosingDoctype, enum XML_Account account) {
 4617|  19.2k|#ifdef XML_DTD
 4618|  19.2k|  static const XML_Char externalSubsetName[] = {ASCII_HASH, '\0'};
  ------------------
  |  |  121|  19.2k|#define ASCII_HASH 0x23
  ------------------
 4619|  19.2k|#endif /* XML_DTD */
 4620|  19.2k|  static const XML_Char atypeCDATA[]
 4621|  19.2k|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   38|  19.2k|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   39|  19.2k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   36|  19.2k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   55|  19.2k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   36|  19.2k|#define ASCII_A 0x41
  ------------------
 4622|  19.2k|  static const XML_Char atypeID[] = {ASCII_I, ASCII_D, '\0'};
  ------------------
  |  |   44|  19.2k|#define ASCII_I 0x49
  ------------------
                static const XML_Char atypeID[] = {ASCII_I, ASCII_D, '\0'};
  ------------------
  |  |   39|  19.2k|#define ASCII_D 0x44
  ------------------
 4623|  19.2k|  static const XML_Char atypeIDREF[]
 4624|  19.2k|      = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   44|  19.2k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   39|  19.2k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   53|  19.2k|#define ASCII_R 0x52
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   40|  19.2k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   41|  19.2k|#define ASCII_F 0x46
  ------------------
 4625|  19.2k|  static const XML_Char atypeIDREFS[]
 4626|  19.2k|      = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   44|  19.2k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   39|  19.2k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   53|  19.2k|#define ASCII_R 0x52
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   40|  19.2k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   41|  19.2k|#define ASCII_F 0x46
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   54|  19.2k|#define ASCII_S 0x53
  ------------------
 4627|  19.2k|  static const XML_Char atypeENTITY[]
 4628|  19.2k|      = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   40|  19.2k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   49|  19.2k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   55|  19.2k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   44|  19.2k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   55|  19.2k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   60|  19.2k|#define ASCII_Y 0x59
  ------------------
 4629|  19.2k|  static const XML_Char atypeENTITIES[]
 4630|  19.2k|      = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   40|  19.2k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   49|  19.2k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   55|  19.2k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   44|  19.2k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   55|  19.2k|#define ASCII_T 0x54
  ------------------
 4631|  19.2k|         ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   44|  19.2k|#define ASCII_I 0x49
  ------------------
                       ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   40|  19.2k|#define ASCII_E 0x45
  ------------------
                       ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   54|  19.2k|#define ASCII_S 0x53
  ------------------
 4632|  19.2k|  static const XML_Char atypeNMTOKEN[]
 4633|  19.2k|      = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   49|  19.2k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   48|  19.2k|#define ASCII_M 0x4D
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   55|  19.2k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   50|  19.2k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   46|  19.2k|#define ASCII_K 0x4B
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   40|  19.2k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   49|  19.2k|#define ASCII_N 0x4E
  ------------------
 4634|  19.2k|  static const XML_Char atypeNMTOKENS[]
 4635|  19.2k|      = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   49|  19.2k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   48|  19.2k|#define ASCII_M 0x4D
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   55|  19.2k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   50|  19.2k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   46|  19.2k|#define ASCII_K 0x4B
  ------------------
 4636|  19.2k|         ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   40|  19.2k|#define ASCII_E 0x45
  ------------------
                       ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   49|  19.2k|#define ASCII_N 0x4E
  ------------------
                       ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   54|  19.2k|#define ASCII_S 0x53
  ------------------
 4637|  19.2k|  static const XML_Char notationPrefix[]
 4638|  19.2k|      = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   49|  19.2k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   50|  19.2k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   55|  19.2k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   36|  19.2k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   55|  19.2k|#define ASCII_T 0x54
  ------------------
 4639|  19.2k|         ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   44|  19.2k|#define ASCII_I 0x49
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   50|  19.2k|#define ASCII_O 0x4F
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   49|  19.2k|#define ASCII_N 0x4E
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |  117|  19.2k|#define ASCII_LPAREN 0x28
  ------------------
 4640|  19.2k|  static const XML_Char enumValueSep[] = {ASCII_PIPE, '\0'};
  ------------------
  |  |  122|  19.2k|#define ASCII_PIPE 0x7C
  ------------------
 4641|  19.2k|  static const XML_Char enumValueStart[] = {ASCII_LPAREN, '\0'};
  ------------------
  |  |  117|  19.2k|#define ASCII_LPAREN 0x28
  ------------------
 4642|       |
 4643|       |#ifndef XML_DTD
 4644|       |  UNUSED_P(account);
 4645|       |#endif
 4646|       |
 4647|       |  /* save one level of indirection */
 4648|  19.2k|  DTD *const dtd = parser->m_dtd;
 4649|       |
 4650|  19.2k|  const char **eventPP;
 4651|  19.2k|  const char **eventEndPP;
 4652|  19.2k|  enum XML_Content_Quant quant;
 4653|       |
 4654|  19.2k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (4654:7): [True: 19.2k, False: 0]
  ------------------
 4655|  19.2k|    eventPP = &parser->m_eventPtr;
 4656|  19.2k|    eventEndPP = &parser->m_eventEndPtr;
 4657|  19.2k|  } else {
 4658|      0|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 4659|      0|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 4660|      0|  }
 4661|       |
 4662|  4.10M|  for (;;) {
 4663|  4.10M|    int role;
 4664|  4.10M|    XML_Bool handleDefault = XML_TRUE;
  ------------------
  |  |   55|  4.10M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4665|  4.10M|    *eventPP = s;
 4666|  4.10M|    *eventEndPP = next;
 4667|  4.10M|    if (tok <= 0) {
  ------------------
  |  Branch (4667:9): [True: 6.28k, False: 4.10M]
  ------------------
 4668|  6.28k|      if (haveMore && tok != XML_TOK_INVALID) {
  ------------------
  |  |   57|  6.28k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4668:11): [True: 6.28k, False: 0]
  |  Branch (4668:23): [True: 4.38k, False: 1.90k]
  ------------------
 4669|  4.38k|        *nextPtr = s;
 4670|  4.38k|        return XML_ERROR_NONE;
 4671|  4.38k|      }
 4672|  1.90k|      switch (tok) {
 4673|  1.90k|      case XML_TOK_INVALID:
  ------------------
  |  |   57|  1.90k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4673:7): [True: 1.90k, False: 0]
  ------------------
 4674|  1.90k|        *eventPP = next;
 4675|  1.90k|        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.90k]
  ------------------
 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.90k]
  ------------------
 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.90k]
  ------------------
 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.90k]
  ------------------
 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.90k]
  ------------------
 4705|      0|        tok = -tok;
 4706|      0|        next = end;
 4707|      0|        break;
 4708|  1.90k|      }
 4709|  1.90k|    }
 4710|  4.10M|    role = XmlTokenRole(&parser->m_prologState, tok, s, next, enc);
  ------------------
  |  |  136|  4.10M|  (((state)->handler)(state, tok, ptr, end, enc))
  ------------------
 4711|  4.10M|#ifdef XML_DTD
 4712|  4.10M|    switch (role) {
 4713|  11.1k|    case XML_ROLE_INSTANCE_START: // bytes accounted in contentProcessor
  ------------------
  |  Branch (4713:5): [True: 11.1k, False: 4.08M]
  ------------------
 4714|  11.4k|    case XML_ROLE_XML_DECL:       // bytes accounted in processXmlDecl
  ------------------
  |  Branch (4714:5): [True: 323, False: 4.09M]
  ------------------
 4715|  11.4k|    case XML_ROLE_TEXT_DECL:      // bytes accounted in processXmlDecl
  ------------------
  |  Branch (4715:5): [True: 0, False: 4.10M]
  ------------------
 4716|  11.4k|      break;
 4717|  4.08M|    default:
  ------------------
  |  Branch (4717:5): [True: 4.08M, False: 11.4k]
  ------------------
 4718|  4.08M|      if (! accountingDiffTolerated(parser, tok, s, next, __LINE__, account)) {
  ------------------
  |  Branch (4718:11): [True: 1, False: 4.08M]
  ------------------
 4719|      1|        accountingOnAbort(parser);
 4720|      1|        return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4721|      1|      }
 4722|  4.10M|    }
 4723|  4.10M|#endif
 4724|  4.10M|    switch (role) {
  ------------------
  |  Branch (4724:13): [True: 0, False: 4.10M]
  ------------------
 4725|    323|    case XML_ROLE_XML_DECL: {
  ------------------
  |  Branch (4725:5): [True: 323, False: 4.09M]
  ------------------
 4726|    323|      enum XML_Error result = processXmlDecl(parser, 0, s, next);
 4727|    323|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4727:11): [True: 243, False: 80]
  ------------------
 4728|    243|        return result;
 4729|     80|      enc = parser->m_encoding;
 4730|     80|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|     80|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4731|     80|    } break;
 4732|  5.92k|    case XML_ROLE_DOCTYPE_NAME:
  ------------------
  |  Branch (4732:5): [True: 5.92k, False: 4.09M]
  ------------------
 4733|  5.92k|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4733:11): [True: 0, False: 5.92k]
  ------------------
 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.92k|      parser->m_doctypeSysid = NULL; /* always initialize to NULL */
 4743|  5.92k|      break;
 4744|  5.11k|    case XML_ROLE_DOCTYPE_INTERNAL_SUBSET:
  ------------------
  |  Branch (4744:5): [True: 5.11k, False: 4.09M]
  ------------------
 4745|  5.11k|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4745:11): [True: 0, False: 5.11k]
  ------------------
 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.11k|      break;
 4754|      0|#ifdef XML_DTD
 4755|      0|    case XML_ROLE_TEXT_DECL: {
  ------------------
  |  Branch (4755:5): [True: 0, False: 4.10M]
  ------------------
 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|    869|    case XML_ROLE_DOCTYPE_PUBLIC_ID:
  ------------------
  |  Branch (4763:5): [True: 869, False: 4.09M]
  ------------------
 4764|    869|#ifdef XML_DTD
 4765|    869|      parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|    869|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4766|    869|      parser->m_declEntity = (ENTITY *)lookup(
 4767|    869|          parser, &dtd->paramEntities, externalSubsetName, sizeof(ENTITY));
 4768|    869|      if (! parser->m_declEntity)
  ------------------
  |  Branch (4768:11): [True: 0, False: 869]
  ------------------
 4769|      0|        return XML_ERROR_NO_MEMORY;
 4770|    869|#endif /* XML_DTD */
 4771|    869|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|    869|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4772|    869|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4772:11): [True: 0, False: 869]
  ------------------
 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.89k|    case XML_ROLE_ENTITY_PUBLIC_ID:
  ------------------
  |  Branch (4788:5): [True: 3.02k, False: 4.09M]
  ------------------
 4789|  3.89k|      if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|  3.89k|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (4789:11): [True: 86, False: 3.80k]
  ------------------
 4790|     86|        return XML_ERROR_PUBLICID;
 4791|  3.80k|    alreadyChecked:
 4792|  3.80k|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (4792:11): [True: 3.17k, False: 626]
  |  Branch (4792:34): [True: 1.17k, False: 2.00k]
  ------------------
 4793|  1.17k|        XML_Char *tem
 4794|  1.17k|            = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 4795|  1.17k|                              next - enc->minBytesPerChar);
 4796|  1.17k|        if (! tem)
  ------------------
  |  Branch (4796:13): [True: 0, False: 1.17k]
  ------------------
 4797|      0|          return XML_ERROR_NO_MEMORY;
 4798|  1.17k|        normalizePublicId(tem);
 4799|  1.17k|        parser->m_declEntity->publicId = tem;
 4800|  1.17k|        poolFinish(&dtd->pool);
  ------------------
  |  |  600|  1.17k|#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.17k|        if (parser->m_entityDeclHandler && role == XML_ROLE_ENTITY_PUBLIC_ID)
  ------------------
  |  Branch (4804:13): [True: 0, False: 1.17k]
  |  Branch (4804:44): [True: 0, False: 0]
  ------------------
 4805|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4806|  1.17k|      }
 4807|  3.80k|      break;
 4808|  3.80k|    case XML_ROLE_DOCTYPE_CLOSE:
  ------------------
  |  Branch (4808:5): [True: 2.34k, False: 4.09M]
  ------------------
 4809|  2.34k|      if (allowClosingDoctype != XML_TRUE) {
  ------------------
  |  |   55|  2.34k|#define XML_TRUE ((XML_Bool)1)
  ------------------
  |  Branch (4809:11): [True: 0, False: 2.34k]
  ------------------
 4810|       |        /* Must not close doctype from within expanded parameter entities */
 4811|      0|        return XML_ERROR_INVALID_TOKEN;
 4812|      0|      }
 4813|       |
 4814|  2.34k|      if (parser->m_doctypeName) {
  ------------------
  |  Branch (4814:11): [True: 0, False: 2.34k]
  ------------------
 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.34k|#ifdef XML_DTD
 4826|  2.34k|      if (parser->m_doctypeSysid || parser->m_useForeignDTD) {
  ------------------
  |  Branch (4826:11): [True: 158, False: 2.18k]
  |  Branch (4826:37): [True: 0, False: 2.18k]
  ------------------
 4827|    158|        XML_Bool hadParamEntityRefs = dtd->hasParamEntityRefs;
 4828|    158|        dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|    158|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4829|    158|        if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4829:13): [True: 0, False: 158]
  ------------------
 4830|    158|            && 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|    158|        parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|    158|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4861|    158|      }
 4862|  2.34k|#endif /* XML_DTD */
 4863|  2.34k|      if (parser->m_endDoctypeDeclHandler) {
  ------------------
  |  Branch (4863:11): [True: 0, False: 2.34k]
  ------------------
 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.34k|      break;
 4868|  11.1k|    case XML_ROLE_INSTANCE_START:
  ------------------
  |  Branch (4868:5): [True: 11.1k, False: 4.08M]
  ------------------
 4869|  11.1k|#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.1k|      if (parser->m_useForeignDTD) {
  ------------------
  |  Branch (4873:11): [True: 0, False: 11.1k]
  ------------------
 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.1k|#endif /* XML_DTD */
 4902|  11.1k|      parser->m_processor = contentProcessor;
 4903|  11.1k|      return contentProcessor(parser, s, end, nextPtr);
 4904|  24.2k|    case XML_ROLE_ATTLIST_ELEMENT_NAME:
  ------------------
  |  Branch (4904:5): [True: 24.2k, False: 4.07M]
  ------------------
 4905|  24.2k|      parser->m_declElementType = getElementType(parser, enc, s, next);
 4906|  24.2k|      if (! parser->m_declElementType)
  ------------------
  |  Branch (4906:11): [True: 0, False: 24.2k]
  ------------------
 4907|      0|        return XML_ERROR_NO_MEMORY;
 4908|  24.2k|      goto checkAttListDeclHandler;
 4909|  49.0k|    case XML_ROLE_ATTRIBUTE_NAME:
  ------------------
  |  Branch (4909:5): [True: 49.0k, False: 4.05M]
  ------------------
 4910|  49.0k|      parser->m_declAttributeId = getAttributeId(parser, enc, s, next);
 4911|  49.0k|      if (! parser->m_declAttributeId)
  ------------------
  |  Branch (4911:11): [True: 0, False: 49.0k]
  ------------------
 4912|      0|        return XML_ERROR_NO_MEMORY;
 4913|  49.0k|      parser->m_declAttributeIsCdata = XML_FALSE;
  ------------------
  |  |   56|  49.0k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4914|  49.0k|      parser->m_declAttributeType = NULL;
 4915|  49.0k|      parser->m_declAttributeIsId = XML_FALSE;
  ------------------
  |  |   56|  49.0k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4916|  49.0k|      goto checkAttListDeclHandler;
 4917|  2.37k|    case XML_ROLE_ATTRIBUTE_TYPE_CDATA:
  ------------------
  |  Branch (4917:5): [True: 2.37k, False: 4.09M]
  ------------------
 4918|  2.37k|      parser->m_declAttributeIsCdata = XML_TRUE;
  ------------------
  |  |   55|  2.37k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4919|  2.37k|      parser->m_declAttributeType = atypeCDATA;
 4920|  2.37k|      goto checkAttListDeclHandler;
 4921|  5.52k|    case XML_ROLE_ATTRIBUTE_TYPE_ID:
  ------------------
  |  Branch (4921:5): [True: 5.52k, False: 4.09M]
  ------------------
 4922|  5.52k|      parser->m_declAttributeIsId = XML_TRUE;
  ------------------
  |  |   55|  5.52k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4923|  5.52k|      parser->m_declAttributeType = atypeID;
 4924|  5.52k|      goto checkAttListDeclHandler;
 4925|  3.37k|    case XML_ROLE_ATTRIBUTE_TYPE_IDREF:
  ------------------
  |  Branch (4925:5): [True: 3.37k, False: 4.09M]
  ------------------
 4926|  3.37k|      parser->m_declAttributeType = atypeIDREF;
 4927|  3.37k|      goto checkAttListDeclHandler;
 4928|    468|    case XML_ROLE_ATTRIBUTE_TYPE_IDREFS:
  ------------------
  |  Branch (4928:5): [True: 468, False: 4.09M]
  ------------------
 4929|    468|      parser->m_declAttributeType = atypeIDREFS;
 4930|    468|      goto checkAttListDeclHandler;
 4931|    889|    case XML_ROLE_ATTRIBUTE_TYPE_ENTITY:
  ------------------
  |  Branch (4931:5): [True: 889, False: 4.09M]
  ------------------
 4932|    889|      parser->m_declAttributeType = atypeENTITY;
 4933|    889|      goto checkAttListDeclHandler;
 4934|    194|    case XML_ROLE_ATTRIBUTE_TYPE_ENTITIES:
  ------------------
  |  Branch (4934:5): [True: 194, False: 4.10M]
  ------------------
 4935|    194|      parser->m_declAttributeType = atypeENTITIES;
 4936|    194|      goto checkAttListDeclHandler;
 4937|    100|    case XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN:
  ------------------
  |  Branch (4937:5): [True: 100, False: 4.10M]
  ------------------
 4938|    100|      parser->m_declAttributeType = atypeNMTOKEN;
 4939|    100|      goto checkAttListDeclHandler;
 4940|    235|    case XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS:
  ------------------
  |  Branch (4940:5): [True: 235, False: 4.10M]
  ------------------
 4941|    235|      parser->m_declAttributeType = atypeNMTOKENS;
 4942|  86.4k|    checkAttListDeclHandler:
 4943|  86.4k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler)
  ------------------
  |  Branch (4943:11): [True: 85.4k, False: 988]
  |  Branch (4943:34): [True: 0, False: 85.4k]
  ------------------
 4944|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4945|  86.4k|      break;
 4946|  42.0k|    case XML_ROLE_ATTRIBUTE_ENUM_VALUE:
  ------------------
  |  Branch (4946:5): [True: 42.0k, False: 4.05M]
  ------------------
 4947|  42.9k|    case XML_ROLE_ATTRIBUTE_NOTATION_VALUE:
  ------------------
  |  Branch (4947:5): [True: 963, False: 4.09M]
  ------------------
 4948|  42.9k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler) {
  ------------------
  |  Branch (4948:11): [True: 42.5k, False: 414]
  |  Branch (4948:34): [True: 0, False: 42.5k]
  ------------------
 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|  42.9k|      break;
 4964|  42.9k|    case XML_ROLE_IMPLIED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4964:5): [True: 31.2k, False: 4.06M]
  ------------------
 4965|  33.9k|    case XML_ROLE_REQUIRED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4965:5): [True: 2.73k, False: 4.09M]
  ------------------
 4966|  33.9k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (4966:11): [True: 33.7k, False: 194]
  ------------------
 4967|  33.7k|        if (! defineAttribute(parser->m_declElementType,
  ------------------
  |  Branch (4967:13): [True: 0, False: 33.7k]
  ------------------
 4968|  33.7k|                              parser->m_declAttributeId,
 4969|  33.7k|                              parser->m_declAttributeIsCdata,
 4970|  33.7k|                              parser->m_declAttributeIsId, 0, parser))
 4971|      0|          return XML_ERROR_NO_MEMORY;
 4972|  33.7k|        if (parser->m_attlistDeclHandler && parser->m_declAttributeType) {
  ------------------
  |  Branch (4972:13): [True: 0, False: 33.7k]
  |  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|  33.7k|      }
 4991|  33.9k|      poolClear(&parser->m_tempPool);
 4992|  33.9k|      break;
 4993|  13.4k|    case XML_ROLE_DEFAULT_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4993:5): [True: 13.4k, False: 4.08M]
  ------------------
 4994|  14.5k|    case XML_ROLE_FIXED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4994:5): [True: 1.07k, False: 4.09M]
  ------------------
 4995|  14.5k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (4995:11): [True: 14.2k, False: 287]
  ------------------
 4996|  14.2k|        const XML_Char *attVal;
 4997|  14.2k|        enum XML_Error result = storeAttributeValue(
 4998|  14.2k|            parser, enc, parser->m_declAttributeIsCdata,
 4999|  14.2k|            s + enc->minBytesPerChar, next - enc->minBytesPerChar, &dtd->pool,
 5000|  14.2k|            XML_ACCOUNT_NONE);
 5001|  14.2k|        if (result)
  ------------------
  |  Branch (5001:13): [True: 19, False: 14.2k]
  ------------------
 5002|     19|          return result;
 5003|  14.2k|        attVal = poolStart(&dtd->pool);
  ------------------
  |  |  595|  14.2k|#define poolStart(pool) ((pool)->start)
  ------------------
 5004|  14.2k|        poolFinish(&dtd->pool);
  ------------------
  |  |  600|  14.2k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5005|       |        /* ID attributes aren't allowed to have a default */
 5006|  14.2k|        if (! defineAttribute(
  ------------------
  |  Branch (5006:13): [True: 0, False: 14.2k]
  ------------------
 5007|  14.2k|                parser->m_declElementType, parser->m_declAttributeId,
 5008|  14.2k|                parser->m_declAttributeIsCdata, XML_FALSE, attVal, parser))
  ------------------
  |  |   56|  14.2k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5009|      0|          return XML_ERROR_NO_MEMORY;
 5010|  14.2k|        if (parser->m_attlistDeclHandler && parser->m_declAttributeType) {
  ------------------
  |  Branch (5010:13): [True: 0, False: 14.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|  14.2k|      }
 5030|  14.5k|      break;
 5031|  14.5k|    case XML_ROLE_ENTITY_VALUE:
  ------------------
  |  Branch (5031:5): [True: 7.97k, False: 4.09M]
  ------------------
 5032|  7.97k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5032:11): [True: 7.39k, False: 588]
  ------------------
 5033|  7.39k|        enum XML_Error result
 5034|  7.39k|            = storeEntityValue(parser, enc, s + enc->minBytesPerChar,
 5035|  7.39k|                               next - enc->minBytesPerChar, XML_ACCOUNT_NONE);
 5036|  7.39k|        if (parser->m_declEntity) {
  ------------------
  |  Branch (5036:13): [True: 3.99k, False: 3.39k]
  ------------------
 5037|  3.99k|          parser->m_declEntity->textPtr = poolStart(&dtd->entityValuePool);
  ------------------
  |  |  595|  3.99k|#define poolStart(pool) ((pool)->start)
  ------------------
 5038|  3.99k|          parser->m_declEntity->textLen
 5039|  3.99k|              = (int)(poolLength(&dtd->entityValuePool));
  ------------------
  |  |  596|  3.99k|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
 5040|  3.99k|          poolFinish(&dtd->entityValuePool);
  ------------------
  |  |  600|  3.99k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5041|  3.99k|          if (parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5041:15): [True: 0, False: 3.99k]
  ------------------
 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.99k|        } else
 5050|  3.39k|          poolDiscard(&dtd->entityValuePool);
  ------------------
  |  |  599|  3.39k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5051|  7.39k|        if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5051:13): [True: 58, False: 7.33k]
  ------------------
 5052|     58|          return result;
 5053|  7.39k|      }
 5054|  7.92k|      break;
 5055|  7.92k|    case XML_ROLE_DOCTYPE_SYSTEM_ID:
  ------------------
  |  Branch (5055:5): [True: 214, False: 4.10M]
  ------------------
 5056|    214|#ifdef XML_DTD
 5057|    214|      parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|    214|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5058|    214|#endif /* XML_DTD */
 5059|    214|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|    214|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5060|    214|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (5060:11): [True: 0, False: 214]
  ------------------
 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|    214|#ifdef XML_DTD
 5070|    214|      else
 5071|       |        /* use externalSubsetName to make parser->m_doctypeSysid non-NULL
 5072|       |           for the case where no parser->m_startDoctypeDeclHandler is set */
 5073|    214|        parser->m_doctypeSysid = externalSubsetName;
 5074|    214|#endif /* XML_DTD */
 5075|    214|      if (! dtd->standalone
  ------------------
  |  Branch (5075:11): [True: 213, False: 1]
  ------------------
 5076|    214|#ifdef XML_DTD
 5077|    214|          && ! parser->m_paramEntityParsing
  ------------------
  |  Branch (5077:14): [True: 213, False: 0]
  ------------------
 5078|    214|#endif /* XML_DTD */
 5079|    214|          && parser->m_notStandaloneHandler
  ------------------
  |  Branch (5079:14): [True: 0, False: 213]
  ------------------
 5080|    214|          && ! 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|    214|      if (! parser->m_declEntity) {
  ------------------
  |  Branch (5085:11): [True: 10, False: 204]
  ------------------
 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|    214|#endif /* XML_DTD */
 5093|       |      /* fall through */
 5094|  4.02k|    case XML_ROLE_ENTITY_SYSTEM_ID:
  ------------------
  |  Branch (5094:5): [True: 3.80k, False: 4.09M]
  ------------------
 5095|  4.02k|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (5095:11): [True: 3.08k, False: 936]
  |  Branch (5095:34): [True: 744, False: 2.34k]
  ------------------
 5096|    744|        parser->m_declEntity->systemId
 5097|    744|            = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 5098|    744|                              next - enc->minBytesPerChar);
 5099|    744|        if (! parser->m_declEntity->systemId)
  ------------------
  |  Branch (5099:13): [True: 0, False: 744]
  ------------------
 5100|      0|          return XML_ERROR_NO_MEMORY;
 5101|    744|        parser->m_declEntity->base = parser->m_curBase;
 5102|    744|        poolFinish(&dtd->pool);
  ------------------
  |  |  600|    744|#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|    744|        if (parser->m_entityDeclHandler && role == XML_ROLE_ENTITY_SYSTEM_ID)
  ------------------
  |  Branch (5106:13): [True: 0, False: 744]
  |  Branch (5106:44): [True: 0, False: 0]
  ------------------
 5107|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5108|    744|      }
 5109|  4.02k|      break;
 5110|  4.02k|    case XML_ROLE_ENTITY_COMPLETE:
  ------------------
  |  Branch (5110:5): [True: 2.95k, False: 4.09M]
  ------------------
 5111|  2.95k|      if (dtd->keepProcessing && parser->m_declEntity
  ------------------
  |  Branch (5111:11): [True: 2.38k, False: 566]
  |  Branch (5111:34): [True: 387, False: 1.99k]
  ------------------
 5112|  2.95k|          && parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5112:14): [True: 0, False: 387]
  ------------------
 5113|      0|        *eventEndPP = s;
 5114|      0|        parser->m_entityDeclHandler(
 5115|      0|            parser->m_handlerArg, parser->m_declEntity->name,
 5116|      0|            parser->m_declEntity->is_param, 0, 0, parser->m_declEntity->base,
 5117|      0|            parser->m_declEntity->systemId, parser->m_declEntity->publicId, 0);
 5118|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5119|      0|      }
 5120|  2.95k|      break;
 5121|    834|    case XML_ROLE_ENTITY_NOTATION_NAME:
  ------------------
  |  Branch (5121:5): [True: 834, False: 4.09M]
  ------------------
 5122|    834|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (5122:11): [True: 467, False: 367]
  |  Branch (5122:34): [True: 130, False: 337]
  ------------------
 5123|    130|        parser->m_declEntity->notation
 5124|    130|            = poolStoreString(&dtd->pool, enc, s, next);
 5125|    130|        if (! parser->m_declEntity->notation)
  ------------------
  |  Branch (5125:13): [True: 0, False: 130]
  ------------------
 5126|      0|          return XML_ERROR_NO_MEMORY;
 5127|    130|        poolFinish(&dtd->pool);
  ------------------
  |  |  600|    130|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5128|    130|        if (parser->m_unparsedEntityDeclHandler) {
  ------------------
  |  Branch (5128:13): [True: 0, False: 130]
  ------------------
 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|    130|        } else if (parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5135:20): [True: 0, False: 130]
  ------------------
 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|    130|      }
 5144|    834|      break;
 5145|  6.55k|    case XML_ROLE_GENERAL_ENTITY_NAME: {
  ------------------
  |  Branch (5145:5): [True: 6.55k, False: 4.09M]
  ------------------
 5146|  6.55k|      if (XmlPredefinedEntityName(enc, s, next)) {
  ------------------
  |  |  267|  6.55k|  (((enc)->predefinedEntityName)(enc, ptr, end))
  |  |  ------------------
  |  |  |  Branch (267:3): [True: 75, False: 6.47k]
  |  |  ------------------
  ------------------
 5147|     75|        parser->m_declEntity = NULL;
 5148|     75|        break;
 5149|     75|      }
 5150|  6.47k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5150:11): [True: 5.98k, False: 495]
  ------------------
 5151|  5.98k|        const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next);
 5152|  5.98k|        if (! name)
  ------------------
  |  Branch (5152:13): [True: 0, False: 5.98k]
  ------------------
 5153|      0|          return XML_ERROR_NO_MEMORY;
 5154|  5.98k|        parser->m_declEntity = (ENTITY *)lookup(parser, &dtd->generalEntities,
 5155|  5.98k|                                                name, sizeof(ENTITY));
 5156|  5.98k|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5156:13): [True: 0, False: 5.98k]
  ------------------
 5157|      0|          return XML_ERROR_NO_MEMORY;
 5158|  5.98k|        if (parser->m_declEntity->name != name) {
  ------------------
  |  Branch (5158:13): [True: 2.06k, False: 3.92k]
  ------------------
 5159|  2.06k|          poolDiscard(&dtd->pool);
  ------------------
  |  |  599|  2.06k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5160|  2.06k|          parser->m_declEntity = NULL;
 5161|  3.92k|        } else {
 5162|  3.92k|          poolFinish(&dtd->pool);
  ------------------
  |  |  600|  3.92k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5163|  3.92k|          parser->m_declEntity->publicId = NULL;
 5164|  3.92k|          parser->m_declEntity->is_param = XML_FALSE;
  ------------------
  |  |   56|  3.92k|#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.92k|          parser->m_declEntity->is_internal
 5169|  3.92k|              = ! (parser->m_parentParser || parser->m_openInternalEntities);
  ------------------
  |  Branch (5169:20): [True: 0, False: 3.92k]
  |  Branch (5169:46): [True: 0, False: 3.92k]
  ------------------
 5170|  3.92k|          if (parser->m_entityDeclHandler)
  ------------------
  |  Branch (5170:15): [True: 0, False: 3.92k]
  ------------------
 5171|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5172|  3.92k|        }
 5173|  5.98k|      } else {
 5174|    495|        poolDiscard(&dtd->pool);
  ------------------
  |  |  599|    495|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5175|    495|        parser->m_declEntity = NULL;
 5176|    495|      }
 5177|  6.47k|    } break;
 5178|  6.47k|    case XML_ROLE_PARAM_ENTITY_NAME:
  ------------------
  |  Branch (5178:5): [True: 5.40k, False: 4.09M]
  ------------------
 5179|  5.40k|#ifdef XML_DTD
 5180|  5.40k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5180:11): [True: 4.35k, False: 1.04k]
  ------------------
 5181|  4.35k|        const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next);
 5182|  4.35k|        if (! name)
  ------------------
  |  Branch (5182:13): [True: 0, False: 4.35k]
  ------------------
 5183|      0|          return XML_ERROR_NO_MEMORY;
 5184|  4.35k|        parser->m_declEntity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 5185|  4.35k|                                                name, sizeof(ENTITY));
 5186|  4.35k|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5186:13): [True: 0, False: 4.35k]
  ------------------
 5187|      0|          return XML_ERROR_NO_MEMORY;
 5188|  4.35k|        if (parser->m_declEntity->name != name) {
  ------------------
  |  Branch (5188:13): [True: 3.66k, False: 693]
  ------------------
 5189|  3.66k|          poolDiscard(&dtd->pool);
  ------------------
  |  |  599|  3.66k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5190|  3.66k|          parser->m_declEntity = NULL;
 5191|  3.66k|        } else {
 5192|    693|          poolFinish(&dtd->pool);
  ------------------
  |  |  600|    693|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5193|    693|          parser->m_declEntity->publicId = NULL;
 5194|    693|          parser->m_declEntity->is_param = XML_TRUE;
  ------------------
  |  |   55|    693|#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|    693|          parser->m_declEntity->is_internal
 5199|    693|              = ! (parser->m_parentParser || parser->m_openInternalEntities);
  ------------------
  |  Branch (5199:20): [True: 0, False: 693]
  |  Branch (5199:46): [True: 0, False: 693]
  ------------------
 5200|    693|          if (parser->m_entityDeclHandler)
  ------------------
  |  Branch (5200:15): [True: 0, False: 693]
  ------------------
 5201|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5202|    693|        }
 5203|  4.35k|      } else {
 5204|  1.04k|        poolDiscard(&dtd->pool);
  ------------------
  |  |  599|  1.04k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5205|  1.04k|        parser->m_declEntity = NULL;
 5206|  1.04k|      }
 5207|       |#else  /* not XML_DTD */
 5208|       |      parser->m_declEntity = NULL;
 5209|       |#endif /* XML_DTD */
 5210|  5.40k|      break;
 5211|  5.40k|    case XML_ROLE_NOTATION_NAME:
  ------------------
  |  Branch (5211:5): [True: 2.60k, False: 4.09M]
  ------------------
 5212|  2.60k|      parser->m_declNotationPublicId = NULL;
 5213|  2.60k|      parser->m_declNotationName = NULL;
 5214|  2.60k|      if (parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5214:11): [True: 0, False: 2.60k]
  ------------------
 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|  2.60k|      break;
 5223|  2.60k|    case XML_ROLE_NOTATION_PUBLIC_ID:
  ------------------
  |  Branch (5223:5): [True: 2.11k, False: 4.09M]
  ------------------
 5224|  2.11k|      if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|  2.11k|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (5224:11): [True: 2, False: 2.11k]
  ------------------
 5225|      2|        return XML_ERROR_PUBLICID;
 5226|  2.11k|      if (parser
  ------------------
  |  Branch (5226:11): [True: 0, False: 2.11k]
  ------------------
 5227|  2.11k|              ->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.11k|      break;
 5239|  2.11k|    case XML_ROLE_NOTATION_SYSTEM_ID:
  ------------------
  |  Branch (5239:5): [True: 1.16k, False: 4.09M]
  ------------------
 5240|  1.16k|      if (parser->m_declNotationName && parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5240:11): [True: 0, False: 1.16k]
  |  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|  1.16k|      poolClear(&parser->m_tempPool);
 5253|  1.16k|      break;
 5254|  1.38k|    case XML_ROLE_NOTATION_NO_SYSTEM_ID:
  ------------------
  |  Branch (5254:5): [True: 1.38k, False: 4.09M]
  ------------------
 5255|  1.38k|      if (parser->m_declNotationPublicId && parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5255:11): [True: 0, False: 1.38k]
  |  Branch (5255:45): [True: 0, False: 0]
  ------------------
 5256|      0|        *eventEndPP = s;
 5257|      0|        parser->m_notationDeclHandler(
 5258|      0|            parser->m_handlerArg, parser->m_declNotationName, parser->m_curBase,
 5259|      0|            0, parser->m_declNotationPublicId);
 5260|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5261|      0|      }
 5262|  1.38k|      poolClear(&parser->m_tempPool);
 5263|  1.38k|      break;
 5264|  1.38k|    case XML_ROLE_ERROR:
  ------------------
  |  Branch (5264:5): [True: 1.38k, False: 4.09M]
  ------------------
 5265|  1.38k|      switch (tok) {
 5266|      6|      case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|      6|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (5266:7): [True: 6, False: 1.38k]
  ------------------
 5267|       |        /* PE references in internal subset are
 5268|       |           not allowed within declarations. */
 5269|      6|        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.38k]
  ------------------
 5271|      1|        return XML_ERROR_MISPLACED_XML_PI;
 5272|  1.38k|      default:
  ------------------
  |  Branch (5272:7): [True: 1.38k, False: 7]
  ------------------
 5273|  1.38k|        return XML_ERROR_SYNTAX;
 5274|  1.38k|      }
 5275|      0|#ifdef XML_DTD
 5276|      0|    case XML_ROLE_IGNORE_SECT: {
  ------------------
  |  Branch (5276:5): [True: 0, False: 4.10M]
  ------------------
 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|  3.15M|    case XML_ROLE_GROUP_OPEN:
  ------------------
  |  Branch (5290:5): [True: 3.15M, False: 943k]
  ------------------
 5291|  3.15M|      if (parser->m_prologState.level >= parser->m_groupSize) {
  ------------------
  |  Branch (5291:11): [True: 1.07k, False: 3.15M]
  ------------------
 5292|  1.07k|        if (parser->m_groupSize) {
  ------------------
  |  Branch (5292:13): [True: 376, False: 703]
  ------------------
 5293|    376|          {
 5294|       |            /* Detect and prevent integer overflow */
 5295|    376|            if (parser->m_groupSize > (unsigned int)(-1) / 2u) {
  ------------------
  |  Branch (5295:17): [True: 0, False: 376]
  ------------------
 5296|      0|              return XML_ERROR_NO_MEMORY;
 5297|      0|            }
 5298|       |
 5299|    376|            char *const new_connector = (char *)REALLOC(
  ------------------
  |  |  714|    376|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 5300|    376|                parser, parser->m_groupConnector, parser->m_groupSize *= 2);
 5301|    376|            if (new_connector == NULL) {
  ------------------
  |  Branch (5301:17): [True: 0, False: 376]
  ------------------
 5302|      0|              parser->m_groupSize /= 2;
 5303|      0|              return XML_ERROR_NO_MEMORY;
 5304|      0|            }
 5305|    376|            parser->m_groupConnector = new_connector;
 5306|    376|          }
 5307|       |
 5308|    376|          if (dtd->scaffIndex) {
  ------------------
  |  Branch (5308:15): [True: 0, False: 376]
  ------------------
 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|    703|        } else {
 5326|    703|          parser->m_groupConnector
 5327|    703|              = (char *)MALLOC(parser, parser->m_groupSize = 32);
  ------------------
  |  |  713|    703|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5328|    703|          if (! parser->m_groupConnector) {
  ------------------
  |  Branch (5328:15): [True: 0, False: 703]
  ------------------
 5329|      0|            parser->m_groupSize = 0;
 5330|      0|            return XML_ERROR_NO_MEMORY;
 5331|      0|          }
 5332|    703|        }
 5333|  1.07k|      }
 5334|  3.15M|      parser->m_groupConnector[parser->m_prologState.level] = 0;
 5335|  3.15M|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5335:11): [True: 0, False: 3.15M]
  ------------------
 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|  3.15M|      break;
 5347|  3.15M|    case XML_ROLE_GROUP_SEQUENCE:
  ------------------
  |  Branch (5347:5): [True: 5.01k, False: 4.09M]
  ------------------
 5348|  5.01k|      if (parser->m_groupConnector[parser->m_prologState.level] == ASCII_PIPE)
  ------------------
  |  |  122|  5.01k|#define ASCII_PIPE 0x7C
  ------------------
  |  Branch (5348:11): [True: 1, False: 5.01k]
  ------------------
 5349|      1|        return XML_ERROR_SYNTAX;
 5350|  5.01k|      parser->m_groupConnector[parser->m_prologState.level] = ASCII_COMMA;
  ------------------
  |  |  123|  5.01k|#define ASCII_COMMA 0x2C
  ------------------
 5351|  5.01k|      if (dtd->in_eldecl && parser->m_elementDeclHandler)
  ------------------
  |  Branch (5351:11): [True: 0, False: 5.01k]
  |  Branch (5351:29): [True: 0, False: 0]
  ------------------
 5352|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5353|  5.01k|      break;
 5354|  58.7k|    case XML_ROLE_GROUP_CHOICE:
  ------------------
  |  Branch (5354:5): [True: 58.7k, False: 4.04M]
  ------------------
 5355|  58.7k|      if (parser->m_groupConnector[parser->m_prologState.level] == ASCII_COMMA)
  ------------------
  |  |  123|  58.7k|#define ASCII_COMMA 0x2C
  ------------------
  |  Branch (5355:11): [True: 1, False: 58.7k]
  ------------------
 5356|      1|        return XML_ERROR_SYNTAX;
 5357|  58.7k|      if (dtd->in_eldecl
  ------------------
  |  Branch (5357:11): [True: 0, False: 58.7k]
  ------------------
 5358|  58.7k|          && ! parser->m_groupConnector[parser->m_prologState.level]
  ------------------
  |  Branch (5358:14): [True: 0, False: 0]
  ------------------
 5359|  58.7k|          && (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|  58.7k|      parser->m_groupConnector[parser->m_prologState.level] = ASCII_PIPE;
  ------------------
  |  |  122|  58.7k|#define ASCII_PIPE 0x7C
  ------------------
 5367|  58.7k|      break;
 5368|  3.78k|    case XML_ROLE_PARAM_ENTITY_REF:
  ------------------
  |  Branch (5368:5): [True: 3.78k, False: 4.09M]
  ------------------
 5369|  3.78k|#ifdef XML_DTD
 5370|  3.78k|    case XML_ROLE_INNER_PARAM_ENTITY_REF:
  ------------------
  |  Branch (5370:5): [True: 0, False: 4.10M]
  ------------------
 5371|  3.78k|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|  3.78k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5372|  3.78k|      if (! parser->m_paramEntityParsing)
  ------------------
  |  Branch (5372:11): [True: 3.78k, False: 0]
  ------------------
 5373|  3.78k|        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.78k|#endif /* XML_DTD */
 5461|  3.78k|      if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (5461:11): [True: 3.15k, False: 632]
  |  Branch (5461:32): [True: 0, False: 3.15k]
  ------------------
 5462|  3.78k|          && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (5462:14): [True: 0, False: 0]
  ------------------
 5463|      0|        return XML_ERROR_NOT_STANDALONE;
 5464|  3.78k|      break;
 5465|       |
 5466|       |      /* Element declaration stuff */
 5467|       |
 5468|  4.38k|    case XML_ROLE_ELEMENT_NAME:
  ------------------
  |  Branch (5468:5): [True: 4.38k, False: 4.09M]
  ------------------
 5469|  4.38k|      if (parser->m_elementDeclHandler) {
  ------------------
  |  Branch (5469:11): [True: 0, False: 4.38k]
  ------------------
 5470|      0|        parser->m_declElementType = getElementType(parser, enc, s, next);
 5471|      0|        if (! parser->m_declElementType)
  ------------------
  |  Branch (5471:13): [True: 0, False: 0]
  ------------------
 5472|      0|          return XML_ERROR_NO_MEMORY;
 5473|      0|        dtd->scaffLevel = 0;
 5474|      0|        dtd->scaffCount = 0;
 5475|      0|        dtd->in_eldecl = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5476|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5477|      0|      }
 5478|  4.38k|      break;
 5479|       |
 5480|  4.38k|    case XML_ROLE_CONTENT_ANY:
  ------------------
  |  Branch (5480:5): [True: 21, False: 4.10M]
  ------------------
 5481|     31|    case XML_ROLE_CONTENT_EMPTY:
  ------------------
  |  Branch (5481:5): [True: 10, False: 4.10M]
  ------------------
 5482|     31|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5482:11): [True: 0, False: 31]
  ------------------
 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|     31|      break;
 5502|       |
 5503|  1.71k|    case XML_ROLE_CONTENT_PCDATA:
  ------------------
  |  Branch (5503:5): [True: 1.71k, False: 4.09M]
  ------------------
 5504|  1.71k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5504:11): [True: 0, False: 1.71k]
  ------------------
 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|  1.71k|      break;
 5511|       |
 5512|  53.1k|    case XML_ROLE_CONTENT_ELEMENT:
  ------------------
  |  Branch (5512:5): [True: 53.1k, False: 4.04M]
  ------------------
 5513|  53.1k|      quant = XML_CQUANT_NONE;
 5514|  53.1k|      goto elementContent;
 5515|  10.5k|    case XML_ROLE_CONTENT_ELEMENT_OPT:
  ------------------
  |  Branch (5515:5): [True: 10.5k, False: 4.08M]
  ------------------
 5516|  10.5k|      quant = XML_CQUANT_OPT;
 5517|  10.5k|      goto elementContent;
 5518|  1.16k|    case XML_ROLE_CONTENT_ELEMENT_REP:
  ------------------
  |  Branch (5518:5): [True: 1.16k, False: 4.09M]
  ------------------
 5519|  1.16k|      quant = XML_CQUANT_REP;
 5520|  1.16k|      goto elementContent;
 5521|  2.11k|    case XML_ROLE_CONTENT_ELEMENT_PLUS:
  ------------------
  |  Branch (5521:5): [True: 2.11k, False: 4.09M]
  ------------------
 5522|  2.11k|      quant = XML_CQUANT_PLUS;
 5523|  66.9k|    elementContent:
 5524|  66.9k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5524:11): [True: 0, False: 66.9k]
  ------------------
 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|  66.9k|      break;
 5554|       |
 5555|  66.9k|    case XML_ROLE_GROUP_CLOSE:
  ------------------
  |  Branch (5555:5): [True: 24.2k, False: 4.07M]
  ------------------
 5556|  24.2k|      quant = XML_CQUANT_NONE;
 5557|  24.2k|      goto closeGroup;
 5558|  4.30k|    case XML_ROLE_GROUP_CLOSE_OPT:
  ------------------
  |  Branch (5558:5): [True: 4.30k, False: 4.09M]
  ------------------
 5559|  4.30k|      quant = XML_CQUANT_OPT;
 5560|  4.30k|      goto closeGroup;
 5561|  2.84k|    case XML_ROLE_GROUP_CLOSE_REP:
  ------------------
  |  Branch (5561:5): [True: 2.84k, False: 4.09M]
  ------------------
 5562|  2.84k|      quant = XML_CQUANT_REP;
 5563|  2.84k|      goto closeGroup;
 5564|  7.84k|    case XML_ROLE_GROUP_CLOSE_PLUS:
  ------------------
  |  Branch (5564:5): [True: 7.84k, False: 4.09M]
  ------------------
 5565|  7.84k|      quant = XML_CQUANT_PLUS;
 5566|  39.2k|    closeGroup:
 5567|  39.2k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5567:11): [True: 0, False: 39.2k]
  ------------------
 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.2k|      break;
 5586|       |      /* End element declaration stuff */
 5587|       |
 5588|  39.2k|    case XML_ROLE_PI:
  ------------------
  |  Branch (5588:5): [True: 4.70k, False: 4.09M]
  ------------------
 5589|  4.70k|      if (! reportProcessingInstruction(parser, enc, s, next))
  ------------------
  |  Branch (5589:11): [True: 0, False: 4.70k]
  ------------------
 5590|      0|        return XML_ERROR_NO_MEMORY;
 5591|  4.70k|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|  4.70k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5592|  4.70k|      break;
 5593|  1.19k|    case XML_ROLE_COMMENT:
  ------------------
  |  Branch (5593:5): [True: 1.19k, False: 4.09M]
  ------------------
 5594|  1.19k|      if (! reportComment(parser, enc, s, next))
  ------------------
  |  Branch (5594:11): [True: 0, False: 1.19k]
  ------------------
 5595|      0|        return XML_ERROR_NO_MEMORY;
 5596|  1.19k|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|  1.19k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5597|  1.19k|      break;
 5598|  11.0k|    case XML_ROLE_NONE:
  ------------------
  |  Branch (5598:5): [True: 11.0k, False: 4.08M]
  ------------------
 5599|  11.0k|      switch (tok) {
  ------------------
  |  Branch (5599:15): [True: 9.79k, False: 1.30k]
  ------------------
 5600|  1.30k|      case XML_TOK_BOM:
  ------------------
  |  |   79|  1.30k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
  |  Branch (5600:7): [True: 1.30k, False: 9.79k]
  ------------------
 5601|  1.30k|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|  1.30k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5602|  1.30k|        break;
 5603|  11.0k|      }
 5604|  11.0k|      break;
 5605|  17.6k|    case XML_ROLE_DOCTYPE_NONE:
  ------------------
  |  Branch (5605:5): [True: 17.6k, False: 4.08M]
  ------------------
 5606|  17.6k|      if (parser->m_startDoctypeDeclHandler)
  ------------------
  |  Branch (5606:11): [True: 0, False: 17.6k]
  ------------------
 5607|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5608|  17.6k|      break;
 5609|  70.0k|    case XML_ROLE_ENTITY_NONE:
  ------------------
  |  Branch (5609:5): [True: 70.0k, False: 4.03M]
  ------------------
 5610|  70.0k|      if (dtd->keepProcessing && parser->m_entityDeclHandler)
  ------------------
  |  Branch (5610:11): [True: 58.4k, False: 11.5k]
  |  Branch (5610:34): [True: 0, False: 58.4k]
  ------------------
 5611|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5612|  70.0k|      break;
 5613|  16.2k|    case XML_ROLE_NOTATION_NONE:
  ------------------
  |  Branch (5613:5): [True: 16.2k, False: 4.08M]
  ------------------
 5614|  16.2k|      if (parser->m_notationDeclHandler)
  ------------------
  |  Branch (5614:11): [True: 0, False: 16.2k]
  ------------------
 5615|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5616|  16.2k|      break;
 5617|   311k|    case XML_ROLE_ATTLIST_NONE:
  ------------------
  |  Branch (5617:5): [True: 311k, False: 3.78M]
  ------------------
 5618|   311k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler)
  ------------------
  |  Branch (5618:11): [True: 308k, False: 2.12k]
  |  Branch (5618:34): [True: 0, False: 308k]
  ------------------
 5619|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5620|   311k|      break;
 5621|  88.7k|    case XML_ROLE_ELEMENT_NONE:
  ------------------
  |  Branch (5621:5): [True: 88.7k, False: 4.01M]
  ------------------
 5622|  88.7k|      if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5622:11): [True: 0, False: 88.7k]
  ------------------
 5623|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5624|  88.7k|      break;
 5625|  4.10M|    } /* end of big switch */
 5626|       |
 5627|  4.08M|    if (handleDefault && parser->m_defaultHandler)
  ------------------
  |  Branch (5627:9): [True: 4.08M, False: 7.28k]
  |  Branch (5627:26): [True: 0, False: 4.08M]
  ------------------
 5628|      0|      reportDefault(parser, enc, s, next);
 5629|       |
 5630|  4.08M|    switch (parser->m_parsingStatus.parsing) {
 5631|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (5631:5): [True: 0, False: 4.08M]
  ------------------
 5632|      0|      *nextPtr = next;
 5633|      0|      return XML_ERROR_NONE;
 5634|      0|    case XML_FINISHED:
  ------------------
  |  Branch (5634:5): [True: 0, False: 4.08M]
  ------------------
 5635|      0|      return XML_ERROR_ABORTED;
 5636|  4.08M|    default:
  ------------------
  |  Branch (5636:5): [True: 4.08M, False: 0]
  ------------------
 5637|  4.08M|      s = next;
 5638|  4.08M|      tok = XmlPrologTok(enc, s, end, &next);
  ------------------
  |  |  227|  4.08M|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  4.08M|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5639|  4.08M|    }
 5640|  4.08M|  }
 5641|       |  /* not reached */
 5642|  19.2k|}
xmlparse.c:accountingDiffTolerated:
 7736|  41.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|  41.1M|  switch (tok) {
  ------------------
  |  Branch (7740:11): [True: 37.7M, False: 3.43M]
  ------------------
 7741|  2.44k|  case XML_TOK_INVALID:
  ------------------
  |  |   57|  2.44k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (7741:3): [True: 2.44k, False: 41.1M]
  ------------------
 7742|  4.83k|  case XML_TOK_PARTIAL:
  ------------------
  |  |   56|  4.83k|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (7742:3): [True: 2.38k, False: 41.1M]
  ------------------
 7743|  5.27k|  case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|  5.27k|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (7743:3): [True: 441, False: 41.1M]
  ------------------
 7744|  3.43M|  case XML_TOK_NONE:
  ------------------
  |  |   51|  3.43M|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (7744:3): [True: 3.43M, False: 37.7M]
  ------------------
 7745|  3.43M|    return XML_TRUE;
  ------------------
  |  |   55|  3.43M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7746|  41.1M|  }
 7747|       |
 7748|  37.7M|  if (account == XML_ACCOUNT_NONE)
  ------------------
  |  Branch (7748:7): [True: 2.17M, False: 35.5M]
  ------------------
 7749|  2.17M|    return XML_TRUE; /* because these bytes have been accounted for, already */
  ------------------
  |  |   55|  2.17M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7750|       |
 7751|  35.5M|  unsigned int levelsAwayFromRootParser;
 7752|  35.5M|  const XML_Parser rootParser
 7753|  35.5M|      = getRootParserOf(originParser, &levelsAwayFromRootParser);
 7754|  35.5M|  assert(! rootParser->m_parentParser);
 7755|       |
 7756|  35.5M|  const int isDirect
 7757|  35.5M|      = (account == XML_ACCOUNT_DIRECT) && (originParser == rootParser);
  ------------------
  |  Branch (7757:9): [True: 6.04M, False: 29.5M]
  |  Branch (7757:44): [True: 6.04M, False: 0]
  ------------------
 7758|  35.5M|  const ptrdiff_t bytesMore = after - before;
 7759|       |
 7760|  35.5M|  XmlBigCount *const additionTarget
 7761|  35.5M|      = isDirect ? &rootParser->m_accounting.countBytesDirect
  ------------------
  |  Branch (7761:9): [True: 6.04M, False: 29.5M]
  ------------------
 7762|  35.5M|                 : &rootParser->m_accounting.countBytesIndirect;
 7763|       |
 7764|       |  /* Detect and avoid integer overflow */
 7765|  35.5M|  if (*additionTarget > (XmlBigCount)(-1) - (XmlBigCount)bytesMore)
  ------------------
  |  Branch (7765:7): [True: 0, False: 35.5M]
  ------------------
 7766|      0|    return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7767|  35.5M|  *additionTarget += bytesMore;
 7768|       |
 7769|  35.5M|  const XmlBigCount countBytesOutput
 7770|  35.5M|      = rootParser->m_accounting.countBytesDirect
 7771|  35.5M|        + rootParser->m_accounting.countBytesIndirect;
 7772|  35.5M|  const float amplificationFactor
 7773|  35.5M|      = accountingGetCurrentAmplification(rootParser);
 7774|  35.5M|  const XML_Bool tolerated
 7775|  35.5M|      = (countBytesOutput < rootParser->m_accounting.activationThresholdBytes)
  ------------------
  |  Branch (7775:9): [True: 18.6M, False: 16.9M]
  ------------------
 7776|  35.5M|        || (amplificationFactor
  ------------------
  |  Branch (7776:12): [True: 16.9M, False: 69]
  ------------------
 7777|  16.9M|            <= rootParser->m_accounting.maximumAmplificationFactor);
 7778|       |
 7779|  35.5M|  if (rootParser->m_accounting.debugLevel >= 2u) {
  ------------------
  |  Branch (7779:7): [True: 0, False: 35.5M]
  ------------------
 7780|      0|    accountingReportStats(rootParser, "");
 7781|      0|    accountingReportDiff(rootParser, levelsAwayFromRootParser, before, after,
 7782|      0|                         bytesMore, source_line, account);
 7783|      0|  }
 7784|       |
 7785|  35.5M|  return tolerated;
 7786|  35.5M|}
xmlparse.c:getRootParserOf:
 7851|  42.8M|getRootParserOf(XML_Parser parser, unsigned int *outLevelDiff) {
 7852|  42.8M|  XML_Parser rootParser = parser;
 7853|  42.8M|  unsigned int stepsTakenUpwards = 0;
 7854|  42.8M|  while (rootParser->m_parentParser) {
  ------------------
  |  Branch (7854:10): [True: 0, False: 42.8M]
  ------------------
 7855|      0|    rootParser = rootParser->m_parentParser;
 7856|      0|    stepsTakenUpwards++;
 7857|      0|  }
 7858|  42.8M|  assert(! rootParser->m_parentParser);
 7859|  42.8M|  if (outLevelDiff != NULL) {
  ------------------
  |  Branch (7859:7): [True: 35.5M, False: 7.32M]
  ------------------
 7860|  35.5M|    *outLevelDiff = stepsTakenUpwards;
 7861|  35.5M|  }
 7862|  42.8M|  return rootParser;
 7863|  42.8M|}
xmlparse.c:accountingGetCurrentAmplification:
 7659|  35.5M|accountingGetCurrentAmplification(XML_Parser rootParser) {
 7660|  35.5M|  const XmlBigCount countBytesOutput
 7661|  35.5M|      = rootParser->m_accounting.countBytesDirect
 7662|  35.5M|        + rootParser->m_accounting.countBytesIndirect;
 7663|  35.5M|  const float amplificationFactor
 7664|  35.5M|      = rootParser->m_accounting.countBytesDirect
  ------------------
  |  Branch (7664:9): [True: 35.5M, False: 0]
  ------------------
 7665|  35.5M|            ? (countBytesOutput
 7666|  35.5M|               / (float)(rootParser->m_accounting.countBytesDirect))
 7667|  35.5M|            : 1.0f;
 7668|  35.5M|  assert(! rootParser->m_parentParser);
 7669|  35.5M|  return amplificationFactor;
 7670|  35.5M|}
xmlparse.c:accountingReportStats:
 7673|     68|accountingReportStats(XML_Parser originParser, const char *epilog) {
 7674|     68|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7675|     68|  assert(! rootParser->m_parentParser);
 7676|       |
 7677|     68|  if (rootParser->m_accounting.debugLevel == 0u) {
  ------------------
  |  Branch (7677:7): [True: 68, False: 0]
  ------------------
 7678|     68|    return;
 7679|     68|  }
 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|     68|accountingOnAbort(XML_Parser originParser) {
 7693|     68|  accountingReportStats(originParser, " ABORTING\n");
 7694|     68|}
xmlparse.c:processXmlDecl:
 4279|    323|               const char *next) {
 4280|    323|  const char *encodingName = NULL;
 4281|    323|  const XML_Char *storedEncName = NULL;
 4282|    323|  const ENCODING *newEncoding = NULL;
 4283|    323|  const char *version = NULL;
 4284|    323|  const char *versionend = NULL;
 4285|    323|  const XML_Char *storedversion = NULL;
 4286|    323|  int standalone = -1;
 4287|       |
 4288|    323|#ifdef XML_DTD
 4289|    323|  if (! accountingDiffTolerated(parser, XML_TOK_XML_DECL, s, next, __LINE__,
  ------------------
  |  |   77|    323|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (4289:7): [True: 0, False: 323]
  ------------------
 4290|    323|                                XML_ACCOUNT_DIRECT)) {
 4291|      0|    accountingOnAbort(parser);
 4292|      0|    return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4293|      0|  }
 4294|    323|#endif
 4295|       |
 4296|    323|  if (! (parser->m_ns ? XmlParseXmlDeclNS : XmlParseXmlDecl)(
  ------------------
  |  Branch (4296:7): [True: 243, False: 80]
  |  Branch (4296:10): [True: 0, False: 323]
  ------------------
 4297|    323|          isGeneralTextEntity, parser->m_encoding, s, next, &parser->m_eventPtr,
 4298|    323|          &version, &versionend, &encodingName, &newEncoding, &standalone)) {
 4299|    243|    if (isGeneralTextEntity)
  ------------------
  |  Branch (4299:9): [True: 0, False: 243]
  ------------------
 4300|      0|      return XML_ERROR_TEXT_DECL;
 4301|    243|    else
 4302|    243|      return XML_ERROR_XML_DECL;
 4303|    243|  }
 4304|     80|  if (! isGeneralTextEntity && standalone == 1) {
  ------------------
  |  Branch (4304:7): [True: 80, False: 0]
  |  Branch (4304:32): [True: 27, False: 53]
  ------------------
 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|     80|  if (parser->m_xmlDeclHandler) {
  ------------------
  |  Branch (4312:7): [True: 0, False: 80]
  ------------------
 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|     80|  } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4330:14): [True: 0, False: 80]
  ------------------
 4331|      0|    reportDefault(parser, parser->m_encoding, s, next);
 4332|     80|  if (parser->m_protocolEncodingName == NULL) {
  ------------------
  |  Branch (4332:7): [True: 0, False: 80]
  ------------------
 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|     80|  if (storedEncName || storedversion)
  ------------------
  |  Branch (4363:7): [True: 0, False: 80]
  |  Branch (4363:24): [True: 0, False: 80]
  ------------------
 4364|      0|    poolClear(&parser->m_temp2Pool);
 4365|       |
 4366|     80|  return XML_ERROR_NONE;
 4367|     80|}
xmlparse.c:poolStoreString:
 7283|  4.28M|                const char *end) {
 7284|  4.28M|  if (! poolAppend(pool, enc, ptr, end))
  ------------------
  |  Branch (7284:7): [True: 0, False: 4.28M]
  ------------------
 7285|      0|    return NULL;
 7286|  4.28M|  if (pool->ptr == pool->end && ! poolGrow(pool))
  ------------------
  |  Branch (7286:7): [True: 396, False: 4.28M]
  |  Branch (7286:33): [True: 0, False: 396]
  ------------------
 7287|      0|    return NULL;
 7288|  4.28M|  *(pool->ptr)++ = 0;
 7289|  4.28M|  return pool->start;
 7290|  4.28M|}
xmlparse.c:lookup:
 7042|  8.14M|lookup(XML_Parser parser, HASH_TABLE *table, KEY name, size_t createSize) {
 7043|  8.14M|  size_t i;
 7044|  8.14M|  if (table->size == 0) {
  ------------------
  |  Branch (7044:7): [True: 41.9k, False: 8.09M]
  ------------------
 7045|  41.9k|    size_t tsize;
 7046|  41.9k|    if (! createSize)
  ------------------
  |  Branch (7046:9): [True: 24.5k, False: 17.4k]
  ------------------
 7047|  24.5k|      return NULL;
 7048|  17.4k|    table->power = INIT_POWER;
  ------------------
  |  | 7006|  17.4k|#define INIT_POWER 6
  ------------------
 7049|       |    /* table->size is a power of 2 */
 7050|  17.4k|    table->size = (size_t)1 << INIT_POWER;
  ------------------
  |  | 7006|  17.4k|#define INIT_POWER 6
  ------------------
 7051|  17.4k|    tsize = table->size * sizeof(NAMED *);
 7052|  17.4k|    table->v = table->mem->malloc_fcn(tsize);
 7053|  17.4k|    if (! table->v) {
  ------------------
  |  Branch (7053:9): [True: 0, False: 17.4k]
  ------------------
 7054|      0|      table->size = 0;
 7055|      0|      return NULL;
 7056|      0|    }
 7057|  17.4k|    memset(table->v, 0, tsize);
 7058|  17.4k|    i = hash(parser, name) & ((unsigned long)table->size - 1);
 7059|  8.09M|  } else {
 7060|  8.09M|    unsigned long h = hash(parser, name);
 7061|  8.09M|    unsigned long mask = (unsigned long)table->size - 1;
 7062|  8.09M|    unsigned char step = 0;
 7063|  8.09M|    i = h & mask;
 7064|  8.38M|    while (table->v[i]) {
  ------------------
  |  Branch (7064:12): [True: 8.00M, False: 380k]
  ------------------
 7065|  8.00M|      if (keyeq(name, table->v[i]->name))
  ------------------
  |  Branch (7065:11): [True: 7.71M, False: 285k]
  ------------------
 7066|  7.71M|        return table->v[i];
 7067|   285k|      if (! step)
  ------------------
  |  Branch (7067:11): [True: 239k, False: 46.1k]
  ------------------
 7068|   239k|        step = PROBE_STEP(h, mask, table->power);
  ------------------
  |  |  234|   239k|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  232|   239k|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7069|   285k|      i < step ? (i += table->size - step) : (i -= step);
  ------------------
  |  Branch (7069:7): [True: 3.69k, False: 282k]
  ------------------
 7070|   285k|    }
 7071|   380k|    if (! createSize)
  ------------------
  |  Branch (7071:9): [True: 356k, False: 23.5k]
  ------------------
 7072|   356k|      return NULL;
 7073|       |
 7074|       |    /* check for overflow (table is half full) */
 7075|  23.5k|    if (table->used >> (table->power - 1)) {
  ------------------
  |  Branch (7075:9): [True: 290, False: 23.3k]
  ------------------
 7076|    290|      unsigned char newPower = table->power + 1;
 7077|       |
 7078|       |      /* Detect and prevent invalid shift */
 7079|    290|      if (newPower >= sizeof(unsigned long) * 8 /* bits per byte */) {
  ------------------
  |  Branch (7079:11): [True: 0, False: 290]
  ------------------
 7080|      0|        return NULL;
 7081|      0|      }
 7082|       |
 7083|    290|      size_t newSize = (size_t)1 << newPower;
 7084|    290|      unsigned long newMask = (unsigned long)newSize - 1;
 7085|       |
 7086|       |      /* Detect and prevent integer overflow */
 7087|    290|      if (newSize > (size_t)(-1) / sizeof(NAMED *)) {
  ------------------
  |  Branch (7087:11): [True: 0, False: 290]
  ------------------
 7088|      0|        return NULL;
 7089|      0|      }
 7090|       |
 7091|    290|      size_t tsize = newSize * sizeof(NAMED *);
 7092|    290|      NAMED **newV = table->mem->malloc_fcn(tsize);
 7093|    290|      if (! newV)
  ------------------
  |  Branch (7093:11): [True: 0, False: 290]
  ------------------
 7094|      0|        return NULL;
 7095|    290|      memset(newV, 0, tsize);
 7096|  36.0k|      for (i = 0; i < table->size; i++)
  ------------------
  |  Branch (7096:19): [True: 35.7k, False: 290]
  ------------------
 7097|  35.7k|        if (table->v[i]) {
  ------------------
  |  Branch (7097:13): [True: 17.8k, False: 17.8k]
  ------------------
 7098|  17.8k|          unsigned long newHash = hash(parser, table->v[i]->name);
 7099|  17.8k|          size_t j = newHash & newMask;
 7100|  17.8k|          step = 0;
 7101|  20.8k|          while (newV[j]) {
  ------------------
  |  Branch (7101:18): [True: 2.95k, False: 17.8k]
  ------------------
 7102|  2.95k|            if (! step)
  ------------------
  |  Branch (7102:17): [True: 2.32k, False: 631]
  ------------------
 7103|  2.32k|              step = PROBE_STEP(newHash, newMask, newPower);
  ------------------
  |  |  234|  2.32k|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  232|  2.32k|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7104|  2.95k|            j < step ? (j += newSize - step) : (j -= step);
  ------------------
  |  Branch (7104:13): [True: 360, False: 2.59k]
  ------------------
 7105|  2.95k|          }
 7106|  17.8k|          newV[j] = table->v[i];
 7107|  17.8k|        }
 7108|    290|      table->mem->free_fcn(table->v);
 7109|    290|      table->v = newV;
 7110|    290|      table->power = newPower;
 7111|    290|      table->size = newSize;
 7112|    290|      i = h & newMask;
 7113|    290|      step = 0;
 7114|    468|      while (table->v[i]) {
  ------------------
  |  Branch (7114:14): [True: 178, False: 290]
  ------------------
 7115|    178|        if (! step)
  ------------------
  |  Branch (7115:13): [True: 97, False: 81]
  ------------------
 7116|     97|          step = PROBE_STEP(h, newMask, newPower);
  ------------------
  |  |  234|     97|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  232|     97|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7117|    178|        i < step ? (i += newSize - step) : (i -= step);
  ------------------
  |  Branch (7117:9): [True: 22, False: 156]
  ------------------
 7118|    178|      }
 7119|    290|    }
 7120|  23.5k|  }
 7121|  41.0k|  table->v[i] = table->mem->malloc_fcn(createSize);
 7122|  41.0k|  if (! table->v[i])
  ------------------
  |  Branch (7122:7): [True: 0, False: 41.0k]
  ------------------
 7123|      0|    return NULL;
 7124|  41.0k|  memset(table->v[i], 0, createSize);
 7125|  41.0k|  table->v[i]->name = name;
 7126|  41.0k|  (table->used)++;
 7127|  41.0k|  return table->v[i];
 7128|  41.0k|}
xmlparse.c:hash:
 7031|  8.13M|hash(XML_Parser parser, KEY s) {
 7032|  8.13M|  struct siphash state;
 7033|  8.13M|  struct sipkey key;
 7034|  8.13M|  (void)sip24_valid;
 7035|  8.13M|  copy_salt_to_sipkey(parser, &key);
 7036|  8.13M|  sip24_init(&state, &key);
 7037|  8.13M|  sip24_update(&state, s, keylen(s) * sizeof(XML_Char));
 7038|  8.13M|  return (unsigned long)sip24_final(&state);
 7039|  8.13M|}
xmlparse.c:copy_salt_to_sipkey:
 7025|  8.13M|copy_salt_to_sipkey(XML_Parser parser, struct sipkey *key) {
 7026|  8.13M|  key->k[0] = 0;
 7027|  8.13M|  key->k[1] = get_hash_secret_salt(parser);
 7028|  8.13M|}
xmlparse.c:get_hash_secret_salt:
  946|  8.13M|get_hash_secret_salt(XML_Parser parser) {
  947|  8.13M|  if (parser->m_parentParser != NULL)
  ------------------
  |  Branch (947:7): [True: 0, False: 8.13M]
  ------------------
  948|      0|    return get_hash_secret_salt(parser->m_parentParser);
  949|  8.13M|  return parser->m_hash_secret_salt;
  950|  8.13M|}
xmlparse.c:keylen:
 7017|  8.13M|keylen(KEY s) {
 7018|  8.13M|  size_t len = 0;
 7019|  27.5M|  for (; *s; s++, len++)
  ------------------
  |  Branch (7019:10): [True: 19.3M, False: 8.13M]
  ------------------
 7020|  19.3M|    ;
 7021|  8.13M|  return len;
 7022|  8.13M|}
xmlparse.c:keyeq:
 7009|  8.00M|keyeq(KEY s1, KEY s2) {
 7010|  21.9M|  for (; *s1 == *s2; s1++, s2++)
  ------------------
  |  Branch (7010:10): [True: 21.6M, False: 285k]
  ------------------
 7011|  21.6M|    if (*s1 == 0)
  ------------------
  |  Branch (7011:9): [True: 7.71M, False: 13.9M]
  ------------------
 7012|  7.71M|      return XML_TRUE;
  ------------------
  |  |   55|  7.71M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7013|   285k|  return XML_FALSE;
  ------------------
  |  |   56|   285k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7014|  8.00M|}
xmlparse.c:normalizePublicId:
 6694|  1.17k|normalizePublicId(XML_Char *publicId) {
 6695|  1.17k|  XML_Char *p = publicId;
 6696|  1.17k|  XML_Char *s;
 6697|  22.8k|  for (s = publicId; *s; s++) {
  ------------------
  |  Branch (6697:22): [True: 21.6k, False: 1.17k]
  ------------------
 6698|  21.6k|    switch (*s) {
 6699|    697|    case 0x20:
  ------------------
  |  Branch (6699:5): [True: 697, False: 20.9k]
  ------------------
 6700|  2.14k|    case 0xD:
  ------------------
  |  Branch (6700:5): [True: 1.44k, False: 20.1k]
  ------------------
 6701|  3.31k|    case 0xA:
  ------------------
  |  Branch (6701:5): [True: 1.16k, False: 20.4k]
  ------------------
 6702|  3.31k|      if (p != publicId && p[-1] != 0x20)
  ------------------
  |  Branch (6702:11): [True: 1.83k, False: 1.47k]
  |  Branch (6702:28): [True: 1.22k, False: 606]
  ------------------
 6703|  1.22k|        *p++ = 0x20;
 6704|  3.31k|      break;
 6705|  18.3k|    default:
  ------------------
  |  Branch (6705:5): [True: 18.3k, False: 3.31k]
  ------------------
 6706|  18.3k|      *p++ = *s;
 6707|  21.6k|    }
 6708|  21.6k|  }
 6709|  1.17k|  if (p != publicId && p[-1] == 0x20)
  ------------------
  |  Branch (6709:7): [True: 764, False: 413]
  |  Branch (6709:24): [True: 172, False: 592]
  ------------------
 6710|    172|    --p;
 6711|  1.17k|  *p = XML_T('\0');
  ------------------
  |  |  190|  1.17k|#  define XML_T(x) x
  ------------------
 6712|  1.17k|}
xmlparse.c:contentProcessor:
 2621|  11.1k|                 const char **endPtr) {
 2622|  11.1k|  enum XML_Error result = doContent(
 2623|  11.1k|      parser, 0, parser->m_encoding, start, end, endPtr,
 2624|  11.1k|      (XML_Bool)! parser->m_parsingStatus.finalBuffer, XML_ACCOUNT_DIRECT);
 2625|  11.1k|  if (result == XML_ERROR_NONE) {
  ------------------
  |  Branch (2625:7): [True: 6.92k, False: 4.19k]
  ------------------
 2626|  6.92k|    if (! storeRawNames(parser))
  ------------------
  |  Branch (2626:9): [True: 0, False: 6.92k]
  ------------------
 2627|      0|      return XML_ERROR_NO_MEMORY;
 2628|  6.92k|  }
 2629|  11.1k|  return result;
 2630|  11.1k|}
xmlparse.c:doContent:
 2751|   480k|          XML_Bool haveMore, enum XML_Account account) {
 2752|       |  /* save one level of indirection */
 2753|   480k|  DTD *const dtd = parser->m_dtd;
 2754|       |
 2755|   480k|  const char **eventPP;
 2756|   480k|  const char **eventEndPP;
 2757|   480k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (2757:7): [True: 11.1k, False: 469k]
  ------------------
 2758|  11.1k|    eventPP = &parser->m_eventPtr;
 2759|  11.1k|    eventEndPP = &parser->m_eventEndPtr;
 2760|   469k|  } else {
 2761|   469k|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 2762|   469k|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 2763|   469k|  }
 2764|   480k|  *eventPP = s;
 2765|       |
 2766|  6.91M|  for (;;) {
 2767|  6.91M|    const char *next = s; /* XmlContentTok doesn't always set the last arg */
 2768|  6.91M|    int tok = XmlContentTok(enc, s, end, &next);
  ------------------
  |  |  230|  6.91M|  XmlTok(enc, XML_CONTENT_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  6.91M|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 2769|  6.91M|#ifdef XML_DTD
 2770|  6.91M|    const char *accountAfter
 2771|  6.91M|        = ((tok == XML_TOK_TRAILING_RSQB) || (tok == XML_TOK_TRAILING_CR))
  ------------------
  |  |   46|  6.91M|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
                      = ((tok == XML_TOK_TRAILING_RSQB) || (tok == XML_TOK_TRAILING_CR))
  ------------------
  |  |   53|  6.65M|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (2771:12): [True: 266k, False: 6.65M]
  |  Branch (2771:46): [True: 42, False: 6.65M]
  ------------------
 2772|  6.91M|              ? (haveMore ? s /* i.e. 0 bytes */ : end)
  ------------------
  |  Branch (2772:18): [True: 74, False: 266k]
  ------------------
 2773|  6.91M|              : next;
 2774|  6.91M|    if (! accountingDiffTolerated(parser, tok, s, accountAfter, __LINE__,
  ------------------
  |  Branch (2774:9): [True: 10, False: 6.91M]
  ------------------
 2775|  6.91M|                                  account)) {
 2776|     10|      accountingOnAbort(parser);
 2777|     10|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 2778|     10|    }
 2779|  6.91M|#endif
 2780|  6.91M|    *eventEndPP = next;
 2781|  6.91M|    switch (tok) {
 2782|     42|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|     42|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (2782:5): [True: 42, False: 6.91M]
  ------------------
 2783|     42|      if (haveMore) {
  ------------------
  |  Branch (2783:11): [True: 42, False: 0]
  ------------------
 2784|     42|        *nextPtr = s;
 2785|     42|        return XML_ERROR_NONE;
 2786|     42|      }
 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|   206k|    case XML_TOK_NONE:
  ------------------
  |  |   51|   206k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (2802:5): [True: 206k, False: 6.71M]
  ------------------
 2803|   206k|      if (haveMore) {
  ------------------
  |  Branch (2803:11): [True: 3.71k, False: 202k]
  ------------------
 2804|  3.71k|        *nextPtr = s;
 2805|  3.71k|        return XML_ERROR_NONE;
 2806|  3.71k|      }
 2807|   202k|      if (startTagLevel > 0) {
  ------------------
  |  Branch (2807:11): [True: 202k, False: 0]
  ------------------
 2808|   202k|        if (parser->m_tagLevel != startTagLevel)
  ------------------
  |  Branch (2808:13): [True: 66, False: 202k]
  ------------------
 2809|     66|          return XML_ERROR_ASYNC_ENTITY;
 2810|   202k|        *nextPtr = s;
 2811|   202k|        return XML_ERROR_NONE;
 2812|   202k|      }
 2813|      0|      return XML_ERROR_NO_ELEMENTS;
 2814|  2.23k|    case XML_TOK_INVALID:
  ------------------
  |  |   57|  2.23k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (2814:5): [True: 2.23k, False: 6.91M]
  ------------------
 2815|  2.23k|      *eventPP = next;
 2816|  2.23k|      return XML_ERROR_INVALID_TOKEN;
 2817|  2.23k|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|  2.23k|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (2817:5): [True: 2.23k, False: 6.91M]
  ------------------
 2818|  2.23k|      if (haveMore) {
  ------------------
  |  Branch (2818:11): [True: 2.13k, False: 96]
  ------------------
 2819|  2.13k|        *nextPtr = s;
 2820|  2.13k|        return XML_ERROR_NONE;
 2821|  2.13k|      }
 2822|     96|      return XML_ERROR_UNCLOSED_TOKEN;
 2823|    314|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|    314|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (2823:5): [True: 314, False: 6.91M]
  ------------------
 2824|    314|      if (haveMore) {
  ------------------
  |  Branch (2824:11): [True: 314, False: 0]
  ------------------
 2825|    314|        *nextPtr = s;
 2826|    314|        return XML_ERROR_NONE;
 2827|    314|      }
 2828|      0|      return XML_ERROR_PARTIAL_CHAR;
 2829|   734k|    case XML_TOK_ENTITY_REF: {
  ------------------
  |  |   70|   734k|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (2829:5): [True: 734k, False: 6.18M]
  ------------------
 2830|   734k|      const XML_Char *name;
 2831|   734k|      ENTITY *entity;
 2832|   734k|      XML_Char ch = (XML_Char)XmlPredefinedEntityName(
  ------------------
  |  |  267|   734k|  (((enc)->predefinedEntityName)(enc, ptr, end))
  ------------------
 2833|   734k|          enc, s + enc->minBytesPerChar, next - enc->minBytesPerChar);
 2834|   734k|      if (ch) {
  ------------------
  |  Branch (2834:11): [True: 246k, False: 487k]
  ------------------
 2835|   246k|#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|   246k|        accountingDiffTolerated(parser, tok, (char *)&ch,
 2840|   246k|                                ((char *)&ch) + sizeof(XML_Char), __LINE__,
 2841|   246k|                                XML_ACCOUNT_ENTITY_EXPANSION);
 2842|   246k|#endif /* XML_DTD */
 2843|   246k|        if (parser->m_characterDataHandler)
  ------------------
  |  Branch (2843:13): [True: 0, False: 246k]
  ------------------
 2844|      0|          parser->m_characterDataHandler(parser->m_handlerArg, &ch, 1);
 2845|   246k|        else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2845:18): [True: 0, False: 246k]
  ------------------
 2846|      0|          reportDefault(parser, enc, s, next);
 2847|   246k|        break;
 2848|   246k|      }
 2849|   487k|      name = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 2850|   487k|                             next - enc->minBytesPerChar);
 2851|   487k|      if (! name)
  ------------------
  |  Branch (2851:11): [True: 0, False: 487k]
  ------------------
 2852|      0|        return XML_ERROR_NO_MEMORY;
 2853|   487k|      entity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, 0);
 2854|   487k|      poolDiscard(&dtd->pool);
  ------------------
  |  |  599|   487k|#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|   487k|      if (! dtd->hasParamEntityRefs || dtd->standalone) {
  ------------------
  |  Branch (2859:11): [True: 465k, False: 22.8k]
  |  Branch (2859:40): [True: 66, False: 22.7k]
  ------------------
 2860|   465k|        if (! entity)
  ------------------
  |  Branch (2860:13): [True: 351, False: 464k]
  ------------------
 2861|    351|          return XML_ERROR_UNDEFINED_ENTITY;
 2862|   464k|        else if (! entity->is_internal)
  ------------------
  |  Branch (2862:18): [True: 0, False: 464k]
  ------------------
 2863|      0|          return XML_ERROR_ENTITY_DECLARED_IN_PE;
 2864|   465k|      } else if (! entity) {
  ------------------
  |  Branch (2864:18): [True: 18.1k, False: 4.61k]
  ------------------
 2865|  18.1k|        if (parser->m_skippedEntityHandler)
  ------------------
  |  Branch (2865:13): [True: 0, False: 18.1k]
  ------------------
 2866|      0|          parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 2867|  18.1k|        else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2867:18): [True: 0, False: 18.1k]
  ------------------
 2868|      0|          reportDefault(parser, enc, s, next);
 2869|  18.1k|        break;
 2870|  18.1k|      }
 2871|   469k|      if (entity->open)
  ------------------
  |  Branch (2871:11): [True: 5, False: 469k]
  ------------------
 2872|      5|        return XML_ERROR_RECURSIVE_ENTITY_REF;
 2873|   469k|      if (entity->notation)
  ------------------
  |  Branch (2873:11): [True: 1, False: 469k]
  ------------------
 2874|      1|        return XML_ERROR_BINARY_ENTITY_REF;
 2875|   469k|      if (entity->textPtr) {
  ------------------
  |  Branch (2875:11): [True: 469k, False: 70]
  ------------------
 2876|   469k|        enum XML_Error result;
 2877|   469k|        if (! parser->m_defaultExpandInternalEntities) {
  ------------------
  |  Branch (2877:13): [True: 0, False: 469k]
  ------------------
 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|   469k|        result = processInternalEntity(parser, entity, XML_FALSE);
  ------------------
  |  |   56|   469k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2886|   469k|        if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (2886:13): [True: 973, False: 468k]
  ------------------
 2887|    973|          return result;
 2888|   469k|      } else if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (2888:18): [True: 0, False: 70]
  ------------------
 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|     70|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2900:18): [True: 0, False: 70]
  ------------------
 2901|      0|        reportDefault(parser, enc, s, next);
 2902|   468k|      break;
 2903|   469k|    }
 2904|  3.88M|    case XML_TOK_START_TAG_NO_ATTS:
  ------------------
  |  |   63|  3.88M|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  |  Branch (2904:5): [True: 3.88M, False: 3.02M]
  ------------------
 2905|       |      /* fall through */
 2906|  3.89M|    case XML_TOK_START_TAG_WITH_ATTS: {
  ------------------
  |  |   62|  3.89M|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  |  Branch (2906:5): [True: 10.0k, False: 6.90M]
  ------------------
 2907|  3.89M|      TAG *tag;
 2908|  3.89M|      enum XML_Error result;
 2909|  3.89M|      XML_Char *toPtr;
 2910|  3.89M|      if (parser->m_freeTagList) {
  ------------------
  |  Branch (2910:11): [True: 74.5k, False: 3.82M]
  ------------------
 2911|  74.5k|        tag = parser->m_freeTagList;
 2912|  74.5k|        parser->m_freeTagList = parser->m_freeTagList->parent;
 2913|  3.82M|      } else {
 2914|  3.82M|        tag = (TAG *)MALLOC(parser, sizeof(TAG));
  ------------------
  |  |  713|  3.82M|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2915|  3.82M|        if (! tag)
  ------------------
  |  Branch (2915:13): [True: 0, False: 3.82M]
  ------------------
 2916|      0|          return XML_ERROR_NO_MEMORY;
 2917|  3.82M|        tag->buf = (char *)MALLOC(parser, INIT_TAG_BUF_SIZE);
  ------------------
  |  |  713|  3.82M|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2918|  3.82M|        if (! tag->buf) {
  ------------------
  |  Branch (2918:13): [True: 0, False: 3.82M]
  ------------------
 2919|      0|          FREE(parser, tag);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 2920|      0|          return XML_ERROR_NO_MEMORY;
 2921|      0|        }
 2922|  3.82M|        tag->bufEnd = tag->buf + INIT_TAG_BUF_SIZE;
  ------------------
  |  |  241|  3.82M|#define INIT_TAG_BUF_SIZE 32 /* must be a multiple of sizeof(XML_Char) */
  ------------------
 2923|  3.82M|      }
 2924|  3.89M|      tag->bindings = NULL;
 2925|  3.89M|      tag->parent = parser->m_tagStack;
 2926|  3.89M|      parser->m_tagStack = tag;
 2927|  3.89M|      tag->name.localPart = NULL;
 2928|  3.89M|      tag->name.prefix = NULL;
 2929|  3.89M|      tag->rawName = s + enc->minBytesPerChar;
 2930|  3.89M|      tag->rawNameLength = XmlNameLength(enc, tag->rawName);
  ------------------
  |  |  257|  3.89M|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 2931|  3.89M|      ++parser->m_tagLevel;
 2932|  3.89M|      {
 2933|  3.89M|        const char *rawNameEnd = tag->rawName + tag->rawNameLength;
 2934|  3.89M|        const char *fromPtr = tag->rawName;
 2935|  3.89M|        toPtr = (XML_Char *)tag->buf;
 2936|  3.90M|        for (;;) {
 2937|  3.90M|          int bufSize;
 2938|  3.90M|          int convLen;
 2939|  3.90M|          const enum XML_Convert_Result convert_res
 2940|  3.90M|              = XmlConvert(enc, &fromPtr, rawNameEnd, (ICHAR **)&toPtr,
  ------------------
  |  |  160|  3.90M|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|  3.90M|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 2941|  3.90M|                           (ICHAR *)tag->bufEnd - 1);
 2942|  3.90M|          convLen = (int)(toPtr - (XML_Char *)tag->buf);
 2943|  3.90M|          if ((fromPtr >= rawNameEnd)
  ------------------
  |  Branch (2943:15): [True: 3.89M, False: 2.82k]
  ------------------
 2944|  3.90M|              || (convert_res == XML_CONVERT_INPUT_INCOMPLETE)) {
  ------------------
  |  Branch (2944:18): [True: 0, False: 2.82k]
  ------------------
 2945|  3.89M|            tag->name.strLen = convLen;
 2946|  3.89M|            break;
 2947|  3.89M|          }
 2948|  2.82k|          bufSize = (int)(tag->bufEnd - tag->buf) << 1;
 2949|  2.82k|          {
 2950|  2.82k|            char *temp = (char *)REALLOC(parser, tag->buf, bufSize);
  ------------------
  |  |  714|  2.82k|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 2951|  2.82k|            if (temp == NULL)
  ------------------
  |  Branch (2951:17): [True: 0, False: 2.82k]
  ------------------
 2952|      0|              return XML_ERROR_NO_MEMORY;
 2953|  2.82k|            tag->buf = temp;
 2954|  2.82k|            tag->bufEnd = temp + bufSize;
 2955|  2.82k|            toPtr = (XML_Char *)temp + convLen;
 2956|  2.82k|          }
 2957|  2.82k|        }
 2958|  3.89M|      }
 2959|  3.89M|      tag->name.str = (XML_Char *)tag->buf;
 2960|  3.89M|      *toPtr = XML_T('\0');
  ------------------
  |  |  190|  3.89M|#  define XML_T(x) x
  ------------------
 2961|  3.89M|      result
 2962|  3.89M|          = storeAtts(parser, enc, s, &(tag->name), &(tag->bindings), account);
 2963|  3.89M|      if (result)
  ------------------
  |  Branch (2963:11): [True: 642, False: 3.89M]
  ------------------
 2964|    642|        return result;
 2965|  3.89M|      if (parser->m_startElementHandler)
  ------------------
  |  Branch (2965:11): [True: 3.89M, False: 0]
  ------------------
 2966|  3.89M|        parser->m_startElementHandler(parser->m_handlerArg, tag->name.str,
 2967|  3.89M|                                      (const XML_Char **)parser->m_atts);
 2968|      0|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2968:16): [True: 0, False: 0]
  ------------------
 2969|      0|        reportDefault(parser, enc, s, next);
 2970|  3.89M|      poolClear(&parser->m_tempPool);
 2971|  3.89M|      break;
 2972|  3.89M|    }
 2973|  5.66k|    case XML_TOK_EMPTY_ELEMENT_NO_ATTS:
  ------------------
  |  |   65|  5.66k|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  |  Branch (2973:5): [True: 5.66k, False: 6.91M]
  ------------------
 2974|       |      /* fall through */
 2975|  38.6k|    case XML_TOK_EMPTY_ELEMENT_WITH_ATTS: {
  ------------------
  |  |   64|  38.6k|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  |  Branch (2975:5): [True: 32.9k, False: 6.88M]
  ------------------
 2976|  38.6k|      const char *rawName = s + enc->minBytesPerChar;
 2977|  38.6k|      enum XML_Error result;
 2978|  38.6k|      BINDING *bindings = NULL;
 2979|  38.6k|      XML_Bool noElmHandlers = XML_TRUE;
  ------------------
  |  |   55|  38.6k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2980|  38.6k|      TAG_NAME name;
 2981|  38.6k|      name.str = poolStoreString(&parser->m_tempPool, enc, rawName,
 2982|  38.6k|                                 rawName + XmlNameLength(enc, rawName));
  ------------------
  |  |  257|  38.6k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 2983|  38.6k|      if (! name.str)
  ------------------
  |  Branch (2983:11): [True: 0, False: 38.6k]
  ------------------
 2984|      0|        return XML_ERROR_NO_MEMORY;
 2985|  38.6k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|  38.6k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 2986|  38.6k|      result = storeAtts(parser, enc, s, &name, &bindings,
 2987|  38.6k|                         XML_ACCOUNT_NONE /* token spans whole start tag */);
 2988|  38.6k|      if (result != XML_ERROR_NONE) {
  ------------------
  |  Branch (2988:11): [True: 11, False: 38.6k]
  ------------------
 2989|     11|        freeBindings(parser, bindings);
 2990|     11|        return result;
 2991|     11|      }
 2992|  38.6k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|  38.6k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 2993|  38.6k|      if (parser->m_startElementHandler) {
  ------------------
  |  Branch (2993:11): [True: 38.6k, False: 0]
  ------------------
 2994|  38.6k|        parser->m_startElementHandler(parser->m_handlerArg, name.str,
 2995|  38.6k|                                      (const XML_Char **)parser->m_atts);
 2996|  38.6k|        noElmHandlers = XML_FALSE;
  ------------------
  |  |   56|  38.6k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2997|  38.6k|      }
 2998|  38.6k|      if (parser->m_endElementHandler) {
  ------------------
  |  Branch (2998:11): [True: 38.6k, False: 0]
  ------------------
 2999|  38.6k|        if (parser->m_startElementHandler)
  ------------------
  |  Branch (2999:13): [True: 38.6k, False: 0]
  ------------------
 3000|  38.6k|          *eventPP = *eventEndPP;
 3001|  38.6k|        parser->m_endElementHandler(parser->m_handlerArg, name.str);
 3002|  38.6k|        noElmHandlers = XML_FALSE;
  ------------------
  |  |   56|  38.6k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 3003|  38.6k|      }
 3004|  38.6k|      if (noElmHandlers && parser->m_defaultHandler)
  ------------------
  |  Branch (3004:11): [True: 0, False: 38.6k]
  |  Branch (3004:28): [True: 0, False: 0]
  ------------------
 3005|      0|        reportDefault(parser, enc, s, next);
 3006|  38.6k|      poolClear(&parser->m_tempPool);
 3007|  38.6k|      freeBindings(parser, bindings);
 3008|  38.6k|    }
 3009|  38.6k|      if ((parser->m_tagLevel == 0)
  ------------------
  |  Branch (3009:11): [True: 117, False: 38.4k]
  ------------------
 3010|  38.6k|          && (parser->m_parsingStatus.parsing != XML_FINISHED)) {
  ------------------
  |  Branch (3010:14): [True: 117, False: 0]
  ------------------
 3011|    117|        if (parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (3011:13): [True: 0, False: 117]
  ------------------
 3012|      0|          parser->m_processor = epilogProcessor;
 3013|    117|        else
 3014|    117|          return epilogProcessor(parser, next, end, nextPtr);
 3015|    117|      }
 3016|  38.4k|      break;
 3017|  75.2k|    case XML_TOK_END_TAG:
  ------------------
  |  |   66|  75.2k|#define XML_TOK_END_TAG 5
  ------------------
  |  Branch (3017:5): [True: 75.2k, False: 6.84M]
  ------------------
 3018|  75.2k|      if (parser->m_tagLevel == startTagLevel)
  ------------------
  |  Branch (3018:11): [True: 4, False: 75.2k]
  ------------------
 3019|      4|        return XML_ERROR_ASYNC_ENTITY;
 3020|  75.2k|      else {
 3021|  75.2k|        int len;
 3022|  75.2k|        const char *rawName;
 3023|  75.2k|        TAG *tag = parser->m_tagStack;
 3024|  75.2k|        rawName = s + enc->minBytesPerChar * 2;
 3025|  75.2k|        len = XmlNameLength(enc, rawName);
  ------------------
  |  |  257|  75.2k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 3026|  75.2k|        if (len != tag->rawNameLength
  ------------------
  |  Branch (3026:13): [True: 45, False: 75.1k]
  ------------------
 3027|  75.2k|            || memcmp(tag->rawName, rawName, len) != 0) {
  ------------------
  |  Branch (3027:16): [True: 180, False: 74.9k]
  ------------------
 3028|    225|          *eventPP = rawName;
 3029|    225|          return XML_ERROR_TAG_MISMATCH;
 3030|    225|        }
 3031|  74.9k|        parser->m_tagStack = tag->parent;
 3032|  74.9k|        tag->parent = parser->m_freeTagList;
 3033|  74.9k|        parser->m_freeTagList = tag;
 3034|  74.9k|        --parser->m_tagLevel;
 3035|  74.9k|        if (parser->m_endElementHandler) {
  ------------------
  |  Branch (3035:13): [True: 74.9k, False: 0]
  ------------------
 3036|  74.9k|          const XML_Char *localPart;
 3037|  74.9k|          const XML_Char *prefix;
 3038|  74.9k|          XML_Char *uri;
 3039|  74.9k|          localPart = tag->name.localPart;
 3040|  74.9k|          if (parser->m_ns && localPart) {
  ------------------
  |  Branch (3040:15): [True: 0, False: 74.9k]
  |  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|  74.9k|          parser->m_endElementHandler(parser->m_handlerArg, tag->name.str);
 3058|  74.9k|        } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3058:20): [True: 0, False: 0]
  ------------------
 3059|      0|          reportDefault(parser, enc, s, next);
 3060|  74.9k|        while (tag->bindings) {
  ------------------
  |  Branch (3060:16): [True: 0, False: 74.9k]
  ------------------
 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|  74.9k|        if ((parser->m_tagLevel == 0)
  ------------------
  |  Branch (3070:13): [True: 44, False: 74.9k]
  ------------------
 3071|  74.9k|            && (parser->m_parsingStatus.parsing != XML_FINISHED)) {
  ------------------
  |  Branch (3071:16): [True: 44, False: 0]
  ------------------
 3072|     44|          if (parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (3072:15): [True: 0, False: 44]
  ------------------
 3073|      0|            parser->m_processor = epilogProcessor;
 3074|     44|          else
 3075|     44|            return epilogProcessor(parser, next, end, nextPtr);
 3076|     44|        }
 3077|  74.9k|      }
 3078|  74.9k|      break;
 3079|  74.9k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  8.27k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (3079:5): [True: 8.27k, False: 6.90M]
  ------------------
 3080|  8.27k|      int n = XmlCharRefNumber(enc, s);
  ------------------
  |  |  264|  8.27k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 3081|  8.27k|      if (n < 0)
  ------------------
  |  Branch (3081:11): [True: 200, False: 8.07k]
  ------------------
 3082|    200|        return XML_ERROR_BAD_CHAR_REF;
 3083|  8.07k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3083:11): [True: 0, False: 8.07k]
  ------------------
 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|  8.07k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3087:18): [True: 0, False: 8.07k]
  ------------------
 3088|      0|        reportDefault(parser, enc, s, next);
 3089|  8.07k|    } break;
 3090|      7|    case XML_TOK_XML_DECL:
  ------------------
  |  |   77|      7|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (3090:5): [True: 7, False: 6.91M]
  ------------------
 3091|      7|      return XML_ERROR_MISPLACED_XML_PI;
 3092|   364k|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|   364k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (3092:5): [True: 364k, False: 6.55M]
  ------------------
 3093|   364k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3093:11): [True: 0, False: 364k]
  ------------------
 3094|      0|        XML_Char c = 0xA;
 3095|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 3096|   364k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3096:18): [True: 0, False: 364k]
  ------------------
 3097|      0|        reportDefault(parser, enc, s, next);
 3098|   364k|      break;
 3099|  2.67k|    case XML_TOK_CDATA_SECT_OPEN: {
  ------------------
  |  |   69|  2.67k|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  |  Branch (3099:5): [True: 2.67k, False: 6.91M]
  ------------------
 3100|  2.67k|      enum XML_Error result;
 3101|  2.67k|      if (parser->m_startCdataSectionHandler)
  ------------------
  |  Branch (3101:11): [True: 0, False: 2.67k]
  ------------------
 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.67k|      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.67k|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3120:16): [True: 0, False: 2.67k]
  ------------------
 3121|      0|        reportDefault(parser, enc, s, next);
 3122|  2.67k|      result
 3123|  2.67k|          = doCdataSection(parser, enc, &next, end, nextPtr, haveMore, account);
 3124|  2.67k|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (3124:11): [True: 238, False: 2.43k]
  ------------------
 3125|    238|        return result;
 3126|  2.43k|      else if (! next) {
  ------------------
  |  Branch (3126:16): [True: 606, False: 1.82k]
  ------------------
 3127|    606|        parser->m_processor = cdataSectionProcessor;
 3128|    606|        return result;
 3129|    606|      }
 3130|  2.67k|    } break;
 3131|   266k|    case XML_TOK_TRAILING_RSQB:
  ------------------
  |  |   46|   266k|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  |  Branch (3131:5): [True: 266k, False: 6.65M]
  ------------------
 3132|   266k|      if (haveMore) {
  ------------------
  |  Branch (3132:11): [True: 32, False: 266k]
  ------------------
 3133|     32|        *nextPtr = s;
 3134|     32|        return XML_ERROR_NONE;
 3135|     32|      }
 3136|   266k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3136:11): [True: 0, False: 266k]
  ------------------
 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|   266k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3147:18): [True: 0, False: 266k]
  ------------------
 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|   266k|      if (startTagLevel == 0) {
  ------------------
  |  Branch (3152:11): [True: 0, False: 266k]
  ------------------
 3153|      0|        *eventPP = end;
 3154|      0|        return XML_ERROR_NO_ELEMENTS;
 3155|      0|      }
 3156|   266k|      if (parser->m_tagLevel != startTagLevel) {
  ------------------
  |  Branch (3156:11): [True: 29, False: 266k]
  ------------------
 3157|     29|        *eventPP = end;
 3158|     29|        return XML_ERROR_ASYNC_ENTITY;
 3159|     29|      }
 3160|   266k|      *nextPtr = end;
 3161|   266k|      return XML_ERROR_NONE;
 3162|  1.30M|    case XML_TOK_DATA_CHARS: {
  ------------------
  |  |   67|  1.30M|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (3162:5): [True: 1.30M, False: 5.61M]
  ------------------
 3163|  1.30M|      XML_CharacterDataHandler charDataHandler = parser->m_characterDataHandler;
 3164|  1.30M|      if (charDataHandler) {
  ------------------
  |  Branch (3164:11): [True: 0, False: 1.30M]
  ------------------
 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|  1.30M|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3181:18): [True: 0, False: 1.30M]
  ------------------
 3182|      0|        reportDefault(parser, enc, s, next);
 3183|  1.30M|    } break;
 3184|  11.1k|    case XML_TOK_PI:
  ------------------
  |  |   76|  11.1k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (3184:5): [True: 11.1k, False: 6.90M]
  ------------------
 3185|  11.1k|      if (! reportProcessingInstruction(parser, enc, s, next))
  ------------------
  |  Branch (3185:11): [True: 0, False: 11.1k]
  ------------------
 3186|      0|        return XML_ERROR_NO_MEMORY;
 3187|  11.1k|      break;
 3188|  11.1k|    case XML_TOK_COMMENT:
  ------------------
  |  |   78|  1.15k|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (3188:5): [True: 1.15k, False: 6.91M]
  ------------------
 3189|  1.15k|      if (! reportComment(parser, enc, s, next))
  ------------------
  |  Branch (3189:11): [True: 0, False: 1.15k]
  ------------------
 3190|      0|        return XML_ERROR_NO_MEMORY;
 3191|  1.15k|      break;
 3192|  1.15k|    default:
  ------------------
  |  Branch (3192:5): [True: 0, False: 6.91M]
  ------------------
 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|  6.91M|    }
 3205|  6.43M|    *eventPP = s = next;
 3206|  6.43M|    switch (parser->m_parsingStatus.parsing) {
 3207|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (3207:5): [True: 0, False: 6.43M]
  ------------------
 3208|      0|      *nextPtr = next;
 3209|      0|      return XML_ERROR_NONE;
 3210|      0|    case XML_FINISHED:
  ------------------
  |  Branch (3210:5): [True: 0, False: 6.43M]
  ------------------
 3211|      0|      return XML_ERROR_ABORTED;
 3212|  6.43M|    default:;
  ------------------
  |  Branch (3212:5): [True: 6.43M, False: 0]
  ------------------
 3213|  6.43M|    }
 3214|  6.43M|  }
 3215|       |  /* not reached */
 3216|   480k|}
xmlparse.c:hashTableIterInit:
 7158|  19.2k|hashTableIterInit(HASH_TABLE_ITER *iter, const HASH_TABLE *table) {
 7159|  19.2k|  iter->p = table->v;
 7160|  19.2k|  iter->end = iter->p ? iter->p + table->size : NULL;
  ------------------
  |  Branch (7160:15): [True: 10.2k, False: 8.91k]
  ------------------
 7161|  19.2k|}
xmlparse.c:hashTableIterNext:
 7164|  43.2k|hashTableIterNext(HASH_TABLE_ITER *iter) {
 7165|   704k|  while (iter->p != iter->end) {
  ------------------
  |  Branch (7165:10): [True: 684k, False: 19.2k]
  ------------------
 7166|   684k|    NAMED *tem = *(iter->p)++;
 7167|   684k|    if (tem)
  ------------------
  |  Branch (7167:9): [True: 24.0k, False: 660k]
  ------------------
 7168|  24.0k|      return tem;
 7169|   684k|  }
 7170|  19.2k|  return NULL;
 7171|  43.2k|}
xmlparse.c:storeAtts:
 3253|  3.93M|          enum XML_Account account) {
 3254|  3.93M|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 3255|  3.93M|  ELEMENT_TYPE *elementType;
 3256|  3.93M|  int nDefaultAtts;
 3257|  3.93M|  const XML_Char **appAtts; /* the attribute list for the application */
 3258|  3.93M|  int attIndex = 0;
 3259|  3.93M|  int prefixLen;
 3260|  3.93M|  int i;
 3261|  3.93M|  int n;
 3262|  3.93M|  XML_Char *uri;
 3263|  3.93M|  int nPrefixes = 0;
 3264|  3.93M|  BINDING *binding;
 3265|  3.93M|  const XML_Char *localPart;
 3266|       |
 3267|       |  /* lookup the element type name */
 3268|  3.93M|  elementType
 3269|  3.93M|      = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, tagNamePtr->str, 0);
 3270|  3.93M|  if (! elementType) {
  ------------------
  |  Branch (3270:7): [True: 15.1k, False: 3.92M]
  ------------------
 3271|  15.1k|    const XML_Char *name = poolCopyString(&dtd->pool, tagNamePtr->str);
 3272|  15.1k|    if (! name)
  ------------------
  |  Branch (3272:9): [True: 0, False: 15.1k]
  ------------------
 3273|      0|      return XML_ERROR_NO_MEMORY;
 3274|  15.1k|    elementType = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, name,
 3275|  15.1k|                                         sizeof(ELEMENT_TYPE));
 3276|  15.1k|    if (! elementType)
  ------------------
  |  Branch (3276:9): [True: 0, False: 15.1k]
  ------------------
 3277|      0|      return XML_ERROR_NO_MEMORY;
 3278|  15.1k|    if (parser->m_ns && ! setElementTypePrefix(parser, elementType))
  ------------------
  |  Branch (3278:9): [True: 0, False: 15.1k]
  |  Branch (3278:25): [True: 0, False: 0]
  ------------------
 3279|      0|      return XML_ERROR_NO_MEMORY;
 3280|  15.1k|  }
 3281|  3.93M|  nDefaultAtts = elementType->nDefaultAtts;
 3282|       |
 3283|       |  /* get the attributes from the tokenizer */
 3284|  3.93M|  n = XmlGetAttributes(enc, attStr, parser->m_attsSize, parser->m_atts);
  ------------------
  |  |  262|  3.93M|  (((enc)->getAtts)(enc, ptr, attsMax, atts))
  ------------------
 3285|       |
 3286|       |  /* Detect and prevent integer overflow */
 3287|  3.93M|  if (n > INT_MAX - nDefaultAtts) {
  ------------------
  |  Branch (3287:7): [True: 0, False: 3.93M]
  ------------------
 3288|      0|    return XML_ERROR_NO_MEMORY;
 3289|      0|  }
 3290|       |
 3291|  3.93M|  if (n + nDefaultAtts > parser->m_attsSize) {
  ------------------
  |  Branch (3291:7): [True: 382, False: 3.93M]
  ------------------
 3292|    382|    int oldAttsSize = parser->m_attsSize;
 3293|    382|    ATTRIBUTE *temp;
 3294|       |#ifdef XML_ATTR_INFO
 3295|       |    XML_AttrInfo *temp2;
 3296|       |#endif
 3297|       |
 3298|       |    /* Detect and prevent integer overflow */
 3299|    382|    if ((nDefaultAtts > INT_MAX - INIT_ATTS_SIZE)
  ------------------
  |  |  243|    382|#define INIT_ATTS_SIZE 16
  ------------------
  |  Branch (3299:9): [True: 0, False: 382]
  ------------------
 3300|    382|        || (n > INT_MAX - (nDefaultAtts + INIT_ATTS_SIZE))) {
  ------------------
  |  |  243|    382|#define INIT_ATTS_SIZE 16
  ------------------
  |  Branch (3300:12): [True: 0, False: 382]
  ------------------
 3301|      0|      return XML_ERROR_NO_MEMORY;
 3302|      0|    }
 3303|       |
 3304|    382|    parser->m_attsSize = n + nDefaultAtts + INIT_ATTS_SIZE;
  ------------------
  |  |  243|    382|#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|    382|    temp = (ATTRIBUTE *)REALLOC(parser, (void *)parser->m_atts,
  ------------------
  |  |  714|    382|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 3318|    382|                                parser->m_attsSize * sizeof(ATTRIBUTE));
 3319|    382|    if (temp == NULL) {
  ------------------
  |  Branch (3319:9): [True: 0, False: 382]
  ------------------
 3320|      0|      parser->m_attsSize = oldAttsSize;
 3321|      0|      return XML_ERROR_NO_MEMORY;
 3322|      0|    }
 3323|    382|    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|    382|    if (n > oldAttsSize)
  ------------------
  |  Branch (3344:9): [True: 364, False: 18]
  ------------------
 3345|    364|      XmlGetAttributes(enc, attStr, n, parser->m_atts);
  ------------------
  |  |  262|    364|  (((enc)->getAtts)(enc, ptr, attsMax, atts))
  ------------------
 3346|    382|  }
 3347|       |
 3348|  3.93M|  appAtts = (const XML_Char **)parser->m_atts;
 3349|  4.00M|  for (i = 0; i < n; i++) {
  ------------------
  |  Branch (3349:15): [True: 71.3k, False: 3.93M]
  ------------------
 3350|  71.3k|    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|  71.3k|    ATTRIBUTE_ID *attId
 3356|  71.3k|        = getAttributeId(parser, enc, currAtt->name,
 3357|  71.3k|                         currAtt->name + XmlNameLength(enc, currAtt->name));
  ------------------
  |  |  257|  71.3k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 3358|  71.3k|    if (! attId)
  ------------------
  |  Branch (3358:9): [True: 0, False: 71.3k]
  ------------------
 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|  71.3k|    if ((attId->name)[-1]) {
  ------------------
  |  Branch (3374:9): [True: 438, False: 70.9k]
  ------------------
 3375|    438|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (3375:11): [True: 408, False: 30]
  ------------------
 3376|    408|        parser->m_eventPtr = parser->m_atts[i].name;
 3377|    438|      return XML_ERROR_DUPLICATE_ATTRIBUTE;
 3378|    438|    }
 3379|  70.9k|    (attId->name)[-1] = 1;
 3380|  70.9k|    appAtts[attIndex++] = attId->name;
 3381|  70.9k|    if (! parser->m_atts[i].normalized) {
  ------------------
  |  Branch (3381:9): [True: 7.68k, False: 63.2k]
  ------------------
 3382|  7.68k|      enum XML_Error result;
 3383|  7.68k|      XML_Bool isCdata = XML_TRUE;
  ------------------
  |  |   55|  7.68k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 3384|       |
 3385|       |      /* figure out whether declared as other than CDATA */
 3386|  7.68k|      if (attId->maybeTokenized) {
  ------------------
  |  Branch (3386:11): [True: 1.04k, False: 6.64k]
  ------------------
 3387|  1.04k|        int j;
 3388|  69.1k|        for (j = 0; j < nDefaultAtts; j++) {
  ------------------
  |  Branch (3388:21): [True: 68.8k, False: 261]
  ------------------
 3389|  68.8k|          if (attId == elementType->defaultAtts[j].id) {
  ------------------
  |  Branch (3389:15): [True: 783, False: 68.0k]
  ------------------
 3390|    783|            isCdata = elementType->defaultAtts[j].isCdata;
 3391|    783|            break;
 3392|    783|          }
 3393|  68.8k|        }
 3394|  1.04k|      }
 3395|       |
 3396|       |      /* normalize the attribute value */
 3397|  7.68k|      result = storeAttributeValue(
 3398|  7.68k|          parser, enc, isCdata, parser->m_atts[i].valuePtr,
 3399|  7.68k|          parser->m_atts[i].valueEnd, &parser->m_tempPool, account);
 3400|  7.68k|      if (result)
  ------------------
  |  Branch (3400:11): [True: 215, False: 7.47k]
  ------------------
 3401|    215|        return result;
 3402|  7.47k|      appAtts[attIndex] = poolStart(&parser->m_tempPool);
  ------------------
  |  |  595|  7.47k|#define poolStart(pool) ((pool)->start)
  ------------------
 3403|  7.47k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|  7.47k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3404|  63.2k|    } else {
 3405|       |      /* the value did not need normalizing */
 3406|  63.2k|      appAtts[attIndex] = poolStoreString(&parser->m_tempPool, enc,
 3407|  63.2k|                                          parser->m_atts[i].valuePtr,
 3408|  63.2k|                                          parser->m_atts[i].valueEnd);
 3409|  63.2k|      if (appAtts[attIndex] == 0)
  ------------------
  |  Branch (3409:11): [True: 0, False: 63.2k]
  ------------------
 3410|      0|        return XML_ERROR_NO_MEMORY;
 3411|  63.2k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  600|  63.2k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3412|  63.2k|    }
 3413|       |    /* handle prefixed attribute names */
 3414|  70.7k|    if (attId->prefix) {
  ------------------
  |  Branch (3414:9): [True: 0, False: 70.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|  70.7k|      attIndex++;
 3430|  70.7k|  }
 3431|       |
 3432|       |  /* set-up for XML_GetSpecifiedAttributeCount and XML_GetIdAttributeIndex */
 3433|  3.93M|  parser->m_nSpecifiedAtts = attIndex;
 3434|  3.93M|  if (elementType->idAtt && (elementType->idAtt->name)[-1]) {
  ------------------
  |  Branch (3434:7): [True: 863, False: 3.93M]
  |  Branch (3434:29): [True: 632, False: 231]
  ------------------
 3435|    834|    for (i = 0; i < attIndex; i += 2)
  ------------------
  |  Branch (3435:17): [True: 834, False: 0]
  ------------------
 3436|    834|      if (appAtts[i] == elementType->idAtt->name) {
  ------------------
  |  Branch (3436:11): [True: 632, False: 202]
  ------------------
 3437|    632|        parser->m_idAttIndex = i;
 3438|    632|        break;
 3439|    632|      }
 3440|    632|  } else
 3441|  3.93M|    parser->m_idAttIndex = -1;
 3442|       |
 3443|       |  /* do attribute defaulting */
 3444|  4.03M|  for (i = 0; i < nDefaultAtts; i++) {
  ------------------
  |  Branch (3444:15): [True: 101k, False: 3.93M]
  ------------------
 3445|   101k|    const DEFAULT_ATTRIBUTE *da = elementType->defaultAtts + i;
 3446|   101k|    if (! (da->id->name)[-1] && da->value) {
  ------------------
  |  Branch (3446:9): [True: 100k, False: 959]
  |  Branch (3446:33): [True: 434, False: 100k]
  ------------------
 3447|    434|      if (da->id->prefix) {
  ------------------
  |  Branch (3447:11): [True: 0, False: 434]
  ------------------
 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|    434|      } else {
 3460|    434|        (da->id->name)[-1] = 1;
 3461|    434|        appAtts[attIndex++] = da->id->name;
 3462|    434|        appAtts[attIndex++] = da->value;
 3463|    434|      }
 3464|    434|    }
 3465|   101k|  }
 3466|  3.93M|  appAtts[attIndex] = 0;
 3467|       |
 3468|       |  /* expand prefixed attribute names, check for duplicates,
 3469|       |     and clear flags that say whether attributes were specified */
 3470|  3.93M|  i = 0;
 3471|  3.93M|  if (nPrefixes) {
  ------------------
  |  Branch (3471:7): [True: 0, False: 3.93M]
  ------------------
 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|  4.00M|  for (; i < attIndex; i += 2)
  ------------------
  |  Branch (3638:10): [True: 70.1k, False: 3.93M]
  ------------------
 3639|  70.1k|    ((XML_Char *)(appAtts[i]))[-1] = 0;
 3640|  3.93M|  for (binding = *bindingsPtr; binding; binding = binding->nextTagBinding)
  ------------------
  |  Branch (3640:32): [True: 0, False: 3.93M]
  ------------------
 3641|      0|    binding->attId->name[-1] = 0;
 3642|       |
 3643|  3.93M|  if (! parser->m_ns)
  ------------------
  |  Branch (3643:7): [True: 3.93M, False: 0]
  ------------------
 3644|  3.93M|    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|  8.85k|setElementTypePrefix(XML_Parser parser, ELEMENT_TYPE *elementType) {
 6447|  8.85k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6448|  8.85k|  const XML_Char *name;
 6449|   164k|  for (name = elementType->name; *name; name++) {
  ------------------
  |  Branch (6449:34): [True: 159k, False: 5.28k]
  ------------------
 6450|   159k|    if (*name == XML_T(ASCII_COLON)) {
  ------------------
  |  |  190|   159k|#  define XML_T(x) x
  ------------------
  |  Branch (6450:9): [True: 3.57k, False: 155k]
  ------------------
 6451|  3.57k|      PREFIX *prefix;
 6452|  3.57k|      const XML_Char *s;
 6453|  89.4k|      for (s = elementType->name; s != name; s++) {
  ------------------
  |  Branch (6453:35): [True: 85.9k, False: 3.57k]
  ------------------
 6454|  85.9k|        if (! poolAppendChar(&dtd->pool, *s))
  ------------------
  |  |  602|  85.9k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 116, False: 85.7k]
  |  |  |  Branch (602:35): [True: 0, False: 116]
  |  |  ------------------
  |  |  603|  85.9k|       ? 0                                                                     \
  |  |  604|  85.9k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6454:13): [True: 0, False: 85.9k]
  ------------------
 6455|      0|          return 0;
 6456|  85.9k|      }
 6457|  3.57k|      if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  602|  3.57k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 11, False: 3.56k]
  |  |  |  Branch (602:35): [True: 0, False: 11]
  |  |  ------------------
  |  |  603|  3.57k|       ? 0                                                                     \
  |  |  604|  3.57k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6457:11): [True: 0, False: 3.57k]
  ------------------
 6458|      0|        return 0;
 6459|  3.57k|      prefix = (PREFIX *)lookup(parser, &dtd->prefixes, poolStart(&dtd->pool),
  ------------------
  |  |  595|  3.57k|#define poolStart(pool) ((pool)->start)
  ------------------
 6460|  3.57k|                                sizeof(PREFIX));
 6461|  3.57k|      if (! prefix)
  ------------------
  |  Branch (6461:11): [True: 0, False: 3.57k]
  ------------------
 6462|      0|        return 0;
 6463|  3.57k|      if (prefix->name == poolStart(&dtd->pool))
  ------------------
  |  |  595|  3.57k|#define poolStart(pool) ((pool)->start)
  ------------------
  |  Branch (6463:11): [True: 2.92k, False: 651]
  ------------------
 6464|  2.92k|        poolFinish(&dtd->pool);
  ------------------
  |  |  600|  2.92k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6465|    651|      else
 6466|    651|        poolDiscard(&dtd->pool);
  ------------------
  |  |  599|    651|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6467|  3.57k|      elementType->prefix = prefix;
 6468|  3.57k|      break;
 6469|  3.57k|    }
 6470|   159k|  }
 6471|  8.85k|  return 1;
 6472|  8.85k|}
xmlparse.c:freeBindings:
 3223|  38.6k|freeBindings(XML_Parser parser, BINDING *bindings) {
 3224|  38.6k|  while (bindings) {
  ------------------
  |  Branch (3224:10): [True: 0, False: 38.6k]
  ------------------
 3225|      0|    BINDING *b = bindings;
 3226|       |
 3227|       |    /* m_startNamespaceDeclHandler will have been called for this
 3228|       |     * binding in addBindings(), so call the end handler now.
 3229|       |     */
 3230|      0|    if (parser->m_endNamespaceDeclHandler)
  ------------------
  |  Branch (3230:9): [True: 0, False: 0]
  ------------------
 3231|      0|      parser->m_endNamespaceDeclHandler(parser->m_handlerArg, b->prefix->name);
 3232|       |
 3233|      0|    bindings = bindings->nextTagBinding;
 3234|      0|    b->nextTagBinding = parser->m_freeBindingList;
 3235|      0|    parser->m_freeBindingList = b;
 3236|      0|    b->prefix->binding = b->prevPrefixBinding;
 3237|      0|  }
 3238|  38.6k|}
xmlparse.c:epilogProcessor:
 5646|    161|                const char **nextPtr) {
 5647|    161|  parser->m_processor = epilogProcessor;
 5648|    161|  parser->m_eventPtr = s;
 5649|  1.82k|  for (;;) {
 5650|  1.82k|    const char *next = NULL;
 5651|  1.82k|    int tok = XmlPrologTok(parser->m_encoding, s, end, &next);
  ------------------
  |  |  227|  1.82k|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  1.82k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5652|  1.82k|#ifdef XML_DTD
 5653|  1.82k|    if (! accountingDiffTolerated(parser, tok, s, next, __LINE__,
  ------------------
  |  Branch (5653:9): [True: 0, False: 1.82k]
  ------------------
 5654|  1.82k|                                  XML_ACCOUNT_DIRECT)) {
 5655|      0|      accountingOnAbort(parser);
 5656|      0|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 5657|      0|    }
 5658|  1.82k|#endif
 5659|  1.82k|    parser->m_eventEndPtr = next;
 5660|  1.82k|    switch (tok) {
 5661|       |    /* report partial linebreak - it might be the last token */
 5662|      1|    case -XML_TOK_PROLOG_S:
  ------------------
  |  |   82|      1|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (5662:5): [True: 1, False: 1.82k]
  ------------------
 5663|      1|      if (parser->m_defaultHandler) {
  ------------------
  |  Branch (5663:11): [True: 0, False: 1]
  ------------------
 5664|      0|        reportDefault(parser, parser->m_encoding, s, next);
 5665|      0|        if (parser->m_parsingStatus.parsing == XML_FINISHED)
  ------------------
  |  Branch (5665:13): [True: 0, False: 0]
  ------------------
 5666|      0|          return XML_ERROR_ABORTED;
 5667|      0|      }
 5668|      1|      *nextPtr = next;
 5669|      1|      return XML_ERROR_NONE;
 5670|     71|    case XML_TOK_NONE:
  ------------------
  |  |   51|     71|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (5670:5): [True: 71, False: 1.75k]
  ------------------
 5671|     71|      *nextPtr = s;
 5672|     71|      return XML_ERROR_NONE;
 5673|    384|    case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    384|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (5673:5): [True: 384, False: 1.44k]
  ------------------
 5674|    384|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (5674:11): [True: 0, False: 384]
  ------------------
 5675|      0|        reportDefault(parser, parser->m_encoding, s, next);
 5676|    384|      break;
 5677|  1.01k|    case XML_TOK_PI:
  ------------------
  |  |   76|  1.01k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (5677:5): [True: 1.01k, False: 811]
  ------------------
 5678|  1.01k|      if (! reportProcessingInstruction(parser, parser->m_encoding, s, next))
  ------------------
  |  Branch (5678:11): [True: 0, False: 1.01k]
  ------------------
 5679|      0|        return XML_ERROR_NO_MEMORY;
 5680|  1.01k|      break;
 5681|  1.01k|    case XML_TOK_COMMENT:
  ------------------
  |  |   78|    266|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (5681:5): [True: 266, False: 1.56k]
  ------------------
 5682|    266|      if (! reportComment(parser, parser->m_encoding, s, next))
  ------------------
  |  Branch (5682:11): [True: 0, False: 266]
  ------------------
 5683|      0|        return XML_ERROR_NO_MEMORY;
 5684|    266|      break;
 5685|    266|    case XML_TOK_INVALID:
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (5685:5): [True: 16, False: 1.81k]
  ------------------
 5686|     16|      parser->m_eventPtr = next;
 5687|     16|      return XML_ERROR_INVALID_TOKEN;
 5688|     10|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (5688:5): [True: 10, False: 1.81k]
  ------------------
 5689|     10|      if (! parser->m_parsingStatus.finalBuffer) {
  ------------------
  |  Branch (5689:11): [True: 10, False: 0]
  ------------------
 5690|     10|        *nextPtr = s;
 5691|     10|        return XML_ERROR_NONE;
 5692|     10|      }
 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.82k]
  ------------------
 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|     62|    default:
  ------------------
  |  Branch (5700:5): [True: 62, False: 1.76k]
  ------------------
 5701|     62|      return XML_ERROR_JUNK_AFTER_DOC_ELEMENT;
 5702|  1.82k|    }
 5703|  1.66k|    parser->m_eventPtr = s = next;
 5704|  1.66k|    switch (parser->m_parsingStatus.parsing) {
 5705|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (5705:5): [True: 0, False: 1.66k]
  ------------------
 5706|      0|      *nextPtr = next;
 5707|      0|      return XML_ERROR_NONE;
 5708|      0|    case XML_FINISHED:
  ------------------
  |  Branch (5708:5): [True: 0, False: 1.66k]
  ------------------
 5709|      0|      return XML_ERROR_ABORTED;
 5710|  1.66k|    default:;
  ------------------
  |  Branch (5710:5): [True: 1.66k, False: 0]
  ------------------
 5711|  1.66k|    }
 5712|  1.66k|  }
 5713|    161|}
xmlparse.c:doCdataSection:
 4026|  2.67k|               enum XML_Account account) {
 4027|  2.67k|  const char *s = *startPtr;
 4028|  2.67k|  const char **eventPP;
 4029|  2.67k|  const char **eventEndPP;
 4030|  2.67k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (4030:7): [True: 1.59k, False: 1.07k]
  ------------------
 4031|  1.59k|    eventPP = &parser->m_eventPtr;
 4032|  1.59k|    *eventPP = s;
 4033|  1.59k|    eventEndPP = &parser->m_eventEndPtr;
 4034|  1.59k|  } else {
 4035|  1.07k|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 4036|  1.07k|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 4037|  1.07k|  }
 4038|  2.67k|  *eventPP = s;
 4039|  2.67k|  *startPtr = NULL;
 4040|       |
 4041|   356k|  for (;;) {
 4042|   356k|    const char *next = s; /* in case of XML_TOK_NONE or XML_TOK_PARTIAL */
 4043|   356k|    int tok = XmlCdataSectionTok(enc, s, end, &next);
  ------------------
  |  |  233|   356k|  XmlTok(enc, XML_CDATA_SECTION_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|   356k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 4044|   356k|#ifdef XML_DTD
 4045|   356k|    if (! accountingDiffTolerated(parser, tok, s, next, __LINE__, account)) {
  ------------------
  |  Branch (4045:9): [True: 0, False: 356k]
  ------------------
 4046|      0|      accountingOnAbort(parser);
 4047|      0|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4048|      0|    }
 4049|       |#else
 4050|       |    UNUSED_P(account);
 4051|       |#endif
 4052|   356k|    *eventEndPP = next;
 4053|   356k|    switch (tok) {
 4054|  1.82k|    case XML_TOK_CDATA_SECT_CLOSE:
  ------------------
  |  |  113|  1.82k|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  |  Branch (4054:5): [True: 1.82k, False: 354k]
  ------------------
 4055|  1.82k|      if (parser->m_endCdataSectionHandler)
  ------------------
  |  Branch (4055:11): [True: 0, False: 1.82k]
  ------------------
 4056|      0|        parser->m_endCdataSectionHandler(parser->m_handlerArg);
 4057|       |      /* BEGIN disabled code */
 4058|       |      /* see comment under XML_TOK_CDATA_SECT_OPEN */
 4059|  1.82k|      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.82k|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4063:16): [True: 0, False: 1.82k]
  ------------------
 4064|      0|        reportDefault(parser, enc, s, next);
 4065|  1.82k|      *startPtr = next;
 4066|  1.82k|      *nextPtr = next;
 4067|  1.82k|      if (parser->m_parsingStatus.parsing == XML_FINISHED)
  ------------------
  |  Branch (4067:11): [True: 0, False: 1.82k]
  ------------------
 4068|      0|        return XML_ERROR_ABORTED;
 4069|  1.82k|      else
 4070|  1.82k|        return XML_ERROR_NONE;
 4071|   214k|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|   214k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (4071:5): [True: 214k, False: 142k]
  ------------------
 4072|   214k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (4072:11): [True: 0, False: 214k]
  ------------------
 4073|      0|        XML_Char c = 0xA;
 4074|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 4075|   214k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4075:18): [True: 0, False: 214k]
  ------------------
 4076|      0|        reportDefault(parser, enc, s, next);
 4077|   214k|      break;
 4078|   139k|    case XML_TOK_DATA_CHARS: {
  ------------------
  |  |   67|   139k|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (4078:5): [True: 139k, False: 216k]
  ------------------
 4079|   139k|      XML_CharacterDataHandler charDataHandler = parser->m_characterDataHandler;
 4080|   139k|      if (charDataHandler) {
  ------------------
  |  Branch (4080:11): [True: 0, False: 139k]
  ------------------
 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|   139k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4097:18): [True: 0, False: 139k]
  ------------------
 4098|      0|        reportDefault(parser, enc, s, next);
 4099|   139k|    } break;
 4100|    164|    case XML_TOK_INVALID:
  ------------------
  |  |   57|    164|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4100:5): [True: 164, False: 356k]
  ------------------
 4101|    164|      *eventPP = next;
 4102|    164|      return XML_ERROR_INVALID_TOKEN;
 4103|    126|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|    126|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (4103:5): [True: 126, False: 356k]
  ------------------
 4104|    126|      if (haveMore) {
  ------------------
  |  Branch (4104:11): [True: 126, False: 0]
  ------------------
 4105|    126|        *nextPtr = s;
 4106|    126|        return XML_ERROR_NONE;
 4107|    126|      }
 4108|      0|      return XML_ERROR_PARTIAL_CHAR;
 4109|    108|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|    108|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (4109:5): [True: 108, False: 356k]
  ------------------
 4110|    554|    case XML_TOK_NONE:
  ------------------
  |  |   51|    554|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (4110:5): [True: 446, False: 356k]
  ------------------
 4111|    554|      if (haveMore) {
  ------------------
  |  Branch (4111:11): [True: 480, False: 74]
  ------------------
 4112|    480|        *nextPtr = s;
 4113|    480|        return XML_ERROR_NONE;
 4114|    480|      }
 4115|     74|      return XML_ERROR_UNCLOSED_CDATA_SECTION;
 4116|      0|    default:
  ------------------
  |  Branch (4116:5): [True: 0, False: 356k]
  ------------------
 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|   356k|    }
 4128|       |
 4129|   353k|    *eventPP = s = next;
 4130|   353k|    switch (parser->m_parsingStatus.parsing) {
 4131|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (4131:5): [True: 0, False: 353k]
  ------------------
 4132|      0|      *nextPtr = next;
 4133|      0|      return XML_ERROR_NONE;
 4134|      0|    case XML_FINISHED:
  ------------------
  |  Branch (4134:5): [True: 0, False: 353k]
  ------------------
 4135|      0|      return XML_ERROR_ABORTED;
 4136|   353k|    default:;
  ------------------
  |  Branch (4136:5): [True: 353k, False: 0]
  ------------------
 4137|   353k|    }
 4138|   353k|  }
 4139|       |  /* not reached */
 4140|  2.67k|}
xmlparse.c:storeRawNames:
 2571|  6.92k|storeRawNames(XML_Parser parser) {
 2572|  6.92k|  TAG *tag = parser->m_tagStack;
 2573|  54.7k|  while (tag) {
  ------------------
  |  Branch (2573:10): [True: 47.8k, False: 6.92k]
  ------------------
 2574|  47.8k|    int bufSize;
 2575|  47.8k|    int nameLen = sizeof(XML_Char) * (tag->name.strLen + 1);
 2576|  47.8k|    size_t rawNameLen;
 2577|  47.8k|    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|  47.8k|    if (tag->rawName == rawNameBuf)
  ------------------
  |  Branch (2583:9): [True: 0, False: 47.8k]
  ------------------
 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|  47.8k|    rawNameLen = ROUND_UP(tag->rawNameLength, sizeof(XML_Char));
  ------------------
  |  |  196|  47.8k|#define ROUND_UP(n, sz) (((n) + ((sz)-1)) & ~((sz)-1))
  ------------------
 2589|       |    /* Detect and prevent integer overflow. */
 2590|  47.8k|    if (rawNameLen > (size_t)INT_MAX - nameLen)
  ------------------
  |  Branch (2590:9): [True: 0, False: 47.8k]
  ------------------
 2591|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2592|  47.8k|    bufSize = nameLen + (int)rawNameLen;
 2593|  47.8k|    if (bufSize > tag->bufEnd - tag->buf) {
  ------------------
  |  Branch (2593:9): [True: 554, False: 47.2k]
  ------------------
 2594|    554|      char *temp = (char *)REALLOC(parser, tag->buf, bufSize);
  ------------------
  |  |  714|    554|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 2595|    554|      if (temp == NULL)
  ------------------
  |  Branch (2595:11): [True: 0, False: 554]
  ------------------
 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|    554|      if (tag->name.str == (XML_Char *)tag->buf)
  ------------------
  |  Branch (2600:11): [True: 554, False: 0]
  ------------------
 2601|    554|        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|    554|      if (tag->name.localPart)
  ------------------
  |  Branch (2605:11): [True: 0, False: 554]
  ------------------
 2606|      0|        tag->name.localPart
 2607|      0|            = (XML_Char *)temp + (tag->name.localPart - (XML_Char *)tag->buf);
 2608|    554|      tag->buf = temp;
 2609|    554|      tag->bufEnd = temp + bufSize;
 2610|    554|      rawNameBuf = temp + nameLen;
 2611|    554|    }
 2612|  47.8k|    memcpy(rawNameBuf, tag->rawName, tag->rawNameLength);
 2613|  47.8k|    tag->rawName = rawNameBuf;
 2614|  47.8k|    tag = tag->parent;
 2615|  47.8k|  }
 2616|  6.92k|  return XML_TRUE;
  ------------------
  |  |   55|  6.92k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2617|  6.92k|}
xmlparse.c:getElementType:
 7614|  24.2k|               const char *end) {
 7615|  24.2k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 7616|  24.2k|  const XML_Char *name = poolStoreString(&dtd->pool, enc, ptr, end);
 7617|  24.2k|  ELEMENT_TYPE *ret;
 7618|       |
 7619|  24.2k|  if (! name)
  ------------------
  |  Branch (7619:7): [True: 0, False: 24.2k]
  ------------------
 7620|      0|    return NULL;
 7621|  24.2k|  ret = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, name,
 7622|  24.2k|                               sizeof(ELEMENT_TYPE));
 7623|  24.2k|  if (! ret)
  ------------------
  |  Branch (7623:7): [True: 0, False: 24.2k]
  ------------------
 7624|      0|    return NULL;
 7625|  24.2k|  if (ret->name != name)
  ------------------
  |  Branch (7625:7): [True: 15.3k, False: 8.85k]
  ------------------
 7626|  15.3k|    poolDiscard(&dtd->pool);
  ------------------
  |  |  599|  15.3k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 7627|  8.85k|  else {
 7628|  8.85k|    poolFinish(&dtd->pool);
  ------------------
  |  |  600|  8.85k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 7629|  8.85k|    if (! setElementTypePrefix(parser, ret))
  ------------------
  |  Branch (7629:9): [True: 0, False: 8.85k]
  ------------------
 7630|      0|      return NULL;
 7631|  8.85k|  }
 7632|  24.2k|  return ret;
 7633|  24.2k|}
xmlparse.c:getAttributeId:
 6476|   120k|               const char *end) {
 6477|   120k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6478|   120k|  ATTRIBUTE_ID *id;
 6479|   120k|  const XML_Char *name;
 6480|   120k|  if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  602|   120k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 720, False: 119k]
  |  |  |  Branch (602:35): [True: 0, False: 720]
  |  |  ------------------
  |  |  603|   120k|       ? 0                                                                     \
  |  |  604|   120k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6480:7): [True: 0, False: 120k]
  ------------------
 6481|      0|    return NULL;
 6482|   120k|  name = poolStoreString(&dtd->pool, enc, start, end);
 6483|   120k|  if (! name)
  ------------------
  |  Branch (6483:7): [True: 0, False: 120k]
  ------------------
 6484|      0|    return NULL;
 6485|       |  /* skip quotation mark - its storage will be re-used (like in name[-1]) */
 6486|   120k|  ++name;
 6487|   120k|  id = (ATTRIBUTE_ID *)lookup(parser, &dtd->attributeIds, name,
 6488|   120k|                              sizeof(ATTRIBUTE_ID));
 6489|   120k|  if (! id)
  ------------------
  |  Branch (6489:7): [True: 0, False: 120k]
  ------------------
 6490|      0|    return NULL;
 6491|   120k|  if (id->name != name)
  ------------------
  |  Branch (6491:7): [True: 111k, False: 8.60k]
  ------------------
 6492|   111k|    poolDiscard(&dtd->pool);
  ------------------
  |  |  599|   111k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6493|  8.60k|  else {
 6494|  8.60k|    poolFinish(&dtd->pool);
  ------------------
  |  |  600|  8.60k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6495|  8.60k|    if (! parser->m_ns)
  ------------------
  |  Branch (6495:9): [True: 8.60k, False: 0]
  ------------------
 6496|  8.60k|      ;
 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|  8.60k|  }
 6532|   120k|  return id;
 6533|   120k|}
xmlparse.c:poolAppend:
 7220|  13.4M|           const char *end) {
 7221|  13.4M|  if (! pool->ptr && ! poolGrow(pool))
  ------------------
  |  Branch (7221:7): [True: 51.5k, False: 13.3M]
  |  Branch (7221:22): [True: 0, False: 51.5k]
  ------------------
 7222|      0|    return NULL;
 7223|  13.4M|  for (;;) {
 7224|  13.4M|    const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  160|  13.4M|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|  13.4M|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 7225|  13.4M|        enc, &ptr, end, (ICHAR **)&(pool->ptr), (const ICHAR *)pool->end);
 7226|  13.4M|    if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (7226:9): [True: 13.4M, False: 19.2k]
  ------------------
 7227|  13.4M|        || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (7227:12): [True: 0, False: 19.2k]
  ------------------
 7228|  13.4M|      break;
 7229|  19.2k|    if (! poolGrow(pool))
  ------------------
  |  Branch (7229:9): [True: 0, False: 19.2k]
  ------------------
 7230|      0|      return NULL;
 7231|  19.2k|  }
 7232|  13.4M|  return pool->start;
 7233|  13.4M|}
xmlparse.c:defineAttribute:
 6386|  48.0k|                XML_Bool isId, const XML_Char *value, XML_Parser parser) {
 6387|  48.0k|  DEFAULT_ATTRIBUTE *att;
 6388|  48.0k|  if (value || isId) {
  ------------------
  |  Branch (6388:7): [True: 14.2k, False: 33.7k]
  |  Branch (6388:16): [True: 2.04k, False: 31.7k]
  ------------------
 6389|       |    /* The handling of default attributes gets messed up if we have
 6390|       |       a default which duplicates a non-default. */
 6391|  16.2k|    int i;
 6392|  89.7k|    for (i = 0; i < type->nDefaultAtts; i++)
  ------------------
  |  Branch (6392:17): [True: 86.3k, False: 3.39k]
  ------------------
 6393|  86.3k|      if (attId == type->defaultAtts[i].id)
  ------------------
  |  Branch (6393:11): [True: 12.8k, False: 73.4k]
  ------------------
 6394|  12.8k|        return 1;
 6395|  3.39k|    if (isId && ! type->idAtt && ! attId->xmlns)
  ------------------
  |  Branch (6395:9): [True: 1.63k, False: 1.76k]
  |  Branch (6395:17): [True: 315, False: 1.31k]
  |  Branch (6395:34): [True: 315, False: 0]
  ------------------
 6396|    315|      type->idAtt = attId;
 6397|  3.39k|  }
 6398|  35.1k|  if (type->nDefaultAtts == type->allocDefaultAtts) {
  ------------------
  |  Branch (6398:7): [True: 1.77k, False: 33.3k]
  ------------------
 6399|  1.77k|    if (type->allocDefaultAtts == 0) {
  ------------------
  |  Branch (6399:9): [True: 1.30k, False: 471]
  ------------------
 6400|  1.30k|      type->allocDefaultAtts = 8;
 6401|  1.30k|      type->defaultAtts = (DEFAULT_ATTRIBUTE *)MALLOC(
  ------------------
  |  |  713|  1.30k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 6402|  1.30k|          parser, type->allocDefaultAtts * sizeof(DEFAULT_ATTRIBUTE));
 6403|  1.30k|      if (! type->defaultAtts) {
  ------------------
  |  Branch (6403:11): [True: 0, False: 1.30k]
  ------------------
 6404|      0|        type->allocDefaultAtts = 0;
 6405|      0|        return 0;
 6406|      0|      }
 6407|  1.30k|    } else {
 6408|    471|      DEFAULT_ATTRIBUTE *temp;
 6409|       |
 6410|       |      /* Detect and prevent integer overflow */
 6411|    471|      if (type->allocDefaultAtts > INT_MAX / 2) {
  ------------------
  |  Branch (6411:11): [True: 0, False: 471]
  ------------------
 6412|      0|        return 0;
 6413|      0|      }
 6414|       |
 6415|    471|      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|    471|      temp = (DEFAULT_ATTRIBUTE *)REALLOC(parser, type->defaultAtts,
  ------------------
  |  |  714|    471|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 6428|    471|                                          (count * sizeof(DEFAULT_ATTRIBUTE)));
 6429|    471|      if (temp == NULL)
  ------------------
  |  Branch (6429:11): [True: 0, False: 471]
  ------------------
 6430|      0|        return 0;
 6431|    471|      type->allocDefaultAtts = count;
 6432|    471|      type->defaultAtts = temp;
 6433|    471|    }
 6434|  1.77k|  }
 6435|  35.1k|  att = type->defaultAtts + type->nDefaultAtts;
 6436|  35.1k|  att->id = attId;
 6437|  35.1k|  att->value = value;
 6438|  35.1k|  att->isCdata = isCdata;
 6439|  35.1k|  if (! isCdata)
  ------------------
  |  Branch (6439:7): [True: 33.8k, False: 1.24k]
  ------------------
 6440|  33.8k|    attId->maybeTokenized = XML_TRUE;
  ------------------
  |  |   55|  33.8k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6441|  35.1k|  type->nDefaultAtts += 1;
 6442|  35.1k|  return 1;
 6443|  35.1k|}
xmlparse.c:poolGrow:
 7321|  85.1k|poolGrow(STRING_POOL *pool) {
 7322|  85.1k|  if (pool->freeBlocks) {
  ------------------
  |  Branch (7322:7): [True: 48.1k, False: 36.9k]
  ------------------
 7323|  48.1k|    if (pool->start == 0) {
  ------------------
  |  Branch (7323:9): [True: 45.8k, False: 2.28k]
  ------------------
 7324|  45.8k|      pool->blocks = pool->freeBlocks;
 7325|  45.8k|      pool->freeBlocks = pool->freeBlocks->next;
 7326|  45.8k|      pool->blocks->next = NULL;
 7327|  45.8k|      pool->start = pool->blocks->s;
 7328|  45.8k|      pool->end = pool->start + pool->blocks->size;
 7329|  45.8k|      pool->ptr = pool->start;
 7330|  45.8k|      return XML_TRUE;
  ------------------
  |  |   55|  45.8k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7331|  45.8k|    }
 7332|  2.28k|    if (pool->end - pool->start < pool->freeBlocks->size) {
  ------------------
  |  Branch (7332:9): [True: 2.06k, False: 218]
  ------------------
 7333|  2.06k|      BLOCK *tem = pool->freeBlocks->next;
 7334|  2.06k|      pool->freeBlocks->next = pool->blocks;
 7335|  2.06k|      pool->blocks = pool->freeBlocks;
 7336|  2.06k|      pool->freeBlocks = tem;
 7337|  2.06k|      memcpy(pool->blocks->s, pool->start,
 7338|  2.06k|             (pool->end - pool->start) * sizeof(XML_Char));
 7339|  2.06k|      pool->ptr = pool->blocks->s + (pool->ptr - pool->start);
 7340|  2.06k|      pool->start = pool->blocks->s;
 7341|  2.06k|      pool->end = pool->start + pool->blocks->size;
 7342|  2.06k|      return XML_TRUE;
  ------------------
  |  |   55|  2.06k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7343|  2.06k|    }
 7344|  2.28k|  }
 7345|  37.2k|  if (pool->blocks && pool->start == pool->blocks->s) {
  ------------------
  |  Branch (7345:7): [True: 19.7k, False: 17.4k]
  |  Branch (7345:23): [True: 12.7k, False: 7.00k]
  ------------------
 7346|  12.7k|    BLOCK *temp;
 7347|  12.7k|    int blockSize = (int)((unsigned)(pool->end - pool->start) * 2U);
 7348|  12.7k|    size_t bytesToAllocate;
 7349|       |
 7350|       |    /* NOTE: Needs to be calculated prior to calling `realloc`
 7351|       |             to avoid dangling pointers: */
 7352|  12.7k|    const ptrdiff_t offsetInsideBlock = pool->ptr - pool->start;
 7353|       |
 7354|  12.7k|    if (blockSize < 0) {
  ------------------
  |  Branch (7354:9): [True: 0, False: 12.7k]
  ------------------
 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|  12.7k|    bytesToAllocate = poolBytesToAllocateFor(blockSize);
 7365|  12.7k|    if (bytesToAllocate == 0)
  ------------------
  |  Branch (7365:9): [True: 0, False: 12.7k]
  ------------------
 7366|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7367|       |
 7368|  12.7k|    temp = (BLOCK *)pool->mem->realloc_fcn(pool->blocks,
 7369|  12.7k|                                           (unsigned)bytesToAllocate);
 7370|  12.7k|    if (temp == NULL)
  ------------------
  |  Branch (7370:9): [True: 0, False: 12.7k]
  ------------------
 7371|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7372|  12.7k|    pool->blocks = temp;
 7373|  12.7k|    pool->blocks->size = blockSize;
 7374|  12.7k|    pool->ptr = pool->blocks->s + offsetInsideBlock;
 7375|  12.7k|    pool->start = pool->blocks->s;
 7376|  12.7k|    pool->end = pool->start + blockSize;
 7377|  24.4k|  } else {
 7378|  24.4k|    BLOCK *tem;
 7379|  24.4k|    int blockSize = (int)(pool->end - pool->start);
 7380|  24.4k|    size_t bytesToAllocate;
 7381|       |
 7382|  24.4k|    if (blockSize < 0) {
  ------------------
  |  Branch (7382:9): [True: 0, False: 24.4k]
  ------------------
 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|  24.4k|    if (blockSize < INIT_BLOCK_SIZE)
  ------------------
  |  |  245|  24.4k|#define INIT_BLOCK_SIZE 1024
  ------------------
  |  Branch (7395:9): [True: 21.5k, False: 2.91k]
  ------------------
 7396|  21.5k|      blockSize = INIT_BLOCK_SIZE;
  ------------------
  |  |  245|  21.5k|#define INIT_BLOCK_SIZE 1024
  ------------------
 7397|  2.91k|    else {
 7398|       |      /* Detect overflow, avoiding _signed_ overflow undefined behavior */
 7399|  2.91k|      if ((int)((unsigned)blockSize * 2U) < 0) {
  ------------------
  |  Branch (7399:11): [True: 0, False: 2.91k]
  ------------------
 7400|      0|        return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7401|      0|      }
 7402|  2.91k|      blockSize *= 2;
 7403|  2.91k|    }
 7404|       |
 7405|  24.4k|    bytesToAllocate = poolBytesToAllocateFor(blockSize);
 7406|  24.4k|    if (bytesToAllocate == 0)
  ------------------
  |  Branch (7406:9): [True: 0, False: 24.4k]
  ------------------
 7407|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7408|       |
 7409|  24.4k|    tem = pool->mem->malloc_fcn(bytesToAllocate);
 7410|  24.4k|    if (! tem)
  ------------------
  |  Branch (7410:9): [True: 0, False: 24.4k]
  ------------------
 7411|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7412|  24.4k|    tem->size = blockSize;
 7413|  24.4k|    tem->next = pool->blocks;
 7414|  24.4k|    pool->blocks = tem;
 7415|  24.4k|    if (pool->ptr != pool->start)
  ------------------
  |  Branch (7415:9): [True: 6.26k, False: 18.2k]
  ------------------
 7416|  6.26k|      memcpy(tem->s, pool->start, (pool->ptr - pool->start) * sizeof(XML_Char));
 7417|  24.4k|    pool->ptr = tem->s + (pool->ptr - pool->start);
 7418|  24.4k|    pool->start = tem->s;
 7419|  24.4k|    pool->end = tem->s + blockSize;
 7420|  24.4k|  }
 7421|  37.2k|  return XML_TRUE;
  ------------------
  |  |   55|  37.2k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7422|  37.2k|}
xmlparse.c:poolBytesToAllocateFor:
 7293|  37.2k|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|  37.2k|  const size_t stretch = sizeof(XML_Char); /* can be 4 bytes */
 7302|       |
 7303|  37.2k|  if (blockSize <= 0)
  ------------------
  |  Branch (7303:7): [True: 0, False: 37.2k]
  ------------------
 7304|      0|    return 0;
 7305|       |
 7306|  37.2k|  if (blockSize > (int)(INT_MAX / stretch))
  ------------------
  |  Branch (7306:7): [True: 0, False: 37.2k]
  ------------------
 7307|      0|    return 0;
 7308|       |
 7309|  37.2k|  {
 7310|  37.2k|    const int stretchedBlockSize = blockSize * (int)stretch;
 7311|  37.2k|    const int bytesToAllocate
 7312|  37.2k|        = (int)(offsetof(BLOCK, s) + (unsigned)stretchedBlockSize);
 7313|  37.2k|    if (bytesToAllocate < 0)
  ------------------
  |  Branch (7313:9): [True: 0, False: 37.2k]
  ------------------
 7314|      0|      return 0;
 7315|       |
 7316|  37.2k|    return (size_t)bytesToAllocate;
 7317|  37.2k|  }
 7318|  37.2k|}
xmlparse.c:storeAttributeValue:
 5871|  21.9k|                    enum XML_Account account) {
 5872|  21.9k|  enum XML_Error result
 5873|  21.9k|      = appendAttributeValue(parser, enc, isCdata, ptr, end, pool, account);
 5874|  21.9k|  if (result)
  ------------------
  |  Branch (5874:7): [True: 234, False: 21.7k]
  ------------------
 5875|    234|    return result;
 5876|  21.7k|  if (! isCdata && poolLength(pool) && poolLastChar(pool) == 0x20)
  ------------------
  |  |  596|  35.4k|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  |  |  ------------------
  |  |  |  Branch (596:26): [True: 8.88k, False: 4.83k]
  |  |  ------------------
  ------------------
                if (! isCdata && poolLength(pool) && poolLastChar(pool) == 0x20)
  ------------------
  |  |  598|  8.88k|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5876:7): [True: 13.7k, False: 7.98k]
  |  Branch (5876:40): [True: 948, False: 7.93k]
  ------------------
 5877|    948|    poolChop(pool);
  ------------------
  |  |  597|    948|#define poolChop(pool) ((void)--(pool->ptr))
  ------------------
 5878|  21.7k|  if (! poolAppendChar(pool, XML_T('\0')))
  ------------------
  |  |  602|  21.7k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 813, False: 20.8k]
  |  |  |  Branch (602:35): [True: 0, False: 813]
  |  |  ------------------
  |  |  603|  21.7k|       ? 0                                                                     \
  |  |  604|  21.7k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5878:7): [True: 0, False: 21.7k]
  ------------------
 5879|      0|    return XML_ERROR_NO_MEMORY;
 5880|  21.7k|  return XML_ERROR_NONE;
 5881|  21.7k|}
xmlparse.c:appendAttributeValue:
 5886|  3.21M|                     enum XML_Account account) {
 5887|  3.21M|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 5888|       |#ifndef XML_DTD
 5889|       |  UNUSED_P(account);
 5890|       |#endif
 5891|       |
 5892|  27.4M|  for (;;) {
 5893|  27.4M|    const char *next
 5894|  27.4M|        = ptr; /* XmlAttributeValueTok doesn't always set the last arg */
 5895|  27.4M|    int tok = XmlAttributeValueTok(enc, ptr, end, &next);
  ------------------
  |  |  249|  27.4M|  XmlLiteralTok(enc, XML_ATTRIBUTE_VALUE_LITERAL, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  246|  27.4M|  (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5896|  27.4M|#ifdef XML_DTD
 5897|  27.4M|    if (! accountingDiffTolerated(parser, tok, ptr, next, __LINE__, account)) {
  ------------------
  |  Branch (5897:9): [True: 57, False: 27.4M]
  ------------------
 5898|     57|      accountingOnAbort(parser);
 5899|     57|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 5900|     57|    }
 5901|  27.4M|#endif
 5902|  27.4M|    switch (tok) {
 5903|  3.21M|    case XML_TOK_NONE:
  ------------------
  |  |   51|  3.21M|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (5903:5): [True: 3.21M, False: 24.2M]
  ------------------
 5904|  3.21M|      return XML_ERROR_NONE;
 5905|     17|    case XML_TOK_INVALID:
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (5905:5): [True: 17, False: 27.4M]
  ------------------
 5906|     17|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (5906:11): [True: 7, False: 10]
  ------------------
 5907|      7|        parser->m_eventPtr = next;
 5908|     17|      return XML_ERROR_INVALID_TOKEN;
 5909|      3|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (5909:5): [True: 3, False: 27.4M]
  ------------------
 5910|      3|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (5910:11): [True: 2, False: 1]
  ------------------
 5911|      2|        parser->m_eventPtr = ptr;
 5912|      3|      return XML_ERROR_INVALID_TOKEN;
 5913|  6.38k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  6.38k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (5913:5): [True: 6.38k, False: 27.4M]
  ------------------
 5914|  6.38k|      XML_Char buf[XML_ENCODE_MAX];
 5915|  6.38k|      int i;
 5916|  6.38k|      int n = XmlCharRefNumber(enc, ptr);
  ------------------
  |  |  264|  6.38k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 5917|  6.38k|      if (n < 0) {
  ------------------
  |  Branch (5917:11): [True: 34, False: 6.34k]
  ------------------
 5918|     34|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (5918:13): [True: 33, False: 1]
  ------------------
 5919|     33|          parser->m_eventPtr = ptr;
 5920|     34|        return XML_ERROR_BAD_CHAR_REF;
 5921|     34|      }
 5922|  6.34k|      if (! isCdata && n == 0x20 /* space */
  ------------------
  |  Branch (5922:11): [True: 2.58k, False: 3.75k]
  |  Branch (5922:24): [True: 603, False: 1.98k]
  ------------------
 5923|  6.34k|          && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  596|    603|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
                        && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  598|    405|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5923:15): [True: 198, False: 405]
  |  Branch (5923:40): [True: 197, False: 208]
  ------------------
 5924|    395|        break;
 5925|  5.95k|      n = XmlEncode(n, (ICHAR *)buf);
  ------------------
  |  |  163|  5.95k|#  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|  18.1k|      for (i = 0; i < n; i++) {
  ------------------
  |  Branch (5935:19): [True: 12.2k, False: 5.95k]
  ------------------
 5936|  12.2k|        if (! poolAppendChar(pool, buf[i]))
  ------------------
  |  |  602|  12.2k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 317, False: 11.9k]
  |  |  |  Branch (602:35): [True: 0, False: 317]
  |  |  ------------------
  |  |  603|  12.2k|       ? 0                                                                     \
  |  |  604|  12.2k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5936:13): [True: 0, False: 12.2k]
  ------------------
 5937|      0|          return XML_ERROR_NO_MEMORY;
 5938|  12.2k|      }
 5939|  5.95k|    } break;
 5940|  8.28M|    case XML_TOK_DATA_CHARS:
  ------------------
  |  |   67|  8.28M|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (5940:5): [True: 8.28M, False: 19.1M]
  ------------------
 5941|  8.28M|      if (! poolAppend(pool, enc, ptr, next))
  ------------------
  |  Branch (5941:11): [True: 0, False: 8.28M]
  ------------------
 5942|      0|        return XML_ERROR_NO_MEMORY;
 5943|  8.28M|      break;
 5944|  8.28M|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|  1.96k|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (5944:5): [True: 1.96k, False: 27.4M]
  ------------------
 5945|  1.96k|      next = ptr + enc->minBytesPerChar;
 5946|       |      /* fall through */
 5947|  3.27M|    case XML_TOK_ATTRIBUTE_VALUE_S:
  ------------------
  |  |  110|  3.27M|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
  |  Branch (5947:5): [True: 3.27M, False: 24.1M]
  ------------------
 5948|  12.3M|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|  12.3M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (5948:5): [True: 9.10M, False: 18.3M]
  ------------------
 5949|  12.3M|      if (! isCdata && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  596|  1.21M|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
                    if (! isCdata && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  598|  1.21M|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5949:11): [True: 1.21M, False: 11.1M]
  |  Branch (5949:25): [True: 827, False: 1.21M]
  |  Branch (5949:50): [True: 1.14M, False: 70.7k]
  ------------------
 5950|  1.14M|        break;
 5951|  11.2M|      if (! poolAppendChar(pool, 0x20))
  ------------------
  |  |  602|  11.2M|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 1.39k, False: 11.2M]
  |  |  |  Branch (602:35): [True: 0, False: 1.39k]
  |  |  ------------------
  |  |  603|  11.2M|       ? 0                                                                     \
  |  |  604|  11.2M|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5951:11): [True: 0, False: 11.2M]
  ------------------
 5952|      0|        return XML_ERROR_NO_MEMORY;
 5953|  11.2M|      break;
 5954|  11.2M|    case XML_TOK_ENTITY_REF: {
  ------------------
  |  |   70|  3.55M|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (5954:5): [True: 3.55M, False: 23.8M]
  ------------------
 5955|  3.55M|      const XML_Char *name;
 5956|  3.55M|      ENTITY *entity;
 5957|  3.55M|      char checkEntityDecl;
 5958|  3.55M|      XML_Char ch = (XML_Char)XmlPredefinedEntityName(
  ------------------
  |  |  267|  3.55M|  (((enc)->predefinedEntityName)(enc, ptr, end))
  ------------------
 5959|  3.55M|          enc, ptr + enc->minBytesPerChar, next - enc->minBytesPerChar);
 5960|  3.55M|      if (ch) {
  ------------------
  |  Branch (5960:11): [True: 16.1k, False: 3.54M]
  ------------------
 5961|  16.1k|#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|  16.1k|        accountingDiffTolerated(parser, tok, (char *)&ch,
 5966|  16.1k|                                ((char *)&ch) + sizeof(XML_Char), __LINE__,
 5967|  16.1k|                                XML_ACCOUNT_ENTITY_EXPANSION);
 5968|  16.1k|#endif /* XML_DTD */
 5969|  16.1k|        if (! poolAppendChar(pool, ch))
  ------------------
  |  |  602|  16.1k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 218, False: 15.9k]
  |  |  |  Branch (602:35): [True: 0, False: 218]
  |  |  ------------------
  |  |  603|  16.1k|       ? 0                                                                     \
  |  |  604|  16.1k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5969:13): [True: 0, False: 16.1k]
  ------------------
 5970|      0|          return XML_ERROR_NO_MEMORY;
 5971|  16.1k|        break;
 5972|  16.1k|      }
 5973|  3.54M|      name = poolStoreString(&parser->m_temp2Pool, enc,
 5974|  3.54M|                             ptr + enc->minBytesPerChar,
 5975|  3.54M|                             next - enc->minBytesPerChar);
 5976|  3.54M|      if (! name)
  ------------------
  |  Branch (5976:11): [True: 0, False: 3.54M]
  ------------------
 5977|      0|        return XML_ERROR_NO_MEMORY;
 5978|  3.54M|      entity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, 0);
 5979|  3.54M|      poolDiscard(&parser->m_temp2Pool);
  ------------------
  |  |  599|  3.54M|#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|  3.54M|      if (pool == &dtd->pool) /* are we called from prolog? */
  ------------------
  |  Branch (5983:11): [True: 146k, False: 3.39M]
  ------------------
 5984|   146k|        checkEntityDecl =
 5985|   146k|#ifdef XML_DTD
 5986|   146k|            parser->m_prologState.documentEntity &&
  ------------------
  |  Branch (5986:13): [True: 146k, False: 0]
  ------------------
 5987|   146k|#endif /* XML_DTD */
 5988|   146k|            (dtd->standalone ? ! parser->m_openInternalEntities
  ------------------
  |  Branch (5988:13): [True: 19.7k, False: 126k]
  |  Branch (5988:14): [True: 199, False: 146k]
  ------------------
 5989|   146k|                             : ! dtd->hasParamEntityRefs);
 5990|  3.39M|      else /* if (pool == &parser->m_tempPool): we are called from content */
 5991|  3.39M|        checkEntityDecl = ! dtd->hasParamEntityRefs || dtd->standalone;
  ------------------
  |  Branch (5991:27): [True: 14.8k, False: 3.38M]
  |  Branch (5991:56): [True: 0, False: 3.38M]
  ------------------
 5992|  3.54M|      if (checkEntityDecl) {
  ------------------
  |  Branch (5992:11): [True: 34.6k, False: 3.50M]
  ------------------
 5993|  34.6k|        if (! entity)
  ------------------
  |  Branch (5993:13): [True: 117, False: 34.5k]
  ------------------
 5994|    117|          return XML_ERROR_UNDEFINED_ENTITY;
 5995|  34.5k|        else if (! entity->is_internal)
  ------------------
  |  Branch (5995:18): [True: 0, False: 34.5k]
  ------------------
 5996|      0|          return XML_ERROR_ENTITY_DECLARED_IN_PE;
 5997|  3.50M|      } else if (! entity) {
  ------------------
  |  Branch (5997:18): [True: 347k, False: 3.16M]
  ------------------
 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|   347k|        break;
 6009|   347k|      }
 6010|  3.19M|      if (entity->open) {
  ------------------
  |  Branch (6010:11): [True: 2, False: 3.19M]
  ------------------
 6011|      2|        if (enc == parser->m_encoding) {
  ------------------
  |  Branch (6011:13): [True: 0, False: 2]
  ------------------
 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|      2|        return XML_ERROR_RECURSIVE_ENTITY_REF;
 6032|      2|      }
 6033|  3.19M|      if (entity->notation) {
  ------------------
  |  Branch (6033:11): [True: 2, False: 3.19M]
  ------------------
 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|  3.19M|      if (! entity->textPtr) {
  ------------------
  |  Branch (6038:11): [True: 2, False: 3.19M]
  ------------------
 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|  3.19M|      } else {
 6043|  3.19M|        enum XML_Error result;
 6044|  3.19M|        const XML_Char *textEnd = entity->textPtr + entity->textLen;
 6045|  3.19M|        entity->open = XML_TRUE;
  ------------------
  |  |   55|  3.19M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6046|  3.19M|#ifdef XML_DTD
 6047|  3.19M|        entityTrackingOnOpen(parser, entity, __LINE__);
 6048|  3.19M|#endif
 6049|  3.19M|        result = appendAttributeValue(parser, parser->m_internalEncoding,
 6050|  3.19M|                                      isCdata, (const char *)entity->textPtr,
 6051|  3.19M|                                      (const char *)textEnd, pool,
 6052|  3.19M|                                      XML_ACCOUNT_ENTITY_EXPANSION);
 6053|  3.19M|#ifdef XML_DTD
 6054|  3.19M|        entityTrackingOnClose(parser, entity, __LINE__);
 6055|  3.19M|#endif
 6056|  3.19M|        entity->open = XML_FALSE;
  ------------------
  |  |   56|  3.19M|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6057|  3.19M|        if (result)
  ------------------
  |  Branch (6057:13): [True: 161, False: 3.19M]
  ------------------
 6058|    161|          return result;
 6059|  3.19M|      }
 6060|  3.19M|    } break;
 6061|  3.19M|    default:
  ------------------
  |  Branch (6061:5): [True: 0, False: 27.4M]
  ------------------
 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|  27.4M|    }
 6078|  24.2M|    ptr = next;
 6079|  24.2M|  }
 6080|       |  /* not reached */
 6081|  3.21M|}
xmlparse.c:storeEntityValue:
 6086|  7.39k|                 enum XML_Account account) {
 6087|  7.39k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6088|  7.39k|  STRING_POOL *pool = &(dtd->entityValuePool);
 6089|  7.39k|  enum XML_Error result = XML_ERROR_NONE;
 6090|  7.39k|#ifdef XML_DTD
 6091|  7.39k|  int oldInEntityValue = parser->m_prologState.inEntityValue;
 6092|  7.39k|  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.39k|  if (! pool->blocks) {
  ------------------
  |  Branch (6099:7): [True: 2.50k, False: 4.88k]
  ------------------
 6100|  2.50k|    if (! poolGrow(pool))
  ------------------
  |  Branch (6100:9): [True: 0, False: 2.50k]
  ------------------
 6101|      0|      return XML_ERROR_NO_MEMORY;
 6102|  2.50k|  }
 6103|       |
 6104|  2.11M|  for (;;) {
 6105|  2.11M|    const char *next
 6106|  2.11M|        = entityTextPtr; /* XmlEntityValueTok doesn't always set the last arg */
 6107|  2.11M|    int tok = XmlEntityValueTok(enc, entityTextPtr, entityTextEnd, &next);
  ------------------
  |  |  252|  2.11M|  XmlLiteralTok(enc, XML_ENTITY_VALUE_LITERAL, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  246|  2.11M|  (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 6108|       |
 6109|  2.11M|#ifdef XML_DTD
 6110|  2.11M|    if (! accountingDiffTolerated(parser, tok, entityTextPtr, next, __LINE__,
  ------------------
  |  Branch (6110:9): [True: 0, False: 2.11M]
  ------------------
 6111|  2.11M|                                  account)) {
 6112|      0|      accountingOnAbort(parser);
 6113|      0|      result = XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 6114|      0|      goto endEntityValue;
 6115|      0|    }
 6116|  2.11M|#endif
 6117|       |
 6118|  2.11M|    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: 2.11M]
  ------------------
 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.33k|    case XML_TOK_NONE:
  ------------------
  |  |   51|  7.33k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (6188:5): [True: 7.33k, False: 2.10M]
  ------------------
 6189|  7.33k|      result = XML_ERROR_NONE;
 6190|  7.33k|      goto endEntityValue;
 6191|  28.2k|    case XML_TOK_ENTITY_REF:
  ------------------
  |  |   70|  28.2k|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (6191:5): [True: 28.2k, False: 2.08M]
  ------------------
 6192|   868k|    case XML_TOK_DATA_CHARS:
  ------------------
  |  |   67|   868k|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (6192:5): [True: 840k, False: 1.27M]
  ------------------
 6193|   868k|      if (! poolAppend(pool, enc, entityTextPtr, next)) {
  ------------------
  |  Branch (6193:11): [True: 0, False: 868k]
  ------------------
 6194|      0|        result = XML_ERROR_NO_MEMORY;
 6195|      0|        goto endEntityValue;
 6196|      0|      }
 6197|   868k|      break;
 6198|   868k|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|  1.46k|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (6198:5): [True: 1.46k, False: 2.11M]
  ------------------
 6199|  1.46k|      next = entityTextPtr + enc->minBytesPerChar;
 6200|       |      /* fall through */
 6201|  1.18M|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|  1.18M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (6201:5): [True: 1.18M, False: 931k]
  ------------------
 6202|  1.18M|      if (pool->end == pool->ptr && ! poolGrow(pool)) {
  ------------------
  |  Branch (6202:11): [True: 94, False: 1.18M]
  |  Branch (6202:37): [True: 0, False: 94]
  ------------------
 6203|      0|        result = XML_ERROR_NO_MEMORY;
 6204|      0|        goto endEntityValue;
 6205|      0|      }
 6206|  1.18M|      *(pool->ptr)++ = 0xA;
 6207|  1.18M|      break;
 6208|  54.1k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  54.1k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (6208:5): [True: 54.1k, False: 2.05M]
  ------------------
 6209|  54.1k|      XML_Char buf[XML_ENCODE_MAX];
 6210|  54.1k|      int i;
 6211|  54.1k|      int n = XmlCharRefNumber(enc, entityTextPtr);
  ------------------
  |  |  264|  54.1k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 6212|  54.1k|      if (n < 0) {
  ------------------
  |  Branch (6212:11): [True: 3, False: 54.1k]
  ------------------
 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|  54.1k|      n = XmlEncode(n, (ICHAR *)buf);
  ------------------
  |  |  163|  54.1k|#  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|   183k|      for (i = 0; i < n; i++) {
  ------------------
  |  Branch (6228:19): [True: 129k, False: 54.1k]
  ------------------
 6229|   129k|        if (pool->end == pool->ptr && ! poolGrow(pool)) {
  ------------------
  |  Branch (6229:13): [True: 31, False: 129k]
  |  Branch (6229:39): [True: 0, False: 31]
  ------------------
 6230|      0|          result = XML_ERROR_NO_MEMORY;
 6231|      0|          goto endEntityValue;
 6232|      0|        }
 6233|   129k|        *(pool->ptr)++ = buf[i];
 6234|   129k|      }
 6235|  54.1k|    } break;
 6236|  54.1k|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|     35|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (6236:5): [True: 35, False: 2.11M]
  ------------------
 6237|     35|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6237:11): [True: 35, False: 0]
  ------------------
 6238|     35|        parser->m_eventPtr = entityTextPtr;
 6239|     35|      result = XML_ERROR_INVALID_TOKEN;
 6240|     35|      goto endEntityValue;
 6241|     18|    case XML_TOK_INVALID:
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (6241:5): [True: 18, False: 2.11M]
  ------------------
 6242|     18|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6242:11): [True: 18, False: 0]
  ------------------
 6243|     18|        parser->m_eventPtr = next;
 6244|     18|      result = XML_ERROR_INVALID_TOKEN;
 6245|     18|      goto endEntityValue;
 6246|      0|    default:
  ------------------
  |  Branch (6246:5): [True: 0, False: 2.11M]
  ------------------
 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|  2.11M|    }
 6260|  2.10M|    entityTextPtr = next;
 6261|  2.10M|  }
 6262|  7.39k|endEntityValue:
 6263|  7.39k|#ifdef XML_DTD
 6264|  7.39k|  parser->m_prologState.inEntityValue = oldInEntityValue;
 6265|  7.39k|#endif /* XML_DTD */
 6266|  7.39k|  return result;
 6267|  7.39k|}
xmlparse.c:processInternalEntity:
 5716|   469k|processInternalEntity(XML_Parser parser, ENTITY *entity, XML_Bool betweenDecl) {
 5717|   469k|  const char *textStart, *textEnd;
 5718|   469k|  const char *next;
 5719|   469k|  enum XML_Error result;
 5720|   469k|  OPEN_INTERNAL_ENTITY *openEntity;
 5721|       |
 5722|   469k|  if (parser->m_freeInternalEntities) {
  ------------------
  |  Branch (5722:7): [True: 467k, False: 1.97k]
  ------------------
 5723|   467k|    openEntity = parser->m_freeInternalEntities;
 5724|   467k|    parser->m_freeInternalEntities = openEntity->next;
 5725|   467k|  } else {
 5726|  1.97k|    openEntity
 5727|  1.97k|        = (OPEN_INTERNAL_ENTITY *)MALLOC(parser, sizeof(OPEN_INTERNAL_ENTITY));
  ------------------
  |  |  713|  1.97k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5728|  1.97k|    if (! openEntity)
  ------------------
  |  Branch (5728:9): [True: 0, False: 1.97k]
  ------------------
 5729|      0|      return XML_ERROR_NO_MEMORY;
 5730|  1.97k|  }
 5731|   469k|  entity->open = XML_TRUE;
  ------------------
  |  |   55|   469k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5732|   469k|#ifdef XML_DTD
 5733|   469k|  entityTrackingOnOpen(parser, entity, __LINE__);
 5734|   469k|#endif
 5735|   469k|  entity->processed = 0;
 5736|   469k|  openEntity->next = parser->m_openInternalEntities;
 5737|   469k|  parser->m_openInternalEntities = openEntity;
 5738|   469k|  openEntity->entity = entity;
 5739|   469k|  openEntity->startTagLevel = parser->m_tagLevel;
 5740|   469k|  openEntity->betweenDecl = betweenDecl;
 5741|   469k|  openEntity->internalEventPtr = NULL;
 5742|   469k|  openEntity->internalEventEndPtr = NULL;
 5743|   469k|  textStart = (const char *)entity->textPtr;
 5744|   469k|  textEnd = (const char *)(entity->textPtr + entity->textLen);
 5745|       |  /* Set a safe default value in case 'next' does not get set */
 5746|   469k|  next = textStart;
 5747|       |
 5748|   469k|#ifdef XML_DTD
 5749|   469k|  if (entity->is_param) {
  ------------------
  |  Branch (5749:7): [True: 0, False: 469k]
  ------------------
 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|   469k|#endif /* XML_DTD */
 5757|   469k|    result = doContent(parser, parser->m_tagLevel, parser->m_internalEncoding,
 5758|   469k|                       textStart, textEnd, &next, XML_FALSE,
  ------------------
  |  |   56|   469k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5759|   469k|                       XML_ACCOUNT_ENTITY_EXPANSION);
 5760|       |
 5761|   469k|  if (result == XML_ERROR_NONE) {
  ------------------
  |  Branch (5761:7): [True: 468k, False: 973]
  ------------------
 5762|   468k|    if (textEnd != next && parser->m_parsingStatus.parsing == XML_SUSPENDED) {
  ------------------
  |  Branch (5762:9): [True: 0, False: 468k]
  |  Branch (5762:28): [True: 0, False: 0]
  ------------------
 5763|      0|      entity->processed = (int)(next - textStart);
 5764|      0|      parser->m_processor = internalEntityProcessor;
 5765|   468k|    } else {
 5766|   468k|#ifdef XML_DTD
 5767|   468k|      entityTrackingOnClose(parser, entity, __LINE__);
 5768|   468k|#endif /* XML_DTD */
 5769|   468k|      entity->open = XML_FALSE;
  ------------------
  |  |   56|   468k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5770|   468k|      parser->m_openInternalEntities = openEntity->next;
 5771|       |      /* put openEntity back in list of free instances */
 5772|   468k|      openEntity->next = parser->m_freeInternalEntities;
 5773|   468k|      parser->m_freeInternalEntities = openEntity;
 5774|   468k|    }
 5775|   468k|  }
 5776|   469k|  return result;
 5777|   469k|}
xmlparse.c:entityTrackingOnOpen:
 7827|  3.66M|entityTrackingOnOpen(XML_Parser originParser, ENTITY *entity, int sourceLine) {
 7828|  3.66M|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7829|  3.66M|  assert(! rootParser->m_parentParser);
 7830|       |
 7831|  3.66M|  rootParser->m_entity_stats.countEverOpened++;
 7832|  3.66M|  rootParser->m_entity_stats.currentDepth++;
 7833|  3.66M|  if (rootParser->m_entity_stats.currentDepth
  ------------------
  |  Branch (7833:7): [True: 2.68k, False: 3.66M]
  ------------------
 7834|  3.66M|      > rootParser->m_entity_stats.maximumDepthSeen) {
 7835|  2.68k|    rootParser->m_entity_stats.maximumDepthSeen++;
 7836|  2.68k|  }
 7837|       |
 7838|  3.66M|  entityTrackingReportStats(rootParser, entity, "OPEN ", sourceLine);
 7839|  3.66M|}
xmlparse.c:entityTrackingReportStats:
 7804|  7.32M|                          const char *action, int sourceLine) {
 7805|  7.32M|  assert(! rootParser->m_parentParser);
 7806|  7.32M|  if (rootParser->m_entity_stats.debugLevel == 0u)
  ------------------
  |  Branch (7806:7): [True: 7.32M, False: 0]
  ------------------
 7807|  7.32M|    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|  3.66M|entityTrackingOnClose(XML_Parser originParser, ENTITY *entity, int sourceLine) {
 7843|  3.66M|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7844|  3.66M|  assert(! rootParser->m_parentParser);
 7845|       |
 7846|  3.66M|  entityTrackingReportStats(rootParser, entity, "CLOSE", sourceLine);
 7847|  3.66M|  rootParser->m_entity_stats.currentDepth--;
 7848|  3.66M|}
xmlparse.c:reportProcessingInstruction:
 6292|  16.8k|                            const char *start, const char *end) {
 6293|  16.8k|  const XML_Char *target;
 6294|  16.8k|  XML_Char *data;
 6295|  16.8k|  const char *tem;
 6296|  16.8k|  if (! parser->m_processingInstructionHandler) {
  ------------------
  |  Branch (6296:7): [True: 16.8k, False: 0]
  ------------------
 6297|  16.8k|    if (parser->m_defaultHandler)
  ------------------
  |  Branch (6297:9): [True: 0, False: 16.8k]
  ------------------
 6298|      0|      reportDefault(parser, enc, start, end);
 6299|  16.8k|    return 1;
 6300|  16.8k|  }
 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.62k|              const char *end) {
 6320|  2.62k|  XML_Char *data;
 6321|  2.62k|  if (! parser->m_commentHandler) {
  ------------------
  |  Branch (6321:7): [True: 2.62k, False: 0]
  ------------------
 6322|  2.62k|    if (parser->m_defaultHandler)
  ------------------
  |  Branch (6322:9): [True: 0, False: 2.62k]
  ------------------
 6323|      0|      reportDefault(parser, enc, start, end);
 6324|  2.62k|    return 1;
 6325|  2.62k|  }
 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|  38.4k|getDebugLevel(const char *variableName, unsigned long defaultDebugLevel) {
 8391|  38.4k|  const char *const valueOrNull = getenv(variableName);
 8392|  38.4k|  if (valueOrNull == NULL) {
  ------------------
  |  Branch (8392:7): [True: 38.4k, False: 0]
  ------------------
 8393|  38.4k|    return defaultDebugLevel;
 8394|  38.4k|  }
 8395|      0|  const char *const value = valueOrNull;
 8396|       |
 8397|      0|  errno = 0;
 8398|      0|  char *afterValue = NULL;
 8399|      0|  unsigned long debugLevel = strtoul(value, &afterValue, 10);
 8400|      0|  if ((errno != 0) || (afterValue == value) || (afterValue[0] != '\0')) {
  ------------------
  |  Branch (8400:7): [True: 0, False: 0]
  |  Branch (8400:23): [True: 0, False: 0]
  |  Branch (8400:48): [True: 0, False: 0]
  ------------------
 8401|      0|    errno = 0;
 8402|      0|    return defaultDebugLevel;
 8403|      0|  }
 8404|       |
 8405|      0|  return debugLevel;
 8406|      0|}
xmlparse.c:destroyBindings:
 1428|  3.86M|destroyBindings(BINDING *bindings, XML_Parser parser) {
 1429|  3.86M|  for (;;) {
 1430|  3.86M|    BINDING *b = bindings;
 1431|  3.86M|    if (! b)
  ------------------
  |  Branch (1431:9): [True: 3.86M, False: 0]
  ------------------
 1432|  3.86M|      break;
 1433|      0|    bindings = b->nextTagBinding;
 1434|      0|    FREE(parser, b->uri);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1435|      0|    FREE(parser, b);
  ------------------
  |  |  715|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1436|      0|  }
 1437|  3.86M|}
xmlparse.c:startParsing:
  953|  19.2k|startParsing(XML_Parser parser) {
  954|       |  /* hash functions must be initialized before setContext() is called */
  955|  19.2k|  if (parser->m_hash_secret_salt == 0)
  ------------------
  |  Branch (955:7): [True: 0, False: 19.2k]
  ------------------
  956|      0|    parser->m_hash_secret_salt = generate_hash_secret_salt(parser);
  957|  19.2k|  if (parser->m_ns) {
  ------------------
  |  Branch (957:7): [True: 0, False: 19.2k]
  ------------------
  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.2k|  return XML_TRUE;
  ------------------
  |  |   55|  19.2k|#define XML_TRUE ((XML_Bool)1)
  ------------------
  964|  19.2k|}
xmlparse.c:dtdDestroy:
 6788|  19.2k|dtdDestroy(DTD *p, XML_Bool isDocEntity, const XML_Memory_Handling_Suite *ms) {
 6789|  19.2k|  HASH_TABLE_ITER iter;
 6790|  19.2k|  hashTableIterInit(&iter, &(p->elementTypes));
 6791|  43.2k|  for (;;) {
 6792|  43.2k|    ELEMENT_TYPE *e = (ELEMENT_TYPE *)hashTableIterNext(&iter);
 6793|  43.2k|    if (! e)
  ------------------
  |  Branch (6793:9): [True: 19.2k, False: 24.0k]
  ------------------
 6794|  19.2k|      break;
 6795|  24.0k|    if (e->allocDefaultAtts != 0)
  ------------------
  |  Branch (6795:9): [True: 1.30k, False: 22.7k]
  ------------------
 6796|  1.30k|      ms->free_fcn(e->defaultAtts);
 6797|  24.0k|  }
 6798|  19.2k|  hashTableDestroy(&(p->generalEntities));
 6799|  19.2k|#ifdef XML_DTD
 6800|  19.2k|  hashTableDestroy(&(p->paramEntities));
 6801|  19.2k|#endif /* XML_DTD */
 6802|  19.2k|  hashTableDestroy(&(p->elementTypes));
 6803|  19.2k|  hashTableDestroy(&(p->attributeIds));
 6804|  19.2k|  hashTableDestroy(&(p->prefixes));
 6805|  19.2k|  poolDestroy(&(p->pool));
 6806|  19.2k|  poolDestroy(&(p->entityValuePool));
 6807|  19.2k|  if (isDocEntity) {
  ------------------
  |  Branch (6807:7): [True: 19.2k, False: 0]
  ------------------
 6808|  19.2k|    ms->free_fcn(p->scaffIndex);
 6809|  19.2k|    ms->free_fcn(p->scaffold);
 6810|  19.2k|  }
 6811|  19.2k|  ms->free_fcn(p);
 6812|  19.2k|}
xmlparse.c:hashTableDestroy:
 7141|  96.0k|hashTableDestroy(HASH_TABLE *table) {
 7142|  96.0k|  size_t i;
 7143|  1.24M|  for (i = 0; i < table->size; i++)
  ------------------
  |  Branch (7143:15): [True: 1.15M, False: 96.0k]
  ------------------
 7144|  1.15M|    table->mem->free_fcn(table->v[i]);
 7145|  96.0k|  table->mem->free_fcn(table->v);
 7146|  96.0k|}
xmlparse.c:poolClear:
 7184|  3.97M|poolClear(STRING_POOL *pool) {
 7185|  3.97M|  if (! pool->freeBlocks)
  ------------------
  |  Branch (7185:7): [True: 1.48M, False: 2.48M]
  ------------------
 7186|  1.48M|    pool->freeBlocks = pool->blocks;
 7187|  2.48M|  else {
 7188|  2.48M|    BLOCK *p = pool->blocks;
 7189|  2.48M|    while (p) {
  ------------------
  |  Branch (7189:12): [True: 1.90k, False: 2.48M]
  ------------------
 7190|  1.90k|      BLOCK *tem = p->next;
 7191|  1.90k|      p->next = pool->freeBlocks;
 7192|  1.90k|      pool->freeBlocks = p;
 7193|  1.90k|      p = tem;
 7194|  1.90k|    }
 7195|  2.48M|  }
 7196|  3.97M|  pool->blocks = NULL;
 7197|  3.97M|  pool->start = NULL;
 7198|  3.97M|  pool->ptr = NULL;
 7199|  3.97M|  pool->end = NULL;
 7200|  3.97M|}
xmlparse.c:poolDestroy:
 7203|  76.8k|poolDestroy(STRING_POOL *pool) {
 7204|  76.8k|  BLOCK *p = pool->blocks;
 7205|  98.7k|  while (p) {
  ------------------
  |  Branch (7205:10): [True: 21.9k, False: 76.8k]
  ------------------
 7206|  21.9k|    BLOCK *tem = p->next;
 7207|  21.9k|    pool->mem->free_fcn(p);
 7208|  21.9k|    p = tem;
 7209|  21.9k|  }
 7210|  76.8k|  p = pool->freeBlocks;
 7211|  79.3k|  while (p) {
  ------------------
  |  Branch (7211:10): [True: 2.57k, False: 76.8k]
  ------------------
 7212|  2.57k|    BLOCK *tem = p->next;
 7213|  2.57k|    pool->mem->free_fcn(p);
 7214|  2.57k|    p = tem;
 7215|  2.57k|  }
 7216|  76.8k|}
xmlparse.c:poolCopyString:
 7236|  15.1k|poolCopyString(STRING_POOL *pool, const XML_Char *s) {
 7237|  3.24M|  do {
 7238|  3.24M|    if (! poolAppendChar(pool, *s))
  ------------------
  |  |  602|  3.24M|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (602:5): [True: 7.75k, False: 3.23M]
  |  |  |  Branch (602:35): [True: 0, False: 7.75k]
  |  |  ------------------
  |  |  603|  3.24M|       ? 0                                                                     \
  |  |  604|  3.24M|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (7238:9): [True: 0, False: 3.24M]
  ------------------
 7239|      0|      return NULL;
 7240|  3.24M|  } while (*s++);
  ------------------
  |  Branch (7240:12): [True: 3.22M, False: 15.1k]
  ------------------
 7241|  15.1k|  s = pool->start;
 7242|  15.1k|  poolFinish(pool);
  ------------------
  |  |  600|  15.1k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 7243|  15.1k|  return s;
 7244|  15.1k|}
xmlparse.c:copyString:
 7636|  19.2k|copyString(const XML_Char *s, const XML_Memory_Handling_Suite *memsuite) {
 7637|  19.2k|  size_t charsRequired = 0;
 7638|  19.2k|  XML_Char *result;
 7639|       |
 7640|       |  /* First determine how long the string is */
 7641|   211k|  while (s[charsRequired] != 0) {
  ------------------
  |  Branch (7641:10): [True: 192k, False: 19.2k]
  ------------------
 7642|   192k|    charsRequired++;
 7643|   192k|  }
 7644|       |  /* Include the terminator */
 7645|  19.2k|  charsRequired++;
 7646|       |
 7647|       |  /* Now allocate space for the copy */
 7648|  19.2k|  result = memsuite->malloc_fcn(charsRequired * sizeof(XML_Char));
 7649|  19.2k|  if (result == NULL)
  ------------------
  |  Branch (7649:7): [True: 0, False: 19.2k]
  ------------------
 7650|      0|    return NULL;
 7651|       |  /* Copy the original into place */
 7652|  19.2k|  memcpy(result, s, charsRequired * sizeof(XML_Char));
 7653|  19.2k|  return result;
 7654|  19.2k|}

XmlPrologStateInit:
 1237|  19.2k|XmlPrologStateInit(PROLOG_STATE *state) {
 1238|  19.2k|  state->handler = prolog0;
 1239|  19.2k|#ifdef XML_DTD
 1240|  19.2k|  state->documentEntity = 1;
 1241|  19.2k|  state->includeLevel = 0;
 1242|  19.2k|  state->inEntityValue = 0;
 1243|  19.2k|#endif /* XML_DTD */
 1244|  19.2k|}
xmlrole.c:prolog0:
  142|  17.3k|        const ENCODING *enc) {
  143|  17.3k|  switch (tok) {
  ------------------
  |  Branch (143:11): [True: 302, False: 17.0k]
  ------------------
  144|    549|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    549|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (144:3): [True: 549, False: 16.8k]
  ------------------
  145|    549|    state->handler = prolog1;
  146|    549|    return XML_ROLE_NONE;
  147|    323|  case XML_TOK_XML_DECL:
  ------------------
  |  |   77|    323|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (147:3): [True: 323, False: 17.0k]
  ------------------
  148|    323|    state->handler = prolog1;
  149|    323|    return XML_ROLE_XML_DECL;
  150|    319|  case XML_TOK_PI:
  ------------------
  |  |   76|    319|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (150:3): [True: 319, False: 17.0k]
  ------------------
  151|    319|    state->handler = prolog1;
  152|    319|    return XML_ROLE_PI;
  153|     44|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|     44|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (153:3): [True: 44, False: 17.3k]
  ------------------
  154|     44|    state->handler = prolog1;
  155|     44|    return XML_ROLE_COMMENT;
  156|  1.30k|  case XML_TOK_BOM:
  ------------------
  |  |   79|  1.30k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
  |  Branch (156:3): [True: 1.30k, False: 16.0k]
  ------------------
  157|  1.30k|    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: 11.6k]
  ------------------
  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: 93, False: 5.68k]
  ------------------
  160|  5.78k|                              KW_DOCTYPE))
  161|     93|      break;
  162|  5.68k|    state->handler = doctype0;
  163|  5.68k|    return XML_ROLE_DOCTYPE_NONE;
  164|  8.75k|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|  8.75k|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (164:3): [True: 8.75k, False: 8.62k]
  ------------------
  165|  8.75k|    state->handler = error;
  166|  8.75k|    return XML_ROLE_INSTANCE_START;
  167|  17.3k|  }
  168|    395|  return common(state, tok);
  169|  17.3k|}
xmlrole.c:prolog1:
  173|  5.48k|        const ENCODING *enc) {
  174|  5.48k|  switch (tok) {
  ------------------
  |  Branch (174:11): [True: 9, False: 5.47k]
  ------------------
  175|    648|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    648|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (175:3): [True: 648, False: 4.84k]
  ------------------
  176|    648|    return XML_ROLE_NONE;
  177|  3.79k|  case XML_TOK_PI:
  ------------------
  |  |   76|  3.79k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (177:3): [True: 3.79k, False: 1.69k]
  ------------------
  178|  3.79k|    return XML_ROLE_PI;
  179|    702|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    702|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (179:3): [True: 702, False: 4.78k]
  ------------------
  180|    702|    return XML_ROLE_COMMENT;
  181|      0|  case XML_TOK_BOM:
  ------------------
  |  |   79|      0|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
  |  Branch (181:3): [True: 0, False: 5.48k]
  ------------------
  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|    270|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|    270|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (190:3): [True: 270, False: 5.21k]
  ------------------
  191|    270|    if (! XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|    270|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (191:9): [True: 5, False: 265]
  ------------------
  192|    270|                              KW_DOCTYPE))
  193|      5|      break;
  194|    265|    state->handler = doctype0;
  195|    265|    return XML_ROLE_DOCTYPE_NONE;
  196|     69|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|     69|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (196:3): [True: 69, False: 5.41k]
  ------------------
  197|     69|    state->handler = error;
  198|     69|    return XML_ROLE_INSTANCE_START;
  199|  5.48k|  }
  200|     14|  return common(state, tok);
  201|  5.48k|}
xmlrole.c:doctype0:
  225|  11.8k|         const ENCODING *enc) {
  226|  11.8k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  11.8k|#  define UNUSED_P(p) (void)p
  ------------------
  227|  11.8k|  UNUSED_P(end);
  ------------------
  |  |  135|  11.8k|#  define UNUSED_P(p) (void)p
  ------------------
  228|  11.8k|  UNUSED_P(enc);
  ------------------
  |  |  135|  11.8k|#  define UNUSED_P(p) (void)p
  ------------------
  229|  11.8k|  switch (tok) {
  ------------------
  |  Branch (229:11): [True: 9, False: 11.8k]
  ------------------
  230|  5.94k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  5.94k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (230:3): [True: 5.94k, False: 5.93k]
  ------------------
  231|  5.94k|    return XML_ROLE_DOCTYPE_NONE;
  232|  5.92k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  5.92k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (232:3): [True: 5.92k, False: 5.95k]
  ------------------
  233|  5.92k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  5.92k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (233:3): [True: 0, False: 11.8k]
  ------------------
  234|  5.92k|    state->handler = doctype1;
  235|  5.92k|    return XML_ROLE_DOCTYPE_NAME;
  236|  11.8k|  }
  237|      9|  return common(state, tok);
  238|  11.8k|}
xmlrole.c:doctype1:
  242|  7.04k|         const ENCODING *enc) {
  243|  7.04k|  switch (tok) {
  ------------------
  |  Branch (243:11): [True: 1, False: 7.04k]
  ------------------
  244|  1.13k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.13k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (244:3): [True: 1.13k, False: 5.91k]
  ------------------
  245|  1.13k|    return XML_ROLE_DOCTYPE_NONE;
  246|  4.94k|  case XML_TOK_OPEN_BRACKET:
  ------------------
  |  |   92|  4.94k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
  |  Branch (246:3): [True: 4.94k, False: 2.10k]
  ------------------
  247|  4.94k|    state->handler = internalSubset;
  248|  4.94k|    return XML_ROLE_DOCTYPE_INTERNAL_SUBSET;
  249|     43|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|     43|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (249:3): [True: 43, False: 7.00k]
  ------------------
  250|     43|    state->handler = prolog2;
  251|     43|    return XML_ROLE_DOCTYPE_CLOSE;
  252|    922|  case XML_TOK_NAME:
  ------------------
  |  |   85|    922|#define XML_TOK_NAME 18
  ------------------
  |  Branch (252:3): [True: 922, False: 6.12k]
  ------------------
  253|    922|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|    922|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 14, False: 908]
  |  |  ------------------
  ------------------
  254|     14|      state->handler = doctype3;
  255|     14|      return XML_ROLE_DOCTYPE_NONE;
  256|     14|    }
  257|    908|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|    908|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 884, False: 24]
  |  |  ------------------
  ------------------
  258|    884|      state->handler = doctype2;
  259|    884|      return XML_ROLE_DOCTYPE_NONE;
  260|    884|    }
  261|     24|    break;
  262|  7.04k|  }
  263|     25|  return common(state, tok);
  264|  7.04k|}
xmlrole.c:internalSubset:
  335|  58.3k|               const ENCODING *enc) {
  336|  58.3k|  switch (tok) {
  ------------------
  |  Branch (336:11): [True: 90, False: 58.2k]
  ------------------
  337|  8.30k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  8.30k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (337:3): [True: 8.30k, False: 50.0k]
  ------------------
  338|  8.30k|    return XML_ROLE_NONE;
  339|  43.3k|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|  43.3k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (339:3): [True: 43.3k, False: 14.9k]
  ------------------
  340|  43.3k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  43.3k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 12.0k, False: 31.3k]
  |  |  ------------------
  ------------------
  341|  43.3k|                            KW_ENTITY)) {
  342|  12.0k|      state->handler = entity0;
  343|  12.0k|      return XML_ROLE_ENTITY_NONE;
  344|  12.0k|    }
  345|  31.3k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  31.3k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 24.2k, False: 7.05k]
  |  |  ------------------
  ------------------
  346|  31.3k|                            KW_ATTLIST)) {
  347|  24.2k|      state->handler = attlist0;
  348|  24.2k|      return XML_ROLE_ATTLIST_NONE;
  349|  24.2k|    }
  350|  7.05k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  7.05k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 4.39k, False: 2.65k]
  |  |  ------------------
  ------------------
  351|  7.05k|                            KW_ELEMENT)) {
  352|  4.39k|      state->handler = element0;
  353|  4.39k|      return XML_ROLE_ELEMENT_NONE;
  354|  4.39k|    }
  355|  2.65k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  2.65k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 2.62k, False: 33]
  |  |  ------------------
  ------------------
  356|  2.65k|                            KW_NOTATION)) {
  357|  2.62k|      state->handler = notation0;
  358|  2.62k|      return XML_ROLE_NOTATION_NONE;
  359|  2.62k|    }
  360|     33|    break;
  361|    274|  case XML_TOK_PI:
  ------------------
  |  |   76|    274|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (361:3): [True: 274, False: 58.0k]
  ------------------
  362|    274|    return XML_ROLE_PI;
  363|    228|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    228|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (363:3): [True: 228, False: 58.1k]
  ------------------
  364|    228|    return XML_ROLE_COMMENT;
  365|  3.78k|  case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|  3.78k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (365:3): [True: 3.78k, False: 54.5k]
  ------------------
  366|  3.78k|    return XML_ROLE_PARAM_ENTITY_REF;
  367|  2.29k|  case XML_TOK_CLOSE_BRACKET:
  ------------------
  |  |   93|  2.29k|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
  |  Branch (367:3): [True: 2.29k, False: 56.0k]
  ------------------
  368|  2.29k|    state->handler = doctype5;
  369|  2.29k|    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: 58.3k]
  ------------------
  371|      0|    return XML_ROLE_NONE;
  372|  58.3k|  }
  373|    123|  return common(state, tok);
  374|  58.3k|}
xmlrole.c:entity0:
  417|  24.0k|        const ENCODING *enc) {
  418|  24.0k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  24.0k|#  define UNUSED_P(p) (void)p
  ------------------
  419|  24.0k|  UNUSED_P(end);
  ------------------
  |  |  135|  24.0k|#  define UNUSED_P(p) (void)p
  ------------------
  420|  24.0k|  UNUSED_P(enc);
  ------------------
  |  |  135|  24.0k|#  define UNUSED_P(p) (void)p
  ------------------
  421|  24.0k|  switch (tok) {
  ------------------
  |  Branch (421:11): [True: 13, False: 24.0k]
  ------------------
  422|  12.0k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  12.0k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (422:3): [True: 12.0k, False: 12.0k]
  ------------------
  423|  12.0k|    return XML_ROLE_ENTITY_NONE;
  424|  5.45k|  case XML_TOK_PERCENT:
  ------------------
  |  |   89|  5.45k|#define XML_TOK_PERCENT 22
  ------------------
  |  Branch (424:3): [True: 5.45k, False: 18.6k]
  ------------------
  425|  5.45k|    state->handler = entity1;
  426|  5.45k|    return XML_ROLE_ENTITY_NONE;
  427|  6.55k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  6.55k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (427:3): [True: 6.55k, False: 17.5k]
  ------------------
  428|  6.55k|    state->handler = entity2;
  429|  6.55k|    return XML_ROLE_GENERAL_ENTITY_NAME;
  430|  24.0k|  }
  431|     13|  return common(state, tok);
  432|  24.0k|}
xmlrole.c:entity1:
  436|  10.8k|        const ENCODING *enc) {
  437|  10.8k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  10.8k|#  define UNUSED_P(p) (void)p
  ------------------
  438|  10.8k|  UNUSED_P(end);
  ------------------
  |  |  135|  10.8k|#  define UNUSED_P(p) (void)p
  ------------------
  439|  10.8k|  UNUSED_P(enc);
  ------------------
  |  |  135|  10.8k|#  define UNUSED_P(p) (void)p
  ------------------
  440|  10.8k|  switch (tok) {
  ------------------
  |  Branch (440:11): [True: 37, False: 10.8k]
  ------------------
  441|  5.45k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  5.45k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (441:3): [True: 5.45k, False: 5.44k]
  ------------------
  442|  5.45k|    return XML_ROLE_ENTITY_NONE;
  443|  5.40k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  5.40k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (443:3): [True: 5.40k, False: 5.49k]
  ------------------
  444|  5.40k|    state->handler = entity7;
  445|  5.40k|    return XML_ROLE_PARAM_ENTITY_NAME;
  446|  10.8k|  }
  447|     37|  return common(state, tok);
  448|  10.8k|}
xmlrole.c:entity7:
  544|  10.7k|        const ENCODING *enc) {
  545|  10.7k|  switch (tok) {
  ------------------
  |  Branch (545:11): [True: 15, False: 10.7k]
  ------------------
  546|  5.39k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  5.39k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (546:3): [True: 5.39k, False: 5.37k]
  ------------------
  547|  5.39k|    return XML_ROLE_ENTITY_NONE;
  548|  2.45k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  2.45k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (548:3): [True: 2.45k, False: 8.31k]
  ------------------
  549|  2.45k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  2.45k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 464, False: 1.99k]
  |  |  ------------------
  ------------------
  550|    464|      state->handler = entity9;
  551|    464|      return XML_ROLE_ENTITY_NONE;
  552|    464|    }
  553|  1.99k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|  1.99k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.98k, False: 4]
  |  |  ------------------
  ------------------
  554|  1.98k|      state->handler = entity8;
  555|  1.98k|      return XML_ROLE_ENTITY_NONE;
  556|  1.98k|    }
  557|      4|    break;
  558|  2.90k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  2.90k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (558:3): [True: 2.90k, False: 7.86k]
  ------------------
  559|  2.90k|    state->handler = declClose;
  560|  2.90k|    state->role_none = XML_ROLE_ENTITY_NONE;
  561|  2.90k|    return XML_ROLE_ENTITY_VALUE;
  562|  10.7k|  }
  563|     19|  return common(state, tok);
  564|  10.7k|}
xmlrole.c:entity9:
  584|  4.86k|        const ENCODING *enc) {
  585|  4.86k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  4.86k|#  define UNUSED_P(p) (void)p
  ------------------
  586|  4.86k|  UNUSED_P(end);
  ------------------
  |  |  135|  4.86k|#  define UNUSED_P(p) (void)p
  ------------------
  587|  4.86k|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.86k|#  define UNUSED_P(p) (void)p
  ------------------
  588|  4.86k|  switch (tok) {
  ------------------
  |  Branch (588:11): [True: 5, False: 4.86k]
  ------------------
  589|  2.44k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  2.44k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (589:3): [True: 2.44k, False: 2.42k]
  ------------------
  590|  2.44k|    return XML_ROLE_ENTITY_NONE;
  591|  2.42k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  2.42k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (591:3): [True: 2.42k, False: 2.44k]
  ------------------
  592|  2.42k|    state->handler = entity10;
  593|  2.42k|    return XML_ROLE_ENTITY_SYSTEM_ID;
  594|  4.86k|  }
  595|      5|  return common(state, tok);
  596|  4.86k|}
xmlrole.c:entity10:
  600|  3.07k|         const ENCODING *enc) {
  601|  3.07k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.07k|#  define UNUSED_P(p) (void)p
  ------------------
  602|  3.07k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.07k|#  define UNUSED_P(p) (void)p
  ------------------
  603|  3.07k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.07k|#  define UNUSED_P(p) (void)p
  ------------------
  604|  3.07k|  switch (tok) {
  ------------------
  |  Branch (604:11): [True: 4, False: 3.07k]
  ------------------
  605|    657|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    657|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (605:3): [True: 657, False: 2.41k]
  ------------------
  606|    657|    return XML_ROLE_ENTITY_NONE;
  607|  2.41k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  2.41k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (607:3): [True: 2.41k, False: 661]
  ------------------
  608|  2.41k|    setTopLevel(state);
  ------------------
  |  |  116|  2.41k|    ((state)->handler                                                          \
  |  |  117|  2.41k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 2.41k, False: 0]
  |  |  ------------------
  ------------------
  609|  2.41k|    return XML_ROLE_ENTITY_COMPLETE;
  610|  3.07k|  }
  611|      4|  return common(state, tok);
  612|  3.07k|}
xmlrole.c:entity8:
  568|  3.97k|        const ENCODING *enc) {
  569|  3.97k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.97k|#  define UNUSED_P(p) (void)p
  ------------------
  570|  3.97k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.97k|#  define UNUSED_P(p) (void)p
  ------------------
  571|  3.97k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.97k|#  define UNUSED_P(p) (void)p
  ------------------
  572|  3.97k|  switch (tok) {
  ------------------
  |  Branch (572:11): [True: 2, False: 3.96k]
  ------------------
  573|  1.98k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.98k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (573:3): [True: 1.98k, False: 1.98k]
  ------------------
  574|  1.98k|    return XML_ROLE_ENTITY_NONE;
  575|  1.98k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.98k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (575:3): [True: 1.98k, False: 1.99k]
  ------------------
  576|  1.98k|    state->handler = entity9;
  577|  1.98k|    return XML_ROLE_ENTITY_PUBLIC_ID;
  578|  3.97k|  }
  579|      2|  return common(state, tok);
  580|  3.97k|}
xmlrole.c:declClose:
 1178|  15.0k|          const ENCODING *enc) {
 1179|  15.0k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  15.0k|#  define UNUSED_P(p) (void)p
  ------------------
 1180|  15.0k|  UNUSED_P(end);
  ------------------
  |  |  135|  15.0k|#  define UNUSED_P(p) (void)p
  ------------------
 1181|  15.0k|  UNUSED_P(enc);
  ------------------
  |  |  135|  15.0k|#  define UNUSED_P(p) (void)p
  ------------------
 1182|  15.0k|  switch (tok) {
  ------------------
  |  Branch (1182:11): [True: 131, False: 14.8k]
  ------------------
 1183|  1.39k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.39k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1183:3): [True: 1.39k, False: 13.6k]
  ------------------
 1184|  1.39k|    return state->role_none;
 1185|  13.5k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  13.5k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (1185:3): [True: 13.5k, False: 1.52k]
  ------------------
 1186|  13.5k|    setTopLevel(state);
  ------------------
  |  |  116|  13.5k|    ((state)->handler                                                          \
  |  |  117|  13.5k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 13.5k, False: 0]
  |  |  ------------------
  ------------------
 1187|  13.5k|    return state->role_none;
 1188|  15.0k|  }
 1189|    131|  return common(state, tok);
 1190|  15.0k|}
xmlrole.c:entity2:
  452|  13.0k|        const ENCODING *enc) {
  453|  13.0k|  switch (tok) {
  ------------------
  |  Branch (453:11): [True: 6, False: 13.0k]
  ------------------
  454|  6.54k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  6.54k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (454:3): [True: 6.54k, False: 6.50k]
  ------------------
  455|  6.54k|    return XML_ROLE_ENTITY_NONE;
  456|  1.43k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.43k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (456:3): [True: 1.43k, False: 11.6k]
  ------------------
  457|  1.43k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  1.43k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 380, False: 1.05k]
  |  |  ------------------
  ------------------
  458|    380|      state->handler = entity4;
  459|    380|      return XML_ROLE_ENTITY_NONE;
  460|    380|    }
  461|  1.05k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|  1.05k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.04k, False: 6]
  |  |  ------------------
  ------------------
  462|  1.04k|      state->handler = entity3;
  463|  1.04k|      return XML_ROLE_ENTITY_NONE;
  464|  1.04k|    }
  465|      6|    break;
  466|  5.07k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  5.07k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (466:3): [True: 5.07k, False: 7.98k]
  ------------------
  467|  5.07k|    state->handler = declClose;
  468|  5.07k|    state->role_none = XML_ROLE_ENTITY_NONE;
  469|  5.07k|    return XML_ROLE_ENTITY_VALUE;
  470|  13.0k|  }
  471|     12|  return common(state, tok);
  472|  13.0k|}
xmlrole.c:entity4:
  492|  2.80k|        const ENCODING *enc) {
  493|  2.80k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.80k|#  define UNUSED_P(p) (void)p
  ------------------
  494|  2.80k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.80k|#  define UNUSED_P(p) (void)p
  ------------------
  495|  2.80k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.80k|#  define UNUSED_P(p) (void)p
  ------------------
  496|  2.80k|  switch (tok) {
  ------------------
  |  Branch (496:11): [True: 8, False: 2.79k]
  ------------------
  497|  1.40k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.40k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (497:3): [True: 1.40k, False: 1.39k]
  ------------------
  498|  1.40k|    return XML_ROLE_ENTITY_NONE;
  499|  1.38k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.38k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (499:3): [True: 1.38k, False: 1.41k]
  ------------------
  500|  1.38k|    state->handler = entity5;
  501|  1.38k|    return XML_ROLE_ENTITY_SYSTEM_ID;
  502|  2.80k|  }
  503|      8|  return common(state, tok);
  504|  2.80k|}
xmlrole.c:entity5:
  508|  2.53k|        const ENCODING *enc) {
  509|  2.53k|  switch (tok) {
  ------------------
  |  Branch (509:11): [True: 1, False: 2.53k]
  ------------------
  510|  1.15k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.15k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (510:3): [True: 1.15k, False: 1.38k]
  ------------------
  511|  1.15k|    return XML_ROLE_ENTITY_NONE;
  512|    538|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|    538|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (512:3): [True: 538, False: 1.99k]
  ------------------
  513|    538|    setTopLevel(state);
  ------------------
  |  |  116|    538|    ((state)->handler                                                          \
  |  |  117|    538|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 538, False: 0]
  |  |  ------------------
  ------------------
  514|    538|    return XML_ROLE_ENTITY_COMPLETE;
  515|    843|  case XML_TOK_NAME:
  ------------------
  |  |   85|    843|#define XML_TOK_NAME 18
  ------------------
  |  Branch (515:3): [True: 843, False: 1.69k]
  ------------------
  516|    843|    if (XmlNameMatchesAscii(enc, ptr, end, KW_NDATA)) {
  ------------------
  |  |  255|    843|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 839, False: 4]
  |  |  ------------------
  ------------------
  517|    839|      state->handler = entity6;
  518|    839|      return XML_ROLE_ENTITY_NONE;
  519|    839|    }
  520|      4|    break;
  521|  2.53k|  }
  522|      5|  return common(state, tok);
  523|  2.53k|}
xmlrole.c:entity6:
  527|  1.67k|        const ENCODING *enc) {
  528|  1.67k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.67k|#  define UNUSED_P(p) (void)p
  ------------------
  529|  1.67k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.67k|#  define UNUSED_P(p) (void)p
  ------------------
  530|  1.67k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.67k|#  define UNUSED_P(p) (void)p
  ------------------
  531|  1.67k|  switch (tok) {
  ------------------
  |  Branch (531:11): [True: 2, False: 1.67k]
  ------------------
  532|    839|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    839|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (532:3): [True: 839, False: 836]
  ------------------
  533|    839|    return XML_ROLE_ENTITY_NONE;
  534|    834|  case XML_TOK_NAME:
  ------------------
  |  |   85|    834|#define XML_TOK_NAME 18
  ------------------
  |  Branch (534:3): [True: 834, False: 841]
  ------------------
  535|    834|    state->handler = declClose;
  536|    834|    state->role_none = XML_ROLE_ENTITY_NONE;
  537|    834|    return XML_ROLE_ENTITY_NOTATION_NAME;
  538|  1.67k|  }
  539|      2|  return common(state, tok);
  540|  1.67k|}
xmlrole.c:entity3:
  476|  2.08k|        const ENCODING *enc) {
  477|  2.08k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.08k|#  define UNUSED_P(p) (void)p
  ------------------
  478|  2.08k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.08k|#  define UNUSED_P(p) (void)p
  ------------------
  479|  2.08k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.08k|#  define UNUSED_P(p) (void)p
  ------------------
  480|  2.08k|  switch (tok) {
  ------------------
  |  Branch (480:11): [True: 2, False: 2.08k]
  ------------------
  481|  1.04k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.04k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (481:3): [True: 1.04k, False: 1.04k]
  ------------------
  482|  1.04k|    return XML_ROLE_ENTITY_NONE;
  483|  1.04k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.04k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (483:3): [True: 1.04k, False: 1.04k]
  ------------------
  484|  1.04k|    state->handler = entity4;
  485|  1.04k|    return XML_ROLE_ENTITY_PUBLIC_ID;
  486|  2.08k|  }
  487|      2|  return common(state, tok);
  488|  2.08k|}
xmlrole.c:attlist0:
  705|  48.4k|         const ENCODING *enc) {
  706|  48.4k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  48.4k|#  define UNUSED_P(p) (void)p
  ------------------
  707|  48.4k|  UNUSED_P(end);
  ------------------
  |  |  135|  48.4k|#  define UNUSED_P(p) (void)p
  ------------------
  708|  48.4k|  UNUSED_P(enc);
  ------------------
  |  |  135|  48.4k|#  define UNUSED_P(p) (void)p
  ------------------
  709|  48.4k|  switch (tok) {
  ------------------
  |  Branch (709:11): [True: 21, False: 48.4k]
  ------------------
  710|  24.2k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  24.2k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (710:3): [True: 24.2k, False: 24.2k]
  ------------------
  711|  24.2k|    return XML_ROLE_ATTLIST_NONE;
  712|  24.2k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  24.2k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (712:3): [True: 24.2k, False: 24.2k]
  ------------------
  713|  24.2k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  24.2k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (713:3): [True: 0, False: 48.4k]
  ------------------
  714|  24.2k|    state->handler = attlist1;
  715|  24.2k|    return XML_ROLE_ATTLIST_ELEMENT_NAME;
  716|  48.4k|  }
  717|     21|  return common(state, tok);
  718|  48.4k|}
xmlrole.c:attlist1:
  722|   130k|         const ENCODING *enc) {
  723|   130k|  UNUSED_P(ptr);
  ------------------
  |  |  135|   130k|#  define UNUSED_P(p) (void)p
  ------------------
  724|   130k|  UNUSED_P(end);
  ------------------
  |  |  135|   130k|#  define UNUSED_P(p) (void)p
  ------------------
  725|   130k|  UNUSED_P(enc);
  ------------------
  |  |  135|   130k|#  define UNUSED_P(p) (void)p
  ------------------
  726|   130k|  switch (tok) {
  ------------------
  |  Branch (726:11): [True: 53, False: 130k]
  ------------------
  727|  58.2k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  58.2k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (727:3): [True: 58.2k, False: 72.5k]
  ------------------
  728|  58.2k|    return XML_ROLE_ATTLIST_NONE;
  729|  23.4k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  23.4k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (729:3): [True: 23.4k, False: 107k]
  ------------------
  730|  23.4k|    setTopLevel(state);
  ------------------
  |  |  116|  23.4k|    ((state)->handler                                                          \
  |  |  117|  23.4k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 23.4k, False: 0]
  |  |  ------------------
  ------------------
  731|  23.4k|    return XML_ROLE_ATTLIST_NONE;
  732|  49.0k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  49.0k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (732:3): [True: 49.0k, False: 81.6k]
  ------------------
  733|  49.0k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  49.0k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (733:3): [True: 0, False: 130k]
  ------------------
  734|  49.0k|    state->handler = attlist2;
  735|  49.0k|    return XML_ROLE_ATTRIBUTE_NAME;
  736|   130k|  }
  737|     53|  return common(state, tok);
  738|   130k|}
xmlrole.c:attlist2:
  742|  97.9k|         const ENCODING *enc) {
  743|  97.9k|  switch (tok) {
  ------------------
  |  Branch (743:11): [True: 17, False: 97.9k]
  ------------------
  744|  49.0k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  49.0k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (744:3): [True: 49.0k, False: 48.9k]
  ------------------
  745|  49.0k|    return XML_ROLE_ATTLIST_NONE;
  746|  13.5k|  case XML_TOK_NAME: {
  ------------------
  |  |   85|  13.5k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (746:3): [True: 13.5k, False: 84.4k]
  ------------------
  747|  13.5k|    static const char *const types[] = {
  748|  13.5k|        KW_CDATA,  KW_ID,       KW_IDREF,   KW_IDREFS,
  749|  13.5k|        KW_ENTITY, KW_ENTITIES, KW_NMTOKEN, KW_NMTOKENS,
  750|  13.5k|    };
  751|  13.5k|    int i;
  752|  37.0k|    for (i = 0; i < (int)(sizeof(types) / sizeof(types[0])); i++)
  ------------------
  |  Branch (752:17): [True: 36.6k, False: 377]
  ------------------
  753|  36.6k|      if (XmlNameMatchesAscii(enc, ptr, end, types[i])) {
  ------------------
  |  |  255|  36.6k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 13.1k, False: 23.4k]
  |  |  ------------------
  ------------------
  754|  13.1k|        state->handler = attlist8;
  755|  13.1k|        return XML_ROLE_ATTRIBUTE_TYPE_CDATA + i;
  756|  13.1k|      }
  757|  13.5k|  }
  758|    377|    if (XmlNameMatchesAscii(enc, ptr, end, KW_NOTATION)) {
  ------------------
  |  |  255|    377|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 327, False: 50]
  |  |  ------------------
  ------------------
  759|    327|      state->handler = attlist5;
  760|    327|      return XML_ROLE_ATTLIST_NONE;
  761|    327|    }
  762|     50|    break;
  763|  35.4k|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  35.4k|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (763:3): [True: 35.4k, False: 62.5k]
  ------------------
  764|  35.4k|    state->handler = attlist3;
  765|  35.4k|    return XML_ROLE_ATTLIST_NONE;
  766|  97.9k|  }
  767|     67|  return common(state, tok);
  768|  97.9k|}
xmlrole.c:attlist8:
  861|  97.2k|         const ENCODING *enc) {
  862|  97.2k|  switch (tok) {
  ------------------
  |  Branch (862:11): [True: 18, False: 97.2k]
  ------------------
  863|  48.6k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  48.6k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (863:3): [True: 48.6k, False: 48.5k]
  ------------------
  864|  48.6k|    return XML_ROLE_ATTLIST_NONE;
  865|  35.0k|  case XML_TOK_POUND_NAME:
  ------------------
  |  |   87|  35.0k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  |  Branch (865:3): [True: 35.0k, False: 62.1k]
  ------------------
  866|  35.0k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  35.0k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 31.2k, False: 3.85k]
  |  |  ------------------
  ------------------
  867|  35.0k|                            KW_IMPLIED)) {
  868|  31.2k|      state->handler = attlist1;
  869|  31.2k|      return XML_ROLE_IMPLIED_ATTRIBUTE_VALUE;
  870|  31.2k|    }
  871|  3.85k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  3.85k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 2.73k, False: 1.11k]
  |  |  ------------------
  ------------------
  872|  3.85k|                            KW_REQUIRED)) {
  873|  2.73k|      state->handler = attlist1;
  874|  2.73k|      return XML_ROLE_REQUIRED_ATTRIBUTE_VALUE;
  875|  2.73k|    }
  876|  1.11k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  1.11k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.10k, False: 13]
  |  |  ------------------
  ------------------
  877|  1.11k|                            KW_FIXED)) {
  878|  1.10k|      state->handler = attlist9;
  879|  1.10k|      return XML_ROLE_ATTLIST_NONE;
  880|  1.10k|    }
  881|     13|    break;
  882|  13.4k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  13.4k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (882:3): [True: 13.4k, False: 83.7k]
  ------------------
  883|  13.4k|    state->handler = attlist1;
  884|  13.4k|    return XML_ROLE_DEFAULT_ATTRIBUTE_VALUE;
  885|  97.2k|  }
  886|     31|  return common(state, tok);
  887|  97.2k|}
xmlrole.c:attlist9:
  891|  2.19k|         const ENCODING *enc) {
  892|  2.19k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.19k|#  define UNUSED_P(p) (void)p
  ------------------
  893|  2.19k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.19k|#  define UNUSED_P(p) (void)p
  ------------------
  894|  2.19k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.19k|#  define UNUSED_P(p) (void)p
  ------------------
  895|  2.19k|  switch (tok) {
  ------------------
  |  Branch (895:11): [True: 17, False: 2.17k]
  ------------------
  896|  1.10k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.10k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (896:3): [True: 1.10k, False: 1.09k]
  ------------------
  897|  1.10k|    return XML_ROLE_ATTLIST_NONE;
  898|  1.07k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.07k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (898:3): [True: 1.07k, False: 1.12k]
  ------------------
  899|  1.07k|    state->handler = attlist1;
  900|  1.07k|    return XML_ROLE_FIXED_ATTRIBUTE_VALUE;
  901|  2.19k|  }
  902|     17|  return common(state, tok);
  903|  2.19k|}
xmlrole.c:attlist5:
  809|    650|         const ENCODING *enc) {
  810|    650|  UNUSED_P(ptr);
  ------------------
  |  |  135|    650|#  define UNUSED_P(p) (void)p
  ------------------
  811|    650|  UNUSED_P(end);
  ------------------
  |  |  135|    650|#  define UNUSED_P(p) (void)p
  ------------------
  812|    650|  UNUSED_P(enc);
  ------------------
  |  |  135|    650|#  define UNUSED_P(p) (void)p
  ------------------
  813|    650|  switch (tok) {
  ------------------
  |  Branch (813:11): [True: 1, False: 649]
  ------------------
  814|    326|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    326|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (814:3): [True: 326, False: 324]
  ------------------
  815|    326|    return XML_ROLE_ATTLIST_NONE;
  816|    323|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|    323|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (816:3): [True: 323, False: 327]
  ------------------
  817|    323|    state->handler = attlist6;
  818|    323|    return XML_ROLE_ATTLIST_NONE;
  819|    650|  }
  820|      1|  return common(state, tok);
  821|    650|}
xmlrole.c:attlist6:
  825|  1.26k|         const ENCODING *enc) {
  826|  1.26k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.26k|#  define UNUSED_P(p) (void)p
  ------------------
  827|  1.26k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.26k|#  define UNUSED_P(p) (void)p
  ------------------
  828|  1.26k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.26k|#  define UNUSED_P(p) (void)p
  ------------------
  829|  1.26k|  switch (tok) {
  ------------------
  |  Branch (829:11): [True: 5, False: 1.25k]
  ------------------
  830|    295|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    295|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (830:3): [True: 295, False: 968]
  ------------------
  831|    295|    return XML_ROLE_ATTLIST_NONE;
  832|    963|  case XML_TOK_NAME:
  ------------------
  |  |   85|    963|#define XML_TOK_NAME 18
  ------------------
  |  Branch (832:3): [True: 963, False: 300]
  ------------------
  833|    963|    state->handler = attlist7;
  834|    963|    return XML_ROLE_ATTRIBUTE_NOTATION_VALUE;
  835|  1.26k|  }
  836|      5|  return common(state, tok);
  837|  1.26k|}
xmlrole.c:attlist7:
  841|  1.27k|         const ENCODING *enc) {
  842|  1.27k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.27k|#  define UNUSED_P(p) (void)p
  ------------------
  843|  1.27k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.27k|#  define UNUSED_P(p) (void)p
  ------------------
  844|  1.27k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.27k|#  define UNUSED_P(p) (void)p
  ------------------
  845|  1.27k|  switch (tok) {
  ------------------
  |  Branch (845:11): [True: 1, False: 1.27k]
  ------------------
  846|    320|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    320|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (846:3): [True: 320, False: 956]
  ------------------
  847|    320|    return XML_ROLE_ATTLIST_NONE;
  848|    288|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|    288|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (848:3): [True: 288, False: 988]
  ------------------
  849|    288|    state->handler = attlist8;
  850|    288|    return XML_ROLE_ATTLIST_NONE;
  851|    667|  case XML_TOK_OR:
  ------------------
  |  |   88|    667|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (851:3): [True: 667, False: 609]
  ------------------
  852|    667|    state->handler = attlist6;
  853|    667|    return XML_ROLE_ATTLIST_NONE;
  854|  1.27k|  }
  855|      1|  return common(state, tok);
  856|  1.27k|}
xmlrole.c:attlist3:
  772|  42.5k|         const ENCODING *enc) {
  773|  42.5k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  42.5k|#  define UNUSED_P(p) (void)p
  ------------------
  774|  42.5k|  UNUSED_P(end);
  ------------------
  |  |  135|  42.5k|#  define UNUSED_P(p) (void)p
  ------------------
  775|  42.5k|  UNUSED_P(enc);
  ------------------
  |  |  135|  42.5k|#  define UNUSED_P(p) (void)p
  ------------------
  776|  42.5k|  switch (tok) {
  ------------------
  |  Branch (776:11): [True: 5, False: 42.5k]
  ------------------
  777|    504|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    504|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (777:3): [True: 504, False: 42.0k]
  ------------------
  778|    504|    return XML_ROLE_ATTLIST_NONE;
  779|  6.20k|  case XML_TOK_NMTOKEN:
  ------------------
  |  |   86|  6.20k|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (779:3): [True: 6.20k, False: 36.3k]
  ------------------
  780|  42.0k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  42.0k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (780:3): [True: 35.8k, False: 6.71k]
  ------------------
  781|  42.0k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  42.0k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (781:3): [True: 0, False: 42.5k]
  ------------------
  782|  42.0k|    state->handler = attlist4;
  783|  42.0k|    return XML_ROLE_ATTRIBUTE_ENUM_VALUE;
  784|  42.5k|  }
  785|      5|  return common(state, tok);
  786|  42.5k|}
xmlrole.c:attlist4:
  790|  42.5k|         const ENCODING *enc) {
  791|  42.5k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  42.5k|#  define UNUSED_P(p) (void)p
  ------------------
  792|  42.5k|  UNUSED_P(end);
  ------------------
  |  |  135|  42.5k|#  define UNUSED_P(p) (void)p
  ------------------
  793|  42.5k|  UNUSED_P(enc);
  ------------------
  |  |  135|  42.5k|#  define UNUSED_P(p) (void)p
  ------------------
  794|  42.5k|  switch (tok) {
  ------------------
  |  Branch (794:11): [True: 2, False: 42.5k]
  ------------------
  795|    547|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    547|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (795:3): [True: 547, False: 42.0k]
  ------------------
  796|    547|    return XML_ROLE_ATTLIST_NONE;
  797|  35.2k|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|  35.2k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (797:3): [True: 35.2k, False: 7.32k]
  ------------------
  798|  35.2k|    state->handler = attlist8;
  799|  35.2k|    return XML_ROLE_ATTLIST_NONE;
  800|  6.77k|  case XML_TOK_OR:
  ------------------
  |  |   88|  6.77k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (800:3): [True: 6.77k, False: 35.7k]
  ------------------
  801|  6.77k|    state->handler = attlist3;
  802|  6.77k|    return XML_ROLE_ATTLIST_NONE;
  803|  42.5k|  }
  804|      2|  return common(state, tok);
  805|  42.5k|}
xmlrole.c:element0:
  907|  8.79k|         const ENCODING *enc) {
  908|  8.79k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  8.79k|#  define UNUSED_P(p) (void)p
  ------------------
  909|  8.79k|  UNUSED_P(end);
  ------------------
  |  |  135|  8.79k|#  define UNUSED_P(p) (void)p
  ------------------
  910|  8.79k|  UNUSED_P(enc);
  ------------------
  |  |  135|  8.79k|#  define UNUSED_P(p) (void)p
  ------------------
  911|  8.79k|  switch (tok) {
  ------------------
  |  Branch (911:11): [True: 7, False: 8.78k]
  ------------------
  912|  4.39k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  4.39k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (912:3): [True: 4.39k, False: 4.39k]
  ------------------
  913|  4.39k|    return XML_ROLE_ELEMENT_NONE;
  914|  4.38k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  4.38k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (914:3): [True: 4.38k, False: 4.40k]
  ------------------
  915|  4.38k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  4.38k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (915:3): [True: 0, False: 8.79k]
  ------------------
  916|  4.38k|    state->handler = element1;
  917|  4.38k|    return XML_ROLE_ELEMENT_NAME;
  918|  8.79k|  }
  919|      7|  return common(state, tok);
  920|  8.79k|}
xmlrole.c:element1:
  924|  8.76k|         const ENCODING *enc) {
  925|  8.76k|  switch (tok) {
  ------------------
  |  Branch (925:11): [True: 5, False: 8.75k]
  ------------------
  926|  4.38k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  4.38k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (926:3): [True: 4.38k, False: 4.38k]
  ------------------
  927|  4.38k|    return XML_ROLE_ELEMENT_NONE;
  928|     34|  case XML_TOK_NAME:
  ------------------
  |  |   85|     34|#define XML_TOK_NAME 18
  ------------------
  |  Branch (928:3): [True: 34, False: 8.73k]
  ------------------
  929|     34|    if (XmlNameMatchesAscii(enc, ptr, end, KW_EMPTY)) {
  ------------------
  |  |  255|     34|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 10, False: 24]
  |  |  ------------------
  ------------------
  930|     10|      state->handler = declClose;
  931|     10|      state->role_none = XML_ROLE_ELEMENT_NONE;
  932|     10|      return XML_ROLE_CONTENT_EMPTY;
  933|     10|    }
  934|     24|    if (XmlNameMatchesAscii(enc, ptr, end, KW_ANY)) {
  ------------------
  |  |  255|     24|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 21, False: 3]
  |  |  ------------------
  ------------------
  935|     21|      state->handler = declClose;
  936|     21|      state->role_none = XML_ROLE_ELEMENT_NONE;
  937|     21|      return XML_ROLE_CONTENT_ANY;
  938|     21|    }
  939|      3|    break;
  940|  4.34k|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  4.34k|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (940:3): [True: 4.34k, False: 4.42k]
  ------------------
  941|  4.34k|    state->handler = element2;
  942|  4.34k|    state->level = 1;
  943|  4.34k|    return XML_ROLE_GROUP_OPEN;
  944|  8.76k|  }
  945|      8|  return common(state, tok);
  946|  8.76k|}
xmlrole.c:element2:
  950|  4.64k|         const ENCODING *enc) {
  951|  4.64k|  switch (tok) {
  ------------------
  |  Branch (951:11): [True: 5, False: 4.63k]
  ------------------
  952|    309|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    309|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (952:3): [True: 309, False: 4.33k]
  ------------------
  953|    309|    return XML_ROLE_ELEMENT_NONE;
  954|  1.72k|  case XML_TOK_POUND_NAME:
  ------------------
  |  |   87|  1.72k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  |  Branch (954:3): [True: 1.72k, False: 2.91k]
  ------------------
  955|  1.72k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  1.72k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.71k, False: 7]
  |  |  ------------------
  ------------------
  956|  1.72k|                            KW_PCDATA)) {
  957|  1.71k|      state->handler = element3;
  958|  1.71k|      return XML_ROLE_CONTENT_PCDATA;
  959|  1.71k|    }
  960|      7|    break;
  961|    305|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|    305|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (961:3): [True: 305, False: 4.33k]
  ------------------
  962|    305|    state->level = 2;
  963|    305|    state->handler = element6;
  964|    305|    return XML_ROLE_GROUP_OPEN;
  965|  1.06k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.06k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (965:3): [True: 1.06k, False: 3.57k]
  ------------------
  966|  1.06k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  1.06k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (966:3): [True: 0, False: 4.64k]
  ------------------
  967|  1.06k|    state->handler = element7;
  968|  1.06k|    return XML_ROLE_CONTENT_ELEMENT;
  969|     50|  case XML_TOK_NAME_QUESTION:
  ------------------
  |  |   99|     50|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
  |  Branch (969:3): [True: 50, False: 4.59k]
  ------------------
  970|     50|    state->handler = element7;
  971|     50|    return XML_ROLE_CONTENT_ELEMENT_OPT;
  972|    502|  case XML_TOK_NAME_ASTERISK:
  ------------------
  |  |  100|    502|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
  |  Branch (972:3): [True: 502, False: 4.13k]
  ------------------
  973|    502|    state->handler = element7;
  974|    502|    return XML_ROLE_CONTENT_ELEMENT_REP;
  975|    680|  case XML_TOK_NAME_PLUS:
  ------------------
  |  |  101|    680|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
  |  Branch (975:3): [True: 680, False: 3.96k]
  ------------------
  976|    680|    state->handler = element7;
  977|    680|    return XML_ROLE_CONTENT_ELEMENT_PLUS;
  978|  4.64k|  }
  979|     12|  return common(state, tok);
  980|  4.64k|}
xmlrole.c:element3:
  984|  2.48k|         const ENCODING *enc) {
  985|  2.48k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.48k|#  define UNUSED_P(p) (void)p
  ------------------
  986|  2.48k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.48k|#  define UNUSED_P(p) (void)p
  ------------------
  987|  2.48k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.48k|#  define UNUSED_P(p) (void)p
  ------------------
  988|  2.48k|  switch (tok) {
  ------------------
  |  Branch (988:11): [True: 8, False: 2.48k]
  ------------------
  989|    777|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    777|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (989:3): [True: 777, False: 1.71k]
  ------------------
  990|    777|    return XML_ROLE_ELEMENT_NONE;
  991|  1.20k|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|  1.20k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (991:3): [True: 1.20k, False: 1.28k]
  ------------------
  992|  1.20k|    state->handler = declClose;
  993|  1.20k|    state->role_none = XML_ROLE_ELEMENT_NONE;
  994|  1.20k|    return XML_ROLE_GROUP_CLOSE;
  995|    323|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|    323|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (995:3): [True: 323, False: 2.16k]
  ------------------
  996|    323|    state->handler = declClose;
  997|    323|    state->role_none = XML_ROLE_ELEMENT_NONE;
  998|    323|    return XML_ROLE_GROUP_CLOSE_REP;
  999|    172|  case XML_TOK_OR:
  ------------------
  |  |   88|    172|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (999:3): [True: 172, False: 2.31k]
  ------------------
 1000|    172|    state->handler = element4;
 1001|    172|    return XML_ROLE_ELEMENT_NONE;
 1002|  2.48k|  }
 1003|      8|  return common(state, tok);
 1004|  2.48k|}
xmlrole.c:element4:
 1008|  1.02k|         const ENCODING *enc) {
 1009|  1.02k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.02k|#  define UNUSED_P(p) (void)p
  ------------------
 1010|  1.02k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.02k|#  define UNUSED_P(p) (void)p
  ------------------
 1011|  1.02k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.02k|#  define UNUSED_P(p) (void)p
  ------------------
 1012|  1.02k|  switch (tok) {
  ------------------
  |  Branch (1012:11): [True: 11, False: 1.01k]
  ------------------
 1013|    267|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    267|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1013:3): [True: 267, False: 754]
  ------------------
 1014|    267|    return XML_ROLE_ELEMENT_NONE;
 1015|    743|  case XML_TOK_NAME:
  ------------------
  |  |   85|    743|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1015:3): [True: 743, False: 278]
  ------------------
 1016|    743|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|    743|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1016:3): [True: 0, False: 1.02k]
  ------------------
 1017|    743|    state->handler = element5;
 1018|    743|    return XML_ROLE_CONTENT_ELEMENT;
 1019|  1.02k|  }
 1020|     11|  return common(state, tok);
 1021|  1.02k|}
xmlrole.c:element5:
 1025|  1.02k|         const ENCODING *enc) {
 1026|  1.02k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.02k|#  define UNUSED_P(p) (void)p
  ------------------
 1027|  1.02k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.02k|#  define UNUSED_P(p) (void)p
  ------------------
 1028|  1.02k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.02k|#  define UNUSED_P(p) (void)p
  ------------------
 1029|  1.02k|  switch (tok) {
  ------------------
  |  Branch (1029:11): [True: 5, False: 1.02k]
  ------------------
 1030|    292|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    292|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1030:3): [True: 292, False: 737]
  ------------------
 1031|    292|    return XML_ROLE_ELEMENT_NONE;
 1032|    128|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|    128|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (1032:3): [True: 128, False: 901]
  ------------------
 1033|    128|    state->handler = declClose;
 1034|    128|    state->role_none = XML_ROLE_ELEMENT_NONE;
 1035|    128|    return XML_ROLE_GROUP_CLOSE_REP;
 1036|    604|  case XML_TOK_OR:
  ------------------
  |  |   88|    604|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (1036:3): [True: 604, False: 425]
  ------------------
 1037|    604|    state->handler = element4;
 1038|    604|    return XML_ROLE_ELEMENT_NONE;
 1039|  1.02k|  }
 1040|      5|  return common(state, tok);
 1041|  1.02k|}
xmlrole.c:element6:
 1045|  3.25M|         const ENCODING *enc) {
 1046|  3.25M|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.25M|#  define UNUSED_P(p) (void)p
  ------------------
 1047|  3.25M|  UNUSED_P(end);
  ------------------
  |  |  135|  3.25M|#  define UNUSED_P(p) (void)p
  ------------------
 1048|  3.25M|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.25M|#  define UNUSED_P(p) (void)p
  ------------------
 1049|  3.25M|  switch (tok) {
  ------------------
  |  Branch (1049:11): [True: 48, False: 3.25M]
  ------------------
 1050|  41.4k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  41.4k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1050:3): [True: 41.4k, False: 3.21M]
  ------------------
 1051|  41.4k|    return XML_ROLE_ELEMENT_NONE;
 1052|  3.15M|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  3.15M|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (1052:3): [True: 3.15M, False: 105k]
  ------------------
 1053|  3.15M|    state->level += 1;
 1054|  3.15M|    return XML_ROLE_GROUP_OPEN;
 1055|  51.3k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  51.3k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1055:3): [True: 51.3k, False: 3.20M]
  ------------------
 1056|  51.3k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  51.3k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1056:3): [True: 0, False: 3.25M]
  ------------------
 1057|  51.3k|    state->handler = element7;
 1058|  51.3k|    return XML_ROLE_CONTENT_ELEMENT;
 1059|  10.4k|  case XML_TOK_NAME_QUESTION:
  ------------------
  |  |   99|  10.4k|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
  |  Branch (1059:3): [True: 10.4k, False: 3.24M]
  ------------------
 1060|  10.4k|    state->handler = element7;
 1061|  10.4k|    return XML_ROLE_CONTENT_ELEMENT_OPT;
 1062|    664|  case XML_TOK_NAME_ASTERISK:
  ------------------
  |  |  100|    664|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
  |  Branch (1062:3): [True: 664, False: 3.25M]
  ------------------
 1063|    664|    state->handler = element7;
 1064|    664|    return XML_ROLE_CONTENT_ELEMENT_REP;
 1065|  1.43k|  case XML_TOK_NAME_PLUS:
  ------------------
  |  |  101|  1.43k|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
  |  Branch (1065:3): [True: 1.43k, False: 3.25M]
  ------------------
 1066|  1.43k|    state->handler = element7;
 1067|  1.43k|    return XML_ROLE_CONTENT_ELEMENT_PLUS;
 1068|  3.25M|  }
 1069|     48|  return common(state, tok);
 1070|  3.25M|}
xmlrole.c:element7:
 1074|   129k|         const ENCODING *enc) {
 1075|   129k|  UNUSED_P(ptr);
  ------------------
  |  |  135|   129k|#  define UNUSED_P(p) (void)p
  ------------------
 1076|   129k|  UNUSED_P(end);
  ------------------
  |  |  135|   129k|#  define UNUSED_P(p) (void)p
  ------------------
 1077|   129k|  UNUSED_P(enc);
  ------------------
  |  |  135|   129k|#  define UNUSED_P(p) (void)p
  ------------------
 1078|   129k|  switch (tok) {
  ------------------
  |  Branch (1078:11): [True: 61, False: 129k]
  ------------------
 1079|  27.7k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  27.7k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1079:3): [True: 27.7k, False: 101k]
  ------------------
 1080|  27.7k|    return XML_ROLE_ELEMENT_NONE;
 1081|  23.0k|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|  23.0k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (1081:3): [True: 23.0k, False: 106k]
  ------------------
 1082|  23.0k|    state->level -= 1;
 1083|  23.0k|    if (state->level == 0) {
  ------------------
  |  Branch (1083:9): [True: 1.15k, False: 21.9k]
  ------------------
 1084|  1.15k|      state->handler = declClose;
 1085|  1.15k|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1086|  1.15k|    }
 1087|  23.0k|    return XML_ROLE_GROUP_CLOSE;
 1088|  2.39k|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|  2.39k|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (1088:3): [True: 2.39k, False: 126k]
  ------------------
 1089|  2.39k|    state->level -= 1;
 1090|  2.39k|    if (state->level == 0) {
  ------------------
  |  Branch (1090:9): [True: 317, False: 2.07k]
  ------------------
 1091|    317|      state->handler = declClose;
 1092|    317|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1093|    317|    }
 1094|  2.39k|    return XML_ROLE_GROUP_CLOSE_REP;
 1095|  4.30k|  case XML_TOK_CLOSE_PAREN_QUESTION:
  ------------------
  |  |  104|  4.30k|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
  |  Branch (1095:3): [True: 4.30k, False: 124k]
  ------------------
 1096|  4.30k|    state->level -= 1;
 1097|  4.30k|    if (state->level == 0) {
  ------------------
  |  Branch (1097:9): [True: 573, False: 3.73k]
  ------------------
 1098|    573|      state->handler = declClose;
 1099|    573|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1100|    573|    }
 1101|  4.30k|    return XML_ROLE_GROUP_CLOSE_OPT;
 1102|  7.84k|  case XML_TOK_CLOSE_PAREN_PLUS:
  ------------------
  |  |  106|  7.84k|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
  |  Branch (1102:3): [True: 7.84k, False: 121k]
  ------------------
 1103|  7.84k|    state->level -= 1;
 1104|  7.84k|    if (state->level == 0) {
  ------------------
  |  Branch (1104:9): [True: 156, False: 7.68k]
  ------------------
 1105|    156|      state->handler = declClose;
 1106|    156|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1107|    156|    }
 1108|  7.84k|    return XML_ROLE_GROUP_CLOSE_PLUS;
 1109|  5.01k|  case XML_TOK_COMMA:
  ------------------
  |  |  107|  5.01k|#define XML_TOK_COMMA 38
  ------------------
  |  Branch (1109:3): [True: 5.01k, False: 124k]
  ------------------
 1110|  5.01k|    state->handler = element6;
 1111|  5.01k|    return XML_ROLE_GROUP_SEQUENCE;
 1112|  58.7k|  case XML_TOK_OR:
  ------------------
  |  |   88|  58.7k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (1112:3): [True: 58.7k, False: 70.4k]
  ------------------
 1113|  58.7k|    state->handler = element6;
 1114|  58.7k|    return XML_ROLE_GROUP_CHOICE;
 1115|   129k|  }
 1116|     61|  return common(state, tok);
 1117|   129k|}
xmlrole.c:notation0:
  616|  5.22k|          const ENCODING *enc) {
  617|  5.22k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  5.22k|#  define UNUSED_P(p) (void)p
  ------------------
  618|  5.22k|  UNUSED_P(end);
  ------------------
  |  |  135|  5.22k|#  define UNUSED_P(p) (void)p
  ------------------
  619|  5.22k|  UNUSED_P(enc);
  ------------------
  |  |  135|  5.22k|#  define UNUSED_P(p) (void)p
  ------------------
  620|  5.22k|  switch (tok) {
  ------------------
  |  Branch (620:11): [True: 4, False: 5.22k]
  ------------------
  621|  2.61k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  2.61k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (621:3): [True: 2.61k, False: 2.60k]
  ------------------
  622|  2.61k|    return XML_ROLE_NOTATION_NONE;
  623|  2.60k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  2.60k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (623:3): [True: 2.60k, False: 2.62k]
  ------------------
  624|  2.60k|    state->handler = notation1;
  625|  2.60k|    return XML_ROLE_NOTATION_NAME;
  626|  5.22k|  }
  627|      4|  return common(state, tok);
  628|  5.22k|}
xmlrole.c:notation1:
  632|  5.19k|          const ENCODING *enc) {
  633|  5.19k|  switch (tok) {
  ------------------
  |  Branch (633:11): [True: 4, False: 5.19k]
  ------------------
  634|  2.60k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  2.60k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (634:3): [True: 2.60k, False: 2.59k]
  ------------------
  635|  2.60k|    return XML_ROLE_NOTATION_NONE;
  636|  2.59k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  2.59k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (636:3): [True: 2.59k, False: 2.60k]
  ------------------
  637|  2.59k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  2.59k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 455, False: 2.13k]
  |  |  ------------------
  ------------------
  638|    455|      state->handler = notation3;
  639|    455|      return XML_ROLE_NOTATION_NONE;
  640|    455|    }
  641|  2.13k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|  2.13k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 2.12k, False: 8]
  |  |  ------------------
  ------------------
  642|  2.12k|      state->handler = notation2;
  643|  2.12k|      return XML_ROLE_NOTATION_NONE;
  644|  2.12k|    }
  645|      8|    break;
  646|  5.19k|  }
  647|     12|  return common(state, tok);
  648|  5.19k|}
xmlrole.c:notation3:
  668|    907|          const ENCODING *enc) {
  669|    907|  UNUSED_P(ptr);
  ------------------
  |  |  135|    907|#  define UNUSED_P(p) (void)p
  ------------------
  670|    907|  UNUSED_P(end);
  ------------------
  |  |  135|    907|#  define UNUSED_P(p) (void)p
  ------------------
  671|    907|  UNUSED_P(enc);
  ------------------
  |  |  135|    907|#  define UNUSED_P(p) (void)p
  ------------------
  672|    907|  switch (tok) {
  ------------------
  |  Branch (672:11): [True: 2, False: 905]
  ------------------
  673|    455|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    455|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (673:3): [True: 455, False: 452]
  ------------------
  674|    455|    return XML_ROLE_NOTATION_NONE;
  675|    450|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    450|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (675:3): [True: 450, False: 457]
  ------------------
  676|    450|    state->handler = declClose;
  677|    450|    state->role_none = XML_ROLE_NOTATION_NONE;
  678|    450|    return XML_ROLE_NOTATION_SYSTEM_ID;
  679|    907|  }
  680|      2|  return common(state, tok);
  681|    907|}
xmlrole.c:notation2:
  652|  4.24k|          const ENCODING *enc) {
  653|  4.24k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  4.24k|#  define UNUSED_P(p) (void)p
  ------------------
  654|  4.24k|  UNUSED_P(end);
  ------------------
  |  |  135|  4.24k|#  define UNUSED_P(p) (void)p
  ------------------
  655|  4.24k|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.24k|#  define UNUSED_P(p) (void)p
  ------------------
  656|  4.24k|  switch (tok) {
  ------------------
  |  Branch (656:11): [True: 4, False: 4.24k]
  ------------------
  657|  2.12k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  2.12k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (657:3): [True: 2.12k, False: 2.12k]
  ------------------
  658|  2.12k|    return XML_ROLE_NOTATION_NONE;
  659|  2.11k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  2.11k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (659:3): [True: 2.11k, False: 2.13k]
  ------------------
  660|  2.11k|    state->handler = notation4;
  661|  2.11k|    return XML_ROLE_NOTATION_PUBLIC_ID;
  662|  4.24k|  }
  663|      4|  return common(state, tok);
  664|  4.24k|}
xmlrole.c:notation4:
  685|  3.21k|          const ENCODING *enc) {
  686|  3.21k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.21k|#  define UNUSED_P(p) (void)p
  ------------------
  687|  3.21k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.21k|#  define UNUSED_P(p) (void)p
  ------------------
  688|  3.21k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.21k|#  define UNUSED_P(p) (void)p
  ------------------
  689|  3.21k|  switch (tok) {
  ------------------
  |  Branch (689:11): [True: 1, False: 3.21k]
  ------------------
  690|  1.11k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.11k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (690:3): [True: 1.11k, False: 2.09k]
  ------------------
  691|  1.11k|    return XML_ROLE_NOTATION_NONE;
  692|    716|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    716|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (692:3): [True: 716, False: 2.49k]
  ------------------
  693|    716|    state->handler = declClose;
  694|    716|    state->role_none = XML_ROLE_NOTATION_NONE;
  695|    716|    return XML_ROLE_NOTATION_SYSTEM_ID;
  696|  1.38k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  1.38k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (696:3): [True: 1.38k, False: 1.83k]
  ------------------
  697|  1.38k|    setTopLevel(state);
  ------------------
  |  |  116|  1.38k|    ((state)->handler                                                          \
  |  |  117|  1.38k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 1.38k, False: 0]
  |  |  ------------------
  ------------------
  698|  1.38k|    return XML_ROLE_NOTATION_NO_SYSTEM_ID;
  699|  3.21k|  }
  700|      1|  return common(state, tok);
  701|  3.21k|}
xmlrole.c:doctype5:
  319|  2.31k|         const ENCODING *enc) {
  320|  2.31k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.31k|#  define UNUSED_P(p) (void)p
  ------------------
  321|  2.31k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.31k|#  define UNUSED_P(p) (void)p
  ------------------
  322|  2.31k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.31k|#  define UNUSED_P(p) (void)p
  ------------------
  323|  2.31k|  switch (tok) {
  ------------------
  |  Branch (323:11): [True: 6, False: 2.31k]
  ------------------
  324|     35|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|     35|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (324:3): [True: 35, False: 2.28k]
  ------------------
  325|     35|    return XML_ROLE_DOCTYPE_NONE;
  326|  2.27k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  2.27k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (326:3): [True: 2.27k, False: 41]
  ------------------
  327|  2.27k|    state->handler = prolog2;
  328|  2.27k|    return XML_ROLE_DOCTYPE_CLOSE;
  329|  2.31k|  }
  330|      6|  return common(state, tok);
  331|  2.31k|}
xmlrole.c:prolog2:
  205|  3.13k|        const ENCODING *enc) {
  206|  3.13k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.13k|#  define UNUSED_P(p) (void)p
  ------------------
  207|  3.13k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.13k|#  define UNUSED_P(p) (void)p
  ------------------
  208|  3.13k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.13k|#  define UNUSED_P(p) (void)p
  ------------------
  209|  3.13k|  switch (tok) {
  ------------------
  |  Branch (209:11): [True: 17, False: 3.11k]
  ------------------
  210|    287|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    287|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (210:3): [True: 287, False: 2.84k]
  ------------------
  211|    287|    return XML_ROLE_NONE;
  212|    318|  case XML_TOK_PI:
  ------------------
  |  |   76|    318|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (212:3): [True: 318, False: 2.81k]
  ------------------
  213|    318|    return XML_ROLE_PI;
  214|    224|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    224|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (214:3): [True: 224, False: 2.91k]
  ------------------
  215|    224|    return XML_ROLE_COMMENT;
  216|  2.29k|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|  2.29k|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (216:3): [True: 2.29k, False: 846]
  ------------------
  217|  2.29k|    state->handler = error;
  218|  2.29k|    return XML_ROLE_INSTANCE_START;
  219|  3.13k|  }
  220|     17|  return common(state, tok);
  221|  3.13k|}
xmlrole.c:doctype3:
  284|    846|         const ENCODING *enc) {
  285|    846|  UNUSED_P(ptr);
  ------------------
  |  |  135|    846|#  define UNUSED_P(p) (void)p
  ------------------
  286|    846|  UNUSED_P(end);
  ------------------
  |  |  135|    846|#  define UNUSED_P(p) (void)p
  ------------------
  287|    846|  UNUSED_P(enc);
  ------------------
  |  |  135|    846|#  define UNUSED_P(p) (void)p
  ------------------
  288|    846|  switch (tok) {
  ------------------
  |  Branch (288:11): [True: 155, False: 691]
  ------------------
  289|    477|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    477|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (289:3): [True: 477, False: 369]
  ------------------
  290|    477|    return XML_ROLE_DOCTYPE_NONE;
  291|    214|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    214|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (291:3): [True: 214, False: 632]
  ------------------
  292|    214|    state->handler = doctype4;
  293|    214|    return XML_ROLE_DOCTYPE_SYSTEM_ID;
  294|    846|  }
  295|    155|  return common(state, tok);
  296|    846|}
xmlrole.c:doctype4:
  300|    225|         const ENCODING *enc) {
  301|    225|  UNUSED_P(ptr);
  ------------------
  |  |  135|    225|#  define UNUSED_P(p) (void)p
  ------------------
  302|    225|  UNUSED_P(end);
  ------------------
  |  |  135|    225|#  define UNUSED_P(p) (void)p
  ------------------
  303|    225|  UNUSED_P(enc);
  ------------------
  |  |  135|    225|#  define UNUSED_P(p) (void)p
  ------------------
  304|    225|  switch (tok) {
  ------------------
  |  Branch (304:11): [True: 10, False: 215]
  ------------------
  305|     26|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|     26|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (305:3): [True: 26, False: 199]
  ------------------
  306|     26|    return XML_ROLE_DOCTYPE_NONE;
  307|    163|  case XML_TOK_OPEN_BRACKET:
  ------------------
  |  |   92|    163|#define XML_TOK_OPEN_BRACKET 25
  ------------------
  |  Branch (307:3): [True: 163, False: 62]
  ------------------
  308|    163|    state->handler = internalSubset;
  309|    163|    return XML_ROLE_DOCTYPE_INTERNAL_SUBSET;
  310|     26|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|     26|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (310:3): [True: 26, False: 199]
  ------------------
  311|     26|    state->handler = prolog2;
  312|     26|    return XML_ROLE_DOCTYPE_CLOSE;
  313|    225|  }
  314|     10|  return common(state, tok);
  315|    225|}
xmlrole.c:doctype2:
  268|  1.76k|         const ENCODING *enc) {
  269|  1.76k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.76k|#  define UNUSED_P(p) (void)p
  ------------------
  270|  1.76k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.76k|#  define UNUSED_P(p) (void)p
  ------------------
  271|  1.76k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.76k|#  define UNUSED_P(p) (void)p
  ------------------
  272|  1.76k|  switch (tok) {
  ------------------
  |  Branch (272:11): [True: 9, False: 1.75k]
  ------------------
  273|    884|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    884|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (273:3): [True: 884, False: 878]
  ------------------
  274|    884|    return XML_ROLE_DOCTYPE_NONE;
  275|    869|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    869|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (275:3): [True: 869, False: 893]
  ------------------
  276|    869|    state->handler = doctype3;
  277|    869|    return XML_ROLE_DOCTYPE_PUBLIC_ID;
  278|  1.76k|  }
  279|      9|  return common(state, tok);
  280|  1.76k|}
xmlrole.c:common:
 1225|  1.38k|common(PROLOG_STATE *state, int tok) {
 1226|  1.38k|#ifdef XML_DTD
 1227|  1.38k|  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.38k]
  |  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.38k|  state->handler = error;
 1233|  1.38k|  return XML_ROLE_ERROR;
 1234|  1.38k|}

_INTERNAL_trim_to_complete_utf8_characters:
  327|  15.8M|                                           const char **fromLimRef) {
  328|  15.8M|  const char *fromLim = *fromLimRef;
  329|  15.8M|  size_t walked = 0;
  330|  19.9M|  for (; fromLim > from; fromLim--, walked++) {
  ------------------
  |  Branch (330:10): [True: 19.9M, False: 4.45k]
  ------------------
  331|  19.9M|    const unsigned char prev = (unsigned char)fromLim[-1];
  332|  19.9M|    if ((prev & 0xf8u)
  ------------------
  |  Branch (332:9): [True: 8.61k, False: 19.8M]
  ------------------
  333|  19.9M|        == 0xf0u) { /* 4-byte character, lead by 0b11110xxx byte */
  334|  8.61k|      if (walked + 1 >= 4) {
  ------------------
  |  Branch (334:11): [True: 8.41k, False: 200]
  ------------------
  335|  8.41k|        fromLim += 4 - 1;
  336|  8.41k|        break;
  337|  8.41k|      } else {
  338|    200|        walked = 0;
  339|    200|      }
  340|  19.8M|    } else if ((prev & 0xf0u)
  ------------------
  |  Branch (340:16): [True: 7.64k, False: 19.8M]
  ------------------
  341|  19.8M|               == 0xe0u) { /* 3-byte character, lead by 0b1110xxxx byte */
  342|  7.64k|      if (walked + 1 >= 3) {
  ------------------
  |  Branch (342:11): [True: 7.18k, False: 458]
  ------------------
  343|  7.18k|        fromLim += 3 - 1;
  344|  7.18k|        break;
  345|  7.18k|      } else {
  346|    458|        walked = 0;
  347|    458|      }
  348|  19.8M|    } else if ((prev & 0xe0u)
  ------------------
  |  Branch (348:16): [True: 4.00M, False: 15.8M]
  ------------------
  349|  19.8M|               == 0xc0u) { /* 2-byte character, lead by 0b110xxxxx byte */
  350|  4.00M|      if (walked + 1 >= 2) {
  ------------------
  |  Branch (350:11): [True: 3.99M, False: 5.21k]
  ------------------
  351|  3.99M|        fromLim += 2 - 1;
  352|  3.99M|        break;
  353|  3.99M|      } else {
  354|  5.21k|        walked = 0;
  355|  5.21k|      }
  356|  15.8M|    } else if ((prev & 0x80u)
  ------------------
  |  Branch (356:16): [True: 11.8M, False: 4.04M]
  ------------------
  357|  15.8M|               == 0x00u) { /* 1-byte character, matching 0b0xxxxxxx */
  358|  11.8M|      break;
  359|  11.8M|    }
  360|  19.9M|  }
  361|  15.8M|  *fromLimRef = fromLim;
  362|  15.8M|}
XmlUtf8Encode:
 1255|  60.0k|XmlUtf8Encode(int c, char *buf) {
 1256|  60.0k|  enum {
 1257|       |    /* minN is minimum legal resulting value for N byte sequence */
 1258|  60.0k|    min2 = 0x80,
 1259|  60.0k|    min3 = 0x800,
 1260|  60.0k|    min4 = 0x10000
 1261|  60.0k|  };
 1262|       |
 1263|  60.0k|  if (c < 0)
  ------------------
  |  Branch (1263:7): [True: 0, False: 60.0k]
  ------------------
 1264|      0|    return 0; /* LCOV_EXCL_LINE: this case is always eliminated beforehand */
 1265|  60.0k|  if (c < min2) {
  ------------------
  |  Branch (1265:7): [True: 17.3k, False: 42.7k]
  ------------------
 1266|  17.3k|    buf[0] = (char)(c | UTF8_cval1);
 1267|  17.3k|    return 1;
 1268|  17.3k|  }
 1269|  42.7k|  if (c < min3) {
  ------------------
  |  Branch (1269:7): [True: 8.28k, False: 34.4k]
  ------------------
 1270|  8.28k|    buf[0] = (char)((c >> 6) | UTF8_cval2);
 1271|  8.28k|    buf[1] = (char)((c & 0x3f) | 0x80);
 1272|  8.28k|    return 2;
 1273|  8.28k|  }
 1274|  34.4k|  if (c < min4) {
  ------------------
  |  Branch (1274:7): [True: 29.7k, False: 4.65k]
  ------------------
 1275|  29.7k|    buf[0] = (char)((c >> 12) | UTF8_cval3);
 1276|  29.7k|    buf[1] = (char)(((c >> 6) & 0x3f) | 0x80);
 1277|  29.7k|    buf[2] = (char)((c & 0x3f) | 0x80);
 1278|  29.7k|    return 3;
 1279|  29.7k|  }
 1280|  4.65k|  if (c < 0x110000) {
  ------------------
  |  Branch (1280:7): [True: 4.65k, False: 0]
  ------------------
 1281|  4.65k|    buf[0] = (char)((c >> 18) | UTF8_cval4);
 1282|  4.65k|    buf[1] = (char)(((c >> 12) & 0x3f) | 0x80);
 1283|  4.65k|    buf[2] = (char)(((c >> 6) & 0x3f) | 0x80);
 1284|  4.65k|    buf[3] = (char)((c & 0x3f) | 0x80);
 1285|  4.65k|    return 4;
 1286|  4.65k|  }
 1287|      0|  return 0; /* LCOV_EXCL_LINE: this case too is eliminated before calling */
 1288|  4.65k|}
xmltok.c:latin1_toUtf8:
  503|  1.32M|              char **toP, const char *toLim) {
  504|  1.32M|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.32M|#  define UNUSED_P(p) (void)p
  ------------------
  505|  90.4M|  for (;;) {
  506|  90.4M|    unsigned char c;
  507|  90.4M|    if (*fromP == fromLim)
  ------------------
  |  Branch (507:9): [True: 1.31M, False: 89.1M]
  ------------------
  508|  1.31M|      return XML_CONVERT_COMPLETED;
  509|  89.1M|    c = (unsigned char)**fromP;
  510|  89.1M|    if (c & 0x80) {
  ------------------
  |  Branch (510:9): [True: 74.5M, False: 14.6M]
  ------------------
  511|  74.5M|      if (toLim - *toP < 2)
  ------------------
  |  Branch (511:11): [True: 5.12k, False: 74.5M]
  ------------------
  512|  5.12k|        return XML_CONVERT_OUTPUT_EXHAUSTED;
  513|  74.5M|      *(*toP)++ = (char)((c >> 6) | UTF8_cval2);
  514|  74.5M|      *(*toP)++ = (char)((c & 0x3f) | 0x80);
  515|  74.5M|      (*fromP)++;
  516|  74.5M|    } else {
  517|  14.6M|      if (*toP == toLim)
  ------------------
  |  Branch (517:11): [True: 6.27k, False: 14.6M]
  ------------------
  518|  6.27k|        return XML_CONVERT_OUTPUT_EXHAUSTED;
  519|  14.6M|      *(*toP)++ = *(*fromP)++;
  520|  14.6M|    }
  521|  89.1M|  }
  522|  1.32M|}
xmltok.c:checkCharRefNumber:
 1231|  68.7k|checkCharRefNumber(int result) {
 1232|  68.7k|  switch (result >> 8) {
  ------------------
  |  Branch (1232:11): [True: 45.9k, False: 22.7k]
  ------------------
 1233|      4|  case 0xD8:
  ------------------
  |  Branch (1233:3): [True: 4, False: 68.7k]
  ------------------
 1234|      7|  case 0xD9:
  ------------------
  |  Branch (1234:3): [True: 3, False: 68.7k]
  ------------------
 1235|     10|  case 0xDA:
  ------------------
  |  Branch (1235:3): [True: 3, False: 68.7k]
  ------------------
 1236|     13|  case 0xDB:
  ------------------
  |  Branch (1236:3): [True: 3, False: 68.7k]
  ------------------
 1237|     16|  case 0xDC:
  ------------------
  |  Branch (1237:3): [True: 3, False: 68.7k]
  ------------------
 1238|     24|  case 0xDD:
  ------------------
  |  Branch (1238:3): [True: 8, False: 68.7k]
  ------------------
 1239|     27|  case 0xDE:
  ------------------
  |  Branch (1239:3): [True: 3, False: 68.7k]
  ------------------
 1240|     30|  case 0xDF:
  ------------------
  |  Branch (1240:3): [True: 3, False: 68.7k]
  ------------------
 1241|     30|    return -1;
 1242|  21.5k|  case 0:
  ------------------
  |  Branch (1242:3): [True: 21.5k, False: 47.2k]
  ------------------
 1243|  21.5k|    if (latin1_encoding.type[result] == BT_NONXML)
  ------------------
  |  Branch (1243:9): [True: 110, False: 21.3k]
  ------------------
 1244|    110|      return -1;
 1245|  21.3k|    break;
 1246|  21.3k|  case 0xFF:
  ------------------
  |  Branch (1246:3): [True: 1.25k, False: 67.4k]
  ------------------
 1247|  1.25k|    if (result == 0xFFFE || result == 0xFFFF)
  ------------------
  |  Branch (1247:9): [True: 4, False: 1.25k]
  |  Branch (1247:29): [True: 7, False: 1.24k]
  ------------------
 1248|     11|      return -1;
 1249|  1.24k|    break;
 1250|  68.7k|  }
 1251|  68.5k|  return result;
 1252|  68.7k|}
xmltok.c:utf8_toUtf8:
  366|  15.8M|            char **toP, const char *toLim) {
  367|  15.8M|  bool input_incomplete = false;
  368|  15.8M|  bool output_exhausted = false;
  369|       |
  370|       |  /* Avoid copying partial characters (due to limited space). */
  371|  15.8M|  const ptrdiff_t bytesAvailable = fromLim - *fromP;
  372|  15.8M|  const ptrdiff_t bytesStorable = toLim - *toP;
  373|  15.8M|  UNUSED_P(enc);
  ------------------
  |  |  135|  15.8M|#  define UNUSED_P(p) (void)p
  ------------------
  374|  15.8M|  if (bytesAvailable > bytesStorable) {
  ------------------
  |  Branch (374:7): [True: 12.7k, False: 15.8M]
  ------------------
  375|  12.7k|    fromLim = *fromP + bytesStorable;
  376|  12.7k|    output_exhausted = true;
  377|  12.7k|  }
  378|       |
  379|       |  /* Avoid copying partial characters (from incomplete input). */
  380|  15.8M|  {
  381|  15.8M|    const char *const fromLimBefore = fromLim;
  382|  15.8M|    _INTERNAL_trim_to_complete_utf8_characters(*fromP, &fromLim);
  383|  15.8M|    if (fromLim < fromLimBefore) {
  ------------------
  |  Branch (383:9): [True: 5.87k, False: 15.8M]
  ------------------
  384|  5.87k|      input_incomplete = true;
  385|  5.87k|    }
  386|  15.8M|  }
  387|       |
  388|  15.8M|  {
  389|  15.8M|    const ptrdiff_t bytesToCopy = fromLim - *fromP;
  390|  15.8M|    memcpy(*toP, *fromP, bytesToCopy);
  391|  15.8M|    *fromP += bytesToCopy;
  392|  15.8M|    *toP += bytesToCopy;
  393|  15.8M|  }
  394|       |
  395|  15.8M|  if (output_exhausted) /* needs to go first */
  ------------------
  |  Branch (395:7): [True: 12.7k, False: 15.8M]
  ------------------
  396|  12.7k|    return XML_CONVERT_OUTPUT_EXHAUSTED;
  397|  15.8M|  else if (input_incomplete)
  ------------------
  |  Branch (397:12): [True: 0, False: 15.8M]
  ------------------
  398|      0|    return XML_CONVERT_INPUT_INCOMPLETE;
  399|  15.8M|  else
  400|  15.8M|    return XML_CONVERT_COMPLETED;
  401|  15.8M|}
xmltok.c:utf8_isName2:
  140|  3.03M|utf8_isName2(const ENCODING *enc, const char *p) {
  141|  3.03M|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.03M|#  define UNUSED_P(p) (void)p
  ------------------
  142|  3.03M|  return UTF8_GET_NAMING2(namePages, (const unsigned char *)p);
  ------------------
  |  |   86|  3.03M|  (namingBitmap[((pages)[(((byte)[0]) >> 2) & 7] << 3)                         \
  |  |   87|  3.03M|                + ((((byte)[0]) & 3) << 1) + ((((byte)[1]) >> 5) & 1)]         \
  |  |   88|  3.03M|   & (1u << (((byte)[1]) & 0x1F)))
  ------------------
  143|  3.03M|}
xmltok.c:utf8_isName3:
  146|  10.2k|utf8_isName3(const ENCODING *enc, const char *p) {
  147|  10.2k|  UNUSED_P(enc);
  ------------------
  |  |  135|  10.2k|#  define UNUSED_P(p) (void)p
  ------------------
  148|  10.2k|  return UTF8_GET_NAMING3(namePages, (const unsigned char *)p);
  ------------------
  |  |   96|  10.2k|  (namingBitmap                                                                \
  |  |   97|  10.2k|       [((pages)[((((byte)[0]) & 0xF) << 4) + ((((byte)[1]) >> 2) & 0xF)]      \
  |  |   98|  10.2k|         << 3)                                                                 \
  |  |   99|  10.2k|        + ((((byte)[1]) & 3) << 1) + ((((byte)[2]) >> 5) & 1)]                 \
  |  |  100|  10.2k|   & (1u << (((byte)[2]) & 0x1F)))
  ------------------
  149|  10.2k|}
xmltok.c:isNever:
  133|    108|isNever(const ENCODING *enc, const char *p) {
  134|    108|  UNUSED_P(enc);
  ------------------
  |  |  135|    108|#  define UNUSED_P(p) (void)p
  ------------------
  135|    108|  UNUSED_P(p);
  ------------------
  |  |  135|    108|#  define UNUSED_P(p) (void)p
  ------------------
  136|    108|  return 0;
  137|    108|}
xmltok.c:utf8_isNmstrt2:
  154|   300k|utf8_isNmstrt2(const ENCODING *enc, const char *p) {
  155|   300k|  UNUSED_P(enc);
  ------------------
  |  |  135|   300k|#  define UNUSED_P(p) (void)p
  ------------------
  156|   300k|  return UTF8_GET_NAMING2(nmstrtPages, (const unsigned char *)p);
  ------------------
  |  |   86|   300k|  (namingBitmap[((pages)[(((byte)[0]) >> 2) & 7] << 3)                         \
  |  |   87|   300k|                + ((((byte)[0]) & 3) << 1) + ((((byte)[1]) >> 5) & 1)]         \
  |  |   88|   300k|   & (1u << (((byte)[1]) & 0x1F)))
  ------------------
  157|   300k|}
xmltok.c:utf8_isNmstrt3:
  160|  18.0k|utf8_isNmstrt3(const ENCODING *enc, const char *p) {
  161|  18.0k|  UNUSED_P(enc);
  ------------------
  |  |  135|  18.0k|#  define UNUSED_P(p) (void)p
  ------------------
  162|  18.0k|  return UTF8_GET_NAMING3(nmstrtPages, (const unsigned char *)p);
  ------------------
  |  |   96|  18.0k|  (namingBitmap                                                                \
  |  |   97|  18.0k|       [((pages)[((((byte)[0]) & 0xF) << 4) + ((((byte)[1]) >> 2) & 0xF)]      \
  |  |   98|  18.0k|         << 3)                                                                 \
  |  |   99|  18.0k|        + ((((byte)[1]) & 3) << 1) + ((((byte)[2]) >> 5) & 1)]                 \
  |  |  100|  18.0k|   & (1u << (((byte)[2]) & 0x1F)))
  ------------------
  163|  18.0k|}
xmltok.c:utf8_isInvalid2:
  168|  47.6M|utf8_isInvalid2(const ENCODING *enc, const char *p) {
  169|  47.6M|  UNUSED_P(enc);
  ------------------
  |  |  135|  47.6M|#  define UNUSED_P(p) (void)p
  ------------------
  170|  47.6M|  return UTF8_INVALID2((const unsigned char *)p);
  ------------------
  |  |  113|  47.6M|  ((*p) < 0xC2 || ((p)[1] & 0x80) == 0 || ((p)[1] & 0xC0) == 0xC0)
  |  |  ------------------
  |  |  |  Branch (113:4): [True: 17, False: 47.6M]
  |  |  |  Branch (113:19): [True: 59, False: 47.6M]
  |  |  |  Branch (113:43): [True: 40, False: 47.6M]
  |  |  ------------------
  ------------------
  171|  47.6M|}
xmltok.c:utf8_isInvalid3:
  174|  4.09M|utf8_isInvalid3(const ENCODING *enc, const char *p) {
  175|  4.09M|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.09M|#  define UNUSED_P(p) (void)p
  ------------------
  176|  4.09M|  return UTF8_INVALID3((const unsigned char *)p);
  ------------------
  |  |  116|  4.09M|  (((p)[2] & 0x80) == 0                                                        \
  |  |  ------------------
  |  |  |  Branch (116:4): [True: 59, False: 4.09M]
  |  |  ------------------
  |  |  117|  4.09M|   || ((*p) == 0xEF && (p)[1] == 0xBF ? (p)[2] > 0xBD                          \
  |  |  ------------------
  |  |  |  Branch (117:7): [True: 47, False: 4.09M]
  |  |  |  Branch (117:8): [True: 35.2k, False: 4.06M]
  |  |  |  Branch (117:24): [True: 2.46k, False: 32.8k]
  |  |  ------------------
  |  |  118|  4.09M|                                      : ((p)[2] & 0xC0) == 0xC0)               \
  |  |  119|  4.09M|   || ((*p) == 0xE0                                                            \
  |  |  ------------------
  |  |  |  Branch (119:7): [True: 46, False: 4.09M]
  |  |  |  Branch (119:8): [True: 660k, False: 3.43M]
  |  |  ------------------
  |  |  120|  4.09M|           ? (p)[1] < 0xA0 || ((p)[1] & 0xC0) == 0xC0                          \
  |  |  ------------------
  |  |  |  Branch (120:14): [True: 13, False: 660k]
  |  |  |  Branch (120:31): [True: 6, False: 660k]
  |  |  ------------------
  |  |  121|  4.09M|           : ((p)[1] & 0x80) == 0                                              \
  |  |  ------------------
  |  |  |  Branch (121:14): [True: 15, False: 3.43M]
  |  |  ------------------
  |  |  122|  3.43M|                 || ((*p) == 0xED ? (p)[1] > 0x9F : ((p)[1] & 0xC0) == 0xC0)))
  |  |  ------------------
  |  |  |  Branch (122:21): [True: 12, False: 3.43M]
  |  |  |  Branch (122:22): [True: 42.9k, False: 3.39M]
  |  |  ------------------
  ------------------
  177|  4.09M|}
xmltok.c:utf8_isInvalid4:
  180|   172k|utf8_isInvalid4(const ENCODING *enc, const char *p) {
  181|   172k|  UNUSED_P(enc);
  ------------------
  |  |  135|   172k|#  define UNUSED_P(p) (void)p
  ------------------
  182|   172k|  return UTF8_INVALID4((const unsigned char *)p);
  ------------------
  |  |  125|   172k|  (((p)[3] & 0x80) == 0 || ((p)[3] & 0xC0) == 0xC0 || ((p)[2] & 0x80) == 0     \
  |  |  ------------------
  |  |  |  Branch (125:4): [True: 85, False: 171k]
  |  |  |  Branch (125:28): [True: 49, False: 171k]
  |  |  |  Branch (125:55): [True: 12, False: 171k]
  |  |  ------------------
  |  |  126|   172k|   || ((p)[2] & 0xC0) == 0xC0                                                  \
  |  |  ------------------
  |  |  |  Branch (126:7): [True: 5, False: 171k]
  |  |  ------------------
  |  |  127|   172k|   || ((*p) == 0xF0                                                            \
  |  |  ------------------
  |  |  |  Branch (127:7): [True: 41, False: 171k]
  |  |  |  Branch (127:8): [True: 2.91k, False: 168k]
  |  |  ------------------
  |  |  128|   171k|           ? (p)[1] < 0x90 || ((p)[1] & 0xC0) == 0xC0                          \
  |  |  ------------------
  |  |  |  Branch (128:14): [True: 11, False: 2.90k]
  |  |  |  Branch (128:31): [True: 9, False: 2.89k]
  |  |  ------------------
  |  |  129|   171k|           : ((p)[1] & 0x80) == 0                                              \
  |  |  ------------------
  |  |  |  Branch (129:14): [True: 3, False: 168k]
  |  |  ------------------
  |  |  130|   168k|                 || ((*p) == 0xF4 ? (p)[1] > 0x8F : ((p)[1] & 0xC0) == 0xC0)))
  |  |  ------------------
  |  |  |  Branch (130:21): [True: 18, False: 168k]
  |  |  |  Branch (130:22): [True: 27.8k, False: 141k]
  |  |  ------------------
  ------------------
  183|   172k|}
xmltok.c:unicode_byte_type:
  595|  45.3M|unicode_byte_type(char hi, char lo) {
  596|  45.3M|  switch ((unsigned char)hi) {
  ------------------
  |  Branch (596:11): [True: 41.4M, False: 3.83M]
  ------------------
  597|       |  /* 0xD800-0xDBFF first 16-bit code unit or high surrogate (W1) */
  598|   303k|  case 0xD8:
  ------------------
  |  Branch (598:3): [True: 303k, False: 45.0M]
  ------------------
  599|   559k|  case 0xD9:
  ------------------
  |  Branch (599:3): [True: 256k, False: 45.0M]
  ------------------
  600|  2.60M|  case 0xDA:
  ------------------
  |  Branch (600:3): [True: 2.04M, False: 43.2M]
  ------------------
  601|  3.63M|  case 0xDB:
  ------------------
  |  Branch (601:3): [True: 1.02M, False: 44.2M]
  ------------------
  602|  3.63M|    return BT_LEAD4;
  603|       |  /* 0xDC00-0xDFFF second 16-bit code unit or low surrogate (W2) */
  604|    100|  case 0xDC:
  ------------------
  |  Branch (604:3): [True: 100, False: 45.3M]
  ------------------
  605|    190|  case 0xDD:
  ------------------
  |  Branch (605:3): [True: 90, False: 45.3M]
  ------------------
  606|    278|  case 0xDE:
  ------------------
  |  Branch (606:3): [True: 88, False: 45.3M]
  ------------------
  607|    375|  case 0xDF:
  ------------------
  |  Branch (607:3): [True: 97, False: 45.3M]
  ------------------
  608|    375|    return BT_TRAIL;
  609|   203k|  case 0xFF:
  ------------------
  |  Branch (609:3): [True: 203k, False: 45.1M]
  ------------------
  610|   203k|    switch ((unsigned char)lo) {
  ------------------
  |  Branch (610:13): [True: 203k, False: 273]
  ------------------
  611|    268|    case 0xFF: /* noncharacter-FFFF */
  ------------------
  |  Branch (611:5): [True: 268, False: 203k]
  ------------------
  612|    273|    case 0xFE: /* noncharacter-FFFE */
  ------------------
  |  Branch (612:5): [True: 5, False: 203k]
  ------------------
  613|    273|      return BT_NONXML;
  614|   203k|    }
  615|   203k|    break;
  616|  45.3M|  }
  617|  41.6M|  return BT_NONASCII;
  618|  45.3M|}
xmltok.c:little2_toUtf8:
  623|  65.9k|      char **toP, const char *toLim) {                                         \
  624|  65.9k|    const char *from = *fromP;                                                 \
  625|  65.9k|    UNUSED_P(enc);                                                             \
  ------------------
  |  |  135|  65.9k|#  define UNUSED_P(p) (void)p
  ------------------
  626|  65.9k|    fromLim = from + (((fromLim - from) >> 1) << 1); /* shrink to even */      \
  627|  2.64M|    for (; from < fromLim; from += 2) {                                        \
  ------------------
  |  Branch (627:12): [True: 2.58M, False: 63.9k]
  ------------------
  628|  2.58M|      int plane;                                                               \
  629|  2.58M|      unsigned char lo2;                                                       \
  630|  2.58M|      unsigned char lo = GET_LO(from);                                         \
  ------------------
  |  |  718|  2.58M|#define GET_LO(ptr) ((unsigned char)(ptr)[0])
  ------------------
  631|  2.58M|      unsigned char hi = GET_HI(from);                                         \
  ------------------
  |  |  719|  2.58M|#define GET_HI(ptr) ((unsigned char)(ptr)[1])
  ------------------
  632|  2.58M|      switch (hi) {                                                            \
  633|   126k|      case 0:                                                                  \
  ------------------
  |  Branch (633:7): [True: 126k, False: 2.45M]
  ------------------
  634|   126k|        if (lo < 0x80) {                                                       \
  ------------------
  |  Branch (634:13): [True: 109k, False: 17.1k]
  ------------------
  635|   109k|          if (*toP == toLim) {                                                 \
  ------------------
  |  Branch (635:15): [True: 525, False: 109k]
  ------------------
  636|    525|            *fromP = from;                                                     \
  637|    525|            return XML_CONVERT_OUTPUT_EXHAUSTED;                               \
  638|    525|          }                                                                    \
  639|   109k|          *(*toP)++ = lo;                                                      \
  640|   109k|          break;                                                               \
  641|   109k|        }                                                                      \
  642|   126k|        /* fall through */                                                     \
  643|   126k|      case 0x1:                                                                \
  ------------------
  |  Branch (643:7): [True: 2.61k, False: 2.58M]
  ------------------
  644|  23.3k|      case 0x2:                                                                \
  ------------------
  |  Branch (644:7): [True: 3.62k, False: 2.58M]
  ------------------
  645|  25.7k|      case 0x3:                                                                \
  ------------------
  |  Branch (645:7): [True: 2.33k, False: 2.58M]
  ------------------
  646|  27.8k|      case 0x4:                                                                \
  ------------------
  |  Branch (646:7): [True: 2.12k, False: 2.58M]
  ------------------
  647|  29.6k|      case 0x5:                                                                \
  ------------------
  |  Branch (647:7): [True: 1.84k, False: 2.58M]
  ------------------
  648|  38.8k|      case 0x6:                                                                \
  ------------------
  |  Branch (648:7): [True: 9.14k, False: 2.57M]
  ------------------
  649|  47.0k|      case 0x7:                                                                \
  ------------------
  |  Branch (649:7): [True: 8.23k, False: 2.57M]
  ------------------
  650|  47.0k|        if (toLim - *toP < 2) {                                                \
  ------------------
  |  Branch (650:13): [True: 342, False: 46.7k]
  ------------------
  651|    342|          *fromP = from;                                                       \
  652|    342|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  653|    342|        }                                                                      \
  654|  47.0k|        *(*toP)++ = ((lo >> 6) | (hi << 2) | UTF8_cval2);                      \
  655|  46.7k|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  656|  46.7k|        break;                                                                 \
  657|  2.26M|      default:                                                                 \
  ------------------
  |  Branch (657:7): [True: 2.26M, False: 319k]
  ------------------
  658|  2.26M|        if (toLim - *toP < 3) {                                                \
  ------------------
  |  Branch (658:13): [True: 707, False: 2.26M]
  ------------------
  659|    707|          *fromP = from;                                                       \
  660|    707|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  661|    707|        }                                                                      \
  662|  2.26M|        /* 16 bits divided 4, 6, 6 amongst 3 bytes */                          \
  663|  2.26M|        *(*toP)++ = ((hi >> 4) | UTF8_cval3);                                  \
  664|  2.26M|        *(*toP)++ = (((hi & 0xf) << 2) | (lo >> 6) | 0x80);                    \
  665|  2.26M|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  666|  2.26M|        break;                                                                 \
  667|  2.26M|      case 0xD8:                                                               \
  ------------------
  |  Branch (667:7): [True: 5.90k, False: 2.57M]
  ------------------
  668|  18.1k|      case 0xD9:                                                               \
  ------------------
  |  Branch (668:7): [True: 12.2k, False: 2.57M]
  ------------------
  669|   102k|      case 0xDA:                                                               \
  ------------------
  |  Branch (669:7): [True: 84.2k, False: 2.50M]
  ------------------
  670|   162k|      case 0xDB:                                                               \
  ------------------
  |  Branch (670:7): [True: 60.0k, False: 2.52M]
  ------------------
  671|   162k|        if (toLim - *toP < 4) {                                                \
  ------------------
  |  Branch (671:13): [True: 374, False: 162k]
  ------------------
  672|    374|          *fromP = from;                                                       \
  673|    374|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  674|    374|        }                                                                      \
  675|   162k|        if (fromLim - from < 4) {                                              \
  ------------------
  |  Branch (675:13): [True: 0, False: 162k]
  ------------------
  676|      0|          *fromP = from;                                                       \
  677|      0|          return XML_CONVERT_INPUT_INCOMPLETE;                                 \
  678|      0|        }                                                                      \
  679|   162k|        plane = (((hi & 0x3) << 2) | ((lo >> 6) & 0x3)) + 1;                   \
  680|   162k|        *(*toP)++ = (char)((plane >> 2) | UTF8_cval4);                         \
  681|   162k|        *(*toP)++ = (((lo >> 2) & 0xF) | ((plane & 0x3) << 4) | 0x80);         \
  682|   162k|        from += 2;                                                             \
  683|   162k|        lo2 = GET_LO(from);                                                    \
  ------------------
  |  |  718|   162k|#define GET_LO(ptr) ((unsigned char)(ptr)[0])
  ------------------
  684|   162k|        *(*toP)++ = (((lo & 0x3) << 4) | ((GET_HI(from) & 0x3) << 2)           \
  ------------------
  |  |  719|   162k|#define GET_HI(ptr) ((unsigned char)(ptr)[1])
  ------------------
  685|   162k|                     | (lo2 >> 6) | 0x80);                                     \
  686|   162k|        *(*toP)++ = ((lo2 & 0x3f) | 0x80);                                     \
  687|   162k|        break;                                                                 \
  688|  2.58M|      }                                                                        \
  689|  2.58M|    }                                                                          \
  690|  65.9k|    *fromP = from;                                                             \
  691|  63.9k|    if (from < fromLim)                                                        \
  ------------------
  |  Branch (691:9): [True: 0, False: 63.9k]
  ------------------
  692|  63.9k|      return XML_CONVERT_INPUT_INCOMPLETE;                                     \
  693|  63.9k|    else                                                                       \
  694|  63.9k|      return XML_CONVERT_COMPLETED;                                            \
  695|  63.9k|  }
xmltok.c:getEncodingIndex:
 1502|  38.4k|getEncodingIndex(const char *name) {
 1503|  38.4k|  static const char *const encodingNames[] = {
 1504|  38.4k|      KW_ISO_8859_1, KW_US_ASCII, KW_UTF_8, KW_UTF_16, KW_UTF_16BE, KW_UTF_16LE,
 1505|  38.4k|  };
 1506|  38.4k|  int i;
 1507|  38.4k|  if (name == NULL)
  ------------------
  |  Branch (1507:7): [True: 19.2k, False: 19.2k]
  ------------------
 1508|  19.2k|    return NO_ENC;
 1509|  19.5k|  for (i = 0; i < (int)(sizeof(encodingNames) / sizeof(encodingNames[0])); i++)
  ------------------
  |  Branch (1509:15): [True: 19.4k, False: 40]
  ------------------
 1510|  19.4k|    if (streqci(name, encodingNames[i]))
  ------------------
  |  Branch (1510:9): [True: 19.2k, False: 254]
  ------------------
 1511|  19.2k|      return i;
 1512|     40|  return UNKNOWN_ENC;
 1513|  19.2k|}
xmltok.c:streqci:
 1005|  19.5k|streqci(const char *s1, const char *s2) {
 1006|   211k|  for (;;) {
 1007|   211k|    char c1 = *s1++;
 1008|   211k|    char c2 = *s2++;
 1009|   211k|    if (ASCII_a <= c1 && c1 <= ASCII_z)
  ------------------
  |  |   63|   211k|#define ASCII_a 0x61
  ------------------
                  if (ASCII_a <= c1 && c1 <= ASCII_z)
  ------------------
  |  |   88|    189|#define ASCII_z 0x7A
  ------------------
  |  Branch (1009:9): [True: 189, False: 211k]
  |  Branch (1009:26): [True: 189, False: 0]
  ------------------
 1010|    189|      c1 += ASCII_A - ASCII_a;
  ------------------
  |  |   36|    189|#define ASCII_A 0x41
  ------------------
                    c1 += ASCII_A - ASCII_a;
  ------------------
  |  |   63|    189|#define ASCII_a 0x61
  ------------------
 1011|   211k|    if (ASCII_a <= c2 && c2 <= ASCII_z)
  ------------------
  |  |   63|   211k|#define ASCII_a 0x61
  ------------------
                  if (ASCII_a <= c2 && c2 <= ASCII_z)
  ------------------
  |  |   88|      0|#define ASCII_z 0x7A
  ------------------
  |  Branch (1011:9): [True: 0, False: 211k]
  |  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|   211k|    if (c1 != c2)
  ------------------
  |  Branch (1017:9): [True: 301, False: 211k]
  ------------------
 1018|    301|      return 0;
 1019|   211k|    if (! c1)
  ------------------
  |  Branch (1019:9): [True: 19.2k, False: 192k]
  ------------------
 1020|  19.2k|      break;
 1021|   211k|  }
 1022|  19.2k|  return 1;
 1023|  19.5k|}
xmltok.c:initScan:
 1531|  19.2k|         int state, const char *ptr, const char *end, const char **nextTokPtr) {
 1532|  19.2k|  const ENCODING **encPtr;
 1533|       |
 1534|  19.2k|  if (ptr >= end)
  ------------------
  |  Branch (1534:7): [True: 0, False: 19.2k]
  ------------------
 1535|      0|    return XML_TOK_NONE;
  ------------------
  |  |   51|      0|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1536|  19.2k|  encPtr = enc->encPtr;
 1537|  19.2k|  if (ptr + 1 == end) {
  ------------------
  |  Branch (1537:7): [True: 37, False: 19.1k]
  ------------------
 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|     37|    switch (INIT_ENC_INDEX(enc)) {
  ------------------
  |  | 1519|     37|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  |  |  ------------------
  |  |  |  Branch (1519:29): [True: 37, False: 0]
  |  |  ------------------
  ------------------
 1547|      0|    case UTF_16_ENC:
  ------------------
  |  Branch (1547:5): [True: 0, False: 37]
  ------------------
 1548|      0|    case UTF_16LE_ENC:
  ------------------
  |  Branch (1548:5): [True: 0, False: 37]
  ------------------
 1549|      0|    case UTF_16BE_ENC:
  ------------------
  |  Branch (1549:5): [True: 0, False: 37]
  ------------------
 1550|      0|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1551|     37|    }
 1552|     37|    switch ((unsigned char)*ptr) {
  ------------------
  |  Branch (1552:13): [True: 32, False: 5]
  ------------------
 1553|      1|    case 0xFE:
  ------------------
  |  Branch (1553:5): [True: 1, False: 36]
  ------------------
 1554|      2|    case 0xFF:
  ------------------
  |  Branch (1554:5): [True: 1, False: 36]
  ------------------
 1555|      3|    case 0xEF: /* possibly first byte of UTF-8 BOM */
  ------------------
  |  Branch (1555:5): [True: 1, False: 36]
  ------------------
 1556|      3|      if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  | 1519|      3|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
                    if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  |  131|      3|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1556:11): [True: 3, False: 0]
  |  Branch (1556:52): [True: 0, False: 3]
  ------------------
 1557|      0|        break;
 1558|       |      /* fall through */
 1559|      4|    case 0x00:
  ------------------
  |  Branch (1559:5): [True: 1, False: 36]
  ------------------
 1560|      5|    case 0x3C:
  ------------------
  |  Branch (1560:5): [True: 1, False: 36]
  ------------------
 1561|      5|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1562|     37|    }
 1563|  19.1k|  } else {
 1564|  19.1k|    switch (((unsigned char)ptr[0] << 8) | (unsigned char)ptr[1]) {
 1565|      3|    case 0xFEFF:
  ------------------
  |  Branch (1565:5): [True: 3, False: 19.1k]
  ------------------
 1566|      3|      if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  | 1519|      3|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
                    if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  |  131|      3|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1566:11): [True: 3, False: 0]
  |  Branch (1566:52): [True: 0, False: 3]
  ------------------
 1567|      0|        break;
 1568|      3|      *nextTokPtr = ptr + 2;
 1569|      3|      *encPtr = encodingTable[UTF_16BE_ENC];
 1570|      3|      return XML_TOK_BOM;
  ------------------
  |  |   79|      3|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1571|       |    /* 00 3C is handled in the default case */
 1572|  4.65k|    case 0x3C00:
  ------------------
  |  Branch (1572:5): [True: 4.65k, False: 14.5k]
  ------------------
 1573|  4.65k|      if ((INIT_ENC_INDEX(enc) == UTF_16BE_ENC
  ------------------
  |  | 1519|  4.65k|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
  |  Branch (1573:12): [True: 0, False: 4.65k]
  ------------------
 1574|  4.65k|           || INIT_ENC_INDEX(enc) == UTF_16_ENC)
  ------------------
  |  | 1519|  4.65k|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
  |  Branch (1574:15): [True: 0, False: 4.65k]
  ------------------
 1575|  4.65k|          && state == XML_CONTENT_STATE)
  ------------------
  |  |  131|      0|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1575:14): [True: 0, False: 0]
  ------------------
 1576|      0|        break;
 1577|  4.65k|      *encPtr = encodingTable[UTF_16LE_ENC];
 1578|  4.65k|      return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|  4.65k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1579|      4|    case 0xFFFE:
  ------------------
  |  Branch (1579:5): [True: 4, False: 19.1k]
  ------------------
 1580|      4|      if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  | 1519|      4|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
                    if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  |  131|      4|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1580:11): [True: 4, False: 0]
  |  Branch (1580:52): [True: 0, False: 4]
  ------------------
 1581|      0|        break;
 1582|      4|      *nextTokPtr = ptr + 2;
 1583|      4|      *encPtr = encodingTable[UTF_16LE_ENC];
 1584|      4|      return XML_TOK_BOM;
  ------------------
  |  |   79|      4|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1585|  1.31k|    case 0xEFBB:
  ------------------
  |  Branch (1585:5): [True: 1.31k, False: 17.8k]
  ------------------
 1586|       |      /* Maybe a UTF-8 BOM (EF BB BF) */
 1587|       |      /* If there's an explicitly specified (external) encoding
 1588|       |         of ISO-8859-1 or some flavour of UTF-16
 1589|       |         and this is an external text entity,
 1590|       |         don't look for the BOM,
 1591|       |         because it might be a legal data.
 1592|       |      */
 1593|  1.31k|      if (state == XML_CONTENT_STATE) {
  ------------------
  |  |  131|  1.31k|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1593:11): [True: 0, False: 1.31k]
  ------------------
 1594|      0|        int e = INIT_ENC_INDEX(enc);
  ------------------
  |  | 1519|      0|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
 1595|      0|        if (e == ISO_8859_1_ENC || e == UTF_16BE_ENC || e == UTF_16LE_ENC
  ------------------
  |  Branch (1595:13): [True: 0, False: 0]
  |  Branch (1595:36): [True: 0, False: 0]
  |  Branch (1595:57): [True: 0, False: 0]
  ------------------
 1596|      0|            || e == UTF_16_ENC)
  ------------------
  |  Branch (1596:16): [True: 0, False: 0]
  ------------------
 1597|      0|          break;
 1598|      0|      }
 1599|  1.31k|      if (ptr + 2 == end)
  ------------------
  |  Branch (1599:11): [True: 1, False: 1.31k]
  ------------------
 1600|      1|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1601|  1.31k|      if ((unsigned char)ptr[2] == 0xBF) {
  ------------------
  |  Branch (1601:11): [True: 1.29k, False: 13]
  ------------------
 1602|  1.29k|        *nextTokPtr = ptr + 3;
 1603|  1.29k|        *encPtr = encodingTable[UTF_8_ENC];
 1604|  1.29k|        return XML_TOK_BOM;
  ------------------
  |  |   79|  1.29k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1605|  1.29k|      }
 1606|     13|      break;
 1607|  13.1k|    default:
  ------------------
  |  Branch (1607:5): [True: 13.1k, False: 5.97k]
  ------------------
 1608|  13.1k|      if (ptr[0] == '\0') {
  ------------------
  |  Branch (1608:11): [True: 5.64k, False: 7.54k]
  ------------------
 1609|       |        /* 0 isn't a legal data character. Furthermore a document
 1610|       |           entity can only start with ASCII characters.  So the only
 1611|       |           way this can fail to be big-endian UTF-16 if it it's an
 1612|       |           external parsed general entity that's labelled as
 1613|       |           UTF-16LE.
 1614|       |        */
 1615|  5.64k|        if (state == XML_CONTENT_STATE && INIT_ENC_INDEX(enc) == UTF_16LE_ENC)
  ------------------
  |  |  131|  11.2k|#define XML_CONTENT_STATE 1
  ------------------
                      if (state == XML_CONTENT_STATE && INIT_ENC_INDEX(enc) == UTF_16LE_ENC)
  ------------------
  |  | 1519|      0|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
  |  Branch (1615:13): [True: 0, False: 5.64k]
  |  Branch (1615:43): [True: 0, False: 0]
  ------------------
 1616|      0|          break;
 1617|  5.64k|        *encPtr = encodingTable[UTF_16BE_ENC];
 1618|  5.64k|        return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|  5.64k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1619|  7.54k|      } else if (ptr[1] == '\0') {
  ------------------
  |  Branch (1619:18): [True: 882, False: 6.65k]
  ------------------
 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|    882|        if (state == XML_CONTENT_STATE)
  ------------------
  |  |  131|    882|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1629:13): [True: 0, False: 882]
  ------------------
 1630|      0|          break;
 1631|    882|        *encPtr = encodingTable[UTF_16LE_ENC];
 1632|    882|        return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|    882|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1633|    882|      }
 1634|  6.65k|      break;
 1635|  19.1k|    }
 1636|  19.1k|  }
 1637|  6.70k|  *encPtr = encodingTable[INIT_ENC_INDEX(enc)];
  ------------------
  |  | 1519|  6.70k|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
 1638|  6.70k|  return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|  6.70k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1639|  19.2k|}
xmltok.c:big2_toUtf8:
  623|   110k|      char **toP, const char *toLim) {                                         \
  624|   110k|    const char *from = *fromP;                                                 \
  625|   110k|    UNUSED_P(enc);                                                             \
  ------------------
  |  |  135|   110k|#  define UNUSED_P(p) (void)p
  ------------------
  626|   110k|    fromLim = from + (((fromLim - from) >> 1) << 1); /* shrink to even */      \
  627|  10.2M|    for (; from < fromLim; from += 2) {                                        \
  ------------------
  |  Branch (627:12): [True: 10.1M, False: 107k]
  ------------------
  628|  10.1M|      int plane;                                                               \
  629|  10.1M|      unsigned char lo2;                                                       \
  630|  10.1M|      unsigned char lo = GET_LO(from);                                         \
  ------------------
  |  |  727|  10.1M|#define GET_LO(ptr) ((unsigned char)(ptr)[1])
  ------------------
  631|  10.1M|      unsigned char hi = GET_HI(from);                                         \
  ------------------
  |  |  728|  10.1M|#define GET_HI(ptr) ((unsigned char)(ptr)[0])
  ------------------
  632|  10.1M|      switch (hi) {                                                            \
  633|   473k|      case 0:                                                                  \
  ------------------
  |  Branch (633:7): [True: 473k, False: 9.67M]
  ------------------
  634|   473k|        if (lo < 0x80) {                                                       \
  ------------------
  |  Branch (634:13): [True: 387k, False: 85.6k]
  ------------------
  635|   387k|          if (*toP == toLim) {                                                 \
  ------------------
  |  Branch (635:15): [True: 368, False: 387k]
  ------------------
  636|    368|            *fromP = from;                                                     \
  637|    368|            return XML_CONVERT_OUTPUT_EXHAUSTED;                               \
  638|    368|          }                                                                    \
  639|   387k|          *(*toP)++ = lo;                                                      \
  640|   387k|          break;                                                               \
  641|   387k|        }                                                                      \
  642|   473k|        /* fall through */                                                     \
  643|   473k|      case 0x1:                                                                \
  ------------------
  |  Branch (643:7): [True: 5.02k, False: 10.1M]
  ------------------
  644|   100k|      case 0x2:                                                                \
  ------------------
  |  Branch (644:7): [True: 10.2k, False: 10.1M]
  ------------------
  645|   109k|      case 0x3:                                                                \
  ------------------
  |  Branch (645:7): [True: 8.31k, False: 10.1M]
  ------------------
  646|   139k|      case 0x4:                                                                \
  ------------------
  |  Branch (646:7): [True: 30.5k, False: 10.1M]
  ------------------
  647|   141k|      case 0x5:                                                                \
  ------------------
  |  Branch (647:7): [True: 1.88k, False: 10.1M]
  ------------------
  648|   147k|      case 0x6:                                                                \
  ------------------
  |  Branch (648:7): [True: 5.80k, False: 10.1M]
  ------------------
  649|   175k|      case 0x7:                                                                \
  ------------------
  |  Branch (649:7): [True: 28.3k, False: 10.1M]
  ------------------
  650|   175k|        if (toLim - *toP < 2) {                                                \
  ------------------
  |  Branch (650:13): [True: 339, False: 175k]
  ------------------
  651|    339|          *fromP = from;                                                       \
  652|    339|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  653|    339|        }                                                                      \
  654|   175k|        *(*toP)++ = ((lo >> 6) | (hi << 2) | UTF8_cval2);                      \
  655|   175k|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  656|   175k|        break;                                                                 \
  657|  8.73M|      default:                                                                 \
  ------------------
  |  Branch (657:7): [True: 8.73M, False: 1.41M]
  ------------------
  658|  8.73M|        if (toLim - *toP < 3) {                                                \
  ------------------
  |  Branch (658:13): [True: 1.78k, False: 8.72M]
  ------------------
  659|  1.78k|          *fromP = from;                                                       \
  660|  1.78k|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  661|  1.78k|        }                                                                      \
  662|  8.73M|        /* 16 bits divided 4, 6, 6 amongst 3 bytes */                          \
  663|  8.73M|        *(*toP)++ = ((hi >> 4) | UTF8_cval3);                                  \
  664|  8.72M|        *(*toP)++ = (((hi & 0xf) << 2) | (lo >> 6) | 0x80);                    \
  665|  8.72M|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  666|  8.72M|        break;                                                                 \
  667|  8.73M|      case 0xD8:                                                               \
  ------------------
  |  Branch (667:7): [True: 30.9k, False: 10.1M]
  ------------------
  668|  90.7k|      case 0xD9:                                                               \
  ------------------
  |  Branch (668:7): [True: 59.7k, False: 10.0M]
  ------------------
  669|   580k|      case 0xDA:                                                               \
  ------------------
  |  Branch (669:7): [True: 490k, False: 9.65M]
  ------------------
  670|   850k|      case 0xDB:                                                               \
  ------------------
  |  Branch (670:7): [True: 269k, False: 9.87M]
  ------------------
  671|   850k|        if (toLim - *toP < 4) {                                                \
  ------------------
  |  Branch (671:13): [True: 417, False: 849k]
  ------------------
  672|    417|          *fromP = from;                                                       \
  673|    417|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  674|    417|        }                                                                      \
  675|   850k|        if (fromLim - from < 4) {                                              \
  ------------------
  |  Branch (675:13): [True: 0, False: 849k]
  ------------------
  676|      0|          *fromP = from;                                                       \
  677|      0|          return XML_CONVERT_INPUT_INCOMPLETE;                                 \
  678|      0|        }                                                                      \
  679|   849k|        plane = (((hi & 0x3) << 2) | ((lo >> 6) & 0x3)) + 1;                   \
  680|   849k|        *(*toP)++ = (char)((plane >> 2) | UTF8_cval4);                         \
  681|   849k|        *(*toP)++ = (((lo >> 2) & 0xF) | ((plane & 0x3) << 4) | 0x80);         \
  682|   849k|        from += 2;                                                             \
  683|   849k|        lo2 = GET_LO(from);                                                    \
  ------------------
  |  |  727|   849k|#define GET_LO(ptr) ((unsigned char)(ptr)[1])
  ------------------
  684|   849k|        *(*toP)++ = (((lo & 0x3) << 4) | ((GET_HI(from) & 0x3) << 2)           \
  ------------------
  |  |  728|   849k|#define GET_HI(ptr) ((unsigned char)(ptr)[0])
  ------------------
  685|   849k|                     | (lo2 >> 6) | 0x80);                                     \
  686|   849k|        *(*toP)++ = ((lo2 & 0x3f) | 0x80);                                     \
  687|   849k|        break;                                                                 \
  688|  10.1M|      }                                                                        \
  689|  10.1M|    }                                                                          \
  690|   110k|    *fromP = from;                                                             \
  691|   107k|    if (from < fromLim)                                                        \
  ------------------
  |  Branch (691:9): [True: 0, False: 107k]
  ------------------
  692|   107k|      return XML_CONVERT_INPUT_INCOMPLETE;                                     \
  693|   107k|    else                                                                       \
  694|   107k|      return XML_CONVERT_COMPLETED;                                            \
  695|   107k|  }
xmltok.c:initUpdatePosition:
 1027|      6|                   POSITION *pos) {
 1028|      6|  UNUSED_P(enc);
  ------------------
  |  |  135|      6|#  define UNUSED_P(p) (void)p
  ------------------
 1029|      6|  normal_updatePosition(&utf8_encoding.enc, ptr, end, pos);
 1030|      6|}
xmltok.c:doParseXmlDecl:
 1155|    323|               const ENCODING **encoding, int *standalone) {
 1156|    323|  const char *val = NULL;
 1157|    323|  const char *name = NULL;
 1158|    323|  const char *nameEnd = NULL;
 1159|    323|  ptr += 5 * enc->minBytesPerChar;
 1160|    323|  end -= 2 * enc->minBytesPerChar;
 1161|    323|  if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)
  ------------------
  |  Branch (1161:7): [True: 176, False: 147]
  ------------------
 1162|    323|      || ! name) {
  ------------------
  |  Branch (1162:10): [True: 16, False: 131]
  ------------------
 1163|    192|    *badPtr = ptr;
 1164|    192|    return 0;
 1165|    192|  }
 1166|    131|  if (! XmlNameMatchesAscii(enc, name, nameEnd, KW_version)) {
  ------------------
  |  |  255|    131|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (1166:7): [True: 6, False: 125]
  ------------------
 1167|      6|    if (! isGeneralTextEntity) {
  ------------------
  |  Branch (1167:9): [True: 6, False: 0]
  ------------------
 1168|      6|      *badPtr = name;
 1169|      6|      return 0;
 1170|      6|    }
 1171|    125|  } else {
 1172|    125|    if (versionPtr)
  ------------------
  |  Branch (1172:9): [True: 125, False: 0]
  ------------------
 1173|    125|      *versionPtr = val;
 1174|    125|    if (versionEndPtr)
  ------------------
  |  Branch (1174:9): [True: 125, False: 0]
  ------------------
 1175|    125|      *versionEndPtr = ptr;
 1176|    125|    if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) {
  ------------------
  |  Branch (1176:9): [True: 20, False: 105]
  ------------------
 1177|     20|      *badPtr = ptr;
 1178|     20|      return 0;
 1179|     20|    }
 1180|    105|    if (! name) {
  ------------------
  |  Branch (1180:9): [True: 6, False: 99]
  ------------------
 1181|      6|      if (isGeneralTextEntity) {
  ------------------
  |  Branch (1181:11): [True: 0, False: 6]
  ------------------
 1182|       |        /* a TextDecl must have an EncodingDecl */
 1183|      0|        *badPtr = ptr;
 1184|      0|        return 0;
 1185|      0|      }
 1186|      6|      return 1;
 1187|      6|    }
 1188|    105|  }
 1189|     99|  if (XmlNameMatchesAscii(enc, name, nameEnd, KW_encoding)) {
  ------------------
  |  |  255|     99|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 53, False: 46]
  |  |  ------------------
  ------------------
 1190|     53|    int c = toAscii(enc, val, end);
 1191|     53|    if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   63|     53|#define ASCII_a 0x61
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   88|     18|#define ASCII_z 0x7A
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   36|     35|#define ASCII_A 0x41
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   61|     33|#define ASCII_Z 0x5A
  ------------------
  |  Branch (1191:12): [True: 18, False: 35]
  |  Branch (1191:28): [True: 18, False: 0]
  |  Branch (1191:48): [True: 33, False: 2]
  |  Branch (1191:64): [True: 32, False: 1]
  ------------------
 1192|      3|      *badPtr = val;
 1193|      3|      return 0;
 1194|      3|    }
 1195|     50|    if (encodingName)
  ------------------
  |  Branch (1195:9): [True: 50, False: 0]
  ------------------
 1196|     50|      *encodingName = val;
 1197|     50|    if (encoding)
  ------------------
  |  Branch (1197:9): [True: 50, False: 0]
  ------------------
 1198|     50|      *encoding = encodingFinder(enc, val, ptr - enc->minBytesPerChar);
 1199|     50|    if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) {
  ------------------
  |  Branch (1199:9): [True: 11, False: 39]
  ------------------
 1200|     11|      *badPtr = ptr;
 1201|     11|      return 0;
 1202|     11|    }
 1203|     39|    if (! name)
  ------------------
  |  Branch (1203:9): [True: 38, False: 1]
  ------------------
 1204|     38|      return 1;
 1205|     39|  }
 1206|     47|  if (! XmlNameMatchesAscii(enc, name, nameEnd, KW_standalone)
  ------------------
  |  |  255|     94|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (1206:7): [True: 4, False: 43]
  ------------------
 1207|     47|      || isGeneralTextEntity) {
  ------------------
  |  Branch (1207:10): [True: 0, False: 43]
  ------------------
 1208|      4|    *badPtr = name;
 1209|      4|    return 0;
 1210|      4|  }
 1211|     43|  if (XmlNameMatchesAscii(enc, val, ptr - enc->minBytesPerChar, KW_yes)) {
  ------------------
  |  |  255|     43|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 27, False: 16]
  |  |  ------------------
  ------------------
 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|     16|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 15, False: 1]
  |  |  ------------------
  ------------------
 1215|     15|    if (standalone)
  ------------------
  |  Branch (1215:9): [True: 15, False: 0]
  ------------------
 1216|     15|      *standalone = 0;
 1217|     15|  } else {
 1218|      1|    *badPtr = val;
 1219|      1|    return 0;
 1220|      1|  }
 1221|    238|  while (isSpace(toAscii(enc, ptr, end)))
  ------------------
  |  Branch (1221:10): [True: 196, False: 42]
  ------------------
 1222|    196|    ptr += enc->minBytesPerChar;
 1223|     42|  if (ptr != end) {
  ------------------
  |  Branch (1223:7): [True: 6, False: 36]
  ------------------
 1224|      6|    *badPtr = ptr;
 1225|      6|    return 0;
 1226|      6|  }
 1227|     36|  return 1;
 1228|     42|}
xmltok.c:parsePseudoAttribute:
 1061|    498|                     const char **valPtr, const char **nextTokPtr) {
 1062|    498|  int c;
 1063|    498|  char open;
 1064|    498|  if (ptr == end) {
  ------------------
  |  Branch (1064:7): [True: 43, False: 455]
  ------------------
 1065|     43|    *namePtr = NULL;
 1066|     43|    return 1;
 1067|     43|  }
 1068|    455|  if (! isSpace(toAscii(enc, ptr, end))) {
  ------------------
  |  Branch (1068:7): [True: 3, False: 452]
  ------------------
 1069|      3|    *nextTokPtr = ptr;
 1070|      3|    return 0;
 1071|      3|  }
 1072|    663|  do {
 1073|    663|    ptr += enc->minBytesPerChar;
 1074|    663|  } while (isSpace(toAscii(enc, ptr, end)));
  ------------------
  |  Branch (1074:12): [True: 211, False: 452]
  ------------------
 1075|    452|  if (ptr == end) {
  ------------------
  |  Branch (1075:7): [True: 17, False: 435]
  ------------------
 1076|     17|    *namePtr = NULL;
 1077|     17|    return 1;
 1078|     17|  }
 1079|    435|  *namePtr = ptr;
 1080|  2.96k|  for (;;) {
 1081|  2.96k|    c = toAscii(enc, ptr, end);
 1082|  2.96k|    if (c == -1) {
  ------------------
  |  Branch (1082:9): [True: 52, False: 2.91k]
  ------------------
 1083|     52|      *nextTokPtr = ptr;
 1084|     52|      return 0;
 1085|     52|    }
 1086|  2.91k|    if (c == ASCII_EQUALS) {
  ------------------
  |  |  112|  2.91k|#define ASCII_EQUALS 0x3D
  ------------------
  |  Branch (1086:9): [True: 332, False: 2.58k]
  ------------------
 1087|    332|      *nameEndPtr = ptr;
 1088|    332|      break;
 1089|    332|    }
 1090|  2.58k|    if (isSpace(c)) {
  ------------------
  |  Branch (1090:9): [True: 51, False: 2.53k]
  ------------------
 1091|     51|      *nameEndPtr = ptr;
 1092|    373|      do {
 1093|    373|        ptr += enc->minBytesPerChar;
 1094|    373|      } while (isSpace(c = toAscii(enc, ptr, end)));
  ------------------
  |  Branch (1094:16): [True: 322, False: 51]
  ------------------
 1095|     51|      if (c != ASCII_EQUALS) {
  ------------------
  |  |  112|     51|#define ASCII_EQUALS 0x3D
  ------------------
  |  Branch (1095:11): [True: 33, False: 18]
  ------------------
 1096|     33|        *nextTokPtr = ptr;
 1097|     33|        return 0;
 1098|     33|      }
 1099|     18|      break;
 1100|     51|    }
 1101|  2.53k|    ptr += enc->minBytesPerChar;
 1102|  2.53k|  }
 1103|    350|  if (ptr == *namePtr) {
  ------------------
  |  Branch (1103:7): [True: 8, False: 342]
  ------------------
 1104|      8|    *nextTokPtr = ptr;
 1105|      8|    return 0;
 1106|      8|  }
 1107|    342|  ptr += enc->minBytesPerChar;
 1108|    342|  c = toAscii(enc, ptr, end);
 1109|    557|  while (isSpace(c)) {
  ------------------
  |  Branch (1109:10): [True: 215, False: 342]
  ------------------
 1110|    215|    ptr += enc->minBytesPerChar;
 1111|    215|    c = toAscii(enc, ptr, end);
 1112|    215|  }
 1113|    342|  if (c != ASCII_QUOT && c != ASCII_APOS) {
  ------------------
  |  |  104|    684|#define ASCII_QUOT 0x22
  ------------------
                if (c != ASCII_QUOT && c != ASCII_APOS) {
  ------------------
  |  |  106|     98|#define ASCII_APOS 0x27
  ------------------
  |  Branch (1113:7): [True: 98, False: 244]
  |  Branch (1113:26): [True: 32, False: 66]
  ------------------
 1114|     32|    *nextTokPtr = ptr;
 1115|     32|    return 0;
 1116|     32|  }
 1117|    310|  open = (char)c;
 1118|    310|  ptr += enc->minBytesPerChar;
 1119|    310|  *valPtr = ptr;
 1120|  2.07k|  for (;; ptr += enc->minBytesPerChar) {
 1121|  2.07k|    c = toAscii(enc, ptr, end);
 1122|  2.07k|    if (c == open)
  ------------------
  |  Branch (1122:9): [True: 231, False: 1.84k]
  ------------------
 1123|    231|      break;
 1124|  1.84k|    if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   63|  1.84k|#define ASCII_a 0x61
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   88|    365|#define ASCII_z 0x7A
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   36|  1.48k|#define ASCII_A 0x41
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   61|    631|#define ASCII_Z 0x5A
  ------------------
  |  Branch (1124:12): [True: 365, False: 1.48k]
  |  Branch (1124:28): [True: 364, False: 1]
  |  Branch (1124:48): [True: 631, False: 851]
  |  Branch (1124:64): [True: 424, False: 207]
  ------------------
 1125|  1.84k|        && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |   90|  1.05k|#define ASCII_0 0x30
  ------------------
                      && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |   99|    522|#define ASCII_9 0x39
  ------------------
                      && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |  108|  2.59k|#define ASCII_PERIOD 0x2E
  ------------------
  |  Branch (1125:15): [True: 522, False: 536]
  |  Branch (1125:31): [True: 310, False: 212]
  |  Branch (1125:48): [True: 494, False: 254]
  ------------------
 1126|  1.84k|        && c != ASCII_MINUS && c != ASCII_UNDERSCORE) {
  ------------------
  |  |  107|  2.34k|#define ASCII_MINUS 0x2D
  ------------------
                      && c != ASCII_MINUS && c != ASCII_UNDERSCORE) {
  ------------------
  |  |  116|    281|#define ASCII_UNDERSCORE 0x5F
  ------------------
  |  Branch (1126:12): [True: 281, False: 213]
  |  Branch (1126:32): [True: 79, False: 202]
  ------------------
 1127|     79|      *nextTokPtr = ptr;
 1128|     79|      return 0;
 1129|     79|    }
 1130|  1.84k|  }
 1131|    231|  *nextTokPtr = ptr + enc->minBytesPerChar;
 1132|    231|  return 1;
 1133|    310|}
xmltok.c:toAscii:
 1033|  7.38k|toAscii(const ENCODING *enc, const char *ptr, const char *end) {
 1034|  7.38k|  char buf[1];
 1035|  7.38k|  char *p = buf;
 1036|  7.38k|  XmlUtf8Convert(enc, &ptr, end, &p, p + 1);
  ------------------
  |  |  276|  7.38k|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  ------------------
 1037|  7.38k|  if (p == buf)
  ------------------
  |  Branch (1037:7): [True: 227, False: 7.15k]
  ------------------
 1038|    227|    return -1;
 1039|  7.15k|  else
 1040|  7.15k|    return buf[0];
 1041|  7.38k|}
xmltok.c:isSpace:
 1044|  4.86k|isSpace(int c) {
 1045|  4.86k|  switch (c) {
  ------------------
  |  Branch (1045:11): [True: 3.42k, False: 1.44k]
  ------------------
 1046|    379|  case 0x20:
  ------------------
  |  Branch (1046:3): [True: 379, False: 4.49k]
  ------------------
 1047|    664|  case 0xD:
  ------------------
  |  Branch (1047:3): [True: 285, False: 4.58k]
  ------------------
 1048|  1.16k|  case 0xA:
  ------------------
  |  Branch (1048:3): [True: 497, False: 4.37k]
  ------------------
 1049|  1.44k|  case 0x9:
  ------------------
  |  Branch (1049:3): [True: 286, False: 4.58k]
  ------------------
 1050|  1.44k|    return 1;
 1051|  4.86k|  }
 1052|  3.42k|  return 0;
 1053|  4.86k|}

xmltok.c:normal_prologTok:
 1018|  3.92M|                  const char **nextTokPtr) {
 1019|  3.92M|  int tok;
 1020|  3.92M|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 1.09k, False: 3.92M]
  ------------------
 1021|  1.09k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.09k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  3.92M|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|  3.92M|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|      0|    size_t n = end - ptr;
 1024|      0|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1024:9): [True: 0, False: 0]
  ------------------
 1025|      0|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
 1026|      0|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 0, False: 0]
  ------------------
 1027|      0|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|      0|      end = ptr + n;
 1029|      0|    }
 1030|      0|  }
 1031|  3.92M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.92M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.92M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1032|  4.19k|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 4.19k, False: 3.92M]
  ------------------
 1033|  4.19k|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  4.19k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  4.19k|#  define MINBPC(enc) 1
  ------------------
 1034|  15.7k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 15.7k, False: 3.90M]
  ------------------
 1035|  15.7k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  15.7k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  15.7k|#  define MINBPC(enc) 1
  ------------------
 1036|  47.3k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 47.3k, False: 3.87M]
  ------------------
 1037|  47.3k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  47.3k|#  define MINBPC(enc) 1
  ------------------
 1038|  47.3k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  47.3k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  47.3k|    {                                                                          \
  |  |  |  |  135|  47.3k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  47.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  47.3k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 20, False: 47.2k]
  |  |  |  |  ------------------
  |  |  |  |  136|     20|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     20|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     20|      }                                                                        \
  |  |  |  |  138|  47.3k|    }
  |  |  ------------------
  ------------------
 1039|  47.2k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  47.2k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  47.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 21, False: 47.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  40.4k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 40.4k, False: 6.85k]
  ------------------
 1041|  40.4k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  40.4k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  40.4k|#  define MINBPC(enc) 1
  ------------------
 1042|  2.37k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 2.37k, False: 44.9k]
  ------------------
 1043|  2.37k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  2.37k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  2.37k|#  define MINBPC(enc) 1
  ------------------
 1044|  2.67k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 2.67k, False: 44.6k]
  ------------------
 1045|  4.40k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 1.72k, False: 45.5k]
  ------------------
 1046|  4.40k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 0, False: 47.2k]
  ------------------
 1047|  4.42k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 24, False: 47.2k]
  ------------------
 1048|  4.46k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 39, False: 47.2k]
  ------------------
 1049|  4.46k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 5, False: 47.2k]
  ------------------
 1050|  4.46k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  242|  4.46k|#  define MINBPC(enc) 1
  ------------------
 1051|  4.46k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  4.46k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  47.2k|    }
 1053|     21|    *nextTokPtr = ptr;
 1054|     21|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
 1055|  47.2k|  }
 1056|   117k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 117k, False: 3.80M]
  ------------------
 1057|   117k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  242|   117k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1057:9): [True: 169, False: 117k]
  ------------------
 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|   185k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 68.2k, False: 3.85M]
  ------------------
 1064|   274k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 88.9k, False: 3.83M]
  ------------------
 1065|  1.34M|    for (;;) {
 1066|  1.34M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.34M|#  define MINBPC(enc) 1
  ------------------
 1067|  1.34M|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  1.34M|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.34M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.34M|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 519, False: 1.33M]
  ------------------
 1068|    519|        break;
 1069|  1.33M|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.33M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.33M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1070|  10.8k|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 10.8k, False: 1.32M]
  ------------------
 1071|  1.06M|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 1.05M, False: 285k]
  ------------------
 1072|  1.06M|        break;
 1073|    586|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 586, False: 1.33M]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|    586|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  242|    586|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1075:13): [True: 582, False: 4]
  ------------------
 1076|    582|          break;
 1077|       |        /* fall through */
 1078|   274k|      default:
  ------------------
  |  Branch (1078:7): [True: 274k, False: 1.06M]
  ------------------
 1079|   274k|        *nextTokPtr = ptr;
 1080|   274k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|   274k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|  1.33M|      }
 1082|  1.33M|    }
 1083|    519|    *nextTokPtr = ptr;
 1084|    519|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    519|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  4.46k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 4.46k, False: 3.92M]
  ------------------
 1086|  4.46k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  4.46k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  4.46k|#  define MINBPC(enc) 1
  ------------------
 1087|  1.15k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 1.15k, False: 3.92M]
  ------------------
 1088|  1.15k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.15k|#  define MINBPC(enc) 1
  ------------------
 1089|  1.15k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  1.15k|#define XML_TOK_COMMA 38
  ------------------
 1090|  3.43k|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 3.43k, False: 3.92M]
  ------------------
 1091|  3.43k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.43k|#  define MINBPC(enc) 1
  ------------------
 1092|  3.43k|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|  3.43k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|  1.75k|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 1.75k, False: 3.92M]
  ------------------
 1094|  1.75k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.75k|#  define MINBPC(enc) 1
  ------------------
 1095|  1.75k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  1.75k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.75k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.75k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 5, False: 1.75k]
  ------------------
 1096|      5|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      5|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|  1.75k|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  300|  1.75k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 22, False: 1.72k]
  |  |  ------------------
  ------------------
 1098|     22|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     22|    {                                                                          \
  |  |  135|     22|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     22|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|     22|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 21]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     22|    }
  ------------------
 1099|     21|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  300|     21|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 2, False: 19]
  |  |  ------------------
  ------------------
 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|     21|    }
 1104|  1.74k|    *nextTokPtr = ptr;
 1105|  1.74k|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|  1.74k|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  3.18M|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 3.18M, False: 742k]
  ------------------
 1107|  3.18M|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.18M|#  define MINBPC(enc) 1
  ------------------
 1108|  3.18M|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  3.18M|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|  65.9k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 65.9k, False: 3.85M]
  ------------------
 1110|  65.9k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  65.9k|#  define MINBPC(enc) 1
  ------------------
 1111|  65.9k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  65.9k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  65.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  65.9k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 17, False: 65.9k]
  ------------------
 1112|     17|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|     17|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|  65.9k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  65.9k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  65.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 6, False: 65.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|  1.88k|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 1.88k, False: 64.0k]
  ------------------
 1115|  1.88k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.88k|#  define MINBPC(enc) 1
  ------------------
 1116|  1.88k|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|  1.88k|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|  4.17k|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 4.17k, False: 61.7k]
  ------------------
 1118|  4.17k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  4.17k|#  define MINBPC(enc) 1
  ------------------
 1119|  4.17k|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|  4.17k|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|  7.44k|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 7.44k, False: 58.4k]
  ------------------
 1121|  7.44k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  7.44k|#  define MINBPC(enc) 1
  ------------------
 1122|  7.44k|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|  7.44k|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|    733|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 733, False: 65.1k]
  ------------------
 1124|    933|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 200, False: 65.7k]
  ------------------
 1125|  35.7k|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 34.8k, False: 31.0k]
  ------------------
 1126|  37.0k|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 1.21k, False: 64.6k]
  ------------------
 1127|  37.4k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 440, False: 65.4k]
  ------------------
 1128|  39.0k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 1.60k, False: 64.2k]
  ------------------
 1129|  52.3k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 13.3k, False: 52.5k]
  ------------------
 1130|  52.3k|      *nextTokPtr = ptr;
 1131|  52.3k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  52.3k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|  65.9k|    }
 1133|      6|    *nextTokPtr = ptr;
 1134|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
 1135|  62.4k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 62.4k, False: 3.86M]
  ------------------
 1136|  62.4k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  62.4k|#  define MINBPC(enc) 1
  ------------------
 1137|  62.4k|    return XML_TOK_OR;
  ------------------
  |  |   88|  62.4k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  36.1k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 36.1k, False: 3.88M]
  ------------------
 1139|  36.1k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  36.1k|#  define MINBPC(enc) 1
  ------------------
 1140|  36.1k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  36.1k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  33.2k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 33.2k, False: 3.89M]
  ------------------
 1142|  33.2k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  33.2k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  33.2k|#  define MINBPC(enc) 1
  ------------------
 1143|      0|#  define LEAD_CASE(n)                                                         \
 1144|      0|  case BT_LEAD##n:                                                             \
 1145|      0|    if (end - ptr < n)                                                         \
 1146|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
 1147|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
 1148|      0|      *nextTokPtr = ptr;                                                       \
 1149|      0|      return XML_TOK_INVALID;                                                  \
 1150|      0|    }                                                                          \
 1151|      0|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
 1152|      0|      ptr += n;                                                                \
 1153|      0|      tok = XML_TOK_NAME;                                                      \
 1154|      0|      break;                                                                   \
 1155|      0|    }                                                                          \
 1156|      0|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
 1157|      0|      ptr += n;                                                                \
 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
 1159|      0|      break;                                                                   \
 1160|      0|    }                                                                          \
 1161|      0|    *nextTokPtr = ptr;                                                         \
 1162|      0|    return XML_TOK_INVALID;
 1163|  2.59k|    LEAD_CASE(2)
  ------------------
  |  | 1144|      2|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 707, False: 3.92M]
  |  |  ------------------
  |  | 1145|    707|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 2, False: 705]
  |  |  ------------------
  |  | 1146|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|    705|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|    705|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    705|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 3, False: 702]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      3|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      3|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      3|    }                                                                          \
  |  | 1151|    705|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|    702|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    702|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 217, False: 485]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|    217|      ptr += n;                                                                \
  |  | 1153|    217|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|    217|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|    217|      break;                                                                   \
  |  | 1155|    217|    }                                                                          \
  |  | 1156|    702|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|    485|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    485|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 483, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|    483|      ptr += n;                                                                \
  |  | 1158|    483|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|    483|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|    483|      break;                                                                   \
  |  | 1160|    483|    }                                                                          \
  |  | 1161|    485|    *nextTokPtr = ptr;                                                         \
  |  | 1162|      2|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1164|  7.31k|    LEAD_CASE(3)
  ------------------
  |  | 1144|     11|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 1.90k, False: 3.92M]
  |  |  ------------------
  |  | 1145|  1.90k|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 3, False: 1.90k]
  |  |  ------------------
  |  | 1146|     11|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|  1.90k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|  1.90k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.90k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 38, False: 1.86k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|     38|      *nextTokPtr = ptr;                                                       \
  |  | 1149|     38|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     38|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|     38|    }                                                                          \
  |  | 1151|  1.90k|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|  1.86k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.86k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 225, False: 1.63k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|    225|      ptr += n;                                                                \
  |  | 1153|    225|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|    225|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|    225|      break;                                                                   \
  |  | 1155|    225|    }                                                                          \
  |  | 1156|  1.86k|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|  1.63k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.63k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 1.62k, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|  1.62k|      ptr += n;                                                                \
  |  | 1158|  1.62k|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|  1.62k|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|  1.62k|      break;                                                                   \
  |  | 1160|  1.62k|    }                                                                          \
  |  | 1161|  1.63k|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     11|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1165|    130|    LEAD_CASE(4)
  ------------------
  |  | 1144|     15|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 51, False: 3.92M]
  |  |  ------------------
  |  | 1145|     51|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 2, False: 49]
  |  |  ------------------
  |  | 1146|     15|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     49|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|     49|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     49|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 34, False: 15]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|     34|      *nextTokPtr = ptr;                                                       \
  |  | 1149|     34|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     34|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|     34|    }                                                                          \
  |  | 1151|     49|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|     15|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     15|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 0, False: 15]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|     15|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|     15|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     15|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 0, False: 15]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|     15|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     15|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|   133k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 133k, False: 3.79M]
  ------------------
 1168|   187k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 53.3k, False: 3.87M]
  ------------------
 1169|   187k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|   187k|#define XML_TOK_NAME 18
  ------------------
 1170|   187k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|   187k|#  define MINBPC(enc) 1
  ------------------
 1171|   187k|    break;
 1172|    283|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 283, False: 3.92M]
  ------------------
 1173|    527|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 244, False: 3.92M]
  ------------------
 1174|  2.04k|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 1.51k, False: 3.92M]
  ------------------
 1175|  2.04k|#  ifdef XML_NS
 1176|  2.04k|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 3.92M]
  ------------------
 1177|  2.04k|#  endif
 1178|  2.04k|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|  2.04k|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|  2.04k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.04k|#  define MINBPC(enc) 1
  ------------------
 1180|  2.04k|    break;
 1181|      0|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 0, False: 3.92M]
  ------------------
 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|     57|  default:
  ------------------
  |  Branch (1193:3): [True: 57, False: 3.92M]
  ------------------
 1194|     57|    *nextTokPtr = ptr;
 1195|     57|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     57|#define XML_TOK_INVALID 0
  ------------------
 1196|  3.92M|  }
 1197|  2.87M|  while (HAS_CHAR(enc, ptr, end)) {
 1198|  2.87M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.87M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.87M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1199|  8.34M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  2.68M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 2.87M]
  |  |  ------------------
  |  |   82|  2.68M|    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.68M|    /* fall through */                                                         \
  |  |   87|  2.68M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 326k, False: 2.54M]
  |  |  ------------------
  |  |   88|  2.65M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 2.33M, False: 542k]
  |  |  ------------------
  |  |   89|  2.67M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 15.6k, False: 2.85M]
  |  |  ------------------
  |  |   90|  2.67M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 2.32k, False: 2.87M]
  |  |  ------------------
  |  |   91|  2.68M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 3.81k, False: 2.87M]
  |  |  ------------------
  |  |   92|  2.68M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  2.68M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  2.68M|    break;                                                                     \
  |  |   94|  2.68M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  1.86k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 1.87k, False: 2.87M]
  |  |  |  |  ------------------
  |  |  |  |   71|  1.87k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 1.87k]
  |  |  |  |  ------------------
  |  |  |  |   72|  1.86k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  1.87k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.75k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.87k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 10, False: 1.86k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  1.86k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.86k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 1.86k]
  |  |  |  |  ------------------
  |  |  |  |   74|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     13|    }                                                                          \
  |  |  |  |   77|  1.87k|    ptr += n;                                                                  \
  |  |  |  |   78|  1.86k|    break;
  |  |  ------------------
  |  |   95|  1.86k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    620|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 630, False: 2.87M]
  |  |  |  |  ------------------
  |  |  |  |   71|    630|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 628]
  |  |  |  |  ------------------
  |  |  |  |   72|    620|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    628|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.25k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    628|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 622]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    622|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    622|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 2, False: 620]
  |  |  |  |  ------------------
  |  |  |  |   74|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      8|    }                                                                          \
  |  |  |  |   77|    628|    ptr += n;                                                                  \
  |  |  |  |   78|    620|    break;
  |  |  ------------------
  |  |   96|    620|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 12, False: 2.87M]
  |  |  |  |  ------------------
  |  |  |  |   71|     12|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 10]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#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: 8, 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|     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;
  |  |  ------------------
  ------------------
 1200|  13.5k|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 13.5k, False: 2.86M]
  ------------------
 1201|  52.5k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 39.0k, False: 2.83M]
  ------------------
 1202|  52.9k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 359, False: 2.87M]
  ------------------
 1203|  85.9k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 33.0k, False: 2.84M]
  ------------------
 1204|  89.1k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 3.19k, False: 2.87M]
  ------------------
 1205|  89.1k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 6, False: 2.87M]
  ------------------
 1206|   108k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 18.9k, False: 2.85M]
  ------------------
 1207|   142k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 34.2k, False: 2.84M]
  ------------------
 1208|   179k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 37.0k, False: 2.83M]
  ------------------
 1209|   179k|      *nextTokPtr = ptr;
 1210|   179k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 2.87M]
  ------------------
 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|    935|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 935, False: 2.87M]
  ------------------
 1232|    935|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    935|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 3, False: 932]
  ------------------
 1233|      3|        *nextTokPtr = ptr;
 1234|      3|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
 1235|      3|      }
 1236|    932|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|    932|#  define MINBPC(enc) 1
  ------------------
 1237|    932|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|    932|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    795|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 795, False: 2.87M]
  ------------------
 1239|    795|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    795|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 794]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|    794|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|    794|#  define MINBPC(enc) 1
  ------------------
 1244|    794|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    794|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|  10.4k|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 10.4k, False: 2.86M]
  ------------------
 1246|  10.4k|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|  10.4k|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 2, False: 10.4k]
  ------------------
 1247|      2|        *nextTokPtr = ptr;
 1248|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
 1249|      2|      }
 1250|  10.4k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  10.4k|#  define MINBPC(enc) 1
  ------------------
 1251|  10.4k|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|  10.4k|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     71|    default:
  ------------------
  |  Branch (1252:5): [True: 71, False: 2.87M]
  ------------------
 1253|     71|      *nextTokPtr = ptr;
 1254|     71|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     71|#define XML_TOK_INVALID 0
  ------------------
 1255|  2.87M|    }
 1256|  2.87M|  }
 1257|    280|  return -tok;
 1258|   191k|}
xmltok.c:normal_scanLit:
  984|  19.9k|                const char **nextTokPtr) {
  985|  80.7M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  80.7M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  80.7M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  80.7M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  987|  80.7M|    switch (t) {
  988|  4.77k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|    621|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|    607|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 621, False: 80.7M]
  |  |  |  |  ------------------
  |  |  |  |   50|    621|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 619]
  |  |  |  |  ------------------
  |  |  |  |   51|    607|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|    619|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    619|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    619|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 12, False: 607]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     12|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     12|    }                                                                          \
  |  |  |  |   56|    619|    ptr += n;                                                                  \
  |  |  |  |   57|    607|    break;
  |  |  ------------------
  |  |   61|    817|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|    811|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 817, False: 80.7M]
  |  |  |  |  ------------------
  |  |  |  |   50|    817|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 816]
  |  |  |  |  ------------------
  |  |  |  |   51|    811|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|    816|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    816|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    816|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 811]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      5|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      5|    }                                                                          \
  |  |  |  |   56|    816|    ptr += n;                                                                  \
  |  |  |  |   57|    811|    break;
  |  |  ------------------
  |  |   62|    936|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|    927|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 936, False: 80.7M]
  |  |  |  |  ------------------
  |  |  |  |   50|    936|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 934]
  |  |  |  |  ------------------
  |  |  |  |   51|    927|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|    934|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    934|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    934|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 927]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      7|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      7|    }                                                                          \
  |  |  |  |   56|    934|    ptr += n;                                                                  \
  |  |  |  |   57|    927|    break;
  |  |  ------------------
  |  |   63|    927|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 12, False: 80.7M]
  |  |  ------------------
  |  |   64|     15|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 3, False: 80.7M]
  |  |  ------------------
  |  |   65|     20|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 5, False: 80.7M]
  |  |  ------------------
  |  |   66|     20|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     20|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|   772k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 772k, False: 79.9M]
  ------------------
  990|   788k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 16.5k, False: 80.6M]
  ------------------
  991|   788k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   788k|#  define MINBPC(enc) 1
  ------------------
  992|   788k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 769k, False: 19.8k]
  ------------------
  993|   769k|        break;
  994|  19.8k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  19.8k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  19.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  19.8k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 5, False: 19.8k]
  ------------------
  995|      5|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      5|#define XML_TOK_LITERAL 27
  ------------------
  996|  19.8k|      *nextTokPtr = ptr;
  997|  19.8k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  19.8k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  19.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  998|  1.34k|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 1.34k, False: 18.5k]
  ------------------
  999|  7.49k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 6.15k, False: 13.6k]
  ------------------
 1000|  13.4k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 5.93k, False: 13.9k]
  ------------------
 1001|  19.6k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 6.20k, False: 13.6k]
  ------------------
 1002|  19.6k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 4, False: 19.8k]
  ------------------
 1003|  19.8k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 177, False: 19.6k]
  ------------------
 1004|  19.8k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  19.8k|#define XML_TOK_LITERAL 27
  ------------------
 1005|     27|      default:
  ------------------
  |  Branch (1005:7): [True: 27, False: 19.8k]
  ------------------
 1006|     27|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     27|#define XML_TOK_INVALID 0
  ------------------
 1007|  19.8k|      }
 1008|  79.9M|    default:
  ------------------
  |  Branch (1008:5): [True: 79.9M, False: 791k]
  ------------------
 1009|  79.9M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  79.9M|#  define MINBPC(enc) 1
  ------------------
 1010|  79.9M|      break;
 1011|  80.7M|    }
 1012|  80.7M|  }
 1013|     67|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     67|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  19.9k|}
xmltok.c:normal_scanDecl:
  183|  40.4k|                 const char **nextTokPtr) {
  184|  40.4k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  40.4k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  40.4k|    {                                                                          \
  |  |  |  |  135|  40.4k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  40.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  40.4k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 40.4k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  40.4k|    }
  |  |  ------------------
  ------------------
  185|  40.4k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  40.4k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  40.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  186|  1.03k|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 1.03k, False: 39.3k]
  ------------------
  187|  1.03k|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  1.03k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  1.03k|#  define MINBPC(enc) 1
  ------------------
  188|      2|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 2, False: 40.4k]
  ------------------
  189|      2|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|      2|#  define MINBPC(enc) 1
  ------------------
  190|      2|    return XML_TOK_COND_SECT_OPEN;
  ------------------
  |  |  102|      2|#define XML_TOK_COND_SECT_OPEN 33       /* <![ */
  ------------------
  191|  1.63k|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 1.63k, False: 38.7k]
  ------------------
  192|  39.3k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 37.7k, False: 2.67k]
  ------------------
  193|  39.3k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  39.3k|#  define MINBPC(enc) 1
  ------------------
  194|  39.3k|    break;
  195|      6|  default:
  ------------------
  |  Branch (195:3): [True: 6, False: 40.4k]
  ------------------
  196|      6|    *nextTokPtr = ptr;
  197|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  198|  40.4k|  }
  199|   269k|  while (HAS_CHAR(enc, ptr, end)) {
  200|   269k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   269k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   269k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  201|      9|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 9, False: 269k]
  ------------------
  202|      9|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|      9|    {                                                                          \
  |  |  135|      9|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|      9|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|      9|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 3, False: 6]
  |  |  ------------------
  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      3|      }                                                                        \
  |  |  138|      9|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|      6|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  255|      6|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|      6|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 2, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      1|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 1, False: 5]
  ------------------
  206|      2|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 5]
  ------------------
  207|      3|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 1, False: 5]
  ------------------
  208|      4|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 1, False: 5]
  ------------------
  209|      4|        *nextTokPtr = ptr;
  210|      4|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  211|      6|      }
  212|       |      /* fall through */
  213|  4.19k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 4.19k, False: 265k]
  ------------------
  214|  12.8k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 8.63k, False: 261k]
  ------------------
  215|  39.3k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 26.4k, False: 243k]
  ------------------
  216|  39.3k|      *nextTokPtr = ptr;
  217|  39.3k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  39.3k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|   215k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 215k, False: 54.6k]
  ------------------
  219|   230k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 15.2k, False: 254k]
  ------------------
  220|   230k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   230k|#  define MINBPC(enc) 1
  ------------------
  221|   230k|      break;
  222|     15|    default:
  ------------------
  |  Branch (222:5): [True: 15, False: 269k]
  ------------------
  223|     15|      *nextTokPtr = ptr;
  224|     15|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  225|   269k|    }
  226|   269k|  }
  227|     41|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     41|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  39.3k|}
xmltok.c:normal_scanComment:
  146|  1.86k|                    const char **nextTokPtr) {
  147|  1.86k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  1.86k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.86k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.86k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 1.85k, False: 10]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|  1.85k|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  300|  1.85k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (148:9): [True: 14, False: 1.84k]
  ------------------
  149|     14|      *nextTokPtr = ptr;
  150|     14|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  151|     14|    }
  152|  1.84k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.84k|#  define MINBPC(enc) 1
  ------------------
  153|  2.15M|    while (HAS_CHAR(enc, ptr, end)) {
  154|  2.15M|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.15M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.15M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  155|  4.09M|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  2.01M|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.01M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.01M, False: 137k]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.01M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 2.01M]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.01M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.01M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.01M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.01M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 2.01M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      4|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      4|    }                                                                          \
  |  |  |  |   56|  2.01M|    ptr += n;                                                                  \
  |  |  |  |   57|  2.01M|    break;
  |  |  ------------------
  |  |   61|  2.01M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  30.5k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 30.5k, False: 2.12M]
  |  |  |  |  ------------------
  |  |  |  |   50|  30.5k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 30.5k]
  |  |  |  |  ------------------
  |  |  |  |   51|  30.5k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  30.5k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  30.5k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  30.5k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 30.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      1|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      1|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      1|    }                                                                          \
  |  |  |  |   56|  30.5k|    ptr += n;                                                                  \
  |  |  |  |   57|  30.5k|    break;
  |  |  ------------------
  |  |   62|  30.5k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  3.06k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.06k, False: 2.14M]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.06k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 3.06k]
  |  |  |  |  ------------------
  |  |  |  |   51|  3.06k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  3.06k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.06k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.06k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 3.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      1|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      1|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      1|    }                                                                          \
  |  |  |  |   56|  3.06k|    ptr += n;                                                                  \
  |  |  |  |   57|  3.06k|    break;
  |  |  ------------------
  |  |   63|  3.06k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 10, False: 2.15M]
  |  |  ------------------
  |  |   64|     11|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 1, False: 2.15M]
  |  |  ------------------
  |  |   65|     13|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 2, False: 2.15M]
  |  |  ------------------
  |  |   66|     13|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     13|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  3.55k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 3.55k, False: 2.14M]
  ------------------
  157|  3.55k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.55k|#  define MINBPC(enc) 1
  ------------------
  158|  3.55k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.55k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.55k|    {                                                                          \
  |  |  |  |  135|  3.55k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.55k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.55k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 3.55k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  3.55k|    }
  |  |  ------------------
  ------------------
  159|  3.55k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  300|  3.55k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1.75k, False: 1.80k]
  |  |  ------------------
  ------------------
  160|  1.75k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.75k|#  define MINBPC(enc) 1
  ------------------
  161|  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)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.75k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.74k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.75k|    }
  |  |  ------------------
  ------------------
  162|  1.74k|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  1.74k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (162:15): [True: 26, False: 1.72k]
  ------------------
  163|     26|            *nextTokPtr = ptr;
  164|     26|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     26|#define XML_TOK_INVALID 0
  ------------------
  165|     26|          }
  166|  1.72k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.72k|#  define MINBPC(enc) 1
  ------------------
  167|  1.72k|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|  1.72k|#define XML_TOK_COMMENT 13
  ------------------
  168|  1.74k|        }
  169|  1.80k|        break;
  170|  99.9k|      default:
  ------------------
  |  Branch (170:7): [True: 99.9k, False: 2.05M]
  ------------------
  171|  99.9k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  99.9k|#  define MINBPC(enc) 1
  ------------------
  172|  99.9k|        break;
  173|  2.15M|      }
  174|  2.15M|    }
  175|  1.84k|  }
  176|     77|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     77|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|  1.86k|}
xmltok.c:normal_scanPi:
  277|  6.17k|               const char **nextTokPtr) {
  278|  6.17k|  int tok;
  279|  6.17k|  const char *target = ptr;
  280|  6.17k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.17k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.17k|    {                                                                          \
  |  |  |  |  135|  6.17k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.17k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  6.17k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 7, False: 6.17k]
  |  |  |  |  ------------------
  |  |  |  |  136|      7|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      7|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      7|      }                                                                        \
  |  |  |  |  138|  6.17k|    }
  |  |  ------------------
  ------------------
  281|  6.17k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  6.17k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  6.17k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  282|  5.99k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  5.41k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 6.17k]
  |  |  ------------------
  |  |  111|  5.41k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  5.41k|    /* fall through */                                                         \
  |  |  116|  5.41k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.49k, False: 1.67k]
  |  |  ------------------
  |  |  117|  5.41k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 923, False: 5.24k]
  |  |  ------------------
  |  |  118|  5.41k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  5.41k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  5.41k|    break;                                                                     \
  |  |  120|  5.41k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    432|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 435, False: 5.73k]
  |  |  |  |  ------------------
  |  |  |  |  100|    435|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 434]
  |  |  |  |  ------------------
  |  |  |  |  101|    432|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    434|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    868|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    434|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 433]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    433|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    433|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 432]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      2|    }                                                                          \
  |  |  |  |  106|    434|    ptr += n;                                                                  \
  |  |  |  |  107|    432|    break;
  |  |  ------------------
  |  |  121|    432|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    300|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 310, False: 5.86k]
  |  |  |  |  ------------------
  |  |  |  |  100|    310|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 308]
  |  |  |  |  ------------------
  |  |  |  |  101|    300|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    308|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    616|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    308|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 301]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    301|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    301|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 300]
  |  |  |  |  ------------------
  |  |  |  |  103|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      8|    }                                                                          \
  |  |  |  |  106|    308|    ptr += n;                                                                  \
  |  |  |  |  107|    300|    break;
  |  |  ------------------
  |  |  122|    300|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 5, False: 6.16k]
  |  |  |  |  ------------------
  |  |  |  |  100|      5|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 4]
  |  |  |  |  ------------------
  |  |  |  |  101|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      4|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      8|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      4|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, 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|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      4|    }                                                                          \
  |  |  |  |  106|      4|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  283|      2|  default:
  ------------------
  |  Branch (283:3): [True: 2, False: 6.16k]
  ------------------
  284|      2|    *nextTokPtr = ptr;
  285|      2|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  286|  6.17k|  }
  287|  3.36M|  while (HAS_CHAR(enc, ptr, end)) {
  288|  3.36M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.36M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.36M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  289|  12.9M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  3.19M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 3.36M]
  |  |  ------------------
  |  |   82|  3.19M|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  286|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (82:9): [Folded - Ignored]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|  3.19M|    /* fall through */                                                         \
  |  |   87|  3.19M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 3.13M, False: 234k]
  |  |  ------------------
  |  |   88|  3.15M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 24.1k, False: 3.34M]
  |  |  ------------------
  |  |   89|  3.17M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 14.9k, False: 3.35M]
  |  |  ------------------
  |  |   90|  3.17M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 222, False: 3.36M]
  |  |  ------------------
  |  |   91|  3.19M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 21.3k, False: 3.34M]
  |  |  ------------------
  |  |   92|  3.19M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  3.19M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  3.19M|    break;                                                                     \
  |  |   94|  3.19M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|   167k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 167k, False: 3.19M]
  |  |  |  |  ------------------
  |  |  |  |   71|   167k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 167k]
  |  |  |  |  ------------------
  |  |  |  |   72|   167k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|   167k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   334k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   167k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 167k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|   167k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   167k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 20, False: 167k]
  |  |  |  |  ------------------
  |  |  |  |   74|     27|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     27|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     27|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     27|    }                                                                          \
  |  |  |  |   77|   167k|    ptr += n;                                                                  \
  |  |  |  |   78|   167k|    break;
  |  |  ------------------
  |  |   95|   167k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  1.05k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 1.07k, False: 3.36M]
  |  |  |  |  ------------------
  |  |  |  |   71|  1.07k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 1.06k]
  |  |  |  |  ------------------
  |  |  |  |   72|  1.05k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  1.06k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.13k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.06k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 1.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  1.06k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.06k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 11, False: 1.05k]
  |  |  |  |  ------------------
  |  |  |  |   74|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     14|    }                                                                          \
  |  |  |  |   77|  1.06k|    ptr += n;                                                                  \
  |  |  |  |   78|  1.05k|    break;
  |  |  ------------------
  |  |   96|  1.05k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 22, False: 3.36M]
  |  |  |  |  ------------------
  |  |  |  |   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: 11, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      9|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      9|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 9, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     20|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     20|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     20|    }                                                                          \
  |  |  |  |   77|     20|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  290|  1.62k|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 1.62k, False: 3.36M]
  ------------------
  291|  1.95k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 327, False: 3.36M]
  ------------------
  292|  2.70k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 756, False: 3.36M]
  ------------------
  293|  2.70k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  303|  2.70k|#define PREFIX(ident) normal_##ident
  ------------------
  |  Branch (293:11): [True: 2, False: 2.70k]
  ------------------
  294|      2|        *nextTokPtr = ptr;
  295|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  296|      2|      }
  297|  2.70k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.70k|#  define MINBPC(enc) 1
  ------------------
  298|  6.13M|      while (HAS_CHAR(enc, ptr, end)) {
  299|  6.13M|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  6.13M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  6.13M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  300|  11.7M|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  5.07M|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  5.07M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 5.07M, False: 1.05M]
  |  |  |  |  ------------------
  |  |  |  |   50|  5.07M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 5.07M]
  |  |  |  |  ------------------
  |  |  |  |   51|  5.07M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  5.07M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  5.07M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  5.07M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 5.07M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      1|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      1|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      1|    }                                                                          \
  |  |  |  |   56|  5.07M|    ptr += n;                                                                  \
  |  |  |  |   57|  5.07M|    break;
  |  |  ------------------
  |  |   61|  5.07M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|   755k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 755k, False: 5.37M]
  |  |  |  |  ------------------
  |  |  |  |   50|   755k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 755k]
  |  |  |  |  ------------------
  |  |  |  |   51|   755k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|   755k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   755k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   755k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 755k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      1|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      1|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      1|    }                                                                          \
  |  |  |  |   56|   755k|    ptr += n;                                                                  \
  |  |  |  |   57|   755k|    break;
  |  |  ------------------
  |  |   62|   755k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  37.2k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 37.2k, False: 6.09M]
  |  |  |  |  ------------------
  |  |  |  |   50|  37.2k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 3, False: 37.2k]
  |  |  |  |  ------------------
  |  |  |  |   51|  37.2k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  37.2k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  37.2k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  37.2k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 37.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      3|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      3|    }                                                                          \
  |  |  |  |   56|  37.2k|    ptr += n;                                                                  \
  |  |  |  |   57|  37.2k|    break;
  |  |  ------------------
  |  |   63|  37.2k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 5, False: 6.13M]
  |  |  ------------------
  |  |   64|      6|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 1, False: 6.13M]
  |  |  ------------------
  |  |   65|      8|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 2, False: 6.13M]
  |  |  ------------------
  |  |   66|      8|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|      8|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  7.59k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 7.59k, False: 6.12M]
  ------------------
  302|  7.59k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  7.59k|#  define MINBPC(enc) 1
  ------------------
  303|  7.59k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  7.59k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  7.59k|    {                                                                          \
  |  |  |  |  135|  7.59k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  7.59k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  7.59k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 7.59k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  7.59k|    }
  |  |  ------------------
  ------------------
  304|  7.59k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  7.59k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 2.56k, False: 5.02k]
  |  |  ------------------
  ------------------
  305|  2.56k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.56k|#  define MINBPC(enc) 1
  ------------------
  306|  2.56k|            return tok;
  307|  2.56k|          }
  308|  5.02k|          break;
  309|   255k|        default:
  ------------------
  |  Branch (309:9): [True: 255k, False: 5.87M]
  ------------------
  310|   255k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|   255k|#  define MINBPC(enc) 1
  ------------------
  311|   255k|          break;
  312|  6.13M|        }
  313|  6.13M|      }
  314|    118|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    118|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  3.28k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 3.28k, False: 3.36M]
  ------------------
  316|  3.28k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  303|  3.28k|#define PREFIX(ident) normal_##ident
  ------------------
  |  Branch (316:11): [True: 2, False: 3.27k]
  ------------------
  317|      2|        *nextTokPtr = ptr;
  318|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  319|      2|      }
  320|  3.27k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.27k|#  define MINBPC(enc) 1
  ------------------
  321|  3.27k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.27k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.27k|    {                                                                          \
  |  |  |  |  135|  3.27k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.27k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.27k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 32, False: 3.24k]
  |  |  |  |  ------------------
  |  |  |  |  136|     32|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     32|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     32|      }                                                                        \
  |  |  |  |  138|  3.27k|    }
  |  |  ------------------
  ------------------
  322|  3.24k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  3.24k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 3.22k, False: 22]
  |  |  ------------------
  ------------------
  323|  3.22k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.22k|#  define MINBPC(enc) 1
  ------------------
  324|  3.22k|        return tok;
  325|  3.22k|      }
  326|       |      /* fall through */
  327|     49|    default:
  ------------------
  |  Branch (327:5): [True: 27, False: 3.36M]
  ------------------
  328|     49|      *nextTokPtr = ptr;
  329|     49|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     49|#define XML_TOK_INVALID 0
  ------------------
  330|  3.36M|    }
  331|  3.36M|  }
  332|     69|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     69|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  6.15k|}
xmltok.c:normal_checkPiTarget:
  232|  5.98k|                      int *tokPtr) {
  233|  5.98k|  int upper = 0;
  234|  5.98k|  UNUSED_P(enc);
  ------------------
  |  |  135|  5.98k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  5.98k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  5.98k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  5.98k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  242|  5.98k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (236:7): [True: 3.18k, False: 2.80k]
  ------------------
  237|  3.18k|    return 1;
  238|  2.80k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  2.80k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  239|    899|  case ASCII_x:
  ------------------
  |  |   86|    899|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 899, False: 1.90k]
  ------------------
  240|    899|    break;
  241|  1.10k|  case ASCII_X:
  ------------------
  |  |   59|  1.10k|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 1.10k, False: 1.70k]
  ------------------
  242|  1.10k|    upper = 1;
  243|  1.10k|    break;
  244|    805|  default:
  ------------------
  |  Branch (244:3): [True: 805, False: 2.00k]
  ------------------
  245|    805|    return 1;
  246|  2.80k|  }
  247|  2.00k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.00k|#  define MINBPC(enc) 1
  ------------------
  248|  2.00k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  2.00k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  249|    933|  case ASCII_m:
  ------------------
  |  |   75|    933|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 933, False: 1.06k]
  ------------------
  250|    933|    break;
  251|    609|  case ASCII_M:
  ------------------
  |  |   48|    609|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 609, False: 1.39k]
  ------------------
  252|    609|    upper = 1;
  253|    609|    break;
  254|    460|  default:
  ------------------
  |  Branch (254:3): [True: 460, False: 1.54k]
  ------------------
  255|    460|    return 1;
  256|  2.00k|  }
  257|  1.54k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.54k|#  define MINBPC(enc) 1
  ------------------
  258|  1.54k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  1.54k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  259|    272|  case ASCII_l:
  ------------------
  |  |   74|    272|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 272, False: 1.27k]
  ------------------
  260|    272|    break;
  261|      2|  case ASCII_L:
  ------------------
  |  |   47|      2|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 2, False: 1.54k]
  ------------------
  262|      2|    upper = 1;
  263|      2|    break;
  264|  1.26k|  default:
  ------------------
  |  Branch (264:3): [True: 1.26k, False: 274]
  ------------------
  265|  1.26k|    return 1;
  266|  1.54k|  }
  267|    274|  if (upper)
  ------------------
  |  Branch (267:7): [True: 4, False: 270]
  ------------------
  268|      4|    return 0;
  269|    270|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|    270|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|    270|  return 1;
  271|    274|}
xmltok.c:normal_scanPercent:
  924|  4.46k|                    const char **nextTokPtr) {
  925|  4.46k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.46k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.46k|    {                                                                          \
  |  |  |  |  135|  4.46k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.46k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  4.46k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 11, False: 4.45k]
  |  |  |  |  ------------------
  |  |  |  |  136|     11|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     11|      }                                                                        \
  |  |  |  |  138|  4.46k|    }
  |  |  ------------------
  ------------------
  926|  4.45k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.45k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.45k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  927|  2.11k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.55k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 4.45k]
  |  |  ------------------
  |  |  111|  1.55k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  1.55k|    /* fall through */                                                         \
  |  |  116|  1.55k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 924, False: 3.53k]
  |  |  ------------------
  |  |  117|  1.55k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 633, False: 3.82k]
  |  |  ------------------
  |  |  118|  1.55k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.55k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  1.55k|    break;                                                                     \
  |  |  120|  1.55k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    259|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 272, False: 4.18k]
  |  |  |  |  ------------------
  |  |  |  |  100|    272|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 271]
  |  |  |  |  ------------------
  |  |  |  |  101|    259|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    271|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_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: 10, False: 261]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    261|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    261|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 259]
  |  |  |  |  ------------------
  |  |  |  |  103|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     12|    }                                                                          \
  |  |  |  |  106|    271|    ptr += n;                                                                  \
  |  |  |  |  107|    259|    break;
  |  |  ------------------
  |  |  121|    316|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    313|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 316, False: 4.14k]
  |  |  |  |  ------------------
  |  |  |  |  100|    316|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 315]
  |  |  |  |  ------------------
  |  |  |  |  101|    313|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    315|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    630|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    315|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, 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: 1, False: 313]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      2|    }                                                                          \
  |  |  |  |  106|    315|    ptr += n;                                                                  \
  |  |  |  |  107|    313|    break;
  |  |  ------------------
  |  |  122|    313|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 10, False: 4.44k]
  |  |  |  |  ------------------
  |  |  |  |  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;
  |  |  ------------------
  ------------------
  928|    181|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 181, False: 4.27k]
  ------------------
  929|  1.05k|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 870, False: 3.58k]
  ------------------
  930|  2.29k|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 1.24k, False: 3.21k]
  ------------------
  931|  2.29k|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 5, False: 4.45k]
  ------------------
  932|  2.29k|    *nextTokPtr = ptr;
  933|  2.29k|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|  2.29k|#define XML_TOK_PERCENT 22
  ------------------
  934|      3|  default:
  ------------------
  |  Branch (934:3): [True: 3, False: 4.45k]
  ------------------
  935|      3|    *nextTokPtr = ptr;
  936|      3|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  937|  4.45k|  }
  938|  7.33k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  7.33k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  7.33k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  7.33k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  940|  15.1k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  4.65k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 7.33k]
  |  |  ------------------
  |  |   82|  4.65k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  286|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (82:9): [Folded - Ignored]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|  4.65k|    /* fall through */                                                         \
  |  |   87|  4.65k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.15k, False: 6.18k]
  |  |  ------------------
  |  |   88|  3.97k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 2.81k, False: 4.51k]
  |  |  ------------------
  |  |   89|  4.20k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 239, False: 7.09k]
  |  |  ------------------
  |  |   90|  4.44k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 239, False: 7.09k]
  |  |  ------------------
  |  |   91|  4.65k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 208, False: 7.12k]
  |  |  ------------------
  |  |   92|  4.65k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  4.65k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  4.65k|    break;                                                                     \
  |  |   94|  4.65k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    287|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 301, False: 7.03k]
  |  |  |  |  ------------------
  |  |  |  |   71|    301|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 300]
  |  |  |  |  ------------------
  |  |  |  |   72|    287|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    300|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    600|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    300|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 9, False: 291]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    291|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    291|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 4, False: 287]
  |  |  |  |  ------------------
  |  |  |  |   74|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     13|    }                                                                          \
  |  |  |  |   77|    300|    ptr += n;                                                                  \
  |  |  |  |   78|    287|    break;
  |  |  ------------------
  |  |   95|    358|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    349|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 358, False: 6.97k]
  |  |  |  |  ------------------
  |  |  |  |   71|    358|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 357]
  |  |  |  |  ------------------
  |  |  |  |   72|    349|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    357|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    714|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    357|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 352]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    352|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    352|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 349]
  |  |  |  |  ------------------
  |  |  |  |   74|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      8|    }                                                                          \
  |  |  |  |   77|    357|    ptr += n;                                                                  \
  |  |  |  |   78|    349|    break;
  |  |  ------------------
  |  |   96|    349|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 6, False: 7.32k]
  |  |  |  |  ------------------
  |  |  |  |   71|      6|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 5]
  |  |  |  |  ------------------
  |  |  |  |   72|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      1|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      1|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      5|    }                                                                          \
  |  |  |  |   77|      5|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  941|  1.98k|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 1.98k, False: 5.34k]
  ------------------
  942|  1.98k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.98k|#  define MINBPC(enc) 1
  ------------------
  943|  1.98k|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|  1.98k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|     27|    default:
  ------------------
  |  Branch (944:5): [True: 27, False: 7.30k]
  ------------------
  945|     27|      *nextTokPtr = ptr;
  946|     27|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     27|#define XML_TOK_INVALID 0
  ------------------
  947|  7.33k|    }
  948|  7.33k|  }
  949|     88|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     88|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|  2.12k|}
xmltok.c:normal_scanPoundName:
  954|  33.2k|                      const char **nextTokPtr) {
  955|  33.2k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  33.2k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  33.2k|    {                                                                          \
  |  |  |  |  135|  33.2k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  33.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  33.2k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 33.2k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  33.2k|    }
  |  |  ------------------
  ------------------
  956|  33.2k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  33.2k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  33.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  957|  33.1k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  33.2k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 33.2k]
  |  |  ------------------
  |  |  111|  33.2k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  33.2k|    /* fall through */                                                         \
  |  |  116|  33.2k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 33.0k, False: 214]
  |  |  ------------------
  |  |  117|  33.2k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 156, False: 33.1k]
  |  |  ------------------
  |  |  118|  33.2k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  33.2k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  33.2k|    break;                                                                     \
  |  |  120|  33.2k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      5|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 20, False: 33.2k]
  |  |  |  |  ------------------
  |  |  |  |  100|     20|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 19]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 9, False: 10]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|     10|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     10|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 5, False: 5]
  |  |  |  |  ------------------
  |  |  |  |  103|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     14|    }                                                                          \
  |  |  |  |  106|     19|    ptr += n;                                                                  \
  |  |  |  |  107|      5|    break;
  |  |  ------------------
  |  |  121|     17|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|     11|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 17, False: 33.2k]
  |  |  |  |  ------------------
  |  |  |  |  100|     17|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 16]
  |  |  |  |  ------------------
  |  |  |  |  101|     11|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#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: 3, 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: 2, False: 11]
  |  |  |  |  ------------------
  |  |  |  |  103|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      5|    }                                                                          \
  |  |  |  |  106|     16|    ptr += n;                                                                  \
  |  |  |  |  107|     11|    break;
  |  |  ------------------
  |  |  122|     16|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 16, False: 33.2k]
  |  |  |  |  ------------------
  |  |  |  |  100|     16|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 14]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     14|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     28|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     14|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 12, 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|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     14|    }                                                                          \
  |  |  |  |  106|     14|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  958|      5|  default:
  ------------------
  |  Branch (958:3): [True: 5, False: 33.2k]
  ------------------
  959|      5|    *nextTokPtr = ptr;
  960|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  961|  33.2k|  }
  962|   234k|  while (HAS_CHAR(enc, ptr, end)) {
  963|   234k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   234k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   234k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  964|   730k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   200k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 234k]
  |  |  ------------------
  |  |   82|   200k|    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|   200k|    /* fall through */                                                         \
  |  |   87|   200k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 129k, False: 104k]
  |  |  ------------------
  |  |   88|   199k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 70.0k, False: 164k]
  |  |  ------------------
  |  |   89|   200k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 403, False: 233k]
  |  |  ------------------
  |  |   90|   200k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 251, False: 233k]
  |  |  ------------------
  |  |   91|   200k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 234, False: 234k]
  |  |  ------------------
  |  |   92|   200k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   200k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|   200k|    break;                                                                     \
  |  |   94|   200k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    209|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 218, False: 234k]
  |  |  |  |  ------------------
  |  |  |  |   71|    218|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 217]
  |  |  |  |  ------------------
  |  |  |  |   72|    209|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    217|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    434|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    217|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 210]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    210|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    210|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 209]
  |  |  |  |  ------------------
  |  |  |  |   74|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      8|    }                                                                          \
  |  |  |  |   77|    217|    ptr += n;                                                                  \
  |  |  |  |   78|    209|    break;
  |  |  ------------------
  |  |   95|    282|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    259|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 282, False: 233k]
  |  |  |  |  ------------------
  |  |  |  |   71|    282|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 278]
  |  |  |  |  ------------------
  |  |  |  |   72|    259|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    278|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    556|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    278|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 14, False: 264]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    264|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    264|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 5, False: 259]
  |  |  |  |  ------------------
  |  |  |  |   74|     19|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     19|    }                                                                          \
  |  |  |  |   77|    278|    ptr += n;                                                                  \
  |  |  |  |   78|    259|    break;
  |  |  ------------------
  |  |   96|    259|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 22, False: 234k]
  |  |  |  |  ------------------
  |  |  |  |   71|     22|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 19]
  |  |  |  |  ------------------
  |  |  |  |   72|      3|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#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: 16, 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|     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;
  |  |  ------------------
  ------------------
  965|  28.0k|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 28.0k, False: 206k]
  ------------------
  966|  29.3k|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 1.32k, False: 232k]
  ------------------
  967|  31.9k|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 2.53k, False: 231k]
  ------------------
  968|  32.1k|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 195, False: 234k]
  ------------------
  969|  33.0k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 920, False: 233k]
  ------------------
  970|  33.0k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 5, False: 234k]
  ------------------
  971|  33.0k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 52, False: 234k]
  ------------------
  972|  33.0k|      *nextTokPtr = ptr;
  973|  33.0k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  33.0k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|     35|    default:
  ------------------
  |  Branch (974:5): [True: 35, False: 234k]
  ------------------
  975|     35|      *nextTokPtr = ptr;
  976|     35|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     35|#define XML_TOK_INVALID 0
  ------------------
  977|   234k|    }
  978|   234k|  }
  979|     74|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     74|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  33.2k|}
xmltok.c:normal_contentTok:
  824|  6.77M|                   const char **nextTokPtr) {
  825|  6.77M|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 204k, False: 6.57M]
  ------------------
  826|   204k|    return XML_TOK_NONE;
  ------------------
  |  |   51|   204k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|  6.57M|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|  6.57M|#  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|  6.57M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  6.57M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  6.57M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  837|  3.99M|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 3.99M, False: 2.57M]
  ------------------
  838|  3.99M|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  3.99M|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  3.99M|#  define MINBPC(enc) 1
  ------------------
  839|   721k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 721k, False: 5.84M]
  ------------------
  840|   721k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|   721k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|   721k|#  define MINBPC(enc) 1
  ------------------
  841|  3.10k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 3.10k, False: 6.56M]
  ------------------
  842|  3.10k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.10k|#  define MINBPC(enc) 1
  ------------------
  843|  3.10k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  3.10k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  3.10k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  3.10k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 15, False: 3.09k]
  ------------------
  844|     15|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     15|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  3.09k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  3.09k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.09k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 252, False: 2.84k]
  ------------------
  846|    252|      ptr += MINBPC(enc);
  ------------------
  |  |  242|    252|#  define MINBPC(enc) 1
  ------------------
  847|  3.09k|    *nextTokPtr = ptr;
  848|  3.09k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  3.09k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|   323k|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 323k, False: 6.24M]
  ------------------
  850|   323k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   323k|#  define MINBPC(enc) 1
  ------------------
  851|   323k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   323k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|   373k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 373k, False: 6.19M]
  ------------------
  853|   373k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|   373k|#  define MINBPC(enc) 1
  ------------------
  854|   373k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   373k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   373k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   373k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 265k, False: 107k]
  ------------------
  855|   265k|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|   265k|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|   107k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  300|   107k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (856:9): [True: 85.4k, False: 22.2k]
  ------------------
  857|  85.4k|      break;
  858|  22.2k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  22.2k|#  define MINBPC(enc) 1
  ------------------
  859|  22.2k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  22.2k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  22.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  22.2k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 207, False: 22.0k]
  ------------------
  860|    207|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|    207|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|  22.0k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  22.0k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (861:9): [True: 22.0k, False: 1]
  ------------------
  862|  22.0k|      ptr -= MINBPC(enc);
  ------------------
  |  |  242|  22.0k|#  define MINBPC(enc) 1
  ------------------
  863|  22.0k|      break;
  864|  22.0k|    }
  865|      1|    *nextTokPtr = ptr;
  866|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  867|   114k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  54.2k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  54.1k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 54.2k, False: 6.51M]
  |  |  |  |  ------------------
  |  |  |  |   50|  54.2k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 3, False: 54.2k]
  |  |  |  |  ------------------
  |  |  |  |   51|  54.1k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  54.2k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  54.2k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  54.2k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 54.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      5|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      5|    }                                                                          \
  |  |  |  |   56|  54.2k|    ptr += n;                                                                  \
  |  |  |  |   57|  54.1k|    break;
  |  |  ------------------
  |  |   61|  54.1k|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.04k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.06k, False: 6.56M]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.06k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 5, False: 2.06k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.04k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.06k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.06k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.06k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 14, False: 2.04k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     14|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     14|    }                                                                          \
  |  |  |  |   56|  2.06k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.04k|    break;
  |  |  ------------------
  |  |   62|  2.04k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.06k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.08k, False: 6.57M]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.08k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 4, False: 1.08k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.06k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.08k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.08k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.08k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 20, False: 1.06k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     20|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     20|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     20|    }                                                                          \
  |  |  |  |   56|  1.08k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.06k|    break;
  |  |  ------------------
  |  |   63|  1.06k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 40, False: 6.57M]
  |  |  ------------------
  |  |   64|     42|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 2, False: 6.57M]
  |  |  ------------------
  |  |   65|     47|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 5, False: 6.57M]
  |  |  ------------------
  |  |   66|     47|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     47|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     47|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|  1.09M|  default:
  ------------------
  |  Branch (868:3): [True: 1.09M, False: 5.47M]
  ------------------
  869|  1.09M|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.09M|#  define MINBPC(enc) 1
  ------------------
  870|  1.09M|    break;
  871|  6.57M|  }
  872|  30.9M|  while (HAS_CHAR(enc, ptr, end)) {
  873|  30.9M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  30.9M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  30.9M|  (((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|  21.7M|      LEAD_CASE(2)
  ------------------
  |  |  875|  21.7M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 21.7M, False: 9.22M]
  |  |  ------------------
  |  |  876|  21.7M|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  21.7M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  21.7M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 4, False: 21.7M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 2, False: 21.7M]
  |  |  ------------------
  |  |  877|      6|      *nextTokPtr = ptr;                                                       \
  |  |  878|      6|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      6|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|      6|    }                                                                          \
  |  |  880|  21.7M|    ptr += n;                                                                  \
  |  |  881|  21.7M|    break;
  ------------------
  883|  1.40M|      LEAD_CASE(3)
  ------------------
  |  |  875|  1.40M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 1.40M, False: 29.5M]
  |  |  ------------------
  |  |  876|  1.40M|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  1.40M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  1.40M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 10, False: 1.40M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 3, False: 1.40M]
  |  |  ------------------
  |  |  877|     13|      *nextTokPtr = ptr;                                                       \
  |  |  878|     13|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     13|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     13|    }                                                                          \
  |  |  880|  1.40M|    ptr += n;                                                                  \
  |  |  881|  1.40M|    break;
  ------------------
  884|  54.5k|      LEAD_CASE(4)
  ------------------
  |  |  875|  54.5k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 54.5k, False: 30.9M]
  |  |  ------------------
  |  |  876|  54.5k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  54.5k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  54.5k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 18, False: 54.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 2, False: 54.5k]
  |  |  ------------------
  |  |  877|     20|      *nextTokPtr = ptr;                                                       \
  |  |  878|     20|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     20|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     20|    }                                                                          \
  |  |  880|  54.5k|    ptr += n;                                                                  \
  |  |  881|  54.5k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|   302k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 302k, False: 30.6M]
  ------------------
  887|   302k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|   302k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  242|   302k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 36.1k, False: 265k]
  |  |  ------------------
  ------------------
  888|  36.1k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  300|  36.1k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (888:13): [True: 28.1k, False: 8.02k]
  ------------------
  889|  28.1k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  28.1k|#  define MINBPC(enc) 1
  ------------------
  890|  28.1k|          break;
  891|  28.1k|        }
  892|  8.02k|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|  8.02k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  242|  8.02k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 7.82k, False: 202]
  |  |  ------------------
  ------------------
  893|  7.82k|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  300|  7.82k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (893:15): [True: 7.81k, False: 7]
  ------------------
  894|  7.81k|            ptr += MINBPC(enc);
  ------------------
  |  |  242|  7.81k|#  define MINBPC(enc) 1
  ------------------
  895|  7.81k|            break;
  896|  7.81k|          }
  897|      7|          *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  242|      7|#  define MINBPC(enc) 1
  ------------------
  898|      7|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  899|  7.82k|        }
  900|  8.02k|      }
  901|       |      /* fall through */
  902|   620k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 354k, False: 30.6M]
  ------------------
  903|   972k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 351k, False: 30.6M]
  ------------------
  904|   972k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 23, False: 30.9M]
  ------------------
  905|   972k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 1, False: 30.9M]
  ------------------
  906|   972k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 3, False: 30.9M]
  ------------------
  907|   974k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 2.00k, False: 30.9M]
  ------------------
  908|  1.22M|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 252k, False: 30.7M]
  ------------------
  909|  1.22M|      *nextTokPtr = ptr;
  910|  1.22M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.22M|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|  6.50M|    default:
  ------------------
  |  Branch (911:5): [True: 6.50M, False: 24.4M]
  ------------------
  912|  6.50M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  6.50M|#  define MINBPC(enc) 1
  ------------------
  913|  6.50M|      break;
  914|  30.9M|    }
  915|  30.9M|  }
  916|  30.4k|  *nextTokPtr = ptr;
  917|  30.4k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  30.4k|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|  1.25M|}
xmltok.c:normal_scanLt:
  726|  3.99M|               const char **nextTokPtr) {
  727|  3.99M|#  ifdef XML_NS
  728|  3.99M|  int hadColon;
  729|  3.99M|#  endif
  730|  3.99M|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.99M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.99M|    {                                                                          \
  |  |  |  |  135|  3.99M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.99M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.99M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 40, False: 3.99M]
  |  |  |  |  ------------------
  |  |  |  |  136|     40|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     40|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     40|      }                                                                        \
  |  |  |  |  138|  3.99M|    }
  |  |  ------------------
  ------------------
  731|  3.99M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.99M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.99M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  732|  1.53M|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  3.90M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 3.99M]
  |  |  ------------------
  |  |  111|  3.90M|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  3.90M|    /* fall through */                                                         \
  |  |  116|  3.90M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.49M, False: 2.49M]
  |  |  ------------------
  |  |  117|  3.90M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 2.40M, False: 1.59M]
  |  |  ------------------
  |  |  118|  3.90M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  3.90M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  3.90M|    break;                                                                     \
  |  |  120|  3.90M|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  17.8k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 17.8k, False: 3.98M]
  |  |  |  |  ------------------
  |  |  |  |  100|  17.8k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 17.8k]
  |  |  |  |  ------------------
  |  |  |  |  101|  17.8k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  17.8k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  35.6k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  17.8k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 17.8k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  17.8k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  17.8k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 6, False: 17.8k]
  |  |  |  |  ------------------
  |  |  |  |  103|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      8|    }                                                                          \
  |  |  |  |  106|  17.8k|    ptr += n;                                                                  \
  |  |  |  |  107|  17.8k|    break;
  |  |  ------------------
  |  |  121|  17.8k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    806|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 815, False: 3.99M]
  |  |  |  |  ------------------
  |  |  |  |  100|    815|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 814]
  |  |  |  |  ------------------
  |  |  |  |  101|    806|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    814|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.62k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    814|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 810]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    810|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    810|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 4, False: 806]
  |  |  |  |  ------------------
  |  |  |  |  103|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      8|    }                                                                          \
  |  |  |  |  106|    814|    ptr += n;                                                                  \
  |  |  |  |  107|    806|    break;
  |  |  ------------------
  |  |  122|    806|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 5, False: 3.99M]
  |  |  |  |  ------------------
  |  |  |  |  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|  2.45k|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 2.45k, False: 3.99M]
  ------------------
  734|  2.45k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.45k|#  define MINBPC(enc) 1
  ------------------
  735|  2.45k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.45k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.45k|    {                                                                          \
  |  |  |  |  135|  2.45k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.45k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.45k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 2.45k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  2.45k|    }
  |  |  ------------------
  ------------------
  736|  2.45k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.45k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.45k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 12, False: 2.44k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    837|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 837, False: 1.61k]
  ------------------
  738|    837|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|    837|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|    837|#  define MINBPC(enc) 1
  ------------------
  739|  1.60k|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 1.60k, False: 849]
  ------------------
  740|  1.60k|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  1.60k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  1.60k|#  define MINBPC(enc) 1
  ------------------
  741|  2.45k|    }
  742|     12|    *nextTokPtr = ptr;
  743|     12|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  744|  3.80k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 3.80k, False: 3.99M]
  ------------------
  745|  3.80k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  3.80k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  3.80k|#  define MINBPC(enc) 1
  ------------------
  746|  72.4k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 72.4k, False: 3.92M]
  ------------------
  747|  72.4k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  72.4k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  72.4k|#  define MINBPC(enc) 1
  ------------------
  748|     27|  default:
  ------------------
  |  Branch (748:3): [True: 27, False: 3.99M]
  ------------------
  749|     27|    *nextTokPtr = ptr;
  750|     27|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     27|#define XML_TOK_INVALID 0
  ------------------
  751|  3.99M|  }
  752|  3.92M|#  ifdef XML_NS
  753|  3.92M|  hadColon = 0;
  754|  3.92M|#  endif
  755|       |  /* we have a start-tag */
  756|  6.33M|  while (HAS_CHAR(enc, ptr, end)) {
  757|  6.33M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  6.33M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  6.33M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  758|  8.39M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.85M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 6.33M]
  |  |  ------------------
  |  |   82|  1.85M|    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.85M|    /* fall through */                                                         \
  |  |   87|  1.85M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.73M, False: 4.59M]
  |  |  ------------------
  |  |   88|  1.84M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 115k, False: 6.21M]
  |  |  ------------------
  |  |   89|  1.85M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 9.53k, False: 6.32M]
  |  |  ------------------
  |  |   90|  1.85M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 766, False: 6.33M]
  |  |  ------------------
  |  |   91|  1.85M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 1.98k, False: 6.32M]
  |  |  ------------------
  |  |   92|  1.85M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.85M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  1.85M|    break;                                                                     \
  |  |   94|  1.85M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|   550k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 550k, False: 5.78M]
  |  |  |  |  ------------------
  |  |  |  |   71|   550k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 550k]
  |  |  |  |  ------------------
  |  |  |  |   72|   550k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|   550k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.10M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   550k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 550k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|   550k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   550k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 27, False: 550k]
  |  |  |  |  ------------------
  |  |  |  |   74|     31|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     31|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     31|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     31|    }                                                                          \
  |  |  |  |   77|   550k|    ptr += n;                                                                  \
  |  |  |  |   78|   550k|    break;
  |  |  ------------------
  |  |   95|   550k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  1.59k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 1.60k, False: 6.32M]
  |  |  |  |  ------------------
  |  |  |  |   71|  1.60k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 1.60k]
  |  |  |  |  ------------------
  |  |  |  |   72|  1.59k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  1.60k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.20k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.60k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 1.60k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  1.60k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.60k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 9, False: 1.59k]
  |  |  |  |  ------------------
  |  |  |  |   74|     10|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     10|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     10|    }                                                                          \
  |  |  |  |   77|  1.60k|    ptr += n;                                                                  \
  |  |  |  |   78|  1.59k|    break;
  |  |  ------------------
  |  |   96|  1.59k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 13, False: 6.33M]
  |  |  |  |  ------------------
  |  |  |  |   71|     13|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 11]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     11|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     22|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     11|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 9]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      9|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      9|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 9, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     11|    }                                                                          \
  |  |  |  |   77|     11|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 6.33M]
  ------------------
  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|  38.8k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 38.8k, False: 6.29M]
  ------------------
  777|  39.4k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 675, False: 6.33M]
  ------------------
  778|  41.6k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 2.15k, False: 6.32M]
  ------------------
  779|  41.6k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  41.6k|#  define MINBPC(enc) 1
  ------------------
  780|  43.0k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  43.0k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  43.0k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  43.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  782|  42.1k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  34.6k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 43.0k]
  |  |  ------------------
  |  |  111|  34.6k|    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|  34.6k|    /* fall through */                                                         \
  |  |  116|  34.6k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 33.2k, False: 9.76k]
  |  |  ------------------
  |  |  117|  34.6k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 1.44k, False: 41.5k]
  |  |  ------------------
  |  |  118|  34.6k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  34.6k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  34.6k|    break;                                                                     \
  |  |  120|  34.6k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  4.00k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 4.01k, False: 39.0k]
  |  |  |  |  ------------------
  |  |  |  |  100|  4.01k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 4.01k]
  |  |  |  |  ------------------
  |  |  |  |  101|  4.00k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  4.01k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  8.02k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  4.01k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 4.00k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  4.00k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  4.00k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 4.00k]
  |  |  |  |  ------------------
  |  |  |  |  103|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      7|    }                                                                          \
  |  |  |  |  106|  4.01k|    ptr += n;                                                                  \
  |  |  |  |  107|  4.00k|    break;
  |  |  ------------------
  |  |  121|  4.00k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    402|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 415, False: 42.5k]
  |  |  |  |  ------------------
  |  |  |  |  100|    415|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 413]
  |  |  |  |  ------------------
  |  |  |  |  101|    402|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    413|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    826|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    413|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 408]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    408|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    408|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 6, False: 402]
  |  |  |  |  ------------------
  |  |  |  |  103|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     11|    }                                                                          \
  |  |  |  |  106|    413|    ptr += n;                                                                  \
  |  |  |  |  107|    402|    break;
  |  |  ------------------
  |  |  122|    402|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 8, False: 43.0k]
  |  |  |  |  ------------------
  |  |  |  |  100|      8|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 6]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      6|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     12|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      6|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      3|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      3|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 3, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      6|    }                                                                          \
  |  |  |  |  106|      6|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  783|  1.63k|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 1.63k, False: 41.3k]
  ------------------
  784|  1.63k|          goto gt;
  785|    817|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 817, False: 42.1k]
  ------------------
  786|    817|          goto sol;
  787|    347|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 347, False: 42.6k]
  ------------------
  788|    816|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 469, False: 42.5k]
  ------------------
  789|  1.41k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 600, False: 42.4k]
  ------------------
  790|  1.41k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.41k|#  define MINBPC(enc) 1
  ------------------
  791|  1.41k|          continue;
  792|     11|        default:
  ------------------
  |  Branch (792:9): [True: 11, False: 43.0k]
  ------------------
  793|     11|          *nextTokPtr = ptr;
  794|     11|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  795|  43.0k|        }
  796|  39.1k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  303|  39.1k|#define PREFIX(ident) normal_##ident
  ------------------
  797|  43.0k|      }
  798|     42|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     42|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  41.6k|    }
  800|  3.87M|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 3.87M, False: 2.45M]
  ------------------
  801|  3.87M|    gt:
  802|  3.87M|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.87M|#  define MINBPC(enc) 1
  ------------------
  803|  3.87M|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  3.87M|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|  3.74k|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 3.74k, False: 6.32M]
  ------------------
  805|  4.56k|    sol:
  806|  4.56k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  4.56k|#  define MINBPC(enc) 1
  ------------------
  807|  4.56k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.56k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.56k|    {                                                                          \
  |  |  |  |  135|  4.56k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.56k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  4.56k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 9, False: 4.55k]
  |  |  |  |  ------------------
  |  |  |  |  136|      9|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      9|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      9|      }                                                                        \
  |  |  |  |  138|  4.56k|    }
  |  |  ------------------
  ------------------
  808|  4.55k|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  4.55k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (808:11): [True: 17, False: 4.53k]
  ------------------
  809|     17|        *nextTokPtr = ptr;
  810|     17|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
  811|     17|      }
  812|  4.53k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  4.53k|#  define MINBPC(enc) 1
  ------------------
  813|  4.53k|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|  4.53k|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|     47|    default:
  ------------------
  |  Branch (814:5): [True: 47, False: 6.33M]
  ------------------
  815|     47|      *nextTokPtr = ptr;
  816|     47|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     47|#define XML_TOK_INVALID 0
  ------------------
  817|  6.33M|    }
  818|  6.33M|  }
  819|     86|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     86|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  3.92M|}
xmltok.c:normal_scanCdataSection:
  337|  1.60k|                         const char **nextTokPtr) {
  338|  1.60k|  static const char CDATA_LSQB[]
  339|  1.60k|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|  1.60k|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|  1.60k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|  1.60k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|  1.60k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|  1.60k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|  1.60k|#define ASCII_LSQB 0x5B
  ------------------
  340|  1.60k|  int i;
  341|  1.60k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.60k|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|  1.60k|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|  1.60k|    {                                                                          \
  |  |  135|  1.60k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|  1.60k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.60k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 2, False: 1.60k]
  |  |  ------------------
  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      2|      }                                                                        \
  |  |  138|  1.60k|    }
  ------------------
  344|  11.1k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  9.58k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (344:15): [True: 9.59k, False: 1.59k]
  ------------------
  345|  9.59k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  300|  9.59k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (345:9): [True: 14, False: 9.58k]
  ------------------
  346|     14|      *nextTokPtr = ptr;
  347|     14|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  348|     14|    }
  349|  9.59k|  }
  350|  1.59k|  *nextTokPtr = ptr;
  351|  1.59k|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|  1.59k|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|  1.60k|}
xmltok.c:normal_scanEndTag:
  432|  72.4k|                   const char **nextTokPtr) {
  433|  72.4k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  72.4k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  72.4k|    {                                                                          \
  |  |  |  |  135|  72.4k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  72.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  72.4k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 72.4k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  72.4k|    }
  |  |  ------------------
  ------------------
  434|  72.4k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  72.4k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  72.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  435|  47.1k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  70.2k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 72.4k]
  |  |  ------------------
  |  |  111|  70.2k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  70.2k|    /* fall through */                                                         \
  |  |  116|  70.2k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 42.7k, False: 29.7k]
  |  |  ------------------
  |  |  117|  70.2k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 27.5k, False: 44.9k]
  |  |  ------------------
  |  |  118|  70.2k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  70.2k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  70.2k|    break;                                                                     \
  |  |  120|  70.2k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  1.86k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 1.87k, False: 70.5k]
  |  |  |  |  ------------------
  |  |  |  |  100|  1.87k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 1.87k]
  |  |  |  |  ------------------
  |  |  |  |  101|  1.86k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  1.87k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.74k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.87k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 1.86k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  1.86k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.86k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 1.86k]
  |  |  |  |  ------------------
  |  |  |  |  103|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      7|    }                                                                          \
  |  |  |  |  106|  1.87k|    ptr += n;                                                                  \
  |  |  |  |  107|  1.86k|    break;
  |  |  ------------------
  |  |  121|  1.86k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    353|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 356, False: 72.1k]
  |  |  |  |  ------------------
  |  |  |  |  100|    356|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 355]
  |  |  |  |  ------------------
  |  |  |  |  101|    353|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    355|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    710|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    355|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 354]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    354|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    354|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 353]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      2|    }                                                                          \
  |  |  |  |  106|    355|    ptr += n;                                                                  \
  |  |  |  |  107|    353|    break;
  |  |  ------------------
  |  |  122|    353|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 4, False: 72.4k]
  |  |  |  |  ------------------
  |  |  |  |  100|      4|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 3]
  |  |  |  |  ------------------
  |  |  |  |  101|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      3|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      6|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      3|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, 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|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|      3|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  436|      3|  default:
  ------------------
  |  Branch (436:3): [True: 3, False: 72.4k]
  ------------------
  437|      3|    *nextTokPtr = ptr;
  438|      3|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  439|  72.4k|  }
  440|  1.81M|  while (HAS_CHAR(enc, ptr, end)) {
  441|  1.81M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.81M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.81M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  442|  3.88M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   226k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 1.81M]
  |  |  ------------------
  |  |   82|   226k|    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|   226k|    /* fall through */                                                         \
  |  |   87|   226k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 172k, False: 1.64M]
  |  |  ------------------
  |  |   88|   223k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 51.8k, False: 1.76M]
  |  |  ------------------
  |  |   89|   225k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 1.34k, False: 1.81M]
  |  |  ------------------
  |  |   90|   225k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 247, False: 1.81M]
  |  |  ------------------
  |  |   91|   226k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 1.51k, False: 1.81M]
  |  |  ------------------
  |  |   92|   226k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   226k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|   226k|    break;                                                                     \
  |  |   94|  1.51M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  1.51M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 1.51M, False: 300k]
  |  |  |  |  ------------------
  |  |  |  |   71|  1.51M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 1.51M]
  |  |  |  |  ------------------
  |  |  |  |   72|  1.51M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  1.51M|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.03M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.51M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 1.51M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  1.51M|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.51M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 28, False: 1.51M]
  |  |  |  |  ------------------
  |  |  |  |   74|     29|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     29|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     29|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     29|    }                                                                          \
  |  |  |  |   77|  1.51M|    ptr += n;                                                                  \
  |  |  |  |   78|  1.51M|    break;
  |  |  ------------------
  |  |   95|  1.51M|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  1.07k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 1.08k, False: 1.81M]
  |  |  |  |  ------------------
  |  |  |  |   71|  1.08k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 1.08k]
  |  |  |  |  ------------------
  |  |  |  |   72|  1.07k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  1.08k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.17k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.08k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 1.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  1.08k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.08k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 4, False: 1.07k]
  |  |  |  |  ------------------
  |  |  |  |   74|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      9|    }                                                                          \
  |  |  |  |   77|  1.08k|    ptr += n;                                                                  \
  |  |  |  |   78|  1.07k|    break;
  |  |  ------------------
  |  |   96|  1.07k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 8, False: 1.81M]
  |  |  |  |  ------------------
  |  |  |  |   71|      8|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 7]
  |  |  |  |  ------------------
  |  |  |  |   72|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      7|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 1, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      6|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      6|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 6, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      7|    }                                                                          \
  |  |  |  |   77|      7|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  443|    397|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 397, False: 1.81M]
  ------------------
  444|    644|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 247, False: 1.81M]
  ------------------
  445|  1.14k|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 500, False: 1.81M]
  ------------------
  446|  1.85k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  1.14k|#  define MINBPC(enc) 1
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|    746|#  define MINBPC(enc) 1
  ------------------
  447|  1.85k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.85k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.85k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  448|    221|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 221, False: 1.63k]
  ------------------
  449|    483|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 262, False: 1.59k]
  ------------------
  450|    746|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 263, False: 1.58k]
  ------------------
  451|    746|          break;
  452|  1.09k|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 1.09k, False: 758]
  ------------------
  453|  1.09k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.09k|#  define MINBPC(enc) 1
  ------------------
  454|  1.09k|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|  1.09k|#define XML_TOK_END_TAG 5
  ------------------
  455|     12|        default:
  ------------------
  |  Branch (455:9): [True: 12, False: 1.84k]
  ------------------
  456|     12|          *nextTokPtr = ptr;
  457|     12|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  458|  1.85k|        }
  459|  1.85k|      }
  460|     38|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     38|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  461|      0|#  ifdef XML_NS
  462|      0|    case BT_COLON:
  ------------------
  |  Branch (462:5): [True: 0, False: 1.81M]
  ------------------
  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|  71.1k|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 71.1k, False: 1.74M]
  ------------------
  469|  71.1k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  71.1k|#  define MINBPC(enc) 1
  ------------------
  470|  71.1k|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|  71.1k|#define XML_TOK_END_TAG 5
  ------------------
  471|     35|    default:
  ------------------
  |  Branch (471:5): [True: 35, False: 1.81M]
  ------------------
  472|     35|      *nextTokPtr = ptr;
  473|     35|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     35|#define XML_TOK_INVALID 0
  ------------------
  474|  1.81M|    }
  475|  1.81M|  }
  476|     75|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     75|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  72.4k|}
xmltok.c:normal_scanAtts:
  573|  39.1k|                 const char **nextTokPtr) {
  574|  39.1k|#  ifdef XML_NS
  575|  39.1k|  int hadColon = 0;
  576|  39.1k|#  endif
  577|  1.97M|  while (HAS_CHAR(enc, ptr, end)) {
  578|  1.97M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.97M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.97M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  579|  1.86M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   437k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 1.97M]
  |  |  ------------------
  |  |   82|   437k|    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|   437k|    /* fall through */                                                         \
  |  |   87|   437k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 207k, False: 1.77M]
  |  |  ------------------
  |  |   88|   253k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 45.3k, False: 1.93M]
  |  |  ------------------
  |  |   89|   260k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 7.00k, False: 1.97M]
  |  |  ------------------
  |  |   90|   260k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 396, False: 1.97M]
  |  |  ------------------
  |  |   91|   437k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 177k, False: 1.80M]
  |  |  ------------------
  |  |   92|   437k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   437k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|   437k|    break;                                                                     \
  |  |   94|   437k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|   437k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 437k, False: 1.54M]
  |  |  |  |  ------------------
  |  |  |  |   71|   437k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 437k]
  |  |  |  |  ------------------
  |  |  |  |   72|   437k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|   437k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   875k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   437k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 437k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|   437k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   437k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 5, False: 437k]
  |  |  |  |  ------------------
  |  |  |  |   74|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      6|    }                                                                          \
  |  |  |  |   77|   437k|    ptr += n;                                                                  \
  |  |  |  |   78|   437k|    break;
  |  |  ------------------
  |  |   95|   437k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  3.08k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 3.09k, False: 1.97M]
  |  |  |  |  ------------------
  |  |  |  |   71|  3.09k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 3.09k]
  |  |  |  |  ------------------
  |  |  |  |   72|  3.08k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  3.09k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  6.18k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.09k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 3.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  3.08k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.08k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 5, False: 3.08k]
  |  |  |  |  ------------------
  |  |  |  |   74|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      9|    }                                                                          \
  |  |  |  |   77|  3.09k|    ptr += n;                                                                  \
  |  |  |  |   78|  3.08k|    break;
  |  |  ------------------
  |  |   96|  3.08k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 16, False: 1.97M]
  |  |  |  |  ------------------
  |  |  |  |   71|     16|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 15]
  |  |  |  |  ------------------
  |  |  |  |   72|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     15|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     30|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     15|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 12]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|     12|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     12|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 12, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     15|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     15|    }                                                                          \
  |  |  |  |   77|     15|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  580|      0|#  ifdef XML_NS
  581|      0|    case BT_COLON:
  ------------------
  |  Branch (581:5): [True: 0, False: 1.97M]
  ------------------
  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|    296|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 296, False: 1.97M]
  ------------------
  598|    535|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 239, False: 1.97M]
  ------------------
  599|   131k|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 131k, False: 1.84M]
  ------------------
  600|   132k|      for (;;) {
  601|   132k|        int t;
  602|       |
  603|   132k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   132k|#  define MINBPC(enc) 1
  ------------------
  604|   132k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   132k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   132k|    {                                                                          \
  |  |  |  |  135|   132k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   132k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|   132k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 38, False: 132k]
  |  |  |  |  ------------------
  |  |  |  |  136|     38|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     38|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     38|      }                                                                        \
  |  |  |  |  138|   132k|    }
  |  |  ------------------
  ------------------
  605|   132k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|   132k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   132k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  606|   132k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 131k, False: 612]
  ------------------
  607|   131k|          break;
  608|    612|        switch (t) {
  609|    198|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 198, False: 414]
  ------------------
  610|    401|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 203, False: 409]
  ------------------
  611|    601|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 200, False: 412]
  ------------------
  612|    601|          break;
  613|     11|        default:
  ------------------
  |  Branch (613:9): [True: 11, False: 601]
  ------------------
  614|     11|          *nextTokPtr = ptr;
  615|     11|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  616|    612|        }
  617|    612|      }
  618|       |      /* fall through */
  619|  1.09M|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 968k, False: 1.01M]
  ------------------
  620|  1.09M|      int open;
  621|  1.09M|#  ifdef XML_NS
  622|  1.09M|      hadColon = 0;
  623|  1.09M|#  endif
  624|  1.10M|      for (;;) {
  625|  1.10M|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.10M|#  define MINBPC(enc) 1
  ------------------
  626|  1.10M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.10M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.10M|    {                                                                          \
  |  |  |  |  135|  1.10M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.10M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.10M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 38, False: 1.10M]
  |  |  |  |  ------------------
  |  |  |  |  136|     38|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     38|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     38|      }                                                                        \
  |  |  |  |  138|  1.10M|    }
  |  |  ------------------
  ------------------
  627|  1.10M|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  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)])
  |  |  ------------------
  ------------------
  628|  1.10M|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 280k, False: 819k]
  |  Branch (628:32): [True: 819k, False: 656]
  ------------------
  629|  1.09M|          break;
  630|    656|        switch (open) {
  631|    230|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 230, False: 426]
  ------------------
  632|    442|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 212, False: 444]
  ------------------
  633|    642|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 200, False: 456]
  ------------------
  634|    642|          break;
  635|     14|        default:
  ------------------
  |  Branch (635:9): [True: 14, False: 642]
  ------------------
  636|     14|          *nextTokPtr = ptr;
  637|     14|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  638|    656|        }
  639|    656|      }
  640|  1.09M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.09M|#  define MINBPC(enc) 1
  ------------------
  641|       |      /* in attribute value */
  642|  22.6M|      for (;;) {
  643|  22.6M|        int t;
  644|  22.6M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  22.6M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  22.6M|    {                                                                          \
  |  |  |  |  135|  22.6M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  22.6M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  22.6M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 58, False: 22.6M]
  |  |  |  |  ------------------
  |  |  |  |  136|     58|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     58|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     58|      }                                                                        \
  |  |  |  |  138|  22.6M|    }
  |  |  ------------------
  ------------------
  645|  22.6M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  22.6M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  22.6M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  646|  22.6M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 1.09M, False: 21.5M]
  ------------------
  647|  1.09M|          break;
  648|  21.5M|        switch (t) {
  649|  10.8M|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  4.37M|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  4.37M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 4.37M, False: 17.2M]
  |  |  |  |  ------------------
  |  |  |  |   50|  4.37M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 4.37M]
  |  |  |  |  ------------------
  |  |  |  |   51|  4.37M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  4.37M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  4.37M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  4.37M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 4.37M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      2|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      2|    }                                                                          \
  |  |  |  |   56|  4.37M|    ptr += n;                                                                  \
  |  |  |  |   57|  4.37M|    break;
  |  |  ------------------
  |  |   61|  4.37M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.03M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.03M, False: 20.5M]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.03M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 1.03M]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.03M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.03M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.03M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.03M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 1.03M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      4|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      4|    }                                                                          \
  |  |  |  |   56|  1.03M|    ptr += n;                                                                  \
  |  |  |  |   57|  1.03M|    break;
  |  |  ------------------
  |  |   62|  1.03M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  5.83k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 5.84k, False: 21.5M]
  |  |  |  |  ------------------
  |  |  |  |   50|  5.84k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 5.84k]
  |  |  |  |  ------------------
  |  |  |  |   51|  5.83k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  5.84k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  5.84k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  5.84k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 5.83k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      5|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      5|    }                                                                          \
  |  |  |  |   56|  5.84k|    ptr += n;                                                                  \
  |  |  |  |   57|  5.83k|    break;
  |  |  ------------------
  |  |   63|  5.83k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 4, False: 21.5M]
  |  |  ------------------
  |  |   64|      5|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 1, False: 21.5M]
  |  |  ------------------
  |  |   65|     10|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 5, False: 21.5M]
  |  |  ------------------
  |  |   66|     10|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     10|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  47.1k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 47.1k, False: 21.5M]
  ------------------
  651|  47.1k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  303|  47.1k|#define PREFIX(ident) normal_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  242|  47.1k|#  define MINBPC(enc) 1
  ------------------
  652|  47.1k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 17, False: 47.1k]
  ------------------
  653|     17|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 10, False: 7]
  ------------------
  654|     10|              *nextTokPtr = ptr;
  655|     17|            return tok;
  656|     17|          }
  657|  47.1k|          break;
  658|  47.1k|        }
  659|  47.1k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 22, False: 21.5M]
  ------------------
  660|     22|          *nextTokPtr = ptr;
  661|     22|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     22|#define XML_TOK_INVALID 0
  ------------------
  662|  16.1M|        default:
  ------------------
  |  Branch (662:9): [True: 16.1M, False: 5.46M]
  ------------------
  663|  16.1M|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  16.1M|#  define MINBPC(enc) 1
  ------------------
  664|  16.1M|          break;
  665|  21.5M|        }
  666|  21.5M|      }
  667|  1.09M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.09M|#  define MINBPC(enc) 1
  ------------------
  668|  1.09M|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.09M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.09M|    {                                                                          \
  |  |  |  |  135|  1.09M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.09M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.09M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 1.09M]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  1.09M|    }
  |  |  ------------------
  ------------------
  669|  1.09M|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.09M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.09M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  670|   473k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 473k, False: 626k]
  ------------------
  671|   876k|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 402k, False: 696k]
  ------------------
  672|  1.08M|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 210k, False: 889k]
  ------------------
  673|  1.08M|        break;
  674|  5.88k|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 5.88k, False: 1.09M]
  ------------------
  675|  5.88k|        goto sol;
  676|  6.70k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 6.70k, False: 1.09M]
  ------------------
  677|  6.70k|        goto gt;
  678|     38|      default:
  ------------------
  |  Branch (678:7): [True: 38, False: 1.09M]
  ------------------
  679|     38|        *nextTokPtr = ptr;
  680|     38|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     38|#define XML_TOK_INVALID 0
  ------------------
  681|  1.09M|      }
  682|       |      /* ptr points to closing quote */
  683|  1.26M|      for (;;) {
  684|  1.26M|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.26M|#  define MINBPC(enc) 1
  ------------------
  685|  1.26M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.26M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.26M|    {                                                                          \
  |  |  |  |  135|  1.26M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.26M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.26M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 41, False: 1.26M]
  |  |  |  |  ------------------
  |  |  |  |  136|     41|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     41|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     41|      }                                                                        \
  |  |  |  |  138|  1.26M|    }
  |  |  ------------------
  ------------------
  686|  1.26M|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.26M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.26M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  687|  1.26M|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   847k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 1.26M]
  |  |  ------------------
  |  |  111|   847k|    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|   847k|    /* fall through */                                                         \
  |  |  116|   847k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 841k, False: 422k]
  |  |  ------------------
  |  |  117|   847k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 5.19k, False: 1.25M]
  |  |  ------------------
  |  |  118|   847k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   847k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|   847k|    break;                                                                     \
  |  |  120|   847k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|   200k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 200k, False: 1.06M]
  |  |  |  |  ------------------
  |  |  |  |  100|   200k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 200k]
  |  |  |  |  ------------------
  |  |  |  |  101|   200k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|   200k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   400k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   200k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 200k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|   200k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   200k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 200k]
  |  |  |  |  ------------------
  |  |  |  |  103|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|   200k|    ptr += n;                                                                  \
  |  |  |  |  107|   200k|    break;
  |  |  ------------------
  |  |  121|   200k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  13.3k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 13.3k, False: 1.25M]
  |  |  |  |  ------------------
  |  |  |  |  100|  13.3k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 13.3k]
  |  |  |  |  ------------------
  |  |  |  |  101|  13.3k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  13.3k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  26.6k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  13.3k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 13.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  13.3k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  13.3k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 13.3k]
  |  |  |  |  ------------------
  |  |  |  |  103|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|  13.3k|    ptr += n;                                                                  \
  |  |  |  |  107|  13.3k|    break;
  |  |  ------------------
  |  |  122|  13.3k|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 30, False: 1.26M]
  |  |  |  |  ------------------
  |  |  |  |  100|     30|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 29]
  |  |  |  |  ------------------
  |  |  |  |  101|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     29|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     58|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     29|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 23]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|     23|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     23|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 23, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|     29|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     29|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     29|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     29|    }                                                                          \
  |  |  |  |  106|     29|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  688|   171k|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 171k, False: 1.09M]
  ------------------
  689|   177k|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 5.21k, False: 1.25M]
  ------------------
  690|   177k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 360, False: 1.26M]
  ------------------
  691|   177k|          continue;
  692|    381|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 381, False: 1.26M]
  ------------------
  693|  7.08k|        gt:
  694|  7.08k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  7.08k|#  define MINBPC(enc) 1
  ------------------
  695|  7.08k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  7.08k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|  25.6k|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 25.6k, False: 1.23M]
  ------------------
  697|  31.5k|        sol:
  698|  31.5k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  31.5k|#  define MINBPC(enc) 1
  ------------------
  699|  31.5k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  31.5k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  31.5k|    {                                                                          \
  |  |  |  |  135|  31.5k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  31.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  31.5k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 9, False: 31.5k]
  |  |  |  |  ------------------
  |  |  |  |  136|      9|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      9|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      9|      }                                                                        \
  |  |  |  |  138|  31.5k|    }
  |  |  ------------------
  ------------------
  700|  31.5k|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  31.5k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (700:15): [True: 14, False: 31.4k]
  ------------------
  701|     14|            *nextTokPtr = ptr;
  702|     14|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  703|     14|          }
  704|  31.4k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  31.4k|#  define MINBPC(enc) 1
  ------------------
  705|  31.4k|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|  31.4k|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|      5|        default:
  ------------------
  |  Branch (706:9): [True: 5, False: 1.26M]
  ------------------
  707|      5|          *nextTokPtr = ptr;
  708|      5|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  709|  1.26M|        }
  710|  1.06M|        break;
  711|  1.26M|      }
  712|  1.06M|      break;
  713|  1.08M|    }
  714|  1.06M|    default:
  ------------------
  |  Branch (714:5): [True: 25, False: 1.97M]
  ------------------
  715|     25|      *nextTokPtr = ptr;
  716|     25|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     25|#define XML_TOK_INVALID 0
  ------------------
  717|  1.97M|    }
  718|  1.97M|  }
  719|     91|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     91|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  39.1k|}
xmltok.c:normal_scanRef:
  545|  4.39M|                const char **nextTokPtr) {
  546|  4.39M|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.39M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.39M|    {                                                                          \
  |  |  |  |  135|  4.39M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.39M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  4.39M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 43, False: 4.39M]
  |  |  |  |  ------------------
  |  |  |  |  136|     43|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     43|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     43|      }                                                                        \
  |  |  |  |  138|  4.39M|    }
  |  |  ------------------
  ------------------
  547|  4.39M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.39M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.39M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  548|  4.31M|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  4.26M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 4.39M]
  |  |  ------------------
  |  |  111|  4.26M|    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|  4.26M|    /* fall through */                                                         \
  |  |  116|  4.26M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.16M, False: 232k]
  |  |  ------------------
  |  |  117|  4.26M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 96.8k, False: 4.29M]
  |  |  ------------------
  |  |  118|  4.26M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  4.26M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  4.26M|    break;                                                                     \
  |  |  120|  4.26M|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  75.3k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 75.3k, False: 4.32M]
  |  |  |  |  ------------------
  |  |  |  |  100|  75.3k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 75.3k]
  |  |  |  |  ------------------
  |  |  |  |  101|  75.3k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  75.3k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   150k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  75.3k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 75.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  75.3k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  75.3k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 75.3k]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      2|    }                                                                          \
  |  |  |  |  106|  75.3k|    ptr += n;                                                                  \
  |  |  |  |  107|  75.3k|    break;
  |  |  ------------------
  |  |  121|  75.3k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    630|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 636, False: 4.39M]
  |  |  |  |  ------------------
  |  |  |  |  100|    636|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 634]
  |  |  |  |  ------------------
  |  |  |  |  101|    630|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    634|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.26k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    634|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 632]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    632|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    632|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 630]
  |  |  |  |  ------------------
  |  |  |  |  103|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      4|    }                                                                          \
  |  |  |  |  106|    634|    ptr += n;                                                                  \
  |  |  |  |  107|    630|    break;
  |  |  ------------------
  |  |  122|    630|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 4, False: 4.39M]
  |  |  |  |  ------------------
  |  |  |  |  100|      4|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 3]
  |  |  |  |  ------------------
  |  |  |  |  101|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      3|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      6|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      3|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, 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|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|      3|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  549|  59.3k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 59.3k, False: 4.33M]
  ------------------
  550|  59.3k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  59.3k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  59.3k|#  define MINBPC(enc) 1
  ------------------
  551|     25|  default:
  ------------------
  |  Branch (551:3): [True: 25, False: 4.39M]
  ------------------
  552|     25|    *nextTokPtr = ptr;
  553|     25|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     25|#define XML_TOK_INVALID 0
  ------------------
  554|  4.39M|  }
  555|  7.45M|  while (HAS_CHAR(enc, ptr, end)) {
  556|  7.45M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  7.45M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  7.45M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  557|  10.3M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  2.77M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 7.45M]
  |  |  ------------------
  |  |   82|  2.77M|    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.77M|    /* fall through */                                                         \
  |  |   87|  2.77M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.79M, False: 5.66M]
  |  |  ------------------
  |  |   88|  2.31M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 520k, False: 6.93M]
  |  |  ------------------
  |  |   89|  2.76M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 455k, False: 7.00M]
  |  |  ------------------
  |  |   90|  2.76M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 225, False: 7.45M]
  |  |  ------------------
  |  |   91|  2.77M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 547, False: 7.45M]
  |  |  ------------------
  |  |   92|  2.77M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  2.77M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  2.77M|    break;                                                                     \
  |  |   94|  2.77M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|   352k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 352k, False: 7.10M]
  |  |  |  |  ------------------
  |  |  |  |   71|   352k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 352k]
  |  |  |  |  ------------------
  |  |  |  |   72|   352k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|   352k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   705k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   352k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 352k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|   352k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   352k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 2, False: 352k]
  |  |  |  |  ------------------
  |  |  |  |   74|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      5|    }                                                                          \
  |  |  |  |   77|   352k|    ptr += n;                                                                  \
  |  |  |  |   78|   352k|    break;
  |  |  ------------------
  |  |   95|   352k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    496|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 501, False: 7.45M]
  |  |  |  |  ------------------
  |  |  |  |   71|    501|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 500]
  |  |  |  |  ------------------
  |  |  |  |   72|    496|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    500|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.00k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    500|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 497]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    497|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    497|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 496]
  |  |  |  |  ------------------
  |  |  |  |   74|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      4|    }                                                                          \
  |  |  |  |   77|    500|    ptr += n;                                                                  \
  |  |  |  |   78|    496|    break;
  |  |  ------------------
  |  |   96|    496|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 23, False: 7.45M]
  |  |  |  |  ------------------
  |  |  |  |   71|     23|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 21]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     21|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     42|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     21|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 20, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      1|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      1|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     21|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     21|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     21|    }                                                                          \
  |  |  |  |   77|     21|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  558|  4.33M|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 4.33M, False: 3.12M]
  ------------------
  559|  4.33M|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  4.33M|#  define MINBPC(enc) 1
  ------------------
  560|  4.33M|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|  4.33M|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|     21|    default:
  ------------------
  |  Branch (561:5): [True: 21, False: 7.45M]
  ------------------
  562|     21|      *nextTokPtr = ptr;
  563|     21|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  564|  7.45M|    }
  565|  7.45M|  }
  566|     64|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     64|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|  4.33M|}
xmltok.c:normal_scanCharRef:
  514|  59.3k|                    const char **nextTokPtr) {
  515|  59.3k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  59.3k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  59.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  59.3k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 59.3k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  59.3k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  300|  59.3k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 57.8k, False: 1.48k]
  |  |  ------------------
  ------------------
  517|  57.8k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  57.8k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  57.8k|#  define MINBPC(enc) 1
  ------------------
  518|  1.48k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.48k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.48k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  519|  1.46k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 1.46k, False: 15]
  ------------------
  520|  1.46k|      break;
  521|     15|    default:
  ------------------
  |  Branch (521:5): [True: 15, False: 1.46k]
  ------------------
  522|     15|      *nextTokPtr = ptr;
  523|     15|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  524|  1.48k|    }
  525|  4.45k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  1.46k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  2.99k|#  define MINBPC(enc) 1
  ------------------
  526|  4.45k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.45k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.45k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  527|  2.99k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 2.99k, False: 1.46k]
  ------------------
  528|  2.99k|        break;
  529|  1.45k|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 1.45k, False: 2.99k]
  ------------------
  530|  1.45k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.45k|#  define MINBPC(enc) 1
  ------------------
  531|  1.45k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  1.45k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|      6|      default:
  ------------------
  |  Branch (532:7): [True: 6, False: 4.44k]
  ------------------
  533|      6|        *nextTokPtr = ptr;
  534|      6|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  535|  4.45k|      }
  536|  4.45k|    }
  537|  1.46k|  }
  538|      9|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      9|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  59.3k|}
xmltok.c:normal_scanHexCharRef:
  483|  57.8k|                       const char **nextTokPtr) {
  484|  57.8k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  57.8k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  57.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  57.8k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 57.8k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  57.8k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  57.8k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  57.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  486|  48.0k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 48.0k, False: 9.71k]
  ------------------
  487|  57.8k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 9.71k, False: 48.1k]
  ------------------
  488|  57.8k|      break;
  489|      6|    default:
  ------------------
  |  Branch (489:5): [True: 6, False: 57.8k]
  ------------------
  490|      6|      *nextTokPtr = ptr;
  491|      6|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  492|  57.8k|    }
  493|   177k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  57.8k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|   119k|#  define MINBPC(enc) 1
  ------------------
  494|   177k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   177k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   177k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  495|   108k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 108k, False: 68.9k]
  ------------------
  496|   119k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 11.2k, False: 165k]
  ------------------
  497|   119k|        break;
  498|  57.7k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 57.7k, False: 119k]
  ------------------
  499|  57.7k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  57.7k|#  define MINBPC(enc) 1
  ------------------
  500|  57.7k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  57.7k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|     10|      default:
  ------------------
  |  Branch (501:7): [True: 10, False: 177k]
  ------------------
  502|     10|        *nextTokPtr = ptr;
  503|     10|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  504|   177k|      }
  505|   177k|    }
  506|  57.8k|  }
  507|     14|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     14|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  57.8k|}
xmltok.c:normal_cdataSectionTok:
  356|   288k|                        const char **nextTokPtr) {
  357|   288k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 183, False: 287k]
  ------------------
  358|    183|    return XML_TOK_NONE;
  ------------------
  |  |   51|    183|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|   287k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|   287k|#  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|   287k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   287k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   287k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  369|  54.1k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 54.1k, False: 233k]
  ------------------
  370|  54.1k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  54.1k|#  define MINBPC(enc) 1
  ------------------
  371|  54.1k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  54.1k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  54.1k|    {                                                                          \
  |  |  |  |  135|  54.1k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  54.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  54.1k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 6, False: 54.1k]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|  54.1k|    }
  |  |  ------------------
  ------------------
  372|  54.1k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  300|  54.1k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (372:9): [True: 41.5k, False: 12.6k]
  ------------------
  373|  41.5k|      break;
  374|  12.6k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  12.6k|#  define MINBPC(enc) 1
  ------------------
  375|  12.6k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  12.6k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  12.6k|    {                                                                          \
  |  |  |  |  135|  12.6k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  12.6k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  12.6k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 12.6k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  12.6k|    }
  |  |  ------------------
  ------------------
  376|  12.6k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  12.6k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (376:9): [True: 11.2k, False: 1.33k]
  ------------------
  377|  11.2k|      ptr -= MINBPC(enc);
  ------------------
  |  |  242|  11.2k|#  define MINBPC(enc) 1
  ------------------
  378|  11.2k|      break;
  379|  11.2k|    }
  380|  1.33k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.33k|#  define MINBPC(enc) 1
  ------------------
  381|  1.33k|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|  1.33k|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  7.34k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 7.34k, False: 280k]
  ------------------
  383|  7.34k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  7.34k|#  define MINBPC(enc) 1
  ------------------
  384|  7.34k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  7.34k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  7.34k|    {                                                                          \
  |  |  |  |  135|  7.34k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  7.34k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  7.34k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 12, False: 7.33k]
  |  |  |  |  ------------------
  |  |  |  |  136|     12|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     12|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     12|      }                                                                        \
  |  |  |  |  138|  7.34k|    }
  |  |  ------------------
  ------------------
  385|  7.33k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  7.33k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  7.33k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 237, False: 7.09k]
  ------------------
  386|    237|      ptr += MINBPC(enc);
  ------------------
  |  |  242|    237|#  define MINBPC(enc) 1
  ------------------
  387|  7.33k|    *nextTokPtr = ptr;
  388|  7.33k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  7.33k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|   174k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 174k, False: 113k]
  ------------------
  390|   174k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   174k|#  define MINBPC(enc) 1
  ------------------
  391|   174k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   174k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|   174k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  12.4k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  12.4k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 12.4k, False: 275k]
  |  |  |  |  ------------------
  |  |  |  |   50|  12.4k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 12.4k]
  |  |  |  |  ------------------
  |  |  |  |   51|  12.4k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  12.4k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  12.4k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  12.4k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 12.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      5|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      5|    }                                                                          \
  |  |  |  |   56|  12.4k|    ptr += n;                                                                  \
  |  |  |  |   57|  12.4k|    break;
  |  |  ------------------
  |  |   61|  12.4k|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  3.18k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.19k, False: 284k]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.19k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 3.19k]
  |  |  |  |  ------------------
  |  |  |  |   51|  3.18k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  3.19k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.19k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.19k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 8, False: 3.18k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      8|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      8|    }                                                                          \
  |  |  |  |   56|  3.19k|    ptr += n;                                                                  \
  |  |  |  |   57|  3.18k|    break;
  |  |  ------------------
  |  |   62|  3.18k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|    770|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 775, False: 287k]
  |  |  |  |  ------------------
  |  |  |  |   50|    775|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 773]
  |  |  |  |  ------------------
  |  |  |  |   51|    770|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|    773|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    773|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    773|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 770]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      3|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      3|    }                                                                          \
  |  |  |  |   56|    773|    ptr += n;                                                                  \
  |  |  |  |   57|    770|    break;
  |  |  ------------------
  |  |   63|    770|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 22, False: 287k]
  |  |  ------------------
  |  |   64|     25|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 3, False: 287k]
  |  |  ------------------
  |  |   65|     28|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 3, False: 287k]
  |  |  ------------------
  |  |   66|     28|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     28|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     28|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  35.3k|  default:
  ------------------
  |  Branch (393:3): [True: 35.3k, False: 252k]
  ------------------
  394|  35.3k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  35.3k|#  define MINBPC(enc) 1
  ------------------
  395|  35.3k|    break;
  396|   287k|  }
  397|  12.5M|  while (HAS_CHAR(enc, ptr, end)) {
  398|  12.5M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  12.5M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  12.5M|  (((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|  11.0M|      LEAD_CASE(2)
  ------------------
  |  |  400|  11.0M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 11.0M, False: 1.51M]
  |  |  ------------------
  |  |  401|  11.0M|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  11.0M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  11.0M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 4, False: 11.0M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 1, False: 11.0M]
  |  |  ------------------
  |  |  402|      5|      *nextTokPtr = ptr;                                                       \
  |  |  403|      5|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      5|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      5|    }                                                                          \
  |  |  405|  11.0M|    ptr += n;                                                                  \
  |  |  406|  11.0M|    break;
  ------------------
  408|   843k|      LEAD_CASE(3)
  ------------------
  |  |  400|   843k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 843k, False: 11.6M]
  |  |  ------------------
  |  |  401|   843k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|   843k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|   843k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 6, False: 843k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 1, False: 843k]
  |  |  ------------------
  |  |  402|      7|      *nextTokPtr = ptr;                                                       \
  |  |  403|      7|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      7|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      7|    }                                                                          \
  |  |  405|   843k|    ptr += n;                                                                  \
  |  |  406|   843k|    break;
  ------------------
  409|  68.3k|      LEAD_CASE(4)
  ------------------
  |  |  400|  68.3k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 68.3k, False: 12.4M]
  |  |  ------------------
  |  |  401|  68.3k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  68.3k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  68.3k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 1, False: 68.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 1, False: 68.3k]
  |  |  ------------------
  |  |  402|      2|      *nextTokPtr = ptr;                                                       \
  |  |  403|      2|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      2|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      2|    }                                                                          \
  |  |  405|  68.3k|    ptr += n;                                                                  \
  |  |  406|  68.3k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|     18|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 18, False: 12.5M]
  ------------------
  412|     20|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 2, False: 12.5M]
  ------------------
  413|     22|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 2, False: 12.5M]
  ------------------
  414|    991|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 969, False: 12.5M]
  ------------------
  415|  69.7k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 68.7k, False: 12.4M]
  ------------------
  416|   104k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 34.5k, False: 12.4M]
  ------------------
  417|   104k|      *nextTokPtr = ptr;
  418|   104k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   104k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|   498k|    default:
  ------------------
  |  Branch (419:5): [True: 498k, False: 12.0M]
  ------------------
  420|   498k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   498k|#  define MINBPC(enc) 1
  ------------------
  421|   498k|      break;
  422|  12.5M|    }
  423|  12.5M|  }
  424|    156|  *nextTokPtr = ptr;
  425|    156|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    156|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|   104k|}
xmltok.c:normal_attributeValueTok:
 1262|  27.3M|                          const char **nextTokPtr) {
 1263|  27.3M|  const char *start;
 1264|  27.3M|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 3.20M, False: 24.1M]
  ------------------
 1265|  3.20M|    return XML_TOK_NONE;
  ------------------
  |  |   51|  3.20M|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|  24.1M|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  24.1M|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  24.1M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  24.1M|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 24.1M]
  ------------------
 1267|       |    /* This line cannot be executed.  The incoming data has already
 1268|       |     * been tokenized once, so incomplete characters like this have
 1269|       |     * already been eliminated from the input.  Retaining the paranoia
 1270|       |     * check is still valuable, however.
 1271|       |     */
 1272|      0|    return XML_TOK_PARTIAL; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1273|      0|  }
 1274|  24.1M|  start = ptr;
 1275|  1.58G|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  1.58G|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.58G|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.58G|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1277|      0|#  define LEAD_CASE(n)                                                         \
 1278|      0|  case BT_LEAD##n:                                                             \
 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1280|      0|    break;
 1281|  1.19G|      LEAD_CASE(2)
  ------------------
  |  | 1278|  1.19G|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 1.19G, False: 391M]
  |  |  ------------------
  |  | 1279|  1.19G|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  1.19G|    break;
  ------------------
 1282|  83.6M|      LEAD_CASE(3)
  ------------------
  |  | 1278|  83.6M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 83.6M, False: 1.50G]
  |  |  ------------------
  |  | 1279|  83.6M|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  83.6M|    break;
  ------------------
 1283|  64.7k|      LEAD_CASE(4)
  ------------------
  |  | 1278|  64.7k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 64.7k, False: 1.58G]
  |  |  ------------------
  |  | 1279|  64.7k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  64.7k|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|  4.74M|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 4.74M, False: 1.58G]
  ------------------
 1286|  4.74M|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 3.55M, False: 1.18M]
  ------------------
 1287|  3.55M|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  3.55M|#define PREFIX(ident) normal_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  3.55M|#  define MINBPC(enc) 1
  ------------------
 1288|  1.18M|      *nextTokPtr = ptr;
 1289|  1.18M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.18M|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|     13|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 13, False: 1.58G]
  ------------------
 1291|       |      /* this is for inside entity references */
 1292|     13|      *nextTokPtr = ptr;
 1293|     13|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
 1294|  12.2M|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 12.2M, False: 1.57G]
  ------------------
 1295|  12.2M|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 8.58M, False: 3.70M]
  ------------------
 1296|  8.58M|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  8.58M|#  define MINBPC(enc) 1
  ------------------
 1297|  8.58M|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  8.58M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|  8.58M|      }
 1299|  3.70M|      *nextTokPtr = ptr;
 1300|  3.70M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  3.70M|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|   553k|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 553k, False: 1.58G]
  ------------------
 1302|   553k|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 489k, False: 63.0k]
  ------------------
 1303|   489k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   489k|#  define MINBPC(enc) 1
  ------------------
 1304|   489k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   489k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   489k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   489k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 1.15k, False: 488k]
  ------------------
 1305|  1.15k|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|  1.15k|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|   488k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|   488k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   488k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 18.9k, False: 469k]
  ------------------
 1307|  18.9k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  18.9k|#  define MINBPC(enc) 1
  ------------------
 1308|   488k|        *nextTokPtr = ptr;
 1309|   488k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   488k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|   489k|      }
 1311|  63.0k|      *nextTokPtr = ptr;
 1312|  63.0k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  63.0k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  6.46M|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 6.46M, False: 1.57G]
  ------------------
 1314|  6.46M|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 3.26M, False: 3.20M]
  ------------------
 1315|  3.26M|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.26M|#  define MINBPC(enc) 1
  ------------------
 1316|  3.26M|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  3.26M|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  3.26M|      }
 1318|  3.20M|      *nextTokPtr = ptr;
 1319|  3.20M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  3.20M|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|   283M|    default:
  ------------------
  |  Branch (1320:5): [True: 283M, False: 1.30G]
  ------------------
 1321|   283M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   283M|#  define MINBPC(enc) 1
  ------------------
 1322|   283M|      break;
 1323|  1.58G|    }
 1324|  1.58G|  }
 1325|  86.8k|  *nextTokPtr = ptr;
 1326|  86.8k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  86.8k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|  24.1M|}
xmltok.c:normal_entityValueTok:
 1331|  1.96M|                       const char **nextTokPtr) {
 1332|  1.96M|  const char *start;
 1333|  1.96M|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 4.26k, False: 1.96M]
  ------------------
 1334|  4.26k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  4.26k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|  1.96M|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  1.96M|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.96M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.96M|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 1.96M]
  ------------------
 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.96M|  start = ptr;
 1344|  79.1M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  79.1M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  79.1M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  79.1M|  (((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|    238|      LEAD_CASE(2)
  ------------------
  |  | 1347|    238|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 238, False: 79.1M]
  |  |  ------------------
  |  | 1348|    238|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|    238|    break;
  ------------------
 1351|    441|      LEAD_CASE(3)
  ------------------
  |  | 1347|    441|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 441, False: 79.1M]
  |  |  ------------------
  |  | 1348|    441|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|    441|    break;
  ------------------
 1352|    820|      LEAD_CASE(4)
  ------------------
  |  | 1347|    820|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 820, False: 79.1M]
  |  |  ------------------
  |  | 1348|    820|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|    820|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  80.8k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 80.8k, False: 79.1M]
  ------------------
 1355|  80.8k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 69.1k, False: 11.6k]
  ------------------
 1356|  69.1k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  69.1k|#define PREFIX(ident) normal_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  69.1k|#  define MINBPC(enc) 1
  ------------------
 1357|  11.6k|      *nextTokPtr = ptr;
 1358|  11.6k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  11.6k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      4|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 4, False: 79.1M]
  ------------------
 1360|      4|      if (ptr == start) {
  ------------------
  |  Branch (1360:11): [True: 3, False: 1]
  ------------------
 1361|      3|        int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|      3|#define PREFIX(ident) normal_##ident
  ------------------
                      int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|      3|#  define MINBPC(enc) 1
  ------------------
 1362|      3|        return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   89|      3|#define XML_TOK_PERCENT 22
  ------------------
                      return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (1362:16): [True: 1, False: 2]
  ------------------
 1363|      3|      }
 1364|      1|      *nextTokPtr = ptr;
 1365|      1|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|      1|#define XML_TOK_DATA_CHARS 6
  ------------------
 1366|   446k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 446k, False: 78.7M]
  ------------------
 1367|   446k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 364k, False: 82.5k]
  ------------------
 1368|   364k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   364k|#  define MINBPC(enc) 1
  ------------------
 1369|   364k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   364k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|   364k|      }
 1371|  82.5k|      *nextTokPtr = ptr;
 1372|  82.5k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  82.5k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|  1.43M|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 1.43M, False: 77.7M]
  ------------------
 1374|  1.43M|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 750k, False: 681k]
  ------------------
 1375|   750k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   750k|#  define MINBPC(enc) 1
  ------------------
 1376|   750k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   750k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   750k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   750k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 546, False: 750k]
  ------------------
 1377|    546|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    546|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|   750k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|   750k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   750k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 951, False: 749k]
  ------------------
 1379|    951|          ptr += MINBPC(enc);
  ------------------
  |  |  242|    951|#  define MINBPC(enc) 1
  ------------------
 1380|   750k|        *nextTokPtr = ptr;
 1381|   750k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   750k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|   750k|      }
 1383|   681k|      *nextTokPtr = ptr;
 1384|   681k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   681k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  77.2M|    default:
  ------------------
  |  Branch (1385:5): [True: 77.2M, False: 1.96M]
  ------------------
 1386|  77.2M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  77.2M|#  define MINBPC(enc) 1
  ------------------
 1387|  77.2M|      break;
 1388|  79.1M|    }
 1389|  79.1M|  }
 1390|  1.91k|  *nextTokPtr = ptr;
 1391|  1.91k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.91k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|  1.96M|}
xmltok.c:normal_nameMatchesAscii:
 1715|   133k|                         const char *end1, const char *ptr2) {
 1716|   133k|  UNUSED_P(enc);
  ------------------
  |  |  135|   133k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|   691k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  242|   557k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1717:10): [True: 607k, False: 83.5k]
  ------------------
 1718|   607k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  242|   607k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1718:9): [True: 36, False: 607k]
  ------------------
 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|     36|      return 0; /* LCOV_EXCL_LINE */
 1725|     36|    }
 1726|   607k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  300|   607k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (1726:9): [True: 49.6k, False: 557k]
  ------------------
 1727|  49.6k|      return 0;
 1728|   607k|  }
 1729|  83.5k|  return ptr1 == end1;
 1730|   133k|}
xmltok.c:normal_nameLength:
 1733|  4.05M|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  4.05M|  const char *start = ptr;
 1735|  12.1M|  for (;;) {
 1736|  12.1M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  12.1M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  12.1M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1737|      0|#  define LEAD_CASE(n)                                                         \
 1738|      0|  case BT_LEAD##n:                                                             \
 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1740|      0|    break;
 1741|  1.86M|      LEAD_CASE(2)
  ------------------
  |  | 1738|  1.86M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 1.86M, False: 10.2M]
  |  |  ------------------
  |  | 1739|  1.86M|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|  1.86M|    break;
  ------------------
 1742|  2.90k|      LEAD_CASE(3)
  ------------------
  |  | 1738|  2.90k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 2.90k, False: 12.1M]
  |  |  ------------------
  |  | 1739|  2.90k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|  2.90k|    break;
  ------------------
 1743|      0|      LEAD_CASE(4)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 12.1M]
  |  |  ------------------
  |  | 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: 12.1M]
  ------------------
 1746|  3.55M|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 3.55M, False: 8.58M]
  ------------------
 1747|  3.55M|#  ifdef XML_NS
 1748|  3.55M|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 12.1M]
  ------------------
 1749|  3.55M|#  endif
 1750|  6.19M|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 2.64M, False: 9.49M]
  ------------------
 1751|  6.20M|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 10.7k, False: 12.1M]
  ------------------
 1752|  6.21M|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 1.03k, False: 12.1M]
  ------------------
 1753|  6.21M|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 3.26k, False: 12.1M]
  ------------------
 1754|  6.21M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  6.21M|#  define MINBPC(enc) 1
  ------------------
 1755|  6.21M|      break;
 1756|  4.05M|    default:
  ------------------
  |  Branch (1756:5): [True: 4.05M, False: 8.07M]
  ------------------
 1757|  4.05M|      return (int)(ptr - start);
 1758|  12.1M|    }
 1759|  12.1M|  }
 1760|  4.05M|}
xmltok.c:normal_getAtts:
 1510|  3.91M|                ATTRIBUTE *atts) {
 1511|  3.91M|  enum { other, inName, inValue } state = inName;
 1512|  3.91M|  int nAtts = 0;
 1513|  3.91M|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  44.5M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  3.91M|#  define MINBPC(enc) 1
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  40.6M|#  define MINBPC(enc) 1
  ------------------
 1517|  44.5M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  44.5M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  44.5M|  (((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|  7.40M|      LEAD_CASE(2)
  ------------------
  |  | 1527|  7.40M|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 7.40M, False: 37.1M]
  |  |  ------------------
  |  | 1528|  7.40M|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  7.40M|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 341k, False: 7.06M]
  |  |  |  |  ------------------
  |  |  |  | 1520|   341k|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 173k, False: 167k]
  |  |  |  |  ------------------
  |  |  |  | 1521|   173k|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|   173k|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|   173k|      }                                                                        \
  |  |  |  | 1524|   341k|      state = inName;                                                          \
  |  |  |  | 1525|   341k|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  242|  7.40M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|  7.40M|    break;
  ------------------
 1531|  69.4k|      LEAD_CASE(3)
  ------------------
  |  | 1527|  69.4k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 69.4k, False: 44.4M]
  |  |  ------------------
  |  | 1528|  69.4k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  69.4k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 22.8k, False: 46.5k]
  |  |  |  |  ------------------
  |  |  |  | 1520|  22.8k|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 11.8k, False: 11.0k]
  |  |  |  |  ------------------
  |  |  |  | 1521|  11.8k|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|  11.8k|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|  11.8k|      }                                                                        \
  |  |  |  | 1524|  22.8k|      state = inName;                                                          \
  |  |  |  | 1525|  22.8k|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  242|  69.4k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|  69.4k|    break;
  ------------------
 1532|  2.16k|      LEAD_CASE(4)
  ------------------
  |  | 1527|  2.16k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 2.16k, False: 44.5M]
  |  |  ------------------
  |  | 1528|  2.16k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  2.16k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 2.16k]
  |  |  |  |  ------------------
  |  |  |  | 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|  2.16k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|  2.16k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|      0|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 0, False: 44.5M]
  ------------------
 1535|  17.9M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 17.9M, False: 26.5M]
  ------------------
 1536|  21.1M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 3.21M, False: 41.3M]
  ------------------
 1537|  21.1M|      START_NAME
  ------------------
  |  | 1519|  21.1M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 1.65M, False: 19.5M]
  |  |  ------------------
  |  | 1520|  1.65M|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 858k, False: 793k]
  |  |  ------------------
  |  | 1521|   858k|        atts[nAtts].name = ptr;                                                \
  |  | 1522|   858k|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|   858k|      }                                                                        \
  |  | 1524|  1.65M|      state = inName;                                                          \
  |  | 1525|  1.65M|    }
  ------------------
 1538|  21.1M|      break;
 1539|      0|#  undef START_NAME
 1540|   859k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 859k, False: 43.6M]
  ------------------
 1541|   859k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 429k, False: 430k]
  ------------------
 1542|   429k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 248k, False: 180k]
  ------------------
 1543|   248k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   248k|#  define MINBPC(enc) 1
  ------------------
 1544|   429k|        state = inValue;
 1545|   429k|        open = BT_QUOT;
 1546|   430k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 429k, False: 888]
  ------------------
 1547|   429k|        state = other;
 1548|   429k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 248k, False: 180k]
  ------------------
 1549|   248k|          atts[nAtts].valueEnd = ptr;
 1550|   429k|        nAtts++;
 1551|   429k|      }
 1552|   859k|      break;
 1553|  3.18M|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 3.18M, False: 41.3M]
  ------------------
 1554|  3.18M|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 1.58M, False: 1.60M]
  ------------------
 1555|  1.58M|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 795k, False: 791k]
  ------------------
 1556|   795k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   795k|#  define MINBPC(enc) 1
  ------------------
 1557|  1.58M|        state = inValue;
 1558|  1.58M|        open = BT_APOS;
 1559|  1.60M|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 1.58M, False: 16.2k]
  ------------------
 1560|  1.58M|        state = other;
 1561|  1.58M|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 795k, False: 791k]
  ------------------
 1562|   795k|          atts[nAtts].valueEnd = ptr;
 1563|  1.58M|        nAtts++;
 1564|  1.58M|      }
 1565|  3.18M|      break;
 1566|  47.5k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 47.5k, False: 44.5M]
  ------------------
 1567|  47.5k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 44.9k, False: 2.62k]
  ------------------
 1568|  44.9k|        atts[nAtts].normalized = 0;
 1569|  47.5k|      break;
 1570|  1.38M|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 1.38M, False: 43.1M]
  ------------------
 1571|  1.38M|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 38.8k, False: 1.34M]
  ------------------
 1572|  38.8k|        state = other;
 1573|  1.34M|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 140k, False: 1.20M]
  |  Branch (1573:36): [True: 93.8k, False: 46.4k]
  |  Branch (1573:55): [True: 48.8k, False: 44.9k]
  ------------------
 1574|  1.34M|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 38.5k, False: 10.2k]
  ------------------
 1575|  48.8k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  266|  10.2k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|  59.1k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 9.14k, False: 1.12k]
  ------------------
 1576|  48.8k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  266|  1.12k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|  49.9k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 278, False: 845]
  ------------------
 1577|  48.8k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  255|    845|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|    845|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 298, False: 547]
  ------------------
 1578|  48.3k|        atts[nAtts].normalized = 0;
 1579|  1.38M|      break;
 1580|  1.28M|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 1.28M, False: 43.2M]
  ------------------
 1581|  2.58M|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 1.30M, False: 43.2M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|  2.58M|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 223k, False: 2.36M]
  ------------------
 1585|   223k|        state = other;
 1586|  2.36M|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 1.22M, False: 1.14M]
  |  Branch (1586:36): [True: 1.18M, False: 37.3k]
  ------------------
 1587|  1.18M|        atts[nAtts].normalized = 0;
 1588|  2.58M|      break;
 1589|  3.98M|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 3.98M, False: 40.5M]
  ------------------
 1590|  4.05M|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 72.5k, False: 44.4M]
  ------------------
 1591|  4.05M|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 3.91M, False: 134k]
  ------------------
 1592|  3.91M|        return nAtts;
 1593|   134k|      break;
 1594|  3.77M|    default:
  ------------------
  |  Branch (1594:5): [True: 3.77M, False: 40.7M]
  ------------------
 1595|  3.77M|      break;
 1596|  44.5M|    }
 1597|  44.5M|  }
 1598|       |  /* not reached */
 1599|  3.91M|}
xmltok.c:normal_charRefNumber:
 1602|  56.5k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  56.5k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  56.5k|  UNUSED_P(enc);
  ------------------
  |  |  135|  56.5k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  56.5k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  242|  56.5k|#  define MINBPC(enc) 1
  ------------------
 1607|  56.5k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  300|  56.5k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 55.4k, False: 1.11k]
  |  |  ------------------
  ------------------
 1608|   228k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  242|  55.4k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  300|   228k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (1608:30): [True: 173k, False: 55.3k]
  ------------------
 1609|   173k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  242|   173k|#  define MINBPC(enc) 1
  ------------------
 1610|   173k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  266|   173k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1611|   173k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 173k]
  ------------------
 1612|  17.3k|      case ASCII_0:
  ------------------
  |  |   90|  17.3k|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 17.3k, False: 156k]
  ------------------
 1613|  33.1k|      case ASCII_1:
  ------------------
  |  |   91|  33.1k|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 15.8k, False: 157k]
  ------------------
 1614|  36.5k|      case ASCII_2:
  ------------------
  |  |   92|  36.5k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 3.38k, False: 170k]
  ------------------
 1615|  72.9k|      case ASCII_3:
  ------------------
  |  |   93|  72.9k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 36.4k, False: 137k]
  ------------------
 1616|  89.7k|      case ASCII_4:
  ------------------
  |  |   94|  89.7k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 16.8k, False: 156k]
  ------------------
 1617|  92.2k|      case ASCII_5:
  ------------------
  |  |   95|  92.2k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 2.48k, False: 171k]
  ------------------
 1618|   106k|      case ASCII_6:
  ------------------
  |  |   96|   106k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 14.5k, False: 158k]
  ------------------
 1619|   124k|      case ASCII_7:
  ------------------
  |  |   97|   124k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 18.0k, False: 155k]
  ------------------
 1620|   130k|      case ASCII_8:
  ------------------
  |  |   98|   130k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 5.41k, False: 168k]
  ------------------
 1621|   153k|      case ASCII_9:
  ------------------
  |  |   99|   153k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 23.1k, False: 150k]
  ------------------
 1622|   153k|        result <<= 4;
 1623|   153k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|   153k|#define ASCII_0 0x30
  ------------------
 1624|   153k|        break;
 1625|  2.81k|      case ASCII_A:
  ------------------
  |  |   36|  2.81k|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 2.81k, False: 170k]
  ------------------
 1626|  3.14k|      case ASCII_B:
  ------------------
  |  |   37|  3.14k|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 321, False: 173k]
  ------------------
 1627|  3.84k|      case ASCII_C:
  ------------------
  |  |   38|  3.84k|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 707, False: 172k]
  ------------------
 1628|  4.44k|      case ASCII_D:
  ------------------
  |  |   39|  4.44k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 599, False: 172k]
  ------------------
 1629|  4.83k|      case ASCII_E:
  ------------------
  |  |   40|  4.83k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 390, False: 173k]
  ------------------
 1630|  7.32k|      case ASCII_F:
  ------------------
  |  |   41|  7.32k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 2.48k, False: 170k]
  ------------------
 1631|  7.32k|        result <<= 4;
 1632|  7.32k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  7.32k|#define ASCII_A 0x41
  ------------------
 1633|  7.32k|        break;
 1634|  4.45k|      case ASCII_a:
  ------------------
  |  |   63|  4.45k|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 4.45k, False: 169k]
  ------------------
 1635|  4.67k|      case ASCII_b:
  ------------------
  |  |   64|  4.67k|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 217, False: 173k]
  ------------------
 1636|  7.02k|      case ASCII_c:
  ------------------
  |  |   65|  7.02k|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 2.35k, False: 171k]
  ------------------
 1637|  8.80k|      case ASCII_d:
  ------------------
  |  |   66|  8.80k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 1.77k, False: 171k]
  ------------------
 1638|  9.89k|      case ASCII_e:
  ------------------
  |  |   67|  9.89k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 1.09k, False: 172k]
  ------------------
 1639|  12.7k|      case ASCII_f:
  ------------------
  |  |   68|  12.7k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 2.81k, False: 170k]
  ------------------
 1640|  12.7k|        result <<= 4;
 1641|  12.7k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  12.7k|#define ASCII_a 0x61
  ------------------
 1642|  12.7k|        break;
 1643|   173k|      }
 1644|   173k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 29, False: 173k]
  ------------------
 1645|     29|        return -1;
 1646|   173k|    }
 1647|  55.4k|  } else {
 1648|  4.23k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  300|  4.23k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  3.11k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1648:12): [True: 3.12k, False: 1.10k]
  ------------------
 1649|  3.12k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  266|  3.12k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1650|  3.12k|      result *= 10;
 1651|  3.12k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  3.12k|#define ASCII_0 0x30
  ------------------
 1652|  3.12k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 10, False: 3.11k]
  ------------------
 1653|     10|        return -1;
 1654|  3.12k|    }
 1655|  1.11k|  }
 1656|  56.4k|  return checkCharRefNumber(result);
 1657|  56.5k|}
xmltok.c:normal_predefinedEntityName:
 1661|  4.27M|                             const char *end) {
 1662|  4.27M|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.27M|#  define UNUSED_P(p) (void)p
  ------------------
 1663|  4.27M|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  242|  4.27M|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1663:11): [True: 3.90M, False: 371k]
  ------------------
 1664|   332k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 332k, False: 3.94M]
  ------------------
 1665|   332k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  300|   332k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 259k, False: 72.7k]
  |  |  ------------------
  ------------------
 1666|   259k|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|   259k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  |  |  ------------------
  |  |  |  Branch (266:33): [True: 0, False: 259k]
  |  |  ------------------
  ------------------
 1667|   259k|      case ASCII_l:
  ------------------
  |  |   74|   259k|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 259k, False: 354]
  ------------------
 1668|   259k|        return ASCII_LT;
  ------------------
  |  |  111|   259k|#define ASCII_LT 0x3C
  ------------------
 1669|    354|      case ASCII_g:
  ------------------
  |  |   69|    354|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 354, False: 259k]
  ------------------
 1670|    354|        return ASCII_GT;
  ------------------
  |  |  113|    354|#define ASCII_GT 0x3E
  ------------------
 1671|   259k|      }
 1672|   259k|    }
 1673|  72.7k|    break;
 1674|  72.7k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 3.71k, False: 4.27M]
  ------------------
 1675|  3.71k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  300|  3.71k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1.09k, False: 2.62k]
  |  |  ------------------
  ------------------
 1676|  1.09k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.09k|#  define MINBPC(enc) 1
  ------------------
 1677|  1.09k|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  300|  1.09k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 812, False: 284]
  |  |  ------------------
  ------------------
 1678|    812|        ptr += MINBPC(enc);
  ------------------
  |  |  242|    812|#  define MINBPC(enc) 1
  ------------------
 1679|    812|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  300|    812|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 607, False: 205]
  |  |  ------------------
  ------------------
 1680|    607|          return ASCII_AMP;
  ------------------
  |  |  105|    607|#define ASCII_AMP 0x26
  ------------------
 1681|    812|      }
 1682|  1.09k|    }
 1683|  3.11k|    break;
 1684|  35.3k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 35.3k, False: 4.24M]
  ------------------
 1685|  35.3k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  35.3k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  |  |  ------------------
  |  |  |  Branch (266:33): [True: 788, False: 34.5k]
  |  |  ------------------
  ------------------
 1686|  33.6k|    case ASCII_q:
  ------------------
  |  |   79|  33.6k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 33.6k, False: 1.72k]
  ------------------
 1687|  33.6k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  33.6k|#  define MINBPC(enc) 1
  ------------------
 1688|  33.6k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  300|  33.6k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 913, False: 32.6k]
  |  |  ------------------
  ------------------
 1689|    913|        ptr += MINBPC(enc);
  ------------------
  |  |  242|    913|#  define MINBPC(enc) 1
  ------------------
 1690|    913|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  300|    913|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 437, False: 476]
  |  |  ------------------
  ------------------
 1691|    437|          ptr += MINBPC(enc);
  ------------------
  |  |  242|    437|#  define MINBPC(enc) 1
  ------------------
 1692|    437|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  300|    437|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 197, False: 240]
  |  |  ------------------
  ------------------
 1693|    197|            return ASCII_QUOT;
  ------------------
  |  |  104|    197|#define ASCII_QUOT 0x22
  ------------------
 1694|    437|        }
 1695|    913|      }
 1696|  33.4k|      break;
 1697|  33.4k|    case ASCII_a:
  ------------------
  |  |   63|    934|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 934, False: 34.3k]
  ------------------
 1698|    934|      ptr += MINBPC(enc);
  ------------------
  |  |  242|    934|#  define MINBPC(enc) 1
  ------------------
 1699|    934|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  300|    934|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 714, False: 220]
  |  |  ------------------
  ------------------
 1700|    714|        ptr += MINBPC(enc);
  ------------------
  |  |  242|    714|#  define MINBPC(enc) 1
  ------------------
 1701|    714|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  300|    714|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 506, False: 208]
  |  |  ------------------
  ------------------
 1702|    506|          ptr += MINBPC(enc);
  ------------------
  |  |  242|    506|#  define MINBPC(enc) 1
  ------------------
 1703|    506|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  300|    506|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 303, False: 203]
  |  |  ------------------
  ------------------
 1704|    303|            return ASCII_APOS;
  ------------------
  |  |  106|    303|#define ASCII_APOS 0x27
  ------------------
 1705|    506|        }
 1706|    714|      }
 1707|    631|      break;
 1708|  35.3k|    }
 1709|  4.27M|  }
 1710|  4.01M|  return 0;
 1711|  4.27M|}
xmltok.c:normal_updatePosition:
 1779|  4.68k|                       POSITION *pos) {
 1780|  8.98M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  8.98M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  8.98M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  8.98M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1782|      0|#  define LEAD_CASE(n)                                                         \
 1783|      0|  case BT_LEAD##n:                                                             \
 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1785|      0|    pos->columnNumber++;                                                       \
 1786|      0|    break;
 1787|  1.41k|      LEAD_CASE(2)
  ------------------
  |  | 1783|  1.41k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 1.41k, False: 8.98M]
  |  |  ------------------
  |  | 1784|  1.41k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  1.41k|    pos->columnNumber++;                                                       \
  |  | 1786|  1.41k|    break;
  ------------------
 1788|  1.91k|      LEAD_CASE(3)
  ------------------
  |  | 1783|  1.91k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 1.91k, False: 8.98M]
  |  |  ------------------
  |  | 1784|  1.91k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  1.91k|    pos->columnNumber++;                                                       \
  |  | 1786|  1.91k|    break;
  ------------------
 1789|    547|      LEAD_CASE(4)
  ------------------
  |  | 1783|    547|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 547, False: 8.98M]
  |  |  ------------------
  |  | 1784|    547|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|    547|    pos->columnNumber++;                                                       \
  |  | 1786|    547|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|  1.12M|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 1.12M, False: 7.86M]
  ------------------
 1792|  1.12M|      pos->columnNumber = 0;
 1793|  1.12M|      pos->lineNumber++;
 1794|  1.12M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.12M|#  define MINBPC(enc) 1
  ------------------
 1795|  1.12M|      break;
 1796|  28.6k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 28.6k, False: 8.96M]
  ------------------
 1797|  28.6k|      pos->lineNumber++;
 1798|  28.6k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  28.6k|#  define MINBPC(enc) 1
  ------------------
 1799|  28.6k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|  28.6k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  57.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  28.6k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 28.6k, False: 50]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  28.6k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  28.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 941, False: 27.6k]
  ------------------
 1800|    941|        ptr += MINBPC(enc);
  ------------------
  |  |  242|    941|#  define MINBPC(enc) 1
  ------------------
 1801|  28.6k|      pos->columnNumber = 0;
 1802|  28.6k|      break;
 1803|  7.82M|    default:
  ------------------
  |  Branch (1803:5): [True: 7.82M, False: 1.16M]
  ------------------
 1804|  7.82M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  7.82M|#  define MINBPC(enc) 1
  ------------------
 1805|  7.82M|      pos->columnNumber++;
 1806|  7.82M|      break;
 1807|  8.98M|    }
 1808|  8.98M|  }
 1809|  4.68k|}
xmltok.c:normal_isPublicId:
 1450|  3.19k|                   const char **badPtr) {
 1451|  3.19k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.19k|#  define MINBPC(enc) 1
  ------------------
 1452|  3.19k|  end -= MINBPC(enc);
  ------------------
  |  |  242|  3.19k|#  define MINBPC(enc) 1
  ------------------
 1453|  11.3k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  11.3k|#  define MINBPC(enc) 1
  ------------------
 1454|  11.3k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  11.3k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  11.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1455|    335|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 335, False: 11.0k]
  ------------------
 1456|    638|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 303, False: 11.0k]
  ------------------
 1457|    838|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 200, False: 11.1k]
  ------------------
 1458|  1.35k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 512, False: 10.8k]
  ------------------
 1459|  1.67k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 326, False: 11.0k]
  ------------------
 1460|  1.89k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 223, False: 11.1k]
  ------------------
 1461|  2.09k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 195, False: 11.1k]
  ------------------
 1462|  2.44k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 349, False: 11.0k]
  ------------------
 1463|  2.65k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 210, False: 11.1k]
  ------------------
 1464|  2.85k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 202, False: 11.1k]
  ------------------
 1465|  3.08k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 226, False: 11.1k]
  ------------------
 1466|  3.31k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 236, False: 11.1k]
  ------------------
 1467|  5.43k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 2.11k, False: 9.24k]
  ------------------
 1468|  8.19k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 2.76k, False: 8.59k]
  ------------------
 1469|  8.84k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 649, False: 10.7k]
  ------------------
 1470|  9.04k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 199, False: 11.1k]
  ------------------
 1471|  9.24k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 202, False: 11.1k]
  ------------------
 1472|  9.46k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 222, False: 11.1k]
  ------------------
 1473|  9.46k|#  ifdef XML_NS
 1474|  9.46k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 11.3k]
  ------------------
 1475|  9.46k|#  endif
 1476|  9.46k|      break;
 1477|    634|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 634, False: 10.7k]
  ------------------
 1478|    634|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  300|    634|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1, False: 633]
  |  |  ------------------
  ------------------
 1479|      1|        *badPtr = ptr;
 1480|      1|        return 0;
 1481|      1|      }
 1482|    633|      break;
 1483|    633|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 210, False: 11.1k]
  ------------------
 1484|    701|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 491, False: 10.8k]
  ------------------
 1485|    701|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  266|    701|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  |  Branch (1485:11): [True: 697, False: 4]
  ------------------
 1486|    697|        break;
 1487|       |      /* fall through */
 1488|    562|    default:
  ------------------
  |  Branch (1488:5): [True: 558, False: 10.8k]
  ------------------
 1489|    562|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|    562|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1490|    249|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 249, False: 313]
  ------------------
 1491|    548|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 299, False: 263]
  ------------------
 1492|    548|        break;
 1493|     14|      default:
  ------------------
  |  Branch (1493:7): [True: 14, False: 548]
  ------------------
 1494|     14|        *badPtr = ptr;
 1495|     14|        return 0;
 1496|    562|      }
 1497|    548|      break;
 1498|  11.3k|    }
 1499|  11.3k|  }
 1500|  3.18k|  return 1;
 1501|  3.19k|}
xmltok.c:little2_prologTok:
 1018|  88.5k|                  const char **nextTokPtr) {
 1019|  88.5k|  int tok;
 1020|  88.5k|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 257, False: 88.2k]
  ------------------
 1021|    257|    return XML_TOK_NONE;
  ------------------
  |  |   51|    257|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  88.2k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  88.2k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|  88.2k|    size_t n = end - ptr;
 1024|  88.2k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  88.2k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1024:9): [True: 30.0k, False: 58.2k]
  ------------------
 1025|  30.0k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  30.0k|#  define MINBPC(enc) 2
  ------------------
 1026|  30.0k|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 18, False: 29.9k]
  ------------------
 1027|     18|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     18|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|  29.9k|      end = ptr + n;
 1029|  29.9k|    }
 1030|  88.2k|  }
 1031|  88.2k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  88.2k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  88.2k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  82.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 82.4k, False: 5.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1032|  1.10k|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 1.10k, False: 87.1k]
  ------------------
 1033|  1.10k|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.10k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.10k|#  define MINBPC(enc) 2
  ------------------
 1034|  5.65k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 5.65k, False: 82.5k]
  ------------------
 1035|  5.65k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  5.65k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  5.65k|#  define MINBPC(enc) 2
  ------------------
 1036|  10.3k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 10.3k, False: 77.8k]
  ------------------
 1037|  10.3k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  10.3k|#  define MINBPC(enc) 2
  ------------------
 1038|  10.3k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  10.3k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  10.3k|    {                                                                          \
  |  |  |  |  135|  10.3k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  10.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  10.3k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 9, False: 10.3k]
  |  |  |  |  ------------------
  |  |  |  |  136|      9|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      9|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      9|      }                                                                        \
  |  |  |  |  138|  10.3k|    }
  |  |  ------------------
  ------------------
 1039|  10.3k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  10.3k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  10.3k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  8.94k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 7, False: 10.3k]
  |  |  |  |  |  Branch (737:4): [True: 8.94k, False: 1.42k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  5.29k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 5.29k, False: 5.07k]
  ------------------
 1041|  5.29k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  5.29k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  5.29k|#  define MINBPC(enc) 2
  ------------------
 1042|  1.80k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 1.80k, False: 8.56k]
  ------------------
 1043|  1.80k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.80k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.80k|#  define MINBPC(enc) 2
  ------------------
 1044|  1.17k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 1.17k, False: 9.19k]
  ------------------
 1045|  1.83k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 662, False: 9.71k]
  ------------------
 1046|  3.24k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 1.40k, False: 8.97k]
  ------------------
 1047|  3.24k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 0, False: 10.3k]
  ------------------
 1048|  3.24k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 0, False: 10.3k]
  ------------------
 1049|  3.26k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 21, False: 10.3k]
  ------------------
 1050|  3.26k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  783|  3.26k|#  define MINBPC(enc) 2
  ------------------
 1051|  3.26k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  3.26k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  10.3k|    }
 1053|      7|    *nextTokPtr = ptr;
 1054|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
 1055|  10.3k|  }
 1056|  5.43k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 5.43k, False: 82.8k]
  ------------------
 1057|  5.43k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  783|  5.43k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1057:9): [True: 49, False: 5.38k]
  ------------------
 1058|     49|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|     49|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|     49|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|     49|    }
 1062|       |    /* fall through */
 1063|  20.1k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 14.7k, False: 73.5k]
  ------------------
 1064|  27.8k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 7.69k, False: 80.5k]
  ------------------
 1065|  33.7k|    for (;;) {
 1066|  33.7k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  33.7k|#  define MINBPC(enc) 2
  ------------------
 1067|  33.7k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  33.7k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  33.7k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  33.7k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 138, False: 33.6k]
  ------------------
 1068|    138|        break;
 1069|  33.6k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  33.6k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  33.6k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  28.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 28.7k, False: 4.88k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1070|  4.03k|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 4.03k, False: 29.6k]
  ------------------
 1071|  5.12k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 1.09k, False: 32.5k]
  ------------------
 1072|  5.12k|        break;
 1073|    853|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 853, False: 32.7k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|    853|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  783|    853|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1075:13): [True: 849, False: 4]
  ------------------
 1076|    849|          break;
 1077|       |        /* fall through */
 1078|  27.6k|      default:
  ------------------
  |  Branch (1078:7): [True: 27.6k, False: 5.98k]
  ------------------
 1079|  27.6k|        *nextTokPtr = ptr;
 1080|  27.6k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|  27.6k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|  33.6k|      }
 1082|  33.6k|    }
 1083|    138|    *nextTokPtr = ptr;
 1084|    138|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    138|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  2.70k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 2.70k, False: 85.5k]
  ------------------
 1086|  2.70k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.70k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.70k|#  define MINBPC(enc) 2
  ------------------
 1087|  2.47k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 2.47k, False: 85.7k]
  ------------------
 1088|  2.47k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.47k|#  define MINBPC(enc) 2
  ------------------
 1089|  2.47k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  2.47k|#define XML_TOK_COMMA 38
  ------------------
 1090|    817|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 817, False: 87.4k]
  ------------------
 1091|    817|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    817|#  define MINBPC(enc) 2
  ------------------
 1092|    817|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|    817|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|    315|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 315, False: 87.9k]
  ------------------
 1094|    315|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    315|#  define MINBPC(enc) 2
  ------------------
 1095|    315|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    315|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    315|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    315|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 2, False: 313]
  ------------------
 1096|      2|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      2|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|    313|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  787|    313|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    313|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 301, False: 12]
  |  |  |  |  |  Branch (739:52): [True: 39, False: 262]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1098|     39|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     39|    {                                                                          \
  |  |  135|     39|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     39|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|     39|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 38]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     39|    }
  ------------------
 1099|     38|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  787|     38|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|     38|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 22, False: 16]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 21]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1100|      1|        *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  783|      1|#  define MINBPC(enc) 2
  ------------------
 1101|      1|        return XML_TOK_COND_SECT_CLOSE;
  ------------------
  |  |  103|      1|#define XML_TOK_COND_SECT_CLOSE 34      /* ]]> */
  ------------------
 1102|      1|      }
 1103|     38|    }
 1104|    311|    *nextTokPtr = ptr;
 1105|    311|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|    311|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  4.61k|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 4.61k, False: 83.6k]
  ------------------
 1107|  4.61k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  4.61k|#  define MINBPC(enc) 2
  ------------------
 1108|  4.61k|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  4.61k|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|  3.98k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 3.98k, False: 84.2k]
  ------------------
 1110|  3.98k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.98k|#  define MINBPC(enc) 2
  ------------------
 1111|  3.98k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  3.98k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  3.98k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  3.98k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 6, False: 3.97k]
  ------------------
 1112|      6|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|      6|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|  3.97k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  3.97k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  3.97k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.94k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 39, False: 3.93k]
  |  |  |  |  |  Branch (737:4): [True: 3.94k, False: 34]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|    451|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 451, False: 3.52k]
  ------------------
 1115|    451|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    451|#  define MINBPC(enc) 2
  ------------------
 1116|    451|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|    451|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|     72|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 72, False: 3.90k]
  ------------------
 1118|     72|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|     72|#  define MINBPC(enc) 2
  ------------------
 1119|     72|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|     72|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|    206|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 206, False: 3.77k]
  ------------------
 1121|    206|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    206|#  define MINBPC(enc) 2
  ------------------
 1122|    206|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|    206|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|    148|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 148, False: 3.82k]
  ------------------
 1124|    274|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 126, False: 3.85k]
  ------------------
 1125|  1.10k|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 830, False: 3.14k]
  ------------------
 1126|  1.61k|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 508, False: 3.46k]
  ------------------
 1127|  2.36k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 749, False: 3.22k]
  ------------------
 1128|  2.59k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 229, False: 3.74k]
  ------------------
 1129|  3.20k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 619, False: 3.35k]
  ------------------
 1130|  3.20k|      *nextTokPtr = ptr;
 1131|  3.20k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  3.20k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|  3.97k|    }
 1133|     39|    *nextTokPtr = ptr;
 1134|     39|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     39|#define XML_TOK_INVALID 0
  ------------------
 1135|  2.12k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 2.12k, False: 86.1k]
  ------------------
 1136|  2.12k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.12k|#  define MINBPC(enc) 2
  ------------------
 1137|  2.12k|    return XML_TOK_OR;
  ------------------
  |  |   88|  2.12k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  3.56k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 3.56k, False: 84.6k]
  ------------------
 1139|  3.56k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  3.56k|#  define MINBPC(enc) 2
  ------------------
 1140|  3.56k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  3.56k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  2.52k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 2.52k, False: 85.7k]
  ------------------
 1142|  2.52k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.52k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.52k|#  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: 88.2k]
  |  |  ------------------
  |  | 1145|      0|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 0, False: 0]
  |  |  ------------------
  |  | 1146|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      0|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      0|    }                                                                          \
  |  | 1151|      0|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (790:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|      0|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (788:35): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|      0|    *nextTokPtr = ptr;                                                         \
  |  | 1162|      0|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1164|      0|    LEAD_CASE(3)
  ------------------
  |  | 1144|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 0, False: 88.2k]
  |  |  ------------------
  |  | 1145|      0|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 0, False: 0]
  |  |  ------------------
  |  | 1146|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      0|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      0|    }                                                                          \
  |  | 1151|      0|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (790:37): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|      0|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (788:35): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|      0|    *nextTokPtr = ptr;                                                         \
  |  | 1162|      0|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1165|     87|    LEAD_CASE(4)
  ------------------
  |  | 1144|     20|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 27, False: 88.2k]
  |  |  ------------------
  |  | 1145|     27|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 7, False: 20]
  |  |  ------------------
  |  | 1146|     20|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      7|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     20|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|     20|#    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|     20|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  790|     20|#  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|     20|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  788|     20|#  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|     20|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     20|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|  7.95k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 7.95k, False: 80.2k]
  ------------------
 1168|  13.5k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 5.54k, False: 82.7k]
  ------------------
 1169|  13.5k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|  13.5k|#define XML_TOK_NAME 18
  ------------------
 1170|  13.5k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  13.5k|#  define MINBPC(enc) 2
  ------------------
 1171|  13.5k|    break;
 1172|    274|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 274, False: 87.9k]
  ------------------
 1173|    556|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 282, False: 87.9k]
  ------------------
 1174|    821|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 265, False: 87.9k]
  ------------------
 1175|    821|#  ifdef XML_NS
 1176|    821|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 88.2k]
  ------------------
 1177|    821|#  endif
 1178|    821|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    821|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|    821|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    821|#  define MINBPC(enc) 2
  ------------------
 1180|    821|    break;
 1181|  5.76k|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 5.76k, False: 82.4k]
  ------------------
 1182|  5.76k|    if (IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  791|  5.76k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  743|  5.76k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  5.76k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 5.31k, False: 450]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1183|  5.31k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  5.31k|#  define MINBPC(enc) 2
  ------------------
 1184|  5.31k|      tok = XML_TOK_NAME;
  ------------------
  |  |   85|  5.31k|#define XML_TOK_NAME 18
  ------------------
 1185|  5.31k|      break;
 1186|  5.31k|    }
 1187|    450|    if (IS_NAME_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  789|    450|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  741|    450|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|    450|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 411, False: 39]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1188|    411|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    411|#  define MINBPC(enc) 2
  ------------------
 1189|    411|      tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    411|#define XML_TOK_NMTOKEN 19
  ------------------
 1190|    411|      break;
 1191|    411|    }
 1192|       |    /* fall through */
 1193|     58|  default:
  ------------------
  |  Branch (1193:3): [True: 19, False: 88.2k]
  ------------------
 1194|     58|    *nextTokPtr = ptr;
 1195|     58|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     58|#define XML_TOK_INVALID 0
  ------------------
 1196|  88.2k|  }
 1197|  48.7k|  while (HAS_CHAR(enc, ptr, end)) {
 1198|  48.7k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  48.7k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  48.7k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  47.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 47.4k, False: 1.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1199|  98.3k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  28.8k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 1.29k, False: 47.4k]
  |  |  ------------------
  |  |   82|  28.8k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  1.29k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  1.29k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.29k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 32, False: 1.26k]
  |  |  ------------------
  |  |   83|     32|      *nextTokPtr = ptr;                                                       \
  |  |   84|     32|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     32|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     32|    }                                                                          \
  |  |   86|  28.8k|    /* fall through */                                                         \
  |  |   87|  28.8k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 11.2k, False: 37.4k]
  |  |  ------------------
  |  |   88|  27.8k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 15.3k, False: 33.4k]
  |  |  ------------------
  |  |   89|  28.1k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 256, False: 48.4k]
  |  |  ------------------
  |  |   90|  28.4k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 353, False: 48.3k]
  |  |  ------------------
  |  |   91|  28.8k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 346, False: 48.3k]
  |  |  ------------------
  |  |   92|  28.8k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  28.8k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  28.8k|    break;                                                                     \
  |  |   94|  28.8k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 48.7k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 48.7k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     22|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 22, False: 48.7k]
  |  |  |  |  ------------------
  |  |  |  |   71|     22|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 18]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     18|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     36|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     18|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     18|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     18|    }                                                                          \
  |  |  |  |   77|     18|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
 1200|    241|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 241, False: 48.5k]
  ------------------
 1201|  2.32k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 2.08k, False: 46.6k]
  ------------------
 1202|  2.81k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 486, False: 48.2k]
  ------------------
 1203|  4.11k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 1.29k, False: 47.4k]
  ------------------
 1204|  4.91k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 802, False: 47.9k]
  ------------------
 1205|  4.91k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 3, False: 48.7k]
  ------------------
 1206|  12.7k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 7.79k, False: 40.9k]
  ------------------
 1207|  14.6k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 1.98k, False: 46.7k]
  ------------------
 1208|  19.0k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 4.38k, False: 44.3k]
  ------------------
 1209|  19.0k|      *nextTokPtr = ptr;
 1210|  19.0k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 48.7k]
  ------------------
 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|    510|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 510, False: 48.2k]
  ------------------
 1232|    510|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    510|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 1, False: 509]
  ------------------
 1233|      1|        *nextTokPtr = ptr;
 1234|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1235|      1|      }
 1236|    509|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    509|#  define MINBPC(enc) 2
  ------------------
 1237|    509|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|    509|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    209|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 209, False: 48.5k]
  ------------------
 1239|    209|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    209|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 2, False: 207]
  ------------------
 1240|      2|        *nextTokPtr = ptr;
 1241|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
 1242|      2|      }
 1243|    207|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    207|#  define MINBPC(enc) 2
  ------------------
 1244|    207|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    207|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|     50|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 50, False: 48.6k]
  ------------------
 1246|     50|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|     50|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 1, False: 49]
  ------------------
 1247|      1|        *nextTokPtr = ptr;
 1248|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1249|      1|      }
 1250|     49|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|     49|#  define MINBPC(enc) 2
  ------------------
 1251|     49|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|     49|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     15|    default:
  ------------------
  |  Branch (1252:5): [True: 15, False: 48.7k]
  ------------------
 1253|     15|      *nextTokPtr = ptr;
 1254|     15|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
 1255|  48.7k|    }
 1256|  48.7k|  }
 1257|    127|  return -tok;
 1258|  20.0k|}
xmltok.c:little2_scanLit:
  984|  6.75k|                const char **nextTokPtr) {
  985|  2.19M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  2.19M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  2.19M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.19M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   120k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 120k, False: 2.07M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  987|  2.19M|    switch (t) {
  988|   271k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 2.19M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 2.19M]
  |  |  |  |  ------------------
  |  |  |  |   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|   135k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|   135k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 135k, False: 2.05M]
  |  |  |  |  ------------------
  |  |  |  |   50|   135k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 30, False: 135k]
  |  |  |  |  ------------------
  |  |  |  |   51|   135k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     30|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|   135k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   135k|#    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|   135k|    ptr += n;                                                                  \
  |  |  |  |   57|   135k|    break;
  |  |  ------------------
  |  |   63|   135k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 14, False: 2.19M]
  |  |  ------------------
  |  |   64|     14|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 2.19M]
  |  |  ------------------
  |  |   65|     20|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 6, False: 2.19M]
  |  |  ------------------
  |  |   66|     20|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     20|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  2.10k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 2.10k, False: 2.19M]
  ------------------
  990|  7.97k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 5.87k, False: 2.18M]
  ------------------
  991|  7.97k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  7.97k|#  define MINBPC(enc) 2
  ------------------
  992|  7.97k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 1.33k, False: 6.64k]
  ------------------
  993|  1.33k|        break;
  994|  6.64k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  6.64k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  6.64k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  6.64k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 4, False: 6.63k]
  ------------------
  995|      4|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      4|#define XML_TOK_LITERAL 27
  ------------------
  996|  6.63k|      *nextTokPtr = ptr;
  997|  6.63k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  6.63k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  6.63k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  6.60k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 6.60k, False: 34]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  998|  2.34k|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 2.34k, False: 4.29k]
  ------------------
  999|  3.32k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 985, False: 5.65k]
  ------------------
 1000|  4.15k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 831, False: 5.80k]
  ------------------
 1001|  6.57k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 2.41k, False: 4.22k]
  ------------------
 1002|  6.59k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 22, False: 6.61k]
  ------------------
 1003|  6.60k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 7, False: 6.63k]
  ------------------
 1004|  6.60k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  6.60k|#define XML_TOK_LITERAL 27
  ------------------
 1005|     38|      default:
  ------------------
  |  Branch (1005:7): [True: 38, False: 6.60k]
  ------------------
 1006|     38|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     38|#define XML_TOK_INVALID 0
  ------------------
 1007|  6.63k|      }
 1008|  2.05M|    default:
  ------------------
  |  Branch (1008:5): [True: 2.05M, False: 143k]
  ------------------
 1009|  2.05M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.05M|#  define MINBPC(enc) 2
  ------------------
 1010|  2.05M|      break;
 1011|  2.19M|    }
 1012|  2.19M|  }
 1013|     66|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     66|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  6.75k|}
xmltok.c:little2_scanDecl:
  183|  5.29k|                 const char **nextTokPtr) {
  184|  5.29k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.29k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.29k|    {                                                                          \
  |  |  |  |  135|  5.29k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.29k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  5.29k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 5.29k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  5.29k|    }
  |  |  ------------------
  ------------------
  185|  5.29k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  5.29k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.29k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.27k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 5.27k, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|    443|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 443, False: 4.85k]
  ------------------
  187|    443|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    443|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    443|#  define MINBPC(enc) 2
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 5.29k]
  ------------------
  189|      1|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|      1|#  define MINBPC(enc) 2
  ------------------
  190|      1|    return XML_TOK_COND_SECT_OPEN;
  ------------------
  |  |  102|      1|#define XML_TOK_COND_SECT_OPEN 33       /* <![ */
  ------------------
  191|    595|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 595, False: 4.69k]
  ------------------
  192|  4.82k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 4.23k, False: 1.06k]
  ------------------
  193|  4.82k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.82k|#  define MINBPC(enc) 2
  ------------------
  194|  4.82k|    break;
  195|     22|  default:
  ------------------
  |  Branch (195:3): [True: 22, False: 5.27k]
  ------------------
  196|     22|    *nextTokPtr = ptr;
  197|     22|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     22|#define XML_TOK_INVALID 0
  ------------------
  198|  5.29k|  }
  199|  32.3k|  while (HAS_CHAR(enc, ptr, end)) {
  200|  32.3k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  32.3k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  32.3k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  32.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 32.2k, False: 32]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|     35|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 35, False: 32.2k]
  ------------------
  202|     35|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     35|    {                                                                          \
  |  |  135|     35|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     35|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|     35|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 34]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     35|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|     34|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  785|     34|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|     34|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|     11|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 28, False: 6]
  |  |  |  |  |  Branch (737:4): [True: 11, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      1|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 1, False: 33]
  ------------------
  206|      4|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 3, False: 31]
  ------------------
  207|      5|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 1, False: 33]
  ------------------
  208|      6|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 1, False: 33]
  ------------------
  209|      6|        *nextTokPtr = ptr;
  210|      6|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  211|     34|      }
  212|       |      /* fall through */
  213|  2.33k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 2.30k, False: 30.0k]
  ------------------
  214|  4.08k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 1.74k, False: 30.5k]
  ------------------
  215|  4.76k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 680, False: 31.6k]
  ------------------
  216|  4.76k|      *nextTokPtr = ptr;
  217|  4.76k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  4.76k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|  22.9k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 22.9k, False: 9.33k]
  ------------------
  219|  27.5k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 4.53k, False: 27.7k]
  ------------------
  220|  27.5k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  27.5k|#  define MINBPC(enc) 2
  ------------------
  221|  27.5k|      break;
  222|     32|    default:
  ------------------
  |  Branch (222:5): [True: 32, False: 32.2k]
  ------------------
  223|     32|      *nextTokPtr = ptr;
  224|     32|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     32|#define XML_TOK_INVALID 0
  ------------------
  225|  32.3k|    }
  226|  32.3k|  }
  227|     28|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     28|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  4.82k|}
xmltok.c:little2_scanComment:
  146|    643|                    const char **nextTokPtr) {
  147|    643|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|    643|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    643|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    643|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 630, False: 13]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|    630|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  787|    630|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    630|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 620, False: 10]
  |  |  |  |  |  Branch (739:52): [True: 610, False: 10]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  149|     20|      *nextTokPtr = ptr;
  150|     20|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     20|#define XML_TOK_INVALID 0
  ------------------
  151|     20|    }
  152|    610|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    610|#  define MINBPC(enc) 2
  ------------------
  153|  79.5k|    while (HAS_CHAR(enc, ptr, end)) {
  154|  79.5k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  79.5k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  79.5k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  8.57k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 8.57k, False: 70.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|  13.8k|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 79.5k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 79.5k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  6.91k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  6.88k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 6.91k, False: 72.5k]
  |  |  |  |  ------------------
  |  |  |  |   50|  6.91k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 29, False: 6.88k]
  |  |  |  |  ------------------
  |  |  |  |   51|  6.88k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     29|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  6.88k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  6.88k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  6.88k|    ptr += n;                                                                  \
  |  |  |  |   57|  6.88k|    break;
  |  |  ------------------
  |  |   63|  6.88k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 23, False: 79.4k]
  |  |  ------------------
  |  |   64|     23|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 79.5k]
  |  |  ------------------
  |  |   65|     30|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 7, False: 79.5k]
  |  |  ------------------
  |  |   66|     30|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     30|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     30|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|    947|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 947, False: 78.5k]
  ------------------
  157|    947|        ptr += MINBPC(enc);
  ------------------
  |  |  783|    947|#  define MINBPC(enc) 2
  ------------------
  158|    947|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    947|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    947|    {                                                                          \
  |  |  |  |  135|    947|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    947|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    947|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 944]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|    947|    }
  |  |  ------------------
  ------------------
  159|    944|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  787|    944|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    944|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 723, False: 221]
  |  |  |  |  |  Branch (739:52): [True: 481, False: 242]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|    481|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    481|#  define MINBPC(enc) 2
  ------------------
  161|    481|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    481|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    481|    {                                                                          \
  |  |  |  |  135|    481|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    481|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    481|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 480]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    481|    }
  |  |  ------------------
  ------------------
  162|    480|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    480|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    480|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 471, False: 9]
  |  |  |  |  |  Branch (739:52): [True: 460, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|     20|            *nextTokPtr = ptr;
  164|     20|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     20|#define XML_TOK_INVALID 0
  ------------------
  165|     20|          }
  166|    460|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    460|#  define MINBPC(enc) 2
  ------------------
  167|    460|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|    460|#define XML_TOK_COMMENT 13
  ------------------
  168|    480|        }
  169|    463|        break;
  170|  71.6k|      default:
  ------------------
  |  Branch (170:7): [True: 71.6k, False: 7.89k]
  ------------------
  171|  71.6k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  71.6k|#  define MINBPC(enc) 2
  ------------------
  172|  71.6k|        break;
  173|  79.5k|      }
  174|  79.5k|    }
  175|    610|  }
  176|     80|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     80|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|    643|}
xmltok.c:little2_scanPi:
  277|  6.15k|               const char **nextTokPtr) {
  278|  6.15k|  int tok;
  279|  6.15k|  const char *target = ptr;
  280|  6.15k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.15k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.15k|    {                                                                          \
  |  |  |  |  135|  6.15k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.15k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  6.15k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 11, False: 6.14k]
  |  |  |  |  ------------------
  |  |  |  |  136|     11|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     11|      }                                                                        \
  |  |  |  |  138|  6.15k|    }
  |  |  ------------------
  ------------------
  281|  6.14k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  6.14k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  6.14k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.68k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.68k, False: 1.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  282|  6.35k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  6.10k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.43k, False: 4.71k]
  |  |  ------------------
  |  |  111|  6.10k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  1.43k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  1.43k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.43k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 14, False: 1.42k]
  |  |  ------------------
  |  |  112|     14|      *nextTokPtr = ptr;                                                       \
  |  |  113|     14|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     14|    }                                                                          \
  |  |  115|  6.10k|    /* fall through */                                                         \
  |  |  116|  6.10k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.46k, False: 2.68k]
  |  |  ------------------
  |  |  117|  6.10k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 1.22k, False: 4.92k]
  |  |  ------------------
  |  |  118|  6.10k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  6.10k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  6.10k|    break;                                                                     \
  |  |  120|  6.10k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 6.14k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 6.14k]
  |  |  |  |  ------------------
  |  |  |  |  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: 6.12k]
  |  |  |  |  ------------------
  |  |  |  |  100|     23|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 19]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     19|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     38|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     19|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     19|    }                                                                          \
  |  |  |  |  106|     19|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  283|      6|  default:
  ------------------
  |  Branch (283:3): [True: 6, False: 6.13k]
  ------------------
  284|      6|    *nextTokPtr = ptr;
  285|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  286|  6.14k|  }
  287|  21.6k|  while (HAS_CHAR(enc, ptr, end)) {
  288|  21.6k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  21.6k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  21.6k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  14.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 14.4k, False: 7.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  289|  64.3k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  15.6k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 7.15k, False: 14.4k]
  |  |  ------------------
  |  |   82|  15.6k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  7.15k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  7.15k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  7.15k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 20, False: 7.13k]
  |  |  ------------------
  |  |   83|     20|      *nextTokPtr = ptr;                                                       \
  |  |   84|     20|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     20|    }                                                                          \
  |  |   86|  15.6k|    /* fall through */                                                         \
  |  |   87|  15.6k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 5.17k, False: 16.4k]
  |  |  ------------------
  |  |   88|  14.7k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 2.41k, False: 19.2k]
  |  |  ------------------
  |  |   89|  14.9k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 200, False: 21.4k]
  |  |  ------------------
  |  |   90|  15.1k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 226, False: 21.4k]
  |  |  ------------------
  |  |   91|  15.6k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 460, False: 21.1k]
  |  |  ------------------
  |  |   92|  15.6k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  15.6k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  15.6k|    break;                                                                     \
  |  |   94|  15.6k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 21.6k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 21.6k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     19|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 19, False: 21.6k]
  |  |  |  |  ------------------
  |  |  |  |   71|     19|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 15]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     15|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     30|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     15|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     15|    }                                                                          \
  |  |  |  |   77|     15|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  290|  1.59k|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 1.59k, False: 20.0k]
  ------------------
  291|  2.41k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 814, False: 20.8k]
  ------------------
  292|  3.29k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 878, False: 20.7k]
  ------------------
  293|  3.29k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  782|  3.29k|#  define PREFIX(ident) little2_##ident
  ------------------
  |  Branch (293:11): [True: 1, False: 3.28k]
  ------------------
  294|      1|        *nextTokPtr = ptr;
  295|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  296|      1|      }
  297|  3.28k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.28k|#  define MINBPC(enc) 2
  ------------------
  298|   290k|      while (HAS_CHAR(enc, ptr, end)) {
  299|   290k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   290k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   290k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  32.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 32.2k, False: 258k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  300|  83.3k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 290k]
  |  |  |  |  ------------------
  |  |  |  |   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: 290k]
  |  |  |  |  ------------------
  |  |  |  |   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|  41.6k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  41.6k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 41.6k, False: 248k]
  |  |  |  |  ------------------
  |  |  |  |   50|  41.6k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 28, False: 41.6k]
  |  |  |  |  ------------------
  |  |  |  |   51|  41.6k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     28|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  41.6k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  41.6k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  41.6k|    ptr += n;                                                                  \
  |  |  |  |   57|  41.6k|    break;
  |  |  ------------------
  |  |   63|  41.6k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 14, False: 290k]
  |  |  ------------------
  |  |   64|     14|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 290k]
  |  |  ------------------
  |  |   65|     19|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 5, False: 290k]
  |  |  ------------------
  |  |   66|     19|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     19|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  5.68k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 5.68k, False: 284k]
  ------------------
  302|  5.68k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  5.68k|#  define MINBPC(enc) 2
  ------------------
  303|  5.68k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.68k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.68k|    {                                                                          \
  |  |  |  |  135|  5.68k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.68k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  5.68k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 5.68k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  5.68k|    }
  |  |  ------------------
  ------------------
  304|  5.68k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  5.68k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  5.68k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 5.01k, False: 675]
  |  |  |  |  |  Branch (739:52): [True: 3.10k, False: 1.90k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  305|  3.10k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  3.10k|#  define MINBPC(enc) 2
  ------------------
  306|  3.10k|            return tok;
  307|  3.10k|          }
  308|  2.58k|          break;
  309|   243k|        default:
  ------------------
  |  Branch (309:9): [True: 243k, False: 47.3k]
  ------------------
  310|   243k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|   243k|#  define MINBPC(enc) 2
  ------------------
  311|   243k|          break;
  312|   290k|        }
  313|   290k|      }
  314|    136|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    136|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  2.69k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 2.69k, False: 18.9k]
  ------------------
  316|  2.69k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  782|  2.69k|#  define PREFIX(ident) little2_##ident
  ------------------
  |  Branch (316:11): [True: 1, False: 2.69k]
  ------------------
  317|      1|        *nextTokPtr = ptr;
  318|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  319|      1|      }
  320|  2.69k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.69k|#  define MINBPC(enc) 2
  ------------------
  321|  2.69k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.69k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.69k|    {                                                                          \
  |  |  |  |  135|  2.69k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.69k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.69k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 34, False: 2.66k]
  |  |  |  |  ------------------
  |  |  |  |  136|     34|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     34|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     34|      }                                                                        \
  |  |  |  |  138|  2.69k|    }
  |  |  ------------------
  ------------------
  322|  2.66k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  2.66k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.66k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 2.65k, False: 10]
  |  |  |  |  |  Branch (739:52): [True: 2.63k, False: 16]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  323|  2.63k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.63k|#  define MINBPC(enc) 2
  ------------------
  324|  2.63k|        return tok;
  325|  2.63k|      }
  326|       |      /* fall through */
  327|     32|    default:
  ------------------
  |  Branch (327:5): [True: 6, False: 21.6k]
  ------------------
  328|     32|      *nextTokPtr = ptr;
  329|     32|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     32|#define XML_TOK_INVALID 0
  ------------------
  330|  21.6k|    }
  331|  21.6k|  }
  332|     68|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     68|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  6.10k|}
xmltok.c:little2_checkPiTarget:
  232|  5.98k|                      int *tokPtr) {
  233|  5.98k|  int upper = 0;
  234|  5.98k|  UNUSED_P(enc);
  ------------------
  |  |  135|  5.98k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  5.98k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  5.98k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  5.98k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  783|  5.98k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (236:7): [True: 1.42k, False: 4.56k]
  ------------------
  237|  1.42k|    return 1;
  238|  4.56k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  4.56k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  4.56k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 3.66k, False: 900]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  239|    977|  case ASCII_x:
  ------------------
  |  |   86|    977|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 977, False: 3.59k]
  ------------------
  240|    977|    break;
  241|  1.99k|  case ASCII_X:
  ------------------
  |  |   59|  1.99k|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 1.99k, False: 2.57k]
  ------------------
  242|  1.99k|    upper = 1;
  243|  1.99k|    break;
  244|  1.59k|  default:
  ------------------
  |  Branch (244:3): [True: 1.59k, False: 2.96k]
  ------------------
  245|  1.59k|    return 1;
  246|  4.56k|  }
  247|  2.96k|  ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.96k|#  define MINBPC(enc) 2
  ------------------
  248|  2.96k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  2.96k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  2.96k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 2.20k, False: 766]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|    981|  case ASCII_m:
  ------------------
  |  |   75|    981|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 981, False: 1.98k]
  ------------------
  250|    981|    break;
  251|  1.20k|  case ASCII_M:
  ------------------
  |  |   48|  1.20k|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 1.20k, False: 1.76k]
  ------------------
  252|  1.20k|    upper = 1;
  253|  1.20k|    break;
  254|    779|  default:
  ------------------
  |  Branch (254:3): [True: 779, False: 2.18k]
  ------------------
  255|    779|    return 1;
  256|  2.96k|  }
  257|  2.18k|  ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.18k|#  define MINBPC(enc) 2
  ------------------
  258|  2.18k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  2.18k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  2.18k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 1.12k, False: 1.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|     37|  case ASCII_l:
  ------------------
  |  |   74|     37|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 37, False: 2.15k]
  ------------------
  260|     37|    break;
  261|      2|  case ASCII_L:
  ------------------
  |  |   47|      2|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 2, False: 2.18k]
  ------------------
  262|      2|    upper = 1;
  263|      2|    break;
  264|  2.15k|  default:
  ------------------
  |  Branch (264:3): [True: 2.15k, False: 39]
  ------------------
  265|  2.15k|    return 1;
  266|  2.18k|  }
  267|     39|  if (upper)
  ------------------
  |  Branch (267:7): [True: 2, False: 37]
  ------------------
  268|      2|    return 0;
  269|     37|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|     37|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|     37|  return 1;
  271|     39|}
xmltok.c:little2_scanPercent:
  924|  2.70k|                    const char **nextTokPtr) {
  925|  2.70k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.70k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.70k|    {                                                                          \
  |  |  |  |  135|  2.70k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.70k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.70k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 24, False: 2.68k]
  |  |  |  |  ------------------
  |  |  |  |  136|     24|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     24|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     24|      }                                                                        \
  |  |  |  |  138|  2.70k|    }
  |  |  ------------------
  ------------------
  926|  2.68k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.68k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.68k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.16k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.16k, False: 517]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  927|  1.12k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.16k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 497, False: 2.18k]
  |  |  ------------------
  |  |  111|  1.16k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    497|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    497|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    497|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 12, False: 485]
  |  |  ------------------
  |  |  112|     12|      *nextTokPtr = ptr;                                                       \
  |  |  113|     12|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     12|    }                                                                          \
  |  |  115|  1.16k|    /* fall through */                                                         \
  |  |  116|  1.16k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 115, False: 2.56k]
  |  |  ------------------
  |  |  117|  1.16k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 565, False: 2.11k]
  |  |  ------------------
  |  |  118|  1.16k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.16k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.16k|    break;                                                                     \
  |  |  120|  1.16k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.68k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.68k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     15|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 15, False: 2.66k]
  |  |  |  |  ------------------
  |  |  |  |  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|    271|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 271, False: 2.41k]
  ------------------
  929|  1.11k|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 848, False: 1.83k]
  ------------------
  930|  1.48k|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 362, False: 2.32k]
  ------------------
  931|  1.48k|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 4, False: 2.67k]
  ------------------
  932|  1.48k|    *nextTokPtr = ptr;
  933|  1.48k|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|  1.48k|#define XML_TOK_PERCENT 22
  ------------------
  934|      6|  default:
  ------------------
  |  Branch (934:3): [True: 6, False: 2.67k]
  ------------------
  935|      6|    *nextTokPtr = ptr;
  936|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  937|  2.68k|  }
  938|  2.72k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  2.72k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.72k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.72k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.19k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.19k, False: 530]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  940|  5.02k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.62k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 515, False: 2.21k]
  |  |  ------------------
  |  |   82|  1.62k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    515|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    515|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    515|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 19, False: 496]
  |  |  ------------------
  |  |   83|     19|      *nextTokPtr = ptr;                                                       \
  |  |   84|     19|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     19|    }                                                                          \
  |  |   86|  1.62k|    /* fall through */                                                         \
  |  |   87|  1.62k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 291, False: 2.43k]
  |  |  ------------------
  |  |   88|  1.03k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 252, False: 2.47k]
  |  |  ------------------
  |  |   89|  1.23k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 198, False: 2.53k]
  |  |  ------------------
  |  |   90|  1.43k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 196, False: 2.53k]
  |  |  ------------------
  |  |   91|  1.62k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 195, False: 2.53k]
  |  |  ------------------
  |  |   92|  1.62k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.62k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.62k|    break;                                                                     \
  |  |   94|  1.62k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 2.72k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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.72k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     10|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 10, False: 2.71k]
  |  |  |  |  ------------------
  |  |  |  |   71|     10|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 5]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      5|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     10|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      5|    }                                                                          \
  |  |  |  |   77|      5|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  941|  1.06k|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 1.06k, False: 1.66k]
  ------------------
  942|  1.06k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.06k|#  define MINBPC(enc) 2
  ------------------
  943|  1.06k|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|  1.06k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|     11|    default:
  ------------------
  |  Branch (944:5): [True: 11, False: 2.71k]
  ------------------
  945|     11|      *nextTokPtr = ptr;
  946|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  947|  2.72k|    }
  948|  2.72k|  }
  949|     65|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     65|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|  1.16k|}
xmltok.c:little2_scanPoundName:
  954|  2.52k|                      const char **nextTokPtr) {
  955|  2.52k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.52k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.52k|    {                                                                          \
  |  |  |  |  135|  2.52k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.52k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.52k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 2.52k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  2.52k|    }
  |  |  ------------------
  ------------------
  956|  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.41k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.41k, False: 109]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  957|  1.81k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.48k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 85, False: 2.43k]
  |  |  ------------------
  |  |  111|  2.48k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|     85|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|     85|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|     85|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 13, False: 72]
  |  |  ------------------
  |  |  112|     13|      *nextTokPtr = ptr;                                                       \
  |  |  113|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     13|    }                                                                          \
  |  |  115|  2.48k|    /* fall through */                                                         \
  |  |  116|  2.48k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.62k, False: 895]
  |  |  ------------------
  |  |  117|  2.48k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 785, False: 1.73k]
  |  |  ------------------
  |  |  118|  2.48k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  2.48k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  2.48k|    break;                                                                     \
  |  |  120|  2.48k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.52k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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.52k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     18|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 18, False: 2.50k]
  |  |  |  |  ------------------
  |  |  |  |  100|     18|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 14]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     14|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     28|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     14|    }                                                                          \
  |  |  |  |  106|     14|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  958|      7|  default:
  ------------------
  |  Branch (958:3): [True: 7, False: 2.51k]
  ------------------
  959|      7|    *nextTokPtr = ptr;
  960|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  961|  2.52k|  }
  962|  17.6k|  while (HAS_CHAR(enc, ptr, end)) {
  963|  17.6k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  17.6k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  17.6k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  16.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 16.9k, False: 708]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  964|  52.3k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  15.2k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 689, False: 17.0k]
  |  |  ------------------
  |  |   82|  15.2k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    689|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    689|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    689|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 20, False: 669]
  |  |  ------------------
  |  |   83|     20|      *nextTokPtr = ptr;                                                       \
  |  |   84|     20|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     20|    }                                                                          \
  |  |   86|  15.2k|    /* fall through */                                                         \
  |  |   87|  15.2k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 6.99k, False: 10.7k]
  |  |  ------------------
  |  |   88|  14.4k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 6.75k, False: 10.9k]
  |  |  ------------------
  |  |   89|  14.6k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 198, False: 17.4k]
  |  |  ------------------
  |  |   90|  14.9k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 300, False: 17.3k]
  |  |  ------------------
  |  |   91|  15.2k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 361, False: 17.3k]
  |  |  ------------------
  |  |   92|  15.2k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  15.2k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  15.2k|    break;                                                                     \
  |  |   94|  15.2k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 17.6k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 17.6k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     13|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 13, False: 17.6k]
  |  |  |  |  ------------------
  |  |  |  |   71|     13|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 8]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      8|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     16|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      8|    }                                                                          \
  |  |  |  |   77|      8|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  965|    186|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 186, False: 17.5k]
  ------------------
  966|    940|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 754, False: 16.9k]
  ------------------
  967|  1.92k|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 989, False: 16.7k]
  ------------------
  968|  2.24k|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 312, False: 17.3k]
  ------------------
  969|  2.30k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 68, False: 17.6k]
  ------------------
  970|  2.31k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 2, False: 17.6k]
  ------------------
  971|  2.37k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 67, False: 17.6k]
  ------------------
  972|  2.37k|      *nextTokPtr = ptr;
  973|  2.37k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  2.37k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|     11|    default:
  ------------------
  |  Branch (974:5): [True: 11, False: 17.6k]
  ------------------
  975|     11|      *nextTokPtr = ptr;
  976|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  977|  17.6k|    }
  978|  17.6k|  }
  979|     62|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     62|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  2.48k|}
xmltok.c:little2_contentTok:
  824|  70.0k|                   const char **nextTokPtr) {
  825|  70.0k|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 1.02k, False: 69.0k]
  ------------------
  826|  1.02k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.02k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|  69.0k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  69.0k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (827:7): [Folded - Ignored]
  ------------------
  828|  69.0k|    size_t n = end - ptr;
  829|  69.0k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  69.0k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (829:9): [True: 16.4k, False: 52.5k]
  ------------------
  830|  16.4k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  16.4k|#  define MINBPC(enc) 2
  ------------------
  831|  16.4k|      if (n == 0)
  ------------------
  |  Branch (831:11): [True: 101, False: 16.3k]
  ------------------
  832|    101|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    101|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  833|  16.3k|      end = ptr + n;
  834|  16.3k|    }
  835|  69.0k|  }
  836|  68.9k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  68.9k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  68.9k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  55.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 55.5k, False: 13.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  837|  16.3k|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 16.3k, False: 52.6k]
  ------------------
  838|  16.3k|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  16.3k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  16.3k|#  define MINBPC(enc) 2
  ------------------
  839|  10.6k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 10.6k, False: 58.2k]
  ------------------
  840|  10.6k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  10.6k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  10.6k|#  define MINBPC(enc) 2
  ------------------
  841|  15.1k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 15.1k, False: 53.7k]
  ------------------
  842|  15.1k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  15.1k|#  define MINBPC(enc) 2
  ------------------
  843|  15.1k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  15.1k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  15.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  15.1k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 13, False: 15.1k]
  ------------------
  844|     13|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     13|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  15.1k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  15.1k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  15.1k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  8.49k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 8.49k, False: 6.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 237, False: 14.8k]
  ------------------
  846|    237|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    237|#  define MINBPC(enc) 2
  ------------------
  847|  15.1k|    *nextTokPtr = ptr;
  848|  15.1k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  15.1k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|  2.45k|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 2.45k, False: 66.4k]
  ------------------
  850|  2.45k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.45k|#  define MINBPC(enc) 2
  ------------------
  851|  2.45k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  2.45k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  6.32k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 6.32k, False: 62.6k]
  ------------------
  853|  6.32k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  6.32k|#  define MINBPC(enc) 2
  ------------------
  854|  6.32k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  6.32k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  6.32k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  6.32k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 3, False: 6.32k]
  ------------------
  855|      3|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      3|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  6.32k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  787|  6.32k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  6.32k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 3.33k, False: 2.98k]
  |  |  |  |  |  Branch (739:52): [True: 1.27k, False: 2.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  857|  5.05k|      break;
  858|  1.27k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.27k|#  define MINBPC(enc) 2
  ------------------
  859|  1.27k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  1.27k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.27k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  1.27k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 7, False: 1.26k]
  ------------------
  860|      7|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      7|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|  1.26k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  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: 998, False: 266]
  |  |  |  |  |  Branch (739:52): [True: 2, False: 996]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  862|  1.26k|      ptr -= MINBPC(enc);
  ------------------
  |  |  783|  1.26k|#  define MINBPC(enc) 2
  ------------------
  863|  1.26k|      break;
  864|  1.26k|    }
  865|      2|    *nextTokPtr = ptr;
  866|      2|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  867|  7.37k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 68.9k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 68.9k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  3.66k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  3.60k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.66k, False: 65.2k]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.66k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 63, False: 3.60k]
  |  |  |  |  ------------------
  |  |  |  |   51|  3.60k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     63|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  3.60k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  3.60k|#    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.60k|    ptr += n;                                                                  \
  |  |  |  |   57|  3.60k|    break;
  |  |  ------------------
  |  |   63|  3.60k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 54, False: 68.8k]
  |  |  ------------------
  |  |   64|     54|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 68.9k]
  |  |  ------------------
  |  |   65|     65|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 11, False: 68.9k]
  |  |  ------------------
  |  |   66|     65|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     65|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     65|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|  14.3k|  default:
  ------------------
  |  Branch (868:3): [True: 14.3k, False: 54.6k]
  ------------------
  869|  14.3k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  14.3k|#  define MINBPC(enc) 2
  ------------------
  870|  14.3k|    break;
  871|  68.9k|  }
  872|   802k|  while (HAS_CHAR(enc, ptr, end)) {
  873|   802k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   802k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   802k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  65.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 65.0k, False: 737k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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: 802k]
  |  |  ------------------
  |  |  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: 802k]
  |  |  ------------------
  |  |  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|  90.7k|      LEAD_CASE(4)
  ------------------
  |  |  875|  90.7k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 90.7k, False: 711k]
  |  |  ------------------
  |  |  876|  90.7k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  90.7k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 51, False: 90.7k]
  |  |  ------------------
  |  |  877|     51|      *nextTokPtr = ptr;                                                       \
  |  |  878|     51|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     51|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     51|    }                                                                          \
  |  |  880|  90.7k|    ptr += n;                                                                  \
  |  |  881|  90.7k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|  10.3k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 10.3k, False: 791k]
  ------------------
  887|  10.3k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|  10.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  783|  10.3k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 10.3k, False: 2]
  |  |  ------------------
  ------------------
  888|  10.3k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  787|  10.3k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  10.3k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 6.14k, False: 4.24k]
  |  |  |  |  |  Branch (739:52): [True: 3.84k, False: 2.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  889|  6.55k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  6.55k|#  define MINBPC(enc) 2
  ------------------
  890|  6.55k|          break;
  891|  6.55k|        }
  892|  3.84k|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|  3.84k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  783|  3.84k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 3.83k, False: 6]
  |  |  ------------------
  ------------------
  893|  3.83k|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  787|  3.83k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  3.83k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.35k, False: 2.48k]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 1.34k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  894|  3.83k|            ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.83k|#  define MINBPC(enc) 2
  ------------------
  895|  3.83k|            break;
  896|  3.83k|          }
  897|      1|          *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  783|      1|#  define MINBPC(enc) 2
  ------------------
  898|      1|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  899|  3.83k|        }
  900|  3.84k|      }
  901|       |      /* fall through */
  902|  5.35k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 5.34k, False: 796k]
  ------------------
  903|  9.91k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 4.55k, False: 797k]
  ------------------
  904|  9.95k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 43, False: 801k]
  ------------------
  905|  9.95k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 0, False: 802k]
  ------------------
  906|  9.96k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 7, False: 802k]
  ------------------
  907|  21.8k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 11.8k, False: 790k]
  ------------------
  908|  23.8k|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 2.03k, False: 800k]
  ------------------
  909|  23.8k|      *nextTokPtr = ptr;
  910|  23.8k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  23.8k|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|   677k|    default:
  ------------------
  |  Branch (911:5): [True: 677k, False: 125k]
  ------------------
  912|   677k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   677k|#  define MINBPC(enc) 2
  ------------------
  913|   677k|      break;
  914|   802k|    }
  915|   802k|  }
  916|    313|  *nextTokPtr = ptr;
  917|    313|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    313|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|  24.2k|}
xmltok.c:little2_scanLt:
  726|  16.3k|               const char **nextTokPtr) {
  727|  16.3k|#  ifdef XML_NS
  728|  16.3k|  int hadColon;
  729|  16.3k|#  endif
  730|  16.3k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  16.3k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  16.3k|    {                                                                          \
  |  |  |  |  135|  16.3k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  16.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  16.3k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 16, False: 16.2k]
  |  |  |  |  ------------------
  |  |  |  |  136|     16|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     16|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     16|      }                                                                        \
  |  |  |  |  138|  16.3k|    }
  |  |  ------------------
  ------------------
  731|  16.2k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  16.2k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  16.2k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  12.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 12.9k, False: 3.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  732|  10.5k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  9.28k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 3.28k, False: 13.0k]
  |  |  ------------------
  |  |  111|  9.28k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  3.28k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  3.28k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  3.28k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 17, False: 3.26k]
  |  |  ------------------
  |  |  112|     17|      *nextTokPtr = ptr;                                                       \
  |  |  113|     17|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     17|    }                                                                          \
  |  |  115|  9.28k|    /* fall through */                                                         \
  |  |  116|  9.28k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.99k, False: 12.2k]
  |  |  ------------------
  |  |  117|  9.28k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 2.02k, False: 14.2k]
  |  |  ------------------
  |  |  118|  9.28k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  9.28k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  9.28k|    break;                                                                     \
  |  |  120|  9.28k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 16.2k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 16.2k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 16.2k]
  |  |  |  |  ------------------
  |  |  |  |  100|     23|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 19]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     19|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     38|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     19|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     19|    }                                                                          \
  |  |  |  |  106|     19|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  733|    771|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 771, False: 15.5k]
  ------------------
  734|    771|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    771|#  define MINBPC(enc) 2
  ------------------
  735|    771|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    771|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    771|    {                                                                          \
  |  |  |  |  135|    771|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    771|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    771|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 770]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    771|    }
  |  |  ------------------
  ------------------
  736|    770|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|    770|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|    770|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    748|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 28, False: 742]
  |  |  |  |  |  Branch (737:4): [True: 748, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    200|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 200, False: 570]
  ------------------
  738|    200|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    200|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    200|#  define MINBPC(enc) 2
  ------------------
  739|    542|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 542, False: 228]
  ------------------
  740|    542|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    542|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    542|#  define MINBPC(enc) 2
  ------------------
  741|    770|    }
  742|     28|    *nextTokPtr = ptr;
  743|     28|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     28|#define XML_TOK_INVALID 0
  ------------------
  744|  4.34k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 4.34k, False: 11.9k]
  ------------------
  745|  4.34k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  4.34k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  4.34k|#  define MINBPC(enc) 2
  ------------------
  746|  1.83k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 1.83k, False: 14.4k]
  ------------------
  747|  1.83k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.83k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.83k|#  define MINBPC(enc) 2
  ------------------
  748|     14|  default:
  ------------------
  |  Branch (748:3): [True: 14, False: 16.2k]
  ------------------
  749|     14|    *nextTokPtr = ptr;
  750|     14|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  751|  16.2k|  }
  752|  9.28k|#  ifdef XML_NS
  753|  9.28k|  hadColon = 0;
  754|  9.28k|#  endif
  755|       |  /* we have a start-tag */
  756|  21.4k|  while (HAS_CHAR(enc, ptr, end)) {
  757|  21.4k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  21.4k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  21.4k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  15.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 15.2k, False: 6.23k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  758|  52.3k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  12.2k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 6.21k, False: 15.2k]
  |  |  ------------------
  |  |   82|  12.2k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  6.21k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  6.21k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  6.21k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 16, False: 6.20k]
  |  |  ------------------
  |  |   83|     16|      *nextTokPtr = ptr;                                                       \
  |  |   84|     16|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     16|    }                                                                          \
  |  |   86|  12.2k|    /* fall through */                                                         \
  |  |   87|  12.2k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 4.67k, False: 16.8k]
  |  |  ------------------
  |  |   88|  11.4k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 595, False: 20.8k]
  |  |  ------------------
  |  |   89|  11.7k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 288, False: 21.1k]
  |  |  ------------------
  |  |   90|  12.0k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 281, False: 21.2k]
  |  |  ------------------
  |  |   91|  12.2k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 220, False: 21.2k]
  |  |  ------------------
  |  |   92|  12.2k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  12.2k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  12.2k|    break;                                                                     \
  |  |   94|  12.2k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 21.4k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 21.4k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     12|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 12, False: 21.4k]
  |  |  |  |  ------------------
  |  |  |  |   71|     12|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 8]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      8|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     16|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      8|    }                                                                          \
  |  |  |  |   77|      8|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 21.4k]
  ------------------
  761|      0|      if (hadColon) {
  ------------------
  |  Branch (761:11): [True: 0, False: 0]
  ------------------
  762|      0|        *nextTokPtr = ptr;
  763|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  764|      0|      }
  765|      0|      hadColon = 1;
  766|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  783|      0|#  define MINBPC(enc) 2
  ------------------
  767|      0|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|      0|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|      0|    {                                                                          \
  |  |  |  |  135|      0|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|      0|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|      0|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      0|      }                                                                        \
  |  |  |  |  138|      0|    }
  |  |  ------------------
  ------------------
  768|      0|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|      0|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|      0|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|      0|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  769|      0|        CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|      0|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  111|      0|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|      0|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|      0|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|      0|    /* fall through */                                                         \
  |  |  116|      0|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  117|      0|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  118|      0|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|      0|    break;                                                                     \
  |  |  120|      0|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|      0|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  770|      0|      default:
  ------------------
  |  Branch (770:7): [True: 0, False: 0]
  ------------------
  771|      0|        *nextTokPtr = ptr;
  772|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  773|      0|      }
  774|      0|      break;
  775|      0|#  endif
  776|  1.83k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 1.83k, False: 19.6k]
  ------------------
  777|  3.05k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 1.21k, False: 20.2k]
  ------------------
  778|  4.21k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 1.15k, False: 20.3k]
  ------------------
  779|  4.21k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.21k|#  define MINBPC(enc) 2
  ------------------
  780|  5.41k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  5.41k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  5.41k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.41k|  ((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:4): [True: 4.57k, False: 842]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  782|  2.68k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.50k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 817, False: 4.60k]
  |  |  ------------------
  |  |  111|  2.50k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    817|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    817|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    817|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 10, False: 807]
  |  |  ------------------
  |  |  112|     10|      *nextTokPtr = ptr;                                                       \
  |  |  113|     10|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     10|    }                                                                          \
  |  |  115|  2.50k|    /* fall through */                                                         \
  |  |  116|  2.50k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.02k, False: 4.39k]
  |  |  ------------------
  |  |  117|  2.50k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 674, False: 4.74k]
  |  |  ------------------
  |  |  118|  2.50k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  2.50k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  2.50k|    break;                                                                     \
  |  |  120|  2.50k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 5.41k]
  |  |  |  |  ------------------
  |  |  |  |  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.41k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     20|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 20, False: 5.39k]
  |  |  |  |  ------------------
  |  |  |  |  100|     20|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 16]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     16|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     32|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     16|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     16|    }                                                                          \
  |  |  |  |  106|     16|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  783|  1.38k|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 1.38k, False: 4.03k]
  ------------------
  784|  1.38k|          goto gt;
  785|    246|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 246, False: 5.17k]
  ------------------
  786|    246|          goto sol;
  787|    296|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 296, False: 5.12k]
  ------------------
  788|    675|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 379, False: 5.03k]
  ------------------
  789|  1.24k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 569, False: 4.84k]
  ------------------
  790|  1.24k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.24k|#  define MINBPC(enc) 2
  ------------------
  791|  1.24k|          continue;
  792|      5|        default:
  ------------------
  |  Branch (792:9): [True: 5, False: 5.41k]
  ------------------
  793|      5|          *nextTokPtr = ptr;
  794|      5|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  795|  5.41k|        }
  796|  2.50k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  782|  2.50k|#  define PREFIX(ident) little2_##ident
  ------------------
  797|  5.41k|      }
  798|     40|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     40|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  4.21k|    }
  800|  4.67k|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 4.67k, False: 16.8k]
  ------------------
  801|  6.05k|    gt:
  802|  6.05k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  6.05k|#  define MINBPC(enc) 2
  ------------------
  803|  6.05k|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  6.05k|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|    295|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 295, False: 21.1k]
  ------------------
  805|    541|    sol:
  806|    541|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    541|#  define MINBPC(enc) 2
  ------------------
  807|    541|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    541|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    541|    {                                                                          \
  |  |  |  |  135|    541|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    541|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    541|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 12, False: 529]
  |  |  |  |  ------------------
  |  |  |  |  136|     12|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     12|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     12|      }                                                                        \
  |  |  |  |  138|    541|    }
  |  |  ------------------
  ------------------
  808|    529|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    529|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    529|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 521, False: 8]
  |  |  |  |  |  Branch (739:52): [True: 505, False: 16]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  809|     24|        *nextTokPtr = ptr;
  810|     24|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     24|#define XML_TOK_INVALID 0
  ------------------
  811|     24|      }
  812|    505|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    505|#  define MINBPC(enc) 2
  ------------------
  813|    505|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|    505|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|     10|    default:
  ------------------
  |  Branch (814:5): [True: 10, False: 21.4k]
  ------------------
  815|     10|      *nextTokPtr = ptr;
  816|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  817|  21.4k|    }
  818|  21.4k|  }
  819|     69|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     69|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  9.28k|}
xmltok.c:little2_scanCdataSection:
  337|    542|                         const char **nextTokPtr) {
  338|    542|  static const char CDATA_LSQB[]
  339|    542|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|    542|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|    542|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    542|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|    542|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    542|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|    542|#define ASCII_LSQB 0x5B
  ------------------
  340|    542|  int i;
  341|    542|  UNUSED_P(enc);
  ------------------
  |  |  135|    542|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|    542|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|    542|    {                                                                          \
  |  |  135|    542|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|    542|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    542|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 5, False: 537]
  |  |  ------------------
  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      5|      }                                                                        \
  |  |  138|    542|    }
  ------------------
  344|  3.71k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  3.17k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (344:15): [True: 3.18k, False: 522]
  ------------------
  345|  3.18k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  787|  3.18k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  3.18k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 3.18k, False: 9]
  |  |  |  |  |  Branch (739:52): [True: 3.17k, False: 6]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  346|     15|      *nextTokPtr = ptr;
  347|     15|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  348|     15|    }
  349|  3.18k|  }
  350|    522|  *nextTokPtr = ptr;
  351|    522|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|    522|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|    537|}
xmltok.c:little2_scanEndTag:
  432|  1.83k|                   const char **nextTokPtr) {
  433|  1.83k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.83k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.83k|    {                                                                          \
  |  |  |  |  135|  1.83k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.83k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.83k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.83k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.83k|    }
  |  |  ------------------
  ------------------
  434|  1.83k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.83k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.83k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.23k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.23k, False: 601]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  435|  2.04k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.80k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 581, False: 1.25k]
  |  |  ------------------
  |  |  111|  1.80k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    581|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    581|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    581|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 2, False: 579]
  |  |  ------------------
  |  |  112|      2|      *nextTokPtr = ptr;                                                       \
  |  |  113|      2|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      2|    }                                                                          \
  |  |  115|  1.80k|    /* fall through */                                                         \
  |  |  116|  1.80k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 854, False: 977]
  |  |  ------------------
  |  |  117|  1.80k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 376, False: 1.45k]
  |  |  ------------------
  |  |  118|  1.80k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.80k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.80k|    break;                                                                     \
  |  |  120|  1.80k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.83k]
  |  |  |  |  ------------------
  |  |  |  |  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.83k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     15|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 15, False: 1.81k]
  |  |  |  |  ------------------
  |  |  |  |  100|     15|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 11]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     11|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     22|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     11|    }                                                                          \
  |  |  |  |  106|     11|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  436|      5|  default:
  ------------------
  |  Branch (436:3): [True: 5, False: 1.82k]
  ------------------
  437|      5|    *nextTokPtr = ptr;
  438|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  439|  1.83k|  }
  440|  3.52k|  while (HAS_CHAR(enc, ptr, end)) {
  441|  3.52k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  3.52k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  3.52k|  ((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: 740]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  442|  5.72k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.78k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 717, False: 2.80k]
  |  |  ------------------
  |  |   82|  1.78k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    717|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    717|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    717|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 16, False: 701]
  |  |  ------------------
  |  |   83|     16|      *nextTokPtr = ptr;                                                       \
  |  |   84|     16|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     16|    }                                                                          \
  |  |   86|  1.78k|    /* fall through */                                                         \
  |  |   87|  1.78k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 206, False: 3.32k]
  |  |  ------------------
  |  |   88|  1.12k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 215, False: 3.31k]
  |  |  ------------------
  |  |   89|  1.36k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 246, False: 3.28k]
  |  |  ------------------
  |  |   90|  1.58k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 215, False: 3.31k]
  |  |  ------------------
  |  |   91|  1.78k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 198, False: 3.32k]
  |  |  ------------------
  |  |   92|  1.78k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.78k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.78k|    break;                                                                     \
  |  |   94|  1.78k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 3.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: 3.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|     17|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 17, False: 3.50k]
  |  |  |  |  ------------------
  |  |  |  |   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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     12|    }                                                                          \
  |  |  |  |   77|     12|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  443|    236|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 236, False: 3.29k]
  ------------------
  444|    621|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 385, False: 3.14k]
  ------------------
  445|  1.00k|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 379, False: 3.14k]
  ------------------
  446|  1.64k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  1.00k|#  define MINBPC(enc) 2
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|    686|#  define MINBPC(enc) 2
  ------------------
  447|  1.64k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.64k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.64k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.63k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.63k, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  448|    209|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 209, False: 1.43k]
  ------------------
  449|    418|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 209, False: 1.43k]
  ------------------
  450|    686|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 268, False: 1.37k]
  ------------------
  451|    686|          break;
  452|    943|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 943, False: 702]
  ------------------
  453|    943|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    943|#  define MINBPC(enc) 2
  ------------------
  454|    943|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|    943|#define XML_TOK_END_TAG 5
  ------------------
  455|     16|        default:
  ------------------
  |  Branch (455:9): [True: 16, False: 1.62k]
  ------------------
  456|     16|          *nextTokPtr = ptr;
  457|     16|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  458|  1.64k|        }
  459|  1.64k|      }
  460|     41|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     41|#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.52k]
  ------------------
  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|    700|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 700, False: 2.82k]
  ------------------
  469|    700|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    700|#  define MINBPC(enc) 2
  ------------------
  470|    700|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|    700|#define XML_TOK_END_TAG 5
  ------------------
  471|     12|    default:
  ------------------
  |  Branch (471:5): [True: 12, False: 3.51k]
  ------------------
  472|     12|      *nextTokPtr = ptr;
  473|     12|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  474|  3.52k|    }
  475|  3.52k|  }
  476|     64|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     64|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  1.80k|}
xmltok.c:little2_scanAtts:
  573|  2.50k|                 const char **nextTokPtr) {
  574|  2.50k|#  ifdef XML_NS
  575|  2.50k|  int hadColon = 0;
  576|  2.50k|#  endif
  577|   301k|  while (HAS_CHAR(enc, ptr, end)) {
  578|   301k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   301k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   301k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   300k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 300k, False: 1.34k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  579|  14.5k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  4.65k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 1.33k, False: 300k]
  |  |  ------------------
  |  |   82|  4.65k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  1.33k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  1.33k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.33k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 16, False: 1.31k]
  |  |  ------------------
  |  |   83|     16|      *nextTokPtr = ptr;                                                       \
  |  |   84|     16|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     16|    }                                                                          \
  |  |   86|  4.65k|    /* fall through */                                                         \
  |  |   87|  4.65k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 952, False: 300k]
  |  |  ------------------
  |  |   88|  2.93k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 665, False: 301k]
  |  |  ------------------
  |  |   89|  3.51k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 584, False: 301k]
  |  |  ------------------
  |  |   90|  4.45k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 939, False: 300k]
  |  |  ------------------
  |  |   91|  4.65k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 199, False: 301k]
  |  |  ------------------
  |  |   92|  4.65k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  4.65k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  4.65k|    break;                                                                     \
  |  |   94|  4.65k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 301k]
  |  |  |  |  ------------------
  |  |  |  |   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: 301k]
  |  |  |  |  ------------------
  |  |  |  |   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|      5|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 5, False: 301k]
  |  |  |  |  ------------------
  |  |  |  |   71|      5|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 1]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      1|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      2|#    define IS_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|      1|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      1|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      1|    }                                                                          \
  |  |  |  |   77|      1|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  580|      0|#  ifdef XML_NS
  581|      0|    case BT_COLON:
  ------------------
  |  Branch (581:5): [True: 0, False: 301k]
  ------------------
  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|    291|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 291, False: 301k]
  ------------------
  598|    546|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 255, False: 301k]
  ------------------
  599|  1.07k|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 533, False: 301k]
  ------------------
  600|  1.80k|      for (;;) {
  601|  1.80k|        int t;
  602|       |
  603|  1.80k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.80k|#  define MINBPC(enc) 2
  ------------------
  604|  1.80k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.80k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.80k|    {                                                                          \
  |  |  |  |  135|  1.80k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.80k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.80k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 38, False: 1.76k]
  |  |  |  |  ------------------
  |  |  |  |  136|     38|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     38|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     38|      }                                                                        \
  |  |  |  |  138|  1.80k|    }
  |  |  ------------------
  ------------------
  605|  1.76k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  1.76k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.76k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.75k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.75k, False: 15]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  606|  1.76k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 1.02k, False: 744]
  ------------------
  607|  1.02k|          break;
  608|    744|        switch (t) {
  609|    210|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 210, False: 534]
  ------------------
  610|    457|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 247, False: 497]
  ------------------
  611|    726|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 269, False: 475]
  ------------------
  612|    726|          break;
  613|     18|        default:
  ------------------
  |  Branch (613:9): [True: 18, False: 726]
  ------------------
  614|     18|          *nextTokPtr = ptr;
  615|     18|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  616|    744|        }
  617|    744|      }
  618|       |      /* fall through */
  619|   297k|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 296k, False: 5.76k]
  ------------------
  620|   297k|      int open;
  621|   297k|#  ifdef XML_NS
  622|   297k|      hadColon = 0;
  623|   297k|#  endif
  624|   297k|      for (;;) {
  625|   297k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   297k|#  define MINBPC(enc) 2
  ------------------
  626|   297k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   297k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   297k|    {                                                                          \
  |  |  |  |  135|   297k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   297k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   297k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 39, False: 297k]
  |  |  |  |  ------------------
  |  |  |  |  136|     39|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     39|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     39|      }                                                                        \
  |  |  |  |  138|   297k|    }
  |  |  ------------------
  ------------------
  627|   297k|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|   297k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   297k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   297k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 297k, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  628|   297k|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 9.00k, False: 288k]
  |  Branch (628:32): [True: 288k, False: 804]
  ------------------
  629|   297k|          break;
  630|    804|        switch (open) {
  631|    361|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 361, False: 443]
  ------------------
  632|    567|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 206, False: 598]
  ------------------
  633|    778|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 211, False: 593]
  ------------------
  634|    778|          break;
  635|     26|        default:
  ------------------
  |  Branch (635:9): [True: 26, False: 778]
  ------------------
  636|     26|          *nextTokPtr = ptr;
  637|     26|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     26|#define XML_TOK_INVALID 0
  ------------------
  638|    804|        }
  639|    804|      }
  640|   297k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   297k|#  define MINBPC(enc) 2
  ------------------
  641|       |      /* in attribute value */
  642|  4.27M|      for (;;) {
  643|  4.27M|        int t;
  644|  4.27M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.27M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.27M|    {                                                                          \
  |  |  |  |  135|  4.27M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.27M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  4.27M|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 56, False: 4.27M]
  |  |  |  |  ------------------
  |  |  |  |  136|     56|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     56|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     56|      }                                                                        \
  |  |  |  |  138|  4.27M|    }
  |  |  ------------------
  ------------------
  645|  4.27M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  4.27M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  4.27M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.40M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.40M, False: 2.87M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  646|  4.27M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 296k, False: 3.97M]
  ------------------
  647|   296k|          break;
  648|  3.97M|        switch (t) {
  649|   464k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 3.97M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 3.97M]
  |  |  |  |  ------------------
  |  |  |  |   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|   232k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|   232k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 232k, False: 3.74M]
  |  |  |  |  ------------------
  |  |  |  |   50|   232k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 28, False: 232k]
  |  |  |  |  ------------------
  |  |  |  |   51|   232k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     28|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|   232k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   232k|#    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|   232k|    ptr += n;                                                                  \
  |  |  |  |   57|   232k|    break;
  |  |  ------------------
  |  |   63|   232k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 11, False: 3.97M]
  |  |  ------------------
  |  |   64|     11|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 3.97M]
  |  |  ------------------
  |  |   65|     18|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 7, False: 3.97M]
  |  |  ------------------
  |  |   66|     18|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     18|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  3.97k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 3.97k, False: 3.97M]
  ------------------
  651|  3.97k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  782|  3.97k|#  define PREFIX(ident) little2_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  783|  3.97k|#  define MINBPC(enc) 2
  ------------------
  652|  3.97k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 11, False: 3.96k]
  ------------------
  653|     11|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 5, False: 6]
  ------------------
  654|      5|              *nextTokPtr = ptr;
  655|     11|            return tok;
  656|     11|          }
  657|  3.96k|          break;
  658|  3.97k|        }
  659|  3.96k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 4, False: 3.97M]
  ------------------
  660|      4|          *nextTokPtr = ptr;
  661|      4|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  662|  3.73M|        default:
  ------------------
  |  Branch (662:9): [True: 3.73M, False: 236k]
  ------------------
  663|  3.73M|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.73M|#  define MINBPC(enc) 2
  ------------------
  664|  3.73M|          break;
  665|  3.97M|        }
  666|  3.97M|      }
  667|   296k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   296k|#  define MINBPC(enc) 2
  ------------------
  668|   296k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   296k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   296k|    {                                                                          \
  |  |  |  |  135|   296k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   296k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   296k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 296k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|   296k|    }
  |  |  ------------------
  ------------------
  669|   296k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   296k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   296k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   296k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 296k, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  670|   291k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 291k, False: 5.44k]
  ------------------
  671|   292k|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 871, False: 296k]
  ------------------
  672|   295k|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 3.09k, False: 293k]
  ------------------
  673|   295k|        break;
  674|    335|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 335, False: 296k]
  ------------------
  675|    335|        goto sol;
  676|  1.12k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 1.12k, False: 295k]
  ------------------
  677|  1.12k|        goto gt;
  678|     25|      default:
  ------------------
  |  Branch (678:7): [True: 25, False: 296k]
  ------------------
  679|     25|        *nextTokPtr = ptr;
  680|     25|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     25|#define XML_TOK_INVALID 0
  ------------------
  681|   296k|      }
  682|       |      /* ptr points to closing quote */
  683|   296k|      for (;;) {
  684|   296k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   296k|#  define MINBPC(enc) 2
  ------------------
  685|   296k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   296k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   296k|    {                                                                          \
  |  |  |  |  135|   296k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   296k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   296k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 39, False: 296k]
  |  |  |  |  ------------------
  |  |  |  |  136|     39|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     39|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     39|      }                                                                        \
  |  |  |  |  138|   296k|    }
  |  |  ------------------
  ------------------
  686|   296k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   296k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   296k|  ((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: 1.21k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  687|   237k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   294k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.19k, False: 295k]
  |  |  ------------------
  |  |  111|   294k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  1.19k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  1.19k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.19k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 11, False: 1.18k]
  |  |  ------------------
  |  |  112|     11|      *nextTokPtr = ptr;                                                       \
  |  |  113|     11|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     11|    }                                                                          \
  |  |  115|   294k|    /* fall through */                                                         \
  |  |  116|   294k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 235k, False: 61.6k]
  |  |  ------------------
  |  |  117|   294k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 58.3k, False: 238k]
  |  |  ------------------
  |  |  118|   294k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|   294k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   294k|    break;                                                                     \
  |  |  120|   294k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 296k]
  |  |  |  |  ------------------
  |  |  |  |  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: 296k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     17|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 17, False: 296k]
  |  |  |  |  ------------------
  |  |  |  |  100|     17|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 13]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     13|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     26|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     13|    }                                                                          \
  |  |  |  |  106|     13|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  688|    793|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 793, False: 296k]
  ------------------
  689|  1.08k|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 295, False: 296k]
  ------------------
  690|  1.47k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 384, False: 296k]
  ------------------
  691|  1.47k|          continue;
  692|    390|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 390, False: 296k]
  ------------------
  693|  1.51k|        gt:
  694|  1.51k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.51k|#  define MINBPC(enc) 2
  ------------------
  695|  1.51k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  1.51k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|    205|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 205, False: 296k]
  ------------------
  697|    540|        sol:
  698|    540|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    540|#  define MINBPC(enc) 2
  ------------------
  699|    540|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    540|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    540|    {                                                                          \
  |  |  |  |  135|    540|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    540|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    540|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 6, False: 534]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|    540|    }
  |  |  ------------------
  ------------------
  700|    534|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    534|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    534|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 529, False: 5]
  |  |  |  |  |  Branch (739:52): [True: 525, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  701|      9|            *nextTokPtr = ptr;
  702|      9|            return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  703|      9|          }
  704|    525|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    525|#  define MINBPC(enc) 2
  ------------------
  705|    525|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|    525|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|      6|        default:
  ------------------
  |  Branch (706:9): [True: 6, False: 296k]
  ------------------
  707|      6|          *nextTokPtr = ptr;
  708|      6|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  709|   296k|        }
  710|   294k|        break;
  711|   296k|      }
  712|   294k|      break;
  713|   295k|    }
  714|   294k|    default:
  ------------------
  |  Branch (714:5): [True: 11, False: 301k]
  ------------------
  715|     11|      *nextTokPtr = ptr;
  716|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  717|   301k|    }
  718|   301k|  }
  719|     84|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     84|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  2.50k|}
xmltok.c:little2_scanRef:
  545|  19.1k|                const char **nextTokPtr) {
  546|  19.1k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  19.1k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  19.1k|    {                                                                          \
  |  |  |  |  135|  19.1k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  19.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  19.1k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 26, False: 19.0k]
  |  |  |  |  ------------------
  |  |  |  |  136|     26|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     26|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     26|      }                                                                        \
  |  |  |  |  138|  19.1k|    }
  |  |  ------------------
  ------------------
  547|  19.0k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  19.0k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  19.0k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  17.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 17.7k, False: 1.37k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  548|  5.91k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  11.9k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.35k, False: 17.7k]
  |  |  ------------------
  |  |  111|  11.9k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  1.35k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  1.35k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.35k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 12, False: 1.34k]
  |  |  ------------------
  |  |  112|     12|      *nextTokPtr = ptr;                                                       \
  |  |  113|     12|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     12|    }                                                                          \
  |  |  115|  11.9k|    /* fall through */                                                         \
  |  |  116|  11.9k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.20k, False: 15.8k]
  |  |  ------------------
  |  |  117|  11.9k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 7.36k, False: 11.7k]
  |  |  ------------------
  |  |  118|  11.9k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  11.9k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  11.9k|    break;                                                                     \
  |  |  120|  11.9k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 19.0k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 19.0k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     11|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 11, False: 19.0k]
  |  |  |  |  ------------------
  |  |  |  |  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|  7.13k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 7.13k, False: 11.9k]
  ------------------
  550|  7.13k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  7.13k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  7.13k|#  define MINBPC(enc) 2
  ------------------
  551|      7|  default:
  ------------------
  |  Branch (551:3): [True: 7, False: 19.0k]
  ------------------
  552|      7|    *nextTokPtr = ptr;
  553|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  554|  19.0k|  }
  555|  31.4k|  while (HAS_CHAR(enc, ptr, end)) {
  556|  31.4k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  31.4k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  31.4k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  27.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 27.0k, False: 4.38k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  557|  77.5k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  19.5k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 4.36k, False: 27.0k]
  |  |  ------------------
  |  |   82|  19.5k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  4.36k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  4.36k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  4.36k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 28, False: 4.33k]
  |  |  ------------------
  |  |   83|     28|      *nextTokPtr = ptr;                                                       \
  |  |   84|     28|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     28|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     28|    }                                                                          \
  |  |   86|  19.5k|    /* fall through */                                                         \
  |  |   87|  19.5k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 11.8k, False: 19.5k]
  |  |  ------------------
  |  |   88|  18.7k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 2.51k, False: 28.9k]
  |  |  ------------------
  |  |   89|  19.0k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 301, False: 31.1k]
  |  |  ------------------
  |  |   90|  19.2k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 209, False: 31.2k]
  |  |  ------------------
  |  |   91|  19.5k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 357, False: 31.0k]
  |  |  ------------------
  |  |   92|  19.5k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  19.5k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  19.5k|    break;                                                                     \
  |  |   94|  19.5k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 31.4k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 31.4k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     20|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 20, False: 31.4k]
  |  |  |  |  ------------------
  |  |  |  |   71|     20|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 16]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     16|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     32|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     16|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     16|    }                                                                          \
  |  |  |  |   77|     16|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  558|  11.8k|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 11.8k, False: 19.6k]
  ------------------
  559|  11.8k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  11.8k|#  define MINBPC(enc) 2
  ------------------
  560|  11.8k|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|  11.8k|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|      8|    default:
  ------------------
  |  Branch (561:5): [True: 8, False: 31.4k]
  ------------------
  562|      8|      *nextTokPtr = ptr;
  563|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  564|  31.4k|    }
  565|  31.4k|  }
  566|     55|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     55|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|  11.9k|}
xmltok.c:little2_scanCharRef:
  514|  7.13k|                    const char **nextTokPtr) {
  515|  7.13k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  7.13k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  7.13k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  7.13k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 7.13k, False: 3]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  7.13k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  787|  7.13k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  7.13k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 7.13k, False: 3]
  |  |  |  |  |  Branch (739:52): [True: 6.31k, False: 817]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  517|  6.31k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  6.31k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  6.31k|#  define MINBPC(enc) 2
  ------------------
  518|    820|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|    820|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|    820|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    817|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 817, False: 3]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  519|    816|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 816, False: 4]
  ------------------
  520|    816|      break;
  521|      4|    default:
  ------------------
  |  Branch (521:5): [True: 4, False: 816]
  ------------------
  522|      4|      *nextTokPtr = ptr;
  523|      4|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  524|    820|    }
  525|  1.43k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|    816|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|    624|#  define MINBPC(enc) 2
  ------------------
  526|  1.43k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.43k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.43k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.41k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.41k, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  527|    624|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 624, False: 810]
  ------------------
  528|    624|        break;
  529|    788|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 788, False: 646]
  ------------------
  530|    788|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    788|#  define MINBPC(enc) 2
  ------------------
  531|    788|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|    788|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     22|      default:
  ------------------
  |  Branch (532:7): [True: 22, False: 1.41k]
  ------------------
  533|     22|        *nextTokPtr = ptr;
  534|     22|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     22|#define XML_TOK_INVALID 0
  ------------------
  535|  1.43k|      }
  536|  1.43k|    }
  537|    816|  }
  538|      9|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      9|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  7.13k|}
xmltok.c:little2_scanHexCharRef:
  483|  6.31k|                       const char **nextTokPtr) {
  484|  6.31k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  6.31k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  6.31k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  6.31k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 6.31k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  6.31k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  6.31k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  6.31k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  6.30k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 6.30k, False: 5]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  486|  2.21k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 2.21k, False: 4.09k]
  ------------------
  487|  6.30k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 4.08k, False: 2.22k]
  ------------------
  488|  6.30k|      break;
  489|      9|    default:
  ------------------
  |  Branch (489:5): [True: 9, False: 6.30k]
  ------------------
  490|      9|      *nextTokPtr = ptr;
  491|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  492|  6.31k|    }
  493|  21.9k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  6.30k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  15.6k|#  define MINBPC(enc) 2
  ------------------
  494|  21.9k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  21.9k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  21.9k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  21.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 21.8k, False: 27]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  495|  5.82k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 5.82k, False: 16.0k]
  ------------------
  496|  15.6k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 9.78k, False: 12.1k]
  ------------------
  497|  15.6k|        break;
  498|  6.26k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 6.26k, False: 15.6k]
  ------------------
  499|  6.26k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  6.26k|#  define MINBPC(enc) 2
  ------------------
  500|  6.26k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  6.26k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|     29|      default:
  ------------------
  |  Branch (501:7): [True: 29, False: 21.8k]
  ------------------
  502|     29|        *nextTokPtr = ptr;
  503|     29|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     29|#define XML_TOK_INVALID 0
  ------------------
  504|  21.9k|      }
  505|  21.9k|    }
  506|  6.30k|  }
  507|     15|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     15|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  6.31k|}
xmltok.c:little2_cdataSectionTok:
  356|  32.7k|                        const char **nextTokPtr) {
  357|  32.7k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 125, False: 32.5k]
  ------------------
  358|    125|    return XML_TOK_NONE;
  ------------------
  |  |   51|    125|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|  32.5k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  32.5k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (359:7): [Folded - Ignored]
  ------------------
  360|  32.5k|    size_t n = end - ptr;
  361|  32.5k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  32.5k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (361:9): [True: 6.08k, False: 26.4k]
  ------------------
  362|  6.08k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  6.08k|#  define MINBPC(enc) 2
  ------------------
  363|  6.08k|      if (n == 0)
  ------------------
  |  Branch (363:11): [True: 21, False: 6.06k]
  ------------------
  364|     21|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     21|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  365|  6.06k|      end = ptr + n;
  366|  6.06k|    }
  367|  32.5k|  }
  368|  32.5k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  32.5k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  32.5k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  23.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 23.9k, False: 8.60k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  369|  3.98k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 3.98k, False: 28.5k]
  ------------------
  370|  3.98k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.98k|#  define MINBPC(enc) 2
  ------------------
  371|  3.98k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.98k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.98k|    {                                                                          \
  |  |  |  |  135|  3.98k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.98k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  3.98k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 3.98k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  3.98k|    }
  |  |  ------------------
  ------------------
  372|  3.98k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  787|  3.98k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  3.98k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 2.34k, False: 1.63k]
  |  |  |  |  |  Branch (739:52): [True: 1.67k, False: 674]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  373|  2.30k|      break;
  374|  1.67k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.67k|#  define MINBPC(enc) 2
  ------------------
  375|  1.67k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.67k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.67k|    {                                                                          \
  |  |  |  |  135|  1.67k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.67k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.67k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 1.67k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  1.67k|    }
  |  |  ------------------
  ------------------
  376|  1.67k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  1.67k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.67k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 858, False: 812]
  |  |  |  |  |  Branch (739:52): [True: 237, False: 621]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  377|  1.43k|      ptr -= MINBPC(enc);
  ------------------
  |  |  783|  1.43k|#  define MINBPC(enc) 2
  ------------------
  378|  1.43k|      break;
  379|  1.43k|    }
  380|    237|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    237|#  define MINBPC(enc) 2
  ------------------
  381|    237|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|    237|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  13.5k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 13.5k, False: 19.0k]
  ------------------
  383|  13.5k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  13.5k|#  define MINBPC(enc) 2
  ------------------
  384|  13.5k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  13.5k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  13.5k|    {                                                                          \
  |  |  |  |  135|  13.5k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  13.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  13.5k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 12, False: 13.4k]
  |  |  |  |  ------------------
  |  |  |  |  136|     12|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     12|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     12|      }                                                                        \
  |  |  |  |  138|  13.5k|    }
  |  |  ------------------
  ------------------
  385|  13.4k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  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|  6.16k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 6.16k, False: 7.32k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 3.45k, False: 10.0k]
  ------------------
  386|  3.45k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.45k|#  define MINBPC(enc) 2
  ------------------
  387|  13.4k|    *nextTokPtr = ptr;
  388|  13.4k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  13.4k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  4.06k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 4.06k, False: 28.4k]
  ------------------
  390|  4.06k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  4.06k|#  define MINBPC(enc) 2
  ------------------
  391|  4.06k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  4.06k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  11.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: 32.5k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 32.5k]
  |  |  |  |  ------------------
  |  |  |  |   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.75k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  5.69k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 5.75k, False: 26.8k]
  |  |  |  |  ------------------
  |  |  |  |   50|  5.75k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 59, False: 5.69k]
  |  |  |  |  ------------------
  |  |  |  |   51|  5.69k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     59|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  5.69k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  5.69k|#    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.69k|    ptr += n;                                                                  \
  |  |  |  |   57|  5.69k|    break;
  |  |  ------------------
  |  |   63|  5.69k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 52, False: 32.5k]
  |  |  ------------------
  |  |   64|     52|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 32.5k]
  |  |  ------------------
  |  |   65|     60|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 8, False: 32.5k]
  |  |  ------------------
  |  |   66|     60|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     60|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     60|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  5.19k|  default:
  ------------------
  |  Branch (393:3): [True: 5.19k, False: 27.3k]
  ------------------
  394|  5.19k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  5.19k|#  define MINBPC(enc) 2
  ------------------
  395|  5.19k|    break;
  396|  32.5k|  }
  397|   345k|  while (HAS_CHAR(enc, ptr, end)) {
  398|   345k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   345k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   345k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  38.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 38.4k, False: 307k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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: 345k]
  |  |  ------------------
  |  |  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: 345k]
  |  |  ------------------
  |  |  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|  27.0k|      LEAD_CASE(4)
  ------------------
  |  |  400|  26.9k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 27.0k, False: 318k]
  |  |  ------------------
  |  |  401|  27.0k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  26.9k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 53, False: 26.9k]
  |  |  ------------------
  |  |  402|     53|      *nextTokPtr = ptr;                                                       \
  |  |  403|     53|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     53|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|     53|    }                                                                          \
  |  |  405|  26.9k|    ptr += n;                                                                  \
  |  |  406|  26.9k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|     49|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 49, False: 345k]
  ------------------
  412|     49|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 0, False: 345k]
  ------------------
  413|     53|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 4, False: 345k]
  ------------------
  414|  8.51k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 8.46k, False: 337k]
  ------------------
  415|  11.7k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 3.28k, False: 342k]
  ------------------
  416|  14.4k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 2.65k, False: 343k]
  ------------------
  417|  14.4k|      *nextTokPtr = ptr;
  418|  14.4k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  14.4k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|   304k|    default:
  ------------------
  |  Branch (419:5): [True: 304k, False: 41.4k]
  ------------------
  420|   304k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   304k|#  define MINBPC(enc) 2
  ------------------
  421|   304k|      break;
  422|   345k|    }
  423|   345k|  }
  424|    120|  *nextTokPtr = ptr;
  425|    120|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    120|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  14.6k|}
xmltok.c:little2_attributeValueTok:
 1262|  43.7k|                          const char **nextTokPtr) {
 1263|  43.7k|  const char *start;
 1264|  43.7k|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 4.12k, False: 39.6k]
  ------------------
 1265|  4.12k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  4.12k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|  39.6k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  39.6k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  39.6k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  39.6k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 39.6k]
  ------------------
 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|  39.6k|  start = ptr;
 1275|   730k|  while (HAS_CHAR(enc, ptr, end)) {
 1276|   730k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   730k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   730k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  69.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 69.7k, False: 661k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 730k]
  |  |  ------------------
  |  | 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: 730k]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1283|  69.4k|      LEAD_CASE(4)
  ------------------
  |  | 1278|  69.4k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 69.4k, False: 661k]
  |  |  ------------------
  |  | 1279|  69.4k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  69.4k|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|  6.19k|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 6.19k, False: 724k]
  ------------------
 1286|  6.19k|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 3.59k, False: 2.60k]
  ------------------
 1287|  3.59k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  3.59k|#  define PREFIX(ident) little2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  3.59k|#  define MINBPC(enc) 2
  ------------------
 1288|  2.60k|      *nextTokPtr = ptr;
 1289|  2.60k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.60k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      1|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 1, False: 730k]
  ------------------
 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|  3.88k|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 3.88k, False: 727k]
  ------------------
 1295|  3.88k|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 2.14k, False: 1.74k]
  ------------------
 1296|  2.14k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.14k|#  define MINBPC(enc) 2
  ------------------
 1297|  2.14k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  2.14k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|  2.14k|      }
 1299|  1.74k|      *nextTokPtr = ptr;
 1300|  1.74k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.74k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|  16.6k|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 16.6k, False: 714k]
  ------------------
 1302|  16.6k|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 9.74k, False: 6.88k]
  ------------------
 1303|  9.74k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  9.74k|#  define MINBPC(enc) 2
  ------------------
 1304|  9.74k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  9.74k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  9.74k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  9.74k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 553, False: 9.19k]
  ------------------
 1305|    553|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    553|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|  9.19k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  9.19k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  9.19k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.04k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 5.04k, False: 4.14k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 344, False: 8.84k]
  ------------------
 1307|    344|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    344|#  define MINBPC(enc) 2
  ------------------
 1308|  9.19k|        *nextTokPtr = ptr;
 1309|  9.19k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  9.19k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|  9.74k|      }
 1311|  6.88k|      *nextTokPtr = ptr;
 1312|  6.88k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  6.88k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  11.8k|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 11.8k, False: 719k]
  ------------------
 1314|  11.8k|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 6.31k, False: 5.56k]
  ------------------
 1315|  6.31k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  6.31k|#  define MINBPC(enc) 2
  ------------------
 1316|  6.31k|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  6.31k|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  6.31k|      }
 1318|  5.56k|      *nextTokPtr = ptr;
 1319|  5.56k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  5.56k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|   622k|    default:
  ------------------
  |  Branch (1320:5): [True: 622k, False: 108k]
  ------------------
 1321|   622k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   622k|#  define MINBPC(enc) 2
  ------------------
 1322|   622k|      break;
 1323|   730k|    }
 1324|   730k|  }
 1325|  1.05k|  *nextTokPtr = ptr;
 1326|  1.05k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.05k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|  39.6k|}
xmltok.c:little2_entityValueTok:
 1331|  38.8k|                       const char **nextTokPtr) {
 1332|  38.8k|  const char *start;
 1333|  38.8k|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 1.31k, False: 37.5k]
  ------------------
 1334|  1.31k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.31k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|  37.5k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  37.5k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  37.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  37.5k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 37.5k]
  ------------------
 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|  37.5k|  start = ptr;
 1344|  1.85M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  1.85M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.85M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.85M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  84.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 84.6k, False: 1.77M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 1.85M]
  |  |  ------------------
  |  | 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: 1.85M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1352|  91.4k|      LEAD_CASE(4)
  ------------------
  |  | 1347|  91.4k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 91.4k, False: 1.76M]
  |  |  ------------------
  |  | 1348|  91.4k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|  91.4k|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  1.54k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 1.54k, False: 1.85M]
  ------------------
 1355|  1.54k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 882, False: 665]
  ------------------
 1356|    882|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    882|#  define PREFIX(ident) little2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    882|#  define MINBPC(enc) 2
  ------------------
 1357|    665|      *nextTokPtr = ptr;
 1358|    665|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    665|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      5|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 5, False: 1.85M]
  ------------------
 1360|      5|      if (ptr == start) {
  ------------------
  |  Branch (1360:11): [True: 3, False: 2]
  ------------------
 1361|      3|        int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|      3|#  define PREFIX(ident) little2_##ident
  ------------------
                      int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|      3|#  define MINBPC(enc) 2
  ------------------
 1362|      3|        return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   89|      3|#define XML_TOK_PERCENT 22
  ------------------
                      return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (1362:16): [True: 1, False: 2]
  ------------------
 1363|      3|      }
 1364|      2|      *nextTokPtr = ptr;
 1365|      2|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|      2|#define XML_TOK_DATA_CHARS 6
  ------------------
 1366|  3.29k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 3.29k, False: 1.85M]
  ------------------
 1367|  3.29k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 1.85k, False: 1.43k]
  ------------------
 1368|  1.85k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.85k|#  define MINBPC(enc) 2
  ------------------
 1369|  1.85k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  1.85k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|  1.85k|      }
 1371|  1.43k|      *nextTokPtr = ptr;
 1372|  1.43k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.43k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|  31.9k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 31.9k, False: 1.82M]
  ------------------
 1374|  31.9k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 16.9k, False: 14.9k]
  ------------------
 1375|  16.9k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  16.9k|#  define MINBPC(enc) 2
  ------------------
 1376|  16.9k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  16.9k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  16.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  16.9k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 492, False: 16.4k]
  ------------------
 1377|    492|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    492|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|  16.4k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  16.4k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  16.4k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.59k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 5.59k, False: 10.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 356, False: 16.1k]
  ------------------
 1379|    356|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    356|#  define MINBPC(enc) 2
  ------------------
 1380|  16.4k|        *nextTokPtr = ptr;
 1381|  16.4k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  16.4k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|  16.9k|      }
 1383|  14.9k|      *nextTokPtr = ptr;
 1384|  14.9k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  14.9k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  1.72M|    default:
  ------------------
  |  Branch (1385:5): [True: 1.72M, False: 128k]
  ------------------
 1386|  1.72M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.72M|#  define MINBPC(enc) 2
  ------------------
 1387|  1.72M|      break;
 1388|  1.85M|    }
 1389|  1.85M|  }
 1390|    761|  *nextTokPtr = ptr;
 1391|    761|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    761|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|  37.5k|}
xmltok.c:little2_nameMatchesAscii:
 1715|  23.7k|                         const char *end1, const char *ptr2) {
 1716|  23.7k|  UNUSED_P(enc);
  ------------------
  |  |  135|  23.7k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|   101k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  783|  77.6k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1717:10): [True: 87.4k, False: 13.9k]
  ------------------
 1718|  87.4k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  783|  87.4k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1718:9): [True: 36, False: 87.3k]
  ------------------
 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|     36|      return 0; /* LCOV_EXCL_LINE */
 1725|     36|    }
 1726|  87.3k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  787|  87.3k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  87.3k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 87.3k, False: 31]
  |  |  |  |  |  Branch (739:52): [True: 77.6k, False: 9.74k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1727|  9.77k|      return 0;
 1728|  87.3k|  }
 1729|  13.9k|  return ptr1 == end1;
 1730|  23.7k|}
xmltok.c:little2_nameLength:
 1733|  12.7k|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  12.7k|  const char *start = ptr;
 1735|  36.8k|  for (;;) {
 1736|  36.8k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  36.8k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  36.8k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  26.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 26.6k, False: 10.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1737|      0|#  define LEAD_CASE(n)                                                         \
 1738|      0|  case BT_LEAD##n:                                                             \
 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1740|      0|    break;
 1741|      0|      LEAD_CASE(2)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 36.8k]
  |  |  ------------------
  |  | 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: 36.8k]
  |  |  ------------------
  |  | 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: 36.8k]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1744|      0|#  undef LEAD_CASE
 1745|  10.1k|    case BT_NONASCII:
  ------------------
  |  Branch (1745:5): [True: 10.1k, False: 26.6k]
  ------------------
 1746|  20.4k|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 10.2k, False: 26.5k]
  ------------------
 1747|  20.4k|#  ifdef XML_NS
 1748|  20.4k|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 36.8k]
  ------------------
 1749|  20.4k|#  endif
 1750|  23.7k|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 3.31k, False: 33.5k]
  ------------------
 1751|  23.8k|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 97, False: 36.7k]
  ------------------
 1752|  24.0k|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 252, False: 36.5k]
  ------------------
 1753|  24.1k|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 24, False: 36.8k]
  ------------------
 1754|  24.1k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  24.1k|#  define MINBPC(enc) 2
  ------------------
 1755|  24.1k|      break;
 1756|  12.7k|    default:
  ------------------
  |  Branch (1756:5): [True: 12.7k, False: 24.1k]
  ------------------
 1757|  12.7k|      return (int)(ptr - start);
 1758|  36.8k|    }
 1759|  36.8k|  }
 1760|  12.7k|}
xmltok.c:little2_getAtts:
 1510|  8.70k|                ATTRIBUTE *atts) {
 1511|  8.70k|  enum { other, inName, inValue } state = inName;
 1512|  8.70k|  int nAtts = 0;
 1513|  8.70k|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  9.20M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  8.70k|#  define MINBPC(enc) 2
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  9.19M|#  define MINBPC(enc) 2
  ------------------
 1517|  9.20M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  9.20M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  9.20M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.98M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.98M, False: 4.22M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1518|      0|#  define START_NAME                                                           \
 1519|      0|    if (state == other) {                                                      \
 1520|      0|      if (nAtts < attsMax) {                                                   \
 1521|      0|        atts[nAtts].name = ptr;                                                \
 1522|      0|        atts[nAtts].normalized = 1;                                            \
 1523|      0|      }                                                                        \
 1524|      0|      state = inName;                                                          \
 1525|      0|    }
 1526|      0|#  define LEAD_CASE(n)                                                         \
 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
 1529|      0|    break;
 1530|      0|      LEAD_CASE(2)
  ------------------
  |  | 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 0, False: 9.20M]
  |  |  ------------------
  |  | 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|      0|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  783|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|      0|    break;
  ------------------
 1531|      0|      LEAD_CASE(3)
  ------------------
  |  | 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 0, False: 9.20M]
  |  |  ------------------
  |  | 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|  98.9k|      LEAD_CASE(4)
  ------------------
  |  | 1527|  98.9k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 98.9k, False: 9.10M]
  |  |  ------------------
  |  | 1528|  98.9k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  98.9k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 98.9k]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  783|  98.9k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|  98.9k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|  4.12M|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 4.12M, False: 5.08M]
  ------------------
 1535|  4.72M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 601k, False: 8.60M]
  ------------------
 1536|  4.86M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 142k, False: 9.06M]
  ------------------
 1537|  4.86M|      START_NAME
  ------------------
  |  | 1519|  4.86M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 575k, False: 4.29M]
  |  |  ------------------
  |  | 1520|   575k|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 290k, False: 284k]
  |  |  ------------------
  |  | 1521|   290k|        atts[nAtts].name = ptr;                                                \
  |  | 1522|   290k|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|   290k|      }                                                                        \
  |  | 1524|   575k|      state = inName;                                                          \
  |  | 1525|   575k|    }
  ------------------
 1538|  4.86M|      break;
 1539|      0|#  undef START_NAME
 1540|  29.7k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 29.7k, False: 9.17M]
  ------------------
 1541|  29.7k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 14.5k, False: 15.2k]
  ------------------
 1542|  14.5k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 8.69k, False: 5.81k]
  ------------------
 1543|  8.69k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  8.69k|#  define MINBPC(enc) 2
  ------------------
 1544|  14.5k|        state = inValue;
 1545|  14.5k|        open = BT_QUOT;
 1546|  15.2k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 14.5k, False: 693]
  ------------------
 1547|  14.5k|        state = other;
 1548|  14.5k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 8.69k, False: 5.81k]
  ------------------
 1549|  8.69k|          atts[nAtts].valueEnd = ptr;
 1550|  14.5k|        nAtts++;
 1551|  14.5k|      }
 1552|  29.7k|      break;
 1553|  1.12M|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 1.12M, False: 8.07M]
  ------------------
 1554|  1.12M|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 560k, False: 565k]
  ------------------
 1555|   560k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 281k, False: 278k]
  ------------------
 1556|   281k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|   281k|#  define MINBPC(enc) 2
  ------------------
 1557|   560k|        state = inValue;
 1558|   560k|        open = BT_APOS;
 1559|   565k|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 560k, False: 5.31k]
  ------------------
 1560|   560k|        state = other;
 1561|   560k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 281k, False: 278k]
  ------------------
 1562|   281k|          atts[nAtts].valueEnd = ptr;
 1563|   560k|        nAtts++;
 1564|   560k|      }
 1565|  1.12M|      break;
 1566|  4.45k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 4.45k, False: 9.19M]
  ------------------
 1567|  4.45k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 3.96k, False: 489]
  ------------------
 1568|  3.96k|        atts[nAtts].normalized = 0;
 1569|  4.45k|      break;
 1570|  1.55M|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 1.55M, False: 7.64M]
  ------------------
 1571|  1.55M|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 1.89k, False: 1.55M]
  ------------------
 1572|  1.89k|        state = other;
 1573|  1.55M|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 984k, False: 569k]
  |  Branch (1573:36): [True: 496k, False: 488k]
  |  Branch (1573:55): [True: 249k, False: 247k]
  ------------------
 1574|  1.55M|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 43.7k, False: 205k]
  ------------------
 1575|   249k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  786|   205k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|   205k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 205k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|   454k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 8.74k, False: 196k]
  ------------------
 1576|   249k|                   || 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: 188k, False: 8.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|   445k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 103k, False: 93.6k]
  ------------------
 1577|   249k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  785|  93.6k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  93.6k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  85.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 85.4k, False: 8.24k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 85.0k, False: 8.61k]
  ------------------
 1578|   240k|        atts[nAtts].normalized = 0;
 1579|  1.55M|      break;
 1580|   210k|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 210k, False: 8.99M]
  ------------------
 1581|   219k|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 9.72k, False: 9.19M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|   219k|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 2.45k, False: 217k]
  ------------------
 1585|  2.45k|        state = other;
 1586|   217k|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 211k, False: 5.81k]
  |  Branch (1586:36): [True: 111k, False: 99.6k]
  ------------------
 1587|   111k|        atts[nAtts].normalized = 0;
 1588|   219k|      break;
 1589|   248k|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 248k, False: 8.95M]
  ------------------
 1590|   306k|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 58.3k, False: 9.14M]
  ------------------
 1591|   306k|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 8.70k, False: 297k]
  ------------------
 1592|  8.70k|        return nAtts;
 1593|   297k|      break;
 1594|   996k|    default:
  ------------------
  |  Branch (1594:5): [True: 996k, False: 8.20M]
  ------------------
 1595|   996k|      break;
 1596|  9.20M|    }
 1597|  9.20M|  }
 1598|       |  /* not reached */
 1599|  8.70k|}
xmltok.c:little2_charRefNumber:
 1602|  5.29k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  5.29k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  5.29k|  UNUSED_P(enc);
  ------------------
  |  |  135|  5.29k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  5.29k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  783|  5.29k|#  define MINBPC(enc) 2
  ------------------
 1607|  5.29k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  787|  5.29k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  5.29k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 5.29k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 4.81k, False: 487]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1608|  21.3k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  783|  4.81k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  787|  21.3k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  21.3k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 21.3k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 4.78k, False: 16.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1609|  16.5k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  16.5k|#  define MINBPC(enc) 2
  ------------------
 1610|  16.5k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  786|  16.5k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  16.5k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 16.5k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1611|  16.5k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 16.5k]
  ------------------
 1612|    650|      case ASCII_0:
  ------------------
  |  |   90|    650|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 650, False: 15.9k]
  ------------------
 1613|    897|      case ASCII_1:
  ------------------
  |  |   91|    897|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 247, False: 16.3k]
  ------------------
 1614|  1.64k|      case ASCII_2:
  ------------------
  |  |   92|  1.64k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 743, False: 15.8k]
  ------------------
 1615|  3.06k|      case ASCII_3:
  ------------------
  |  |   93|  3.06k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 1.42k, False: 15.1k]
  ------------------
 1616|  4.08k|      case ASCII_4:
  ------------------
  |  |   94|  4.08k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 1.01k, False: 15.5k]
  ------------------
 1617|  4.56k|      case ASCII_5:
  ------------------
  |  |   95|  4.56k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 486, False: 16.0k]
  ------------------
 1618|  4.93k|      case ASCII_6:
  ------------------
  |  |   96|  4.93k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 365, False: 16.2k]
  ------------------
 1619|  5.74k|      case ASCII_7:
  ------------------
  |  |   97|  5.74k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 812, False: 15.7k]
  ------------------
 1620|  6.18k|      case ASCII_8:
  ------------------
  |  |   98|  6.18k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 441, False: 16.1k]
  ------------------
 1621|  6.43k|      case ASCII_9:
  ------------------
  |  |   99|  6.43k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 253, False: 16.3k]
  ------------------
 1622|  6.43k|        result <<= 4;
 1623|  6.43k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  6.43k|#define ASCII_0 0x30
  ------------------
 1624|  6.43k|        break;
 1625|    488|      case ASCII_A:
  ------------------
  |  |   36|    488|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 488, False: 16.0k]
  ------------------
 1626|    780|      case ASCII_B:
  ------------------
  |  |   37|    780|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 292, False: 16.2k]
  ------------------
 1627|  1.30k|      case ASCII_C:
  ------------------
  |  |   38|  1.30k|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 522, False: 16.0k]
  ------------------
 1628|  1.58k|      case ASCII_D:
  ------------------
  |  |   39|  1.58k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 280, False: 16.2k]
  ------------------
 1629|  2.07k|      case ASCII_E:
  ------------------
  |  |   40|  2.07k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 494, False: 16.0k]
  ------------------
 1630|  3.68k|      case ASCII_F:
  ------------------
  |  |   41|  3.68k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 1.60k, False: 14.9k]
  ------------------
 1631|  3.68k|        result <<= 4;
 1632|  3.68k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  3.68k|#define ASCII_A 0x41
  ------------------
 1633|  3.68k|        break;
 1634|  1.70k|      case ASCII_a:
  ------------------
  |  |   63|  1.70k|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 1.70k, False: 14.8k]
  ------------------
 1635|  2.62k|      case ASCII_b:
  ------------------
  |  |   64|  2.62k|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 921, False: 15.6k]
  ------------------
 1636|  2.84k|      case ASCII_c:
  ------------------
  |  |   65|  2.84k|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 219, False: 16.3k]
  ------------------
 1637|  4.66k|      case ASCII_d:
  ------------------
  |  |   66|  4.66k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 1.82k, False: 14.7k]
  ------------------
 1638|  5.99k|      case ASCII_e:
  ------------------
  |  |   67|  5.99k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 1.32k, False: 15.2k]
  ------------------
 1639|  6.45k|      case ASCII_f:
  ------------------
  |  |   68|  6.45k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 460, False: 16.1k]
  ------------------
 1640|  6.45k|        result <<= 4;
 1641|  6.45k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  6.45k|#define ASCII_a 0x61
  ------------------
 1642|  6.45k|        break;
 1643|  16.5k|      }
 1644|  16.5k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 24, False: 16.5k]
  ------------------
 1645|     24|        return -1;
 1646|  16.5k|    }
 1647|  4.81k|  } else {
 1648|  1.28k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  787|  1.28k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.28k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.28k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 482, False: 803]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|    798|#  define MINBPC(enc) 2
  ------------------
 1649|    803|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  786|    803|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|    803|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 803, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1650|    803|      result *= 10;
 1651|    803|      result += (c - ASCII_0);
  ------------------
  |  |   90|    803|#define ASCII_0 0x30
  ------------------
 1652|    803|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 5, False: 798]
  ------------------
 1653|      5|        return -1;
 1654|    803|    }
 1655|    487|  }
 1656|  5.26k|  return checkCharRefNumber(result);
 1657|  5.29k|}
xmltok.c:little2_predefinedEntityName:
 1661|  9.67k|                             const char *end) {
 1662|  9.67k|  UNUSED_P(enc);
  ------------------
  |  |  135|  9.67k|#  define UNUSED_P(p) (void)p
  ------------------
 1663|  9.67k|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  783|  9.67k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1663:11): [True: 2.92k, False: 6.75k]
  ------------------
 1664|  1.10k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 1.10k, False: 8.57k]
  ------------------
 1665|  1.10k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  787|  1.10k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.10k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 862, False: 240]
  |  |  |  |  |  Branch (739:52): [True: 356, False: 506]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1666|    356|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|    356|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|    356|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:34): [True: 87, False: 269]
  |  |  |  |  |  Branch (738:35): [True: 284, False: 72]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1667|    138|      case ASCII_l:
  ------------------
  |  |   74|    138|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 138, False: 218]
  ------------------
 1668|    138|        return ASCII_LT;
  ------------------
  |  |  111|    138|#define ASCII_LT 0x3C
  ------------------
 1669|    131|      case ASCII_g:
  ------------------
  |  |   69|    131|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 131, False: 225]
  ------------------
 1670|    131|        return ASCII_GT;
  ------------------
  |  |  113|    131|#define ASCII_GT 0x3E
  ------------------
 1671|    356|      }
 1672|    356|    }
 1673|    833|    break;
 1674|  1.87k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.87k, False: 7.80k]
  ------------------
 1675|  1.87k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  787|  1.87k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.87k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.58k, False: 282]
  |  |  |  |  |  Branch (739:52): [True: 1.30k, False: 283]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1676|  1.30k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.30k|#  define MINBPC(enc) 2
  ------------------
 1677|  1.30k|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  787|  1.30k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.30k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.04k, False: 258]
  |  |  |  |  |  Branch (739:52): [True: 803, False: 245]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1678|    803|        ptr += MINBPC(enc);
  ------------------
  |  |  783|    803|#  define MINBPC(enc) 2
  ------------------
 1679|    803|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  787|    803|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    803|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 606, False: 197]
  |  |  |  |  |  Branch (739:52): [True: 248, False: 358]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1680|    248|          return ASCII_AMP;
  ------------------
  |  |  105|    248|#define ASCII_AMP 0x26
  ------------------
 1681|    803|      }
 1682|  1.30k|    }
 1683|  1.62k|    break;
 1684|  3.78k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 3.78k, False: 5.89k]
  ------------------
 1685|  3.78k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  3.78k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  3.78k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:34): [True: 245, False: 3.53k]
  |  |  |  |  |  Branch (738:35): [True: 3.55k, False: 229]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1686|  1.47k|    case ASCII_q:
  ------------------
  |  |   79|  1.47k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 1.47k, False: 2.31k]
  ------------------
 1687|  1.47k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.47k|#  define MINBPC(enc) 2
  ------------------
 1688|  1.47k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  787|  1.47k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.47k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.27k, False: 197]
  |  |  |  |  |  Branch (739:52): [True: 1.07k, False: 201]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1689|  1.07k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.07k|#  define MINBPC(enc) 2
  ------------------
 1690|  1.07k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  787|  1.07k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.07k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 875, False: 197]
  |  |  |  |  |  Branch (739:52): [True: 663, False: 212]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1691|    663|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    663|#  define MINBPC(enc) 2
  ------------------
 1692|    663|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  787|    663|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    663|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 464, False: 199]
  |  |  |  |  |  Branch (739:52): [True: 260, False: 204]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1693|    260|            return ASCII_QUOT;
  ------------------
  |  |  104|    260|#define ASCII_QUOT 0x22
  ------------------
 1694|    663|        }
 1695|  1.07k|      }
 1696|  1.21k|      break;
 1697|  2.06k|    case ASCII_a:
  ------------------
  |  |   63|  2.06k|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 2.06k, False: 1.71k]
  ------------------
 1698|  2.06k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.06k|#  define MINBPC(enc) 2
  ------------------
 1699|  2.06k|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  787|  2.06k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.06k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.85k, False: 213]
  |  |  |  |  |  Branch (739:52): [True: 1.62k, False: 227]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1700|  1.62k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.62k|#  define MINBPC(enc) 2
  ------------------
 1701|  1.62k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  787|  1.62k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.62k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.43k, False: 195]
  |  |  |  |  |  Branch (739:52): [True: 1.18k, False: 243]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1702|  1.18k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.18k|#  define MINBPC(enc) 2
  ------------------
 1703|  1.18k|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  787|  1.18k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.18k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 854, False: 334]
  |  |  |  |  |  Branch (739:52): [True: 69, False: 785]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1704|     69|            return ASCII_APOS;
  ------------------
  |  |  106|     69|#define ASCII_APOS 0x27
  ------------------
 1705|  1.18k|        }
 1706|  1.62k|      }
 1707|  1.99k|      break;
 1708|  3.78k|    }
 1709|  9.67k|  }
 1710|  8.83k|  return 0;
 1711|  9.67k|}
xmltok.c:little2_updatePosition:
 1779|  3.29k|                       POSITION *pos) {
 1780|  2.43M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  2.43M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.43M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.43M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   271k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 271k, False: 2.16M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 2.43M]
  |  |  ------------------
  |  | 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: 2.43M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1789|   118k|      LEAD_CASE(4)
  ------------------
  |  | 1783|   118k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 118k, False: 2.31M]
  |  |  ------------------
  |  | 1784|   118k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|   118k|    pos->columnNumber++;                                                       \
  |  | 1786|   118k|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|  12.5k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 12.5k, False: 2.42M]
  ------------------
 1792|  12.5k|      pos->columnNumber = 0;
 1793|  12.5k|      pos->lineNumber++;
 1794|  12.5k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  12.5k|#  define MINBPC(enc) 2
  ------------------
 1795|  12.5k|      break;
 1796|  28.7k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 28.7k, False: 2.40M]
  ------------------
 1797|  28.7k|      pos->lineNumber++;
 1798|  28.7k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  28.7k|#  define MINBPC(enc) 2
  ------------------
 1799|  28.7k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|  28.7k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  57.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  28.7k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 28.7k, False: 43]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  28.7k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  28.7k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  17.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 17.3k, False: 11.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 3.44k, False: 25.2k]
  ------------------
 1800|  3.44k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.44k|#  define MINBPC(enc) 2
  ------------------
 1801|  28.7k|      pos->columnNumber = 0;
 1802|  28.7k|      break;
 1803|  2.27M|    default:
  ------------------
  |  Branch (1803:5): [True: 2.27M, False: 160k]
  ------------------
 1804|  2.27M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.27M|#  define MINBPC(enc) 2
  ------------------
 1805|  2.27M|      pos->columnNumber++;
 1806|  2.27M|      break;
 1807|  2.43M|    }
 1808|  2.43M|  }
 1809|  3.29k|}
xmltok.c:little2_isPublicId:
 1450|  1.35k|                   const char **badPtr) {
 1451|  1.35k|  ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.35k|#  define MINBPC(enc) 2
  ------------------
 1452|  1.35k|  end -= MINBPC(enc);
  ------------------
  |  |  783|  1.35k|#  define MINBPC(enc) 2
  ------------------
 1453|  13.5k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  13.4k|#  define MINBPC(enc) 2
  ------------------
 1454|  13.5k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  13.5k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  13.5k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  13.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 13.4k, False: 31]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1455|    211|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 211, False: 13.2k]
  ------------------
 1456|  1.01k|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 799, False: 12.7k]
  ------------------
 1457|  1.32k|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 317, False: 13.1k]
  ------------------
 1458|  1.58k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 258, False: 13.2k]
  ------------------
 1459|  3.29k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 1.71k, False: 11.7k]
  ------------------
 1460|  4.60k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 1.31k, False: 12.1k]
  ------------------
 1461|  5.36k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 751, False: 12.7k]
  ------------------
 1462|  5.96k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 600, False: 12.9k]
  ------------------
 1463|  6.88k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 922, False: 12.5k]
  ------------------
 1464|  7.18k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 307, False: 13.2k]
  ------------------
 1465|  7.50k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 313, False: 13.1k]
  ------------------
 1466|  7.70k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 205, False: 13.3k]
  ------------------
 1467|  8.15k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 451, False: 13.0k]
  ------------------
 1468|  8.37k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 212, False: 13.2k]
  ------------------
 1469|  8.81k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 443, False: 13.0k]
  ------------------
 1470|  9.03k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 224, False: 13.2k]
  ------------------
 1471|  9.23k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 202, False: 13.3k]
  ------------------
 1472|  9.97k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 732, False: 12.7k]
  ------------------
 1473|  9.97k|#  ifdef XML_NS
 1474|  9.97k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 13.5k]
  ------------------
 1475|  9.97k|#  endif
 1476|  9.97k|      break;
 1477|  1.56k|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 1.56k, False: 11.9k]
  ------------------
 1478|  1.56k|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  787|  1.56k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.56k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.56k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 1.56k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1479|      1|        *badPtr = ptr;
 1480|      1|        return 0;
 1481|      1|      }
 1482|  1.56k|      break;
 1483|  1.56k|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 233, False: 13.2k]
  ------------------
 1484|  1.48k|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 1.24k, False: 12.2k]
  ------------------
 1485|  1.48k|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  786|  1.48k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  1.48k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 1.48k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1485:11): [True: 1.47k, False: 7]
  ------------------
 1486|  1.47k|        break;
 1487|       |      /* fall through */
 1488|    503|    default:
  ------------------
  |  Branch (1488:5): [True: 496, False: 13.0k]
  ------------------
 1489|    503|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|    503|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|    503|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 472, False: 31]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1490|    257|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 257, False: 246]
  ------------------
 1491|    465|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 208, False: 295]
  ------------------
 1492|    465|        break;
 1493|     38|      default:
  ------------------
  |  Branch (1493:7): [True: 38, False: 465]
  ------------------
 1494|     38|        *badPtr = ptr;
 1495|     38|        return 0;
 1496|    503|      }
 1497|    465|      break;
 1498|  13.5k|    }
 1499|  13.5k|  }
 1500|  1.31k|  return 1;
 1501|  1.35k|}
xmltok.c:big2_prologTok:
 1018|  92.7k|                  const char **nextTokPtr) {
 1019|  92.7k|  int tok;
 1020|  92.7k|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 274, False: 92.4k]
  ------------------
 1021|    274|    return XML_TOK_NONE;
  ------------------
  |  |   51|    274|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  92.4k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  92.4k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|  92.4k|    size_t n = end - ptr;
 1024|  92.4k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  92.4k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1024:9): [True: 33.4k, False: 59.0k]
  ------------------
 1025|  33.4k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  33.4k|#  define MINBPC(enc) 2
  ------------------
 1026|  33.4k|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 22, False: 33.4k]
  ------------------
 1027|     22|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     22|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|  33.4k|      end = ptr + n;
 1029|  33.4k|    }
 1030|  92.4k|  }
 1031|  92.4k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  92.4k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  92.4k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  90.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 90.6k, False: 1.81k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1032|  1.20k|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 1.20k, False: 91.2k]
  ------------------
 1033|  1.20k|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  1.20k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  1.20k|#  define MINBPC(enc) 2
  ------------------
 1034|  6.33k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 6.33k, False: 86.0k]
  ------------------
 1035|  6.33k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  6.33k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  6.33k|#  define MINBPC(enc) 2
  ------------------
 1036|  12.1k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 12.1k, False: 80.2k]
  ------------------
 1037|  12.1k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  12.1k|#  define MINBPC(enc) 2
  ------------------
 1038|  12.1k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  12.1k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  12.1k|    {                                                                          \
  |  |  |  |  135|  12.1k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  12.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  12.1k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 12.1k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  12.1k|    }
  |  |  ------------------
  ------------------
 1039|  12.1k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  12.1k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  12.1k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  10.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 12, False: 12.1k]
  |  |  |  |  |  Branch (870:4): [True: 10.4k, False: 1.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  5.84k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 5.84k, False: 6.33k]
  ------------------
 1041|  5.84k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  5.84k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  5.84k|#  define MINBPC(enc) 2
  ------------------
 1042|  2.90k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 2.90k, False: 9.28k]
  ------------------
 1043|  2.90k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  2.90k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  2.90k|#  define MINBPC(enc) 2
  ------------------
 1044|  1.05k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 1.05k, False: 11.1k]
  ------------------
 1045|  1.70k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 645, False: 11.5k]
  ------------------
 1046|  3.40k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 1.70k, False: 10.4k]
  ------------------
 1047|  3.40k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 0, False: 12.1k]
  ------------------
 1048|  3.40k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 0, False: 12.1k]
  ------------------
 1049|  3.42k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 20, False: 12.1k]
  ------------------
 1050|  3.42k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  916|  3.42k|#  define MINBPC(enc) 2
  ------------------
 1051|  3.42k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  3.42k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  12.1k|    }
 1053|     12|    *nextTokPtr = ptr;
 1054|     12|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
 1055|  12.1k|  }
 1056|  6.84k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 6.84k, False: 85.5k]
  ------------------
 1057|  6.84k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  916|  6.84k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1057:9): [True: 74, False: 6.77k]
  ------------------
 1058|     74|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|     74|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|     74|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|     74|    }
 1062|       |    /* fall through */
 1063|  23.4k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 16.6k, False: 75.7k]
  ------------------
 1064|  28.2k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 4.74k, False: 87.6k]
  ------------------
 1065|  31.9k|    for (;;) {
 1066|  31.9k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  31.9k|#  define MINBPC(enc) 2
  ------------------
 1067|  31.9k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  31.9k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  31.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  31.9k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 163, False: 31.8k]
  ------------------
 1068|    163|        break;
 1069|  31.8k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  31.8k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  31.8k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  30.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 30.8k, False: 929]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1070|  2.65k|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 2.65k, False: 29.1k]
  ------------------
 1071|  3.26k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 610, False: 31.2k]
  ------------------
 1072|  3.26k|        break;
 1073|    496|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 496, False: 31.3k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|    496|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  916|    496|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1075:13): [True: 491, False: 5]
  ------------------
 1076|    491|          break;
 1077|       |        /* fall through */
 1078|  28.0k|      default:
  ------------------
  |  Branch (1078:7): [True: 28.0k, False: 3.76k]
  ------------------
 1079|  28.0k|        *nextTokPtr = ptr;
 1080|  28.0k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|  28.0k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|  31.8k|      }
 1082|  31.8k|    }
 1083|    163|    *nextTokPtr = ptr;
 1084|    163|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    163|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  2.65k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 2.65k, False: 89.7k]
  ------------------
 1086|  2.65k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  2.65k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  2.65k|#  define MINBPC(enc) 2
  ------------------
 1087|  1.42k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 1.42k, False: 91.0k]
  ------------------
 1088|  1.42k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.42k|#  define MINBPC(enc) 2
  ------------------
 1089|  1.42k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  1.42k|#define XML_TOK_COMMA 38
  ------------------
 1090|    913|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 913, False: 91.5k]
  ------------------
 1091|    913|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    913|#  define MINBPC(enc) 2
  ------------------
 1092|    913|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|    913|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|    383|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 383, False: 92.0k]
  ------------------
 1094|    383|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    383|#  define MINBPC(enc) 2
  ------------------
 1095|    383|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    383|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    383|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    383|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 3, False: 380]
  ------------------
 1096|      3|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      3|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|    380|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  920|    380|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    380|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 374, False: 6]
  |  |  |  |  |  Branch (872:49): [True: 36, False: 338]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1098|     36|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     36|    {                                                                          \
  |  |  135|     36|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     36|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  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|    }
  ------------------
 1099|     35|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  920|     35|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|     35|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 18, False: 17]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 17]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1100|      1|        *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  916|      1|#  define MINBPC(enc) 2
  ------------------
 1101|      1|        return XML_TOK_COND_SECT_CLOSE;
  ------------------
  |  |  103|      1|#define XML_TOK_COND_SECT_CLOSE 34      /* ]]> */
  ------------------
 1102|      1|      }
 1103|     35|    }
 1104|    378|    *nextTokPtr = ptr;
 1105|    378|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|    378|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  6.04k|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 6.04k, False: 86.3k]
  ------------------
 1107|  6.04k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  6.04k|#  define MINBPC(enc) 2
  ------------------
 1108|  6.04k|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  6.04k|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|  5.16k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 5.16k, False: 87.2k]
  ------------------
 1110|  5.16k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  5.16k|#  define MINBPC(enc) 2
  ------------------
 1111|  5.16k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  5.16k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  5.16k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  5.16k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 8, False: 5.15k]
  ------------------
 1112|      8|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|      8|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|  5.15k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  5.15k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  5.15k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.12k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 25, False: 5.12k]
  |  |  |  |  |  Branch (870:4): [True: 5.12k, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|    519|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 519, False: 4.63k]
  ------------------
 1115|    519|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    519|#  define MINBPC(enc) 2
  ------------------
 1116|    519|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|    519|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|     70|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 70, False: 5.08k]
  ------------------
 1118|     70|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|     70|#  define MINBPC(enc) 2
  ------------------
 1119|     70|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|     70|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|    209|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 209, False: 4.94k]
  ------------------
 1121|    209|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    209|#  define MINBPC(enc) 2
  ------------------
 1122|    209|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|    209|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|    362|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 362, False: 4.79k]
  ------------------
 1124|    597|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 235, False: 4.91k]
  ------------------
 1125|    915|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 318, False: 4.83k]
  ------------------
 1126|  1.38k|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 472, False: 4.68k]
  ------------------
 1127|  1.85k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 465, False: 4.68k]
  ------------------
 1128|  2.79k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 940, False: 4.21k]
  ------------------
 1129|  4.32k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 1.53k, False: 3.61k]
  ------------------
 1130|  4.32k|      *nextTokPtr = ptr;
 1131|  4.32k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  4.32k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|  5.15k|    }
 1133|     25|    *nextTokPtr = ptr;
 1134|     25|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     25|#define XML_TOK_INVALID 0
  ------------------
 1135|  2.48k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 2.48k, False: 89.9k]
  ------------------
 1136|  2.48k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.48k|#  define MINBPC(enc) 2
  ------------------
 1137|  2.48k|    return XML_TOK_OR;
  ------------------
  |  |   88|  2.48k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  4.06k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 4.06k, False: 88.3k]
  ------------------
 1139|  4.06k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  4.06k|#  define MINBPC(enc) 2
  ------------------
 1140|  4.06k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  4.06k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  1.57k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 1.57k, False: 90.8k]
  ------------------
 1142|  1.57k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  1.57k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  1.57k|#  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: 92.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: 92.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|     76|    LEAD_CASE(4)
  ------------------
  |  | 1144|     18|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 22, False: 92.4k]
  |  |  ------------------
  |  | 1145|     22|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 4, False: 18]
  |  |  ------------------
  |  | 1146|     18|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      4|#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)) {                                         \
  |  |  ------------------
  |  |  |  |  923|     18|#  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|     18|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  921|     18|#  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|     18|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     18|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|  11.8k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 11.8k, False: 80.5k]
  ------------------
 1168|  17.1k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 5.28k, False: 87.1k]
  ------------------
 1169|  17.1k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|  17.1k|#define XML_TOK_NAME 18
  ------------------
 1170|  17.1k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  17.1k|#  define MINBPC(enc) 2
  ------------------
 1171|  17.1k|    break;
 1172|    220|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 220, False: 92.2k]
  ------------------
 1173|    451|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 231, False: 92.1k]
  ------------------
 1174|    698|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 247, False: 92.1k]
  ------------------
 1175|    698|#  ifdef XML_NS
 1176|    698|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 92.4k]
  ------------------
 1177|    698|#  endif
 1178|    698|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    698|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|    698|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    698|#  define MINBPC(enc) 2
  ------------------
 1180|    698|    break;
 1181|  1.78k|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 1.78k, False: 90.6k]
  ------------------
 1182|  1.78k|    if (IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  924|  1.78k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  876|  1.78k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  1.78k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 1.39k, False: 390]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1183|  1.39k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.39k|#  define MINBPC(enc) 2
  ------------------
 1184|  1.39k|      tok = XML_TOK_NAME;
  ------------------
  |  |   85|  1.39k|#define XML_TOK_NAME 18
  ------------------
 1185|  1.39k|      break;
 1186|  1.39k|    }
 1187|    390|    if (IS_NAME_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  922|    390|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  874|    390|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|    390|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 352, False: 38]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1188|    352|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    352|#  define MINBPC(enc) 2
  ------------------
 1189|    352|      tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    352|#define XML_TOK_NMTOKEN 19
  ------------------
 1190|    352|      break;
 1191|    352|    }
 1192|       |    /* fall through */
 1193|     63|  default:
  ------------------
  |  Branch (1193:3): [True: 25, False: 92.4k]
  ------------------
 1194|     63|    *nextTokPtr = ptr;
 1195|     63|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     63|#define XML_TOK_INVALID 0
  ------------------
 1196|  92.4k|  }
 1197|  53.3k|  while (HAS_CHAR(enc, ptr, end)) {
 1198|  53.3k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  53.3k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  53.3k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  46.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 46.1k, False: 7.20k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1199|   127k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  33.8k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 7.17k, False: 46.1k]
  |  |  ------------------
  |  |   82|  33.8k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  7.17k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  7.17k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  7.17k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 28, False: 7.15k]
  |  |  ------------------
  |  |   83|     28|      *nextTokPtr = ptr;                                                       \
  |  |   84|     28|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     28|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     28|    }                                                                          \
  |  |   86|  33.8k|    /* fall through */                                                         \
  |  |   87|  33.8k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 12.9k, False: 40.4k]
  |  |  ------------------
  |  |   88|  33.0k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 12.9k, False: 40.4k]
  |  |  ------------------
  |  |   89|  33.2k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 250, False: 53.1k]
  |  |  ------------------
  |  |   90|  33.5k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 296, False: 53.0k]
  |  |  ------------------
  |  |   91|  33.8k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 319, False: 53.0k]
  |  |  ------------------
  |  |   92|  33.8k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  33.8k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  33.8k|    break;                                                                     \
  |  |   94|  33.8k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 53.3k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 53.3k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     16|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 16, False: 53.3k]
  |  |  |  |  ------------------
  |  |  |  |   71|     16|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 11]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     11|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     22|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     11|    }                                                                          \
  |  |  |  |   77|     11|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
 1200|    220|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 220, False: 53.1k]
  ------------------
 1201|  1.88k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 1.66k, False: 51.7k]
  ------------------
 1202|  2.30k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 423, False: 52.9k]
  ------------------
 1203|  3.38k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 1.07k, False: 52.2k]
  ------------------
 1204|  4.16k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 781, False: 52.5k]
  ------------------
 1205|  4.16k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 2, False: 53.3k]
  ------------------
 1206|  14.4k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 10.2k, False: 43.0k]
  ------------------
 1207|  16.5k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 2.12k, False: 51.2k]
  ------------------
 1208|  18.5k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 1.92k, False: 51.4k]
  ------------------
 1209|  18.5k|      *nextTokPtr = ptr;
 1210|  18.5k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 53.3k]
  ------------------
 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|    691|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 691, False: 52.6k]
  ------------------
 1232|    691|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    691|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 1, False: 690]
  ------------------
 1233|      1|        *nextTokPtr = ptr;
 1234|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1235|      1|      }
 1236|    690|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    690|#  define MINBPC(enc) 2
  ------------------
 1237|    690|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|    690|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    181|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 181, False: 53.1k]
  ------------------
 1239|    181|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    181|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 180]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|    180|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    180|#  define MINBPC(enc) 2
  ------------------
 1244|    180|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    180|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|     67|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 67, False: 53.3k]
  ------------------
 1246|     67|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|     67|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 1, False: 66]
  ------------------
 1247|      1|        *nextTokPtr = ptr;
 1248|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1249|      1|      }
 1250|     66|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|     66|#  define MINBPC(enc) 2
  ------------------
 1251|     66|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|     66|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     15|    default:
  ------------------
  |  Branch (1252:5): [True: 15, False: 53.3k]
  ------------------
 1253|     15|      *nextTokPtr = ptr;
 1254|     15|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
 1255|  53.3k|    }
 1256|  53.3k|  }
 1257|    121|  return -tok;
 1258|  19.6k|}
xmltok.c:big2_scanLit:
  984|  7.53k|                const char **nextTokPtr) {
  985|  9.44M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  9.44M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  9.44M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  9.44M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   511k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 511k, False: 8.93M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  987|  9.44M|    switch (t) {
  988|  1.57M|      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.44M]
  |  |  |  |  ------------------
  |  |  |  |   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.44M]
  |  |  |  |  ------------------
  |  |  |  |   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|   789k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|   789k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 789k, False: 8.65M]
  |  |  |  |  ------------------
  |  |  |  |   50|   789k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 30, False: 789k]
  |  |  |  |  ------------------
  |  |  |  |   51|   789k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     30|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|   789k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   789k|#    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|   789k|    ptr += n;                                                                  \
  |  |  |  |   57|   789k|    break;
  |  |  ------------------
  |  |   63|   789k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 11, False: 9.44M]
  |  |  ------------------
  |  |   64|     11|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 9.44M]
  |  |  ------------------
  |  |   65|     17|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 6, False: 9.44M]
  |  |  ------------------
  |  |   66|     17|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     17|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  8.01k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 8.01k, False: 9.44M]
  ------------------
  990|  14.8k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 6.82k, False: 9.44M]
  ------------------
  991|  14.8k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  14.8k|#  define MINBPC(enc) 2
  ------------------
  992|  14.8k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 7.42k, False: 7.41k]
  ------------------
  993|  7.42k|        break;
  994|  7.41k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  7.41k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  7.41k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  7.41k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 2, False: 7.41k]
  ------------------
  995|      2|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      2|#define XML_TOK_LITERAL 27
  ------------------
  996|  7.41k|      *nextTokPtr = ptr;
  997|  7.41k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  7.41k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  7.41k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.38k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 7.38k, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  998|  2.54k|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 2.54k, False: 4.87k]
  ------------------
  999|  3.62k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 1.08k, False: 6.32k]
  ------------------
 1000|  4.53k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 907, False: 6.50k]
  ------------------
 1001|  7.34k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 2.81k, False: 4.59k]
  ------------------
 1002|  7.36k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 17, False: 7.39k]
  ------------------
 1003|  7.37k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 12, False: 7.39k]
  ------------------
 1004|  7.37k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  7.37k|#define XML_TOK_LITERAL 27
  ------------------
 1005|     33|      default:
  ------------------
  |  Branch (1005:7): [True: 33, False: 7.37k]
  ------------------
 1006|     33|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     33|#define XML_TOK_INVALID 0
  ------------------
 1007|  7.41k|      }
 1008|  8.64M|    default:
  ------------------
  |  Branch (1008:5): [True: 8.64M, False: 804k]
  ------------------
 1009|  8.64M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  8.64M|#  define MINBPC(enc) 2
  ------------------
 1010|  8.64M|      break;
 1011|  9.44M|    }
 1012|  9.44M|  }
 1013|     75|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     75|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  7.53k|}
xmltok.c:big2_scanDecl:
  183|  5.84k|                 const char **nextTokPtr) {
  184|  5.84k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.84k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.84k|    {                                                                          \
  |  |  |  |  135|  5.84k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.84k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  5.84k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 5.84k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  5.84k|    }
  |  |  ------------------
  ------------------
  185|  5.84k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  5.84k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  5.84k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.82k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 5.82k, False: 20]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|    412|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 412, False: 5.42k]
  ------------------
  187|    412|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    412|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    412|#  define MINBPC(enc) 2
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 5.84k]
  ------------------
  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|    524|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 524, False: 5.31k]
  ------------------
  192|  5.40k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 4.88k, False: 958]
  ------------------
  193|  5.40k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  5.40k|#  define MINBPC(enc) 2
  ------------------
  194|  5.40k|    break;
  195|     21|  default:
  ------------------
  |  Branch (195:3): [True: 21, False: 5.82k]
  ------------------
  196|     21|    *nextTokPtr = ptr;
  197|     21|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  198|  5.84k|  }
  199|  35.6k|  while (HAS_CHAR(enc, ptr, end)) {
  200|  35.6k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  35.6k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  35.6k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  35.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 35.6k, False: 27]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|     33|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 33, False: 35.6k]
  ------------------
  202|     33|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     33|    {                                                                          \
  |  |  135|     33|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     33|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|     33|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 32]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     33|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|     32|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  918|     32|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|     32|  ((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: 28, False: 4]
  |  |  |  |  |  Branch (870:4): [True: 7, False: 25]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      1|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 1, False: 31]
  ------------------
  206|      2|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 31]
  ------------------
  207|      3|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 1, False: 31]
  ------------------
  208|      4|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 1, False: 31]
  ------------------
  209|      4|        *nextTokPtr = ptr;
  210|      4|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  211|     32|      }
  212|       |      /* fall through */
  213|  2.39k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 2.36k, False: 33.3k]
  ------------------
  214|  4.63k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 2.24k, False: 33.4k]
  ------------------
  215|  5.34k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 716, False: 34.9k]
  ------------------
  216|  5.34k|      *nextTokPtr = ptr;
  217|  5.34k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  5.34k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|  25.7k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 25.7k, False: 9.87k]
  ------------------
  219|  30.2k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 4.49k, False: 31.1k]
  ------------------
  220|  30.2k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  30.2k|#  define MINBPC(enc) 2
  ------------------
  221|  30.2k|      break;
  222|     29|    default:
  ------------------
  |  Branch (222:5): [True: 29, False: 35.6k]
  ------------------
  223|     29|      *nextTokPtr = ptr;
  224|     29|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     29|#define XML_TOK_INVALID 0
  ------------------
  225|  35.6k|    }
  226|  35.6k|  }
  227|     26|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     26|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  5.40k|}
xmltok.c:big2_scanComment:
  146|    615|                    const char **nextTokPtr) {
  147|    615|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|    615|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    615|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    615|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 604, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|    604|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  920|    604|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    604|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 594, False: 10]
  |  |  |  |  |  Branch (872:49): [True: 592, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  149|     12|      *nextTokPtr = ptr;
  150|     12|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  151|     12|    }
  152|    592|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    592|#  define MINBPC(enc) 2
  ------------------
  153|  71.6k|    while (HAS_CHAR(enc, ptr, end)) {
  154|  71.6k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  71.6k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  71.6k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  9.69k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 9.69k, False: 61.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|  19.3k|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 71.6k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 71.6k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  9.65k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  9.62k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 9.65k, False: 62.0k]
  |  |  |  |  ------------------
  |  |  |  |   50|  9.65k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 31, False: 9.62k]
  |  |  |  |  ------------------
  |  |  |  |   51|  9.62k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     31|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  9.62k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  9.62k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  9.62k|    ptr += n;                                                                  \
  |  |  |  |   57|  9.62k|    break;
  |  |  ------------------
  |  |   63|  9.62k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 28, False: 71.6k]
  |  |  ------------------
  |  |   64|     28|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 71.6k]
  |  |  ------------------
  |  |   65|     36|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 8, False: 71.6k]
  |  |  ------------------
  |  |   66|     36|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     36|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     36|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  1.08k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 1.08k, False: 70.5k]
  ------------------
  157|  1.08k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.08k|#  define MINBPC(enc) 2
  ------------------
  158|  1.08k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.08k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.08k|    {                                                                          \
  |  |  |  |  135|  1.08k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.08k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.08k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 1.07k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  1.08k|    }
  |  |  ------------------
  ------------------
  159|  1.07k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  920|  1.07k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.07k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 746, False: 332]
  |  |  |  |  |  Branch (872:49): [True: 455, False: 291]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|    455|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    455|#  define MINBPC(enc) 2
  ------------------
  161|    455|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    455|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    455|    {                                                                          \
  |  |  |  |  135|    455|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    455|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    455|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 454]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    455|    }
  |  |  ------------------
  ------------------
  162|    454|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    454|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    454|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 448, False: 6]
  |  |  |  |  |  Branch (872:49): [True: 439, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|     15|            *nextTokPtr = ptr;
  164|     15|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  165|     15|          }
  166|    439|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    439|#  define MINBPC(enc) 2
  ------------------
  167|    439|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|    439|#define XML_TOK_COMMENT 13
  ------------------
  168|    454|        }
  169|    623|        break;
  170|  60.9k|      default:
  ------------------
  |  Branch (170:7): [True: 60.9k, False: 10.7k]
  ------------------
  171|  60.9k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  60.9k|#  define MINBPC(enc) 2
  ------------------
  172|  60.9k|        break;
  173|  71.6k|      }
  174|  71.6k|    }
  175|    592|  }
  176|     77|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     77|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|    615|}
xmltok.c:big2_scanPi:
  277|  6.10k|               const char **nextTokPtr) {
  278|  6.10k|  int tok;
  279|  6.10k|  const char *target = ptr;
  280|  6.10k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.10k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.10k|    {                                                                          \
  |  |  |  |  135|  6.10k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.10k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  6.10k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 10, False: 6.09k]
  |  |  |  |  ------------------
  |  |  |  |  136|     10|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     10|      }                                                                        \
  |  |  |  |  138|  6.10k|    }
  |  |  ------------------
  ------------------
  281|  6.09k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  6.09k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  6.09k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.22k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 5.22k, False: 873]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  282|  5.65k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  6.06k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 853, False: 5.24k]
  |  |  ------------------
  |  |  111|  6.06k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    853|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    853|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    853|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 6, False: 847]
  |  |  ------------------
  |  |  112|      6|      *nextTokPtr = ptr;                                                       \
  |  |  113|      6|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      6|    }                                                                          \
  |  |  115|  6.06k|    /* fall through */                                                         \
  |  |  116|  6.06k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.93k, False: 2.16k]
  |  |  ------------------
  |  |  117|  6.06k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 1.28k, False: 4.80k]
  |  |  ------------------
  |  |  118|  6.06k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  6.06k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  6.06k|    break;                                                                     \
  |  |  120|  6.06k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 6.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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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.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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     15|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 15, False: 6.08k]
  |  |  |  |  ------------------
  |  |  |  |  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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      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;
  |  |  ------------------
  ------------------
  283|      9|  default:
  ------------------
  |  Branch (283:3): [True: 9, False: 6.08k]
  ------------------
  284|      9|    *nextTokPtr = ptr;
  285|      9|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  286|  6.09k|  }
  287|   327k|  while (HAS_CHAR(enc, ptr, end)) {
  288|   327k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   327k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   327k|  ((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: 313k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  289|  1.59M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   321k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 313k, False: 13.7k]
  |  |  ------------------
  |  |   82|   321k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|   313k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|   313k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|   313k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 26, False: 313k]
  |  |  ------------------
  |  |   83|     26|      *nextTokPtr = ptr;                                                       \
  |  |   84|     26|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     26|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     26|    }                                                                          \
  |  |   86|   321k|    /* fall through */                                                         \
  |  |   87|   321k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 4.50k, False: 322k]
  |  |  ------------------
  |  |   88|   320k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 2.61k, False: 324k]
  |  |  ------------------
  |  |   89|   320k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 200, False: 326k]
  |  |  ------------------
  |  |   90|   320k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 195, False: 326k]
  |  |  ------------------
  |  |   91|   321k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 242, False: 326k]
  |  |  ------------------
  |  |   92|   321k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   321k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|   321k|    break;                                                                     \
  |  |   94|   321k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 327k]
  |  |  |  |  ------------------
  |  |  |  |   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: 327k]
  |  |  |  |  ------------------
  |  |  |  |   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: 327k]
  |  |  |  |  ------------------
  |  |  |  |   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;
  |  |  ------------------
  ------------------
  290|  1.83k|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 1.83k, False: 325k]
  ------------------
  291|  2.54k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 711, False: 326k]
  ------------------
  292|  3.69k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 1.15k, False: 325k]
  ------------------
  293|  3.69k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  915|  3.69k|#  define PREFIX(ident) big2_##ident
  ------------------
  |  Branch (293:11): [True: 2, False: 3.69k]
  ------------------
  294|      2|        *nextTokPtr = ptr;
  295|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  296|      2|      }
  297|  3.69k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.69k|#  define MINBPC(enc) 2
  ------------------
  298|  93.8k|      while (HAS_CHAR(enc, ptr, end)) {
  299|  93.8k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  93.8k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  93.8k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  22.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 22.6k, False: 71.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  300|  14.0k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 93.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: 93.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|  6.99k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  6.96k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 6.99k, False: 86.8k]
  |  |  |  |  ------------------
  |  |  |  |   50|  6.99k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 33, False: 6.96k]
  |  |  |  |  ------------------
  |  |  |  |   51|  6.96k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     33|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  6.96k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  6.96k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  6.96k|    ptr += n;                                                                  \
  |  |  |  |   57|  6.96k|    break;
  |  |  ------------------
  |  |   63|  6.96k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 39, False: 93.8k]
  |  |  ------------------
  |  |   64|     39|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 93.8k]
  |  |  ------------------
  |  |   65|     43|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 93.8k]
  |  |  ------------------
  |  |   66|     43|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     43|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     43|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  6.54k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 6.54k, False: 87.3k]
  ------------------
  302|  6.54k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  6.54k|#  define MINBPC(enc) 2
  ------------------
  303|  6.54k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  6.54k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  6.54k|    {                                                                          \
  |  |  |  |  135|  6.54k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  6.54k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  6.54k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 6.54k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  6.54k|    }
  |  |  ------------------
  ------------------
  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: 5.82k, False: 716]
  |  |  |  |  |  Branch (872:49): [True: 3.50k, False: 2.32k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  305|  3.50k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  3.50k|#  define MINBPC(enc) 2
  ------------------
  306|  3.50k|            return tok;
  307|  3.50k|          }
  308|  3.04k|          break;
  309|  80.2k|        default:
  ------------------
  |  Branch (309:9): [True: 80.2k, False: 13.5k]
  ------------------
  310|  80.2k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  80.2k|#  define MINBPC(enc) 2
  ------------------
  311|  80.2k|          break;
  312|  93.8k|        }
  313|  93.8k|      }
  314|    114|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    114|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  2.23k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 2.23k, False: 324k]
  ------------------
  316|  2.23k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  915|  2.23k|#  define PREFIX(ident) big2_##ident
  ------------------
  |  Branch (316:11): [True: 1, False: 2.23k]
  ------------------
  317|      1|        *nextTokPtr = ptr;
  318|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  319|      1|      }
  320|  2.23k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.23k|#  define MINBPC(enc) 2
  ------------------
  321|  2.23k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.23k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.23k|    {                                                                          \
  |  |  |  |  135|  2.23k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.23k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.23k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 38, False: 2.19k]
  |  |  |  |  ------------------
  |  |  |  |  136|     38|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     38|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     38|      }                                                                        \
  |  |  |  |  138|  2.23k|    }
  |  |  ------------------
  ------------------
  322|  2.19k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  2.19k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.19k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.18k, False: 11]
  |  |  |  |  |  Branch (872:49): [True: 2.17k, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  323|  2.17k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.17k|#  define MINBPC(enc) 2
  ------------------
  324|  2.17k|        return tok;
  325|  2.17k|      }
  326|       |      /* fall through */
  327|     34|    default:
  ------------------
  |  Branch (327:5): [True: 14, False: 327k]
  ------------------
  328|     34|      *nextTokPtr = ptr;
  329|     34|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     34|#define XML_TOK_INVALID 0
  ------------------
  330|   327k|    }
  331|   327k|  }
  332|     71|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     71|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  6.06k|}
xmltok.c:big2_checkPiTarget:
  232|  5.93k|                      int *tokPtr) {
  233|  5.93k|  int upper = 0;
  234|  5.93k|  UNUSED_P(enc);
  ------------------
  |  |  135|  5.93k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  5.93k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  5.93k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  5.93k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  916|  5.93k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (236:7): [True: 1.55k, False: 4.37k]
  ------------------
  237|  1.55k|    return 1;
  238|  4.37k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  4.37k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  4.37k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 3.91k, False: 464]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  239|    869|  case ASCII_x:
  ------------------
  |  |   86|    869|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 869, False: 3.50k]
  ------------------
  240|    869|    break;
  241|  2.17k|  case ASCII_X:
  ------------------
  |  |   59|  2.17k|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 2.17k, False: 2.20k]
  ------------------
  242|  2.17k|    upper = 1;
  243|  2.17k|    break;
  244|  1.33k|  default:
  ------------------
  |  Branch (244:3): [True: 1.33k, False: 3.04k]
  ------------------
  245|  1.33k|    return 1;
  246|  4.37k|  }
  247|  3.04k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.04k|#  define MINBPC(enc) 2
  ------------------
  248|  3.04k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  3.04k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  3.04k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 2.03k, False: 1.00k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|  1.25k|  case ASCII_m:
  ------------------
  |  |   75|  1.25k|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 1.25k, False: 1.78k]
  ------------------
  250|  1.25k|    break;
  251|    726|  case ASCII_M:
  ------------------
  |  |   48|    726|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 726, False: 2.31k]
  ------------------
  252|    726|    upper = 1;
  253|    726|    break;
  254|  1.06k|  default:
  ------------------
  |  Branch (254:3): [True: 1.06k, False: 1.98k]
  ------------------
  255|  1.06k|    return 1;
  256|  3.04k|  }
  257|  1.98k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.98k|#  define MINBPC(enc) 2
  ------------------
  258|  1.98k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  1.98k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  1.98k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.18k, False: 800]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|     34|  case ASCII_l:
  ------------------
  |  |   74|     34|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 34, False: 1.94k]
  ------------------
  260|     34|    break;
  261|      2|  case ASCII_L:
  ------------------
  |  |   47|      2|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 2, False: 1.97k]
  ------------------
  262|      2|    upper = 1;
  263|      2|    break;
  264|  1.94k|  default:
  ------------------
  |  Branch (264:3): [True: 1.94k, False: 36]
  ------------------
  265|  1.94k|    return 1;
  266|  1.98k|  }
  267|     36|  if (upper)
  ------------------
  |  Branch (267:7): [True: 3, False: 33]
  ------------------
  268|      3|    return 0;
  269|     33|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|     33|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|     33|  return 1;
  271|     36|}
xmltok.c:big2_scanPercent:
  924|  2.65k|                    const char **nextTokPtr) {
  925|  2.65k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.65k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.65k|    {                                                                          \
  |  |  |  |  135|  2.65k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.65k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.65k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 20, False: 2.63k]
  |  |  |  |  ------------------
  |  |  |  |  136|     20|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     20|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     20|      }                                                                        \
  |  |  |  |  138|  2.65k|    }
  |  |  ------------------
  ------------------
  926|  2.63k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.63k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.63k|  ((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: 289]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  927|  1.03k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|    876|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 276, False: 2.36k]
  |  |  ------------------
  |  |  111|    876|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    276|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    276|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    276|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 15, False: 261]
  |  |  ------------------
  |  |  112|     15|      *nextTokPtr = ptr;                                                       \
  |  |  113|     15|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     15|    }                                                                          \
  |  |  115|    876|    /* fall through */                                                         \
  |  |  116|    876|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 490, False: 2.14k]
  |  |  ------------------
  |  |  117|    876|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 125, False: 2.51k]
  |  |  ------------------
  |  |  118|    876|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|    876|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|    876|    break;                                                                     \
  |  |  120|    876|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.63k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.63k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|      7|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 7, False: 2.63k]
  |  |  |  |  ------------------
  |  |  |  |  100|      7|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 3]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      3|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      6|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|      3|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  928|     68|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 68, False: 2.57k]
  ------------------
  929|    900|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 832, False: 1.80k]
  ------------------
  930|  1.72k|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 829, False: 1.80k]
  ------------------
  931|  1.73k|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 5, False: 2.63k]
  ------------------
  932|  1.73k|    *nextTokPtr = ptr;
  933|  1.73k|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|  1.73k|#define XML_TOK_PERCENT 22
  ------------------
  934|      6|  default:
  ------------------
  |  Branch (934:3): [True: 6, False: 2.63k]
  ------------------
  935|      6|    *nextTokPtr = ptr;
  936|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  937|  2.63k|  }
  938|  2.72k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  2.72k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.72k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.72k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.15k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.15k, False: 569]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  940|  6.01k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.91k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 550, False: 2.17k]
  |  |  ------------------
  |  |   82|  1.91k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    550|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    550|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    550|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 24, False: 526]
  |  |  ------------------
  |  |   83|     24|      *nextTokPtr = ptr;                                                       \
  |  |   84|     24|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     24|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     24|    }                                                                          \
  |  |   86|  1.91k|    /* fall through */                                                         \
  |  |   87|  1.91k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 475, False: 2.24k]
  |  |  ------------------
  |  |   88|  1.20k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 200, False: 2.52k]
  |  |  ------------------
  |  |   89|  1.51k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 318, False: 2.40k]
  |  |  ------------------
  |  |   90|  1.72k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 201, False: 2.51k]
  |  |  ------------------
  |  |   91|  1.91k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 198, False: 2.52k]
  |  |  ------------------
  |  |   92|  1.91k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.91k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.91k|    break;                                                                     \
  |  |   94|  1.91k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 2.72k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 2.72k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     13|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 13, False: 2.70k]
  |  |  |  |  ------------------
  |  |  |  |   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|    752|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 752, False: 1.96k]
  ------------------
  942|    752|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    752|#  define MINBPC(enc) 2
  ------------------
  943|    752|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|    752|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|     13|    default:
  ------------------
  |  Branch (944:5): [True: 13, False: 2.70k]
  ------------------
  945|     13|      *nextTokPtr = ptr;
  946|     13|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  947|  2.72k|    }
  948|  2.72k|  }
  949|     74|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     74|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|    876|}
xmltok.c:big2_scanPoundName:
  954|  1.57k|                      const char **nextTokPtr) {
  955|  1.57k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.57k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.57k|    {                                                                          \
  |  |  |  |  135|  1.57k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.57k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.57k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.57k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.57k|    }
  |  |  ------------------
  ------------------
  956|  1.57k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.57k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.57k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.47k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.47k, False: 96]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  957|  1.37k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.52k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 66, False: 1.50k]
  |  |  ------------------
  |  |  111|  1.52k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|     66|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|     66|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|     66|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 14, False: 52]
  |  |  ------------------
  |  |  112|     14|      *nextTokPtr = ptr;                                                       \
  |  |  113|     14|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     14|    }                                                                          \
  |  |  115|  1.52k|    /* fall through */                                                         \
  |  |  116|  1.52k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.21k, False: 357]
  |  |  ------------------
  |  |  117|  1.52k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 261, False: 1.31k]
  |  |  ------------------
  |  |  118|  1.52k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.52k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.52k|    break;                                                                     \
  |  |  120|  1.52k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.57k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.57k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     24|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 24, False: 1.54k]
  |  |  |  |  ------------------
  |  |  |  |  100|     24|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 20]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     20|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     40|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     20|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     20|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     20|    }                                                                          \
  |  |  |  |  106|     20|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  958|      6|  default:
  ------------------
  |  Branch (958:3): [True: 6, False: 1.56k]
  ------------------
  959|      6|    *nextTokPtr = ptr;
  960|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  961|  1.57k|  }
  962|  10.6k|  while (HAS_CHAR(enc, ptr, end)) {
  963|  10.6k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  10.6k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  10.6k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  10.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 10.3k, False: 302]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  964|  31.2k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  9.21k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 288, False: 10.3k]
  |  |  ------------------
  |  |   82|  9.21k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    288|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    288|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    288|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 11, False: 277]
  |  |  ------------------
  |  |   83|     11|      *nextTokPtr = ptr;                                                       \
  |  |   84|     11|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     11|    }                                                                          \
  |  |   86|  9.21k|    /* fall through */                                                         \
  |  |   87|  9.21k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 4.39k, False: 6.29k]
  |  |  ------------------
  |  |   88|  8.56k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 3.89k, False: 6.78k]
  |  |  ------------------
  |  |   89|  8.76k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 200, False: 10.4k]
  |  |  ------------------
  |  |   90|  8.96k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 194, False: 10.4k]
  |  |  ------------------
  |  |   91|  9.21k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 250, False: 10.4k]
  |  |  ------------------
  |  |   92|  9.21k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  9.21k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  9.21k|    break;                                                                     \
  |  |   94|  9.21k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 10.6k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 10.6k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 10.6k]
  |  |  |  |  ------------------
  |  |  |  |   71|      8|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 4]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      4|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      8|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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|    175|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 175, False: 10.5k]
  ------------------
  966|    252|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 77, False: 10.6k]
  ------------------
  967|  1.03k|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 779, False: 9.90k]
  ------------------
  968|  1.31k|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 279, False: 10.4k]
  ------------------
  969|  1.37k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 66, False: 10.6k]
  ------------------
  970|  1.37k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 1, False: 10.6k]
  ------------------
  971|  1.44k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 67, False: 10.6k]
  ------------------
  972|  1.44k|      *nextTokPtr = ptr;
  973|  1.44k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  1.44k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|      8|    default:
  ------------------
  |  Branch (974:5): [True: 8, False: 10.6k]
  ------------------
  975|      8|      *nextTokPtr = ptr;
  976|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  977|  10.6k|    }
  978|  10.6k|  }
  979|     57|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     57|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  1.52k|}
xmltok.c:big2_contentTok:
  824|  71.7k|                   const char **nextTokPtr) {
  825|  71.7k|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 1.01k, False: 70.7k]
  ------------------
  826|  1.01k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.01k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|  70.7k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  70.7k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (827:7): [Folded - Ignored]
  ------------------
  828|  70.7k|    size_t n = end - ptr;
  829|  70.7k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  70.7k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (829:9): [True: 28.1k, False: 42.6k]
  ------------------
  830|  28.1k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  28.1k|#  define MINBPC(enc) 2
  ------------------
  831|  28.1k|      if (n == 0)
  ------------------
  |  Branch (831:11): [True: 94, False: 28.0k]
  ------------------
  832|     94|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     94|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  833|  28.0k|      end = ptr + n;
  834|  28.0k|    }
  835|  70.7k|  }
  836|  70.6k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  70.6k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  70.6k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  62.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 62.5k, False: 8.11k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  837|  14.8k|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 14.8k, False: 55.7k]
  ------------------
  838|  14.8k|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  14.8k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  14.8k|#  define MINBPC(enc) 2
  ------------------
  839|  11.0k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 11.0k, False: 59.5k]
  ------------------
  840|  11.0k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  11.0k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  11.0k|#  define MINBPC(enc) 2
  ------------------
  841|  12.6k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 12.6k, False: 57.9k]
  ------------------
  842|  12.6k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  12.6k|#  define MINBPC(enc) 2
  ------------------
  843|  12.6k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  12.6k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  12.6k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  12.6k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 14, False: 12.6k]
  ------------------
  844|     14|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     14|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  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|  8.28k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 8.28k, False: 4.39k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 2.65k, False: 10.0k]
  ------------------
  846|  2.65k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.65k|#  define MINBPC(enc) 2
  ------------------
  847|  12.6k|    *nextTokPtr = ptr;
  848|  12.6k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  12.6k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|  7.16k|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 7.16k, False: 63.4k]
  ------------------
  850|  7.16k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  7.16k|#  define MINBPC(enc) 2
  ------------------
  851|  7.16k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  7.16k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  7.60k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 7.60k, False: 63.0k]
  ------------------
  853|  7.60k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  7.60k|#  define MINBPC(enc) 2
  ------------------
  854|  7.60k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  7.60k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  7.60k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  7.60k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 4, False: 7.60k]
  ------------------
  855|      4|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      4|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  7.60k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  920|  7.60k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  7.60k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 7.00k, False: 601]
  |  |  |  |  |  Branch (872:49): [True: 5.97k, False: 1.02k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  857|  1.62k|      break;
  858|  5.97k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  5.97k|#  define MINBPC(enc) 2
  ------------------
  859|  5.97k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  5.97k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  5.97k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  5.97k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 5, False: 5.96k]
  ------------------
  860|      5|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      5|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|  5.96k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  5.96k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  5.96k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 5.17k, False: 797]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 5.17k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  862|  5.96k|      ptr -= MINBPC(enc);
  ------------------
  |  |  916|  5.96k|#  define MINBPC(enc) 2
  ------------------
  863|  5.96k|      break;
  864|  5.96k|    }
  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: 70.6k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 70.6k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  2.39k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.33k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.39k, False: 68.2k]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.39k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 63, False: 2.33k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.33k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     63|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.33k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  2.33k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  2.33k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.33k|    break;
  |  |  ------------------
  |  |   63|  2.33k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 78, False: 70.5k]
  |  |  ------------------
  |  |   64|     78|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 70.6k]
  |  |  ------------------
  |  |   65|     86|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 8, False: 70.6k]
  |  |  ------------------
  |  |   66|     86|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     86|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     86|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|  14.7k|  default:
  ------------------
  |  Branch (868:3): [True: 14.7k, False: 55.8k]
  ------------------
  869|  14.7k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  14.7k|#  define MINBPC(enc) 2
  ------------------
  870|  14.7k|    break;
  871|  70.6k|  }
  872|  1.05M|  while (HAS_CHAR(enc, ptr, end)) {
  873|  1.05M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.05M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.05M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  79.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 79.9k, False: 974k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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.05M]
  |  |  ------------------
  |  |  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.05M]
  |  |  ------------------
  |  |  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|   185k|      LEAD_CASE(4)
  ------------------
  |  |  875|   185k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 185k, False: 868k]
  |  |  ------------------
  |  |  876|   185k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|   185k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 51, False: 185k]
  |  |  ------------------
  |  |  877|     51|      *nextTokPtr = ptr;                                                       \
  |  |  878|     51|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     51|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     51|    }                                                                          \
  |  |  880|   185k|    ptr += n;                                                                  \
  |  |  881|   185k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|  12.2k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 12.2k, False: 1.04M]
  ------------------
  887|  12.2k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|  12.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  916|  12.2k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 12.2k, False: 2]
  |  |  ------------------
  ------------------
  888|  12.2k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  920|  12.2k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  12.2k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 10.3k, False: 1.83k]
  |  |  |  |  |  Branch (872:49): [True: 2.29k, False: 8.09k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  889|  9.93k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  9.93k|#  define MINBPC(enc) 2
  ------------------
  890|  9.93k|          break;
  891|  9.93k|        }
  892|  2.29k|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|  2.29k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  916|  2.29k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 2.29k, False: 4]
  |  |  ------------------
  ------------------
  893|  2.29k|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  920|  2.29k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.29k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.71k, False: 575]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 1.71k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  894|  2.29k|            ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.29k|#  define MINBPC(enc) 2
  ------------------
  895|  2.29k|            break;
  896|  2.29k|          }
  897|      1|          *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  916|      1|#  define MINBPC(enc) 2
  ------------------
  898|      1|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  899|  2.29k|        }
  900|  2.29k|      }
  901|       |      /* fall through */
  902|  5.48k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 5.48k, False: 1.04M]
  ------------------
  903|  9.27k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 3.78k, False: 1.05M]
  ------------------
  904|  9.33k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 61, False: 1.05M]
  ------------------
  905|  9.33k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 0, False: 1.05M]
  ------------------
  906|  9.33k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 4, False: 1.05M]
  ------------------
  907|  18.1k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 8.84k, False: 1.04M]
  ------------------
  908|  24.3k|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 6.13k, False: 1.04M]
  ------------------
  909|  24.3k|      *nextTokPtr = ptr;
  910|  24.3k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  24.3k|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|   832k|    default:
  ------------------
  |  Branch (911:5): [True: 832k, False: 221k]
  ------------------
  912|   832k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   832k|#  define MINBPC(enc) 2
  ------------------
  913|   832k|      break;
  914|  1.05M|    }
  915|  1.05M|  }
  916|    314|  *nextTokPtr = ptr;
  917|    314|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    314|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|  24.6k|}
xmltok.c:big2_scanLt:
  726|  14.8k|               const char **nextTokPtr) {
  727|  14.8k|#  ifdef XML_NS
  728|  14.8k|  int hadColon;
  729|  14.8k|#  endif
  730|  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: 12, False: 14.8k]
  |  |  |  |  ------------------
  |  |  |  |  136|     12|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     12|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     12|      }                                                                        \
  |  |  |  |  138|  14.8k|    }
  |  |  ------------------
  ------------------
  731|  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|  12.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 12.0k, False: 2.84k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  732|  10.1k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  9.28k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 2.82k, False: 12.0k]
  |  |  ------------------
  |  |  111|  9.28k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  2.82k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  2.82k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  2.82k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 19, False: 2.80k]
  |  |  ------------------
  |  |  112|     19|      *nextTokPtr = ptr;                                                       \
  |  |  113|     19|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     19|    }                                                                          \
  |  |  115|  9.28k|    /* fall through */                                                         \
  |  |  116|  9.28k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.48k, False: 10.3k]
  |  |  ------------------
  |  |  117|  9.28k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 1.99k, False: 12.8k]
  |  |  ------------------
  |  |  118|  9.28k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  9.28k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  9.28k|    break;                                                                     \
  |  |  120|  9.28k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 14.8k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 14.8k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     21|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 21, False: 14.8k]
  |  |  |  |  ------------------
  |  |  |  |  100|     21|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 17]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     17|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     34|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     17|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     17|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     17|    }                                                                          \
  |  |  |  |  106|     17|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  733|    803|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 803, False: 14.0k]
  ------------------
  734|    803|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    803|#  define MINBPC(enc) 2
  ------------------
  735|    803|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    803|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    803|    {                                                                          \
  |  |  |  |  135|    803|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    803|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    803|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 801]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|    803|    }
  |  |  ------------------
  ------------------
  736|    801|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|    801|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|    801|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    790|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 15, False: 786]
  |  |  |  |  |  Branch (870:4): [True: 790, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    203|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 203, False: 598]
  ------------------
  738|    203|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    203|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    203|#  define MINBPC(enc) 2
  ------------------
  739|    583|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 583, False: 218]
  ------------------
  740|    583|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    583|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    583|#  define MINBPC(enc) 2
  ------------------
  741|    801|    }
  742|     15|    *nextTokPtr = ptr;
  743|     15|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  744|  3.20k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 3.20k, False: 11.6k]
  ------------------
  745|  3.20k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  3.20k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  3.20k|#  define MINBPC(enc) 2
  ------------------
  746|  1.54k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 1.54k, False: 13.3k]
  ------------------
  747|  1.54k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  1.54k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  1.54k|#  define MINBPC(enc) 2
  ------------------
  748|      7|  default:
  ------------------
  |  Branch (748:3): [True: 7, False: 14.8k]
  ------------------
  749|      7|    *nextTokPtr = ptr;
  750|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  751|  14.8k|  }
  752|  9.28k|#  ifdef XML_NS
  753|  9.28k|  hadColon = 0;
  754|  9.28k|#  endif
  755|       |  /* we have a start-tag */
  756|  19.6k|  while (HAS_CHAR(enc, ptr, end)) {
  757|  19.6k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  19.6k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  19.6k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  14.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 14.5k, False: 5.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  758|  43.9k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  10.4k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 5.04k, False: 14.5k]
  |  |  ------------------
  |  |   82|  10.4k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  5.04k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  5.04k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  5.04k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 17, False: 5.02k]
  |  |  ------------------
  |  |   83|     17|      *nextTokPtr = ptr;                                                       \
  |  |   84|     17|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     17|    }                                                                          \
  |  |   86|  10.4k|    /* fall through */                                                         \
  |  |   87|  10.4k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 4.10k, False: 15.5k]
  |  |  ------------------
  |  |   88|  9.64k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 512, False: 19.1k]
  |  |  ------------------
  |  |   89|  9.94k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 306, False: 19.3k]
  |  |  ------------------
  |  |   90|  10.1k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 248, False: 19.3k]
  |  |  ------------------
  |  |   91|  10.4k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 218, False: 19.4k]
  |  |  ------------------
  |  |   92|  10.4k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  10.4k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  10.4k|    break;                                                                     \
  |  |   94|  10.4k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 19.6k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 19.6k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     12|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 12, False: 19.6k]
  |  |  |  |  ------------------
  |  |  |  |   71|     12|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 7]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      7|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     14|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      7|    }                                                                          \
  |  |  |  |   77|      7|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 19.6k]
  ------------------
  761|      0|      if (hadColon) {
  ------------------
  |  Branch (761:11): [True: 0, False: 0]
  ------------------
  762|      0|        *nextTokPtr = ptr;
  763|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  764|      0|      }
  765|      0|      hadColon = 1;
  766|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  916|      0|#  define MINBPC(enc) 2
  ------------------
  767|      0|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|      0|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|      0|    {                                                                          \
  |  |  |  |  135|      0|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|      0|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|      0|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      0|      }                                                                        \
  |  |  |  |  138|      0|    }
  |  |  ------------------
  ------------------
  768|      0|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|      0|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|      0|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|      0|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  769|      0|        CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|      0|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  111|      0|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|      0|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|      0|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|      0|    /* fall through */                                                         \
  |  |  116|      0|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  117|      0|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  118|      0|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|      0|    break;                                                                     \
  |  |  120|      0|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|      0|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  770|      0|      default:
  ------------------
  |  Branch (770:7): [True: 0, False: 0]
  ------------------
  771|      0|        *nextTokPtr = ptr;
  772|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  773|      0|      }
  774|      0|      break;
  775|      0|#  endif
  776|  1.89k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 1.89k, False: 17.7k]
  ------------------
  777|  3.25k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 1.36k, False: 18.2k]
  ------------------
  778|  4.11k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 861, False: 18.7k]
  ------------------
  779|  4.11k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.11k|#  define MINBPC(enc) 2
  ------------------
  780|  4.91k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  4.91k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  4.91k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.91k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.06k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 4.06k, False: 851]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  782|  3.21k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.92k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 831, False: 4.08k]
  |  |  ------------------
  |  |  111|  2.92k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    831|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    831|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    831|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 13, False: 818]
  |  |  ------------------
  |  |  112|     13|      *nextTokPtr = ptr;                                                       \
  |  |  113|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     13|    }                                                                          \
  |  |  115|  2.92k|    /* fall through */                                                         \
  |  |  116|  2.92k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.54k, False: 3.37k]
  |  |  ------------------
  |  |  117|  2.92k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 561, False: 4.35k]
  |  |  ------------------
  |  |  118|  2.92k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  2.92k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  2.92k|    break;                                                                     \
  |  |  120|  2.92k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 4.91k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 4.91k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     15|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 15, False: 4.90k]
  |  |  |  |  ------------------
  |  |  |  |  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)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      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;
  |  |  ------------------
  ------------------
  783|    904|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 904, False: 4.01k]
  ------------------
  784|    904|          goto gt;
  785|    218|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 218, False: 4.70k]
  ------------------
  786|    218|          goto sol;
  787|    280|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 280, False: 4.63k]
  ------------------
  788|    526|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 246, False: 4.67k]
  ------------------
  789|    842|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 316, False: 4.60k]
  ------------------
  790|    842|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    842|#  define MINBPC(enc) 2
  ------------------
  791|    842|          continue;
  792|      5|        default:
  ------------------
  |  Branch (792:9): [True: 5, False: 4.91k]
  ------------------
  793|      5|          *nextTokPtr = ptr;
  794|      5|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  795|  4.91k|        }
  796|  2.92k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  915|  2.92k|#  define PREFIX(ident) big2_##ident
  ------------------
  797|  4.91k|      }
  798|     40|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     40|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  4.11k|    }
  800|  4.61k|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 4.61k, False: 15.0k]
  ------------------
  801|  5.52k|    gt:
  802|  5.52k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  5.52k|#  define MINBPC(enc) 2
  ------------------
  803|  5.52k|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  5.52k|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|    441|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 441, False: 19.1k]
  ------------------
  805|    659|    sol:
  806|    659|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    659|#  define MINBPC(enc) 2
  ------------------
  807|    659|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    659|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    659|    {                                                                          \
  |  |  |  |  135|    659|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    659|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    659|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 9, False: 650]
  |  |  |  |  ------------------
  |  |  |  |  136|      9|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      9|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      9|      }                                                                        \
  |  |  |  |  138|    659|    }
  |  |  ------------------
  ------------------
  808|    650|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    650|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    650|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 637, False: 13]
  |  |  |  |  |  Branch (872:49): [True: 625, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  809|     25|        *nextTokPtr = ptr;
  810|     25|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     25|#define XML_TOK_INVALID 0
  ------------------
  811|     25|      }
  812|    625|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    625|#  define MINBPC(enc) 2
  ------------------
  813|    625|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|    625|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|     10|    default:
  ------------------
  |  Branch (814:5): [True: 10, False: 19.6k]
  ------------------
  815|     10|      *nextTokPtr = ptr;
  816|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  817|  19.6k|    }
  818|  19.6k|  }
  819|     66|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     66|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  9.28k|}
xmltok.c:big2_scanCdataSection:
  337|    583|                         const char **nextTokPtr) {
  338|    583|  static const char CDATA_LSQB[]
  339|    583|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|    583|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|    583|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    583|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|    583|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    583|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|    583|#define ASCII_LSQB 0x5B
  ------------------
  340|    583|  int i;
  341|    583|  UNUSED_P(enc);
  ------------------
  |  |  135|    583|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|    583|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|    583|    {                                                                          \
  |  |  135|    583|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|    583|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    583|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 3, False: 580]
  |  |  ------------------
  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      3|      }                                                                        \
  |  |  138|    583|    }
  ------------------
  344|  3.97k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  3.39k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (344:15): [True: 3.41k, False: 559]
  ------------------
  345|  3.41k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  920|  3.41k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  3.41k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 3.40k, False: 8]
  |  |  |  |  |  Branch (872:49): [True: 3.39k, False: 13]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  346|     21|      *nextTokPtr = ptr;
  347|     21|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  348|     21|    }
  349|  3.41k|  }
  350|    559|  *nextTokPtr = ptr;
  351|    559|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|    559|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|    580|}
xmltok.c:big2_scanEndTag:
  432|  1.54k|                   const char **nextTokPtr) {
  433|  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)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.54k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.54k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.54k|    }
  |  |  ------------------
  ------------------
  434|  1.54k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.54k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.54k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.17k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.17k, False: 367]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  435|  1.40k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.51k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 341, False: 1.20k]
  |  |  ------------------
  |  |  111|  1.51k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    341|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    341|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    341|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 1, False: 340]
  |  |  ------------------
  |  |  112|      1|      *nextTokPtr = ptr;                                                       \
  |  |  113|      1|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      1|    }                                                                          \
  |  |  115|  1.51k|    /* fall through */                                                         \
  |  |  116|  1.51k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 684, False: 860]
  |  |  ------------------
  |  |  117|  1.51k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 493, False: 1.05k]
  |  |  ------------------
  |  |  118|  1.51k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.51k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.51k|    break;                                                                     \
  |  |  120|  1.51k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.54k]
  |  |  |  |  ------------------
  |  |  |  |  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.54k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     21|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 21, False: 1.52k]
  |  |  |  |  ------------------
  |  |  |  |  100|     21|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 17]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     17|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     34|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     17|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     17|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     17|    }                                                                          \
  |  |  |  |  106|     17|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  436|      5|  default:
  ------------------
  |  Branch (436:3): [True: 5, False: 1.53k]
  ------------------
  437|      5|    *nextTokPtr = ptr;
  438|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  439|  1.54k|  }
  440|  3.08k|  while (HAS_CHAR(enc, ptr, end)) {
  441|  3.08k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  3.08k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  3.08k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.52k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.52k, False: 561]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  442|  5.04k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.62k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 532, False: 2.55k]
  |  |  ------------------
  |  |   82|  1.62k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    532|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    532|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    532|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 18, False: 514]
  |  |  ------------------
  |  |   83|     18|      *nextTokPtr = ptr;                                                       \
  |  |   84|     18|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     18|    }                                                                          \
  |  |   86|  1.62k|    /* fall through */                                                         \
  |  |   87|  1.62k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 297, False: 2.78k]
  |  |  ------------------
  |  |   88|  1.00k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 196, False: 2.88k]
  |  |  ------------------
  |  |   89|  1.22k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 218, False: 2.86k]
  |  |  ------------------
  |  |   90|  1.43k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 206, False: 2.87k]
  |  |  ------------------
  |  |   91|  1.62k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 198, False: 2.88k]
  |  |  ------------------
  |  |   92|  1.62k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.62k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.62k|    break;                                                                     \
  |  |   94|  1.62k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 3.08k]
  |  |  |  |  ------------------
  |  |  |  |   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.08k]
  |  |  |  |  ------------------
  |  |  |  |   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: 3.06k]
  |  |  |  |  ------------------
  |  |  |  |   71|     22|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 18]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     18|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     36|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     18|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     18|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     18|    }                                                                          \
  |  |  |  |   77|     18|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  443|    233|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 233, False: 2.85k]
  ------------------
  444|    688|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 455, False: 2.62k]
  ------------------
  445|    953|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 265, False: 2.81k]
  ------------------
  446|  1.71k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|    953|#  define MINBPC(enc) 2
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|    804|#  define MINBPC(enc) 2
  ------------------
  447|  1.71k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.71k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.71k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.68k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.68k, False: 32]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  448|    223|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 223, False: 1.49k]
  ------------------
  449|    559|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 336, False: 1.38k]
  ------------------
  450|    804|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 245, False: 1.47k]
  ------------------
  451|    804|          break;
  452|    878|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 878, False: 839]
  ------------------
  453|    878|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    878|#  define MINBPC(enc) 2
  ------------------
  454|    878|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|    878|#define XML_TOK_END_TAG 5
  ------------------
  455|     35|        default:
  ------------------
  |  Branch (455:9): [True: 35, False: 1.68k]
  ------------------
  456|     35|          *nextTokPtr = ptr;
  457|     35|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     35|#define XML_TOK_INVALID 0
  ------------------
  458|  1.71k|        }
  459|  1.71k|      }
  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: 3.08k]
  ------------------
  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|    454|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 454, False: 2.63k]
  ------------------
  469|    454|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    454|#  define MINBPC(enc) 2
  ------------------
  470|    454|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|    454|#define XML_TOK_END_TAG 5
  ------------------
  471|      8|    default:
  ------------------
  |  Branch (471:5): [True: 8, False: 3.07k]
  ------------------
  472|      8|      *nextTokPtr = ptr;
  473|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  474|  3.08k|    }
  475|  3.08k|  }
  476|     62|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     62|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  1.51k|}
xmltok.c:big2_scanAtts:
  573|  2.92k|                 const char **nextTokPtr) {
  574|  2.92k|#  ifdef XML_NS
  575|  2.92k|  int hadColon = 0;
  576|  2.92k|#  endif
  577|   125k|  while (HAS_CHAR(enc, ptr, end)) {
  578|   125k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   125k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   125k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   123k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 123k, False: 1.69k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  579|  47.7k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  12.0k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 1.66k, False: 123k]
  |  |  ------------------
  |  |   82|  12.0k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  1.66k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  1.66k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.66k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 13, False: 1.65k]
  |  |  ------------------
  |  |   83|     13|      *nextTokPtr = ptr;                                                       \
  |  |   84|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     13|    }                                                                          \
  |  |   86|  12.0k|    /* fall through */                                                         \
  |  |   87|  12.0k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 9.47k, False: 116k]
  |  |  ------------------
  |  |   88|  11.4k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 291, False: 125k]
  |  |  ------------------
  |  |   89|  11.6k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 195, False: 125k]
  |  |  ------------------
  |  |   90|  11.8k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 198, False: 125k]
  |  |  ------------------
  |  |   91|  12.0k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 202, False: 125k]
  |  |  ------------------
  |  |   92|  12.0k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  12.0k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  12.0k|    break;                                                                     \
  |  |   94|  12.0k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 125k]
  |  |  |  |  ------------------
  |  |  |  |   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: 125k]
  |  |  |  |  ------------------
  |  |  |  |   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|     24|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 24, False: 125k]
  |  |  |  |  ------------------
  |  |  |  |   71|     24|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 20]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     20|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     40|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     20|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     20|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     20|    }                                                                          \
  |  |  |  |   77|     20|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  580|      0|#  ifdef XML_NS
  581|      0|    case BT_COLON:
  ------------------
  |  Branch (581:5): [True: 0, False: 125k]
  ------------------
  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|    458|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 458, False: 125k]
  ------------------
  598|    704|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 246, False: 125k]
  ------------------
  599|  11.6k|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 10.9k, False: 114k]
  ------------------
  600|  12.2k|      for (;;) {
  601|  12.2k|        int t;
  602|       |
  603|  12.2k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  12.2k|#  define MINBPC(enc) 2
  ------------------
  604|  12.2k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  12.2k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  12.2k|    {                                                                          \
  |  |  |  |  135|  12.2k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  12.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  12.2k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 41, False: 12.2k]
  |  |  |  |  ------------------
  |  |  |  |  136|     41|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     41|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     41|      }                                                                        \
  |  |  |  |  138|  12.2k|    }
  |  |  ------------------
  ------------------
  605|  12.2k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  12.2k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  12.2k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  12.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 12.1k, False: 26]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  606|  12.2k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 11.5k, False: 670]
  ------------------
  607|  11.5k|          break;
  608|    670|        switch (t) {
  609|    211|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 211, False: 459]
  ------------------
  610|    417|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 206, False: 464]
  ------------------
  611|    636|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 219, False: 451]
  ------------------
  612|    636|          break;
  613|     34|        default:
  ------------------
  |  Branch (613:9): [True: 34, False: 636]
  ------------------
  614|     34|          *nextTokPtr = ptr;
  615|     34|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     34|#define XML_TOK_INVALID 0
  ------------------
  616|    670|        }
  617|    670|      }
  618|       |      /* fall through */
  619|   113k|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 101k, False: 23.6k]
  ------------------
  620|   113k|      int open;
  621|   113k|#  ifdef XML_NS
  622|   113k|      hadColon = 0;
  623|   113k|#  endif
  624|   114k|      for (;;) {
  625|   114k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|   114k|#  define MINBPC(enc) 2
  ------------------
  626|   114k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   114k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   114k|    {                                                                          \
  |  |  |  |  135|   114k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   114k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   114k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 40, False: 114k]
  |  |  |  |  ------------------
  |  |  |  |  136|     40|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     40|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     40|      }                                                                        \
  |  |  |  |  138|   114k|    }
  |  |  ------------------
  ------------------
  627|   114k|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|   114k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   114k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   114k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 114k, False: 25]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  628|   114k|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 98.2k, False: 16.0k]
  |  Branch (628:32): [True: 15.1k, False: 869]
  ------------------
  629|   113k|          break;
  630|    869|        switch (open) {
  631|    204|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 204, False: 665]
  ------------------
  632|    466|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 262, False: 607]
  ------------------
  633|    842|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 376, False: 493]
  ------------------
  634|    842|          break;
  635|     27|        default:
  ------------------
  |  Branch (635:9): [True: 27, False: 842]
  ------------------
  636|     27|          *nextTokPtr = ptr;
  637|     27|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     27|#define XML_TOK_INVALID 0
  ------------------
  638|    869|        }
  639|    869|      }
  640|   113k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   113k|#  define MINBPC(enc) 2
  ------------------
  641|       |      /* in attribute value */
  642|  2.63M|      for (;;) {
  643|  2.63M|        int t;
  644|  2.63M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.63M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.63M|    {                                                                          \
  |  |  |  |  135|  2.63M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.63M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.63M|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 55, False: 2.63M]
  |  |  |  |  ------------------
  |  |  |  |  136|     55|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     55|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     55|      }                                                                        \
  |  |  |  |  138|  2.63M|    }
  |  |  ------------------
  ------------------
  645|  2.63M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  2.63M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.63M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   223k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 223k, False: 2.40M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  646|  2.63M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 113k, False: 2.51M]
  ------------------
  647|   113k|          break;
  648|  2.51M|        switch (t) {
  649|   265k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 2.51M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 2.51M]
  |  |  |  |  ------------------
  |  |  |  |   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|   132k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|   132k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 132k, False: 2.38M]
  |  |  |  |  ------------------
  |  |  |  |   50|   132k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 27, False: 132k]
  |  |  |  |  ------------------
  |  |  |  |   51|   132k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     27|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|   132k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   132k|#    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|   132k|    ptr += n;                                                                  \
  |  |  |  |   57|   132k|    break;
  |  |  ------------------
  |  |   63|   132k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 11, False: 2.51M]
  |  |  ------------------
  |  |   64|     11|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 2.51M]
  |  |  ------------------
  |  |   65|     16|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 5, False: 2.51M]
  |  |  ------------------
  |  |   66|     16|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     16|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  3.80k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 3.80k, False: 2.51M]
  ------------------
  651|  3.80k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  915|  3.80k|#  define PREFIX(ident) big2_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  916|  3.80k|#  define MINBPC(enc) 2
  ------------------
  652|  3.80k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 16, False: 3.78k]
  ------------------
  653|     16|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 11, False: 5]
  ------------------
  654|     11|              *nextTokPtr = ptr;
  655|     16|            return tok;
  656|     16|          }
  657|  3.78k|          break;
  658|  3.80k|        }
  659|  3.78k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 3, False: 2.51M]
  ------------------
  660|      3|          *nextTokPtr = ptr;
  661|      3|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  662|  2.38M|        default:
  ------------------
  |  Branch (662:9): [True: 2.38M, False: 136k]
  ------------------
  663|  2.38M|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.38M|#  define MINBPC(enc) 2
  ------------------
  664|  2.38M|          break;
  665|  2.51M|        }
  666|  2.51M|      }
  667|   113k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   113k|#  define MINBPC(enc) 2
  ------------------
  668|   113k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   113k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   113k|    {                                                                          \
  |  |  |  |  135|   113k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   113k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   113k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 113k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|   113k|    }
  |  |  ------------------
  ------------------
  669|   113k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   113k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   113k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   113k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 113k, False: 21]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  670|  1.28k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 1.28k, False: 112k]
  ------------------
  671|  3.43k|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 2.15k, False: 111k]
  ------------------
  672|   111k|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 108k, False: 4.83k]
  ------------------
  673|   111k|        break;
  674|    341|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 341, False: 112k]
  ------------------
  675|    341|        goto sol;
  676|  1.02k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 1.02k, False: 112k]
  ------------------
  677|  1.02k|        goto gt;
  678|     25|      default:
  ------------------
  |  Branch (678:7): [True: 25, False: 113k]
  ------------------
  679|     25|        *nextTokPtr = ptr;
  680|     25|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     25|#define XML_TOK_INVALID 0
  ------------------
  681|   113k|      }
  682|       |      /* ptr points to closing quote */
  683|   118k|      for (;;) {
  684|   118k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|   118k|#  define MINBPC(enc) 2
  ------------------
  685|   118k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   118k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   118k|    {                                                                          \
  |  |  |  |  135|   118k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   118k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   118k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 36, False: 118k]
  |  |  |  |  ------------------
  |  |  |  |  136|     36|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     36|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     36|      }                                                                        \
  |  |  |  |  138|   118k|    }
  |  |  ------------------
  ------------------
  686|   118k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   118k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   118k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   117k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 117k, False: 1.16k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  687|  94.3k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   110k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.13k, False: 117k]
  |  |  ------------------
  |  |  111|   110k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  1.13k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  1.13k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.13k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 12, False: 1.12k]
  |  |  ------------------
  |  |  112|     12|      *nextTokPtr = ptr;                                                       \
  |  |  113|     12|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     12|    }                                                                          \
  |  |  115|   110k|    /* fall through */                                                         \
  |  |  116|   110k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 92.0k, False: 26.6k]
  |  |  ------------------
  |  |  117|   110k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 17.6k, False: 101k]
  |  |  ------------------
  |  |  118|   110k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   110k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   110k|    break;                                                                     \
  |  |  120|   110k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 118k]
  |  |  |  |  ------------------
  |  |  |  |  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: 118k]
  |  |  |  |  ------------------
  |  |  |  |  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: 118k]
  |  |  |  |  ------------------
  |  |  |  |  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|  2.81k|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 2.81k, False: 115k]
  ------------------
  689|  3.39k|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 575, False: 118k]
  ------------------
  690|  6.85k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 3.45k, False: 115k]
  ------------------
  691|  6.85k|          continue;
  692|    442|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 442, False: 118k]
  ------------------
  693|  1.47k|        gt:
  694|  1.47k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.47k|#  define MINBPC(enc) 2
  ------------------
  695|  1.47k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  1.47k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|    608|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 608, False: 118k]
  ------------------
  697|    949|        sol:
  698|    949|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    949|#  define MINBPC(enc) 2
  ------------------
  699|    949|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    949|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    949|    {                                                                          \
  |  |  |  |  135|    949|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    949|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    949|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 9, False: 940]
  |  |  |  |  ------------------
  |  |  |  |  136|      9|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      9|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      9|      }                                                                        \
  |  |  |  |  138|    949|    }
  |  |  ------------------
  ------------------
  700|    940|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    940|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    940|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 933, False: 7]
  |  |  |  |  |  Branch (872:49): [True: 923, False: 10]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  701|     17|            *nextTokPtr = ptr;
  702|     17|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
  703|     17|          }
  704|    923|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    923|#  define MINBPC(enc) 2
  ------------------
  705|    923|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|    923|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|      9|        default:
  ------------------
  |  Branch (706:9): [True: 9, False: 118k]
  ------------------
  707|      9|          *nextTokPtr = ptr;
  708|      9|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  709|   118k|        }
  710|   110k|        break;
  711|   118k|      }
  712|   110k|      break;
  713|   111k|    }
  714|   110k|    default:
  ------------------
  |  Branch (714:5): [True: 11, False: 125k]
  ------------------
  715|     11|      *nextTokPtr = ptr;
  716|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  717|   125k|    }
  718|   125k|  }
  719|     86|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     86|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  2.92k|}
xmltok.c:big2_scanRef:
  545|  30.9k|                const char **nextTokPtr) {
  546|  30.9k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  30.9k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  30.9k|    {                                                                          \
  |  |  |  |  135|  30.9k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  30.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  30.9k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 27, False: 30.9k]
  |  |  |  |  ------------------
  |  |  |  |  136|     27|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     27|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     27|      }                                                                        \
  |  |  |  |  138|  30.9k|    }
  |  |  ------------------
  ------------------
  547|  30.9k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  30.9k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  30.9k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  27.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 27.9k, False: 2.96k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  548|  18.2k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  22.0k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 2.95k, False: 27.9k]
  |  |  ------------------
  |  |  111|  22.0k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  2.95k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  2.95k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  2.95k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 6, False: 2.94k]
  |  |  ------------------
  |  |  112|      6|      *nextTokPtr = ptr;                                                       \
  |  |  113|      6|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      6|    }                                                                          \
  |  |  115|  22.0k|    /* fall through */                                                         \
  |  |  116|  22.0k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 12.3k, False: 18.6k]
  |  |  ------------------
  |  |  117|  22.0k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 6.81k, False: 24.1k]
  |  |  ------------------
  |  |  118|  22.0k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  22.0k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  22.0k|    break;                                                                     \
  |  |  120|  22.0k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 30.9k]
  |  |  |  |  ------------------
  |  |  |  |  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: 30.9k]
  |  |  |  |  ------------------
  |  |  |  |  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: 30.9k]
  |  |  |  |  ------------------
  |  |  |  |  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;
  |  |  ------------------
  ------------------
  549|  8.84k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 8.84k, False: 22.0k]
  ------------------
  550|  8.84k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  8.84k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  8.84k|#  define MINBPC(enc) 2
  ------------------
  551|     10|  default:
  ------------------
  |  Branch (551:3): [True: 10, False: 30.9k]
  ------------------
  552|     10|    *nextTokPtr = ptr;
  553|     10|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  554|  30.9k|  }
  555|  51.7k|  while (HAS_CHAR(enc, ptr, end)) {
  556|  51.7k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  51.7k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  51.7k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  45.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 45.9k, False: 5.81k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  557|   120k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  29.7k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 5.79k, False: 45.9k]
  |  |  ------------------
  |  |   82|  29.7k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  5.79k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  5.79k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  5.79k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 16, False: 5.77k]
  |  |  ------------------
  |  |   83|     16|      *nextTokPtr = ptr;                                                       \
  |  |   84|     16|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     16|    }                                                                          \
  |  |   86|  29.7k|    /* fall through */                                                         \
  |  |   87|  29.7k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 20.6k, False: 31.0k]
  |  |  ------------------
  |  |   88|  28.9k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 2.53k, False: 49.2k]
  |  |  ------------------
  |  |   89|  29.3k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 342, False: 51.3k]
  |  |  ------------------
  |  |   90|  29.5k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 218, False: 51.5k]
  |  |  ------------------
  |  |   91|  29.7k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 197, False: 51.5k]
  |  |  ------------------
  |  |   92|  29.7k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  29.7k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  29.7k|    break;                                                                     \
  |  |   94|  29.7k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 51.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: 51.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|     12|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 12, False: 51.7k]
  |  |  |  |  ------------------
  |  |  |  |   71|     12|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 7]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      7|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     14|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      7|    }                                                                          \
  |  |  |  |   77|      7|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  558|  21.9k|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 21.9k, False: 29.7k]
  ------------------
  559|  21.9k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  21.9k|#  define MINBPC(enc) 2
  ------------------
  560|  21.9k|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|  21.9k|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|     19|    default:
  ------------------
  |  Branch (561:5): [True: 19, False: 51.7k]
  ------------------
  562|     19|      *nextTokPtr = ptr;
  563|     19|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     19|#define XML_TOK_INVALID 0
  ------------------
  564|  51.7k|    }
  565|  51.7k|  }
  566|     55|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     55|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|  22.0k|}
xmltok.c:big2_scanCharRef:
  514|  8.84k|                    const char **nextTokPtr) {
  515|  8.84k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  8.84k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  8.84k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  8.84k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 8.84k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  8.84k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  920|  8.84k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  8.84k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 8.84k, False: 6]
  |  |  |  |  |  Branch (872:49): [True: 8.06k, False: 777]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  517|  8.06k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  8.06k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  8.06k|#  define MINBPC(enc) 2
  ------------------
  518|    783|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|    783|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|    783|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    777|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 777, False: 6]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  519|    763|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 763, False: 20]
  ------------------
  520|    763|      break;
  521|     20|    default:
  ------------------
  |  Branch (521:5): [True: 20, False: 763]
  ------------------
  522|     20|      *nextTokPtr = ptr;
  523|     20|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     20|#define XML_TOK_INVALID 0
  ------------------
  524|    783|    }
  525|  2.40k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|    763|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  1.64k|#  define MINBPC(enc) 2
  ------------------
  526|  2.40k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.40k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.40k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.37k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.37k, False: 27]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  527|  1.64k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 1.64k, False: 754]
  ------------------
  528|  1.64k|        break;
  529|    722|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 722, False: 1.67k]
  ------------------
  530|    722|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    722|#  define MINBPC(enc) 2
  ------------------
  531|    722|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|    722|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     32|      default:
  ------------------
  |  Branch (532:7): [True: 32, False: 2.36k]
  ------------------
  533|     32|        *nextTokPtr = ptr;
  534|     32|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     32|#define XML_TOK_INVALID 0
  ------------------
  535|  2.40k|      }
  536|  2.40k|    }
  537|    763|  }
  538|     10|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  8.84k|}
xmltok.c:big2_scanHexCharRef:
  483|  8.06k|                       const char **nextTokPtr) {
  484|  8.06k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  8.06k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  8.06k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  8.06k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 8.06k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  8.06k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  8.06k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  8.06k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  8.05k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 8.05k, False: 10]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  486|  4.69k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 4.69k, False: 3.37k]
  ------------------
  487|  8.05k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 3.36k, False: 4.70k]
  ------------------
  488|  8.05k|      break;
  489|     12|    default:
  ------------------
  |  Branch (489:5): [True: 12, False: 8.05k]
  ------------------
  490|     12|      *nextTokPtr = ptr;
  491|     12|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  492|  8.06k|    }
  493|  26.3k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  8.05k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  18.3k|#  define MINBPC(enc) 2
  ------------------
  494|  26.3k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  26.3k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  26.3k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  26.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 26.3k, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  495|  8.49k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 8.49k, False: 17.8k]
  ------------------
  496|  18.3k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 9.81k, False: 16.5k]
  ------------------
  497|  18.3k|        break;
  498|  8.00k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 8.00k, False: 18.3k]
  ------------------
  499|  8.00k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  8.00k|#  define MINBPC(enc) 2
  ------------------
  500|  8.00k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  8.00k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|     28|      default:
  ------------------
  |  Branch (501:7): [True: 28, False: 26.3k]
  ------------------
  502|     28|        *nextTokPtr = ptr;
  503|     28|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     28|#define XML_TOK_INVALID 0
  ------------------
  504|  26.3k|      }
  505|  26.3k|    }
  506|  8.05k|  }
  507|     15|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     15|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  8.06k|}
xmltok.c:big2_cdataSectionTok:
  356|  35.7k|                        const char **nextTokPtr) {
  357|  35.7k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 138, False: 35.6k]
  ------------------
  358|    138|    return XML_TOK_NONE;
  ------------------
  |  |   51|    138|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|  35.6k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  35.6k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (359:7): [Folded - Ignored]
  ------------------
  360|  35.6k|    size_t n = end - ptr;
  361|  35.6k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  35.6k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (361:9): [True: 13.7k, False: 21.8k]
  ------------------
  362|  13.7k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  13.7k|#  define MINBPC(enc) 2
  ------------------
  363|  13.7k|      if (n == 0)
  ------------------
  |  Branch (363:11): [True: 24, False: 13.6k]
  ------------------
  364|     24|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     24|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  365|  13.6k|      end = ptr + n;
  366|  13.6k|    }
  367|  35.6k|  }
  368|  35.5k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  35.5k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  35.5k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  29.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 29.3k, False: 6.21k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  369|  11.8k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 11.8k, False: 23.7k]
  ------------------
  370|  11.8k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  11.8k|#  define MINBPC(enc) 2
  ------------------
  371|  11.8k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  11.8k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  11.8k|    {                                                                          \
  |  |  |  |  135|  11.8k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  11.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  11.8k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 6, False: 11.8k]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|  11.8k|    }
  |  |  ------------------
  ------------------
  372|  11.8k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  920|  11.8k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  11.8k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 9.41k, False: 2.45k]
  |  |  |  |  |  Branch (872:49): [True: 5.42k, False: 3.98k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  373|  6.44k|      break;
  374|  5.42k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  5.42k|#  define MINBPC(enc) 2
  ------------------
  375|  5.42k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.42k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.42k|    {                                                                          \
  |  |  |  |  135|  5.42k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.42k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  5.42k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 5.42k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  5.42k|    }
  |  |  ------------------
  ------------------
  376|  5.42k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  5.42k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  5.42k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 3.79k, False: 1.63k]
  |  |  |  |  |  Branch (872:49): [True: 253, False: 3.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  377|  5.16k|      ptr -= MINBPC(enc);
  ------------------
  |  |  916|  5.16k|#  define MINBPC(enc) 2
  ------------------
  378|  5.16k|      break;
  379|  5.16k|    }
  380|    253|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    253|#  define MINBPC(enc) 2
  ------------------
  381|    253|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|    253|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  13.3k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 13.3k, False: 22.2k]
  ------------------
  383|  13.3k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  13.3k|#  define MINBPC(enc) 2
  ------------------
  384|  13.3k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  13.3k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  13.3k|    {                                                                          \
  |  |  |  |  135|  13.3k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  13.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  13.3k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 12, False: 13.3k]
  |  |  |  |  ------------------
  |  |  |  |  136|     12|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     12|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     12|      }                                                                        \
  |  |  |  |  138|  13.3k|    }
  |  |  ------------------
  ------------------
  385|  13.3k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  13.3k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  13.3k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  8.52k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 8.52k, False: 4.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 1.93k, False: 11.3k]
  ------------------
  386|  1.93k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.93k|#  define MINBPC(enc) 2
  ------------------
  387|  13.3k|    *nextTokPtr = ptr;
  388|  13.3k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  13.3k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  1.43k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 1.43k, False: 34.1k]
  ------------------
  390|  1.43k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.43k|#  define MINBPC(enc) 2
  ------------------
  391|  1.43k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  1.43k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  4.14k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 35.5k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 35.5k]
  |  |  |  |  ------------------
  |  |  |  |   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.05k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.99k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.05k, False: 33.5k]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.05k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 61, False: 1.99k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.99k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     61|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.99k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  1.99k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  1.99k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.99k|    break;
  |  |  ------------------
  |  |   63|  1.99k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 50, False: 35.5k]
  |  |  ------------------
  |  |   64|     50|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 35.5k]
  |  |  ------------------
  |  |   65|     60|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 10, False: 35.5k]
  |  |  ------------------
  |  |   66|     60|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     60|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     60|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  6.84k|  default:
  ------------------
  |  Branch (393:3): [True: 6.84k, False: 28.7k]
  ------------------
  394|  6.84k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  6.84k|#  define MINBPC(enc) 2
  ------------------
  395|  6.84k|    break;
  396|  35.5k|  }
  397|  1.72M|  while (HAS_CHAR(enc, ptr, end)) {
  398|  1.72M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.72M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.72M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   105k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 105k, False: 1.61M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  399|      0|#  define LEAD_CASE(n)                                                         \
  400|      0|  case BT_LEAD##n:                                                             \
  401|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  402|      0|      *nextTokPtr = ptr;                                                       \
  403|      0|      return XML_TOK_DATA_CHARS;                                               \
  404|      0|    }                                                                          \
  405|      0|    ptr += n;                                                                  \
  406|      0|    break;
  407|      0|      LEAD_CASE(2)
  ------------------
  |  |  400|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 0, False: 1.72M]
  |  |  ------------------
  |  |  401|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  402|      0|      *nextTokPtr = ptr;                                                       \
  |  |  403|      0|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      0|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      0|    }                                                                          \
  |  |  405|      0|    ptr += n;                                                                  \
  |  |  406|      0|    break;
  ------------------
  408|      0|      LEAD_CASE(3)
  ------------------
  |  |  400|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 0, False: 1.72M]
  |  |  ------------------
  |  |  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|   204k|      LEAD_CASE(4)
  ------------------
  |  |  400|   204k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 204k, False: 1.51M]
  |  |  ------------------
  |  |  401|   204k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|   204k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 55, False: 204k]
  |  |  ------------------
  |  |  402|     55|      *nextTokPtr = ptr;                                                       \
  |  |  403|     55|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     55|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|     55|    }                                                                          \
  |  |  405|   204k|    ptr += n;                                                                  \
  |  |  406|   204k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|     45|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 45, False: 1.72M]
  ------------------
  412|     45|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 0, False: 1.72M]
  ------------------
  413|     52|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 7, False: 1.72M]
  ------------------
  414|  10.1k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 10.0k, False: 1.71M]
  ------------------
  415|  11.1k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 1.04k, False: 1.72M]
  ------------------
  416|  20.2k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 9.09k, False: 1.71M]
  ------------------
  417|  20.2k|      *nextTokPtr = ptr;
  418|  20.2k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  20.2k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|  1.49M|    default:
  ------------------
  |  Branch (419:5): [True: 1.49M, False: 225k]
  ------------------
  420|  1.49M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.49M|#  define MINBPC(enc) 2
  ------------------
  421|  1.49M|      break;
  422|  1.72M|    }
  423|  1.72M|  }
  424|    136|  *nextTokPtr = ptr;
  425|    136|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    136|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  20.4k|}
xmltok.c:big2_attributeValueTok:
 1262|  55.8k|                          const char **nextTokPtr) {
 1263|  55.8k|  const char *start;
 1264|  55.8k|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 4.02k, False: 51.8k]
  ------------------
 1265|  4.02k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  4.02k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|  51.8k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  51.8k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  51.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  51.8k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 51.8k]
  ------------------
 1267|       |    /* This line cannot be executed.  The incoming data has already
 1268|       |     * been tokenized once, so incomplete characters like this have
 1269|       |     * already been eliminated from the input.  Retaining the paranoia
 1270|       |     * check is still valuable, however.
 1271|       |     */
 1272|      0|    return XML_TOK_PARTIAL; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1273|      0|  }
 1274|  51.8k|  start = ptr;
 1275|  1.36M|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  1.36M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.36M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.36M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   107k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 107k, False: 1.26M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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.36M]
  |  |  ------------------
  |  | 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.36M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1283|   107k|      LEAD_CASE(4)
  ------------------
  |  | 1278|   107k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 107k, False: 1.26M]
  |  |  ------------------
  |  | 1279|   107k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|   107k|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|  6.54k|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 6.54k, False: 1.36M]
  ------------------
 1286|  6.54k|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 3.75k, False: 2.79k]
  ------------------
 1287|  3.75k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  3.75k|#  define PREFIX(ident) big2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  3.75k|#  define MINBPC(enc) 2
  ------------------
 1288|  2.79k|      *nextTokPtr = ptr;
 1289|  2.79k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.79k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      2|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 2, False: 1.36M]
  ------------------
 1291|       |      /* this is for inside entity references */
 1292|      2|      *nextTokPtr = ptr;
 1293|      2|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
 1294|  5.56k|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 5.56k, False: 1.36M]
  ------------------
 1295|  5.56k|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 3.63k, False: 1.93k]
  ------------------
 1296|  3.63k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  3.63k|#  define MINBPC(enc) 2
  ------------------
 1297|  3.63k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  3.63k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|  3.63k|      }
 1299|  1.93k|      *nextTokPtr = ptr;
 1300|  1.93k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.93k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|  29.3k|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 29.3k, False: 1.33M]
  ------------------
 1302|  29.3k|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 17.4k, False: 11.9k]
  ------------------
 1303|  17.4k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  17.4k|#  define MINBPC(enc) 2
  ------------------
 1304|  17.4k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  17.4k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  17.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  17.4k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 257, False: 17.1k]
  ------------------
 1305|    257|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    257|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|  17.1k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  17.1k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  17.1k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  12.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 12.4k, False: 4.71k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 4.17k, False: 12.9k]
  ------------------
 1307|  4.17k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.17k|#  define MINBPC(enc) 2
  ------------------
 1308|  17.1k|        *nextTokPtr = ptr;
 1309|  17.1k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  17.1k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|  17.4k|      }
 1311|  11.9k|      *nextTokPtr = ptr;
 1312|  11.9k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  11.9k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  8.09k|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 8.09k, False: 1.35M]
  ------------------
 1314|  8.09k|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 4.40k, False: 3.69k]
  ------------------
 1315|  4.40k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  4.40k|#  define MINBPC(enc) 2
  ------------------
 1316|  4.40k|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  4.40k|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  4.40k|      }
 1318|  3.69k|      *nextTokPtr = ptr;
 1319|  3.69k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  3.69k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|  1.21M|    default:
  ------------------
  |  Branch (1320:5): [True: 1.21M, False: 157k]
  ------------------
 1321|  1.21M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.21M|#  define MINBPC(enc) 2
  ------------------
 1322|  1.21M|      break;
 1323|  1.36M|    }
 1324|  1.36M|  }
 1325|  2.19k|  *nextTokPtr = ptr;
 1326|  2.19k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.19k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|  51.8k|}
xmltok.c:big2_entityValueTok:
 1331|   107k|                       const char **nextTokPtr) {
 1332|   107k|  const char *start;
 1333|   107k|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 1.75k, False: 105k]
  ------------------
 1334|  1.75k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.75k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|   105k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   105k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   105k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|   105k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 105k]
  ------------------
 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|   105k|  start = ptr;
 1344|  8.79M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  8.79M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  8.79M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  8.79M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   427k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 427k, False: 8.37M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1346|      0|#  define LEAD_CASE(n)                                                         \
 1347|      0|  case BT_LEAD##n:                                                             \
 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1349|      0|    break;
 1350|      0|      LEAD_CASE(2)
  ------------------
  |  | 1347|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 0, False: 8.79M]
  |  |  ------------------
  |  | 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.79M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1352|   740k|      LEAD_CASE(4)
  ------------------
  |  | 1347|   740k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 740k, False: 8.05M]
  |  |  ------------------
  |  | 1348|   740k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|   740k|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  15.9k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 15.9k, False: 8.78M]
  ------------------
 1355|  15.9k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 12.3k, False: 3.63k]
  ------------------
 1356|  12.3k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  12.3k|#  define PREFIX(ident) big2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  12.3k|#  define MINBPC(enc) 2
  ------------------
 1357|  3.63k|      *nextTokPtr = ptr;
 1358|  3.63k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  3.63k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      6|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 6, False: 8.79M]
  ------------------
 1360|      6|      if (ptr == start) {
  ------------------
  |  Branch (1360:11): [True: 4, False: 2]
  ------------------
 1361|      4|        int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|      4|#  define PREFIX(ident) big2_##ident
  ------------------
                      int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|      4|#  define MINBPC(enc) 2
  ------------------
 1362|      4|        return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   89|      4|#define XML_TOK_PERCENT 22
  ------------------
                      return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (1362:16): [True: 1, False: 3]
  ------------------
 1363|      4|      }
 1364|      2|      *nextTokPtr = ptr;
 1365|      2|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|      2|#define XML_TOK_DATA_CHARS 6
  ------------------
 1366|  7.33k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 7.33k, False: 8.79M]
  ------------------
 1367|  7.33k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 4.40k, False: 2.92k]
  ------------------
 1368|  4.40k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  4.40k|#  define MINBPC(enc) 2
  ------------------
 1369|  4.40k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  4.40k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|  4.40k|      }
 1371|  2.92k|      *nextTokPtr = ptr;
 1372|  2.92k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.92k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|  81.4k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 81.4k, False: 8.71M]
  ------------------
 1374|  81.4k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 43.9k, False: 37.4k]
  ------------------
 1375|  43.9k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  43.9k|#  define MINBPC(enc) 2
  ------------------
 1376|  43.9k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  43.9k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  43.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  43.9k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 422, False: 43.5k]
  ------------------
 1377|    422|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    422|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|  43.5k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  43.5k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  43.5k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  33.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 33.8k, False: 9.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 1.49k, False: 42.0k]
  ------------------
 1379|  1.49k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.49k|#  define MINBPC(enc) 2
  ------------------
 1380|  43.5k|        *nextTokPtr = ptr;
 1381|  43.5k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  43.5k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|  43.9k|      }
 1383|  37.4k|      *nextTokPtr = ptr;
 1384|  37.4k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  37.4k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  7.95M|    default:
  ------------------
  |  Branch (1385:5): [True: 7.95M, False: 845k]
  ------------------
 1386|  7.95M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  7.95M|#  define MINBPC(enc) 2
  ------------------
 1387|  7.95M|      break;
 1388|  8.79M|    }
 1389|  8.79M|  }
 1390|  1.24k|  *nextTokPtr = ptr;
 1391|  1.24k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.24k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|   105k|}
xmltok.c:big2_nameMatchesAscii:
 1715|  27.0k|                         const char *end1, const char *ptr2) {
 1716|  27.0k|  UNUSED_P(enc);
  ------------------
  |  |  135|  27.0k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|   106k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  916|  79.2k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1717:10): [True: 91.1k, False: 15.1k]
  ------------------
 1718|  91.1k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  916|  91.1k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1718:9): [True: 35, False: 91.0k]
  ------------------
 1719|       |      /* This line cannot be executed.  The incoming data has already
 1720|       |       * been tokenized once, so incomplete characters like this have
 1721|       |       * already been eliminated from the input.  Retaining the
 1722|       |       * paranoia check is still valuable, however.
 1723|       |       */
 1724|     35|      return 0; /* LCOV_EXCL_LINE */
 1725|     35|    }
 1726|  91.0k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  920|  91.0k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  91.0k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 91.0k, False: 35]
  |  |  |  |  |  Branch (872:49): [True: 79.2k, False: 11.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1727|  11.8k|      return 0;
 1728|  91.0k|  }
 1729|  15.1k|  return ptr1 == end1;
 1730|  27.0k|}
xmltok.c:big2_nameLength:
 1733|  12.5k|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  12.5k|  const char *start = ptr;
 1735|  34.6k|  for (;;) {
 1736|  34.6k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  34.6k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  34.6k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  26.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 26.3k, False: 8.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 34.6k]
  |  |  ------------------
  |  | 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: 34.6k]
  |  |  ------------------
  |  | 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: 34.6k]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1744|      0|#  undef LEAD_CASE
 1745|  8.30k|    case BT_NONASCII:
  ------------------
  |  Branch (1745:5): [True: 8.30k, False: 26.3k]
  ------------------
 1746|  18.5k|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 10.2k, False: 24.3k]
  ------------------
 1747|  18.5k|#  ifdef XML_NS
 1748|  18.5k|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 34.6k]
  ------------------
 1749|  18.5k|#  endif
 1750|  21.8k|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 3.22k, False: 31.4k]
  ------------------
 1751|  21.9k|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 96, False: 34.5k]
  ------------------
 1752|  22.1k|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 181, False: 34.5k]
  ------------------
 1753|  22.1k|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 19, False: 34.6k]
  ------------------
 1754|  22.1k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  22.1k|#  define MINBPC(enc) 2
  ------------------
 1755|  22.1k|      break;
 1756|  12.5k|    default:
  ------------------
  |  Branch (1756:5): [True: 12.5k, False: 22.1k]
  ------------------
 1757|  12.5k|      return (int)(ptr - start);
 1758|  34.6k|    }
 1759|  34.6k|  }
 1760|  12.5k|}
xmltok.c:big2_getAtts:
 1510|  8.64k|                ATTRIBUTE *atts) {
 1511|  8.64k|  enum { other, inName, inValue } state = inName;
 1512|  8.64k|  int nAtts = 0;
 1513|  8.64k|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  4.08M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  8.64k|#  define MINBPC(enc) 2
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  4.08M|#  define MINBPC(enc) 2
  ------------------
 1517|  4.08M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  4.08M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.08M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.27M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.27M, False: 2.81M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 4.08M]
  |  |  ------------------
  |  | 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: 4.08M]
  |  |  ------------------
  |  | 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|  69.5k|      LEAD_CASE(4)
  ------------------
  |  | 1527|  69.5k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 69.5k, False: 4.02M]
  |  |  ------------------
  |  | 1528|  69.5k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  69.5k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 69.5k]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  916|  69.5k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|  69.5k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|  2.74M|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 2.74M, False: 1.34M]
  ------------------
 1535|  2.96M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 217k, False: 3.87M]
  ------------------
 1536|  3.00M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 45.6k, False: 4.04M]
  ------------------
 1537|  3.00M|      START_NAME
  ------------------
  |  | 1519|  3.00M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 214k, False: 2.79M]
  |  |  ------------------
  |  | 1520|   214k|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 109k, False: 104k]
  |  |  ------------------
  |  | 1521|   109k|        atts[nAtts].name = ptr;                                                \
  |  | 1522|   109k|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|   109k|      }                                                                        \
  |  | 1524|   214k|      state = inName;                                                          \
  |  | 1525|   214k|    }
  ------------------
 1538|  3.00M|      break;
 1539|      0|#  undef START_NAME
 1540|   373k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 373k, False: 3.71M]
  ------------------
 1541|   373k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 185k, False: 188k]
  ------------------
 1542|   185k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 94.8k, False: 90.8k]
  ------------------
 1543|  94.8k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  94.8k|#  define MINBPC(enc) 2
  ------------------
 1544|   185k|        state = inValue;
 1545|   185k|        open = BT_QUOT;
 1546|   188k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 185k, False: 2.38k]
  ------------------
 1547|   185k|        state = other;
 1548|   185k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 94.8k, False: 90.8k]
  ------------------
 1549|  94.8k|          atts[nAtts].valueEnd = ptr;
 1550|   185k|        nAtts++;
 1551|   185k|      }
 1552|   373k|      break;
 1553|  57.1k|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 57.1k, False: 4.03M]
  ------------------
 1554|  57.1k|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 28.4k, False: 28.7k]
  ------------------
 1555|  28.4k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 15.1k, False: 13.3k]
  ------------------
 1556|  15.1k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  15.1k|#  define MINBPC(enc) 2
  ------------------
 1557|  28.4k|        state = inValue;
 1558|  28.4k|        open = BT_APOS;
 1559|  28.7k|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 28.4k, False: 295]
  ------------------
 1560|  28.4k|        state = other;
 1561|  28.4k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 15.1k, False: 13.3k]
  ------------------
 1562|  15.1k|          atts[nAtts].valueEnd = ptr;
 1563|  28.4k|        nAtts++;
 1564|  28.4k|      }
 1565|  57.1k|      break;
 1566|  4.55k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 4.55k, False: 4.08M]
  ------------------
 1567|  4.55k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 3.65k, False: 903]
  ------------------
 1568|  3.65k|        atts[nAtts].normalized = 0;
 1569|  4.55k|      break;
 1570|  19.7k|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 19.7k, False: 4.07M]
  ------------------
 1571|  19.7k|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 2.12k, False: 17.6k]
  ------------------
 1572|  2.12k|        state = other;
 1573|  17.6k|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 10.6k, False: 6.93k]
  |  Branch (1573:36): [True: 7.67k, False: 3.01k]
  |  Branch (1573:55): [True: 5.04k, False: 2.62k]
  ------------------
 1574|  17.6k|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 1.68k, False: 3.35k]
  ------------------
 1575|  5.04k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  919|  3.35k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  3.35k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 3.35k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|  8.40k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 942, False: 2.41k]
  ------------------
 1576|  5.04k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  919|  2.41k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  2.41k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 991, False: 1.42k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|  7.46k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 246, False: 2.17k]
  ------------------
 1577|  5.04k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  918|  2.17k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.17k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|    745|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 745, False: 1.42k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 394, False: 1.77k]
  ------------------
 1578|  3.26k|        atts[nAtts].normalized = 0;
 1579|  19.7k|      break;
 1580|  17.5k|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 17.5k, False: 4.07M]
  ------------------
 1581|   269k|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 252k, False: 3.83M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|   269k|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 23.4k, False: 246k]
  ------------------
 1585|  23.4k|        state = other;
 1586|   246k|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 29.1k, False: 217k]
  |  Branch (1586:36): [True: 24.2k, False: 4.93k]
  ------------------
 1587|  24.2k|        atts[nAtts].normalized = 0;
 1588|   269k|      break;
 1589|  12.7k|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 12.7k, False: 4.07M]
  ------------------
 1590|  14.4k|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 1.76k, False: 4.08M]
  ------------------
 1591|  14.4k|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 8.64k, False: 5.85k]
  ------------------
 1592|  8.64k|        return nAtts;
 1593|  5.85k|      break;
 1594|   272k|    default:
  ------------------
  |  Branch (1594:5): [True: 272k, False: 3.81M]
  ------------------
 1595|   272k|      break;
 1596|  4.08M|    }
 1597|  4.08M|  }
 1598|       |  /* not reached */
 1599|  8.64k|}
xmltok.c:big2_charRefNumber:
 1602|  6.96k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  6.96k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  6.96k|  UNUSED_P(enc);
  ------------------
  |  |  135|  6.96k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  6.96k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  916|  6.96k|#  define MINBPC(enc) 2
  ------------------
 1607|  6.96k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  920|  6.96k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  6.96k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 6.96k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 6.38k, False: 587]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1608|  26.8k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  916|  6.38k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  920|  26.8k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  26.8k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 26.8k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 6.36k, False: 20.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1609|  20.5k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  20.5k|#  define MINBPC(enc) 2
  ------------------
 1610|  20.5k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  919|  20.5k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  20.5k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 20.5k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1611|  20.5k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 20.5k]
  ------------------
 1612|    763|      case ASCII_0:
  ------------------
  |  |   90|    763|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 763, False: 19.7k]
  ------------------
 1613|  1.41k|      case ASCII_1:
  ------------------
  |  |   91|  1.41k|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 647, False: 19.8k]
  ------------------
 1614|  2.49k|      case ASCII_2:
  ------------------
  |  |   92|  2.49k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 1.08k, False: 19.4k]
  ------------------
 1615|  4.80k|      case ASCII_3:
  ------------------
  |  |   93|  4.80k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 2.30k, False: 18.2k]
  ------------------
 1616|  5.78k|      case ASCII_4:
  ------------------
  |  |   94|  5.78k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 989, False: 19.5k]
  ------------------
 1617|  6.21k|      case ASCII_5:
  ------------------
  |  |   95|  6.21k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 425, False: 20.0k]
  ------------------
 1618|  6.56k|      case ASCII_6:
  ------------------
  |  |   96|  6.56k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 354, False: 20.1k]
  ------------------
 1619|  7.29k|      case ASCII_7:
  ------------------
  |  |   97|  7.29k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 722, False: 19.7k]
  ------------------
 1620|  7.97k|      case ASCII_8:
  ------------------
  |  |   98|  7.97k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 681, False: 19.8k]
  ------------------
 1621|  8.95k|      case ASCII_9:
  ------------------
  |  |   99|  8.95k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 979, False: 19.5k]
  ------------------
 1622|  8.95k|        result <<= 4;
 1623|  8.95k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  8.95k|#define ASCII_0 0x30
  ------------------
 1624|  8.95k|        break;
 1625|    317|      case ASCII_A:
  ------------------
  |  |   36|    317|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 317, False: 20.2k]
  ------------------
 1626|    847|      case ASCII_B:
  ------------------
  |  |   37|    847|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 530, False: 19.9k]
  ------------------
 1627|  1.32k|      case ASCII_C:
  ------------------
  |  |   38|  1.32k|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 474, False: 20.0k]
  ------------------
 1628|  1.72k|      case ASCII_D:
  ------------------
  |  |   39|  1.72k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 405, False: 20.1k]
  ------------------
 1629|  2.09k|      case ASCII_E:
  ------------------
  |  |   40|  2.09k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 368, False: 20.1k]
  ------------------
 1630|  2.71k|      case ASCII_F:
  ------------------
  |  |   41|  2.71k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 625, False: 19.8k]
  ------------------
 1631|  2.71k|        result <<= 4;
 1632|  2.71k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  2.71k|#define ASCII_A 0x41
  ------------------
 1633|  2.71k|        break;
 1634|  1.97k|      case ASCII_a:
  ------------------
  |  |   63|  1.97k|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 1.97k, False: 18.5k]
  ------------------
 1635|  3.94k|      case ASCII_b:
  ------------------
  |  |   64|  3.94k|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 1.97k, False: 18.5k]
  ------------------
 1636|  5.21k|      case ASCII_c:
  ------------------
  |  |   65|  5.21k|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 1.26k, False: 19.2k]
  ------------------
 1637|  6.86k|      case ASCII_d:
  ------------------
  |  |   66|  6.86k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 1.64k, False: 18.8k]
  ------------------
 1638|  8.51k|      case ASCII_e:
  ------------------
  |  |   67|  8.51k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 1.65k, False: 18.8k]
  ------------------
 1639|  8.85k|      case ASCII_f:
  ------------------
  |  |   68|  8.85k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 339, False: 20.1k]
  ------------------
 1640|  8.85k|        result <<= 4;
 1641|  8.85k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  8.85k|#define ASCII_a 0x61
  ------------------
 1642|  8.85k|        break;
 1643|  20.5k|      }
 1644|  20.5k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 14, False: 20.5k]
  ------------------
 1645|     14|        return -1;
 1646|  20.5k|    }
 1647|  6.38k|  } else {
 1648|  2.38k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  920|  2.38k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.38k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.38k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 583, False: 1.80k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  1.80k|#  define MINBPC(enc) 2
  ------------------
 1649|  1.80k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  919|  1.80k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  1.80k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.80k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1650|  1.80k|      result *= 10;
 1651|  1.80k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  1.80k|#define ASCII_0 0x30
  ------------------
 1652|  1.80k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 4, False: 1.80k]
  ------------------
 1653|      4|        return -1;
 1654|  1.80k|    }
 1655|    587|  }
 1656|  6.95k|  return checkCharRefNumber(result);
 1657|  6.96k|}
xmltok.c:big2_predefinedEntityName:
 1661|  10.6k|                             const char *end) {
 1662|  10.6k|  UNUSED_P(enc);
  ------------------
  |  |  135|  10.6k|#  define UNUSED_P(p) (void)p
  ------------------
 1663|  10.6k|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  916|  10.6k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1663:11): [True: 2.65k, False: 7.98k]
  ------------------
 1664|  1.76k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 1.76k, False: 8.88k]
  ------------------
 1665|  1.76k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  920|  1.76k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.76k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.14k, False: 617]
  |  |  |  |  |  Branch (872:49): [True: 729, False: 419]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1666|    729|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|    729|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|    729|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:31): [True: 331, False: 398]
  |  |  |  |  |  Branch (871:32): [True: 519, False: 210]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1667|    203|      case ASCII_l:
  ------------------
  |  |   74|    203|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 203, False: 526]
  ------------------
 1668|    203|        return ASCII_LT;
  ------------------
  |  |  111|    203|#define ASCII_LT 0x3C
  ------------------
 1669|    195|      case ASCII_g:
  ------------------
  |  |   69|    195|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 195, False: 534]
  ------------------
 1670|    195|        return ASCII_GT;
  ------------------
  |  |  113|    195|#define ASCII_GT 0x3E
  ------------------
 1671|    729|      }
 1672|    729|    }
 1673|  1.36k|    break;
 1674|  1.63k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.63k, False: 9.00k]
  ------------------
 1675|  1.63k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  920|  1.63k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.63k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.33k, False: 301]
  |  |  |  |  |  Branch (872:49): [True: 1.04k, False: 295]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1676|  1.04k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.04k|#  define MINBPC(enc) 2
  ------------------
 1677|  1.04k|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  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: 823, False: 220]
  |  |  |  |  |  Branch (872:49): [True: 600, False: 223]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1678|    600|        ptr += MINBPC(enc);
  ------------------
  |  |  916|    600|#  define MINBPC(enc) 2
  ------------------
 1679|    600|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  920|    600|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    600|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 405, False: 195]
  |  |  |  |  |  Branch (872:49): [True: 205, False: 200]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1680|    205|          return ASCII_AMP;
  ------------------
  |  |  105|    205|#define ASCII_AMP 0x26
  ------------------
 1681|    600|      }
 1682|  1.04k|    }
 1683|  1.43k|    break;
 1684|  4.58k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 4.58k, False: 6.06k]
  ------------------
 1685|  4.58k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  4.58k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  4.58k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:31): [True: 1.01k, False: 3.57k]
  |  |  |  |  |  Branch (871:32): [True: 3.87k, False: 707]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1686|  1.50k|    case ASCII_q:
  ------------------
  |  |   79|  1.50k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 1.50k, False: 3.08k]
  ------------------
 1687|  1.50k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.50k|#  define MINBPC(enc) 2
  ------------------
 1688|  1.50k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  920|  1.50k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.50k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.30k, False: 195]
  |  |  |  |  |  Branch (872:49): [True: 1.01k, False: 296]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1689|  1.01k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.01k|#  define MINBPC(enc) 2
  ------------------
 1690|  1.01k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  920|  1.01k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.01k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 795, False: 215]
  |  |  |  |  |  Branch (872:49): [True: 593, False: 202]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1691|    593|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    593|#  define MINBPC(enc) 2
  ------------------
 1692|    593|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  920|    593|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    593|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 395, False: 198]
  |  |  |  |  |  Branch (872:49): [True: 71, False: 324]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1693|     71|            return ASCII_QUOT;
  ------------------
  |  |  104|     71|#define ASCII_QUOT 0x22
  ------------------
 1694|    593|        }
 1695|  1.01k|      }
 1696|  1.43k|      break;
 1697|  2.07k|    case ASCII_a:
  ------------------
  |  |   63|  2.07k|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 2.07k, False: 2.51k]
  ------------------
 1698|  2.07k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.07k|#  define MINBPC(enc) 2
  ------------------
 1699|  2.07k|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  920|  2.07k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.07k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.87k, False: 200]
  |  |  |  |  |  Branch (872:49): [True: 1.61k, False: 261]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1700|  1.61k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.61k|#  define MINBPC(enc) 2
  ------------------
 1701|  1.61k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  920|  1.61k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.61k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.54k, False: 69]
  |  |  |  |  |  Branch (872:49): [True: 1.32k, False: 217]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1702|  1.32k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.32k|#  define MINBPC(enc) 2
  ------------------
 1703|  1.32k|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  920|  1.32k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.32k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.12k, False: 204]
  |  |  |  |  |  Branch (872:49): [True: 213, False: 907]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1704|    213|            return ASCII_APOS;
  ------------------
  |  |  106|    213|#define ASCII_APOS 0x27
  ------------------
 1705|  1.32k|        }
 1706|  1.61k|      }
 1707|  1.85k|      break;
 1708|  4.58k|    }
 1709|  10.6k|  }
 1710|  9.76k|  return 0;
 1711|  10.6k|}
xmltok.c:big2_updatePosition:
 1779|  3.32k|                       POSITION *pos) {
 1780|  3.49M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  3.49M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  3.49M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  3.49M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   358k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 358k, False: 3.13M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1782|      0|#  define LEAD_CASE(n)                                                         \
 1783|      0|  case BT_LEAD##n:                                                             \
 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1785|      0|    pos->columnNumber++;                                                       \
 1786|      0|    break;
 1787|      0|      LEAD_CASE(2)
  ------------------
  |  | 1783|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 0, False: 3.49M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1788|      0|      LEAD_CASE(3)
  ------------------
  |  | 1783|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 0, False: 3.49M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1789|   425k|      LEAD_CASE(4)
  ------------------
  |  | 1783|   425k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 425k, False: 3.06M]
  |  |  ------------------
  |  | 1784|   425k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|   425k|    pos->columnNumber++;                                                       \
  |  | 1786|   425k|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|  9.10k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 9.10k, False: 3.48M]
  ------------------
 1792|  9.10k|      pos->columnNumber = 0;
 1793|  9.10k|      pos->lineNumber++;
 1794|  9.10k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  9.10k|#  define MINBPC(enc) 2
  ------------------
 1795|  9.10k|      break;
 1796|  34.0k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 34.0k, False: 3.45M]
  ------------------
 1797|  34.0k|      pos->lineNumber++;
 1798|  34.0k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  34.0k|#  define MINBPC(enc) 2
  ------------------
 1799|  34.0k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|  34.0k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  68.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  34.0k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 34.0k, False: 48]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  34.0k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  34.0k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  22.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 22.3k, False: 11.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 5.78k, False: 28.2k]
  ------------------
 1800|  5.78k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  5.78k|#  define MINBPC(enc) 2
  ------------------
 1801|  34.0k|      pos->columnNumber = 0;
 1802|  34.0k|      break;
 1803|  3.02M|    default:
  ------------------
  |  Branch (1803:5): [True: 3.02M, False: 468k]
  ------------------
 1804|  3.02M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.02M|#  define MINBPC(enc) 2
  ------------------
 1805|  3.02M|      pos->columnNumber++;
 1806|  3.02M|      break;
 1807|  3.49M|    }
 1808|  3.49M|  }
 1809|  3.32k|}
xmltok.c:big2_isPublicId:
 1450|  1.45k|                   const char **badPtr) {
 1451|  1.45k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.45k|#  define MINBPC(enc) 2
  ------------------
 1452|  1.45k|  end -= MINBPC(enc);
  ------------------
  |  |  916|  1.45k|#  define MINBPC(enc) 2
  ------------------
 1453|  24.9k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  24.8k|#  define MINBPC(enc) 2
  ------------------
 1454|  24.9k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  24.9k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  24.9k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  24.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 24.8k, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1455|    379|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 379, False: 24.5k]
  ------------------
 1456|  3.81k|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 3.43k, False: 21.4k]
  ------------------
 1457|  4.28k|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 471, False: 24.4k]
  ------------------
 1458|  4.72k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 433, False: 24.4k]
  ------------------
 1459|  6.77k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 2.05k, False: 22.8k]
  ------------------
 1460|  7.77k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 1.00k, False: 23.8k]
  ------------------
 1461|  8.35k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 579, False: 24.3k]
  ------------------
 1462|  8.78k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 431, False: 24.4k]
  ------------------
 1463|  11.2k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 2.46k, False: 22.4k]
  ------------------
 1464|  11.4k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 197, False: 24.7k]
  ------------------
 1465|  11.7k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 265, False: 24.6k]
  ------------------
 1466|  13.4k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 1.77k, False: 23.1k]
  ------------------
 1467|  13.7k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 294, False: 24.6k]
  ------------------
 1468|  15.0k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 1.21k, False: 23.6k]
  ------------------
 1469|  15.3k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 306, False: 24.5k]
  ------------------
 1470|  15.6k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 340, False: 24.5k]
  ------------------
 1471|  15.8k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 199, False: 24.7k]
  ------------------
 1472|  16.6k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 836, False: 24.0k]
  ------------------
 1473|  16.6k|#  ifdef XML_NS
 1474|  16.6k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 24.9k]
  ------------------
 1475|  16.6k|#  endif
 1476|  16.6k|      break;
 1477|  1.40k|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 1.40k, False: 23.5k]
  ------------------
 1478|  1.40k|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  920|  1.40k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.40k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.40k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 1.39k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1479|      1|        *badPtr = ptr;
 1480|      1|        return 0;
 1481|      1|      }
 1482|  1.39k|      break;
 1483|  1.39k|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 243, False: 24.6k]
  ------------------
 1484|  6.40k|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 6.16k, False: 18.7k]
  ------------------
 1485|  6.40k|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  919|  6.40k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  6.40k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 6.40k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1485:11): [True: 6.39k, False: 10]
  ------------------
 1486|  6.39k|        break;
 1487|       |      /* fall through */
 1488|    427|    default:
  ------------------
  |  Branch (1488:5): [True: 417, False: 24.4k]
  ------------------
 1489|    427|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|    427|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|    427|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 404, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1490|    200|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 200, False: 227]
  ------------------
 1491|    394|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 194, False: 233]
  ------------------
 1492|    394|        break;
 1493|     33|      default:
  ------------------
  |  Branch (1493:7): [True: 33, False: 394]
  ------------------
 1494|     33|        *badPtr = ptr;
 1495|     33|        return 0;
 1496|    427|      }
 1497|    394|      break;
 1498|  24.9k|    }
 1499|  24.9k|  }
 1500|  1.42k|  return 1;
 1501|  1.45k|}

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

