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

xml_parsebuffer_fuzzer.c:sip_tokey:
  148|  19.9k|sip_tokey(struct sipkey *key, const void *src) {
  149|  19.9k|  key->k[0] = SIP_U8TO64_LE((const unsigned char *)src);
  ------------------
  |  |  124|  19.9k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  19.9k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  19.9k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  19.9k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  150|  19.9k|  key->k[1] = SIP_U8TO64_LE((const unsigned char *)src + 8);
  ------------------
  |  |  124|  19.9k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  19.9k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  19.9k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  19.9k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  151|  19.9k|  return key;
  152|  19.9k|} /* sip_tokey() */
xml_parsebuffer_fuzzer.c:siphash24:
  271|  19.9k|siphash24(const void *src, size_t len, const struct sipkey *key) {
  272|  19.9k|  struct siphash state = SIPHASH_INITIALIZER;
  ------------------
  |  |  130|  19.9k|  { 0, 0, 0, 0, {0}, 0, 0 }
  ------------------
  273|  19.9k|  return sip24_final(sip24_update(sip24_init(&state, key), src, len));
  274|  19.9k|} /* siphash24() */
xml_parsebuffer_fuzzer.c:sip24_final:
  231|  19.9k|sip24_final(struct siphash *H) {
  232|  19.9k|  const char left = (char)(H->p - H->buf);
  233|  19.9k|  uint64_t b = (H->c + left) << 56;
  234|       |
  235|  19.9k|  switch (left) {
  ------------------
  |  Branch (235:11): [True: 0, False: 19.9k]
  ------------------
  236|  1.26k|  case 7:
  ------------------
  |  Branch (236:3): [True: 1.26k, False: 18.7k]
  ------------------
  237|  1.26k|    b |= (uint64_t)H->buf[6] << 48;
  238|       |    /* fall through */
  239|  5.04k|  case 6:
  ------------------
  |  Branch (239:3): [True: 3.77k, False: 16.1k]
  ------------------
  240|  5.04k|    b |= (uint64_t)H->buf[5] << 40;
  241|       |    /* fall through */
  242|  6.23k|  case 5:
  ------------------
  |  Branch (242:3): [True: 1.19k, False: 18.7k]
  ------------------
  243|  6.23k|    b |= (uint64_t)H->buf[4] << 32;
  244|       |    /* fall through */
  245|  10.0k|  case 4:
  ------------------
  |  Branch (245:3): [True: 3.81k, False: 16.1k]
  ------------------
  246|  10.0k|    b |= (uint64_t)H->buf[3] << 24;
  247|       |    /* fall through */
  248|  11.3k|  case 3:
  ------------------
  |  Branch (248:3): [True: 1.32k, False: 18.6k]
  ------------------
  249|  11.3k|    b |= (uint64_t)H->buf[2] << 16;
  250|       |    /* fall through */
  251|  14.8k|  case 2:
  ------------------
  |  Branch (251:3): [True: 3.46k, False: 16.5k]
  ------------------
  252|  14.8k|    b |= (uint64_t)H->buf[1] << 8;
  253|       |    /* fall through */
  254|  16.1k|  case 1:
  ------------------
  |  Branch (254:3): [True: 1.35k, False: 18.6k]
  ------------------
  255|  16.1k|    b |= (uint64_t)H->buf[0] << 0;
  256|       |    /* fall through */
  257|  19.9k|  case 0:
  ------------------
  |  Branch (257:3): [True: 3.78k, False: 16.1k]
  ------------------
  258|  19.9k|    break;
  259|  19.9k|  }
  260|       |
  261|  19.9k|  H->v3 ^= b;
  262|  19.9k|  sip_round(H, 2);
  263|  19.9k|  H->v0 ^= b;
  264|  19.9k|  H->v2 ^= 0xff;
  265|  19.9k|  sip_round(H, 4);
  266|       |
  267|  19.9k|  return H->v0 ^ H->v1 ^ H->v2 ^ H->v3;
  268|  19.9k|} /* sip24_final() */
xml_parsebuffer_fuzzer.c:sip_round:
  167|  41.4M|sip_round(struct siphash *H, const int rounds) {
  168|  41.4M|  int i;
  169|       |
  170|   124M|  for (i = 0; i < rounds; i++) {
  ------------------
  |  Branch (170:15): [True: 82.9M, False: 41.4M]
  ------------------
  171|  82.9M|    H->v0 += H->v1;
  172|  82.9M|    H->v1 = SIP_ROTL(H->v1, 13);
  ------------------
  |  |  111|  82.9M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  173|  82.9M|    H->v1 ^= H->v0;
  174|  82.9M|    H->v0 = SIP_ROTL(H->v0, 32);
  ------------------
  |  |  111|  82.9M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  175|       |
  176|  82.9M|    H->v2 += H->v3;
  177|  82.9M|    H->v3 = SIP_ROTL(H->v3, 16);
  ------------------
  |  |  111|  82.9M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  178|  82.9M|    H->v3 ^= H->v2;
  179|       |
  180|  82.9M|    H->v0 += H->v3;
  181|  82.9M|    H->v3 = SIP_ROTL(H->v3, 21);
  ------------------
  |  |  111|  82.9M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  182|  82.9M|    H->v3 ^= H->v0;
  183|       |
  184|  82.9M|    H->v2 += H->v1;
  185|  82.9M|    H->v1 = SIP_ROTL(H->v1, 17);
  ------------------
  |  |  111|  82.9M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  186|  82.9M|    H->v1 ^= H->v2;
  187|  82.9M|    H->v2 = SIP_ROTL(H->v2, 32);
  ------------------
  |  |  111|  82.9M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  188|  82.9M|  }
  189|  41.4M|} /* sip_round() */
xml_parsebuffer_fuzzer.c:sip24_update:
  207|  19.9k|sip24_update(struct siphash *H, const void *src, size_t len) {
  208|  19.9k|  const unsigned char *p = (const unsigned char *)src, *pe = p + len;
  209|  19.9k|  uint64_t m;
  210|       |
  211|  41.4M|  do {
  212|   372M|    while (p < pe && H->p < sip_endof(H->buf))
  ------------------
  |  |  204|   372M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (212:12): [True: 372M, False: 19.9k]
  |  Branch (212:22): [True: 331M, False: 41.4M]
  ------------------
  213|   331M|      *H->p++ = *p++;
  214|       |
  215|  41.4M|    if (H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  41.4M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (215:9): [True: 16.1k, False: 41.4M]
  ------------------
  216|  16.1k|      break;
  217|       |
  218|  41.4M|    m = SIP_U8TO64_LE(H->buf);
  ------------------
  |  |  124|  41.4M|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|  41.4M|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|  41.4M|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|  41.4M|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  219|  41.4M|    H->v3 ^= m;
  220|  41.4M|    sip_round(H, 2);
  221|  41.4M|    H->v0 ^= m;
  222|       |
  223|  41.4M|    H->p = H->buf;
  224|  41.4M|    H->c += 8;
  225|  41.4M|  } while (p < pe);
  ------------------
  |  Branch (225:12): [True: 41.4M, False: 3.78k]
  ------------------
  226|       |
  227|      0|  return H;
  228|  19.9k|} /* sip24_update() */
xml_parsebuffer_fuzzer.c:sip24_init:
  192|  19.9k|sip24_init(struct siphash *H, const struct sipkey *key) {
  193|  19.9k|  H->v0 = SIP_ULL(0x736f6d65U, 0x70736575U) ^ key->k[0];
  ------------------
  |  |  109|  19.9k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  194|  19.9k|  H->v1 = SIP_ULL(0x646f7261U, 0x6e646f6dU) ^ key->k[1];
  ------------------
  |  |  109|  19.9k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  195|  19.9k|  H->v2 = SIP_ULL(0x6c796765U, 0x6e657261U) ^ key->k[0];
  ------------------
  |  |  109|  19.9k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  196|  19.9k|  H->v3 = SIP_ULL(0x74656462U, 0x79746573U) ^ key->k[1];
  ------------------
  |  |  109|  19.9k|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  197|       |
  198|  19.9k|  H->p = H->buf;
  199|  19.9k|  H->c = 0;
  200|       |
  201|  19.9k|  return H;
  202|  19.9k|} /* sip24_init() */
xmlparse.c:sip24_init:
  192|  6.52M|sip24_init(struct siphash *H, const struct sipkey *key) {
  193|  6.52M|  H->v0 = SIP_ULL(0x736f6d65U, 0x70736575U) ^ key->k[0];
  ------------------
  |  |  109|  6.52M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  194|  6.52M|  H->v1 = SIP_ULL(0x646f7261U, 0x6e646f6dU) ^ key->k[1];
  ------------------
  |  |  109|  6.52M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  195|  6.52M|  H->v2 = SIP_ULL(0x6c796765U, 0x6e657261U) ^ key->k[0];
  ------------------
  |  |  109|  6.52M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  196|  6.52M|  H->v3 = SIP_ULL(0x74656462U, 0x79746573U) ^ key->k[1];
  ------------------
  |  |  109|  6.52M|#define SIP_ULL(high, low) ((((uint64_t)high) << 32) | (low))
  ------------------
  197|       |
  198|  6.52M|  H->p = H->buf;
  199|  6.52M|  H->c = 0;
  200|       |
  201|  6.52M|  return H;
  202|  6.52M|} /* sip24_init() */
xmlparse.c:sip24_update:
  207|  6.52M|sip24_update(struct siphash *H, const void *src, size_t len) {
  208|  6.52M|  const unsigned char *p = (const unsigned char *)src, *pe = p + len;
  209|  6.52M|  uint64_t m;
  210|       |
  211|  7.12M|  do {
  212|  33.4M|    while (p < pe && H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  26.9M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (212:12): [True: 26.9M, False: 6.52M]
  |  Branch (212:22): [True: 26.3M, False: 606k]
  ------------------
  213|  26.3M|      *H->p++ = *p++;
  214|       |
  215|  7.12M|    if (H->p < sip_endof(H->buf))
  ------------------
  |  |  204|  7.12M|#define sip_endof(a) (&(a)[sizeof(a) / sizeof *(a)])
  ------------------
  |  Branch (215:9): [True: 6.51M, False: 610k]
  ------------------
  216|  6.51M|      break;
  217|       |
  218|   610k|    m = SIP_U8TO64_LE(H->buf);
  ------------------
  |  |  124|   610k|  (((uint64_t)((p)[0]) << 0) | ((uint64_t)((p)[1]) << 8)                       \
  |  |  125|   610k|   | ((uint64_t)((p)[2]) << 16) | ((uint64_t)((p)[3]) << 24)                   \
  |  |  126|   610k|   | ((uint64_t)((p)[4]) << 32) | ((uint64_t)((p)[5]) << 40)                   \
  |  |  127|   610k|   | ((uint64_t)((p)[6]) << 48) | ((uint64_t)((p)[7]) << 56))
  ------------------
  219|   610k|    H->v3 ^= m;
  220|   610k|    sip_round(H, 2);
  221|   610k|    H->v0 ^= m;
  222|       |
  223|   610k|    H->p = H->buf;
  224|   610k|    H->c += 8;
  225|   610k|  } while (p < pe);
  ------------------
  |  Branch (225:12): [True: 606k, False: 4.39k]
  ------------------
  226|       |
  227|      0|  return H;
  228|  6.52M|} /* sip24_update() */
xmlparse.c:sip_round:
  167|  13.6M|sip_round(struct siphash *H, const int rounds) {
  168|  13.6M|  int i;
  169|       |
  170|  54.0M|  for (i = 0; i < rounds; i++) {
  ------------------
  |  Branch (170:15): [True: 40.3M, False: 13.6M]
  ------------------
  171|  40.3M|    H->v0 += H->v1;
  172|  40.3M|    H->v1 = SIP_ROTL(H->v1, 13);
  ------------------
  |  |  111|  40.3M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  173|  40.3M|    H->v1 ^= H->v0;
  174|  40.3M|    H->v0 = SIP_ROTL(H->v0, 32);
  ------------------
  |  |  111|  40.3M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  175|       |
  176|  40.3M|    H->v2 += H->v3;
  177|  40.3M|    H->v3 = SIP_ROTL(H->v3, 16);
  ------------------
  |  |  111|  40.3M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  178|  40.3M|    H->v3 ^= H->v2;
  179|       |
  180|  40.3M|    H->v0 += H->v3;
  181|  40.3M|    H->v3 = SIP_ROTL(H->v3, 21);
  ------------------
  |  |  111|  40.3M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  182|  40.3M|    H->v3 ^= H->v0;
  183|       |
  184|  40.3M|    H->v2 += H->v1;
  185|  40.3M|    H->v1 = SIP_ROTL(H->v1, 17);
  ------------------
  |  |  111|  40.3M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  186|  40.3M|    H->v1 ^= H->v2;
  187|  40.3M|    H->v2 = SIP_ROTL(H->v2, 32);
  ------------------
  |  |  111|  40.3M|#define SIP_ROTL(x, b) (uint64_t)(((x) << (b)) | ((x) >> (64 - (b))))
  ------------------
  188|  40.3M|  }
  189|  13.6M|} /* sip_round() */
xmlparse.c:sip24_final:
  231|  6.52M|sip24_final(struct siphash *H) {
  232|  6.52M|  const char left = (char)(H->p - H->buf);
  233|  6.52M|  uint64_t b = (H->c + left) << 56;
  234|       |
  235|  6.52M|  switch (left) {
  ------------------
  |  Branch (235:11): [True: 0, False: 6.52M]
  ------------------
  236|  55.1k|  case 7:
  ------------------
  |  Branch (236:3): [True: 55.1k, False: 6.46M]
  ------------------
  237|  55.1k|    b |= (uint64_t)H->buf[6] << 48;
  238|       |    /* fall through */
  239|  2.88M|  case 6:
  ------------------
  |  Branch (239:3): [True: 2.82M, False: 3.69M]
  ------------------
  240|  2.88M|    b |= (uint64_t)H->buf[5] << 40;
  241|       |    /* fall through */
  242|  2.88M|  case 5:
  ------------------
  |  Branch (242:3): [True: 5.86k, False: 6.51M]
  ------------------
  243|  2.88M|    b |= (uint64_t)H->buf[4] << 32;
  244|       |    /* fall through */
  245|  2.89M|  case 4:
  ------------------
  |  Branch (245:3): [True: 9.28k, False: 6.51M]
  ------------------
  246|  2.89M|    b |= (uint64_t)H->buf[3] << 24;
  247|       |    /* fall through */
  248|  3.05M|  case 3:
  ------------------
  |  Branch (248:3): [True: 158k, False: 6.36M]
  ------------------
  249|  3.05M|    b |= (uint64_t)H->buf[2] << 16;
  250|       |    /* fall through */
  251|  3.12M|  case 2:
  ------------------
  |  Branch (251:3): [True: 66.5k, False: 6.45M]
  ------------------
  252|  3.12M|    b |= (uint64_t)H->buf[1] << 8;
  253|       |    /* fall through */
  254|  6.51M|  case 1:
  ------------------
  |  Branch (254:3): [True: 3.39M, False: 3.12M]
  ------------------
  255|  6.51M|    b |= (uint64_t)H->buf[0] << 0;
  256|       |    /* fall through */
  257|  6.52M|  case 0:
  ------------------
  |  Branch (257:3): [True: 4.67k, False: 6.51M]
  ------------------
  258|  6.52M|    break;
  259|  6.52M|  }
  260|       |
  261|  6.52M|  H->v3 ^= b;
  262|  6.52M|  sip_round(H, 2);
  263|  6.52M|  H->v0 ^= b;
  264|  6.52M|  H->v2 ^= 0xff;
  265|  6.52M|  sip_round(H, 4);
  266|       |
  267|  6.52M|  return H->v0 ^ H->v1 ^ H->v2 ^ H->v3;
  268|  6.52M|} /* sip24_final() */

XML_ParserCreate:
  719|  19.9k|XML_ParserCreate(const XML_Char *encodingName) {
  720|  19.9k|  return XML_ParserCreate_MM(encodingName, NULL, NULL);
  721|  19.9k|}
XML_ParserCreate_MM:
  970|  19.9k|                    const XML_Char *nameSep) {
  971|  19.9k|  return parserCreate(encodingName, memsuite, nameSep, NULL);
  972|  19.9k|}
XML_ParserFree:
 1441|  19.9k|XML_ParserFree(XML_Parser parser) {
 1442|  19.9k|  TAG *tagList;
 1443|  19.9k|  OPEN_INTERNAL_ENTITY *entityList;
 1444|  19.9k|  if (parser == NULL)
  ------------------
  |  Branch (1444:7): [True: 0, False: 19.9k]
  ------------------
 1445|      0|    return;
 1446|       |  /* free m_tagStack and m_freeTagList */
 1447|  19.9k|  tagList = parser->m_tagStack;
 1448|  3.28M|  for (;;) {
 1449|  3.28M|    TAG *p;
 1450|  3.28M|    if (tagList == NULL) {
  ------------------
  |  Branch (1450:9): [True: 20.3k, False: 3.26M]
  ------------------
 1451|  20.3k|      if (parser->m_freeTagList == NULL)
  ------------------
  |  Branch (1451:11): [True: 19.9k, False: 353]
  ------------------
 1452|  19.9k|        break;
 1453|    353|      tagList = parser->m_freeTagList;
 1454|    353|      parser->m_freeTagList = NULL;
 1455|    353|    }
 1456|  3.26M|    p = tagList;
 1457|  3.26M|    tagList = tagList->parent;
 1458|  3.26M|    FREE(parser, p->buf);
  ------------------
  |  |  716|  3.26M|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1459|  3.26M|    destroyBindings(p->bindings, parser);
 1460|  3.26M|    FREE(parser, p);
  ------------------
  |  |  716|  3.26M|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1461|  3.26M|  }
 1462|       |  /* free m_openInternalEntities and m_freeInternalEntities */
 1463|  19.9k|  entityList = parser->m_openInternalEntities;
 1464|  21.9k|  for (;;) {
 1465|  21.9k|    OPEN_INTERNAL_ENTITY *openEntity;
 1466|  21.9k|    if (entityList == NULL) {
  ------------------
  |  Branch (1466:9): [True: 20.5k, False: 1.40k]
  ------------------
 1467|  20.5k|      if (parser->m_freeInternalEntities == NULL)
  ------------------
  |  Branch (1467:11): [True: 19.9k, False: 570]
  ------------------
 1468|  19.9k|        break;
 1469|    570|      entityList = parser->m_freeInternalEntities;
 1470|    570|      parser->m_freeInternalEntities = NULL;
 1471|    570|    }
 1472|  1.97k|    openEntity = entityList;
 1473|  1.97k|    entityList = entityList->next;
 1474|  1.97k|    FREE(parser, openEntity);
  ------------------
  |  |  716|  1.97k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1475|  1.97k|  }
 1476|       |
 1477|  19.9k|  destroyBindings(parser->m_freeBindingList, parser);
 1478|  19.9k|  destroyBindings(parser->m_inheritedBindings, parser);
 1479|  19.9k|  poolDestroy(&parser->m_tempPool);
 1480|  19.9k|  poolDestroy(&parser->m_temp2Pool);
 1481|  19.9k|  FREE(parser, (void *)parser->m_protocolEncodingName);
  ------------------
  |  |  716|  19.9k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1482|  19.9k|#ifdef XML_DTD
 1483|       |  /* external parameter entity parsers share the DTD structure
 1484|       |     parser->m_dtd with the root parser, so we must not destroy it
 1485|       |  */
 1486|  19.9k|  if (! parser->m_isParamEntity && parser->m_dtd)
  ------------------
  |  Branch (1486:7): [True: 19.9k, False: 0]
  |  Branch (1486:36): [True: 19.9k, False: 0]
  ------------------
 1487|       |#else
 1488|       |  if (parser->m_dtd)
 1489|       |#endif /* XML_DTD */
 1490|  19.9k|    dtdDestroy(parser->m_dtd, (XML_Bool)! parser->m_parentParser,
 1491|  19.9k|               &parser->m_mem);
 1492|  19.9k|  FREE(parser, (void *)parser->m_atts);
  ------------------
  |  |  716|  19.9k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1493|       |#ifdef XML_ATTR_INFO
 1494|       |  FREE(parser, (void *)parser->m_attInfo);
 1495|       |#endif
 1496|  19.9k|  FREE(parser, parser->m_groupConnector);
  ------------------
  |  |  716|  19.9k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1497|  19.9k|  FREE(parser, parser->m_buffer);
  ------------------
  |  |  716|  19.9k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1498|  19.9k|  FREE(parser, parser->m_dataBuf);
  ------------------
  |  |  716|  19.9k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1499|  19.9k|  FREE(parser, parser->m_nsAtts);
  ------------------
  |  |  716|  19.9k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1500|  19.9k|  FREE(parser, parser->m_unknownEncodingMem);
  ------------------
  |  |  716|  19.9k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1501|  19.9k|  if (parser->m_unknownEncodingRelease)
  ------------------
  |  Branch (1501:7): [True: 0, False: 19.9k]
  ------------------
 1502|      0|    parser->m_unknownEncodingRelease(parser->m_unknownEncodingData);
 1503|  19.9k|  FREE(parser, parser);
  ------------------
  |  |  716|  19.9k|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1504|  19.9k|}
XML_SetElementHandler:
 1596|  19.9k|                      XML_EndElementHandler end) {
 1597|  19.9k|  if (parser == NULL)
  ------------------
  |  Branch (1597:7): [True: 0, False: 19.9k]
  ------------------
 1598|      0|    return;
 1599|  19.9k|  parser->m_startElementHandler = start;
 1600|  19.9k|  parser->m_endElementHandler = end;
 1601|  19.9k|}
XML_SetHashSalt:
 1816|  19.9k|XML_SetHashSalt(XML_Parser parser, unsigned long hash_salt) {
 1817|  19.9k|  if (parser == NULL)
  ------------------
  |  Branch (1817:7): [True: 0, False: 19.9k]
  ------------------
 1818|      0|    return 0;
 1819|  19.9k|  if (parser->m_parentParser)
  ------------------
  |  Branch (1819:7): [True: 0, False: 19.9k]
  ------------------
 1820|      0|    return XML_SetHashSalt(parser->m_parentParser, hash_salt);
 1821|       |  /* block after XML_Parse()/XML_ParseBuffer() has been called */
 1822|  19.9k|  if (parser->m_parsingStatus.parsing == XML_PARSING
  ------------------
  |  Branch (1822:7): [True: 0, False: 19.9k]
  ------------------
 1823|  19.9k|      || parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (1823:10): [True: 0, False: 19.9k]
  ------------------
 1824|      0|    return 0;
 1825|  19.9k|  parser->m_hash_secret_salt = hash_salt;
 1826|  19.9k|  return 1;
 1827|  19.9k|}
XML_ParseBuffer:
 1984|  19.9k|XML_ParseBuffer(XML_Parser parser, int len, int isFinal) {
 1985|  19.9k|  const char *start;
 1986|  19.9k|  enum XML_Status result = XML_STATUS_OK;
  ------------------
  |  |   75|  19.9k|#define XML_STATUS_OK XML_STATUS_OK
  ------------------
 1987|       |
 1988|  19.9k|  if (parser == NULL)
  ------------------
  |  Branch (1988:7): [True: 0, False: 19.9k]
  ------------------
 1989|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1990|  19.9k|  switch (parser->m_parsingStatus.parsing) {
 1991|      0|  case XML_SUSPENDED:
  ------------------
  |  Branch (1991:3): [True: 0, False: 19.9k]
  ------------------
 1992|      0|    parser->m_errorCode = XML_ERROR_SUSPENDED;
 1993|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1994|      0|  case XML_FINISHED:
  ------------------
  |  Branch (1994:3): [True: 0, False: 19.9k]
  ------------------
 1995|      0|    parser->m_errorCode = XML_ERROR_FINISHED;
 1996|      0|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 1997|  19.9k|  case XML_INITIALIZED:
  ------------------
  |  Branch (1997:3): [True: 19.9k, False: 0]
  ------------------
 1998|       |    /* Has someone called XML_GetBuffer successfully before? */
 1999|  19.9k|    if (! parser->m_bufferPtr) {
  ------------------
  |  Branch (1999:9): [True: 0, False: 19.9k]
  ------------------
 2000|      0|      parser->m_errorCode = XML_ERROR_NO_BUFFER;
 2001|      0|      return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2002|      0|    }
 2003|       |
 2004|  19.9k|    if (parser->m_parentParser == NULL && ! startParsing(parser)) {
  ------------------
  |  Branch (2004:9): [True: 19.9k, False: 0]
  |  Branch (2004:43): [True: 0, False: 19.9k]
  ------------------
 2005|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2006|      0|      return XML_STATUS_ERROR;
  ------------------
  |  |   73|      0|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2007|      0|    }
 2008|       |    /* fall through */
 2009|  19.9k|  default:
  ------------------
  |  Branch (2009:3): [True: 0, False: 19.9k]
  ------------------
 2010|  19.9k|    parser->m_parsingStatus.parsing = XML_PARSING;
 2011|  19.9k|  }
 2012|       |
 2013|  19.9k|  start = parser->m_bufferPtr;
 2014|  19.9k|  parser->m_positionPtr = start;
 2015|  19.9k|  parser->m_bufferEnd += len;
 2016|  19.9k|  parser->m_parseEndPtr = parser->m_bufferEnd;
 2017|  19.9k|  parser->m_parseEndByteIndex += len;
 2018|  19.9k|  parser->m_parsingStatus.finalBuffer = (XML_Bool)isFinal;
 2019|       |
 2020|  19.9k|  parser->m_errorCode = parser->m_processor(
 2021|  19.9k|      parser, start, parser->m_parseEndPtr, &parser->m_bufferPtr);
 2022|       |
 2023|  19.9k|  if (parser->m_errorCode != XML_ERROR_NONE) {
  ------------------
  |  Branch (2023:7): [True: 8.10k, False: 11.8k]
  ------------------
 2024|  8.10k|    parser->m_eventEndPtr = parser->m_eventPtr;
 2025|  8.10k|    parser->m_processor = errorProcessor;
 2026|  8.10k|    return XML_STATUS_ERROR;
  ------------------
  |  |   73|  8.10k|#define XML_STATUS_ERROR XML_STATUS_ERROR
  ------------------
 2027|  11.8k|  } else {
 2028|  11.8k|    switch (parser->m_parsingStatus.parsing) {
 2029|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (2029:5): [True: 0, False: 11.8k]
  ------------------
 2030|      0|      result = XML_STATUS_SUSPENDED;
  ------------------
  |  |   77|      0|#define XML_STATUS_SUSPENDED XML_STATUS_SUSPENDED
  ------------------
 2031|      0|      break;
 2032|      0|    case XML_INITIALIZED:
  ------------------
  |  Branch (2032:5): [True: 0, False: 11.8k]
  ------------------
 2033|  11.8k|    case XML_PARSING:
  ------------------
  |  Branch (2033:5): [True: 11.8k, False: 0]
  ------------------
 2034|  11.8k|      if (isFinal) {
  ------------------
  |  Branch (2034:11): [True: 0, False: 11.8k]
  ------------------
 2035|      0|        parser->m_parsingStatus.parsing = XML_FINISHED;
 2036|      0|        return result;
 2037|      0|      }
 2038|  11.8k|    default:; /* should not happen */
  ------------------
  |  Branch (2038:5): [True: 0, False: 11.8k]
  ------------------
 2039|  11.8k|    }
 2040|  11.8k|  }
 2041|       |
 2042|  11.8k|  XmlUpdatePosition(parser->m_encoding, parser->m_positionPtr,
  ------------------
  |  |  270|  11.8k|  (((enc)->updatePosition)(enc, ptr, end, pos))
  ------------------
 2043|  11.8k|                    parser->m_bufferPtr, &parser->m_position);
 2044|  11.8k|  parser->m_positionPtr = parser->m_bufferPtr;
 2045|  11.8k|  return result;
 2046|  19.9k|}
XML_GetBuffer:
 2049|  19.9k|XML_GetBuffer(XML_Parser parser, int len) {
 2050|  19.9k|  if (parser == NULL)
  ------------------
  |  Branch (2050:7): [True: 0, False: 19.9k]
  ------------------
 2051|      0|    return NULL;
 2052|  19.9k|  if (len < 0) {
  ------------------
  |  Branch (2052:7): [True: 0, False: 19.9k]
  ------------------
 2053|      0|    parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2054|      0|    return NULL;
 2055|      0|  }
 2056|  19.9k|  switch (parser->m_parsingStatus.parsing) {
 2057|      0|  case XML_SUSPENDED:
  ------------------
  |  Branch (2057:3): [True: 0, False: 19.9k]
  ------------------
 2058|      0|    parser->m_errorCode = XML_ERROR_SUSPENDED;
 2059|      0|    return NULL;
 2060|      0|  case XML_FINISHED:
  ------------------
  |  Branch (2060:3): [True: 0, False: 19.9k]
  ------------------
 2061|      0|    parser->m_errorCode = XML_ERROR_FINISHED;
 2062|      0|    return NULL;
 2063|  19.9k|  default:;
  ------------------
  |  Branch (2063:3): [True: 19.9k, False: 0]
  ------------------
 2064|  19.9k|  }
 2065|       |
 2066|  19.9k|  if (len > EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_bufferEnd)) {
  ------------------
  |  |  200|  19.9k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 19.9k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2066:7): [True: 19.9k, False: 0]
  ------------------
 2067|  19.9k|#ifdef XML_CONTEXT_BYTES
 2068|  19.9k|    int keep;
 2069|  19.9k|#endif /* defined XML_CONTEXT_BYTES */
 2070|       |    /* Do not invoke signed arithmetic overflow: */
 2071|  19.9k|    int neededSize = (int)((unsigned)len
 2072|  19.9k|                           + (unsigned)EXPAT_SAFE_PTR_DIFF(
  ------------------
  |  |  200|  19.9k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 19.9k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2073|  19.9k|                               parser->m_bufferEnd, parser->m_bufferPtr));
 2074|  19.9k|    if (neededSize < 0) {
  ------------------
  |  Branch (2074:9): [True: 0, False: 19.9k]
  ------------------
 2075|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2076|      0|      return NULL;
 2077|      0|    }
 2078|  19.9k|#ifdef XML_CONTEXT_BYTES
 2079|  19.9k|    keep = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer);
  ------------------
  |  |  200|  19.9k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 19.9k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2080|  19.9k|    if (keep > XML_CONTEXT_BYTES)
  ------------------
  |  |   98|  19.9k|#define XML_CONTEXT_BYTES 1024
  ------------------
  |  Branch (2080:9): [True: 0, False: 19.9k]
  ------------------
 2081|      0|      keep = XML_CONTEXT_BYTES;
  ------------------
  |  |   98|      0|#define XML_CONTEXT_BYTES 1024
  ------------------
 2082|       |    /* Detect and prevent integer overflow */
 2083|  19.9k|    if (keep > INT_MAX - neededSize) {
  ------------------
  |  Branch (2083:9): [True: 0, False: 19.9k]
  ------------------
 2084|      0|      parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2085|      0|      return NULL;
 2086|      0|    }
 2087|  19.9k|    neededSize += keep;
 2088|  19.9k|#endif /* defined XML_CONTEXT_BYTES */
 2089|  19.9k|    if (neededSize
  ------------------
  |  Branch (2089:9): [True: 0, False: 19.9k]
  ------------------
 2090|  19.9k|        <= EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_buffer)) {
  ------------------
  |  |  200|  19.9k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 19.9k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2091|      0|#ifdef XML_CONTEXT_BYTES
 2092|      0|      if (keep < EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer)) {
  ------------------
  |  |  200|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 0]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (2092:11): [True: 0, False: 0]
  ------------------
 2093|      0|        int offset
 2094|      0|            = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferPtr, parser->m_buffer)
  ------------------
  |  |  200|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 0]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2095|      0|              - keep;
 2096|       |        /* The buffer pointers cannot be NULL here; we have at least some bytes
 2097|       |         * in the buffer */
 2098|      0|        memmove(parser->m_buffer, &parser->m_buffer[offset],
 2099|      0|                parser->m_bufferEnd - parser->m_bufferPtr + keep);
 2100|      0|        parser->m_bufferEnd -= offset;
 2101|      0|        parser->m_bufferPtr -= offset;
 2102|      0|      }
 2103|       |#else
 2104|       |      if (parser->m_buffer && parser->m_bufferPtr) {
 2105|       |        memmove(parser->m_buffer, parser->m_bufferPtr,
 2106|       |                EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr));
 2107|       |        parser->m_bufferEnd
 2108|       |            = parser->m_buffer
 2109|       |              + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr);
 2110|       |        parser->m_bufferPtr = parser->m_buffer;
 2111|       |      }
 2112|       |#endif /* not defined XML_CONTEXT_BYTES */
 2113|  19.9k|    } else {
 2114|  19.9k|      char *newBuf;
 2115|  19.9k|      int bufferSize
 2116|  19.9k|          = (int)EXPAT_SAFE_PTR_DIFF(parser->m_bufferLim, parser->m_bufferPtr);
  ------------------
  |  |  200|  19.9k|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 19.9k]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2117|  19.9k|      if (bufferSize == 0)
  ------------------
  |  Branch (2117:11): [True: 19.9k, False: 0]
  ------------------
 2118|  19.9k|        bufferSize = INIT_BUFFER_SIZE;
  ------------------
  |  |  247|  19.9k|#define INIT_BUFFER_SIZE 1024
  ------------------
 2119|  31.0k|      do {
 2120|       |        /* Do not invoke signed arithmetic overflow: */
 2121|  31.0k|        bufferSize = (int)(2U * (unsigned)bufferSize);
 2122|  31.0k|      } while (bufferSize < neededSize && bufferSize > 0);
  ------------------
  |  Branch (2122:16): [True: 11.0k, False: 19.9k]
  |  Branch (2122:43): [True: 11.0k, False: 0]
  ------------------
 2123|  19.9k|      if (bufferSize <= 0) {
  ------------------
  |  Branch (2123:11): [True: 0, False: 19.9k]
  ------------------
 2124|      0|        parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2125|      0|        return NULL;
 2126|      0|      }
 2127|  19.9k|      newBuf = (char *)MALLOC(parser, bufferSize);
  ------------------
  |  |  714|  19.9k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2128|  19.9k|      if (newBuf == 0) {
  ------------------
  |  Branch (2128:11): [True: 0, False: 19.9k]
  ------------------
 2129|      0|        parser->m_errorCode = XML_ERROR_NO_MEMORY;
 2130|      0|        return NULL;
 2131|      0|      }
 2132|  19.9k|      parser->m_bufferLim = newBuf + bufferSize;
 2133|  19.9k|#ifdef XML_CONTEXT_BYTES
 2134|  19.9k|      if (parser->m_bufferPtr) {
  ------------------
  |  Branch (2134:11): [True: 0, False: 19.9k]
  ------------------
 2135|      0|        memcpy(newBuf, &parser->m_bufferPtr[-keep],
 2136|      0|               EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr)
  ------------------
  |  |  200|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 0]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2137|      0|                   + keep);
 2138|      0|        FREE(parser, parser->m_buffer);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 2139|      0|        parser->m_buffer = newBuf;
 2140|      0|        parser->m_bufferEnd
 2141|      0|            = parser->m_buffer
 2142|      0|              + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr)
  ------------------
  |  |  200|      0|#define EXPAT_SAFE_PTR_DIFF(p, q) (((p) && (q)) ? ((p) - (q)) : 0)
  |  |  ------------------
  |  |  |  Branch (200:37): [True: 0, False: 0]
  |  |  |  Branch (200:44): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 2143|      0|              + keep;
 2144|      0|        parser->m_bufferPtr = parser->m_buffer + keep;
 2145|  19.9k|      } else {
 2146|       |        /* This must be a brand new buffer with no data in it yet */
 2147|  19.9k|        parser->m_bufferEnd = newBuf;
 2148|  19.9k|        parser->m_bufferPtr = parser->m_buffer = newBuf;
 2149|  19.9k|      }
 2150|       |#else
 2151|       |      if (parser->m_bufferPtr) {
 2152|       |        memcpy(newBuf, parser->m_bufferPtr,
 2153|       |               EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr));
 2154|       |        FREE(parser, parser->m_buffer);
 2155|       |        parser->m_bufferEnd
 2156|       |            = newBuf
 2157|       |              + EXPAT_SAFE_PTR_DIFF(parser->m_bufferEnd, parser->m_bufferPtr);
 2158|       |      } else {
 2159|       |        /* This must be a brand new buffer with no data in it yet */
 2160|       |        parser->m_bufferEnd = newBuf;
 2161|       |      }
 2162|       |      parser->m_bufferPtr = parser->m_buffer = newBuf;
 2163|       |#endif /* not defined XML_CONTEXT_BYTES */
 2164|  19.9k|    }
 2165|  19.9k|    parser->m_eventPtr = parser->m_eventEndPtr = NULL;
 2166|  19.9k|    parser->m_positionPtr = NULL;
 2167|  19.9k|  }
 2168|  19.9k|  return parser->m_bufferEnd;
 2169|  19.9k|}
xmlparse.c:parserCreate:
  977|  19.9k|             DTD *dtd) {
  978|  19.9k|  XML_Parser parser;
  979|       |
  980|  19.9k|  if (memsuite) {
  ------------------
  |  Branch (980:7): [True: 0, False: 19.9k]
  ------------------
  981|      0|    XML_Memory_Handling_Suite *mtemp;
  982|      0|    parser = memsuite->malloc_fcn(sizeof(struct XML_ParserStruct));
  983|      0|    if (parser != NULL) {
  ------------------
  |  Branch (983:9): [True: 0, False: 0]
  ------------------
  984|      0|      mtemp = (XML_Memory_Handling_Suite *)&(parser->m_mem);
  985|      0|      mtemp->malloc_fcn = memsuite->malloc_fcn;
  986|      0|      mtemp->realloc_fcn = memsuite->realloc_fcn;
  987|      0|      mtemp->free_fcn = memsuite->free_fcn;
  988|      0|    }
  989|  19.9k|  } else {
  990|  19.9k|    XML_Memory_Handling_Suite *mtemp;
  991|  19.9k|    parser = (XML_Parser)malloc(sizeof(struct XML_ParserStruct));
  992|  19.9k|    if (parser != NULL) {
  ------------------
  |  Branch (992:9): [True: 19.9k, False: 0]
  ------------------
  993|  19.9k|      mtemp = (XML_Memory_Handling_Suite *)&(parser->m_mem);
  994|  19.9k|      mtemp->malloc_fcn = malloc;
  995|  19.9k|      mtemp->realloc_fcn = realloc;
  996|  19.9k|      mtemp->free_fcn = free;
  997|  19.9k|    }
  998|  19.9k|  }
  999|       |
 1000|  19.9k|  if (! parser)
  ------------------
  |  Branch (1000:7): [True: 0, False: 19.9k]
  ------------------
 1001|      0|    return parser;
 1002|       |
 1003|  19.9k|  parser->m_buffer = NULL;
 1004|  19.9k|  parser->m_bufferLim = NULL;
 1005|       |
 1006|  19.9k|  parser->m_attsSize = INIT_ATTS_SIZE;
  ------------------
  |  |  244|  19.9k|#define INIT_ATTS_SIZE 16
  ------------------
 1007|  19.9k|  parser->m_atts
 1008|  19.9k|      = (ATTRIBUTE *)MALLOC(parser, parser->m_attsSize * sizeof(ATTRIBUTE));
  ------------------
  |  |  714|  19.9k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 1009|  19.9k|  if (parser->m_atts == NULL) {
  ------------------
  |  Branch (1009:7): [True: 0, False: 19.9k]
  ------------------
 1010|      0|    FREE(parser, parser);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1011|      0|    return NULL;
 1012|      0|  }
 1013|       |#ifdef XML_ATTR_INFO
 1014|       |  parser->m_attInfo = (XML_AttrInfo *)MALLOC(
 1015|       |      parser, parser->m_attsSize * sizeof(XML_AttrInfo));
 1016|       |  if (parser->m_attInfo == NULL) {
 1017|       |    FREE(parser, parser->m_atts);
 1018|       |    FREE(parser, parser);
 1019|       |    return NULL;
 1020|       |  }
 1021|       |#endif
 1022|  19.9k|  parser->m_dataBuf
 1023|  19.9k|      = (XML_Char *)MALLOC(parser, INIT_DATA_BUF_SIZE * sizeof(XML_Char));
  ------------------
  |  |  714|  19.9k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 1024|  19.9k|  if (parser->m_dataBuf == NULL) {
  ------------------
  |  Branch (1024:7): [True: 0, False: 19.9k]
  ------------------
 1025|      0|    FREE(parser, parser->m_atts);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1026|       |#ifdef XML_ATTR_INFO
 1027|       |    FREE(parser, parser->m_attInfo);
 1028|       |#endif
 1029|      0|    FREE(parser, parser);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1030|      0|    return NULL;
 1031|      0|  }
 1032|  19.9k|  parser->m_dataBufEnd = parser->m_dataBuf + INIT_DATA_BUF_SIZE;
  ------------------
  |  |  243|  19.9k|#define INIT_DATA_BUF_SIZE 1024
  ------------------
 1033|       |
 1034|  19.9k|  if (dtd)
  ------------------
  |  Branch (1034:7): [True: 0, False: 19.9k]
  ------------------
 1035|      0|    parser->m_dtd = dtd;
 1036|  19.9k|  else {
 1037|  19.9k|    parser->m_dtd = dtdCreate(&parser->m_mem);
 1038|  19.9k|    if (parser->m_dtd == NULL) {
  ------------------
  |  Branch (1038:9): [True: 0, False: 19.9k]
  ------------------
 1039|      0|      FREE(parser, parser->m_dataBuf);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1040|      0|      FREE(parser, parser->m_atts);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1041|       |#ifdef XML_ATTR_INFO
 1042|       |      FREE(parser, parser->m_attInfo);
 1043|       |#endif
 1044|      0|      FREE(parser, parser);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1045|      0|      return NULL;
 1046|      0|    }
 1047|  19.9k|  }
 1048|       |
 1049|  19.9k|  parser->m_freeBindingList = NULL;
 1050|  19.9k|  parser->m_freeTagList = NULL;
 1051|  19.9k|  parser->m_freeInternalEntities = NULL;
 1052|       |
 1053|  19.9k|  parser->m_groupSize = 0;
 1054|  19.9k|  parser->m_groupConnector = NULL;
 1055|       |
 1056|  19.9k|  parser->m_unknownEncodingHandler = NULL;
 1057|  19.9k|  parser->m_unknownEncodingHandlerData = NULL;
 1058|       |
 1059|  19.9k|  parser->m_namespaceSeparator = ASCII_EXCL;
  ------------------
  |  |  103|  19.9k|#define ASCII_EXCL 0x21
  ------------------
 1060|  19.9k|  parser->m_ns = XML_FALSE;
  ------------------
  |  |   56|  19.9k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1061|  19.9k|  parser->m_ns_triplets = XML_FALSE;
  ------------------
  |  |   56|  19.9k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1062|       |
 1063|  19.9k|  parser->m_nsAtts = NULL;
 1064|  19.9k|  parser->m_nsAttsVersion = 0;
 1065|  19.9k|  parser->m_nsAttsPower = 0;
 1066|       |
 1067|  19.9k|  parser->m_protocolEncodingName = NULL;
 1068|       |
 1069|  19.9k|  poolInit(&parser->m_tempPool, &(parser->m_mem));
 1070|  19.9k|  poolInit(&parser->m_temp2Pool, &(parser->m_mem));
 1071|  19.9k|  parserInit(parser, encodingName);
 1072|       |
 1073|  19.9k|  if (encodingName && ! parser->m_protocolEncodingName) {
  ------------------
  |  Branch (1073:7): [True: 19.9k, False: 0]
  |  Branch (1073:23): [True: 0, False: 19.9k]
  ------------------
 1074|      0|    if (dtd) {
  ------------------
  |  Branch (1074:9): [True: 0, False: 0]
  ------------------
 1075|       |      // We need to stop the upcoming call to XML_ParserFree from happily
 1076|       |      // destroying parser->m_dtd because the DTD is shared with the parent
 1077|       |      // parser and the only guard that keeps XML_ParserFree from destroying
 1078|       |      // parser->m_dtd is parser->m_isParamEntity but it will be set to
 1079|       |      // XML_TRUE only later in XML_ExternalEntityParserCreate (or not at all).
 1080|      0|      parser->m_dtd = NULL;
 1081|      0|    }
 1082|      0|    XML_ParserFree(parser);
 1083|      0|    return NULL;
 1084|      0|  }
 1085|       |
 1086|  19.9k|  if (nameSep) {
  ------------------
  |  Branch (1086:7): [True: 0, False: 19.9k]
  ------------------
 1087|      0|    parser->m_ns = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 1088|      0|    parser->m_internalEncoding = XmlGetInternalEncodingNS();
  ------------------
  |  |  163|      0|#  define XmlGetInternalEncodingNS XmlGetUtf8InternalEncodingNS
  ------------------
 1089|      0|    parser->m_namespaceSeparator = *nameSep;
 1090|  19.9k|  } else {
 1091|  19.9k|    parser->m_internalEncoding = XmlGetInternalEncoding();
  ------------------
  |  |  162|  19.9k|#  define XmlGetInternalEncoding XmlGetUtf8InternalEncoding
  ------------------
 1092|  19.9k|  }
 1093|       |
 1094|  19.9k|  return parser;
 1095|  19.9k|}
xmlparse.c:dtdCreate:
 6716|  19.9k|dtdCreate(const XML_Memory_Handling_Suite *ms) {
 6717|  19.9k|  DTD *p = ms->malloc_fcn(sizeof(DTD));
 6718|  19.9k|  if (p == NULL)
  ------------------
  |  Branch (6718:7): [True: 0, False: 19.9k]
  ------------------
 6719|      0|    return p;
 6720|  19.9k|  poolInit(&(p->pool), ms);
 6721|  19.9k|  poolInit(&(p->entityValuePool), ms);
 6722|  19.9k|  hashTableInit(&(p->generalEntities), ms);
 6723|  19.9k|  hashTableInit(&(p->elementTypes), ms);
 6724|  19.9k|  hashTableInit(&(p->attributeIds), ms);
 6725|  19.9k|  hashTableInit(&(p->prefixes), ms);
 6726|  19.9k|#ifdef XML_DTD
 6727|  19.9k|  p->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|  19.9k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6728|  19.9k|  hashTableInit(&(p->paramEntities), ms);
 6729|  19.9k|#endif /* XML_DTD */
 6730|  19.9k|  p->defaultPrefix.name = NULL;
 6731|  19.9k|  p->defaultPrefix.binding = NULL;
 6732|       |
 6733|  19.9k|  p->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|  19.9k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6734|  19.9k|  p->scaffIndex = NULL;
 6735|  19.9k|  p->scaffold = NULL;
 6736|  19.9k|  p->scaffLevel = 0;
 6737|  19.9k|  p->scaffSize = 0;
 6738|  19.9k|  p->scaffCount = 0;
 6739|  19.9k|  p->contentStringLen = 0;
 6740|       |
 6741|  19.9k|  p->keepProcessing = XML_TRUE;
  ------------------
  |  |   55|  19.9k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6742|  19.9k|  p->hasParamEntityRefs = XML_FALSE;
  ------------------
  |  |   56|  19.9k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6743|  19.9k|  p->standalone = XML_FALSE;
  ------------------
  |  |   56|  19.9k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6744|  19.9k|  return p;
 6745|  19.9k|}
xmlparse.c:hashTableInit:
 7150|  99.8k|hashTableInit(HASH_TABLE *p, const XML_Memory_Handling_Suite *ms) {
 7151|  99.8k|  p->power = 0;
 7152|  99.8k|  p->size = 0;
 7153|  99.8k|  p->used = 0;
 7154|  99.8k|  p->v = NULL;
 7155|  99.8k|  p->mem = ms;
 7156|  99.8k|}
xmlparse.c:poolInit:
 7175|  79.8k|poolInit(STRING_POOL *pool, const XML_Memory_Handling_Suite *ms) {
 7176|  79.8k|  pool->blocks = NULL;
 7177|  79.8k|  pool->freeBlocks = NULL;
 7178|  79.8k|  pool->start = NULL;
 7179|  79.8k|  pool->ptr = NULL;
 7180|  79.8k|  pool->end = NULL;
 7181|  79.8k|  pool->mem = ms;
 7182|  79.8k|}
xmlparse.c:parserInit:
 1098|  19.9k|parserInit(XML_Parser parser, const XML_Char *encodingName) {
 1099|  19.9k|  parser->m_processor = prologInitProcessor;
 1100|  19.9k|  XmlPrologStateInit(&parser->m_prologState);
 1101|  19.9k|  if (encodingName != NULL) {
  ------------------
  |  Branch (1101:7): [True: 19.9k, False: 0]
  ------------------
 1102|  19.9k|    parser->m_protocolEncodingName = copyString(encodingName, &(parser->m_mem));
 1103|  19.9k|  }
 1104|  19.9k|  parser->m_curBase = NULL;
 1105|  19.9k|  XmlInitEncoding(&parser->m_initEncoding, &parser->m_encoding, 0);
 1106|  19.9k|  parser->m_userData = NULL;
 1107|  19.9k|  parser->m_handlerArg = NULL;
 1108|  19.9k|  parser->m_startElementHandler = NULL;
 1109|  19.9k|  parser->m_endElementHandler = NULL;
 1110|  19.9k|  parser->m_characterDataHandler = NULL;
 1111|  19.9k|  parser->m_processingInstructionHandler = NULL;
 1112|  19.9k|  parser->m_commentHandler = NULL;
 1113|  19.9k|  parser->m_startCdataSectionHandler = NULL;
 1114|  19.9k|  parser->m_endCdataSectionHandler = NULL;
 1115|  19.9k|  parser->m_defaultHandler = NULL;
 1116|  19.9k|  parser->m_startDoctypeDeclHandler = NULL;
 1117|  19.9k|  parser->m_endDoctypeDeclHandler = NULL;
 1118|  19.9k|  parser->m_unparsedEntityDeclHandler = NULL;
 1119|  19.9k|  parser->m_notationDeclHandler = NULL;
 1120|  19.9k|  parser->m_startNamespaceDeclHandler = NULL;
 1121|  19.9k|  parser->m_endNamespaceDeclHandler = NULL;
 1122|  19.9k|  parser->m_notStandaloneHandler = NULL;
 1123|  19.9k|  parser->m_externalEntityRefHandler = NULL;
 1124|  19.9k|  parser->m_externalEntityRefHandlerArg = parser;
 1125|  19.9k|  parser->m_skippedEntityHandler = NULL;
 1126|  19.9k|  parser->m_elementDeclHandler = NULL;
 1127|  19.9k|  parser->m_attlistDeclHandler = NULL;
 1128|  19.9k|  parser->m_entityDeclHandler = NULL;
 1129|  19.9k|  parser->m_xmlDeclHandler = NULL;
 1130|  19.9k|  parser->m_bufferPtr = parser->m_buffer;
 1131|  19.9k|  parser->m_bufferEnd = parser->m_buffer;
 1132|  19.9k|  parser->m_parseEndByteIndex = 0;
 1133|  19.9k|  parser->m_parseEndPtr = NULL;
 1134|  19.9k|  parser->m_declElementType = NULL;
 1135|  19.9k|  parser->m_declAttributeId = NULL;
 1136|  19.9k|  parser->m_declEntity = NULL;
 1137|  19.9k|  parser->m_doctypeName = NULL;
 1138|  19.9k|  parser->m_doctypeSysid = NULL;
 1139|  19.9k|  parser->m_doctypePubid = NULL;
 1140|  19.9k|  parser->m_declAttributeType = NULL;
 1141|  19.9k|  parser->m_declNotationName = NULL;
 1142|  19.9k|  parser->m_declNotationPublicId = NULL;
 1143|  19.9k|  parser->m_declAttributeIsCdata = XML_FALSE;
  ------------------
  |  |   56|  19.9k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1144|  19.9k|  parser->m_declAttributeIsId = XML_FALSE;
  ------------------
  |  |   56|  19.9k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1145|  19.9k|  memset(&parser->m_position, 0, sizeof(POSITION));
 1146|  19.9k|  parser->m_errorCode = XML_ERROR_NONE;
 1147|  19.9k|  parser->m_eventPtr = NULL;
 1148|  19.9k|  parser->m_eventEndPtr = NULL;
 1149|  19.9k|  parser->m_positionPtr = NULL;
 1150|  19.9k|  parser->m_openInternalEntities = NULL;
 1151|  19.9k|  parser->m_defaultExpandInternalEntities = XML_TRUE;
  ------------------
  |  |   55|  19.9k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 1152|  19.9k|  parser->m_tagLevel = 0;
 1153|  19.9k|  parser->m_tagStack = NULL;
 1154|  19.9k|  parser->m_inheritedBindings = NULL;
 1155|  19.9k|  parser->m_nSpecifiedAtts = 0;
 1156|  19.9k|  parser->m_unknownEncodingMem = NULL;
 1157|  19.9k|  parser->m_unknownEncodingRelease = NULL;
 1158|  19.9k|  parser->m_unknownEncodingData = NULL;
 1159|  19.9k|  parser->m_parentParser = NULL;
 1160|  19.9k|  parser->m_parsingStatus.parsing = XML_INITIALIZED;
 1161|  19.9k|#ifdef XML_DTD
 1162|  19.9k|  parser->m_isParamEntity = XML_FALSE;
  ------------------
  |  |   56|  19.9k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1163|  19.9k|  parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|  19.9k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 1164|  19.9k|  parser->m_paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER;
 1165|  19.9k|#endif
 1166|  19.9k|  parser->m_hash_secret_salt = 0;
 1167|       |
 1168|  19.9k|#ifdef XML_DTD
 1169|  19.9k|  memset(&parser->m_accounting, 0, sizeof(ACCOUNTING));
 1170|  19.9k|  parser->m_accounting.debugLevel = getDebugLevel("EXPAT_ACCOUNTING_DEBUG", 0u);
 1171|  19.9k|  parser->m_accounting.maximumAmplificationFactor
 1172|  19.9k|      = EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_MAXIMUM_AMPLIFICATION_DEFAULT;
  ------------------
  |  |  143|  19.9k|  100.0f
  ------------------
 1173|  19.9k|  parser->m_accounting.activationThresholdBytes
 1174|  19.9k|      = EXPAT_BILLION_LAUGHS_ATTACK_PROTECTION_ACTIVATION_THRESHOLD_DEFAULT;
  ------------------
  |  |  145|  19.9k|  8388608 // 8 MiB, 2^23
  ------------------
 1175|       |
 1176|  19.9k|  memset(&parser->m_entity_stats, 0, sizeof(ENTITY_STATS));
 1177|  19.9k|  parser->m_entity_stats.debugLevel = getDebugLevel("EXPAT_ENTITY_DEBUG", 0u);
 1178|  19.9k|#endif
 1179|  19.9k|}
xmlparse.c:prologInitProcessor:
 4406|  19.9k|                    const char **nextPtr) {
 4407|  19.9k|  enum XML_Error result = initializeEncoding(parser);
 4408|  19.9k|  if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4408:7): [True: 0, False: 19.9k]
  ------------------
 4409|      0|    return result;
 4410|  19.9k|  parser->m_processor = prologProcessor;
 4411|  19.9k|  return prologProcessor(parser, s, end, nextPtr);
 4412|  19.9k|}
xmlparse.c:initializeEncoding:
 4249|  19.9k|initializeEncoding(XML_Parser parser) {
 4250|  19.9k|  const char *s;
 4251|       |#ifdef XML_UNICODE
 4252|       |  char encodingBuf[128];
 4253|       |  /* See comments about `protocolEncodingName` in parserInit() */
 4254|       |  if (! parser->m_protocolEncodingName)
 4255|       |    s = NULL;
 4256|       |  else {
 4257|       |    int i;
 4258|       |    for (i = 0; parser->m_protocolEncodingName[i]; i++) {
 4259|       |      if (i == sizeof(encodingBuf) - 1
 4260|       |          || (parser->m_protocolEncodingName[i] & ~0x7f) != 0) {
 4261|       |        encodingBuf[0] = '\0';
 4262|       |        break;
 4263|       |      }
 4264|       |      encodingBuf[i] = (char)parser->m_protocolEncodingName[i];
 4265|       |    }
 4266|       |    encodingBuf[i] = '\0';
 4267|       |    s = encodingBuf;
 4268|       |  }
 4269|       |#else
 4270|  19.9k|  s = parser->m_protocolEncodingName;
 4271|  19.9k|#endif
 4272|  19.9k|  if ((parser->m_ns ? XmlInitEncodingNS : XmlInitEncoding)(
  ------------------
  |  Branch (4272:7): [True: 19.9k, False: 0]
  |  Branch (4272:8): [True: 0, False: 19.9k]
  ------------------
 4273|  19.9k|          &parser->m_initEncoding, &parser->m_encoding, s))
 4274|  19.9k|    return XML_ERROR_NONE;
 4275|      0|  return handleUnknownEncoding(parser, parser->m_protocolEncodingName);
 4276|  19.9k|}
xmlparse.c:prologProcessor:
 4606|  19.9k|                const char **nextPtr) {
 4607|  19.9k|  const char *next = s;
 4608|  19.9k|  int tok = XmlPrologTok(parser->m_encoding, s, end, &next);
  ------------------
  |  |  227|  19.9k|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  19.9k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 4609|  19.9k|  return doProlog(parser, parser->m_encoding, s, end, tok, next, nextPtr,
 4610|  19.9k|                  (XML_Bool)! parser->m_parsingStatus.finalBuffer, XML_TRUE,
  ------------------
  |  |   55|  19.9k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4611|  19.9k|                  XML_ACCOUNT_DIRECT);
 4612|  19.9k|}
xmlparse.c:doProlog:
 4617|  19.9k|         XML_Bool allowClosingDoctype, enum XML_Account account) {
 4618|  19.9k|#ifdef XML_DTD
 4619|  19.9k|  static const XML_Char externalSubsetName[] = {ASCII_HASH, '\0'};
  ------------------
  |  |  121|  19.9k|#define ASCII_HASH 0x23
  ------------------
 4620|  19.9k|#endif /* XML_DTD */
 4621|  19.9k|  static const XML_Char atypeCDATA[]
 4622|  19.9k|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   38|  19.9k|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   39|  19.9k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   36|  19.9k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   55|  19.9k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, '\0'};
  ------------------
  |  |   36|  19.9k|#define ASCII_A 0x41
  ------------------
 4623|  19.9k|  static const XML_Char atypeID[] = {ASCII_I, ASCII_D, '\0'};
  ------------------
  |  |   44|  19.9k|#define ASCII_I 0x49
  ------------------
                static const XML_Char atypeID[] = {ASCII_I, ASCII_D, '\0'};
  ------------------
  |  |   39|  19.9k|#define ASCII_D 0x44
  ------------------
 4624|  19.9k|  static const XML_Char atypeIDREF[]
 4625|  19.9k|      = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   44|  19.9k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   39|  19.9k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   53|  19.9k|#define ASCII_R 0x52
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   40|  19.9k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, '\0'};
  ------------------
  |  |   41|  19.9k|#define ASCII_F 0x46
  ------------------
 4626|  19.9k|  static const XML_Char atypeIDREFS[]
 4627|  19.9k|      = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   44|  19.9k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   39|  19.9k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   53|  19.9k|#define ASCII_R 0x52
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   40|  19.9k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   41|  19.9k|#define ASCII_F 0x46
  ------------------
                    = {ASCII_I, ASCII_D, ASCII_R, ASCII_E, ASCII_F, ASCII_S, '\0'};
  ------------------
  |  |   54|  19.9k|#define ASCII_S 0x53
  ------------------
 4628|  19.9k|  static const XML_Char atypeENTITY[]
 4629|  19.9k|      = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   40|  19.9k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   49|  19.9k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   55|  19.9k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   44|  19.9k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   55|  19.9k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T, ASCII_Y, '\0'};
  ------------------
  |  |   60|  19.9k|#define ASCII_Y 0x59
  ------------------
 4630|  19.9k|  static const XML_Char atypeENTITIES[]
 4631|  19.9k|      = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   40|  19.9k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   49|  19.9k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   55|  19.9k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   44|  19.9k|#define ASCII_I 0x49
  ------------------
                    = {ASCII_E, ASCII_N, ASCII_T, ASCII_I, ASCII_T,
  ------------------
  |  |   55|  19.9k|#define ASCII_T 0x54
  ------------------
 4632|  19.9k|         ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   44|  19.9k|#define ASCII_I 0x49
  ------------------
                       ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   40|  19.9k|#define ASCII_E 0x45
  ------------------
                       ASCII_I, ASCII_E, ASCII_S, '\0'};
  ------------------
  |  |   54|  19.9k|#define ASCII_S 0x53
  ------------------
 4633|  19.9k|  static const XML_Char atypeNMTOKEN[]
 4634|  19.9k|      = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   49|  19.9k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   48|  19.9k|#define ASCII_M 0x4D
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   55|  19.9k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   50|  19.9k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   46|  19.9k|#define ASCII_K 0x4B
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   40|  19.9k|#define ASCII_E 0x45
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K, ASCII_E, ASCII_N, '\0'};
  ------------------
  |  |   49|  19.9k|#define ASCII_N 0x4E
  ------------------
 4635|  19.9k|  static const XML_Char atypeNMTOKENS[]
 4636|  19.9k|      = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   49|  19.9k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   48|  19.9k|#define ASCII_M 0x4D
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   55|  19.9k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   50|  19.9k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_M, ASCII_T, ASCII_O, ASCII_K,
  ------------------
  |  |   46|  19.9k|#define ASCII_K 0x4B
  ------------------
 4637|  19.9k|         ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   40|  19.9k|#define ASCII_E 0x45
  ------------------
                       ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   49|  19.9k|#define ASCII_N 0x4E
  ------------------
                       ASCII_E, ASCII_N, ASCII_S, '\0'};
  ------------------
  |  |   54|  19.9k|#define ASCII_S 0x53
  ------------------
 4638|  19.9k|  static const XML_Char notationPrefix[]
 4639|  19.9k|      = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   49|  19.9k|#define ASCII_N 0x4E
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   50|  19.9k|#define ASCII_O 0x4F
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   55|  19.9k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   36|  19.9k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_N, ASCII_O, ASCII_T, ASCII_A,      ASCII_T,
  ------------------
  |  |   55|  19.9k|#define ASCII_T 0x54
  ------------------
 4640|  19.9k|         ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   44|  19.9k|#define ASCII_I 0x49
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   50|  19.9k|#define ASCII_O 0x4F
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |   49|  19.9k|#define ASCII_N 0x4E
  ------------------
                       ASCII_I, ASCII_O, ASCII_N, ASCII_LPAREN, '\0'};
  ------------------
  |  |  117|  19.9k|#define ASCII_LPAREN 0x28
  ------------------
 4641|  19.9k|  static const XML_Char enumValueSep[] = {ASCII_PIPE, '\0'};
  ------------------
  |  |  122|  19.9k|#define ASCII_PIPE 0x7C
  ------------------
 4642|  19.9k|  static const XML_Char enumValueStart[] = {ASCII_LPAREN, '\0'};
  ------------------
  |  |  117|  19.9k|#define ASCII_LPAREN 0x28
  ------------------
 4643|       |
 4644|       |#ifndef XML_DTD
 4645|       |  UNUSED_P(account);
 4646|       |#endif
 4647|       |
 4648|       |  /* save one level of indirection */
 4649|  19.9k|  DTD *const dtd = parser->m_dtd;
 4650|       |
 4651|  19.9k|  const char **eventPP;
 4652|  19.9k|  const char **eventEndPP;
 4653|  19.9k|  enum XML_Content_Quant quant;
 4654|       |
 4655|  19.9k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (4655:7): [True: 19.9k, False: 0]
  ------------------
 4656|  19.9k|    eventPP = &parser->m_eventPtr;
 4657|  19.9k|    eventEndPP = &parser->m_eventEndPtr;
 4658|  19.9k|  } else {
 4659|      0|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 4660|      0|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 4661|      0|  }
 4662|       |
 4663|  5.22M|  for (;;) {
 4664|  5.22M|    int role;
 4665|  5.22M|    XML_Bool handleDefault = XML_TRUE;
  ------------------
  |  |   55|  5.22M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4666|  5.22M|    *eventPP = s;
 4667|  5.22M|    *eventEndPP = next;
 4668|  5.22M|    if (tok <= 0) {
  ------------------
  |  Branch (4668:9): [True: 6.57k, False: 5.21M]
  ------------------
 4669|  6.57k|      if (haveMore && tok != XML_TOK_INVALID) {
  ------------------
  |  |   57|  6.57k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4669:11): [True: 6.57k, False: 0]
  |  Branch (4669:23): [True: 4.63k, False: 1.94k]
  ------------------
 4670|  4.63k|        *nextPtr = s;
 4671|  4.63k|        return XML_ERROR_NONE;
 4672|  4.63k|      }
 4673|  1.94k|      switch (tok) {
 4674|  1.94k|      case XML_TOK_INVALID:
  ------------------
  |  |   57|  1.94k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4674:7): [True: 1.94k, False: 0]
  ------------------
 4675|  1.94k|        *eventPP = next;
 4676|  1.94k|        return XML_ERROR_INVALID_TOKEN;
 4677|      0|      case XML_TOK_PARTIAL:
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (4677:7): [True: 0, False: 1.94k]
  ------------------
 4678|      0|        return XML_ERROR_UNCLOSED_TOKEN;
 4679|      0|      case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (4679:7): [True: 0, False: 1.94k]
  ------------------
 4680|      0|        return XML_ERROR_PARTIAL_CHAR;
 4681|      0|      case -XML_TOK_PROLOG_S:
  ------------------
  |  |   82|      0|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (4681:7): [True: 0, False: 1.94k]
  ------------------
 4682|      0|        tok = -tok;
 4683|      0|        break;
 4684|      0|      case XML_TOK_NONE:
  ------------------
  |  |   51|      0|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (4684:7): [True: 0, False: 1.94k]
  ------------------
 4685|      0|#ifdef XML_DTD
 4686|       |        /* for internal PE NOT referenced between declarations */
 4687|      0|        if (enc != parser->m_encoding
  ------------------
  |  Branch (4687:13): [True: 0, False: 0]
  ------------------
 4688|      0|            && ! parser->m_openInternalEntities->betweenDecl) {
  ------------------
  |  Branch (4688:16): [True: 0, False: 0]
  ------------------
 4689|      0|          *nextPtr = s;
 4690|      0|          return XML_ERROR_NONE;
 4691|      0|        }
 4692|       |        /* WFC: PE Between Declarations - must check that PE contains
 4693|       |           complete markup, not only for external PEs, but also for
 4694|       |           internal PEs if the reference occurs between declarations.
 4695|       |        */
 4696|      0|        if (parser->m_isParamEntity || enc != parser->m_encoding) {
  ------------------
  |  Branch (4696:13): [True: 0, False: 0]
  |  Branch (4696:40): [True: 0, False: 0]
  ------------------
 4697|      0|          if (XmlTokenRole(&parser->m_prologState, XML_TOK_NONE, end, end, enc)
  ------------------
  |  |  136|      0|  (((state)->handler)(state, tok, ptr, end, enc))
  ------------------
  |  Branch (4697:15): [True: 0, False: 0]
  ------------------
 4698|      0|              == XML_ROLE_ERROR)
 4699|      0|            return XML_ERROR_INCOMPLETE_PE;
 4700|      0|          *nextPtr = s;
 4701|      0|          return XML_ERROR_NONE;
 4702|      0|        }
 4703|      0|#endif /* XML_DTD */
 4704|      0|        return XML_ERROR_NO_ELEMENTS;
 4705|      0|      default:
  ------------------
  |  Branch (4705:7): [True: 0, False: 1.94k]
  ------------------
 4706|      0|        tok = -tok;
 4707|      0|        next = end;
 4708|      0|        break;
 4709|  1.94k|      }
 4710|  1.94k|    }
 4711|  5.21M|    role = XmlTokenRole(&parser->m_prologState, tok, s, next, enc);
  ------------------
  |  |  136|  5.21M|  (((state)->handler)(state, tok, ptr, end, enc))
  ------------------
 4712|  5.21M|#ifdef XML_DTD
 4713|  5.21M|    switch (role) {
 4714|  11.5k|    case XML_ROLE_INSTANCE_START: // bytes accounted in contentProcessor
  ------------------
  |  Branch (4714:5): [True: 11.5k, False: 5.20M]
  ------------------
 4715|  11.9k|    case XML_ROLE_XML_DECL:       // bytes accounted in processXmlDecl
  ------------------
  |  Branch (4715:5): [True: 357, False: 5.21M]
  ------------------
 4716|  11.9k|    case XML_ROLE_TEXT_DECL:      // bytes accounted in processXmlDecl
  ------------------
  |  Branch (4716:5): [True: 0, False: 5.21M]
  ------------------
 4717|  11.9k|      break;
 4718|  5.20M|    default:
  ------------------
  |  Branch (4718:5): [True: 5.20M, False: 11.9k]
  ------------------
 4719|  5.20M|      if (! accountingDiffTolerated(parser, tok, s, next, __LINE__, account)) {
  ------------------
  |  Branch (4719:11): [True: 0, False: 5.20M]
  ------------------
 4720|      0|        accountingOnAbort(parser);
 4721|      0|        return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4722|      0|      }
 4723|  5.21M|    }
 4724|  5.21M|#endif
 4725|  5.21M|    switch (role) {
  ------------------
  |  Branch (4725:13): [True: 0, False: 5.21M]
  ------------------
 4726|    357|    case XML_ROLE_XML_DECL: {
  ------------------
  |  Branch (4726:5): [True: 357, False: 5.21M]
  ------------------
 4727|    357|      enum XML_Error result = processXmlDecl(parser, 0, s, next);
 4728|    357|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4728:11): [True: 264, False: 93]
  ------------------
 4729|    264|        return result;
 4730|     93|      enc = parser->m_encoding;
 4731|     93|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|     93|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4732|     93|    } break;
 4733|  6.04k|    case XML_ROLE_DOCTYPE_NAME:
  ------------------
  |  Branch (4733:5): [True: 6.04k, False: 5.20M]
  ------------------
 4734|  6.04k|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4734:11): [True: 0, False: 6.04k]
  ------------------
 4735|      0|        parser->m_doctypeName
 4736|      0|            = poolStoreString(&parser->m_tempPool, enc, s, next);
 4737|      0|        if (! parser->m_doctypeName)
  ------------------
  |  Branch (4737:13): [True: 0, False: 0]
  ------------------
 4738|      0|          return XML_ERROR_NO_MEMORY;
 4739|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4740|      0|        parser->m_doctypePubid = NULL;
 4741|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4742|      0|      }
 4743|  6.04k|      parser->m_doctypeSysid = NULL; /* always initialize to NULL */
 4744|  6.04k|      break;
 4745|  5.21k|    case XML_ROLE_DOCTYPE_INTERNAL_SUBSET:
  ------------------
  |  Branch (4745:5): [True: 5.21k, False: 5.21M]
  ------------------
 4746|  5.21k|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4746:11): [True: 0, False: 5.21k]
  ------------------
 4747|      0|        parser->m_startDoctypeDeclHandler(
 4748|      0|            parser->m_handlerArg, parser->m_doctypeName, parser->m_doctypeSysid,
 4749|      0|            parser->m_doctypePubid, 1);
 4750|      0|        parser->m_doctypeName = NULL;
 4751|      0|        poolClear(&parser->m_tempPool);
 4752|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4753|      0|      }
 4754|  5.21k|      break;
 4755|      0|#ifdef XML_DTD
 4756|      0|    case XML_ROLE_TEXT_DECL: {
  ------------------
  |  Branch (4756:5): [True: 0, False: 5.21M]
  ------------------
 4757|      0|      enum XML_Error result = processXmlDecl(parser, 1, s, next);
 4758|      0|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (4758:11): [True: 0, False: 0]
  ------------------
 4759|      0|        return result;
 4760|      0|      enc = parser->m_encoding;
 4761|      0|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4762|      0|    } break;
 4763|      0|#endif /* XML_DTD */
 4764|    720|    case XML_ROLE_DOCTYPE_PUBLIC_ID:
  ------------------
  |  Branch (4764:5): [True: 720, False: 5.21M]
  ------------------
 4765|    720|#ifdef XML_DTD
 4766|    720|      parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|    720|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4767|    720|      parser->m_declEntity = (ENTITY *)lookup(
 4768|    720|          parser, &dtd->paramEntities, externalSubsetName, sizeof(ENTITY));
 4769|    720|      if (! parser->m_declEntity)
  ------------------
  |  Branch (4769:11): [True: 0, False: 720]
  ------------------
 4770|      0|        return XML_ERROR_NO_MEMORY;
 4771|    720|#endif /* XML_DTD */
 4772|    720|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|    720|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4773|    720|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (4773:11): [True: 0, False: 720]
  ------------------
 4774|      0|        XML_Char *pubId;
 4775|      0|        if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|      0|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (4775:13): [True: 0, False: 0]
  ------------------
 4776|      0|          return XML_ERROR_PUBLICID;
 4777|      0|        pubId = poolStoreString(&parser->m_tempPool, enc,
 4778|      0|                                s + enc->minBytesPerChar,
 4779|      0|                                next - enc->minBytesPerChar);
 4780|      0|        if (! pubId)
  ------------------
  |  Branch (4780:13): [True: 0, False: 0]
  ------------------
 4781|      0|          return XML_ERROR_NO_MEMORY;
 4782|      0|        normalizePublicId(pubId);
 4783|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4784|      0|        parser->m_doctypePubid = pubId;
 4785|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4786|      0|        goto alreadyChecked;
 4787|      0|      }
 4788|       |      /* fall through */
 4789|  2.94k|    case XML_ROLE_ENTITY_PUBLIC_ID:
  ------------------
  |  Branch (4789:5): [True: 2.22k, False: 5.21M]
  ------------------
 4790|  2.94k|      if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|  2.94k|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (4790:11): [True: 95, False: 2.85k]
  ------------------
 4791|     95|        return XML_ERROR_PUBLICID;
 4792|  2.85k|    alreadyChecked:
 4793|  2.85k|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (4793:11): [True: 2.62k, False: 226]
  |  Branch (4793:34): [True: 918, False: 1.70k]
  ------------------
 4794|    918|        XML_Char *tem
 4795|    918|            = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 4796|    918|                              next - enc->minBytesPerChar);
 4797|    918|        if (! tem)
  ------------------
  |  Branch (4797:13): [True: 0, False: 918]
  ------------------
 4798|      0|          return XML_ERROR_NO_MEMORY;
 4799|    918|        normalizePublicId(tem);
 4800|    918|        parser->m_declEntity->publicId = tem;
 4801|    918|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|    918|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4802|       |        /* Don't suppress the default handler if we fell through from
 4803|       |         * the XML_ROLE_DOCTYPE_PUBLIC_ID case.
 4804|       |         */
 4805|    918|        if (parser->m_entityDeclHandler && role == XML_ROLE_ENTITY_PUBLIC_ID)
  ------------------
  |  Branch (4805:13): [True: 0, False: 918]
  |  Branch (4805:44): [True: 0, False: 0]
  ------------------
 4806|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4807|    918|      }
 4808|  2.85k|      break;
 4809|  2.85k|    case XML_ROLE_DOCTYPE_CLOSE:
  ------------------
  |  Branch (4809:5): [True: 2.35k, False: 5.21M]
  ------------------
 4810|  2.35k|      if (allowClosingDoctype != XML_TRUE) {
  ------------------
  |  |   55|  2.35k|#define XML_TRUE ((XML_Bool)1)
  ------------------
  |  Branch (4810:11): [True: 0, False: 2.35k]
  ------------------
 4811|       |        /* Must not close doctype from within expanded parameter entities */
 4812|      0|        return XML_ERROR_INVALID_TOKEN;
 4813|      0|      }
 4814|       |
 4815|  2.35k|      if (parser->m_doctypeName) {
  ------------------
  |  Branch (4815:11): [True: 0, False: 2.35k]
  ------------------
 4816|      0|        parser->m_startDoctypeDeclHandler(
 4817|      0|            parser->m_handlerArg, parser->m_doctypeName, parser->m_doctypeSysid,
 4818|      0|            parser->m_doctypePubid, 0);
 4819|      0|        poolClear(&parser->m_tempPool);
 4820|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4821|      0|      }
 4822|       |      /* parser->m_doctypeSysid will be non-NULL in the case of a previous
 4823|       |         XML_ROLE_DOCTYPE_SYSTEM_ID, even if parser->m_startDoctypeDeclHandler
 4824|       |         was not set, indicating an external subset
 4825|       |      */
 4826|  2.35k|#ifdef XML_DTD
 4827|  2.35k|      if (parser->m_doctypeSysid || parser->m_useForeignDTD) {
  ------------------
  |  Branch (4827:11): [True: 5, False: 2.34k]
  |  Branch (4827:37): [True: 0, False: 2.34k]
  ------------------
 4828|      5|        XML_Bool hadParamEntityRefs = dtd->hasParamEntityRefs;
 4829|      5|        dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|      5|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4830|      5|        if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4830:13): [True: 0, False: 5]
  ------------------
 4831|      5|            && parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (4831:16): [True: 0, False: 0]
  ------------------
 4832|      0|          ENTITY *entity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 4833|      0|                                            externalSubsetName, sizeof(ENTITY));
 4834|      0|          if (! entity) {
  ------------------
  |  Branch (4834:15): [True: 0, False: 0]
  ------------------
 4835|       |            /* The external subset name "#" will have already been
 4836|       |             * inserted into the hash table at the start of the
 4837|       |             * external entity parsing, so no allocation will happen
 4838|       |             * and lookup() cannot fail.
 4839|       |             */
 4840|      0|            return XML_ERROR_NO_MEMORY; /* LCOV_EXCL_LINE */
 4841|      0|          }
 4842|      0|          if (parser->m_useForeignDTD)
  ------------------
  |  Branch (4842:15): [True: 0, False: 0]
  ------------------
 4843|      0|            entity->base = parser->m_curBase;
 4844|      0|          dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4845|      0|          if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (4845:15): [True: 0, False: 0]
  ------------------
 4846|      0|                  parser->m_externalEntityRefHandlerArg, 0, entity->base,
 4847|      0|                  entity->systemId, entity->publicId))
 4848|      0|            return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 4849|      0|          if (dtd->paramEntityRead) {
  ------------------
  |  Branch (4849:15): [True: 0, False: 0]
  ------------------
 4850|      0|            if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (4850:17): [True: 0, False: 0]
  |  Branch (4850:38): [True: 0, False: 0]
  ------------------
 4851|      0|                && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (4851:20): [True: 0, False: 0]
  ------------------
 4852|      0|              return XML_ERROR_NOT_STANDALONE;
 4853|      0|          }
 4854|       |          /* if we didn't read the foreign DTD then this means that there
 4855|       |             is no external subset and we must reset dtd->hasParamEntityRefs
 4856|       |          */
 4857|      0|          else if (! parser->m_doctypeSysid)
  ------------------
  |  Branch (4857:20): [True: 0, False: 0]
  ------------------
 4858|      0|            dtd->hasParamEntityRefs = hadParamEntityRefs;
 4859|       |          /* end of DTD - no need to update dtd->keepProcessing */
 4860|      0|        }
 4861|      5|        parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|      5|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4862|      5|      }
 4863|  2.35k|#endif /* XML_DTD */
 4864|  2.35k|      if (parser->m_endDoctypeDeclHandler) {
  ------------------
  |  Branch (4864:11): [True: 0, False: 2.35k]
  ------------------
 4865|      0|        parser->m_endDoctypeDeclHandler(parser->m_handlerArg);
 4866|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4867|      0|      }
 4868|  2.35k|      break;
 4869|  11.5k|    case XML_ROLE_INSTANCE_START:
  ------------------
  |  Branch (4869:5): [True: 11.5k, False: 5.20M]
  ------------------
 4870|  11.5k|#ifdef XML_DTD
 4871|       |      /* if there is no DOCTYPE declaration then now is the
 4872|       |         last chance to read the foreign DTD
 4873|       |      */
 4874|  11.5k|      if (parser->m_useForeignDTD) {
  ------------------
  |  Branch (4874:11): [True: 0, False: 11.5k]
  ------------------
 4875|      0|        XML_Bool hadParamEntityRefs = dtd->hasParamEntityRefs;
 4876|      0|        dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4877|      0|        if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4877:13): [True: 0, False: 0]
  ------------------
 4878|      0|            && parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (4878:16): [True: 0, False: 0]
  ------------------
 4879|      0|          ENTITY *entity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 4880|      0|                                            externalSubsetName, sizeof(ENTITY));
 4881|      0|          if (! entity)
  ------------------
  |  Branch (4881:15): [True: 0, False: 0]
  ------------------
 4882|      0|            return XML_ERROR_NO_MEMORY;
 4883|      0|          entity->base = parser->m_curBase;
 4884|      0|          dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4885|      0|          if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (4885:15): [True: 0, False: 0]
  ------------------
 4886|      0|                  parser->m_externalEntityRefHandlerArg, 0, entity->base,
 4887|      0|                  entity->systemId, entity->publicId))
 4888|      0|            return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 4889|      0|          if (dtd->paramEntityRead) {
  ------------------
  |  Branch (4889:15): [True: 0, False: 0]
  ------------------
 4890|      0|            if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (4890:17): [True: 0, False: 0]
  |  Branch (4890:38): [True: 0, False: 0]
  ------------------
 4891|      0|                && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (4891:20): [True: 0, False: 0]
  ------------------
 4892|      0|              return XML_ERROR_NOT_STANDALONE;
 4893|      0|          }
 4894|       |          /* if we didn't read the foreign DTD then this means that there
 4895|       |             is no external subset and we must reset dtd->hasParamEntityRefs
 4896|       |          */
 4897|      0|          else
 4898|      0|            dtd->hasParamEntityRefs = hadParamEntityRefs;
 4899|       |          /* end of DTD - no need to update dtd->keepProcessing */
 4900|      0|        }
 4901|      0|      }
 4902|  11.5k|#endif /* XML_DTD */
 4903|  11.5k|      parser->m_processor = contentProcessor;
 4904|  11.5k|      return contentProcessor(parser, s, end, nextPtr);
 4905|  10.4k|    case XML_ROLE_ATTLIST_ELEMENT_NAME:
  ------------------
  |  Branch (4905:5): [True: 10.4k, False: 5.20M]
  ------------------
 4906|  10.4k|      parser->m_declElementType = getElementType(parser, enc, s, next);
 4907|  10.4k|      if (! parser->m_declElementType)
  ------------------
  |  Branch (4907:11): [True: 0, False: 10.4k]
  ------------------
 4908|      0|        return XML_ERROR_NO_MEMORY;
 4909|  10.4k|      goto checkAttListDeclHandler;
 4910|  14.1k|    case XML_ROLE_ATTRIBUTE_NAME:
  ------------------
  |  Branch (4910:5): [True: 14.1k, False: 5.20M]
  ------------------
 4911|  14.1k|      parser->m_declAttributeId = getAttributeId(parser, enc, s, next);
 4912|  14.1k|      if (! parser->m_declAttributeId)
  ------------------
  |  Branch (4912:11): [True: 0, False: 14.1k]
  ------------------
 4913|      0|        return XML_ERROR_NO_MEMORY;
 4914|  14.1k|      parser->m_declAttributeIsCdata = XML_FALSE;
  ------------------
  |  |   56|  14.1k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4915|  14.1k|      parser->m_declAttributeType = NULL;
 4916|  14.1k|      parser->m_declAttributeIsId = XML_FALSE;
  ------------------
  |  |   56|  14.1k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4917|  14.1k|      goto checkAttListDeclHandler;
 4918|    401|    case XML_ROLE_ATTRIBUTE_TYPE_CDATA:
  ------------------
  |  Branch (4918:5): [True: 401, False: 5.21M]
  ------------------
 4919|    401|      parser->m_declAttributeIsCdata = XML_TRUE;
  ------------------
  |  |   55|    401|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4920|    401|      parser->m_declAttributeType = atypeCDATA;
 4921|    401|      goto checkAttListDeclHandler;
 4922|  6.08k|    case XML_ROLE_ATTRIBUTE_TYPE_ID:
  ------------------
  |  Branch (4922:5): [True: 6.08k, False: 5.20M]
  ------------------
 4923|  6.08k|      parser->m_declAttributeIsId = XML_TRUE;
  ------------------
  |  |   55|  6.08k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4924|  6.08k|      parser->m_declAttributeType = atypeID;
 4925|  6.08k|      goto checkAttListDeclHandler;
 4926|    779|    case XML_ROLE_ATTRIBUTE_TYPE_IDREF:
  ------------------
  |  Branch (4926:5): [True: 779, False: 5.21M]
  ------------------
 4927|    779|      parser->m_declAttributeType = atypeIDREF;
 4928|    779|      goto checkAttListDeclHandler;
 4929|    832|    case XML_ROLE_ATTRIBUTE_TYPE_IDREFS:
  ------------------
  |  Branch (4929:5): [True: 832, False: 5.21M]
  ------------------
 4930|    832|      parser->m_declAttributeType = atypeIDREFS;
 4931|    832|      goto checkAttListDeclHandler;
 4932|    652|    case XML_ROLE_ATTRIBUTE_TYPE_ENTITY:
  ------------------
  |  Branch (4932:5): [True: 652, False: 5.21M]
  ------------------
 4933|    652|      parser->m_declAttributeType = atypeENTITY;
 4934|    652|      goto checkAttListDeclHandler;
 4935|    687|    case XML_ROLE_ATTRIBUTE_TYPE_ENTITIES:
  ------------------
  |  Branch (4935:5): [True: 687, False: 5.21M]
  ------------------
 4936|    687|      parser->m_declAttributeType = atypeENTITIES;
 4937|    687|      goto checkAttListDeclHandler;
 4938|    222|    case XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN:
  ------------------
  |  Branch (4938:5): [True: 222, False: 5.21M]
  ------------------
 4939|    222|      parser->m_declAttributeType = atypeNMTOKEN;
 4940|    222|      goto checkAttListDeclHandler;
 4941|    102|    case XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS:
  ------------------
  |  Branch (4941:5): [True: 102, False: 5.21M]
  ------------------
 4942|    102|      parser->m_declAttributeType = atypeNMTOKENS;
 4943|  34.3k|    checkAttListDeclHandler:
 4944|  34.3k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler)
  ------------------
  |  Branch (4944:11): [True: 33.1k, False: 1.15k]
  |  Branch (4944:34): [True: 0, False: 33.1k]
  ------------------
 4945|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4946|  34.3k|      break;
 4947|  10.4k|    case XML_ROLE_ATTRIBUTE_ENUM_VALUE:
  ------------------
  |  Branch (4947:5): [True: 10.4k, False: 5.20M]
  ------------------
 4948|  11.4k|    case XML_ROLE_ATTRIBUTE_NOTATION_VALUE:
  ------------------
  |  Branch (4948:5): [True: 988, False: 5.21M]
  ------------------
 4949|  11.4k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler) {
  ------------------
  |  Branch (4949:11): [True: 10.9k, False: 541]
  |  Branch (4949:34): [True: 0, False: 10.9k]
  ------------------
 4950|      0|        const XML_Char *prefix;
 4951|      0|        if (parser->m_declAttributeType) {
  ------------------
  |  Branch (4951:13): [True: 0, False: 0]
  ------------------
 4952|      0|          prefix = enumValueSep;
 4953|      0|        } else {
 4954|      0|          prefix = (role == XML_ROLE_ATTRIBUTE_NOTATION_VALUE ? notationPrefix
  ------------------
  |  Branch (4954:21): [True: 0, False: 0]
  ------------------
 4955|      0|                                                              : enumValueStart);
 4956|      0|        }
 4957|      0|        if (! poolAppendString(&parser->m_tempPool, prefix))
  ------------------
  |  Branch (4957:13): [True: 0, False: 0]
  ------------------
 4958|      0|          return XML_ERROR_NO_MEMORY;
 4959|      0|        if (! poolAppend(&parser->m_tempPool, enc, s, next))
  ------------------
  |  Branch (4959:13): [True: 0, False: 0]
  ------------------
 4960|      0|          return XML_ERROR_NO_MEMORY;
 4961|      0|        parser->m_declAttributeType = parser->m_tempPool.start;
 4962|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4963|      0|      }
 4964|  11.4k|      break;
 4965|  11.4k|    case XML_ROLE_IMPLIED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4965:5): [True: 3.26k, False: 5.21M]
  ------------------
 4966|  6.09k|    case XML_ROLE_REQUIRED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4966:5): [True: 2.83k, False: 5.21M]
  ------------------
 4967|  6.09k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (4967:11): [True: 5.83k, False: 263]
  ------------------
 4968|  5.83k|        if (! defineAttribute(parser->m_declElementType,
  ------------------
  |  Branch (4968:13): [True: 0, False: 5.83k]
  ------------------
 4969|  5.83k|                              parser->m_declAttributeId,
 4970|  5.83k|                              parser->m_declAttributeIsCdata,
 4971|  5.83k|                              parser->m_declAttributeIsId, 0, parser))
 4972|      0|          return XML_ERROR_NO_MEMORY;
 4973|  5.83k|        if (parser->m_attlistDeclHandler && parser->m_declAttributeType) {
  ------------------
  |  Branch (4973:13): [True: 0, False: 5.83k]
  |  Branch (4973:45): [True: 0, False: 0]
  ------------------
 4974|      0|          if (*parser->m_declAttributeType == XML_T(ASCII_LPAREN)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (4974:15): [True: 0, False: 0]
  ------------------
 4975|      0|              || (*parser->m_declAttributeType == XML_T(ASCII_N)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (4975:19): [True: 0, False: 0]
  ------------------
 4976|      0|                  && parser->m_declAttributeType[1] == XML_T(ASCII_O))) {
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (4976:22): [True: 0, False: 0]
  ------------------
 4977|       |            /* Enumerated or Notation type */
 4978|      0|            if (! poolAppendChar(&parser->m_tempPool, XML_T(ASCII_RPAREN))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (4978:17): [True: 0, False: 0]
  ------------------
 4979|      0|                || ! poolAppendChar(&parser->m_tempPool, XML_T('\0')))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (4979:20): [True: 0, False: 0]
  ------------------
 4980|      0|              return XML_ERROR_NO_MEMORY;
 4981|      0|            parser->m_declAttributeType = parser->m_tempPool.start;
 4982|      0|            poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4983|      0|          }
 4984|      0|          *eventEndPP = s;
 4985|      0|          parser->m_attlistDeclHandler(
 4986|      0|              parser->m_handlerArg, parser->m_declElementType->name,
 4987|      0|              parser->m_declAttributeId->name, parser->m_declAttributeType, 0,
 4988|      0|              role == XML_ROLE_REQUIRED_ATTRIBUTE_VALUE);
 4989|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 4990|      0|        }
 4991|  5.83k|      }
 4992|  6.09k|      poolClear(&parser->m_tempPool);
 4993|  6.09k|      break;
 4994|  6.63k|    case XML_ROLE_DEFAULT_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4994:5): [True: 6.63k, False: 5.20M]
  ------------------
 4995|  7.49k|    case XML_ROLE_FIXED_ATTRIBUTE_VALUE:
  ------------------
  |  Branch (4995:5): [True: 864, False: 5.21M]
  ------------------
 4996|  7.49k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (4996:11): [True: 7.24k, False: 252]
  ------------------
 4997|  7.24k|        const XML_Char *attVal;
 4998|  7.24k|        enum XML_Error result = storeAttributeValue(
 4999|  7.24k|            parser, enc, parser->m_declAttributeIsCdata,
 5000|  7.24k|            s + enc->minBytesPerChar, next - enc->minBytesPerChar, &dtd->pool,
 5001|  7.24k|            XML_ACCOUNT_NONE);
 5002|  7.24k|        if (result)
  ------------------
  |  Branch (5002:13): [True: 12, False: 7.23k]
  ------------------
 5003|     12|          return result;
 5004|  7.23k|        attVal = poolStart(&dtd->pool);
  ------------------
  |  |  596|  7.23k|#define poolStart(pool) ((pool)->start)
  ------------------
 5005|  7.23k|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|  7.23k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5006|       |        /* ID attributes aren't allowed to have a default */
 5007|  7.23k|        if (! defineAttribute(
  ------------------
  |  Branch (5007:13): [True: 0, False: 7.23k]
  ------------------
 5008|  7.23k|                parser->m_declElementType, parser->m_declAttributeId,
 5009|  7.23k|                parser->m_declAttributeIsCdata, XML_FALSE, attVal, parser))
  ------------------
  |  |   56|  7.23k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5010|      0|          return XML_ERROR_NO_MEMORY;
 5011|  7.23k|        if (parser->m_attlistDeclHandler && parser->m_declAttributeType) {
  ------------------
  |  Branch (5011:13): [True: 0, False: 7.23k]
  |  Branch (5011:45): [True: 0, False: 0]
  ------------------
 5012|      0|          if (*parser->m_declAttributeType == XML_T(ASCII_LPAREN)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (5012:15): [True: 0, False: 0]
  ------------------
 5013|      0|              || (*parser->m_declAttributeType == XML_T(ASCII_N)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (5013:19): [True: 0, False: 0]
  ------------------
 5014|      0|                  && parser->m_declAttributeType[1] == XML_T(ASCII_O))) {
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (5014:22): [True: 0, False: 0]
  ------------------
 5015|       |            /* Enumerated or Notation type */
 5016|      0|            if (! poolAppendChar(&parser->m_tempPool, XML_T(ASCII_RPAREN))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5016:17): [True: 0, False: 0]
  ------------------
 5017|      0|                || ! poolAppendChar(&parser->m_tempPool, XML_T('\0')))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5017:20): [True: 0, False: 0]
  ------------------
 5018|      0|              return XML_ERROR_NO_MEMORY;
 5019|      0|            parser->m_declAttributeType = parser->m_tempPool.start;
 5020|      0|            poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5021|      0|          }
 5022|      0|          *eventEndPP = s;
 5023|      0|          parser->m_attlistDeclHandler(
 5024|      0|              parser->m_handlerArg, parser->m_declElementType->name,
 5025|      0|              parser->m_declAttributeId->name, parser->m_declAttributeType,
 5026|      0|              attVal, role == XML_ROLE_FIXED_ATTRIBUTE_VALUE);
 5027|      0|          poolClear(&parser->m_tempPool);
 5028|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5029|      0|        }
 5030|  7.23k|      }
 5031|  7.48k|      break;
 5032|  9.19k|    case XML_ROLE_ENTITY_VALUE:
  ------------------
  |  Branch (5032:5): [True: 9.19k, False: 5.20M]
  ------------------
 5033|  9.19k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5033:11): [True: 8.37k, False: 819]
  ------------------
 5034|  8.37k|        enum XML_Error result
 5035|  8.37k|            = storeEntityValue(parser, enc, s + enc->minBytesPerChar,
 5036|  8.37k|                               next - enc->minBytesPerChar, XML_ACCOUNT_NONE);
 5037|  8.37k|        if (parser->m_declEntity) {
  ------------------
  |  Branch (5037:13): [True: 4.55k, False: 3.82k]
  ------------------
 5038|  4.55k|          parser->m_declEntity->textPtr = poolStart(&dtd->entityValuePool);
  ------------------
  |  |  596|  4.55k|#define poolStart(pool) ((pool)->start)
  ------------------
 5039|  4.55k|          parser->m_declEntity->textLen
 5040|  4.55k|              = (int)(poolLength(&dtd->entityValuePool));
  ------------------
  |  |  597|  4.55k|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
 5041|  4.55k|          poolFinish(&dtd->entityValuePool);
  ------------------
  |  |  601|  4.55k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5042|  4.55k|          if (parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5042:15): [True: 0, False: 4.55k]
  ------------------
 5043|      0|            *eventEndPP = s;
 5044|      0|            parser->m_entityDeclHandler(
 5045|      0|                parser->m_handlerArg, parser->m_declEntity->name,
 5046|      0|                parser->m_declEntity->is_param, parser->m_declEntity->textPtr,
 5047|      0|                parser->m_declEntity->textLen, parser->m_curBase, 0, 0, 0);
 5048|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5049|      0|          }
 5050|  4.55k|        } else
 5051|  3.82k|          poolDiscard(&dtd->entityValuePool);
  ------------------
  |  |  600|  3.82k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5052|  8.37k|        if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5052:13): [True: 73, False: 8.30k]
  ------------------
 5053|     73|          return result;
 5054|  8.37k|      }
 5055|  9.12k|      break;
 5056|  9.12k|    case XML_ROLE_DOCTYPE_SYSTEM_ID:
  ------------------
  |  Branch (5056:5): [True: 40, False: 5.21M]
  ------------------
 5057|     40|#ifdef XML_DTD
 5058|     40|      parser->m_useForeignDTD = XML_FALSE;
  ------------------
  |  |   56|     40|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5059|     40|#endif /* XML_DTD */
 5060|     40|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|     40|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5061|     40|      if (parser->m_startDoctypeDeclHandler) {
  ------------------
  |  Branch (5061:11): [True: 0, False: 40]
  ------------------
 5062|      0|        parser->m_doctypeSysid = poolStoreString(&parser->m_tempPool, enc,
 5063|      0|                                                 s + enc->minBytesPerChar,
 5064|      0|                                                 next - enc->minBytesPerChar);
 5065|      0|        if (parser->m_doctypeSysid == NULL)
  ------------------
  |  Branch (5065:13): [True: 0, False: 0]
  ------------------
 5066|      0|          return XML_ERROR_NO_MEMORY;
 5067|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5068|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5069|      0|      }
 5070|     40|#ifdef XML_DTD
 5071|     40|      else
 5072|       |        /* use externalSubsetName to make parser->m_doctypeSysid non-NULL
 5073|       |           for the case where no parser->m_startDoctypeDeclHandler is set */
 5074|     40|        parser->m_doctypeSysid = externalSubsetName;
 5075|     40|#endif /* XML_DTD */
 5076|     40|      if (! dtd->standalone
  ------------------
  |  Branch (5076:11): [True: 39, False: 1]
  ------------------
 5077|     40|#ifdef XML_DTD
 5078|     40|          && ! parser->m_paramEntityParsing
  ------------------
  |  Branch (5078:14): [True: 39, False: 0]
  ------------------
 5079|     40|#endif /* XML_DTD */
 5080|     40|          && parser->m_notStandaloneHandler
  ------------------
  |  Branch (5080:14): [True: 0, False: 39]
  ------------------
 5081|     40|          && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (5081:14): [True: 0, False: 0]
  ------------------
 5082|      0|        return XML_ERROR_NOT_STANDALONE;
 5083|       |#ifndef XML_DTD
 5084|       |      break;
 5085|       |#else  /* XML_DTD */
 5086|     40|      if (! parser->m_declEntity) {
  ------------------
  |  Branch (5086:11): [True: 6, False: 34]
  ------------------
 5087|      6|        parser->m_declEntity = (ENTITY *)lookup(
 5088|      6|            parser, &dtd->paramEntities, externalSubsetName, sizeof(ENTITY));
 5089|      6|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5089:13): [True: 0, False: 6]
  ------------------
 5090|      0|          return XML_ERROR_NO_MEMORY;
 5091|      6|        parser->m_declEntity->publicId = NULL;
 5092|      6|      }
 5093|     40|#endif /* XML_DTD */
 5094|       |      /* fall through */
 5095|  3.54k|    case XML_ROLE_ENTITY_SYSTEM_ID:
  ------------------
  |  Branch (5095:5): [True: 3.50k, False: 5.21M]
  ------------------
 5096|  3.54k|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (5096:11): [True: 2.88k, False: 662]
  |  Branch (5096:34): [True: 412, False: 2.47k]
  ------------------
 5097|    412|        parser->m_declEntity->systemId
 5098|    412|            = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 5099|    412|                              next - enc->minBytesPerChar);
 5100|    412|        if (! parser->m_declEntity->systemId)
  ------------------
  |  Branch (5100:13): [True: 0, False: 412]
  ------------------
 5101|      0|          return XML_ERROR_NO_MEMORY;
 5102|    412|        parser->m_declEntity->base = parser->m_curBase;
 5103|    412|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|    412|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5104|       |        /* Don't suppress the default handler if we fell through from
 5105|       |         * the XML_ROLE_DOCTYPE_SYSTEM_ID case.
 5106|       |         */
 5107|    412|        if (parser->m_entityDeclHandler && role == XML_ROLE_ENTITY_SYSTEM_ID)
  ------------------
  |  Branch (5107:13): [True: 0, False: 412]
  |  Branch (5107:44): [True: 0, False: 0]
  ------------------
 5108|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5109|    412|      }
 5110|  3.54k|      break;
 5111|  3.54k|    case XML_ROLE_ENTITY_COMPLETE:
  ------------------
  |  Branch (5111:5): [True: 2.66k, False: 5.21M]
  ------------------
 5112|  2.66k|      if (dtd->keepProcessing && parser->m_declEntity
  ------------------
  |  Branch (5112:11): [True: 2.42k, False: 240]
  |  Branch (5112:34): [True: 293, False: 2.13k]
  ------------------
 5113|  2.66k|          && parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5113:14): [True: 0, False: 293]
  ------------------
 5114|      0|        *eventEndPP = s;
 5115|      0|        parser->m_entityDeclHandler(
 5116|      0|            parser->m_handlerArg, parser->m_declEntity->name,
 5117|      0|            parser->m_declEntity->is_param, 0, 0, parser->m_declEntity->base,
 5118|      0|            parser->m_declEntity->systemId, parser->m_declEntity->publicId, 0);
 5119|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5120|      0|      }
 5121|  2.66k|      break;
 5122|    809|    case XML_ROLE_ENTITY_NOTATION_NAME:
  ------------------
  |  Branch (5122:5): [True: 809, False: 5.21M]
  ------------------
 5123|    809|      if (dtd->keepProcessing && parser->m_declEntity) {
  ------------------
  |  Branch (5123:11): [True: 388, False: 421]
  |  Branch (5123:34): [True: 66, False: 322]
  ------------------
 5124|     66|        parser->m_declEntity->notation
 5125|     66|            = poolStoreString(&dtd->pool, enc, s, next);
 5126|     66|        if (! parser->m_declEntity->notation)
  ------------------
  |  Branch (5126:13): [True: 0, False: 66]
  ------------------
 5127|      0|          return XML_ERROR_NO_MEMORY;
 5128|     66|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|     66|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5129|     66|        if (parser->m_unparsedEntityDeclHandler) {
  ------------------
  |  Branch (5129:13): [True: 0, False: 66]
  ------------------
 5130|      0|          *eventEndPP = s;
 5131|      0|          parser->m_unparsedEntityDeclHandler(
 5132|      0|              parser->m_handlerArg, parser->m_declEntity->name,
 5133|      0|              parser->m_declEntity->base, parser->m_declEntity->systemId,
 5134|      0|              parser->m_declEntity->publicId, parser->m_declEntity->notation);
 5135|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5136|     66|        } else if (parser->m_entityDeclHandler) {
  ------------------
  |  Branch (5136:20): [True: 0, False: 66]
  ------------------
 5137|      0|          *eventEndPP = s;
 5138|      0|          parser->m_entityDeclHandler(
 5139|      0|              parser->m_handlerArg, parser->m_declEntity->name, 0, 0, 0,
 5140|      0|              parser->m_declEntity->base, parser->m_declEntity->systemId,
 5141|      0|              parser->m_declEntity->publicId, parser->m_declEntity->notation);
 5142|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5143|      0|        }
 5144|     66|      }
 5145|    809|      break;
 5146|  9.04k|    case XML_ROLE_GENERAL_ENTITY_NAME: {
  ------------------
  |  Branch (5146:5): [True: 9.04k, False: 5.20M]
  ------------------
 5147|  9.04k|      if (XmlPredefinedEntityName(enc, s, next)) {
  ------------------
  |  |  267|  9.04k|  (((enc)->predefinedEntityName)(enc, ptr, end))
  |  |  ------------------
  |  |  |  Branch (267:3): [True: 374, False: 8.67k]
  |  |  ------------------
  ------------------
 5148|    374|        parser->m_declEntity = NULL;
 5149|    374|        break;
 5150|    374|      }
 5151|  8.67k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5151:11): [True: 7.93k, False: 744]
  ------------------
 5152|  7.93k|        const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next);
 5153|  7.93k|        if (! name)
  ------------------
  |  Branch (5153:13): [True: 0, False: 7.93k]
  ------------------
 5154|      0|          return XML_ERROR_NO_MEMORY;
 5155|  7.93k|        parser->m_declEntity = (ENTITY *)lookup(parser, &dtd->generalEntities,
 5156|  7.93k|                                                name, sizeof(ENTITY));
 5157|  7.93k|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5157:13): [True: 0, False: 7.93k]
  ------------------
 5158|      0|          return XML_ERROR_NO_MEMORY;
 5159|  7.93k|        if (parser->m_declEntity->name != name) {
  ------------------
  |  Branch (5159:13): [True: 3.26k, False: 4.66k]
  ------------------
 5160|  3.26k|          poolDiscard(&dtd->pool);
  ------------------
  |  |  600|  3.26k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5161|  3.26k|          parser->m_declEntity = NULL;
 5162|  4.66k|        } else {
 5163|  4.66k|          poolFinish(&dtd->pool);
  ------------------
  |  |  601|  4.66k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5164|  4.66k|          parser->m_declEntity->publicId = NULL;
 5165|  4.66k|          parser->m_declEntity->is_param = XML_FALSE;
  ------------------
  |  |   56|  4.66k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5166|       |          /* if we have a parent parser or are reading an internal parameter
 5167|       |             entity, then the entity declaration is not considered "internal"
 5168|       |          */
 5169|  4.66k|          parser->m_declEntity->is_internal
 5170|  4.66k|              = ! (parser->m_parentParser || parser->m_openInternalEntities);
  ------------------
  |  Branch (5170:20): [True: 0, False: 4.66k]
  |  Branch (5170:46): [True: 0, False: 4.66k]
  ------------------
 5171|  4.66k|          if (parser->m_entityDeclHandler)
  ------------------
  |  Branch (5171:15): [True: 0, False: 4.66k]
  ------------------
 5172|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5173|  4.66k|        }
 5174|  7.93k|      } else {
 5175|    744|        poolDiscard(&dtd->pool);
  ------------------
  |  |  600|    744|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5176|    744|        parser->m_declEntity = NULL;
 5177|    744|      }
 5178|  8.67k|    } break;
 5179|  8.67k|    case XML_ROLE_PARAM_ENTITY_NAME:
  ------------------
  |  Branch (5179:5): [True: 3.83k, False: 5.21M]
  ------------------
 5180|  3.83k|#ifdef XML_DTD
 5181|  3.83k|      if (dtd->keepProcessing) {
  ------------------
  |  Branch (5181:11): [True: 3.34k, False: 486]
  ------------------
 5182|  3.34k|        const XML_Char *name = poolStoreString(&dtd->pool, enc, s, next);
 5183|  3.34k|        if (! name)
  ------------------
  |  Branch (5183:13): [True: 0, False: 3.34k]
  ------------------
 5184|      0|          return XML_ERROR_NO_MEMORY;
 5185|  3.34k|        parser->m_declEntity = (ENTITY *)lookup(parser, &dtd->paramEntities,
 5186|  3.34k|                                                name, sizeof(ENTITY));
 5187|  3.34k|        if (! parser->m_declEntity)
  ------------------
  |  Branch (5187:13): [True: 0, False: 3.34k]
  ------------------
 5188|      0|          return XML_ERROR_NO_MEMORY;
 5189|  3.34k|        if (parser->m_declEntity->name != name) {
  ------------------
  |  Branch (5189:13): [True: 2.99k, False: 345]
  ------------------
 5190|  2.99k|          poolDiscard(&dtd->pool);
  ------------------
  |  |  600|  2.99k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5191|  2.99k|          parser->m_declEntity = NULL;
 5192|  2.99k|        } else {
 5193|    345|          poolFinish(&dtd->pool);
  ------------------
  |  |  601|    345|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5194|    345|          parser->m_declEntity->publicId = NULL;
 5195|    345|          parser->m_declEntity->is_param = XML_TRUE;
  ------------------
  |  |   55|    345|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5196|       |          /* if we have a parent parser or are reading an internal parameter
 5197|       |             entity, then the entity declaration is not considered "internal"
 5198|       |          */
 5199|    345|          parser->m_declEntity->is_internal
 5200|    345|              = ! (parser->m_parentParser || parser->m_openInternalEntities);
  ------------------
  |  Branch (5200:20): [True: 0, False: 345]
  |  Branch (5200:46): [True: 0, False: 345]
  ------------------
 5201|    345|          if (parser->m_entityDeclHandler)
  ------------------
  |  Branch (5201:15): [True: 0, False: 345]
  ------------------
 5202|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5203|    345|        }
 5204|  3.34k|      } else {
 5205|    486|        poolDiscard(&dtd->pool);
  ------------------
  |  |  600|    486|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5206|    486|        parser->m_declEntity = NULL;
 5207|    486|      }
 5208|       |#else  /* not XML_DTD */
 5209|       |      parser->m_declEntity = NULL;
 5210|       |#endif /* XML_DTD */
 5211|  3.83k|      break;
 5212|  3.83k|    case XML_ROLE_NOTATION_NAME:
  ------------------
  |  Branch (5212:5): [True: 1.43k, False: 5.21M]
  ------------------
 5213|  1.43k|      parser->m_declNotationPublicId = NULL;
 5214|  1.43k|      parser->m_declNotationName = NULL;
 5215|  1.43k|      if (parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5215:11): [True: 0, False: 1.43k]
  ------------------
 5216|      0|        parser->m_declNotationName
 5217|      0|            = poolStoreString(&parser->m_tempPool, enc, s, next);
 5218|      0|        if (! parser->m_declNotationName)
  ------------------
  |  Branch (5218:13): [True: 0, False: 0]
  ------------------
 5219|      0|          return XML_ERROR_NO_MEMORY;
 5220|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5221|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5222|      0|      }
 5223|  1.43k|      break;
 5224|  1.43k|    case XML_ROLE_NOTATION_PUBLIC_ID:
  ------------------
  |  Branch (5224:5): [True: 1.06k, False: 5.21M]
  ------------------
 5225|  1.06k|      if (! XmlIsPublicId(enc, s, next, eventPP))
  ------------------
  |  |  273|  1.06k|  (((enc)->isPublicId)(enc, ptr, end, badPtr))
  ------------------
  |  Branch (5225:11): [True: 3, False: 1.06k]
  ------------------
 5226|      3|        return XML_ERROR_PUBLICID;
 5227|  1.06k|      if (parser
  ------------------
  |  Branch (5227:11): [True: 0, False: 1.06k]
  ------------------
 5228|  1.06k|              ->m_declNotationName) { /* means m_notationDeclHandler != NULL */
 5229|      0|        XML_Char *tem = poolStoreString(&parser->m_tempPool, enc,
 5230|      0|                                        s + enc->minBytesPerChar,
 5231|      0|                                        next - enc->minBytesPerChar);
 5232|      0|        if (! tem)
  ------------------
  |  Branch (5232:13): [True: 0, False: 0]
  ------------------
 5233|      0|          return XML_ERROR_NO_MEMORY;
 5234|      0|        normalizePublicId(tem);
 5235|      0|        parser->m_declNotationPublicId = tem;
 5236|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 5237|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5238|      0|      }
 5239|  1.06k|      break;
 5240|  1.06k|    case XML_ROLE_NOTATION_SYSTEM_ID:
  ------------------
  |  Branch (5240:5): [True: 647, False: 5.21M]
  ------------------
 5241|    647|      if (parser->m_declNotationName && parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5241:11): [True: 0, False: 647]
  |  Branch (5241:41): [True: 0, False: 0]
  ------------------
 5242|      0|        const XML_Char *systemId = poolStoreString(&parser->m_tempPool, enc,
 5243|      0|                                                   s + enc->minBytesPerChar,
 5244|      0|                                                   next - enc->minBytesPerChar);
 5245|      0|        if (! systemId)
  ------------------
  |  Branch (5245:13): [True: 0, False: 0]
  ------------------
 5246|      0|          return XML_ERROR_NO_MEMORY;
 5247|      0|        *eventEndPP = s;
 5248|      0|        parser->m_notationDeclHandler(
 5249|      0|            parser->m_handlerArg, parser->m_declNotationName, parser->m_curBase,
 5250|      0|            systemId, parser->m_declNotationPublicId);
 5251|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5252|      0|      }
 5253|    647|      poolClear(&parser->m_tempPool);
 5254|    647|      break;
 5255|    748|    case XML_ROLE_NOTATION_NO_SYSTEM_ID:
  ------------------
  |  Branch (5255:5): [True: 748, False: 5.21M]
  ------------------
 5256|    748|      if (parser->m_declNotationPublicId && parser->m_notationDeclHandler) {
  ------------------
  |  Branch (5256:11): [True: 0, False: 748]
  |  Branch (5256:45): [True: 0, False: 0]
  ------------------
 5257|      0|        *eventEndPP = s;
 5258|      0|        parser->m_notationDeclHandler(
 5259|      0|            parser->m_handlerArg, parser->m_declNotationName, parser->m_curBase,
 5260|      0|            0, parser->m_declNotationPublicId);
 5261|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5262|      0|      }
 5263|    748|      poolClear(&parser->m_tempPool);
 5264|    748|      break;
 5265|  1.38k|    case XML_ROLE_ERROR:
  ------------------
  |  Branch (5265:5): [True: 1.38k, False: 5.21M]
  ------------------
 5266|  1.38k|      switch (tok) {
 5267|      4|      case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|      4|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (5267:7): [True: 4, False: 1.37k]
  ------------------
 5268|       |        /* PE references in internal subset are
 5269|       |           not allowed within declarations. */
 5270|      4|        return XML_ERROR_PARAM_ENTITY_REF;
 5271|      1|      case XML_TOK_XML_DECL:
  ------------------
  |  |   77|      1|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (5271:7): [True: 1, False: 1.38k]
  ------------------
 5272|      1|        return XML_ERROR_MISPLACED_XML_PI;
 5273|  1.37k|      default:
  ------------------
  |  Branch (5273:7): [True: 1.37k, False: 5]
  ------------------
 5274|  1.37k|        return XML_ERROR_SYNTAX;
 5275|  1.38k|      }
 5276|      0|#ifdef XML_DTD
 5277|      0|    case XML_ROLE_IGNORE_SECT: {
  ------------------
  |  Branch (5277:5): [True: 0, False: 5.21M]
  ------------------
 5278|      0|      enum XML_Error result;
 5279|      0|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (5279:11): [True: 0, False: 0]
  ------------------
 5280|      0|        reportDefault(parser, enc, s, next);
 5281|      0|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5282|      0|      result = doIgnoreSection(parser, enc, &next, end, nextPtr, haveMore);
 5283|      0|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5283:11): [True: 0, False: 0]
  ------------------
 5284|      0|        return result;
 5285|      0|      else if (! next) {
  ------------------
  |  Branch (5285:16): [True: 0, False: 0]
  ------------------
 5286|      0|        parser->m_processor = ignoreSectionProcessor;
 5287|      0|        return result;
 5288|      0|      }
 5289|      0|    } break;
 5290|      0|#endif /* XML_DTD */
 5291|  4.52M|    case XML_ROLE_GROUP_OPEN:
  ------------------
  |  Branch (5291:5): [True: 4.52M, False: 692k]
  ------------------
 5292|  4.52M|      if (parser->m_prologState.level >= parser->m_groupSize) {
  ------------------
  |  Branch (5292:11): [True: 1.31k, False: 4.52M]
  ------------------
 5293|  1.31k|        if (parser->m_groupSize) {
  ------------------
  |  Branch (5293:13): [True: 559, False: 760]
  ------------------
 5294|    559|          {
 5295|       |            /* Detect and prevent integer overflow */
 5296|    559|            if (parser->m_groupSize > (unsigned int)(-1) / 2u) {
  ------------------
  |  Branch (5296:17): [True: 0, False: 559]
  ------------------
 5297|      0|              return XML_ERROR_NO_MEMORY;
 5298|      0|            }
 5299|       |
 5300|    559|            char *const new_connector = (char *)REALLOC(
  ------------------
  |  |  715|    559|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 5301|    559|                parser, parser->m_groupConnector, parser->m_groupSize *= 2);
 5302|    559|            if (new_connector == NULL) {
  ------------------
  |  Branch (5302:17): [True: 0, False: 559]
  ------------------
 5303|      0|              parser->m_groupSize /= 2;
 5304|      0|              return XML_ERROR_NO_MEMORY;
 5305|      0|            }
 5306|    559|            parser->m_groupConnector = new_connector;
 5307|    559|          }
 5308|       |
 5309|    559|          if (dtd->scaffIndex) {
  ------------------
  |  Branch (5309:15): [True: 0, False: 559]
  ------------------
 5310|       |            /* Detect and prevent integer overflow.
 5311|       |             * The preprocessor guard addresses the "always false" warning
 5312|       |             * from -Wtype-limits on platforms where
 5313|       |             * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 5314|       |#if UINT_MAX >= SIZE_MAX
 5315|       |            if (parser->m_groupSize > (size_t)(-1) / sizeof(int)) {
 5316|       |              return XML_ERROR_NO_MEMORY;
 5317|       |            }
 5318|       |#endif
 5319|       |
 5320|      0|            int *const new_scaff_index = (int *)REALLOC(
  ------------------
  |  |  715|      0|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 5321|      0|                parser, dtd->scaffIndex, parser->m_groupSize * sizeof(int));
 5322|      0|            if (new_scaff_index == NULL)
  ------------------
  |  Branch (5322:17): [True: 0, False: 0]
  ------------------
 5323|      0|              return XML_ERROR_NO_MEMORY;
 5324|      0|            dtd->scaffIndex = new_scaff_index;
 5325|      0|          }
 5326|    760|        } else {
 5327|    760|          parser->m_groupConnector
 5328|    760|              = (char *)MALLOC(parser, parser->m_groupSize = 32);
  ------------------
  |  |  714|    760|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5329|    760|          if (! parser->m_groupConnector) {
  ------------------
  |  Branch (5329:15): [True: 0, False: 760]
  ------------------
 5330|      0|            parser->m_groupSize = 0;
 5331|      0|            return XML_ERROR_NO_MEMORY;
 5332|      0|          }
 5333|    760|        }
 5334|  1.31k|      }
 5335|  4.52M|      parser->m_groupConnector[parser->m_prologState.level] = 0;
 5336|  4.52M|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5336:11): [True: 0, False: 4.52M]
  ------------------
 5337|      0|        int myindex = nextScaffoldPart(parser);
 5338|      0|        if (myindex < 0)
  ------------------
  |  Branch (5338:13): [True: 0, False: 0]
  ------------------
 5339|      0|          return XML_ERROR_NO_MEMORY;
 5340|      0|        assert(dtd->scaffIndex != NULL);
 5341|      0|        dtd->scaffIndex[dtd->scaffLevel] = myindex;
 5342|      0|        dtd->scaffLevel++;
 5343|      0|        dtd->scaffold[myindex].type = XML_CTYPE_SEQ;
 5344|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5344:13): [True: 0, False: 0]
  ------------------
 5345|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5346|      0|      }
 5347|  4.52M|      break;
 5348|  4.52M|    case XML_ROLE_GROUP_SEQUENCE:
  ------------------
  |  Branch (5348:5): [True: 8.11k, False: 5.20M]
  ------------------
 5349|  8.11k|      if (parser->m_groupConnector[parser->m_prologState.level] == ASCII_PIPE)
  ------------------
  |  |  122|  8.11k|#define ASCII_PIPE 0x7C
  ------------------
  |  Branch (5349:11): [True: 1, False: 8.11k]
  ------------------
 5350|      1|        return XML_ERROR_SYNTAX;
 5351|  8.11k|      parser->m_groupConnector[parser->m_prologState.level] = ASCII_COMMA;
  ------------------
  |  |  123|  8.11k|#define ASCII_COMMA 0x2C
  ------------------
 5352|  8.11k|      if (dtd->in_eldecl && parser->m_elementDeclHandler)
  ------------------
  |  Branch (5352:11): [True: 0, False: 8.11k]
  |  Branch (5352:29): [True: 0, False: 0]
  ------------------
 5353|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5354|  8.11k|      break;
 5355|  10.6k|    case XML_ROLE_GROUP_CHOICE:
  ------------------
  |  Branch (5355:5): [True: 10.6k, False: 5.20M]
  ------------------
 5356|  10.6k|      if (parser->m_groupConnector[parser->m_prologState.level] == ASCII_COMMA)
  ------------------
  |  |  123|  10.6k|#define ASCII_COMMA 0x2C
  ------------------
  |  Branch (5356:11): [True: 1, False: 10.6k]
  ------------------
 5357|      1|        return XML_ERROR_SYNTAX;
 5358|  10.6k|      if (dtd->in_eldecl
  ------------------
  |  Branch (5358:11): [True: 0, False: 10.6k]
  ------------------
 5359|  10.6k|          && ! parser->m_groupConnector[parser->m_prologState.level]
  ------------------
  |  Branch (5359:14): [True: 0, False: 0]
  ------------------
 5360|  10.6k|          && (dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type
  ------------------
  |  Branch (5360:14): [True: 0, False: 0]
  ------------------
 5361|      0|              != XML_CTYPE_MIXED)) {
 5362|      0|        dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type
 5363|      0|            = XML_CTYPE_CHOICE;
 5364|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5364:13): [True: 0, False: 0]
  ------------------
 5365|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5366|      0|      }
 5367|  10.6k|      parser->m_groupConnector[parser->m_prologState.level] = ASCII_PIPE;
  ------------------
  |  |  122|  10.6k|#define ASCII_PIPE 0x7C
  ------------------
 5368|  10.6k|      break;
 5369|  3.68k|    case XML_ROLE_PARAM_ENTITY_REF:
  ------------------
  |  Branch (5369:5): [True: 3.68k, False: 5.21M]
  ------------------
 5370|  3.68k|#ifdef XML_DTD
 5371|  3.68k|    case XML_ROLE_INNER_PARAM_ENTITY_REF:
  ------------------
  |  Branch (5371:5): [True: 0, False: 5.21M]
  ------------------
 5372|  3.68k|      dtd->hasParamEntityRefs = XML_TRUE;
  ------------------
  |  |   55|  3.68k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5373|  3.68k|      if (! parser->m_paramEntityParsing)
  ------------------
  |  Branch (5373:11): [True: 3.68k, False: 0]
  ------------------
 5374|  3.68k|        dtd->keepProcessing = dtd->standalone;
 5375|      0|      else {
 5376|      0|        const XML_Char *name;
 5377|      0|        ENTITY *entity;
 5378|      0|        name = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 5379|      0|                               next - enc->minBytesPerChar);
 5380|      0|        if (! name)
  ------------------
  |  Branch (5380:13): [True: 0, False: 0]
  ------------------
 5381|      0|          return XML_ERROR_NO_MEMORY;
 5382|      0|        entity = (ENTITY *)lookup(parser, &dtd->paramEntities, name, 0);
 5383|      0|        poolDiscard(&dtd->pool);
  ------------------
  |  |  600|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5384|       |        /* first, determine if a check for an existing declaration is needed;
 5385|       |           if yes, check that the entity exists, and that it is internal,
 5386|       |           otherwise call the skipped entity handler
 5387|       |        */
 5388|      0|        if (parser->m_prologState.documentEntity
  ------------------
  |  Branch (5388:13): [True: 0, False: 0]
  ------------------
 5389|      0|            && (dtd->standalone ? ! parser->m_openInternalEntities
  ------------------
  |  Branch (5389:16): [True: 0, False: 0]
  |  Branch (5389:17): [True: 0, False: 0]
  ------------------
 5390|      0|                                : ! dtd->hasParamEntityRefs)) {
 5391|      0|          if (! entity)
  ------------------
  |  Branch (5391:15): [True: 0, False: 0]
  ------------------
 5392|      0|            return XML_ERROR_UNDEFINED_ENTITY;
 5393|      0|          else if (! entity->is_internal) {
  ------------------
  |  Branch (5393:20): [True: 0, False: 0]
  ------------------
 5394|       |            /* It's hard to exhaustively search the code to be sure,
 5395|       |             * but there doesn't seem to be a way of executing the
 5396|       |             * following line.  There are two cases:
 5397|       |             *
 5398|       |             * If 'standalone' is false, the DTD must have no
 5399|       |             * parameter entities or we wouldn't have passed the outer
 5400|       |             * 'if' statement.  That means the only entity in the hash
 5401|       |             * table is the external subset name "#" which cannot be
 5402|       |             * given as a parameter entity name in XML syntax, so the
 5403|       |             * lookup must have returned NULL and we don't even reach
 5404|       |             * the test for an internal entity.
 5405|       |             *
 5406|       |             * If 'standalone' is true, it does not seem to be
 5407|       |             * possible to create entities taking this code path that
 5408|       |             * are not internal entities, so fail the test above.
 5409|       |             *
 5410|       |             * Because this analysis is very uncertain, the code is
 5411|       |             * being left in place and merely removed from the
 5412|       |             * coverage test statistics.
 5413|       |             */
 5414|      0|            return XML_ERROR_ENTITY_DECLARED_IN_PE; /* LCOV_EXCL_LINE */
 5415|      0|          }
 5416|      0|        } else if (! entity) {
  ------------------
  |  Branch (5416:20): [True: 0, False: 0]
  ------------------
 5417|      0|          dtd->keepProcessing = dtd->standalone;
 5418|       |          /* cannot report skipped entities in declarations */
 5419|      0|          if ((role == XML_ROLE_PARAM_ENTITY_REF)
  ------------------
  |  Branch (5419:15): [True: 0, False: 0]
  ------------------
 5420|      0|              && parser->m_skippedEntityHandler) {
  ------------------
  |  Branch (5420:18): [True: 0, False: 0]
  ------------------
 5421|      0|            parser->m_skippedEntityHandler(parser->m_handlerArg, name, 1);
 5422|      0|            handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5423|      0|          }
 5424|      0|          break;
 5425|      0|        }
 5426|      0|        if (entity->open)
  ------------------
  |  Branch (5426:13): [True: 0, False: 0]
  ------------------
 5427|      0|          return XML_ERROR_RECURSIVE_ENTITY_REF;
 5428|      0|        if (entity->textPtr) {
  ------------------
  |  Branch (5428:13): [True: 0, False: 0]
  ------------------
 5429|      0|          enum XML_Error result;
 5430|      0|          XML_Bool betweenDecl
 5431|      0|              = (role == XML_ROLE_PARAM_ENTITY_REF ? XML_TRUE : XML_FALSE);
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
                            = (role == XML_ROLE_PARAM_ENTITY_REF ? XML_TRUE : XML_FALSE);
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
  |  Branch (5431:18): [True: 0, False: 0]
  ------------------
 5432|      0|          result = processInternalEntity(parser, entity, betweenDecl);
 5433|      0|          if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (5433:15): [True: 0, False: 0]
  ------------------
 5434|      0|            return result;
 5435|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5436|      0|          break;
 5437|      0|        }
 5438|      0|        if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (5438:13): [True: 0, False: 0]
  ------------------
 5439|      0|          dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5440|      0|          entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5441|      0|          entityTrackingOnOpen(parser, entity, __LINE__);
 5442|      0|          if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (5442:15): [True: 0, False: 0]
  ------------------
 5443|      0|                  parser->m_externalEntityRefHandlerArg, 0, entity->base,
 5444|      0|                  entity->systemId, entity->publicId)) {
 5445|      0|            entityTrackingOnClose(parser, entity, __LINE__);
 5446|      0|            entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5447|      0|            return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 5448|      0|          }
 5449|      0|          entityTrackingOnClose(parser, entity, __LINE__);
 5450|      0|          entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5451|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5452|      0|          if (! dtd->paramEntityRead) {
  ------------------
  |  Branch (5452:15): [True: 0, False: 0]
  ------------------
 5453|      0|            dtd->keepProcessing = dtd->standalone;
 5454|      0|            break;
 5455|      0|          }
 5456|      0|        } else {
 5457|      0|          dtd->keepProcessing = dtd->standalone;
 5458|      0|          break;
 5459|      0|        }
 5460|      0|      }
 5461|  3.68k|#endif /* XML_DTD */
 5462|  3.68k|      if (! dtd->standalone && parser->m_notStandaloneHandler
  ------------------
  |  Branch (5462:11): [True: 3.44k, False: 238]
  |  Branch (5462:32): [True: 0, False: 3.44k]
  ------------------
 5463|  3.68k|          && ! parser->m_notStandaloneHandler(parser->m_handlerArg))
  ------------------
  |  Branch (5463:14): [True: 0, False: 0]
  ------------------
 5464|      0|        return XML_ERROR_NOT_STANDALONE;
 5465|  3.68k|      break;
 5466|       |
 5467|       |      /* Element declaration stuff */
 5468|       |
 5469|  8.09k|    case XML_ROLE_ELEMENT_NAME:
  ------------------
  |  Branch (5469:5): [True: 8.09k, False: 5.20M]
  ------------------
 5470|  8.09k|      if (parser->m_elementDeclHandler) {
  ------------------
  |  Branch (5470:11): [True: 0, False: 8.09k]
  ------------------
 5471|      0|        parser->m_declElementType = getElementType(parser, enc, s, next);
 5472|      0|        if (! parser->m_declElementType)
  ------------------
  |  Branch (5472:13): [True: 0, False: 0]
  ------------------
 5473|      0|          return XML_ERROR_NO_MEMORY;
 5474|      0|        dtd->scaffLevel = 0;
 5475|      0|        dtd->scaffCount = 0;
 5476|      0|        dtd->in_eldecl = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5477|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5478|      0|      }
 5479|  8.09k|      break;
 5480|       |
 5481|  8.09k|    case XML_ROLE_CONTENT_ANY:
  ------------------
  |  Branch (5481:5): [True: 1.70k, False: 5.21M]
  ------------------
 5482|  1.73k|    case XML_ROLE_CONTENT_EMPTY:
  ------------------
  |  Branch (5482:5): [True: 34, False: 5.21M]
  ------------------
 5483|  1.73k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5483:11): [True: 0, False: 1.73k]
  ------------------
 5484|      0|        if (parser->m_elementDeclHandler) {
  ------------------
  |  Branch (5484:13): [True: 0, False: 0]
  ------------------
 5485|      0|          XML_Content *content
 5486|      0|              = (XML_Content *)MALLOC(parser, sizeof(XML_Content));
  ------------------
  |  |  714|      0|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5487|      0|          if (! content)
  ------------------
  |  Branch (5487:15): [True: 0, False: 0]
  ------------------
 5488|      0|            return XML_ERROR_NO_MEMORY;
 5489|      0|          content->quant = XML_CQUANT_NONE;
 5490|      0|          content->name = NULL;
 5491|      0|          content->numchildren = 0;
 5492|      0|          content->children = NULL;
 5493|      0|          content->type = ((role == XML_ROLE_CONTENT_ANY) ? XML_CTYPE_ANY
  ------------------
  |  Branch (5493:28): [True: 0, False: 0]
  ------------------
 5494|      0|                                                          : XML_CTYPE_EMPTY);
 5495|      0|          *eventEndPP = s;
 5496|      0|          parser->m_elementDeclHandler(
 5497|      0|              parser->m_handlerArg, parser->m_declElementType->name, content);
 5498|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5499|      0|        }
 5500|      0|        dtd->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5501|      0|      }
 5502|  1.73k|      break;
 5503|       |
 5504|  2.07k|    case XML_ROLE_CONTENT_PCDATA:
  ------------------
  |  Branch (5504:5): [True: 2.07k, False: 5.21M]
  ------------------
 5505|  2.07k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5505:11): [True: 0, False: 2.07k]
  ------------------
 5506|      0|        dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel - 1]].type
 5507|      0|            = XML_CTYPE_MIXED;
 5508|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5508:13): [True: 0, False: 0]
  ------------------
 5509|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5510|      0|      }
 5511|  2.07k|      break;
 5512|       |
 5513|  20.5k|    case XML_ROLE_CONTENT_ELEMENT:
  ------------------
  |  Branch (5513:5): [True: 20.5k, False: 5.19M]
  ------------------
 5514|  20.5k|      quant = XML_CQUANT_NONE;
 5515|  20.5k|      goto elementContent;
 5516|  1.23k|    case XML_ROLE_CONTENT_ELEMENT_OPT:
  ------------------
  |  Branch (5516:5): [True: 1.23k, False: 5.21M]
  ------------------
 5517|  1.23k|      quant = XML_CQUANT_OPT;
 5518|  1.23k|      goto elementContent;
 5519|  1.07k|    case XML_ROLE_CONTENT_ELEMENT_REP:
  ------------------
  |  Branch (5519:5): [True: 1.07k, False: 5.21M]
  ------------------
 5520|  1.07k|      quant = XML_CQUANT_REP;
 5521|  1.07k|      goto elementContent;
 5522|  2.97k|    case XML_ROLE_CONTENT_ELEMENT_PLUS:
  ------------------
  |  Branch (5522:5): [True: 2.97k, False: 5.21M]
  ------------------
 5523|  2.97k|      quant = XML_CQUANT_PLUS;
 5524|  25.8k|    elementContent:
 5525|  25.8k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5525:11): [True: 0, False: 25.8k]
  ------------------
 5526|      0|        ELEMENT_TYPE *el;
 5527|      0|        const XML_Char *name;
 5528|      0|        size_t nameLen;
 5529|      0|        const char *nxt
 5530|      0|            = (quant == XML_CQUANT_NONE ? next : next - enc->minBytesPerChar);
  ------------------
  |  Branch (5530:16): [True: 0, False: 0]
  ------------------
 5531|      0|        int myindex = nextScaffoldPart(parser);
 5532|      0|        if (myindex < 0)
  ------------------
  |  Branch (5532:13): [True: 0, False: 0]
  ------------------
 5533|      0|          return XML_ERROR_NO_MEMORY;
 5534|      0|        dtd->scaffold[myindex].type = XML_CTYPE_NAME;
 5535|      0|        dtd->scaffold[myindex].quant = quant;
 5536|      0|        el = getElementType(parser, enc, s, nxt);
 5537|      0|        if (! el)
  ------------------
  |  Branch (5537:13): [True: 0, False: 0]
  ------------------
 5538|      0|          return XML_ERROR_NO_MEMORY;
 5539|      0|        name = el->name;
 5540|      0|        dtd->scaffold[myindex].name = name;
 5541|      0|        nameLen = 0;
 5542|      0|        for (; name[nameLen++];)
  ------------------
  |  Branch (5542:16): [True: 0, False: 0]
  ------------------
 5543|      0|          ;
 5544|       |
 5545|       |        /* Detect and prevent integer overflow */
 5546|      0|        if (nameLen > UINT_MAX - dtd->contentStringLen) {
  ------------------
  |  Branch (5546:13): [True: 0, False: 0]
  ------------------
 5547|      0|          return XML_ERROR_NO_MEMORY;
 5548|      0|        }
 5549|       |
 5550|      0|        dtd->contentStringLen += (unsigned)nameLen;
 5551|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5551:13): [True: 0, False: 0]
  ------------------
 5552|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5553|      0|      }
 5554|  25.8k|      break;
 5555|       |
 5556|   107k|    case XML_ROLE_GROUP_CLOSE:
  ------------------
  |  Branch (5556:5): [True: 107k, False: 5.10M]
  ------------------
 5557|   107k|      quant = XML_CQUANT_NONE;
 5558|   107k|      goto closeGroup;
 5559|  1.98k|    case XML_ROLE_GROUP_CLOSE_OPT:
  ------------------
  |  Branch (5559:5): [True: 1.98k, False: 5.21M]
  ------------------
 5560|  1.98k|      quant = XML_CQUANT_OPT;
 5561|  1.98k|      goto closeGroup;
 5562|  9.13k|    case XML_ROLE_GROUP_CLOSE_REP:
  ------------------
  |  Branch (5562:5): [True: 9.13k, False: 5.20M]
  ------------------
 5563|  9.13k|      quant = XML_CQUANT_REP;
 5564|  9.13k|      goto closeGroup;
 5565|  88.0k|    case XML_ROLE_GROUP_CLOSE_PLUS:
  ------------------
  |  Branch (5565:5): [True: 88.0k, False: 5.12M]
  ------------------
 5566|  88.0k|      quant = XML_CQUANT_PLUS;
 5567|   206k|    closeGroup:
 5568|   206k|      if (dtd->in_eldecl) {
  ------------------
  |  Branch (5568:11): [True: 0, False: 206k]
  ------------------
 5569|      0|        if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5569:13): [True: 0, False: 0]
  ------------------
 5570|      0|          handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5571|      0|        dtd->scaffLevel--;
 5572|      0|        dtd->scaffold[dtd->scaffIndex[dtd->scaffLevel]].quant = quant;
 5573|      0|        if (dtd->scaffLevel == 0) {
  ------------------
  |  Branch (5573:13): [True: 0, False: 0]
  ------------------
 5574|      0|          if (! handleDefault) {
  ------------------
  |  Branch (5574:15): [True: 0, False: 0]
  ------------------
 5575|      0|            XML_Content *model = build_model(parser);
 5576|      0|            if (! model)
  ------------------
  |  Branch (5576:17): [True: 0, False: 0]
  ------------------
 5577|      0|              return XML_ERROR_NO_MEMORY;
 5578|      0|            *eventEndPP = s;
 5579|      0|            parser->m_elementDeclHandler(
 5580|      0|                parser->m_handlerArg, parser->m_declElementType->name, model);
 5581|      0|          }
 5582|      0|          dtd->in_eldecl = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5583|      0|          dtd->contentStringLen = 0;
 5584|      0|        }
 5585|      0|      }
 5586|   206k|      break;
 5587|       |      /* End element declaration stuff */
 5588|       |
 5589|   206k|    case XML_ROLE_PI:
  ------------------
  |  Branch (5589:5): [True: 7.44k, False: 5.20M]
  ------------------
 5590|  7.44k|      if (! reportProcessingInstruction(parser, enc, s, next))
  ------------------
  |  Branch (5590:11): [True: 0, False: 7.44k]
  ------------------
 5591|      0|        return XML_ERROR_NO_MEMORY;
 5592|  7.44k|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|  7.44k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5593|  7.44k|      break;
 5594|  1.16k|    case XML_ROLE_COMMENT:
  ------------------
  |  Branch (5594:5): [True: 1.16k, False: 5.21M]
  ------------------
 5595|  1.16k|      if (! reportComment(parser, enc, s, next))
  ------------------
  |  Branch (5595:11): [True: 0, False: 1.16k]
  ------------------
 5596|      0|        return XML_ERROR_NO_MEMORY;
 5597|  1.16k|      handleDefault = XML_FALSE;
  ------------------
  |  |   56|  1.16k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5598|  1.16k|      break;
 5599|  8.66k|    case XML_ROLE_NONE:
  ------------------
  |  Branch (5599:5): [True: 8.66k, False: 5.20M]
  ------------------
 5600|  8.66k|      switch (tok) {
  ------------------
  |  Branch (5600:15): [True: 6.87k, False: 1.78k]
  ------------------
 5601|  1.78k|      case XML_TOK_BOM:
  ------------------
  |  |   79|  1.78k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
  |  Branch (5601:7): [True: 1.78k, False: 6.87k]
  ------------------
 5602|  1.78k|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|  1.78k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5603|  1.78k|        break;
 5604|  8.66k|      }
 5605|  8.66k|      break;
 5606|  17.8k|    case XML_ROLE_DOCTYPE_NONE:
  ------------------
  |  Branch (5606:5): [True: 17.8k, False: 5.19M]
  ------------------
 5607|  17.8k|      if (parser->m_startDoctypeDeclHandler)
  ------------------
  |  Branch (5607:11): [True: 0, False: 17.8k]
  ------------------
 5608|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5609|  17.8k|      break;
 5610|  70.4k|    case XML_ROLE_ENTITY_NONE:
  ------------------
  |  Branch (5610:5): [True: 70.4k, False: 5.14M]
  ------------------
 5611|  70.4k|      if (dtd->keepProcessing && parser->m_entityDeclHandler)
  ------------------
  |  Branch (5611:11): [True: 60.5k, False: 9.86k]
  |  Branch (5611:34): [True: 0, False: 60.5k]
  ------------------
 5612|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5613|  70.4k|      break;
 5614|  8.22k|    case XML_ROLE_NOTATION_NONE:
  ------------------
  |  Branch (5614:5): [True: 8.22k, False: 5.20M]
  ------------------
 5615|  8.22k|      if (parser->m_notationDeclHandler)
  ------------------
  |  Branch (5615:11): [True: 0, False: 8.22k]
  ------------------
 5616|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5617|  8.22k|      break;
 5618|  94.3k|    case XML_ROLE_ATTLIST_NONE:
  ------------------
  |  Branch (5618:5): [True: 94.3k, False: 5.12M]
  ------------------
 5619|  94.3k|      if (dtd->keepProcessing && parser->m_attlistDeclHandler)
  ------------------
  |  Branch (5619:11): [True: 91.6k, False: 2.70k]
  |  Branch (5619:34): [True: 0, False: 91.6k]
  ------------------
 5620|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5621|  94.3k|      break;
 5622|  95.0k|    case XML_ROLE_ELEMENT_NONE:
  ------------------
  |  Branch (5622:5): [True: 95.0k, False: 5.12M]
  ------------------
 5623|  95.0k|      if (parser->m_elementDeclHandler)
  ------------------
  |  Branch (5623:11): [True: 0, False: 95.0k]
  ------------------
 5624|      0|        handleDefault = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5625|  95.0k|      break;
 5626|  5.21M|    } /* end of big switch */
 5627|       |
 5628|  5.20M|    if (handleDefault && parser->m_defaultHandler)
  ------------------
  |  Branch (5628:9): [True: 5.19M, False: 10.4k]
  |  Branch (5628:26): [True: 0, False: 5.19M]
  ------------------
 5629|      0|      reportDefault(parser, enc, s, next);
 5630|       |
 5631|  5.20M|    switch (parser->m_parsingStatus.parsing) {
 5632|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (5632:5): [True: 0, False: 5.20M]
  ------------------
 5633|      0|      *nextPtr = next;
 5634|      0|      return XML_ERROR_NONE;
 5635|      0|    case XML_FINISHED:
  ------------------
  |  Branch (5635:5): [True: 0, False: 5.20M]
  ------------------
 5636|      0|      return XML_ERROR_ABORTED;
 5637|  5.20M|    default:
  ------------------
  |  Branch (5637:5): [True: 5.20M, False: 0]
  ------------------
 5638|  5.20M|      s = next;
 5639|  5.20M|      tok = XmlPrologTok(enc, s, end, &next);
  ------------------
  |  |  227|  5.20M|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  5.20M|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5640|  5.20M|    }
 5641|  5.20M|  }
 5642|       |  /* not reached */
 5643|  19.9k|}
xmlparse.c:accountingDiffTolerated:
 7737|   120M|                        enum XML_Account account) {
 7738|       |  /* Note: We need to check the token type *first* to be sure that
 7739|       |   *       we can even access variable <after>, safely.
 7740|       |   *       E.g. for XML_TOK_NONE <after> may hold an invalid pointer. */
 7741|   120M|  switch (tok) {
  ------------------
  |  Branch (7741:11): [True: 117M, False: 3.00M]
  ------------------
 7742|  2.32k|  case XML_TOK_INVALID:
  ------------------
  |  |   57|  2.32k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (7742:3): [True: 2.32k, False: 120M]
  ------------------
 7743|  4.93k|  case XML_TOK_PARTIAL:
  ------------------
  |  |   56|  4.93k|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (7743:3): [True: 2.61k, False: 120M]
  ------------------
 7744|  5.35k|  case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|  5.35k|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (7744:3): [True: 422, False: 120M]
  ------------------
 7745|  3.00M|  case XML_TOK_NONE:
  ------------------
  |  |   51|  3.00M|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (7745:3): [True: 3.00M, False: 117M]
  ------------------
 7746|  3.00M|    return XML_TRUE;
  ------------------
  |  |   55|  3.00M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7747|   120M|  }
 7748|       |
 7749|   117M|  if (account == XML_ACCOUNT_NONE)
  ------------------
  |  Branch (7749:7): [True: 1.73M, False: 116M]
  ------------------
 7750|  1.73M|    return XML_TRUE; /* because these bytes have been accounted for, already */
  ------------------
  |  |   55|  1.73M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7751|       |
 7752|   116M|  unsigned int levelsAwayFromRootParser;
 7753|   116M|  const XML_Parser rootParser
 7754|   116M|      = getRootParserOf(originParser, &levelsAwayFromRootParser);
 7755|   116M|  assert(! rootParser->m_parentParser);
 7756|       |
 7757|      0|  const int isDirect
 7758|   116M|      = (account == XML_ACCOUNT_DIRECT) && (originParser == rootParser);
  ------------------
  |  Branch (7758:9): [True: 6.99M, False: 109M]
  |  Branch (7758:44): [True: 6.99M, False: 0]
  ------------------
 7759|   116M|  const ptrdiff_t bytesMore = after - before;
 7760|       |
 7761|   116M|  XmlBigCount *const additionTarget
 7762|   116M|      = isDirect ? &rootParser->m_accounting.countBytesDirect
  ------------------
  |  Branch (7762:9): [True: 6.99M, False: 109M]
  ------------------
 7763|   116M|                 : &rootParser->m_accounting.countBytesIndirect;
 7764|       |
 7765|       |  /* Detect and avoid integer overflow */
 7766|   116M|  if (*additionTarget > (XmlBigCount)(-1) - (XmlBigCount)bytesMore)
  ------------------
  |  Branch (7766:7): [True: 0, False: 116M]
  ------------------
 7767|      0|    return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7768|   116M|  *additionTarget += bytesMore;
 7769|       |
 7770|   116M|  const XmlBigCount countBytesOutput
 7771|   116M|      = rootParser->m_accounting.countBytesDirect
 7772|   116M|        + rootParser->m_accounting.countBytesIndirect;
 7773|   116M|  const float amplificationFactor
 7774|   116M|      = accountingGetCurrentAmplification(rootParser);
 7775|   116M|  const XML_Bool tolerated
 7776|   116M|      = (countBytesOutput < rootParser->m_accounting.activationThresholdBytes)
  ------------------
  |  Branch (7776:9): [True: 59.9M, False: 56.2M]
  ------------------
 7777|   116M|        || (amplificationFactor
  ------------------
  |  Branch (7777:12): [True: 56.2M, False: 55]
  ------------------
 7778|  56.2M|            <= rootParser->m_accounting.maximumAmplificationFactor);
 7779|       |
 7780|   116M|  if (rootParser->m_accounting.debugLevel >= 2u) {
  ------------------
  |  Branch (7780:7): [True: 0, False: 116M]
  ------------------
 7781|      0|    accountingReportStats(rootParser, "");
 7782|      0|    accountingReportDiff(rootParser, levelsAwayFromRootParser, before, after,
 7783|      0|                         bytesMore, source_line, account);
 7784|      0|  }
 7785|       |
 7786|   116M|  return tolerated;
 7787|   116M|}
xmlparse.c:getRootParserOf:
 7852|   122M|getRootParserOf(XML_Parser parser, unsigned int *outLevelDiff) {
 7853|   122M|  XML_Parser rootParser = parser;
 7854|   122M|  unsigned int stepsTakenUpwards = 0;
 7855|   122M|  while (rootParser->m_parentParser) {
  ------------------
  |  Branch (7855:10): [True: 0, False: 122M]
  ------------------
 7856|      0|    rootParser = rootParser->m_parentParser;
 7857|      0|    stepsTakenUpwards++;
 7858|      0|  }
 7859|   122M|  assert(! rootParser->m_parentParser);
 7860|   122M|  if (outLevelDiff != NULL) {
  ------------------
  |  Branch (7860:7): [True: 116M, False: 6.01M]
  ------------------
 7861|   116M|    *outLevelDiff = stepsTakenUpwards;
 7862|   116M|  }
 7863|   122M|  return rootParser;
 7864|   122M|}
xmlparse.c:accountingGetCurrentAmplification:
 7660|   116M|accountingGetCurrentAmplification(XML_Parser rootParser) {
 7661|   116M|  const XmlBigCount countBytesOutput
 7662|   116M|      = rootParser->m_accounting.countBytesDirect
 7663|   116M|        + rootParser->m_accounting.countBytesIndirect;
 7664|   116M|  const float amplificationFactor
 7665|   116M|      = rootParser->m_accounting.countBytesDirect
  ------------------
  |  Branch (7665:9): [True: 116M, False: 0]
  ------------------
 7666|   116M|            ? (countBytesOutput
 7667|   116M|               / (float)(rootParser->m_accounting.countBytesDirect))
 7668|   116M|            : 1.0f;
 7669|   116M|  assert(! rootParser->m_parentParser);
 7670|      0|  return amplificationFactor;
 7671|   116M|}
xmlparse.c:accountingReportStats:
 7674|     54|accountingReportStats(XML_Parser originParser, const char *epilog) {
 7675|     54|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7676|     54|  assert(! rootParser->m_parentParser);
 7677|       |
 7678|     54|  if (rootParser->m_accounting.debugLevel == 0u) {
  ------------------
  |  Branch (7678:7): [True: 54, False: 0]
  ------------------
 7679|     54|    return;
 7680|     54|  }
 7681|       |
 7682|      0|  const float amplificationFactor
 7683|      0|      = accountingGetCurrentAmplification(rootParser);
 7684|      0|  fprintf(stderr,
 7685|      0|          "expat: Accounting(%p): Direct " EXPAT_FMT_ULL(
 7686|      0|              "10") ", indirect " EXPAT_FMT_ULL("10") ", amplification %8.2f%s",
 7687|      0|          (void *)rootParser, rootParser->m_accounting.countBytesDirect,
 7688|      0|          rootParser->m_accounting.countBytesIndirect,
 7689|      0|          (double)amplificationFactor, epilog);
 7690|      0|}
xmlparse.c:accountingOnAbort:
 7693|     54|accountingOnAbort(XML_Parser originParser) {
 7694|     54|  accountingReportStats(originParser, " ABORTING\n");
 7695|     54|}
xmlparse.c:processXmlDecl:
 4280|    357|               const char *next) {
 4281|    357|  const char *encodingName = NULL;
 4282|    357|  const XML_Char *storedEncName = NULL;
 4283|    357|  const ENCODING *newEncoding = NULL;
 4284|    357|  const char *version = NULL;
 4285|    357|  const char *versionend = NULL;
 4286|    357|  const XML_Char *storedversion = NULL;
 4287|    357|  int standalone = -1;
 4288|       |
 4289|    357|#ifdef XML_DTD
 4290|    357|  if (! accountingDiffTolerated(parser, XML_TOK_XML_DECL, s, next, __LINE__,
  ------------------
  |  |   77|    357|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (4290:7): [True: 0, False: 357]
  ------------------
 4291|    357|                                XML_ACCOUNT_DIRECT)) {
 4292|      0|    accountingOnAbort(parser);
 4293|      0|    return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4294|      0|  }
 4295|    357|#endif
 4296|       |
 4297|    357|  if (! (parser->m_ns ? XmlParseXmlDeclNS : XmlParseXmlDecl)(
  ------------------
  |  Branch (4297:7): [True: 264, False: 93]
  |  Branch (4297:10): [True: 0, False: 357]
  ------------------
 4298|    357|          isGeneralTextEntity, parser->m_encoding, s, next, &parser->m_eventPtr,
 4299|    357|          &version, &versionend, &encodingName, &newEncoding, &standalone)) {
 4300|    264|    if (isGeneralTextEntity)
  ------------------
  |  Branch (4300:9): [True: 0, False: 264]
  ------------------
 4301|      0|      return XML_ERROR_TEXT_DECL;
 4302|    264|    else
 4303|    264|      return XML_ERROR_XML_DECL;
 4304|    264|  }
 4305|     93|  if (! isGeneralTextEntity && standalone == 1) {
  ------------------
  |  Branch (4305:7): [True: 93, False: 0]
  |  Branch (4305:32): [True: 28, False: 65]
  ------------------
 4306|     28|    parser->m_dtd->standalone = XML_TRUE;
  ------------------
  |  |   55|     28|#define XML_TRUE ((XML_Bool)1)
  ------------------
 4307|     28|#ifdef XML_DTD
 4308|     28|    if (parser->m_paramEntityParsing
  ------------------
  |  Branch (4308:9): [True: 0, False: 28]
  ------------------
 4309|     28|        == XML_PARAM_ENTITY_PARSING_UNLESS_STANDALONE)
 4310|      0|      parser->m_paramEntityParsing = XML_PARAM_ENTITY_PARSING_NEVER;
 4311|     28|#endif /* XML_DTD */
 4312|     28|  }
 4313|     93|  if (parser->m_xmlDeclHandler) {
  ------------------
  |  Branch (4313:7): [True: 0, False: 93]
  ------------------
 4314|      0|    if (encodingName != NULL) {
  ------------------
  |  Branch (4314:9): [True: 0, False: 0]
  ------------------
 4315|      0|      storedEncName = poolStoreString(
 4316|      0|          &parser->m_temp2Pool, parser->m_encoding, encodingName,
 4317|      0|          encodingName + XmlNameLength(parser->m_encoding, encodingName));
  ------------------
  |  |  257|      0|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 4318|      0|      if (! storedEncName)
  ------------------
  |  Branch (4318:11): [True: 0, False: 0]
  ------------------
 4319|      0|        return XML_ERROR_NO_MEMORY;
 4320|      0|      poolFinish(&parser->m_temp2Pool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 4321|      0|    }
 4322|      0|    if (version) {
  ------------------
  |  Branch (4322:9): [True: 0, False: 0]
  ------------------
 4323|      0|      storedversion
 4324|      0|          = poolStoreString(&parser->m_temp2Pool, parser->m_encoding, version,
 4325|      0|                            versionend - parser->m_encoding->minBytesPerChar);
 4326|      0|      if (! storedversion)
  ------------------
  |  Branch (4326:11): [True: 0, False: 0]
  ------------------
 4327|      0|        return XML_ERROR_NO_MEMORY;
 4328|      0|    }
 4329|      0|    parser->m_xmlDeclHandler(parser->m_handlerArg, storedversion, storedEncName,
 4330|      0|                             standalone);
 4331|     93|  } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4331:14): [True: 0, False: 93]
  ------------------
 4332|      0|    reportDefault(parser, parser->m_encoding, s, next);
 4333|     93|  if (parser->m_protocolEncodingName == NULL) {
  ------------------
  |  Branch (4333:7): [True: 0, False: 93]
  ------------------
 4334|      0|    if (newEncoding) {
  ------------------
  |  Branch (4334:9): [True: 0, False: 0]
  ------------------
 4335|       |      /* Check that the specified encoding does not conflict with what
 4336|       |       * the parser has already deduced.  Do we have the same number
 4337|       |       * of bytes in the smallest representation of a character?  If
 4338|       |       * this is UTF-16, is it the same endianness?
 4339|       |       */
 4340|      0|      if (newEncoding->minBytesPerChar != parser->m_encoding->minBytesPerChar
  ------------------
  |  Branch (4340:11): [True: 0, False: 0]
  ------------------
 4341|      0|          || (newEncoding->minBytesPerChar == 2
  ------------------
  |  Branch (4341:15): [True: 0, False: 0]
  ------------------
 4342|      0|              && newEncoding != parser->m_encoding)) {
  ------------------
  |  Branch (4342:18): [True: 0, False: 0]
  ------------------
 4343|      0|        parser->m_eventPtr = encodingName;
 4344|      0|        return XML_ERROR_INCORRECT_ENCODING;
 4345|      0|      }
 4346|      0|      parser->m_encoding = newEncoding;
 4347|      0|    } else if (encodingName) {
  ------------------
  |  Branch (4347:16): [True: 0, False: 0]
  ------------------
 4348|      0|      enum XML_Error result;
 4349|      0|      if (! storedEncName) {
  ------------------
  |  Branch (4349:11): [True: 0, False: 0]
  ------------------
 4350|      0|        storedEncName = poolStoreString(
 4351|      0|            &parser->m_temp2Pool, parser->m_encoding, encodingName,
 4352|      0|            encodingName + XmlNameLength(parser->m_encoding, encodingName));
  ------------------
  |  |  257|      0|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 4353|      0|        if (! storedEncName)
  ------------------
  |  Branch (4353:13): [True: 0, False: 0]
  ------------------
 4354|      0|          return XML_ERROR_NO_MEMORY;
 4355|      0|      }
 4356|      0|      result = handleUnknownEncoding(parser, storedEncName);
 4357|      0|      poolClear(&parser->m_temp2Pool);
 4358|      0|      if (result == XML_ERROR_UNKNOWN_ENCODING)
  ------------------
  |  Branch (4358:11): [True: 0, False: 0]
  ------------------
 4359|      0|        parser->m_eventPtr = encodingName;
 4360|      0|      return result;
 4361|      0|    }
 4362|      0|  }
 4363|       |
 4364|     93|  if (storedEncName || storedversion)
  ------------------
  |  Branch (4364:7): [True: 0, False: 93]
  |  Branch (4364:24): [True: 0, False: 93]
  ------------------
 4365|      0|    poolClear(&parser->m_temp2Pool);
 4366|       |
 4367|     93|  return XML_ERROR_NONE;
 4368|     93|}
xmlparse.c:poolStoreString:
 7284|  3.10M|                const char *end) {
 7285|  3.10M|  if (! poolAppend(pool, enc, ptr, end))
  ------------------
  |  Branch (7285:7): [True: 0, False: 3.10M]
  ------------------
 7286|      0|    return NULL;
 7287|  3.10M|  if (pool->ptr == pool->end && ! poolGrow(pool))
  ------------------
  |  Branch (7287:7): [True: 237, False: 3.10M]
  |  Branch (7287:33): [True: 0, False: 237]
  ------------------
 7288|      0|    return NULL;
 7289|  3.10M|  *(pool->ptr)++ = 0;
 7290|  3.10M|  return pool->start;
 7291|  3.10M|}
xmlparse.c:lookup:
 7043|  6.52M|lookup(XML_Parser parser, HASH_TABLE *table, KEY name, size_t createSize) {
 7044|  6.52M|  size_t i;
 7045|  6.52M|  if (table->size == 0) {
  ------------------
  |  Branch (7045:7): [True: 39.5k, False: 6.48M]
  ------------------
 7046|  39.5k|    size_t tsize;
 7047|  39.5k|    if (! createSize)
  ------------------
  |  Branch (7047:9): [True: 21.8k, False: 17.6k]
  ------------------
 7048|  21.8k|      return NULL;
 7049|  17.6k|    table->power = INIT_POWER;
  ------------------
  |  | 7007|  17.6k|#define INIT_POWER 6
  ------------------
 7050|       |    /* table->size is a power of 2 */
 7051|  17.6k|    table->size = (size_t)1 << INIT_POWER;
  ------------------
  |  | 7007|  17.6k|#define INIT_POWER 6
  ------------------
 7052|  17.6k|    tsize = table->size * sizeof(NAMED *);
 7053|  17.6k|    table->v = table->mem->malloc_fcn(tsize);
 7054|  17.6k|    if (! table->v) {
  ------------------
  |  Branch (7054:9): [True: 0, False: 17.6k]
  ------------------
 7055|      0|      table->size = 0;
 7056|      0|      return NULL;
 7057|      0|    }
 7058|  17.6k|    memset(table->v, 0, tsize);
 7059|  17.6k|    i = hash(parser, name) & ((unsigned long)table->size - 1);
 7060|  6.48M|  } else {
 7061|  6.48M|    unsigned long h = hash(parser, name);
 7062|  6.48M|    unsigned long mask = (unsigned long)table->size - 1;
 7063|  6.48M|    unsigned char step = 0;
 7064|  6.48M|    i = h & mask;
 7065|  6.84M|    while (table->v[i]) {
  ------------------
  |  Branch (7065:12): [True: 6.80M, False: 33.2k]
  ------------------
 7066|  6.80M|      if (keyeq(name, table->v[i]->name))
  ------------------
  |  Branch (7066:11): [True: 6.45M, False: 353k]
  ------------------
 7067|  6.45M|        return table->v[i];
 7068|   353k|      if (! step)
  ------------------
  |  Branch (7068:11): [True: 345k, False: 7.83k]
  ------------------
 7069|   345k|        step = PROBE_STEP(h, mask, table->power);
  ------------------
  |  |  235|   345k|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  233|   345k|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7070|   353k|      i < step ? (i += table->size - step) : (i -= step);
  ------------------
  |  Branch (7070:7): [True: 5.45k, False: 347k]
  ------------------
 7071|   353k|    }
 7072|  33.2k|    if (! createSize)
  ------------------
  |  Branch (7072:9): [True: 10.5k, False: 22.6k]
  ------------------
 7073|  10.5k|      return NULL;
 7074|       |
 7075|       |    /* check for overflow (table is half full) */
 7076|  22.6k|    if (table->used >> (table->power - 1)) {
  ------------------
  |  Branch (7076:9): [True: 246, False: 22.3k]
  ------------------
 7077|    246|      unsigned char newPower = table->power + 1;
 7078|       |
 7079|       |      /* Detect and prevent invalid shift */
 7080|    246|      if (newPower >= sizeof(unsigned long) * 8 /* bits per byte */) {
  ------------------
  |  Branch (7080:11): [True: 0, False: 246]
  ------------------
 7081|      0|        return NULL;
 7082|      0|      }
 7083|       |
 7084|    246|      size_t newSize = (size_t)1 << newPower;
 7085|    246|      unsigned long newMask = (unsigned long)newSize - 1;
 7086|       |
 7087|       |      /* Detect and prevent integer overflow */
 7088|    246|      if (newSize > (size_t)(-1) / sizeof(NAMED *)) {
  ------------------
  |  Branch (7088:11): [True: 0, False: 246]
  ------------------
 7089|      0|        return NULL;
 7090|      0|      }
 7091|       |
 7092|    246|      size_t tsize = newSize * sizeof(NAMED *);
 7093|    246|      NAMED **newV = table->mem->malloc_fcn(tsize);
 7094|    246|      if (! newV)
  ------------------
  |  Branch (7094:11): [True: 0, False: 246]
  ------------------
 7095|      0|        return NULL;
 7096|    246|      memset(newV, 0, tsize);
 7097|  33.4k|      for (i = 0; i < table->size; i++)
  ------------------
  |  Branch (7097:19): [True: 33.2k, False: 246]
  ------------------
 7098|  33.2k|        if (table->v[i]) {
  ------------------
  |  Branch (7098:13): [True: 16.6k, False: 16.6k]
  ------------------
 7099|  16.6k|          unsigned long newHash = hash(parser, table->v[i]->name);
 7100|  16.6k|          size_t j = newHash & newMask;
 7101|  16.6k|          step = 0;
 7102|  19.4k|          while (newV[j]) {
  ------------------
  |  Branch (7102:18): [True: 2.88k, False: 16.6k]
  ------------------
 7103|  2.88k|            if (! step)
  ------------------
  |  Branch (7103:17): [True: 2.29k, False: 589]
  ------------------
 7104|  2.29k|              step = PROBE_STEP(newHash, newMask, newPower);
  ------------------
  |  |  235|  2.29k|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  233|  2.29k|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7105|  2.88k|            j < step ? (j += newSize - step) : (j -= step);
  ------------------
  |  Branch (7105:13): [True: 372, False: 2.51k]
  ------------------
 7106|  2.88k|          }
 7107|  16.6k|          newV[j] = table->v[i];
 7108|  16.6k|        }
 7109|    246|      table->mem->free_fcn(table->v);
 7110|    246|      table->v = newV;
 7111|    246|      table->power = newPower;
 7112|    246|      table->size = newSize;
 7113|    246|      i = h & newMask;
 7114|    246|      step = 0;
 7115|    402|      while (table->v[i]) {
  ------------------
  |  Branch (7115:14): [True: 156, False: 246]
  ------------------
 7116|    156|        if (! step)
  ------------------
  |  Branch (7116:13): [True: 85, False: 71]
  ------------------
 7117|     85|          step = PROBE_STEP(h, newMask, newPower);
  ------------------
  |  |  235|     85|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  233|     85|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 7118|    156|        i < step ? (i += newSize - step) : (i -= step);
  ------------------
  |  Branch (7118:9): [True: 27, False: 129]
  ------------------
 7119|    156|      }
 7120|    246|    }
 7121|  22.6k|  }
 7122|  40.3k|  table->v[i] = table->mem->malloc_fcn(createSize);
 7123|  40.3k|  if (! table->v[i])
  ------------------
  |  Branch (7123:7): [True: 0, False: 40.3k]
  ------------------
 7124|      0|    return NULL;
 7125|  40.3k|  memset(table->v[i], 0, createSize);
 7126|  40.3k|  table->v[i]->name = name;
 7127|  40.3k|  (table->used)++;
 7128|  40.3k|  return table->v[i];
 7129|  40.3k|}
xmlparse.c:hash:
 7032|  6.52M|hash(XML_Parser parser, KEY s) {
 7033|  6.52M|  struct siphash state;
 7034|  6.52M|  struct sipkey key;
 7035|  6.52M|  (void)sip24_valid;
 7036|  6.52M|  copy_salt_to_sipkey(parser, &key);
 7037|  6.52M|  sip24_init(&state, &key);
 7038|  6.52M|  sip24_update(&state, s, keylen(s) * sizeof(XML_Char));
 7039|  6.52M|  return (unsigned long)sip24_final(&state);
 7040|  6.52M|}
xmlparse.c:copy_salt_to_sipkey:
 7026|  6.52M|copy_salt_to_sipkey(XML_Parser parser, struct sipkey *key) {
 7027|  6.52M|  key->k[0] = 0;
 7028|  6.52M|  key->k[1] = get_hash_secret_salt(parser);
 7029|  6.52M|}
xmlparse.c:get_hash_secret_salt:
  947|  6.52M|get_hash_secret_salt(XML_Parser parser) {
  948|  6.52M|  if (parser->m_parentParser != NULL)
  ------------------
  |  Branch (948:7): [True: 0, False: 6.52M]
  ------------------
  949|      0|    return get_hash_secret_salt(parser->m_parentParser);
  950|  6.52M|  return parser->m_hash_secret_salt;
  951|  6.52M|}
xmlparse.c:keylen:
 7018|  6.52M|keylen(KEY s) {
 7019|  6.52M|  size_t len = 0;
 7020|  32.8M|  for (; *s; s++, len++)
  ------------------
  |  Branch (7020:10): [True: 26.3M, False: 6.52M]
  ------------------
 7021|  26.3M|    ;
 7022|  6.52M|  return len;
 7023|  6.52M|}
xmlparse.c:keyeq:
 7010|  6.80M|keyeq(KEY s1, KEY s2) {
 7011|  28.4M|  for (; *s1 == *s2; s1++, s2++)
  ------------------
  |  Branch (7011:10): [True: 28.0M, False: 353k]
  ------------------
 7012|  28.0M|    if (*s1 == 0)
  ------------------
  |  Branch (7012:9): [True: 6.45M, False: 21.5M]
  ------------------
 7013|  6.45M|      return XML_TRUE;
  ------------------
  |  |   55|  6.45M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7014|   353k|  return XML_FALSE;
  ------------------
  |  |   56|   353k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7015|  6.80M|}
xmlparse.c:normalizePublicId:
 6695|    918|normalizePublicId(XML_Char *publicId) {
 6696|    918|  XML_Char *p = publicId;
 6697|    918|  XML_Char *s;
 6698|  15.7k|  for (s = publicId; *s; s++) {
  ------------------
  |  Branch (6698:22): [True: 14.7k, False: 918]
  ------------------
 6699|  14.7k|    switch (*s) {
 6700|    754|    case 0x20:
  ------------------
  |  Branch (6700:5): [True: 754, False: 14.0k]
  ------------------
 6701|  1.77k|    case 0xD:
  ------------------
  |  Branch (6701:5): [True: 1.01k, False: 13.7k]
  ------------------
 6702|  2.41k|    case 0xA:
  ------------------
  |  Branch (6702:5): [True: 647, False: 14.1k]
  ------------------
 6703|  2.41k|      if (p != publicId && p[-1] != 0x20)
  ------------------
  |  Branch (6703:11): [True: 1.11k, False: 1.30k]
  |  Branch (6703:28): [True: 533, False: 579]
  ------------------
 6704|    533|        *p++ = 0x20;
 6705|  2.41k|      break;
 6706|  12.3k|    default:
  ------------------
  |  Branch (6706:5): [True: 12.3k, False: 2.41k]
  ------------------
 6707|  12.3k|      *p++ = *s;
 6708|  14.7k|    }
 6709|  14.7k|  }
 6710|    918|  if (p != publicId && p[-1] == 0x20)
  ------------------
  |  Branch (6710:7): [True: 640, False: 278]
  |  Branch (6710:24): [True: 80, False: 560]
  ------------------
 6711|     80|    --p;
 6712|    918|  *p = XML_T('\0');
  ------------------
  |  |  191|    918|#  define XML_T(x) x
  ------------------
 6713|    918|}
xmlparse.c:contentProcessor:
 2622|  11.5k|                 const char **endPtr) {
 2623|  11.5k|  enum XML_Error result = doContent(
 2624|  11.5k|      parser, 0, parser->m_encoding, start, end, endPtr,
 2625|  11.5k|      (XML_Bool)! parser->m_parsingStatus.finalBuffer, XML_ACCOUNT_DIRECT);
 2626|  11.5k|  if (result == XML_ERROR_NONE) {
  ------------------
  |  Branch (2626:7): [True: 7.23k, False: 4.33k]
  ------------------
 2627|  7.23k|    if (! storeRawNames(parser))
  ------------------
  |  Branch (2627:9): [True: 0, False: 7.23k]
  ------------------
 2628|      0|      return XML_ERROR_NO_MEMORY;
 2629|  7.23k|  }
 2630|  11.5k|  return result;
 2631|  11.5k|}
xmlparse.c:doContent:
 2752|   892k|          XML_Bool haveMore, enum XML_Account account) {
 2753|       |  /* save one level of indirection */
 2754|   892k|  DTD *const dtd = parser->m_dtd;
 2755|       |
 2756|   892k|  const char **eventPP;
 2757|   892k|  const char **eventEndPP;
 2758|   892k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (2758:7): [True: 11.5k, False: 880k]
  ------------------
 2759|  11.5k|    eventPP = &parser->m_eventPtr;
 2760|  11.5k|    eventEndPP = &parser->m_eventEndPtr;
 2761|   880k|  } else {
 2762|   880k|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 2763|   880k|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 2764|   880k|  }
 2765|   892k|  *eventPP = s;
 2766|       |
 2767|  13.1M|  for (;;) {
 2768|  13.1M|    const char *next = s; /* XmlContentTok doesn't always set the last arg */
 2769|  13.1M|    int tok = XmlContentTok(enc, s, end, &next);
  ------------------
  |  |  230|  13.1M|  XmlTok(enc, XML_CONTENT_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  13.1M|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 2770|  13.1M|#ifdef XML_DTD
 2771|  13.1M|    const char *accountAfter
 2772|  13.1M|        = ((tok == XML_TOK_TRAILING_RSQB) || (tok == XML_TOK_TRAILING_CR))
  ------------------
  |  |   46|  13.1M|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
                      = ((tok == XML_TOK_TRAILING_RSQB) || (tok == XML_TOK_TRAILING_CR))
  ------------------
  |  |   53|  13.0M|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (2772:12): [True: 32.6k, False: 13.0M]
  |  Branch (2772:46): [True: 67, False: 13.0M]
  ------------------
 2773|  13.1M|              ? (haveMore ? s /* i.e. 0 bytes */ : end)
  ------------------
  |  Branch (2773:18): [True: 94, False: 32.6k]
  ------------------
 2774|  13.1M|              : next;
 2775|  13.1M|    if (! accountingDiffTolerated(parser, tok, s, accountAfter, __LINE__,
  ------------------
  |  Branch (2775:9): [True: 3, False: 13.1M]
  ------------------
 2776|  13.1M|                                  account)) {
 2777|      3|      accountingOnAbort(parser);
 2778|      3|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 2779|      3|    }
 2780|  13.1M|#endif
 2781|  13.1M|    *eventEndPP = next;
 2782|  13.1M|    switch (tok) {
 2783|     67|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|     67|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (2783:5): [True: 67, False: 13.1M]
  ------------------
 2784|     67|      if (haveMore) {
  ------------------
  |  Branch (2784:11): [True: 67, False: 0]
  ------------------
 2785|     67|        *nextPtr = s;
 2786|     67|        return XML_ERROR_NONE;
 2787|     67|      }
 2788|      0|      *eventEndPP = end;
 2789|      0|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (2789:11): [True: 0, False: 0]
  ------------------
 2790|      0|        XML_Char c = 0xA;
 2791|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 2792|      0|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2792:18): [True: 0, False: 0]
  ------------------
 2793|      0|        reportDefault(parser, enc, s, end);
 2794|       |      /* We are at the end of the final buffer, should we check for
 2795|       |         XML_SUSPENDED, XML_FINISHED?
 2796|       |      */
 2797|      0|      if (startTagLevel == 0)
  ------------------
  |  Branch (2797:11): [True: 0, False: 0]
  ------------------
 2798|      0|        return XML_ERROR_NO_ELEMENTS;
 2799|      0|      if (parser->m_tagLevel != startTagLevel)
  ------------------
  |  Branch (2799:11): [True: 0, False: 0]
  ------------------
 2800|      0|        return XML_ERROR_ASYNC_ENTITY;
 2801|      0|      *nextPtr = end;
 2802|      0|      return XML_ERROR_NONE;
 2803|   851k|    case XML_TOK_NONE:
  ------------------
  |  |   51|   851k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (2803:5): [True: 851k, False: 12.2M]
  ------------------
 2804|   851k|      if (haveMore) {
  ------------------
  |  Branch (2804:11): [True: 3.85k, False: 847k]
  ------------------
 2805|  3.85k|        *nextPtr = s;
 2806|  3.85k|        return XML_ERROR_NONE;
 2807|  3.85k|      }
 2808|   847k|      if (startTagLevel > 0) {
  ------------------
  |  Branch (2808:11): [True: 847k, False: 0]
  ------------------
 2809|   847k|        if (parser->m_tagLevel != startTagLevel)
  ------------------
  |  Branch (2809:13): [True: 81, False: 847k]
  ------------------
 2810|     81|          return XML_ERROR_ASYNC_ENTITY;
 2811|   847k|        *nextPtr = s;
 2812|   847k|        return XML_ERROR_NONE;
 2813|   847k|      }
 2814|      0|      return XML_ERROR_NO_ELEMENTS;
 2815|  2.14k|    case XML_TOK_INVALID:
  ------------------
  |  |   57|  2.14k|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (2815:5): [True: 2.14k, False: 13.1M]
  ------------------
 2816|  2.14k|      *eventPP = next;
 2817|  2.14k|      return XML_ERROR_INVALID_TOKEN;
 2818|  2.45k|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|  2.45k|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (2818:5): [True: 2.45k, False: 13.1M]
  ------------------
 2819|  2.45k|      if (haveMore) {
  ------------------
  |  Branch (2819:11): [True: 2.26k, False: 192]
  ------------------
 2820|  2.26k|        *nextPtr = s;
 2821|  2.26k|        return XML_ERROR_NONE;
 2822|  2.26k|      }
 2823|    192|      return XML_ERROR_UNCLOSED_TOKEN;
 2824|    295|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|    295|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (2824:5): [True: 295, False: 13.1M]
  ------------------
 2825|    295|      if (haveMore) {
  ------------------
  |  Branch (2825:11): [True: 295, False: 0]
  ------------------
 2826|    295|        *nextPtr = s;
 2827|    295|        return XML_ERROR_NONE;
 2828|    295|      }
 2829|      0|      return XML_ERROR_PARTIAL_CHAR;
 2830|   899k|    case XML_TOK_ENTITY_REF: {
  ------------------
  |  |   70|   899k|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (2830:5): [True: 899k, False: 12.2M]
  ------------------
 2831|   899k|      const XML_Char *name;
 2832|   899k|      ENTITY *entity;
 2833|   899k|      XML_Char ch = (XML_Char)XmlPredefinedEntityName(
  ------------------
  |  |  267|   899k|  (((enc)->predefinedEntityName)(enc, ptr, end))
  ------------------
 2834|   899k|          enc, s + enc->minBytesPerChar, next - enc->minBytesPerChar);
 2835|   899k|      if (ch) {
  ------------------
  |  Branch (2835:11): [True: 3.01k, False: 896k]
  ------------------
 2836|  3.01k|#ifdef XML_DTD
 2837|       |        /* NOTE: We are replacing 4-6 characters original input for 1 character
 2838|       |         *       so there is no amplification and hence recording without
 2839|       |         *       protection. */
 2840|  3.01k|        accountingDiffTolerated(parser, tok, (char *)&ch,
 2841|  3.01k|                                ((char *)&ch) + sizeof(XML_Char), __LINE__,
 2842|  3.01k|                                XML_ACCOUNT_ENTITY_EXPANSION);
 2843|  3.01k|#endif /* XML_DTD */
 2844|  3.01k|        if (parser->m_characterDataHandler)
  ------------------
  |  Branch (2844:13): [True: 0, False: 3.01k]
  ------------------
 2845|      0|          parser->m_characterDataHandler(parser->m_handlerArg, &ch, 1);
 2846|  3.01k|        else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2846:18): [True: 0, False: 3.01k]
  ------------------
 2847|      0|          reportDefault(parser, enc, s, next);
 2848|  3.01k|        break;
 2849|  3.01k|      }
 2850|   896k|      name = poolStoreString(&dtd->pool, enc, s + enc->minBytesPerChar,
 2851|   896k|                             next - enc->minBytesPerChar);
 2852|   896k|      if (! name)
  ------------------
  |  Branch (2852:11): [True: 0, False: 896k]
  ------------------
 2853|      0|        return XML_ERROR_NO_MEMORY;
 2854|   896k|      entity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, 0);
 2855|   896k|      poolDiscard(&dtd->pool);
  ------------------
  |  |  600|   896k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 2856|       |      /* First, determine if a check for an existing declaration is needed;
 2857|       |         if yes, check that the entity exists, and that it is internal,
 2858|       |         otherwise call the skipped entity or default handler.
 2859|       |      */
 2860|   896k|      if (! dtd->hasParamEntityRefs || dtd->standalone) {
  ------------------
  |  Branch (2860:11): [True: 878k, False: 17.1k]
  |  Branch (2860:40): [True: 194, False: 17.0k]
  ------------------
 2861|   879k|        if (! entity)
  ------------------
  |  Branch (2861:13): [True: 399, False: 878k]
  ------------------
 2862|    399|          return XML_ERROR_UNDEFINED_ENTITY;
 2863|   878k|        else if (! entity->is_internal)
  ------------------
  |  Branch (2863:18): [True: 0, False: 878k]
  ------------------
 2864|      0|          return XML_ERROR_ENTITY_DECLARED_IN_PE;
 2865|   879k|      } else if (! entity) {
  ------------------
  |  Branch (2865:18): [True: 14.6k, False: 2.39k]
  ------------------
 2866|  14.6k|        if (parser->m_skippedEntityHandler)
  ------------------
  |  Branch (2866:13): [True: 0, False: 14.6k]
  ------------------
 2867|      0|          parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 2868|  14.6k|        else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2868:18): [True: 0, False: 14.6k]
  ------------------
 2869|      0|          reportDefault(parser, enc, s, next);
 2870|  14.6k|        break;
 2871|  14.6k|      }
 2872|   881k|      if (entity->open)
  ------------------
  |  Branch (2872:11): [True: 5, False: 881k]
  ------------------
 2873|      5|        return XML_ERROR_RECURSIVE_ENTITY_REF;
 2874|   881k|      if (entity->notation)
  ------------------
  |  Branch (2874:11): [True: 1, False: 881k]
  ------------------
 2875|      1|        return XML_ERROR_BINARY_ENTITY_REF;
 2876|   881k|      if (entity->textPtr) {
  ------------------
  |  Branch (2876:11): [True: 880k, False: 198]
  ------------------
 2877|   880k|        enum XML_Error result;
 2878|   880k|        if (! parser->m_defaultExpandInternalEntities) {
  ------------------
  |  Branch (2878:13): [True: 0, False: 880k]
  ------------------
 2879|      0|          if (parser->m_skippedEntityHandler)
  ------------------
  |  Branch (2879:15): [True: 0, False: 0]
  ------------------
 2880|      0|            parser->m_skippedEntityHandler(parser->m_handlerArg, entity->name,
 2881|      0|                                           0);
 2882|      0|          else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2882:20): [True: 0, False: 0]
  ------------------
 2883|      0|            reportDefault(parser, enc, s, next);
 2884|      0|          break;
 2885|      0|        }
 2886|   880k|        result = processInternalEntity(parser, entity, XML_FALSE);
  ------------------
  |  |   56|   880k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2887|   880k|        if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (2887:13): [True: 974, False: 880k]
  ------------------
 2888|    974|          return result;
 2889|   880k|      } else if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (2889:18): [True: 0, False: 198]
  ------------------
 2890|      0|        const XML_Char *context;
 2891|      0|        entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2892|      0|        context = getContext(parser);
 2893|      0|        entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2894|      0|        if (! context)
  ------------------
  |  Branch (2894:13): [True: 0, False: 0]
  ------------------
 2895|      0|          return XML_ERROR_NO_MEMORY;
 2896|      0|        if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (2896:13): [True: 0, False: 0]
  ------------------
 2897|      0|                parser->m_externalEntityRefHandlerArg, context, entity->base,
 2898|      0|                entity->systemId, entity->publicId))
 2899|      0|          return XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 2900|      0|        poolDiscard(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 2901|    198|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2901:18): [True: 0, False: 198]
  ------------------
 2902|      0|        reportDefault(parser, enc, s, next);
 2903|   880k|      break;
 2904|   881k|    }
 2905|  3.40M|    case XML_TOK_START_TAG_NO_ATTS:
  ------------------
  |  |   63|  3.40M|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  |  Branch (2905:5): [True: 3.40M, False: 9.69M]
  ------------------
 2906|       |      /* fall through */
 2907|  3.41M|    case XML_TOK_START_TAG_WITH_ATTS: {
  ------------------
  |  |   62|  3.41M|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  |  Branch (2907:5): [True: 11.3k, False: 13.0M]
  ------------------
 2908|  3.41M|      TAG *tag;
 2909|  3.41M|      enum XML_Error result;
 2910|  3.41M|      XML_Char *toPtr;
 2911|  3.41M|      if (parser->m_freeTagList) {
  ------------------
  |  Branch (2911:11): [True: 151k, False: 3.26M]
  ------------------
 2912|   151k|        tag = parser->m_freeTagList;
 2913|   151k|        parser->m_freeTagList = parser->m_freeTagList->parent;
 2914|  3.26M|      } else {
 2915|  3.26M|        tag = (TAG *)MALLOC(parser, sizeof(TAG));
  ------------------
  |  |  714|  3.26M|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2916|  3.26M|        if (! tag)
  ------------------
  |  Branch (2916:13): [True: 0, False: 3.26M]
  ------------------
 2917|      0|          return XML_ERROR_NO_MEMORY;
 2918|  3.26M|        tag->buf = (char *)MALLOC(parser, INIT_TAG_BUF_SIZE);
  ------------------
  |  |  714|  3.26M|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 2919|  3.26M|        if (! tag->buf) {
  ------------------
  |  Branch (2919:13): [True: 0, False: 3.26M]
  ------------------
 2920|      0|          FREE(parser, tag);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 2921|      0|          return XML_ERROR_NO_MEMORY;
 2922|      0|        }
 2923|  3.26M|        tag->bufEnd = tag->buf + INIT_TAG_BUF_SIZE;
  ------------------
  |  |  242|  3.26M|#define INIT_TAG_BUF_SIZE 32 /* must be a multiple of sizeof(XML_Char) */
  ------------------
 2924|  3.26M|      }
 2925|  3.41M|      tag->bindings = NULL;
 2926|  3.41M|      tag->parent = parser->m_tagStack;
 2927|  3.41M|      parser->m_tagStack = tag;
 2928|  3.41M|      tag->name.localPart = NULL;
 2929|  3.41M|      tag->name.prefix = NULL;
 2930|  3.41M|      tag->rawName = s + enc->minBytesPerChar;
 2931|  3.41M|      tag->rawNameLength = XmlNameLength(enc, tag->rawName);
  ------------------
  |  |  257|  3.41M|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 2932|  3.41M|      ++parser->m_tagLevel;
 2933|  3.41M|      {
 2934|  3.41M|        const char *rawNameEnd = tag->rawName + tag->rawNameLength;
 2935|  3.41M|        const char *fromPtr = tag->rawName;
 2936|  3.41M|        toPtr = (XML_Char *)tag->buf;
 2937|  3.41M|        for (;;) {
 2938|  3.41M|          int bufSize;
 2939|  3.41M|          int convLen;
 2940|  3.41M|          const enum XML_Convert_Result convert_res
 2941|  3.41M|              = XmlConvert(enc, &fromPtr, rawNameEnd, (ICHAR **)&toPtr,
  ------------------
  |  |  161|  3.41M|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|  3.41M|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 2942|  3.41M|                           (ICHAR *)tag->bufEnd - 1);
 2943|  3.41M|          convLen = (int)(toPtr - (XML_Char *)tag->buf);
 2944|  3.41M|          if ((fromPtr >= rawNameEnd)
  ------------------
  |  Branch (2944:15): [True: 3.41M, False: 1.93k]
  ------------------
 2945|  3.41M|              || (convert_res == XML_CONVERT_INPUT_INCOMPLETE)) {
  ------------------
  |  Branch (2945:18): [True: 0, False: 1.93k]
  ------------------
 2946|  3.41M|            tag->name.strLen = convLen;
 2947|  3.41M|            break;
 2948|  3.41M|          }
 2949|  1.93k|          bufSize = (int)(tag->bufEnd - tag->buf) << 1;
 2950|  1.93k|          {
 2951|  1.93k|            char *temp = (char *)REALLOC(parser, tag->buf, bufSize);
  ------------------
  |  |  715|  1.93k|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 2952|  1.93k|            if (temp == NULL)
  ------------------
  |  Branch (2952:17): [True: 0, False: 1.93k]
  ------------------
 2953|      0|              return XML_ERROR_NO_MEMORY;
 2954|  1.93k|            tag->buf = temp;
 2955|  1.93k|            tag->bufEnd = temp + bufSize;
 2956|  1.93k|            toPtr = (XML_Char *)temp + convLen;
 2957|  1.93k|          }
 2958|  1.93k|        }
 2959|  3.41M|      }
 2960|  3.41M|      tag->name.str = (XML_Char *)tag->buf;
 2961|  3.41M|      *toPtr = XML_T('\0');
  ------------------
  |  |  191|  3.41M|#  define XML_T(x) x
  ------------------
 2962|  3.41M|      result
 2963|  3.41M|          = storeAtts(parser, enc, s, &(tag->name), &(tag->bindings), account);
 2964|  3.41M|      if (result)
  ------------------
  |  Branch (2964:11): [True: 691, False: 3.41M]
  ------------------
 2965|    691|        return result;
 2966|  3.41M|      if (parser->m_startElementHandler)
  ------------------
  |  Branch (2966:11): [True: 3.41M, False: 0]
  ------------------
 2967|  3.41M|        parser->m_startElementHandler(parser->m_handlerArg, tag->name.str,
 2968|  3.41M|                                      (const XML_Char **)parser->m_atts);
 2969|      0|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (2969:16): [True: 0, False: 0]
  ------------------
 2970|      0|        reportDefault(parser, enc, s, next);
 2971|  3.41M|      poolClear(&parser->m_tempPool);
 2972|  3.41M|      break;
 2973|  3.41M|    }
 2974|  3.83k|    case XML_TOK_EMPTY_ELEMENT_NO_ATTS:
  ------------------
  |  |   65|  3.83k|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  |  Branch (2974:5): [True: 3.83k, False: 13.0M]
  ------------------
 2975|       |      /* fall through */
 2976|  9.43k|    case XML_TOK_EMPTY_ELEMENT_WITH_ATTS: {
  ------------------
  |  |   64|  9.43k|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  |  Branch (2976:5): [True: 5.60k, False: 13.0M]
  ------------------
 2977|  9.43k|      const char *rawName = s + enc->minBytesPerChar;
 2978|  9.43k|      enum XML_Error result;
 2979|  9.43k|      BINDING *bindings = NULL;
 2980|  9.43k|      XML_Bool noElmHandlers = XML_TRUE;
  ------------------
  |  |   55|  9.43k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2981|  9.43k|      TAG_NAME name;
 2982|  9.43k|      name.str = poolStoreString(&parser->m_tempPool, enc, rawName,
 2983|  9.43k|                                 rawName + XmlNameLength(enc, rawName));
  ------------------
  |  |  257|  9.43k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 2984|  9.43k|      if (! name.str)
  ------------------
  |  Branch (2984:11): [True: 0, False: 9.43k]
  ------------------
 2985|      0|        return XML_ERROR_NO_MEMORY;
 2986|  9.43k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|  9.43k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 2987|  9.43k|      result = storeAtts(parser, enc, s, &name, &bindings,
 2988|  9.43k|                         XML_ACCOUNT_NONE /* token spans whole start tag */);
 2989|  9.43k|      if (result != XML_ERROR_NONE) {
  ------------------
  |  Branch (2989:11): [True: 57, False: 9.38k]
  ------------------
 2990|     57|        freeBindings(parser, bindings);
 2991|     57|        return result;
 2992|     57|      }
 2993|  9.38k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|  9.38k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 2994|  9.38k|      if (parser->m_startElementHandler) {
  ------------------
  |  Branch (2994:11): [True: 9.38k, False: 0]
  ------------------
 2995|  9.38k|        parser->m_startElementHandler(parser->m_handlerArg, name.str,
 2996|  9.38k|                                      (const XML_Char **)parser->m_atts);
 2997|  9.38k|        noElmHandlers = XML_FALSE;
  ------------------
  |  |   56|  9.38k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2998|  9.38k|      }
 2999|  9.38k|      if (parser->m_endElementHandler) {
  ------------------
  |  Branch (2999:11): [True: 9.38k, False: 0]
  ------------------
 3000|  9.38k|        if (parser->m_startElementHandler)
  ------------------
  |  Branch (3000:13): [True: 9.38k, False: 0]
  ------------------
 3001|  9.38k|          *eventPP = *eventEndPP;
 3002|  9.38k|        parser->m_endElementHandler(parser->m_handlerArg, name.str);
 3003|  9.38k|        noElmHandlers = XML_FALSE;
  ------------------
  |  |   56|  9.38k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 3004|  9.38k|      }
 3005|  9.38k|      if (noElmHandlers && parser->m_defaultHandler)
  ------------------
  |  Branch (3005:11): [True: 0, False: 9.38k]
  |  Branch (3005:28): [True: 0, False: 0]
  ------------------
 3006|      0|        reportDefault(parser, enc, s, next);
 3007|  9.38k|      poolClear(&parser->m_tempPool);
 3008|  9.38k|      freeBindings(parser, bindings);
 3009|  9.38k|    }
 3010|  9.38k|      if ((parser->m_tagLevel == 0)
  ------------------
  |  Branch (3010:11): [True: 117, False: 9.26k]
  ------------------
 3011|  9.38k|          && (parser->m_parsingStatus.parsing != XML_FINISHED)) {
  ------------------
  |  Branch (3011:14): [True: 117, False: 0]
  ------------------
 3012|    117|        if (parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (3012:13): [True: 0, False: 117]
  ------------------
 3013|      0|          parser->m_processor = epilogProcessor;
 3014|    117|        else
 3015|    117|          return epilogProcessor(parser, next, end, nextPtr);
 3016|    117|      }
 3017|  9.26k|      break;
 3018|   152k|    case XML_TOK_END_TAG:
  ------------------
  |  |   66|   152k|#define XML_TOK_END_TAG 5
  ------------------
  |  Branch (3018:5): [True: 152k, False: 12.9M]
  ------------------
 3019|   152k|      if (parser->m_tagLevel == startTagLevel)
  ------------------
  |  Branch (3019:11): [True: 2, False: 152k]
  ------------------
 3020|      2|        return XML_ERROR_ASYNC_ENTITY;
 3021|   152k|      else {
 3022|   152k|        int len;
 3023|   152k|        const char *rawName;
 3024|   152k|        TAG *tag = parser->m_tagStack;
 3025|   152k|        rawName = s + enc->minBytesPerChar * 2;
 3026|   152k|        len = XmlNameLength(enc, rawName);
  ------------------
  |  |  257|   152k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 3027|   152k|        if (len != tag->rawNameLength
  ------------------
  |  Branch (3027:13): [True: 31, False: 152k]
  ------------------
 3028|   152k|            || memcmp(tag->rawName, rawName, len) != 0) {
  ------------------
  |  Branch (3028:16): [True: 188, False: 152k]
  ------------------
 3029|    219|          *eventPP = rawName;
 3030|    219|          return XML_ERROR_TAG_MISMATCH;
 3031|    219|        }
 3032|   152k|        parser->m_tagStack = tag->parent;
 3033|   152k|        tag->parent = parser->m_freeTagList;
 3034|   152k|        parser->m_freeTagList = tag;
 3035|   152k|        --parser->m_tagLevel;
 3036|   152k|        if (parser->m_endElementHandler) {
  ------------------
  |  Branch (3036:13): [True: 152k, False: 0]
  ------------------
 3037|   152k|          const XML_Char *localPart;
 3038|   152k|          const XML_Char *prefix;
 3039|   152k|          XML_Char *uri;
 3040|   152k|          localPart = tag->name.localPart;
 3041|   152k|          if (parser->m_ns && localPart) {
  ------------------
  |  Branch (3041:15): [True: 0, False: 152k]
  |  Branch (3041:31): [True: 0, False: 0]
  ------------------
 3042|       |            /* localPart and prefix may have been overwritten in
 3043|       |               tag->name.str, since this points to the binding->uri
 3044|       |               buffer which gets re-used; so we have to add them again
 3045|       |            */
 3046|      0|            uri = (XML_Char *)tag->name.str + tag->name.uriLen;
 3047|       |            /* don't need to check for space - already done in storeAtts() */
 3048|      0|            while (*localPart)
  ------------------
  |  Branch (3048:20): [True: 0, False: 0]
  ------------------
 3049|      0|              *uri++ = *localPart++;
 3050|      0|            prefix = tag->name.prefix;
 3051|      0|            if (parser->m_ns_triplets && prefix) {
  ------------------
  |  Branch (3051:17): [True: 0, False: 0]
  |  Branch (3051:42): [True: 0, False: 0]
  ------------------
 3052|      0|              *uri++ = parser->m_namespaceSeparator;
 3053|      0|              while (*prefix)
  ------------------
  |  Branch (3053:22): [True: 0, False: 0]
  ------------------
 3054|      0|                *uri++ = *prefix++;
 3055|      0|            }
 3056|      0|            *uri = XML_T('\0');
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
 3057|      0|          }
 3058|   152k|          parser->m_endElementHandler(parser->m_handlerArg, tag->name.str);
 3059|   152k|        } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3059:20): [True: 0, False: 0]
  ------------------
 3060|      0|          reportDefault(parser, enc, s, next);
 3061|   152k|        while (tag->bindings) {
  ------------------
  |  Branch (3061:16): [True: 0, False: 152k]
  ------------------
 3062|      0|          BINDING *b = tag->bindings;
 3063|      0|          if (parser->m_endNamespaceDeclHandler)
  ------------------
  |  Branch (3063:15): [True: 0, False: 0]
  ------------------
 3064|      0|            parser->m_endNamespaceDeclHandler(parser->m_handlerArg,
 3065|      0|                                              b->prefix->name);
 3066|      0|          tag->bindings = tag->bindings->nextTagBinding;
 3067|      0|          b->nextTagBinding = parser->m_freeBindingList;
 3068|      0|          parser->m_freeBindingList = b;
 3069|      0|          b->prefix->binding = b->prevPrefixBinding;
 3070|      0|        }
 3071|   152k|        if ((parser->m_tagLevel == 0)
  ------------------
  |  Branch (3071:13): [True: 37, False: 152k]
  ------------------
 3072|   152k|            && (parser->m_parsingStatus.parsing != XML_FINISHED)) {
  ------------------
  |  Branch (3072:16): [True: 37, False: 0]
  ------------------
 3073|     37|          if (parser->m_parsingStatus.parsing == XML_SUSPENDED)
  ------------------
  |  Branch (3073:15): [True: 0, False: 37]
  ------------------
 3074|      0|            parser->m_processor = epilogProcessor;
 3075|     37|          else
 3076|     37|            return epilogProcessor(parser, next, end, nextPtr);
 3077|     37|        }
 3078|   152k|      }
 3079|   152k|      break;
 3080|   152k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  9.74k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (3080:5): [True: 9.74k, False: 13.0M]
  ------------------
 3081|  9.74k|      int n = XmlCharRefNumber(enc, s);
  ------------------
  |  |  264|  9.74k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 3082|  9.74k|      if (n < 0)
  ------------------
  |  Branch (3082:11): [True: 219, False: 9.52k]
  ------------------
 3083|    219|        return XML_ERROR_BAD_CHAR_REF;
 3084|  9.52k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3084:11): [True: 0, False: 9.52k]
  ------------------
 3085|      0|        XML_Char buf[XML_ENCODE_MAX];
 3086|      0|        parser->m_characterDataHandler(parser->m_handlerArg, buf,
 3087|      0|                                       XmlEncode(n, (ICHAR *)buf));
  ------------------
  |  |  164|      0|#  define XmlEncode XmlUtf8Encode
  ------------------
 3088|  9.52k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3088:18): [True: 0, False: 9.52k]
  ------------------
 3089|      0|        reportDefault(parser, enc, s, next);
 3090|  9.52k|    } break;
 3091|      1|    case XML_TOK_XML_DECL:
  ------------------
  |  |   77|      1|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (3091:5): [True: 1, False: 13.1M]
  ------------------
 3092|      1|      return XML_ERROR_MISPLACED_XML_PI;
 3093|  5.88M|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|  5.88M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (3093:5): [True: 5.88M, False: 7.22M]
  ------------------
 3094|  5.88M|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3094:11): [True: 0, False: 5.88M]
  ------------------
 3095|      0|        XML_Char c = 0xA;
 3096|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 3097|  5.88M|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3097:18): [True: 0, False: 5.88M]
  ------------------
 3098|      0|        reportDefault(parser, enc, s, next);
 3099|  5.88M|      break;
 3100|  3.51k|    case XML_TOK_CDATA_SECT_OPEN: {
  ------------------
  |  |   69|  3.51k|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  |  Branch (3100:5): [True: 3.51k, False: 13.0M]
  ------------------
 3101|  3.51k|      enum XML_Error result;
 3102|  3.51k|      if (parser->m_startCdataSectionHandler)
  ------------------
  |  Branch (3102:11): [True: 0, False: 3.51k]
  ------------------
 3103|      0|        parser->m_startCdataSectionHandler(parser->m_handlerArg);
 3104|       |      /* BEGIN disabled code */
 3105|       |      /* Suppose you doing a transformation on a document that involves
 3106|       |         changing only the character data.  You set up a defaultHandler
 3107|       |         and a characterDataHandler.  The defaultHandler simply copies
 3108|       |         characters through.  The characterDataHandler does the
 3109|       |         transformation and writes the characters out escaping them as
 3110|       |         necessary.  This case will fail to work if we leave out the
 3111|       |         following two lines (because & and < inside CDATA sections will
 3112|       |         be incorrectly escaped).
 3113|       |
 3114|       |         However, now we have a start/endCdataSectionHandler, so it seems
 3115|       |         easier to let the user deal with this.
 3116|       |      */
 3117|  3.51k|      else if ((0) && parser->m_characterDataHandler)
  ------------------
  |  Branch (3117:16): [Folded - Ignored]
  |  Branch (3117:23): [True: 0, False: 0]
  ------------------
 3118|      0|        parser->m_characterDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 3119|      0|                                       0);
 3120|       |      /* END disabled code */
 3121|  3.51k|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3121:16): [True: 0, False: 3.51k]
  ------------------
 3122|      0|        reportDefault(parser, enc, s, next);
 3123|  3.51k|      result
 3124|  3.51k|          = doCdataSection(parser, enc, &next, end, nextPtr, haveMore, account);
 3125|  3.51k|      if (result != XML_ERROR_NONE)
  ------------------
  |  Branch (3125:11): [True: 211, False: 3.30k]
  ------------------
 3126|    211|        return result;
 3127|  3.30k|      else if (! next) {
  ------------------
  |  Branch (3127:16): [True: 656, False: 2.64k]
  ------------------
 3128|    656|        parser->m_processor = cdataSectionProcessor;
 3129|    656|        return result;
 3130|    656|      }
 3131|  3.51k|    } break;
 3132|  32.6k|    case XML_TOK_TRAILING_RSQB:
  ------------------
  |  |   46|  32.6k|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  |  Branch (3132:5): [True: 32.6k, False: 13.0M]
  ------------------
 3133|  32.6k|      if (haveMore) {
  ------------------
  |  Branch (3133:11): [True: 27, False: 32.6k]
  ------------------
 3134|     27|        *nextPtr = s;
 3135|     27|        return XML_ERROR_NONE;
 3136|     27|      }
 3137|  32.6k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (3137:11): [True: 0, False: 32.6k]
  ------------------
 3138|      0|        if (MUST_CONVERT(enc, s)) {
  ------------------
  |  |  165|      0|#  define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
  |  |  ------------------
  |  |  |  Branch (165:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3139|      0|          ICHAR *dataPtr = (ICHAR *)parser->m_dataBuf;
 3140|      0|          XmlConvert(enc, &s, end, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
  ------------------
  |  |  161|      0|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|      0|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 3141|      0|          parser->m_characterDataHandler(
 3142|      0|              parser->m_handlerArg, parser->m_dataBuf,
 3143|      0|              (int)(dataPtr - (ICHAR *)parser->m_dataBuf));
 3144|      0|        } else
 3145|      0|          parser->m_characterDataHandler(
 3146|      0|              parser->m_handlerArg, (const XML_Char *)s,
 3147|      0|              (int)((const XML_Char *)end - (const XML_Char *)s));
 3148|  32.6k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3148:18): [True: 0, False: 32.6k]
  ------------------
 3149|      0|        reportDefault(parser, enc, s, end);
 3150|       |      /* We are at the end of the final buffer, should we check for
 3151|       |         XML_SUSPENDED, XML_FINISHED?
 3152|       |      */
 3153|  32.6k|      if (startTagLevel == 0) {
  ------------------
  |  Branch (3153:11): [True: 0, False: 32.6k]
  ------------------
 3154|      0|        *eventPP = end;
 3155|      0|        return XML_ERROR_NO_ELEMENTS;
 3156|      0|      }
 3157|  32.6k|      if (parser->m_tagLevel != startTagLevel) {
  ------------------
  |  Branch (3157:11): [True: 23, False: 32.6k]
  ------------------
 3158|     23|        *eventPP = end;
 3159|     23|        return XML_ERROR_ASYNC_ENTITY;
 3160|     23|      }
 3161|  32.6k|      *nextPtr = end;
 3162|  32.6k|      return XML_ERROR_NONE;
 3163|  1.83M|    case XML_TOK_DATA_CHARS: {
  ------------------
  |  |   67|  1.83M|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (3163:5): [True: 1.83M, False: 11.2M]
  ------------------
 3164|  1.83M|      XML_CharacterDataHandler charDataHandler = parser->m_characterDataHandler;
 3165|  1.83M|      if (charDataHandler) {
  ------------------
  |  Branch (3165:11): [True: 0, False: 1.83M]
  ------------------
 3166|      0|        if (MUST_CONVERT(enc, s)) {
  ------------------
  |  |  165|      0|#  define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
  |  |  ------------------
  |  |  |  Branch (165:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 3167|      0|          for (;;) {
 3168|      0|            ICHAR *dataPtr = (ICHAR *)parser->m_dataBuf;
 3169|      0|            const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  161|      0|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|      0|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 3170|      0|                enc, &s, next, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
 3171|      0|            *eventEndPP = s;
 3172|      0|            charDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 3173|      0|                            (int)(dataPtr - (ICHAR *)parser->m_dataBuf));
 3174|      0|            if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (3174:17): [True: 0, False: 0]
  ------------------
 3175|      0|                || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (3175:20): [True: 0, False: 0]
  ------------------
 3176|      0|              break;
 3177|      0|            *eventPP = s;
 3178|      0|          }
 3179|      0|        } else
 3180|      0|          charDataHandler(parser->m_handlerArg, (const XML_Char *)s,
 3181|      0|                          (int)((const XML_Char *)next - (const XML_Char *)s));
 3182|  1.83M|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (3182:18): [True: 0, False: 1.83M]
  ------------------
 3183|      0|        reportDefault(parser, enc, s, next);
 3184|  1.83M|    } break;
 3185|  10.2k|    case XML_TOK_PI:
  ------------------
  |  |   76|  10.2k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (3185:5): [True: 10.2k, False: 13.0M]
  ------------------
 3186|  10.2k|      if (! reportProcessingInstruction(parser, enc, s, next))
  ------------------
  |  Branch (3186:11): [True: 0, False: 10.2k]
  ------------------
 3187|      0|        return XML_ERROR_NO_MEMORY;
 3188|  10.2k|      break;
 3189|  10.2k|    case XML_TOK_COMMENT:
  ------------------
  |  |   78|  1.23k|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (3189:5): [True: 1.23k, False: 13.1M]
  ------------------
 3190|  1.23k|      if (! reportComment(parser, enc, s, next))
  ------------------
  |  Branch (3190:11): [True: 0, False: 1.23k]
  ------------------
 3191|      0|        return XML_ERROR_NO_MEMORY;
 3192|  1.23k|      break;
 3193|  1.23k|    default:
  ------------------
  |  Branch (3193:5): [True: 0, False: 13.1M]
  ------------------
 3194|       |      /* All of the tokens produced by XmlContentTok() have their own
 3195|       |       * explicit cases, so this default is not strictly necessary.
 3196|       |       * However it is a useful safety net, so we retain the code and
 3197|       |       * simply exclude it from the coverage tests.
 3198|       |       *
 3199|       |       * LCOV_EXCL_START
 3200|       |       */
 3201|      0|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (3201:11): [True: 0, False: 0]
  ------------------
 3202|      0|        reportDefault(parser, enc, s, next);
 3203|      0|      break;
 3204|       |      /* LCOV_EXCL_STOP */
 3205|  13.1M|    }
 3206|  12.2M|    *eventPP = s = next;
 3207|  12.2M|    switch (parser->m_parsingStatus.parsing) {
 3208|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (3208:5): [True: 0, False: 12.2M]
  ------------------
 3209|      0|      *nextPtr = next;
 3210|      0|      return XML_ERROR_NONE;
 3211|      0|    case XML_FINISHED:
  ------------------
  |  Branch (3211:5): [True: 0, False: 12.2M]
  ------------------
 3212|      0|      return XML_ERROR_ABORTED;
 3213|  12.2M|    default:;
  ------------------
  |  Branch (3213:5): [True: 12.2M, False: 0]
  ------------------
 3214|  12.2M|    }
 3215|  12.2M|  }
 3216|       |  /* not reached */
 3217|   892k|}
xmlparse.c:hashTableIterInit:
 7159|  19.9k|hashTableIterInit(HASH_TABLE_ITER *iter, const HASH_TABLE *table) {
 7160|  19.9k|  iter->p = table->v;
 7161|  19.9k|  iter->end = iter->p ? iter->p + table->size : NULL;
  ------------------
  |  Branch (7161:15): [True: 10.6k, False: 9.36k]
  ------------------
 7162|  19.9k|}
xmlparse.c:hashTableIterNext:
 7165|  43.9k|hashTableIterNext(HASH_TABLE_ITER *iter) {
 7166|   722k|  while (iter->p != iter->end) {
  ------------------
  |  Branch (7166:10): [True: 702k, False: 19.9k]
  ------------------
 7167|   702k|    NAMED *tem = *(iter->p)++;
 7168|   702k|    if (tem)
  ------------------
  |  Branch (7168:9): [True: 23.9k, False: 679k]
  ------------------
 7169|  23.9k|      return tem;
 7170|   702k|  }
 7171|  19.9k|  return NULL;
 7172|  43.9k|}
xmlparse.c:storeAtts:
 3254|  3.42M|          enum XML_Account account) {
 3255|  3.42M|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 3256|  3.42M|  ELEMENT_TYPE *elementType;
 3257|  3.42M|  int nDefaultAtts;
 3258|  3.42M|  const XML_Char **appAtts; /* the attribute list for the application */
 3259|  3.42M|  int attIndex = 0;
 3260|  3.42M|  int prefixLen;
 3261|  3.42M|  int i;
 3262|  3.42M|  int n;
 3263|  3.42M|  XML_Char *uri;
 3264|  3.42M|  int nPrefixes = 0;
 3265|  3.42M|  BINDING *binding;
 3266|  3.42M|  const XML_Char *localPart;
 3267|       |
 3268|       |  /* lookup the element type name */
 3269|  3.42M|  elementType
 3270|  3.42M|      = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, tagNamePtr->str, 0);
 3271|  3.42M|  if (! elementType) {
  ------------------
  |  Branch (3271:7): [True: 16.4k, False: 3.40M]
  ------------------
 3272|  16.4k|    const XML_Char *name = poolCopyString(&dtd->pool, tagNamePtr->str);
 3273|  16.4k|    if (! name)
  ------------------
  |  Branch (3273:9): [True: 0, False: 16.4k]
  ------------------
 3274|      0|      return XML_ERROR_NO_MEMORY;
 3275|  16.4k|    elementType = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, name,
 3276|  16.4k|                                         sizeof(ELEMENT_TYPE));
 3277|  16.4k|    if (! elementType)
  ------------------
  |  Branch (3277:9): [True: 0, False: 16.4k]
  ------------------
 3278|      0|      return XML_ERROR_NO_MEMORY;
 3279|  16.4k|    if (parser->m_ns && ! setElementTypePrefix(parser, elementType))
  ------------------
  |  Branch (3279:9): [True: 0, False: 16.4k]
  |  Branch (3279:25): [True: 0, False: 0]
  ------------------
 3280|      0|      return XML_ERROR_NO_MEMORY;
 3281|  16.4k|  }
 3282|  3.42M|  nDefaultAtts = elementType->nDefaultAtts;
 3283|       |
 3284|       |  /* get the attributes from the tokenizer */
 3285|  3.42M|  n = XmlGetAttributes(enc, attStr, parser->m_attsSize, parser->m_atts);
  ------------------
  |  |  262|  3.42M|  (((enc)->getAtts)(enc, ptr, attsMax, atts))
  ------------------
 3286|       |
 3287|       |  /* Detect and prevent integer overflow */
 3288|  3.42M|  if (n > INT_MAX - nDefaultAtts) {
  ------------------
  |  Branch (3288:7): [True: 0, False: 3.42M]
  ------------------
 3289|      0|    return XML_ERROR_NO_MEMORY;
 3290|      0|  }
 3291|       |
 3292|  3.42M|  if (n + nDefaultAtts > parser->m_attsSize) {
  ------------------
  |  Branch (3292:7): [True: 431, False: 3.42M]
  ------------------
 3293|    431|    int oldAttsSize = parser->m_attsSize;
 3294|    431|    ATTRIBUTE *temp;
 3295|       |#ifdef XML_ATTR_INFO
 3296|       |    XML_AttrInfo *temp2;
 3297|       |#endif
 3298|       |
 3299|       |    /* Detect and prevent integer overflow */
 3300|    431|    if ((nDefaultAtts > INT_MAX - INIT_ATTS_SIZE)
  ------------------
  |  |  244|    431|#define INIT_ATTS_SIZE 16
  ------------------
  |  Branch (3300:9): [True: 0, False: 431]
  ------------------
 3301|    431|        || (n > INT_MAX - (nDefaultAtts + INIT_ATTS_SIZE))) {
  ------------------
  |  |  244|    431|#define INIT_ATTS_SIZE 16
  ------------------
  |  Branch (3301:12): [True: 0, False: 431]
  ------------------
 3302|      0|      return XML_ERROR_NO_MEMORY;
 3303|      0|    }
 3304|       |
 3305|    431|    parser->m_attsSize = n + nDefaultAtts + INIT_ATTS_SIZE;
  ------------------
  |  |  244|    431|#define INIT_ATTS_SIZE 16
  ------------------
 3306|       |
 3307|       |    /* Detect and prevent integer overflow.
 3308|       |     * The preprocessor guard addresses the "always false" warning
 3309|       |     * from -Wtype-limits on platforms where
 3310|       |     * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3311|       |#if UINT_MAX >= SIZE_MAX
 3312|       |    if ((unsigned)parser->m_attsSize > (size_t)(-1) / sizeof(ATTRIBUTE)) {
 3313|       |      parser->m_attsSize = oldAttsSize;
 3314|       |      return XML_ERROR_NO_MEMORY;
 3315|       |    }
 3316|       |#endif
 3317|       |
 3318|    431|    temp = (ATTRIBUTE *)REALLOC(parser, (void *)parser->m_atts,
  ------------------
  |  |  715|    431|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 3319|    431|                                parser->m_attsSize * sizeof(ATTRIBUTE));
 3320|    431|    if (temp == NULL) {
  ------------------
  |  Branch (3320:9): [True: 0, False: 431]
  ------------------
 3321|      0|      parser->m_attsSize = oldAttsSize;
 3322|      0|      return XML_ERROR_NO_MEMORY;
 3323|      0|    }
 3324|    431|    parser->m_atts = temp;
 3325|       |#ifdef XML_ATTR_INFO
 3326|       |    /* Detect and prevent integer overflow.
 3327|       |     * The preprocessor guard addresses the "always false" warning
 3328|       |     * from -Wtype-limits on platforms where
 3329|       |     * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3330|       |#  if UINT_MAX >= SIZE_MAX
 3331|       |    if ((unsigned)parser->m_attsSize > (size_t)(-1) / sizeof(XML_AttrInfo)) {
 3332|       |      parser->m_attsSize = oldAttsSize;
 3333|       |      return XML_ERROR_NO_MEMORY;
 3334|       |    }
 3335|       |#  endif
 3336|       |
 3337|       |    temp2 = (XML_AttrInfo *)REALLOC(parser, (void *)parser->m_attInfo,
 3338|       |                                    parser->m_attsSize * sizeof(XML_AttrInfo));
 3339|       |    if (temp2 == NULL) {
 3340|       |      parser->m_attsSize = oldAttsSize;
 3341|       |      return XML_ERROR_NO_MEMORY;
 3342|       |    }
 3343|       |    parser->m_attInfo = temp2;
 3344|       |#endif
 3345|    431|    if (n > oldAttsSize)
  ------------------
  |  Branch (3345:9): [True: 421, False: 10]
  ------------------
 3346|    421|      XmlGetAttributes(enc, attStr, n, parser->m_atts);
  ------------------
  |  |  262|    421|  (((enc)->getAtts)(enc, ptr, attsMax, atts))
  ------------------
 3347|    431|  }
 3348|       |
 3349|  3.42M|  appAtts = (const XML_Char **)parser->m_atts;
 3350|  3.44M|  for (i = 0; i < n; i++) {
  ------------------
  |  Branch (3350:15): [True: 22.7k, False: 3.42M]
  ------------------
 3351|  22.7k|    ATTRIBUTE *currAtt = &parser->m_atts[i];
 3352|       |#ifdef XML_ATTR_INFO
 3353|       |    XML_AttrInfo *currAttInfo = &parser->m_attInfo[i];
 3354|       |#endif
 3355|       |    /* add the name and value to the attribute list */
 3356|  22.7k|    ATTRIBUTE_ID *attId
 3357|  22.7k|        = getAttributeId(parser, enc, currAtt->name,
 3358|  22.7k|                         currAtt->name + XmlNameLength(enc, currAtt->name));
  ------------------
  |  |  257|  22.7k|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 3359|  22.7k|    if (! attId)
  ------------------
  |  Branch (3359:9): [True: 0, False: 22.7k]
  ------------------
 3360|      0|      return XML_ERROR_NO_MEMORY;
 3361|       |#ifdef XML_ATTR_INFO
 3362|       |    currAttInfo->nameStart
 3363|       |        = parser->m_parseEndByteIndex - (parser->m_parseEndPtr - currAtt->name);
 3364|       |    currAttInfo->nameEnd
 3365|       |        = currAttInfo->nameStart + XmlNameLength(enc, currAtt->name);
 3366|       |    currAttInfo->valueStart = parser->m_parseEndByteIndex
 3367|       |                              - (parser->m_parseEndPtr - currAtt->valuePtr);
 3368|       |    currAttInfo->valueEnd = parser->m_parseEndByteIndex
 3369|       |                            - (parser->m_parseEndPtr - currAtt->valueEnd);
 3370|       |#endif
 3371|       |    /* Detect duplicate attributes by their QNames. This does not work when
 3372|       |       namespace processing is turned on and different prefixes for the same
 3373|       |       namespace are used. For this case we have a check further down.
 3374|       |    */
 3375|  22.7k|    if ((attId->name)[-1]) {
  ------------------
  |  Branch (3375:9): [True: 491, False: 22.2k]
  ------------------
 3376|    491|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (3376:11): [True: 490, False: 1]
  ------------------
 3377|    490|        parser->m_eventPtr = parser->m_atts[i].name;
 3378|    491|      return XML_ERROR_DUPLICATE_ATTRIBUTE;
 3379|    491|    }
 3380|  22.2k|    (attId->name)[-1] = 1;
 3381|  22.2k|    appAtts[attIndex++] = attId->name;
 3382|  22.2k|    if (! parser->m_atts[i].normalized) {
  ------------------
  |  Branch (3382:9): [True: 11.0k, False: 11.2k]
  ------------------
 3383|  11.0k|      enum XML_Error result;
 3384|  11.0k|      XML_Bool isCdata = XML_TRUE;
  ------------------
  |  |   55|  11.0k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 3385|       |
 3386|       |      /* figure out whether declared as other than CDATA */
 3387|  11.0k|      if (attId->maybeTokenized) {
  ------------------
  |  Branch (3387:11): [True: 1.23k, False: 9.82k]
  ------------------
 3388|  1.23k|        int j;
 3389|  4.22k|        for (j = 0; j < nDefaultAtts; j++) {
  ------------------
  |  Branch (3389:21): [True: 3.79k, False: 431]
  ------------------
 3390|  3.79k|          if (attId == elementType->defaultAtts[j].id) {
  ------------------
  |  Branch (3390:15): [True: 804, False: 2.99k]
  ------------------
 3391|    804|            isCdata = elementType->defaultAtts[j].isCdata;
 3392|    804|            break;
 3393|    804|          }
 3394|  3.79k|        }
 3395|  1.23k|      }
 3396|       |
 3397|       |      /* normalize the attribute value */
 3398|  11.0k|      result = storeAttributeValue(
 3399|  11.0k|          parser, enc, isCdata, parser->m_atts[i].valuePtr,
 3400|  11.0k|          parser->m_atts[i].valueEnd, &parser->m_tempPool, account);
 3401|  11.0k|      if (result)
  ------------------
  |  Branch (3401:11): [True: 257, False: 10.8k]
  ------------------
 3402|    257|        return result;
 3403|  10.8k|      appAtts[attIndex] = poolStart(&parser->m_tempPool);
  ------------------
  |  |  596|  10.8k|#define poolStart(pool) ((pool)->start)
  ------------------
 3404|  10.8k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|  10.8k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3405|  11.2k|    } else {
 3406|       |      /* the value did not need normalizing */
 3407|  11.2k|      appAtts[attIndex] = poolStoreString(&parser->m_tempPool, enc,
 3408|  11.2k|                                          parser->m_atts[i].valuePtr,
 3409|  11.2k|                                          parser->m_atts[i].valueEnd);
 3410|  11.2k|      if (appAtts[attIndex] == 0)
  ------------------
  |  Branch (3410:11): [True: 0, False: 11.2k]
  ------------------
 3411|      0|        return XML_ERROR_NO_MEMORY;
 3412|  11.2k|      poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|  11.2k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3413|  11.2k|    }
 3414|       |    /* handle prefixed attribute names */
 3415|  22.0k|    if (attId->prefix) {
  ------------------
  |  Branch (3415:9): [True: 0, False: 22.0k]
  ------------------
 3416|      0|      if (attId->xmlns) {
  ------------------
  |  Branch (3416:11): [True: 0, False: 0]
  ------------------
 3417|       |        /* deal with namespace declarations here */
 3418|      0|        enum XML_Error result = addBinding(parser, attId->prefix, attId,
 3419|      0|                                           appAtts[attIndex], bindingsPtr);
 3420|      0|        if (result)
  ------------------
  |  Branch (3420:13): [True: 0, False: 0]
  ------------------
 3421|      0|          return result;
 3422|      0|        --attIndex;
 3423|      0|      } else {
 3424|       |        /* deal with other prefixed names later */
 3425|      0|        attIndex++;
 3426|      0|        nPrefixes++;
 3427|      0|        (attId->name)[-1] = 2;
 3428|      0|      }
 3429|      0|    } else
 3430|  22.0k|      attIndex++;
 3431|  22.0k|  }
 3432|       |
 3433|       |  /* set-up for XML_GetSpecifiedAttributeCount and XML_GetIdAttributeIndex */
 3434|  3.42M|  parser->m_nSpecifiedAtts = attIndex;
 3435|  3.42M|  if (elementType->idAtt && (elementType->idAtt->name)[-1]) {
  ------------------
  |  Branch (3435:7): [True: 511, False: 3.42M]
  |  Branch (3435:29): [True: 305, False: 206]
  ------------------
 3436|    721|    for (i = 0; i < attIndex; i += 2)
  ------------------
  |  Branch (3436:17): [True: 721, False: 0]
  ------------------
 3437|    721|      if (appAtts[i] == elementType->idAtt->name) {
  ------------------
  |  Branch (3437:11): [True: 305, False: 416]
  ------------------
 3438|    305|        parser->m_idAttIndex = i;
 3439|    305|        break;
 3440|    305|      }
 3441|    305|  } else
 3442|  3.42M|    parser->m_idAttIndex = -1;
 3443|       |
 3444|       |  /* do attribute defaulting */
 3445|  3.42M|  for (i = 0; i < nDefaultAtts; i++) {
  ------------------
  |  Branch (3445:15): [True: 5.09k, False: 3.42M]
  ------------------
 3446|  5.09k|    const DEFAULT_ATTRIBUTE *da = elementType->defaultAtts + i;
 3447|  5.09k|    if (! (da->id->name)[-1] && da->value) {
  ------------------
  |  Branch (3447:9): [True: 4.01k, False: 1.08k]
  |  Branch (3447:33): [True: 680, False: 3.33k]
  ------------------
 3448|    680|      if (da->id->prefix) {
  ------------------
  |  Branch (3448:11): [True: 0, False: 680]
  ------------------
 3449|      0|        if (da->id->xmlns) {
  ------------------
  |  Branch (3449:13): [True: 0, False: 0]
  ------------------
 3450|      0|          enum XML_Error result = addBinding(parser, da->id->prefix, da->id,
 3451|      0|                                             da->value, bindingsPtr);
 3452|      0|          if (result)
  ------------------
  |  Branch (3452:15): [True: 0, False: 0]
  ------------------
 3453|      0|            return result;
 3454|      0|        } else {
 3455|      0|          (da->id->name)[-1] = 2;
 3456|      0|          nPrefixes++;
 3457|      0|          appAtts[attIndex++] = da->id->name;
 3458|      0|          appAtts[attIndex++] = da->value;
 3459|      0|        }
 3460|    680|      } else {
 3461|    680|        (da->id->name)[-1] = 1;
 3462|    680|        appAtts[attIndex++] = da->id->name;
 3463|    680|        appAtts[attIndex++] = da->value;
 3464|    680|      }
 3465|    680|    }
 3466|  5.09k|  }
 3467|  3.42M|  appAtts[attIndex] = 0;
 3468|       |
 3469|       |  /* expand prefixed attribute names, check for duplicates,
 3470|       |     and clear flags that say whether attributes were specified */
 3471|  3.42M|  i = 0;
 3472|  3.42M|  if (nPrefixes) {
  ------------------
  |  Branch (3472:7): [True: 0, False: 3.42M]
  ------------------
 3473|      0|    int j; /* hash table index */
 3474|      0|    unsigned long version = parser->m_nsAttsVersion;
 3475|       |
 3476|       |    /* Detect and prevent invalid shift */
 3477|      0|    if (parser->m_nsAttsPower >= sizeof(unsigned int) * 8 /* bits per byte */) {
  ------------------
  |  Branch (3477:9): [True: 0, False: 0]
  ------------------
 3478|      0|      return XML_ERROR_NO_MEMORY;
 3479|      0|    }
 3480|       |
 3481|      0|    unsigned int nsAttsSize = 1u << parser->m_nsAttsPower;
 3482|      0|    unsigned char oldNsAttsPower = parser->m_nsAttsPower;
 3483|       |    /* size of hash table must be at least 2 * (# of prefixed attributes) */
 3484|      0|    if ((nPrefixes << 1)
  ------------------
  |  Branch (3484:9): [True: 0, False: 0]
  ------------------
 3485|      0|        >> parser->m_nsAttsPower) { /* true for m_nsAttsPower = 0 */
 3486|      0|      NS_ATT *temp;
 3487|       |      /* hash table size must also be a power of 2 and >= 8 */
 3488|      0|      while (nPrefixes >> parser->m_nsAttsPower++)
  ------------------
  |  Branch (3488:14): [True: 0, False: 0]
  ------------------
 3489|      0|        ;
 3490|      0|      if (parser->m_nsAttsPower < 3)
  ------------------
  |  Branch (3490:11): [True: 0, False: 0]
  ------------------
 3491|      0|        parser->m_nsAttsPower = 3;
 3492|       |
 3493|       |      /* Detect and prevent invalid shift */
 3494|      0|      if (parser->m_nsAttsPower >= sizeof(nsAttsSize) * 8 /* bits per byte */) {
  ------------------
  |  Branch (3494:11): [True: 0, False: 0]
  ------------------
 3495|       |        /* Restore actual size of memory in m_nsAtts */
 3496|      0|        parser->m_nsAttsPower = oldNsAttsPower;
 3497|      0|        return XML_ERROR_NO_MEMORY;
 3498|      0|      }
 3499|       |
 3500|      0|      nsAttsSize = 1u << parser->m_nsAttsPower;
 3501|       |
 3502|       |      /* Detect and prevent integer overflow.
 3503|       |       * The preprocessor guard addresses the "always false" warning
 3504|       |       * from -Wtype-limits on platforms where
 3505|       |       * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3506|       |#if UINT_MAX >= SIZE_MAX
 3507|       |      if (nsAttsSize > (size_t)(-1) / sizeof(NS_ATT)) {
 3508|       |        /* Restore actual size of memory in m_nsAtts */
 3509|       |        parser->m_nsAttsPower = oldNsAttsPower;
 3510|       |        return XML_ERROR_NO_MEMORY;
 3511|       |      }
 3512|       |#endif
 3513|       |
 3514|      0|      temp = (NS_ATT *)REALLOC(parser, parser->m_nsAtts,
  ------------------
  |  |  715|      0|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 3515|      0|                               nsAttsSize * sizeof(NS_ATT));
 3516|      0|      if (! temp) {
  ------------------
  |  Branch (3516:11): [True: 0, False: 0]
  ------------------
 3517|       |        /* Restore actual size of memory in m_nsAtts */
 3518|      0|        parser->m_nsAttsPower = oldNsAttsPower;
 3519|      0|        return XML_ERROR_NO_MEMORY;
 3520|      0|      }
 3521|      0|      parser->m_nsAtts = temp;
 3522|      0|      version = 0; /* force re-initialization of m_nsAtts hash table */
 3523|      0|    }
 3524|       |    /* using a version flag saves us from initializing m_nsAtts every time */
 3525|      0|    if (! version) { /* initialize version flags when version wraps around */
  ------------------
  |  Branch (3525:9): [True: 0, False: 0]
  ------------------
 3526|      0|      version = INIT_ATTS_VERSION;
  ------------------
  |  |  245|      0|#define INIT_ATTS_VERSION 0xFFFFFFFF
  ------------------
 3527|      0|      for (j = nsAttsSize; j != 0;)
  ------------------
  |  Branch (3527:28): [True: 0, False: 0]
  ------------------
 3528|      0|        parser->m_nsAtts[--j].version = version;
 3529|      0|    }
 3530|      0|    parser->m_nsAttsVersion = --version;
 3531|       |
 3532|       |    /* expand prefixed names and check for duplicates */
 3533|      0|    for (; i < attIndex; i += 2) {
  ------------------
  |  Branch (3533:12): [True: 0, False: 0]
  ------------------
 3534|      0|      const XML_Char *s = appAtts[i];
 3535|      0|      if (s[-1] == 2) { /* prefixed */
  ------------------
  |  Branch (3535:11): [True: 0, False: 0]
  ------------------
 3536|      0|        ATTRIBUTE_ID *id;
 3537|      0|        const BINDING *b;
 3538|      0|        unsigned long uriHash;
 3539|      0|        struct siphash sip_state;
 3540|      0|        struct sipkey sip_key;
 3541|       |
 3542|      0|        copy_salt_to_sipkey(parser, &sip_key);
 3543|      0|        sip24_init(&sip_state, &sip_key);
 3544|       |
 3545|      0|        ((XML_Char *)s)[-1] = 0; /* clear flag */
 3546|      0|        id = (ATTRIBUTE_ID *)lookup(parser, &dtd->attributeIds, s, 0);
 3547|      0|        if (! id || ! id->prefix) {
  ------------------
  |  Branch (3547:13): [True: 0, False: 0]
  |  Branch (3547:21): [True: 0, False: 0]
  ------------------
 3548|       |          /* This code is walking through the appAtts array, dealing
 3549|       |           * with (in this case) a prefixed attribute name.  To be in
 3550|       |           * the array, the attribute must have already been bound, so
 3551|       |           * has to have passed through the hash table lookup once
 3552|       |           * already.  That implies that an entry for it already
 3553|       |           * exists, so the lookup above will return a pointer to
 3554|       |           * already allocated memory.  There is no opportunaity for
 3555|       |           * the allocator to fail, so the condition above cannot be
 3556|       |           * fulfilled.
 3557|       |           *
 3558|       |           * Since it is difficult to be certain that the above
 3559|       |           * analysis is complete, we retain the test and merely
 3560|       |           * remove the code from coverage tests.
 3561|       |           */
 3562|      0|          return XML_ERROR_NO_MEMORY; /* LCOV_EXCL_LINE */
 3563|      0|        }
 3564|      0|        b = id->prefix->binding;
 3565|      0|        if (! b)
  ------------------
  |  Branch (3565:13): [True: 0, False: 0]
  ------------------
 3566|      0|          return XML_ERROR_UNBOUND_PREFIX;
 3567|       |
 3568|      0|        for (j = 0; j < b->uriLen; j++) {
  ------------------
  |  Branch (3568:21): [True: 0, False: 0]
  ------------------
 3569|      0|          const XML_Char c = b->uri[j];
 3570|      0|          if (! poolAppendChar(&parser->m_tempPool, c))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3570:15): [True: 0, False: 0]
  ------------------
 3571|      0|            return XML_ERROR_NO_MEMORY;
 3572|      0|        }
 3573|       |
 3574|      0|        sip24_update(&sip_state, b->uri, b->uriLen * sizeof(XML_Char));
 3575|       |
 3576|      0|        while (*s++ != XML_T(ASCII_COLON))
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (3576:16): [True: 0, False: 0]
  ------------------
 3577|      0|          ;
 3578|       |
 3579|      0|        sip24_update(&sip_state, s, keylen(s) * sizeof(XML_Char));
 3580|       |
 3581|      0|        do { /* copies null terminator */
 3582|      0|          if (! poolAppendChar(&parser->m_tempPool, *s))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3582:15): [True: 0, False: 0]
  ------------------
 3583|      0|            return XML_ERROR_NO_MEMORY;
 3584|      0|        } while (*s++);
  ------------------
  |  Branch (3584:18): [True: 0, False: 0]
  ------------------
 3585|       |
 3586|      0|        uriHash = (unsigned long)sip24_final(&sip_state);
 3587|       |
 3588|      0|        { /* Check hash table for duplicate of expanded name (uriName).
 3589|       |             Derived from code in lookup(parser, HASH_TABLE *table, ...).
 3590|       |          */
 3591|      0|          unsigned char step = 0;
 3592|      0|          unsigned long mask = nsAttsSize - 1;
 3593|      0|          j = uriHash & mask; /* index into hash table */
 3594|      0|          while (parser->m_nsAtts[j].version == version) {
  ------------------
  |  Branch (3594:18): [True: 0, False: 0]
  ------------------
 3595|       |            /* for speed we compare stored hash values first */
 3596|      0|            if (uriHash == parser->m_nsAtts[j].hash) {
  ------------------
  |  Branch (3596:17): [True: 0, False: 0]
  ------------------
 3597|      0|              const XML_Char *s1 = poolStart(&parser->m_tempPool);
  ------------------
  |  |  596|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 3598|      0|              const XML_Char *s2 = parser->m_nsAtts[j].uriName;
 3599|       |              /* s1 is null terminated, but not s2 */
 3600|      0|              for (; *s1 == *s2 && *s1 != 0; s1++, s2++)
  ------------------
  |  Branch (3600:22): [True: 0, False: 0]
  |  Branch (3600:36): [True: 0, False: 0]
  ------------------
 3601|      0|                ;
 3602|      0|              if (*s1 == 0)
  ------------------
  |  Branch (3602:19): [True: 0, False: 0]
  ------------------
 3603|      0|                return XML_ERROR_DUPLICATE_ATTRIBUTE;
 3604|      0|            }
 3605|      0|            if (! step)
  ------------------
  |  Branch (3605:17): [True: 0, False: 0]
  ------------------
 3606|      0|              step = PROBE_STEP(uriHash, mask, parser->m_nsAttsPower);
  ------------------
  |  |  235|      0|  ((unsigned char)((SECOND_HASH(hash, mask, power)) | 1))
  |  |  ------------------
  |  |  |  |  233|      0|  ((((hash) & ~(mask)) >> ((power)-1)) & ((mask) >> 2))
  |  |  ------------------
  ------------------
 3607|      0|            j < step ? (j += nsAttsSize - step) : (j -= step);
  ------------------
  |  Branch (3607:13): [True: 0, False: 0]
  ------------------
 3608|      0|          }
 3609|      0|        }
 3610|       |
 3611|      0|        if (parser->m_ns_triplets) { /* append namespace separator and prefix */
  ------------------
  |  Branch (3611:13): [True: 0, False: 0]
  ------------------
 3612|      0|          parser->m_tempPool.ptr[-1] = parser->m_namespaceSeparator;
 3613|      0|          s = b->prefix->name;
 3614|      0|          do {
 3615|      0|            if (! poolAppendChar(&parser->m_tempPool, *s))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (3615:17): [True: 0, False: 0]
  ------------------
 3616|      0|              return XML_ERROR_NO_MEMORY;
 3617|      0|          } while (*s++);
  ------------------
  |  Branch (3617:20): [True: 0, False: 0]
  ------------------
 3618|      0|        }
 3619|       |
 3620|       |        /* store expanded name in attribute list */
 3621|      0|        s = poolStart(&parser->m_tempPool);
  ------------------
  |  |  596|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 3622|      0|        poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 3623|      0|        appAtts[i] = s;
 3624|       |
 3625|       |        /* fill empty slot with new version, uriName and hash value */
 3626|      0|        parser->m_nsAtts[j].version = version;
 3627|      0|        parser->m_nsAtts[j].hash = uriHash;
 3628|      0|        parser->m_nsAtts[j].uriName = s;
 3629|       |
 3630|      0|        if (! --nPrefixes) {
  ------------------
  |  Branch (3630:13): [True: 0, False: 0]
  ------------------
 3631|      0|          i += 2;
 3632|      0|          break;
 3633|      0|        }
 3634|      0|      } else                     /* not prefixed */
 3635|      0|        ((XML_Char *)s)[-1] = 0; /* clear flag */
 3636|      0|    }
 3637|      0|  }
 3638|       |  /* clear flags for the remaining attributes */
 3639|  3.44M|  for (; i < attIndex; i += 2)
  ------------------
  |  Branch (3639:10): [True: 21.7k, False: 3.42M]
  ------------------
 3640|  21.7k|    ((XML_Char *)(appAtts[i]))[-1] = 0;
 3641|  3.42M|  for (binding = *bindingsPtr; binding; binding = binding->nextTagBinding)
  ------------------
  |  Branch (3641:32): [True: 0, False: 3.42M]
  ------------------
 3642|      0|    binding->attId->name[-1] = 0;
 3643|       |
 3644|  3.42M|  if (! parser->m_ns)
  ------------------
  |  Branch (3644:7): [True: 3.42M, False: 0]
  ------------------
 3645|  3.42M|    return XML_ERROR_NONE;
 3646|       |
 3647|       |  /* expand the element type name */
 3648|      0|  if (elementType->prefix) {
  ------------------
  |  Branch (3648:7): [True: 0, False: 0]
  ------------------
 3649|      0|    binding = elementType->prefix->binding;
 3650|      0|    if (! binding)
  ------------------
  |  Branch (3650:9): [True: 0, False: 0]
  ------------------
 3651|      0|      return XML_ERROR_UNBOUND_PREFIX;
 3652|      0|    localPart = tagNamePtr->str;
 3653|      0|    while (*localPart++ != XML_T(ASCII_COLON))
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (3653:12): [True: 0, False: 0]
  ------------------
 3654|      0|      ;
 3655|      0|  } else if (dtd->defaultPrefix.binding) {
  ------------------
  |  Branch (3655:14): [True: 0, False: 0]
  ------------------
 3656|      0|    binding = dtd->defaultPrefix.binding;
 3657|      0|    localPart = tagNamePtr->str;
 3658|      0|  } else
 3659|      0|    return XML_ERROR_NONE;
 3660|      0|  prefixLen = 0;
 3661|      0|  if (parser->m_ns_triplets && binding->prefix->name) {
  ------------------
  |  Branch (3661:7): [True: 0, False: 0]
  |  Branch (3661:32): [True: 0, False: 0]
  ------------------
 3662|      0|    for (; binding->prefix->name[prefixLen++];)
  ------------------
  |  Branch (3662:12): [True: 0, False: 0]
  ------------------
 3663|      0|      ; /* prefixLen includes null terminator */
 3664|      0|  }
 3665|      0|  tagNamePtr->localPart = localPart;
 3666|      0|  tagNamePtr->uriLen = binding->uriLen;
 3667|      0|  tagNamePtr->prefix = binding->prefix->name;
 3668|      0|  tagNamePtr->prefixLen = prefixLen;
 3669|      0|  for (i = 0; localPart[i++];)
  ------------------
  |  Branch (3669:15): [True: 0, False: 0]
  ------------------
 3670|      0|    ; /* i includes null terminator */
 3671|       |
 3672|       |  /* Detect and prevent integer overflow */
 3673|      0|  if (binding->uriLen > INT_MAX - prefixLen
  ------------------
  |  Branch (3673:7): [True: 0, False: 0]
  ------------------
 3674|      0|      || i > INT_MAX - (binding->uriLen + prefixLen)) {
  ------------------
  |  Branch (3674:10): [True: 0, False: 0]
  ------------------
 3675|      0|    return XML_ERROR_NO_MEMORY;
 3676|      0|  }
 3677|       |
 3678|      0|  n = i + binding->uriLen + prefixLen;
 3679|      0|  if (n > binding->uriAlloc) {
  ------------------
  |  Branch (3679:7): [True: 0, False: 0]
  ------------------
 3680|      0|    TAG *p;
 3681|       |
 3682|       |    /* Detect and prevent integer overflow */
 3683|      0|    if (n > INT_MAX - EXPAND_SPARE) {
  ------------------
  |  |  249|      0|#define EXPAND_SPARE 24
  ------------------
  |  Branch (3683:9): [True: 0, False: 0]
  ------------------
 3684|      0|      return XML_ERROR_NO_MEMORY;
 3685|      0|    }
 3686|       |    /* Detect and prevent integer overflow.
 3687|       |     * The preprocessor guard addresses the "always false" warning
 3688|       |     * from -Wtype-limits on platforms where
 3689|       |     * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 3690|       |#if UINT_MAX >= SIZE_MAX
 3691|       |    if ((unsigned)(n + EXPAND_SPARE) > (size_t)(-1) / sizeof(XML_Char)) {
 3692|       |      return XML_ERROR_NO_MEMORY;
 3693|       |    }
 3694|       |#endif
 3695|       |
 3696|      0|    uri = (XML_Char *)MALLOC(parser, (n + EXPAND_SPARE) * sizeof(XML_Char));
  ------------------
  |  |  714|      0|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 3697|      0|    if (! uri)
  ------------------
  |  Branch (3697:9): [True: 0, False: 0]
  ------------------
 3698|      0|      return XML_ERROR_NO_MEMORY;
 3699|      0|    binding->uriAlloc = n + EXPAND_SPARE;
  ------------------
  |  |  249|      0|#define EXPAND_SPARE 24
  ------------------
 3700|      0|    memcpy(uri, binding->uri, binding->uriLen * sizeof(XML_Char));
 3701|      0|    for (p = parser->m_tagStack; p; p = p->parent)
  ------------------
  |  Branch (3701:34): [True: 0, False: 0]
  ------------------
 3702|      0|      if (p->name.str == binding->uri)
  ------------------
  |  Branch (3702:11): [True: 0, False: 0]
  ------------------
 3703|      0|        p->name.str = uri;
 3704|      0|    FREE(parser, binding->uri);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 3705|      0|    binding->uri = uri;
 3706|      0|  }
 3707|       |  /* if m_namespaceSeparator != '\0' then uri includes it already */
 3708|      0|  uri = binding->uri + binding->uriLen;
 3709|      0|  memcpy(uri, localPart, i * sizeof(XML_Char));
 3710|       |  /* we always have a namespace separator between localPart and prefix */
 3711|      0|  if (prefixLen) {
  ------------------
  |  Branch (3711:7): [True: 0, False: 0]
  ------------------
 3712|      0|    uri += i - 1;
 3713|      0|    *uri = parser->m_namespaceSeparator; /* replace null terminator */
 3714|      0|    memcpy(uri + 1, binding->prefix->name, prefixLen * sizeof(XML_Char));
 3715|      0|  }
 3716|      0|  tagNamePtr->str = binding->uri;
 3717|      0|  return XML_ERROR_NONE;
 3718|      0|}
xmlparse.c:setElementTypePrefix:
 6447|  7.48k|setElementTypePrefix(XML_Parser parser, ELEMENT_TYPE *elementType) {
 6448|  7.48k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6449|  7.48k|  const XML_Char *name;
 6450|  96.9k|  for (name = elementType->name; *name; name++) {
  ------------------
  |  Branch (6450:34): [True: 93.5k, False: 3.39k]
  ------------------
 6451|  93.5k|    if (*name == XML_T(ASCII_COLON)) {
  ------------------
  |  |  191|  93.5k|#  define XML_T(x) x
  ------------------
  |  Branch (6451:9): [True: 4.09k, False: 89.4k]
  ------------------
 6452|  4.09k|      PREFIX *prefix;
 6453|  4.09k|      const XML_Char *s;
 6454|  71.8k|      for (s = elementType->name; s != name; s++) {
  ------------------
  |  Branch (6454:35): [True: 67.7k, False: 4.09k]
  ------------------
 6455|  67.7k|        if (! poolAppendChar(&dtd->pool, *s))
  ------------------
  |  |  603|  67.7k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 95, False: 67.6k]
  |  |  |  Branch (603:35): [True: 0, False: 95]
  |  |  ------------------
  |  |  604|  67.7k|       ? 0                                                                     \
  |  |  605|  67.7k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6455:13): [True: 0, False: 67.7k]
  ------------------
 6456|      0|          return 0;
 6457|  67.7k|      }
 6458|  4.09k|      if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  603|  4.09k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 21, False: 4.07k]
  |  |  |  Branch (603:35): [True: 0, False: 21]
  |  |  ------------------
  |  |  604|  4.09k|       ? 0                                                                     \
  |  |  605|  4.09k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6458:11): [True: 0, False: 4.09k]
  ------------------
 6459|      0|        return 0;
 6460|  4.09k|      prefix = (PREFIX *)lookup(parser, &dtd->prefixes, poolStart(&dtd->pool),
  ------------------
  |  |  596|  4.09k|#define poolStart(pool) ((pool)->start)
  ------------------
 6461|  4.09k|                                sizeof(PREFIX));
 6462|  4.09k|      if (! prefix)
  ------------------
  |  Branch (6462:11): [True: 0, False: 4.09k]
  ------------------
 6463|      0|        return 0;
 6464|  4.09k|      if (prefix->name == poolStart(&dtd->pool))
  ------------------
  |  |  596|  4.09k|#define poolStart(pool) ((pool)->start)
  ------------------
  |  Branch (6464:11): [True: 3.52k, False: 562]
  ------------------
 6465|  3.52k|        poolFinish(&dtd->pool);
  ------------------
  |  |  601|  3.52k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6466|    562|      else
 6467|    562|        poolDiscard(&dtd->pool);
  ------------------
  |  |  600|    562|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6468|  4.09k|      elementType->prefix = prefix;
 6469|  4.09k|      break;
 6470|  4.09k|    }
 6471|  93.5k|  }
 6472|  7.48k|  return 1;
 6473|  7.48k|}
xmlparse.c:freeBindings:
 3224|  9.43k|freeBindings(XML_Parser parser, BINDING *bindings) {
 3225|  9.43k|  while (bindings) {
  ------------------
  |  Branch (3225:10): [True: 0, False: 9.43k]
  ------------------
 3226|      0|    BINDING *b = bindings;
 3227|       |
 3228|       |    /* m_startNamespaceDeclHandler will have been called for this
 3229|       |     * binding in addBindings(), so call the end handler now.
 3230|       |     */
 3231|      0|    if (parser->m_endNamespaceDeclHandler)
  ------------------
  |  Branch (3231:9): [True: 0, False: 0]
  ------------------
 3232|      0|      parser->m_endNamespaceDeclHandler(parser->m_handlerArg, b->prefix->name);
 3233|       |
 3234|      0|    bindings = bindings->nextTagBinding;
 3235|      0|    b->nextTagBinding = parser->m_freeBindingList;
 3236|      0|    parser->m_freeBindingList = b;
 3237|      0|    b->prefix->binding = b->prevPrefixBinding;
 3238|      0|  }
 3239|  9.43k|}
xmlparse.c:epilogProcessor:
 5647|    154|                const char **nextPtr) {
 5648|    154|  parser->m_processor = epilogProcessor;
 5649|    154|  parser->m_eventPtr = s;
 5650|  1.18k|  for (;;) {
 5651|  1.18k|    const char *next = NULL;
 5652|  1.18k|    int tok = XmlPrologTok(parser->m_encoding, s, end, &next);
  ------------------
  |  |  227|  1.18k|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|  1.18k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5653|  1.18k|#ifdef XML_DTD
 5654|  1.18k|    if (! accountingDiffTolerated(parser, tok, s, next, __LINE__,
  ------------------
  |  Branch (5654:9): [True: 0, False: 1.18k]
  ------------------
 5655|  1.18k|                                  XML_ACCOUNT_DIRECT)) {
 5656|      0|      accountingOnAbort(parser);
 5657|      0|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 5658|      0|    }
 5659|  1.18k|#endif
 5660|  1.18k|    parser->m_eventEndPtr = next;
 5661|  1.18k|    switch (tok) {
 5662|       |    /* report partial linebreak - it might be the last token */
 5663|      1|    case -XML_TOK_PROLOG_S:
  ------------------
  |  |   82|      1|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (5663:5): [True: 1, False: 1.18k]
  ------------------
 5664|      1|      if (parser->m_defaultHandler) {
  ------------------
  |  Branch (5664:11): [True: 0, False: 1]
  ------------------
 5665|      0|        reportDefault(parser, parser->m_encoding, s, next);
 5666|      0|        if (parser->m_parsingStatus.parsing == XML_FINISHED)
  ------------------
  |  Branch (5666:13): [True: 0, False: 0]
  ------------------
 5667|      0|          return XML_ERROR_ABORTED;
 5668|      0|      }
 5669|      1|      *nextPtr = next;
 5670|      1|      return XML_ERROR_NONE;
 5671|     63|    case XML_TOK_NONE:
  ------------------
  |  |   51|     63|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (5671:5): [True: 63, False: 1.11k]
  ------------------
 5672|     63|      *nextPtr = s;
 5673|     63|      return XML_ERROR_NONE;
 5674|    392|    case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    392|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (5674:5): [True: 392, False: 790]
  ------------------
 5675|    392|      if (parser->m_defaultHandler)
  ------------------
  |  Branch (5675:11): [True: 0, False: 392]
  ------------------
 5676|      0|        reportDefault(parser, parser->m_encoding, s, next);
 5677|    392|      break;
 5678|    436|    case XML_TOK_PI:
  ------------------
  |  |   76|    436|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (5678:5): [True: 436, False: 746]
  ------------------
 5679|    436|      if (! reportProcessingInstruction(parser, parser->m_encoding, s, next))
  ------------------
  |  Branch (5679:11): [True: 0, False: 436]
  ------------------
 5680|      0|        return XML_ERROR_NO_MEMORY;
 5681|    436|      break;
 5682|    436|    case XML_TOK_COMMENT:
  ------------------
  |  |   78|    200|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (5682:5): [True: 200, False: 982]
  ------------------
 5683|    200|      if (! reportComment(parser, parser->m_encoding, s, next))
  ------------------
  |  Branch (5683:11): [True: 0, False: 200]
  ------------------
 5684|      0|        return XML_ERROR_NO_MEMORY;
 5685|    200|      break;
 5686|    200|    case XML_TOK_INVALID:
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (5686:5): [True: 14, False: 1.16k]
  ------------------
 5687|     14|      parser->m_eventPtr = next;
 5688|     14|      return XML_ERROR_INVALID_TOKEN;
 5689|      4|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (5689:5): [True: 4, False: 1.17k]
  ------------------
 5690|      4|      if (! parser->m_parsingStatus.finalBuffer) {
  ------------------
  |  Branch (5690:11): [True: 4, False: 0]
  ------------------
 5691|      4|        *nextPtr = s;
 5692|      4|        return XML_ERROR_NONE;
 5693|      4|      }
 5694|      0|      return XML_ERROR_UNCLOSED_TOKEN;
 5695|      1|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (5695:5): [True: 1, False: 1.18k]
  ------------------
 5696|      1|      if (! parser->m_parsingStatus.finalBuffer) {
  ------------------
  |  Branch (5696:11): [True: 1, False: 0]
  ------------------
 5697|      1|        *nextPtr = s;
 5698|      1|        return XML_ERROR_NONE;
 5699|      1|      }
 5700|      0|      return XML_ERROR_PARTIAL_CHAR;
 5701|     71|    default:
  ------------------
  |  Branch (5701:5): [True: 71, False: 1.11k]
  ------------------
 5702|     71|      return XML_ERROR_JUNK_AFTER_DOC_ELEMENT;
 5703|  1.18k|    }
 5704|  1.02k|    parser->m_eventPtr = s = next;
 5705|  1.02k|    switch (parser->m_parsingStatus.parsing) {
 5706|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (5706:5): [True: 0, False: 1.02k]
  ------------------
 5707|      0|      *nextPtr = next;
 5708|      0|      return XML_ERROR_NONE;
 5709|      0|    case XML_FINISHED:
  ------------------
  |  Branch (5709:5): [True: 0, False: 1.02k]
  ------------------
 5710|      0|      return XML_ERROR_ABORTED;
 5711|  1.02k|    default:;
  ------------------
  |  Branch (5711:5): [True: 1.02k, False: 0]
  ------------------
 5712|  1.02k|    }
 5713|  1.02k|  }
 5714|    154|}
xmlparse.c:doCdataSection:
 4027|  3.51k|               enum XML_Account account) {
 4028|  3.51k|  const char *s = *startPtr;
 4029|  3.51k|  const char **eventPP;
 4030|  3.51k|  const char **eventEndPP;
 4031|  3.51k|  if (enc == parser->m_encoding) {
  ------------------
  |  Branch (4031:7): [True: 2.18k, False: 1.33k]
  ------------------
 4032|  2.18k|    eventPP = &parser->m_eventPtr;
 4033|  2.18k|    *eventPP = s;
 4034|  2.18k|    eventEndPP = &parser->m_eventEndPtr;
 4035|  2.18k|  } else {
 4036|  1.33k|    eventPP = &(parser->m_openInternalEntities->internalEventPtr);
 4037|  1.33k|    eventEndPP = &(parser->m_openInternalEntities->internalEventEndPtr);
 4038|  1.33k|  }
 4039|  3.51k|  *eventPP = s;
 4040|  3.51k|  *startPtr = NULL;
 4041|       |
 4042|   251k|  for (;;) {
 4043|   251k|    const char *next = s; /* in case of XML_TOK_NONE or XML_TOK_PARTIAL */
 4044|   251k|    int tok = XmlCdataSectionTok(enc, s, end, &next);
  ------------------
  |  |  233|   251k|  XmlTok(enc, XML_CDATA_SECTION_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|   251k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 4045|   251k|#ifdef XML_DTD
 4046|   251k|    if (! accountingDiffTolerated(parser, tok, s, next, __LINE__, account)) {
  ------------------
  |  Branch (4046:9): [True: 1, False: 251k]
  ------------------
 4047|      1|      accountingOnAbort(parser);
 4048|      1|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 4049|      1|    }
 4050|       |#else
 4051|       |    UNUSED_P(account);
 4052|       |#endif
 4053|   251k|    *eventEndPP = next;
 4054|   251k|    switch (tok) {
 4055|  2.64k|    case XML_TOK_CDATA_SECT_CLOSE:
  ------------------
  |  |  113|  2.64k|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  |  Branch (4055:5): [True: 2.64k, False: 248k]
  ------------------
 4056|  2.64k|      if (parser->m_endCdataSectionHandler)
  ------------------
  |  Branch (4056:11): [True: 0, False: 2.64k]
  ------------------
 4057|      0|        parser->m_endCdataSectionHandler(parser->m_handlerArg);
 4058|       |      /* BEGIN disabled code */
 4059|       |      /* see comment under XML_TOK_CDATA_SECT_OPEN */
 4060|  2.64k|      else if ((0) && parser->m_characterDataHandler)
  ------------------
  |  Branch (4060:16): [Folded - Ignored]
  |  Branch (4060:23): [True: 0, False: 0]
  ------------------
 4061|      0|        parser->m_characterDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 4062|      0|                                       0);
 4063|       |      /* END disabled code */
 4064|  2.64k|      else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4064:16): [True: 0, False: 2.64k]
  ------------------
 4065|      0|        reportDefault(parser, enc, s, next);
 4066|  2.64k|      *startPtr = next;
 4067|  2.64k|      *nextPtr = next;
 4068|  2.64k|      if (parser->m_parsingStatus.parsing == XML_FINISHED)
  ------------------
  |  Branch (4068:11): [True: 0, False: 2.64k]
  ------------------
 4069|      0|        return XML_ERROR_ABORTED;
 4070|  2.64k|      else
 4071|  2.64k|        return XML_ERROR_NONE;
 4072|   112k|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|   112k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (4072:5): [True: 112k, False: 139k]
  ------------------
 4073|   112k|      if (parser->m_characterDataHandler) {
  ------------------
  |  Branch (4073:11): [True: 0, False: 112k]
  ------------------
 4074|      0|        XML_Char c = 0xA;
 4075|      0|        parser->m_characterDataHandler(parser->m_handlerArg, &c, 1);
 4076|   112k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4076:18): [True: 0, False: 112k]
  ------------------
 4077|      0|        reportDefault(parser, enc, s, next);
 4078|   112k|      break;
 4079|   135k|    case XML_TOK_DATA_CHARS: {
  ------------------
  |  |   67|   135k|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (4079:5): [True: 135k, False: 115k]
  ------------------
 4080|   135k|      XML_CharacterDataHandler charDataHandler = parser->m_characterDataHandler;
 4081|   135k|      if (charDataHandler) {
  ------------------
  |  Branch (4081:11): [True: 0, False: 135k]
  ------------------
 4082|      0|        if (MUST_CONVERT(enc, s)) {
  ------------------
  |  |  165|      0|#  define MUST_CONVERT(enc, s) (! (enc)->isUtf8)
  |  |  ------------------
  |  |  |  Branch (165:32): [True: 0, False: 0]
  |  |  ------------------
  ------------------
 4083|      0|          for (;;) {
 4084|      0|            ICHAR *dataPtr = (ICHAR *)parser->m_dataBuf;
 4085|      0|            const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  161|      0|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|      0|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 4086|      0|                enc, &s, next, &dataPtr, (ICHAR *)parser->m_dataBufEnd);
 4087|      0|            *eventEndPP = next;
 4088|      0|            charDataHandler(parser->m_handlerArg, parser->m_dataBuf,
 4089|      0|                            (int)(dataPtr - (ICHAR *)parser->m_dataBuf));
 4090|      0|            if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (4090:17): [True: 0, False: 0]
  ------------------
 4091|      0|                || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (4091:20): [True: 0, False: 0]
  ------------------
 4092|      0|              break;
 4093|      0|            *eventPP = s;
 4094|      0|          }
 4095|      0|        } else
 4096|      0|          charDataHandler(parser->m_handlerArg, (const XML_Char *)s,
 4097|      0|                          (int)((const XML_Char *)next - (const XML_Char *)s));
 4098|   135k|      } else if (parser->m_defaultHandler)
  ------------------
  |  Branch (4098:18): [True: 0, False: 135k]
  ------------------
 4099|      0|        reportDefault(parser, enc, s, next);
 4100|   135k|    } break;
 4101|    133|    case XML_TOK_INVALID:
  ------------------
  |  |   57|    133|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (4101:5): [True: 133, False: 251k]
  ------------------
 4102|    133|      *eventPP = next;
 4103|    133|      return XML_ERROR_INVALID_TOKEN;
 4104|    126|    case XML_TOK_PARTIAL_CHAR:
  ------------------
  |  |   55|    126|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  ------------------
  |  Branch (4104:5): [True: 126, False: 251k]
  ------------------
 4105|    126|      if (haveMore) {
  ------------------
  |  Branch (4105:11): [True: 126, False: 0]
  ------------------
 4106|    126|        *nextPtr = s;
 4107|    126|        return XML_ERROR_NONE;
 4108|    126|      }
 4109|      0|      return XML_ERROR_PARTIAL_CHAR;
 4110|    104|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|    104|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (4110:5): [True: 104, False: 251k]
  ------------------
 4111|    607|    case XML_TOK_NONE:
  ------------------
  |  |   51|    607|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (4111:5): [True: 503, False: 251k]
  ------------------
 4112|    607|      if (haveMore) {
  ------------------
  |  Branch (4112:11): [True: 530, False: 77]
  ------------------
 4113|    530|        *nextPtr = s;
 4114|    530|        return XML_ERROR_NONE;
 4115|    530|      }
 4116|     77|      return XML_ERROR_UNCLOSED_CDATA_SECTION;
 4117|      0|    default:
  ------------------
  |  Branch (4117:5): [True: 0, False: 251k]
  ------------------
 4118|       |      /* Every token returned by XmlCdataSectionTok() has its own
 4119|       |       * explicit case, so this default case will never be executed.
 4120|       |       * We retain it as a safety net and exclude it from the coverage
 4121|       |       * statistics.
 4122|       |       *
 4123|       |       * LCOV_EXCL_START
 4124|       |       */
 4125|      0|      *eventPP = next;
 4126|      0|      return XML_ERROR_UNEXPECTED_STATE;
 4127|       |      /* LCOV_EXCL_STOP */
 4128|   251k|    }
 4129|       |
 4130|   248k|    *eventPP = s = next;
 4131|   248k|    switch (parser->m_parsingStatus.parsing) {
 4132|      0|    case XML_SUSPENDED:
  ------------------
  |  Branch (4132:5): [True: 0, False: 248k]
  ------------------
 4133|      0|      *nextPtr = next;
 4134|      0|      return XML_ERROR_NONE;
 4135|      0|    case XML_FINISHED:
  ------------------
  |  Branch (4135:5): [True: 0, False: 248k]
  ------------------
 4136|      0|      return XML_ERROR_ABORTED;
 4137|   248k|    default:;
  ------------------
  |  Branch (4137:5): [True: 248k, False: 0]
  ------------------
 4138|   248k|    }
 4139|   248k|  }
 4140|       |  /* not reached */
 4141|  3.51k|}
xmlparse.c:storeRawNames:
 2572|  7.23k|storeRawNames(XML_Parser parser) {
 2573|  7.23k|  TAG *tag = parser->m_tagStack;
 2574|  88.3k|  while (tag) {
  ------------------
  |  Branch (2574:10): [True: 81.1k, False: 7.23k]
  ------------------
 2575|  81.1k|    int bufSize;
 2576|  81.1k|    int nameLen = sizeof(XML_Char) * (tag->name.strLen + 1);
 2577|  81.1k|    size_t rawNameLen;
 2578|  81.1k|    char *rawNameBuf = tag->buf + nameLen;
 2579|       |    /* Stop if already stored.  Since m_tagStack is a stack, we can stop
 2580|       |       at the first entry that has already been copied; everything
 2581|       |       below it in the stack is already been accounted for in a
 2582|       |       previous call to this function.
 2583|       |    */
 2584|  81.1k|    if (tag->rawName == rawNameBuf)
  ------------------
  |  Branch (2584:9): [True: 0, False: 81.1k]
  ------------------
 2585|      0|      break;
 2586|       |    /* For re-use purposes we need to ensure that the
 2587|       |       size of tag->buf is a multiple of sizeof(XML_Char).
 2588|       |    */
 2589|  81.1k|    rawNameLen = ROUND_UP(tag->rawNameLength, sizeof(XML_Char));
  ------------------
  |  |  197|  81.1k|#define ROUND_UP(n, sz) (((n) + ((sz)-1)) & ~((sz)-1))
  ------------------
 2590|       |    /* Detect and prevent integer overflow. */
 2591|  81.1k|    if (rawNameLen > (size_t)INT_MAX - nameLen)
  ------------------
  |  Branch (2591:9): [True: 0, False: 81.1k]
  ------------------
 2592|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2593|  81.1k|    bufSize = nameLen + (int)rawNameLen;
 2594|  81.1k|    if (bufSize > tag->bufEnd - tag->buf) {
  ------------------
  |  Branch (2594:9): [True: 516, False: 80.5k]
  ------------------
 2595|    516|      char *temp = (char *)REALLOC(parser, tag->buf, bufSize);
  ------------------
  |  |  715|    516|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 2596|    516|      if (temp == NULL)
  ------------------
  |  Branch (2596:11): [True: 0, False: 516]
  ------------------
 2597|      0|        return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 2598|       |      /* if tag->name.str points to tag->buf (only when namespace
 2599|       |         processing is off) then we have to update it
 2600|       |      */
 2601|    516|      if (tag->name.str == (XML_Char *)tag->buf)
  ------------------
  |  Branch (2601:11): [True: 516, False: 0]
  ------------------
 2602|    516|        tag->name.str = (XML_Char *)temp;
 2603|       |      /* if tag->name.localPart is set (when namespace processing is on)
 2604|       |         then update it as well, since it will always point into tag->buf
 2605|       |      */
 2606|    516|      if (tag->name.localPart)
  ------------------
  |  Branch (2606:11): [True: 0, False: 516]
  ------------------
 2607|      0|        tag->name.localPart
 2608|      0|            = (XML_Char *)temp + (tag->name.localPart - (XML_Char *)tag->buf);
 2609|    516|      tag->buf = temp;
 2610|    516|      tag->bufEnd = temp + bufSize;
 2611|    516|      rawNameBuf = temp + nameLen;
 2612|    516|    }
 2613|  81.1k|    memcpy(rawNameBuf, tag->rawName, tag->rawNameLength);
 2614|  81.1k|    tag->rawName = rawNameBuf;
 2615|  81.1k|    tag = tag->parent;
 2616|  81.1k|  }
 2617|  7.23k|  return XML_TRUE;
  ------------------
  |  |   55|  7.23k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 2618|  7.23k|}
xmlparse.c:getElementType:
 7615|  10.4k|               const char *end) {
 7616|  10.4k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 7617|  10.4k|  const XML_Char *name = poolStoreString(&dtd->pool, enc, ptr, end);
 7618|  10.4k|  ELEMENT_TYPE *ret;
 7619|       |
 7620|  10.4k|  if (! name)
  ------------------
  |  Branch (7620:7): [True: 0, False: 10.4k]
  ------------------
 7621|      0|    return NULL;
 7622|  10.4k|  ret = (ELEMENT_TYPE *)lookup(parser, &dtd->elementTypes, name,
 7623|  10.4k|                               sizeof(ELEMENT_TYPE));
 7624|  10.4k|  if (! ret)
  ------------------
  |  Branch (7624:7): [True: 0, False: 10.4k]
  ------------------
 7625|      0|    return NULL;
 7626|  10.4k|  if (ret->name != name)
  ------------------
  |  Branch (7626:7): [True: 2.98k, False: 7.48k]
  ------------------
 7627|  2.98k|    poolDiscard(&dtd->pool);
  ------------------
  |  |  600|  2.98k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 7628|  7.48k|  else {
 7629|  7.48k|    poolFinish(&dtd->pool);
  ------------------
  |  |  601|  7.48k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 7630|  7.48k|    if (! setElementTypePrefix(parser, ret))
  ------------------
  |  Branch (7630:9): [True: 0, False: 7.48k]
  ------------------
 7631|      0|      return NULL;
 7632|  7.48k|  }
 7633|  10.4k|  return ret;
 7634|  10.4k|}
xmlparse.c:getAttributeId:
 6477|  36.8k|               const char *end) {
 6478|  36.8k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6479|  36.8k|  ATTRIBUTE_ID *id;
 6480|  36.8k|  const XML_Char *name;
 6481|  36.8k|  if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  603|  36.8k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 365, False: 36.5k]
  |  |  |  Branch (603:35): [True: 0, False: 365]
  |  |  ------------------
  |  |  604|  36.8k|       ? 0                                                                     \
  |  |  605|  36.8k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6481:7): [True: 0, False: 36.8k]
  ------------------
 6482|      0|    return NULL;
 6483|  36.8k|  name = poolStoreString(&dtd->pool, enc, start, end);
 6484|  36.8k|  if (! name)
  ------------------
  |  Branch (6484:7): [True: 0, False: 36.8k]
  ------------------
 6485|      0|    return NULL;
 6486|       |  /* skip quotation mark - its storage will be re-used (like in name[-1]) */
 6487|  36.8k|  ++name;
 6488|  36.8k|  id = (ATTRIBUTE_ID *)lookup(parser, &dtd->attributeIds, name,
 6489|  36.8k|                              sizeof(ATTRIBUTE_ID));
 6490|  36.8k|  if (! id)
  ------------------
  |  Branch (6490:7): [True: 0, False: 36.8k]
  ------------------
 6491|      0|    return NULL;
 6492|  36.8k|  if (id->name != name)
  ------------------
  |  Branch (6492:7): [True: 29.7k, False: 7.09k]
  ------------------
 6493|  29.7k|    poolDiscard(&dtd->pool);
  ------------------
  |  |  600|  29.7k|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6494|  7.09k|  else {
 6495|  7.09k|    poolFinish(&dtd->pool);
  ------------------
  |  |  601|  7.09k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6496|  7.09k|    if (! parser->m_ns)
  ------------------
  |  Branch (6496:9): [True: 7.09k, False: 0]
  ------------------
 6497|  7.09k|      ;
 6498|      0|    else if (name[0] == XML_T(ASCII_x) && name[1] == XML_T(ASCII_m)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
                  else if (name[0] == XML_T(ASCII_x) && name[1] == XML_T(ASCII_m)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6498:14): [True: 0, False: 0]
  |  Branch (6498:43): [True: 0, False: 0]
  ------------------
 6499|      0|             && name[2] == XML_T(ASCII_l) && name[3] == XML_T(ASCII_n)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
                           && name[2] == XML_T(ASCII_l) && name[3] == XML_T(ASCII_n)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6499:17): [True: 0, False: 0]
  |  Branch (6499:46): [True: 0, False: 0]
  ------------------
 6500|      0|             && name[4] == XML_T(ASCII_s)
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6500:17): [True: 0, False: 0]
  ------------------
 6501|      0|             && (name[5] == XML_T('\0') || name[5] == XML_T(ASCII_COLON))) {
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
                           && (name[5] == XML_T('\0') || name[5] == XML_T(ASCII_COLON))) {
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6501:18): [True: 0, False: 0]
  |  Branch (6501:44): [True: 0, False: 0]
  ------------------
 6502|      0|      if (name[5] == XML_T('\0'))
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6502:11): [True: 0, False: 0]
  ------------------
 6503|      0|        id->prefix = &dtd->defaultPrefix;
 6504|      0|      else
 6505|      0|        id->prefix = (PREFIX *)lookup(parser, &dtd->prefixes, name + 6,
 6506|      0|                                      sizeof(PREFIX));
 6507|      0|      id->xmlns = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6508|      0|    } else {
 6509|      0|      int i;
 6510|      0|      for (i = 0; name[i]; i++) {
  ------------------
  |  Branch (6510:19): [True: 0, False: 0]
  ------------------
 6511|       |        /* attributes without prefix are *not* in the default namespace */
 6512|      0|        if (name[i] == XML_T(ASCII_COLON)) {
  ------------------
  |  |  191|      0|#  define XML_T(x) x
  ------------------
  |  Branch (6512:13): [True: 0, False: 0]
  ------------------
 6513|      0|          int j;
 6514|      0|          for (j = 0; j < i; j++) {
  ------------------
  |  Branch (6514:23): [True: 0, False: 0]
  ------------------
 6515|      0|            if (! poolAppendChar(&dtd->pool, name[j]))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6515:17): [True: 0, False: 0]
  ------------------
 6516|      0|              return NULL;
 6517|      0|          }
 6518|      0|          if (! poolAppendChar(&dtd->pool, XML_T('\0')))
  ------------------
  |  |  603|      0|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 0, False: 0]
  |  |  |  Branch (603:35): [True: 0, False: 0]
  |  |  ------------------
  |  |  604|      0|       ? 0                                                                     \
  |  |  605|      0|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (6518:15): [True: 0, False: 0]
  ------------------
 6519|      0|            return NULL;
 6520|      0|          id->prefix = (PREFIX *)lookup(parser, &dtd->prefixes,
 6521|      0|                                        poolStart(&dtd->pool), sizeof(PREFIX));
  ------------------
  |  |  596|      0|#define poolStart(pool) ((pool)->start)
  ------------------
 6522|      0|          if (! id->prefix)
  ------------------
  |  Branch (6522:15): [True: 0, False: 0]
  ------------------
 6523|      0|            return NULL;
 6524|      0|          if (id->prefix->name == poolStart(&dtd->pool))
  ------------------
  |  |  596|      0|#define poolStart(pool) ((pool)->start)
  ------------------
  |  Branch (6524:15): [True: 0, False: 0]
  ------------------
 6525|      0|            poolFinish(&dtd->pool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6526|      0|          else
 6527|      0|            poolDiscard(&dtd->pool);
  ------------------
  |  |  600|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6528|      0|          break;
 6529|      0|        }
 6530|      0|      }
 6531|      0|    }
 6532|  7.09k|  }
 6533|  36.8k|  return id;
 6534|  36.8k|}
xmlparse.c:poolAppend:
 7221|  30.8M|           const char *end) {
 7222|  30.8M|  if (! pool->ptr && ! poolGrow(pool))
  ------------------
  |  Branch (7222:7): [True: 22.5k, False: 30.8M]
  |  Branch (7222:22): [True: 0, False: 22.5k]
  ------------------
 7223|      0|    return NULL;
 7224|  30.8M|  for (;;) {
 7225|  30.8M|    const enum XML_Convert_Result convert_res = XmlConvert(
  ------------------
  |  |  161|  30.8M|#  define XmlConvert XmlUtf8Convert
  |  |  ------------------
  |  |  |  |  276|  30.8M|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  |  |  ------------------
  ------------------
 7226|  30.8M|        enc, &ptr, end, (ICHAR **)&(pool->ptr), (const ICHAR *)pool->end);
 7227|  30.8M|    if ((convert_res == XML_CONVERT_COMPLETED)
  ------------------
  |  Branch (7227:9): [True: 30.8M, False: 12.4k]
  ------------------
 7228|  30.8M|        || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
  ------------------
  |  Branch (7228:12): [True: 0, False: 12.4k]
  ------------------
 7229|  30.8M|      break;
 7230|  12.4k|    if (! poolGrow(pool))
  ------------------
  |  Branch (7230:9): [True: 0, False: 12.4k]
  ------------------
 7231|      0|      return NULL;
 7232|  12.4k|  }
 7233|  30.8M|  return pool->start;
 7234|  30.8M|}
xmlparse.c:defineAttribute:
 6387|  13.0k|                XML_Bool isId, const XML_Char *value, XML_Parser parser) {
 6388|  13.0k|  DEFAULT_ATTRIBUTE *att;
 6389|  13.0k|  if (value || isId) {
  ------------------
  |  Branch (6389:7): [True: 7.23k, False: 5.83k]
  |  Branch (6389:16): [True: 1.95k, False: 3.88k]
  ------------------
 6390|       |    /* The handling of default attributes gets messed up if we have
 6391|       |       a default which duplicates a non-default. */
 6392|  9.18k|    int i;
 6393|  23.5k|    for (i = 0; i < type->nDefaultAtts; i++)
  ------------------
  |  Branch (6393:17): [True: 21.6k, False: 1.88k]
  ------------------
 6394|  21.6k|      if (attId == type->defaultAtts[i].id)
  ------------------
  |  Branch (6394:11): [True: 7.30k, False: 14.3k]
  ------------------
 6395|  7.30k|        return 1;
 6396|  1.88k|    if (isId && ! type->idAtt && ! attId->xmlns)
  ------------------
  |  Branch (6396:9): [True: 533, False: 1.35k]
  |  Branch (6396:17): [True: 369, False: 164]
  |  Branch (6396:34): [True: 369, False: 0]
  ------------------
 6397|    369|      type->idAtt = attId;
 6398|  1.88k|  }
 6399|  5.76k|  if (type->nDefaultAtts == type->allocDefaultAtts) {
  ------------------
  |  Branch (6399:7): [True: 1.30k, False: 4.46k]
  ------------------
 6400|  1.30k|    if (type->allocDefaultAtts == 0) {
  ------------------
  |  Branch (6400:9): [True: 1.07k, False: 229]
  ------------------
 6401|  1.07k|      type->allocDefaultAtts = 8;
 6402|  1.07k|      type->defaultAtts = (DEFAULT_ATTRIBUTE *)MALLOC(
  ------------------
  |  |  714|  1.07k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 6403|  1.07k|          parser, type->allocDefaultAtts * sizeof(DEFAULT_ATTRIBUTE));
 6404|  1.07k|      if (! type->defaultAtts) {
  ------------------
  |  Branch (6404:11): [True: 0, False: 1.07k]
  ------------------
 6405|      0|        type->allocDefaultAtts = 0;
 6406|      0|        return 0;
 6407|      0|      }
 6408|  1.07k|    } else {
 6409|    229|      DEFAULT_ATTRIBUTE *temp;
 6410|       |
 6411|       |      /* Detect and prevent integer overflow */
 6412|    229|      if (type->allocDefaultAtts > INT_MAX / 2) {
  ------------------
  |  Branch (6412:11): [True: 0, False: 229]
  ------------------
 6413|      0|        return 0;
 6414|      0|      }
 6415|       |
 6416|    229|      int count = type->allocDefaultAtts * 2;
 6417|       |
 6418|       |      /* Detect and prevent integer overflow.
 6419|       |       * The preprocessor guard addresses the "always false" warning
 6420|       |       * from -Wtype-limits on platforms where
 6421|       |       * sizeof(unsigned int) < sizeof(size_t), e.g. on x86_64. */
 6422|       |#if UINT_MAX >= SIZE_MAX
 6423|       |      if ((unsigned)count > (size_t)(-1) / sizeof(DEFAULT_ATTRIBUTE)) {
 6424|       |        return 0;
 6425|       |      }
 6426|       |#endif
 6427|       |
 6428|    229|      temp = (DEFAULT_ATTRIBUTE *)REALLOC(parser, type->defaultAtts,
  ------------------
  |  |  715|    229|#define REALLOC(parser, p, s) (parser->m_mem.realloc_fcn((p), (s)))
  ------------------
 6429|    229|                                          (count * sizeof(DEFAULT_ATTRIBUTE)));
 6430|    229|      if (temp == NULL)
  ------------------
  |  Branch (6430:11): [True: 0, False: 229]
  ------------------
 6431|      0|        return 0;
 6432|    229|      type->allocDefaultAtts = count;
 6433|    229|      type->defaultAtts = temp;
 6434|    229|    }
 6435|  1.30k|  }
 6436|  5.76k|  att = type->defaultAtts + type->nDefaultAtts;
 6437|  5.76k|  att->id = attId;
 6438|  5.76k|  att->value = value;
 6439|  5.76k|  att->isCdata = isCdata;
 6440|  5.76k|  if (! isCdata)
  ------------------
  |  Branch (6440:7): [True: 5.54k, False: 222]
  ------------------
 6441|  5.54k|    attId->maybeTokenized = XML_TRUE;
  ------------------
  |  |   55|  5.54k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6442|  5.76k|  type->nDefaultAtts += 1;
 6443|  5.76k|  return 1;
 6444|  5.76k|}
xmlparse.c:poolGrow:
 7322|  50.0k|poolGrow(STRING_POOL *pool) {
 7323|  50.0k|  if (pool->freeBlocks) {
  ------------------
  |  Branch (7323:7): [True: 20.3k, False: 29.7k]
  ------------------
 7324|  20.3k|    if (pool->start == 0) {
  ------------------
  |  Branch (7324:9): [True: 17.8k, False: 2.44k]
  ------------------
 7325|  17.8k|      pool->blocks = pool->freeBlocks;
 7326|  17.8k|      pool->freeBlocks = pool->freeBlocks->next;
 7327|  17.8k|      pool->blocks->next = NULL;
 7328|  17.8k|      pool->start = pool->blocks->s;
 7329|  17.8k|      pool->end = pool->start + pool->blocks->size;
 7330|  17.8k|      pool->ptr = pool->start;
 7331|  17.8k|      return XML_TRUE;
  ------------------
  |  |   55|  17.8k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7332|  17.8k|    }
 7333|  2.44k|    if (pool->end - pool->start < pool->freeBlocks->size) {
  ------------------
  |  Branch (7333:9): [True: 2.16k, False: 286]
  ------------------
 7334|  2.16k|      BLOCK *tem = pool->freeBlocks->next;
 7335|  2.16k|      pool->freeBlocks->next = pool->blocks;
 7336|  2.16k|      pool->blocks = pool->freeBlocks;
 7337|  2.16k|      pool->freeBlocks = tem;
 7338|  2.16k|      memcpy(pool->blocks->s, pool->start,
 7339|  2.16k|             (pool->end - pool->start) * sizeof(XML_Char));
 7340|  2.16k|      pool->ptr = pool->blocks->s + (pool->ptr - pool->start);
 7341|  2.16k|      pool->start = pool->blocks->s;
 7342|  2.16k|      pool->end = pool->start + pool->blocks->size;
 7343|  2.16k|      return XML_TRUE;
  ------------------
  |  |   55|  2.16k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7344|  2.16k|    }
 7345|  2.44k|  }
 7346|  30.0k|  if (pool->blocks && pool->start == pool->blocks->s) {
  ------------------
  |  Branch (7346:7): [True: 11.8k, False: 18.1k]
  |  Branch (7346:23): [True: 9.04k, False: 2.80k]
  ------------------
 7347|  9.04k|    BLOCK *temp;
 7348|  9.04k|    int blockSize = (int)((unsigned)(pool->end - pool->start) * 2U);
 7349|  9.04k|    size_t bytesToAllocate;
 7350|       |
 7351|       |    /* NOTE: Needs to be calculated prior to calling `realloc`
 7352|       |             to avoid dangling pointers: */
 7353|  9.04k|    const ptrdiff_t offsetInsideBlock = pool->ptr - pool->start;
 7354|       |
 7355|  9.04k|    if (blockSize < 0) {
  ------------------
  |  Branch (7355:9): [True: 0, False: 9.04k]
  ------------------
 7356|       |      /* This condition traps a situation where either more than
 7357|       |       * INT_MAX/2 bytes have already been allocated.  This isn't
 7358|       |       * readily testable, since it is unlikely that an average
 7359|       |       * machine will have that much memory, so we exclude it from the
 7360|       |       * coverage statistics.
 7361|       |       */
 7362|      0|      return XML_FALSE; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7363|      0|    }
 7364|       |
 7365|  9.04k|    bytesToAllocate = poolBytesToAllocateFor(blockSize);
 7366|  9.04k|    if (bytesToAllocate == 0)
  ------------------
  |  Branch (7366:9): [True: 0, False: 9.04k]
  ------------------
 7367|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7368|       |
 7369|  9.04k|    temp = (BLOCK *)pool->mem->realloc_fcn(pool->blocks,
 7370|  9.04k|                                           (unsigned)bytesToAllocate);
 7371|  9.04k|    if (temp == NULL)
  ------------------
  |  Branch (7371:9): [True: 0, False: 9.04k]
  ------------------
 7372|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7373|  9.04k|    pool->blocks = temp;
 7374|  9.04k|    pool->blocks->size = blockSize;
 7375|  9.04k|    pool->ptr = pool->blocks->s + offsetInsideBlock;
 7376|  9.04k|    pool->start = pool->blocks->s;
 7377|  9.04k|    pool->end = pool->start + blockSize;
 7378|  20.9k|  } else {
 7379|  20.9k|    BLOCK *tem;
 7380|  20.9k|    int blockSize = (int)(pool->end - pool->start);
 7381|  20.9k|    size_t bytesToAllocate;
 7382|       |
 7383|  20.9k|    if (blockSize < 0) {
  ------------------
  |  Branch (7383:9): [True: 0, False: 20.9k]
  ------------------
 7384|       |      /* This condition traps a situation where either more than
 7385|       |       * INT_MAX bytes have already been allocated (which is prevented
 7386|       |       * by various pieces of program logic, not least this one, never
 7387|       |       * mind the unlikelihood of actually having that much memory) or
 7388|       |       * the pool control fields have been corrupted (which could
 7389|       |       * conceivably happen in an extremely buggy user handler
 7390|       |       * function).  Either way it isn't readily testable, so we
 7391|       |       * exclude it from the coverage statistics.
 7392|       |       */
 7393|      0|      return XML_FALSE; /* LCOV_EXCL_LINE */
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7394|      0|    }
 7395|       |
 7396|  20.9k|    if (blockSize < INIT_BLOCK_SIZE)
  ------------------
  |  |  246|  20.9k|#define INIT_BLOCK_SIZE 1024
  ------------------
  |  Branch (7396:9): [True: 20.6k, False: 325]
  ------------------
 7397|  20.6k|      blockSize = INIT_BLOCK_SIZE;
  ------------------
  |  |  246|  20.6k|#define INIT_BLOCK_SIZE 1024
  ------------------
 7398|    325|    else {
 7399|       |      /* Detect overflow, avoiding _signed_ overflow undefined behavior */
 7400|    325|      if ((int)((unsigned)blockSize * 2U) < 0) {
  ------------------
  |  Branch (7400:11): [True: 0, False: 325]
  ------------------
 7401|      0|        return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7402|      0|      }
 7403|    325|      blockSize *= 2;
 7404|    325|    }
 7405|       |
 7406|  20.9k|    bytesToAllocate = poolBytesToAllocateFor(blockSize);
 7407|  20.9k|    if (bytesToAllocate == 0)
  ------------------
  |  Branch (7407:9): [True: 0, False: 20.9k]
  ------------------
 7408|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7409|       |
 7410|  20.9k|    tem = pool->mem->malloc_fcn(bytesToAllocate);
 7411|  20.9k|    if (! tem)
  ------------------
  |  Branch (7411:9): [True: 0, False: 20.9k]
  ------------------
 7412|      0|      return XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 7413|  20.9k|    tem->size = blockSize;
 7414|  20.9k|    tem->next = pool->blocks;
 7415|  20.9k|    pool->blocks = tem;
 7416|  20.9k|    if (pool->ptr != pool->start)
  ------------------
  |  Branch (7416:9): [True: 2.41k, False: 18.5k]
  ------------------
 7417|  2.41k|      memcpy(tem->s, pool->start, (pool->ptr - pool->start) * sizeof(XML_Char));
 7418|  20.9k|    pool->ptr = tem->s + (pool->ptr - pool->start);
 7419|  20.9k|    pool->start = tem->s;
 7420|  20.9k|    pool->end = tem->s + blockSize;
 7421|  20.9k|  }
 7422|  30.0k|  return XML_TRUE;
  ------------------
  |  |   55|  30.0k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 7423|  30.0k|}
xmlparse.c:poolBytesToAllocateFor:
 7294|  30.0k|poolBytesToAllocateFor(int blockSize) {
 7295|       |  /* Unprotected math would be:
 7296|       |  ** return offsetof(BLOCK, s) + blockSize * sizeof(XML_Char);
 7297|       |  **
 7298|       |  ** Detect overflow, avoiding _signed_ overflow undefined behavior
 7299|       |  ** For a + b * c we check b * c in isolation first, so that addition of a
 7300|       |  ** on top has no chance of making us accept a small non-negative number
 7301|       |  */
 7302|  30.0k|  const size_t stretch = sizeof(XML_Char); /* can be 4 bytes */
 7303|       |
 7304|  30.0k|  if (blockSize <= 0)
  ------------------
  |  Branch (7304:7): [True: 0, False: 30.0k]
  ------------------
 7305|      0|    return 0;
 7306|       |
 7307|  30.0k|  if (blockSize > (int)(INT_MAX / stretch))
  ------------------
  |  Branch (7307:7): [True: 0, False: 30.0k]
  ------------------
 7308|      0|    return 0;
 7309|       |
 7310|  30.0k|  {
 7311|  30.0k|    const int stretchedBlockSize = blockSize * (int)stretch;
 7312|  30.0k|    const int bytesToAllocate
 7313|  30.0k|        = (int)(offsetof(BLOCK, s) + (unsigned)stretchedBlockSize);
 7314|  30.0k|    if (bytesToAllocate < 0)
  ------------------
  |  Branch (7314:9): [True: 0, False: 30.0k]
  ------------------
 7315|      0|      return 0;
 7316|       |
 7317|  30.0k|    return (size_t)bytesToAllocate;
 7318|  30.0k|  }
 7319|  30.0k|}
xmlparse.c:storeAttributeValue:
 5872|  18.3k|                    enum XML_Account account) {
 5873|  18.3k|  enum XML_Error result
 5874|  18.3k|      = appendAttributeValue(parser, enc, isCdata, ptr, end, pool, account);
 5875|  18.3k|  if (result)
  ------------------
  |  Branch (5875:7): [True: 269, False: 18.0k]
  ------------------
 5876|    269|    return result;
 5877|  18.0k|  if (! isCdata && poolLength(pool) && poolLastChar(pool) == 0x20)
  ------------------
  |  |  597|  25.8k|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  |  |  ------------------
  |  |  |  Branch (597:26): [True: 3.97k, False: 3.84k]
  |  |  ------------------
  ------------------
                if (! isCdata && poolLength(pool) && poolLastChar(pool) == 0x20)
  ------------------
  |  |  599|  3.97k|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5877:7): [True: 7.81k, False: 10.2k]
  |  Branch (5877:40): [True: 1.80k, False: 2.17k]
  ------------------
 5878|  1.80k|    poolChop(pool);
  ------------------
  |  |  598|  1.80k|#define poolChop(pool) ((void)--(pool->ptr))
  ------------------
 5879|  18.0k|  if (! poolAppendChar(pool, XML_T('\0')))
  ------------------
  |  |  603|  18.0k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 773, False: 17.2k]
  |  |  |  Branch (603:35): [True: 0, False: 773]
  |  |  ------------------
  |  |  604|  18.0k|       ? 0                                                                     \
  |  |  605|  18.0k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5879:7): [True: 0, False: 18.0k]
  ------------------
 5880|      0|    return XML_ERROR_NO_MEMORY;
 5881|  18.0k|  return XML_ERROR_NONE;
 5882|  18.0k|}
xmlparse.c:appendAttributeValue:
 5887|  2.14M|                     enum XML_Account account) {
 5888|  2.14M|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 5889|       |#ifndef XML_DTD
 5890|       |  UNUSED_P(account);
 5891|       |#endif
 5892|       |
 5893|   100M|  for (;;) {
 5894|   100M|    const char *next
 5895|   100M|        = ptr; /* XmlAttributeValueTok doesn't always set the last arg */
 5896|   100M|    int tok = XmlAttributeValueTok(enc, ptr, end, &next);
  ------------------
  |  |  249|   100M|  XmlLiteralTok(enc, XML_ATTRIBUTE_VALUE_LITERAL, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  246|   100M|  (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5897|   100M|#ifdef XML_DTD
 5898|   100M|    if (! accountingDiffTolerated(parser, tok, ptr, next, __LINE__, account)) {
  ------------------
  |  Branch (5898:9): [True: 50, False: 100M]
  ------------------
 5899|     50|      accountingOnAbort(parser);
 5900|     50|      return XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 5901|     50|    }
 5902|   100M|#endif
 5903|   100M|    switch (tok) {
 5904|  2.14M|    case XML_TOK_NONE:
  ------------------
  |  |   51|  2.14M|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (5904:5): [True: 2.14M, False: 98.0M]
  ------------------
 5905|  2.14M|      return XML_ERROR_NONE;
 5906|      7|    case XML_TOK_INVALID:
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (5906:5): [True: 7, False: 100M]
  ------------------
 5907|      7|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (5907:11): [True: 4, False: 3]
  ------------------
 5908|      4|        parser->m_eventPtr = next;
 5909|      7|      return XML_ERROR_INVALID_TOKEN;
 5910|      5|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (5910:5): [True: 5, False: 100M]
  ------------------
 5911|      5|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (5911:11): [True: 4, False: 1]
  ------------------
 5912|      4|        parser->m_eventPtr = ptr;
 5913|      5|      return XML_ERROR_INVALID_TOKEN;
 5914|  4.82k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  4.82k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (5914:5): [True: 4.82k, False: 100M]
  ------------------
 5915|  4.82k|      XML_Char buf[XML_ENCODE_MAX];
 5916|  4.82k|      int i;
 5917|  4.82k|      int n = XmlCharRefNumber(enc, ptr);
  ------------------
  |  |  264|  4.82k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 5918|  4.82k|      if (n < 0) {
  ------------------
  |  Branch (5918:11): [True: 53, False: 4.77k]
  ------------------
 5919|     53|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (5919:13): [True: 53, False: 0]
  ------------------
 5920|     53|          parser->m_eventPtr = ptr;
 5921|     53|        return XML_ERROR_BAD_CHAR_REF;
 5922|     53|      }
 5923|  4.77k|      if (! isCdata && n == 0x20 /* space */
  ------------------
  |  Branch (5923:11): [True: 891, False: 3.88k]
  |  Branch (5923:24): [True: 609, False: 282]
  ------------------
 5924|  4.77k|          && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  597|    609|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
                        && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  599|    413|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5924:15): [True: 196, False: 413]
  |  Branch (5924:40): [True: 213, False: 200]
  ------------------
 5925|    409|        break;
 5926|  4.36k|      n = XmlEncode(n, (ICHAR *)buf);
  ------------------
  |  |  164|  4.36k|#  define XmlEncode XmlUtf8Encode
  ------------------
 5927|       |      /* The XmlEncode() functions can never return 0 here.  That
 5928|       |       * error return happens if the code point passed in is either
 5929|       |       * negative or greater than or equal to 0x110000.  The
 5930|       |       * XmlCharRefNumber() functions will all return a number
 5931|       |       * strictly less than 0x110000 or a negative value if an error
 5932|       |       * occurred.  The negative value is intercepted above, so
 5933|       |       * XmlEncode() is never passed a value it might return an
 5934|       |       * error for.
 5935|       |       */
 5936|  14.3k|      for (i = 0; i < n; i++) {
  ------------------
  |  Branch (5936:19): [True: 9.99k, False: 4.36k]
  ------------------
 5937|  9.99k|        if (! poolAppendChar(pool, buf[i]))
  ------------------
  |  |  603|  9.99k|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 366, False: 9.63k]
  |  |  |  Branch (603:35): [True: 0, False: 366]
  |  |  ------------------
  |  |  604|  9.99k|       ? 0                                                                     \
  |  |  605|  9.99k|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5937:13): [True: 0, False: 9.99k]
  ------------------
 5938|      0|          return XML_ERROR_NO_MEMORY;
 5939|  9.99k|      }
 5940|  4.36k|    } break;
 5941|  27.4M|    case XML_TOK_DATA_CHARS:
  ------------------
  |  |   67|  27.4M|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (5941:5): [True: 27.4M, False: 72.7M]
  ------------------
 5942|  27.4M|      if (! poolAppend(pool, enc, ptr, next))
  ------------------
  |  Branch (5942:11): [True: 0, False: 27.4M]
  ------------------
 5943|      0|        return XML_ERROR_NO_MEMORY;
 5944|  27.4M|      break;
 5945|  27.4M|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|  1.93k|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (5945:5): [True: 1.93k, False: 100M]
  ------------------
 5946|  1.93k|      next = ptr + enc->minBytesPerChar;
 5947|       |      /* fall through */
 5948|  5.83M|    case XML_TOK_ATTRIBUTE_VALUE_S:
  ------------------
  |  |  110|  5.83M|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
  |  Branch (5948:5): [True: 5.83M, False: 94.3M]
  ------------------
 5949|  67.4M|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|  67.4M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (5949:5): [True: 61.6M, False: 38.6M]
  ------------------
 5950|  67.4M|      if (! isCdata && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  597|  15.7k|#define poolLength(pool) ((pool)->ptr - (pool)->start)
  ------------------
                    if (! isCdata && (poolLength(pool) == 0 || poolLastChar(pool) == 0x20))
  ------------------
  |  |  599|  12.3k|#define poolLastChar(pool) (((pool)->ptr)[-1])
  ------------------
  |  Branch (5950:11): [True: 15.7k, False: 67.4M]
  |  Branch (5950:25): [True: 3.36k, False: 12.3k]
  |  Branch (5950:50): [True: 4.84k, False: 7.53k]
  ------------------
 5951|  8.21k|        break;
 5952|  67.4M|      if (! poolAppendChar(pool, 0x20))
  ------------------
  |  |  603|  67.4M|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 2.27k, False: 67.4M]
  |  |  |  Branch (603:35): [True: 0, False: 2.27k]
  |  |  ------------------
  |  |  604|  67.4M|       ? 0                                                                     \
  |  |  605|  67.4M|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5952:11): [True: 0, False: 67.4M]
  ------------------
 5953|      0|        return XML_ERROR_NO_MEMORY;
 5954|  67.4M|      break;
 5955|  67.4M|    case XML_TOK_ENTITY_REF: {
  ------------------
  |  |   70|  3.15M|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (5955:5): [True: 3.15M, False: 97.0M]
  ------------------
 5956|  3.15M|      const XML_Char *name;
 5957|  3.15M|      ENTITY *entity;
 5958|  3.15M|      char checkEntityDecl;
 5959|  3.15M|      XML_Char ch = (XML_Char)XmlPredefinedEntityName(
  ------------------
  |  |  267|  3.15M|  (((enc)->predefinedEntityName)(enc, ptr, end))
  ------------------
 5960|  3.15M|          enc, ptr + enc->minBytesPerChar, next - enc->minBytesPerChar);
 5961|  3.15M|      if (ch) {
  ------------------
  |  Branch (5961:11): [True: 1.03M, False: 2.12M]
  ------------------
 5962|  1.03M|#ifdef XML_DTD
 5963|       |        /* NOTE: We are replacing 4-6 characters original input for 1 character
 5964|       |         *       so there is no amplification and hence recording without
 5965|       |         *       protection. */
 5966|  1.03M|        accountingDiffTolerated(parser, tok, (char *)&ch,
 5967|  1.03M|                                ((char *)&ch) + sizeof(XML_Char), __LINE__,
 5968|  1.03M|                                XML_ACCOUNT_ENTITY_EXPANSION);
 5969|  1.03M|#endif /* XML_DTD */
 5970|  1.03M|        if (! poolAppendChar(pool, ch))
  ------------------
  |  |  603|  1.03M|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 229, False: 1.02M]
  |  |  |  Branch (603:35): [True: 0, False: 229]
  |  |  ------------------
  |  |  604|  1.03M|       ? 0                                                                     \
  |  |  605|  1.03M|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (5970:13): [True: 0, False: 1.03M]
  ------------------
 5971|      0|          return XML_ERROR_NO_MEMORY;
 5972|  1.03M|        break;
 5973|  1.03M|      }
 5974|  2.12M|      name = poolStoreString(&parser->m_temp2Pool, enc,
 5975|  2.12M|                             ptr + enc->minBytesPerChar,
 5976|  2.12M|                             next - enc->minBytesPerChar);
 5977|  2.12M|      if (! name)
  ------------------
  |  Branch (5977:11): [True: 0, False: 2.12M]
  ------------------
 5978|      0|        return XML_ERROR_NO_MEMORY;
 5979|  2.12M|      entity = (ENTITY *)lookup(parser, &dtd->generalEntities, name, 0);
 5980|  2.12M|      poolDiscard(&parser->m_temp2Pool);
  ------------------
  |  |  600|  2.12M|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 5981|       |      /* First, determine if a check for an existing declaration is needed;
 5982|       |         if yes, check that the entity exists, and that it is internal.
 5983|       |      */
 5984|  2.12M|      if (pool == &dtd->pool) /* are we called from prolog? */
  ------------------
  |  Branch (5984:11): [True: 24.2k, False: 2.10M]
  ------------------
 5985|  24.2k|        checkEntityDecl =
 5986|  24.2k|#ifdef XML_DTD
 5987|  24.2k|            parser->m_prologState.documentEntity &&
  ------------------
  |  Branch (5987:13): [True: 24.2k, False: 0]
  ------------------
 5988|  24.2k|#endif /* XML_DTD */
 5989|  24.2k|            (dtd->standalone ? ! parser->m_openInternalEntities
  ------------------
  |  Branch (5989:13): [True: 24.2k, False: 0]
  |  Branch (5989:14): [True: 201, False: 24.0k]
  ------------------
 5990|  24.2k|                             : ! dtd->hasParamEntityRefs);
 5991|  2.10M|      else /* if (pool == &parser->m_tempPool): we are called from content */
 5992|  2.10M|        checkEntityDecl = ! dtd->hasParamEntityRefs || dtd->standalone;
  ------------------
  |  Branch (5992:27): [True: 2.10M, False: 988]
  |  Branch (5992:56): [True: 0, False: 988]
  ------------------
 5993|  2.12M|      if (checkEntityDecl) {
  ------------------
  |  Branch (5993:11): [True: 2.12M, False: 988]
  ------------------
 5994|  2.12M|        if (! entity)
  ------------------
  |  Branch (5994:13): [True: 146, False: 2.12M]
  ------------------
 5995|    146|          return XML_ERROR_UNDEFINED_ENTITY;
 5996|  2.12M|        else if (! entity->is_internal)
  ------------------
  |  Branch (5996:18): [True: 0, False: 2.12M]
  ------------------
 5997|      0|          return XML_ERROR_ENTITY_DECLARED_IN_PE;
 5998|  2.12M|      } else if (! entity) {
  ------------------
  |  Branch (5998:18): [True: 769, False: 219]
  ------------------
 5999|       |        /* Cannot report skipped entity here - see comments on
 6000|       |           parser->m_skippedEntityHandler.
 6001|       |        if (parser->m_skippedEntityHandler)
 6002|       |          parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 6003|       |        */
 6004|       |        /* Cannot call the default handler because this would be
 6005|       |           out of sync with the call to the startElementHandler.
 6006|       |        if ((pool == &parser->m_tempPool) && parser->m_defaultHandler)
 6007|       |          reportDefault(parser, enc, ptr, next);
 6008|       |        */
 6009|    769|        break;
 6010|    769|      }
 6011|  2.12M|      if (entity->open) {
  ------------------
  |  Branch (6011:11): [True: 4, False: 2.12M]
  ------------------
 6012|      4|        if (enc == parser->m_encoding) {
  ------------------
  |  Branch (6012:13): [True: 0, False: 4]
  ------------------
 6013|       |          /* It does not appear that this line can be executed.
 6014|       |           *
 6015|       |           * The "if (entity->open)" check catches recursive entity
 6016|       |           * definitions.  In order to be called with an open
 6017|       |           * entity, it must have gone through this code before and
 6018|       |           * been through the recursive call to
 6019|       |           * appendAttributeValue() some lines below.  That call
 6020|       |           * sets the local encoding ("enc") to the parser's
 6021|       |           * internal encoding (internal_utf8 or internal_utf16),
 6022|       |           * which can never be the same as the principle encoding.
 6023|       |           * It doesn't appear there is another code path that gets
 6024|       |           * here with entity->open being TRUE.
 6025|       |           *
 6026|       |           * Since it is not certain that this logic is watertight,
 6027|       |           * we keep the line and merely exclude it from coverage
 6028|       |           * tests.
 6029|       |           */
 6030|      0|          parser->m_eventPtr = ptr; /* LCOV_EXCL_LINE */
 6031|      0|        }
 6032|      4|        return XML_ERROR_RECURSIVE_ENTITY_REF;
 6033|      4|      }
 6034|  2.12M|      if (entity->notation) {
  ------------------
  |  Branch (6034:11): [True: 2, False: 2.12M]
  ------------------
 6035|      2|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (6035:13): [True: 1, False: 1]
  ------------------
 6036|      1|          parser->m_eventPtr = ptr;
 6037|      2|        return XML_ERROR_BINARY_ENTITY_REF;
 6038|      2|      }
 6039|  2.12M|      if (! entity->textPtr) {
  ------------------
  |  Branch (6039:11): [True: 2, False: 2.12M]
  ------------------
 6040|      2|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (6040:13): [True: 1, False: 1]
  ------------------
 6041|      1|          parser->m_eventPtr = ptr;
 6042|      2|        return XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF;
 6043|  2.12M|      } else {
 6044|  2.12M|        enum XML_Error result;
 6045|  2.12M|        const XML_Char *textEnd = entity->textPtr + entity->textLen;
 6046|  2.12M|        entity->open = XML_TRUE;
  ------------------
  |  |   55|  2.12M|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6047|  2.12M|#ifdef XML_DTD
 6048|  2.12M|        entityTrackingOnOpen(parser, entity, __LINE__);
 6049|  2.12M|#endif
 6050|  2.12M|        result = appendAttributeValue(parser, parser->m_internalEncoding,
 6051|  2.12M|                                      isCdata, (const char *)entity->textPtr,
 6052|  2.12M|                                      (const char *)textEnd, pool,
 6053|  2.12M|                                      XML_ACCOUNT_ENTITY_EXPANSION);
 6054|  2.12M|#ifdef XML_DTD
 6055|  2.12M|        entityTrackingOnClose(parser, entity, __LINE__);
 6056|  2.12M|#endif
 6057|  2.12M|        entity->open = XML_FALSE;
  ------------------
  |  |   56|  2.12M|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6058|  2.12M|        if (result)
  ------------------
  |  Branch (6058:13): [True: 273, False: 2.12M]
  ------------------
 6059|    273|          return result;
 6060|  2.12M|      }
 6061|  2.12M|    } break;
 6062|  2.12M|    default:
  ------------------
  |  Branch (6062:5): [True: 0, False: 100M]
  ------------------
 6063|       |      /* The only token returned by XmlAttributeValueTok() that does
 6064|       |       * not have an explicit case here is XML_TOK_PARTIAL_CHAR.
 6065|       |       * Getting that would require an entity name to contain an
 6066|       |       * incomplete XML character (e.g. \xE2\x82); however previous
 6067|       |       * tokenisers will have already recognised and rejected such
 6068|       |       * names before XmlAttributeValueTok() gets a look-in.  This
 6069|       |       * default case should be retained as a safety net, but the code
 6070|       |       * excluded from coverage tests.
 6071|       |       *
 6072|       |       * LCOV_EXCL_START
 6073|       |       */
 6074|      0|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6074:11): [True: 0, False: 0]
  ------------------
 6075|      0|        parser->m_eventPtr = ptr;
 6076|      0|      return XML_ERROR_UNEXPECTED_STATE;
 6077|       |      /* LCOV_EXCL_STOP */
 6078|   100M|    }
 6079|  98.0M|    ptr = next;
 6080|  98.0M|  }
 6081|       |  /* not reached */
 6082|  2.14M|}
xmlparse.c:storeEntityValue:
 6087|  8.37k|                 enum XML_Account account) {
 6088|  8.37k|  DTD *const dtd = parser->m_dtd; /* save one level of indirection */
 6089|  8.37k|  STRING_POOL *pool = &(dtd->entityValuePool);
 6090|  8.37k|  enum XML_Error result = XML_ERROR_NONE;
 6091|  8.37k|#ifdef XML_DTD
 6092|  8.37k|  int oldInEntityValue = parser->m_prologState.inEntityValue;
 6093|  8.37k|  parser->m_prologState.inEntityValue = 1;
 6094|       |#else
 6095|       |  UNUSED_P(account);
 6096|       |#endif /* XML_DTD */
 6097|       |  /* never return Null for the value argument in EntityDeclHandler,
 6098|       |     since this would indicate an external entity; therefore we
 6099|       |     have to make sure that entityValuePool.start is not null */
 6100|  8.37k|  if (! pool->blocks) {
  ------------------
  |  Branch (6100:7): [True: 2.53k, False: 5.84k]
  ------------------
 6101|  2.53k|    if (! poolGrow(pool))
  ------------------
  |  Branch (6101:9): [True: 0, False: 2.53k]
  ------------------
 6102|      0|      return XML_ERROR_NO_MEMORY;
 6103|  2.53k|  }
 6104|       |
 6105|  1.12M|  for (;;) {
 6106|  1.12M|    const char *next
 6107|  1.12M|        = entityTextPtr; /* XmlEntityValueTok doesn't always set the last arg */
 6108|  1.12M|    int tok = XmlEntityValueTok(enc, entityTextPtr, entityTextEnd, &next);
  ------------------
  |  |  252|  1.12M|  XmlLiteralTok(enc, XML_ENTITY_VALUE_LITERAL, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  246|  1.12M|  (((enc)->literalScanners[literalType])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 6109|       |
 6110|  1.12M|#ifdef XML_DTD
 6111|  1.12M|    if (! accountingDiffTolerated(parser, tok, entityTextPtr, next, __LINE__,
  ------------------
  |  Branch (6111:9): [True: 0, False: 1.12M]
  ------------------
 6112|  1.12M|                                  account)) {
 6113|      0|      accountingOnAbort(parser);
 6114|      0|      result = XML_ERROR_AMPLIFICATION_LIMIT_BREACH;
 6115|      0|      goto endEntityValue;
 6116|      0|    }
 6117|  1.12M|#endif
 6118|       |
 6119|  1.12M|    switch (tok) {
 6120|      2|    case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|      2|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (6120:5): [True: 2, False: 1.12M]
  ------------------
 6121|      2|#ifdef XML_DTD
 6122|      2|      if (parser->m_isParamEntity || enc != parser->m_encoding) {
  ------------------
  |  Branch (6122:11): [True: 0, False: 2]
  |  Branch (6122:38): [True: 0, False: 2]
  ------------------
 6123|      0|        const XML_Char *name;
 6124|      0|        ENTITY *entity;
 6125|      0|        name = poolStoreString(&parser->m_tempPool, enc,
 6126|      0|                               entityTextPtr + enc->minBytesPerChar,
 6127|      0|                               next - enc->minBytesPerChar);
 6128|      0|        if (! name) {
  ------------------
  |  Branch (6128:13): [True: 0, False: 0]
  ------------------
 6129|      0|          result = XML_ERROR_NO_MEMORY;
 6130|      0|          goto endEntityValue;
 6131|      0|        }
 6132|      0|        entity = (ENTITY *)lookup(parser, &dtd->paramEntities, name, 0);
 6133|      0|        poolDiscard(&parser->m_tempPool);
  ------------------
  |  |  600|      0|#define poolDiscard(pool) ((pool)->ptr = (pool)->start)
  ------------------
 6134|      0|        if (! entity) {
  ------------------
  |  Branch (6134:13): [True: 0, False: 0]
  ------------------
 6135|       |          /* not a well-formedness error - see XML 1.0: WFC Entity Declared */
 6136|       |          /* cannot report skipped entity here - see comments on
 6137|       |             parser->m_skippedEntityHandler
 6138|       |          if (parser->m_skippedEntityHandler)
 6139|       |            parser->m_skippedEntityHandler(parser->m_handlerArg, name, 0);
 6140|       |          */
 6141|      0|          dtd->keepProcessing = dtd->standalone;
 6142|      0|          goto endEntityValue;
 6143|      0|        }
 6144|      0|        if (entity->open) {
  ------------------
  |  Branch (6144:13): [True: 0, False: 0]
  ------------------
 6145|      0|          if (enc == parser->m_encoding)
  ------------------
  |  Branch (6145:15): [True: 0, False: 0]
  ------------------
 6146|      0|            parser->m_eventPtr = entityTextPtr;
 6147|      0|          result = XML_ERROR_RECURSIVE_ENTITY_REF;
 6148|      0|          goto endEntityValue;
 6149|      0|        }
 6150|      0|        if (entity->systemId) {
  ------------------
  |  Branch (6150:13): [True: 0, False: 0]
  ------------------
 6151|      0|          if (parser->m_externalEntityRefHandler) {
  ------------------
  |  Branch (6151:15): [True: 0, False: 0]
  ------------------
 6152|      0|            dtd->paramEntityRead = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6153|      0|            entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6154|      0|            entityTrackingOnOpen(parser, entity, __LINE__);
 6155|      0|            if (! parser->m_externalEntityRefHandler(
  ------------------
  |  Branch (6155:17): [True: 0, False: 0]
  ------------------
 6156|      0|                    parser->m_externalEntityRefHandlerArg, 0, entity->base,
 6157|      0|                    entity->systemId, entity->publicId)) {
 6158|      0|              entityTrackingOnClose(parser, entity, __LINE__);
 6159|      0|              entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6160|      0|              result = XML_ERROR_EXTERNAL_ENTITY_HANDLING;
 6161|      0|              goto endEntityValue;
 6162|      0|            }
 6163|      0|            entityTrackingOnClose(parser, entity, __LINE__);
 6164|      0|            entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6165|      0|            if (! dtd->paramEntityRead)
  ------------------
  |  Branch (6165:17): [True: 0, False: 0]
  ------------------
 6166|      0|              dtd->keepProcessing = dtd->standalone;
 6167|      0|          } else
 6168|      0|            dtd->keepProcessing = dtd->standalone;
 6169|      0|        } else {
 6170|      0|          entity->open = XML_TRUE;
  ------------------
  |  |   55|      0|#define XML_TRUE ((XML_Bool)1)
  ------------------
 6171|      0|          entityTrackingOnOpen(parser, entity, __LINE__);
 6172|      0|          result = storeEntityValue(
 6173|      0|              parser, parser->m_internalEncoding, (const char *)entity->textPtr,
 6174|      0|              (const char *)(entity->textPtr + entity->textLen),
 6175|      0|              XML_ACCOUNT_ENTITY_EXPANSION);
 6176|      0|          entityTrackingOnClose(parser, entity, __LINE__);
 6177|      0|          entity->open = XML_FALSE;
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 6178|      0|          if (result)
  ------------------
  |  Branch (6178:15): [True: 0, False: 0]
  ------------------
 6179|      0|            goto endEntityValue;
 6180|      0|        }
 6181|      0|        break;
 6182|      0|      }
 6183|      2|#endif /* XML_DTD */
 6184|       |      /* In the internal subset, PE references are not legal
 6185|       |         within markup declarations, e.g entity values in this case. */
 6186|      2|      parser->m_eventPtr = entityTextPtr;
 6187|      2|      result = XML_ERROR_PARAM_ENTITY_REF;
 6188|      2|      goto endEntityValue;
 6189|  8.30k|    case XML_TOK_NONE:
  ------------------
  |  |   51|  8.30k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  |  Branch (6189:5): [True: 8.30k, False: 1.11M]
  ------------------
 6190|  8.30k|      result = XML_ERROR_NONE;
 6191|  8.30k|      goto endEntityValue;
 6192|  9.23k|    case XML_TOK_ENTITY_REF:
  ------------------
  |  |   70|  9.23k|#define XML_TOK_ENTITY_REF 9
  ------------------
  |  Branch (6192:5): [True: 9.23k, False: 1.11M]
  ------------------
 6193|   264k|    case XML_TOK_DATA_CHARS:
  ------------------
  |  |   67|   264k|#define XML_TOK_DATA_CHARS 6
  ------------------
  |  Branch (6193:5): [True: 255k, False: 864k]
  ------------------
 6194|   264k|      if (! poolAppend(pool, enc, entityTextPtr, next)) {
  ------------------
  |  Branch (6194:11): [True: 0, False: 264k]
  ------------------
 6195|      0|        result = XML_ERROR_NO_MEMORY;
 6196|      0|        goto endEntityValue;
 6197|      0|      }
 6198|   264k|      break;
 6199|   264k|    case XML_TOK_TRAILING_CR:
  ------------------
  |  |   53|    815|  -3                            /* A CR at the end of the scan;                \
  ------------------
  |  Branch (6199:5): [True: 815, False: 1.11M]
  ------------------
 6200|    815|      next = entityTextPtr + enc->minBytesPerChar;
 6201|       |      /* fall through */
 6202|   841k|    case XML_TOK_DATA_NEWLINE:
  ------------------
  |  |   68|   841k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  |  Branch (6202:5): [True: 840k, False: 280k]
  ------------------
 6203|   841k|      if (pool->end == pool->ptr && ! poolGrow(pool)) {
  ------------------
  |  Branch (6203:11): [True: 64, False: 840k]
  |  Branch (6203:37): [True: 0, False: 64]
  ------------------
 6204|      0|        result = XML_ERROR_NO_MEMORY;
 6205|      0|        goto endEntityValue;
 6206|      0|      }
 6207|   841k|      *(pool->ptr)++ = 0xA;
 6208|   841k|      break;
 6209|  6.18k|    case XML_TOK_CHAR_REF: {
  ------------------
  |  |   71|  6.18k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  |  Branch (6209:5): [True: 6.18k, False: 1.11M]
  ------------------
 6210|  6.18k|      XML_Char buf[XML_ENCODE_MAX];
 6211|  6.18k|      int i;
 6212|  6.18k|      int n = XmlCharRefNumber(enc, entityTextPtr);
  ------------------
  |  |  264|  6.18k|#define XmlCharRefNumber(enc, ptr) (((enc)->charRefNumber)(enc, ptr))
  ------------------
 6213|  6.18k|      if (n < 0) {
  ------------------
  |  Branch (6213:11): [True: 3, False: 6.18k]
  ------------------
 6214|      3|        if (enc == parser->m_encoding)
  ------------------
  |  Branch (6214:13): [True: 3, False: 0]
  ------------------
 6215|      3|          parser->m_eventPtr = entityTextPtr;
 6216|      3|        result = XML_ERROR_BAD_CHAR_REF;
 6217|      3|        goto endEntityValue;
 6218|      3|      }
 6219|  6.18k|      n = XmlEncode(n, (ICHAR *)buf);
  ------------------
  |  |  164|  6.18k|#  define XmlEncode XmlUtf8Encode
  ------------------
 6220|       |      /* The XmlEncode() functions can never return 0 here.  That
 6221|       |       * error return happens if the code point passed in is either
 6222|       |       * negative or greater than or equal to 0x110000.  The
 6223|       |       * XmlCharRefNumber() functions will all return a number
 6224|       |       * strictly less than 0x110000 or a negative value if an error
 6225|       |       * occurred.  The negative value is intercepted above, so
 6226|       |       * XmlEncode() is never passed a value it might return an
 6227|       |       * error for.
 6228|       |       */
 6229|  21.5k|      for (i = 0; i < n; i++) {
  ------------------
  |  Branch (6229:19): [True: 15.3k, False: 6.18k]
  ------------------
 6230|  15.3k|        if (pool->end == pool->ptr && ! poolGrow(pool)) {
  ------------------
  |  Branch (6230:13): [True: 10, False: 15.3k]
  |  Branch (6230:39): [True: 0, False: 10]
  ------------------
 6231|      0|          result = XML_ERROR_NO_MEMORY;
 6232|      0|          goto endEntityValue;
 6233|      0|        }
 6234|  15.3k|        *(pool->ptr)++ = buf[i];
 6235|  15.3k|      }
 6236|  6.18k|    } break;
 6237|  6.18k|    case XML_TOK_PARTIAL:
  ------------------
  |  |   56|     47|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  |  Branch (6237:5): [True: 47, False: 1.12M]
  ------------------
 6238|     47|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6238:11): [True: 47, False: 0]
  ------------------
 6239|     47|        parser->m_eventPtr = entityTextPtr;
 6240|     47|      result = XML_ERROR_INVALID_TOKEN;
 6241|     47|      goto endEntityValue;
 6242|     21|    case XML_TOK_INVALID:
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (6242:5): [True: 21, False: 1.12M]
  ------------------
 6243|     21|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6243:11): [True: 21, False: 0]
  ------------------
 6244|     21|        parser->m_eventPtr = next;
 6245|     21|      result = XML_ERROR_INVALID_TOKEN;
 6246|     21|      goto endEntityValue;
 6247|      0|    default:
  ------------------
  |  Branch (6247:5): [True: 0, False: 1.12M]
  ------------------
 6248|       |      /* This default case should be unnecessary -- all the tokens
 6249|       |       * that XmlEntityValueTok() can return have their own explicit
 6250|       |       * cases -- but should be retained for safety.  We do however
 6251|       |       * exclude it from the coverage statistics.
 6252|       |       *
 6253|       |       * LCOV_EXCL_START
 6254|       |       */
 6255|      0|      if (enc == parser->m_encoding)
  ------------------
  |  Branch (6255:11): [True: 0, False: 0]
  ------------------
 6256|      0|        parser->m_eventPtr = entityTextPtr;
 6257|      0|      result = XML_ERROR_UNEXPECTED_STATE;
 6258|      0|      goto endEntityValue;
 6259|       |      /* LCOV_EXCL_STOP */
 6260|  1.12M|    }
 6261|  1.11M|    entityTextPtr = next;
 6262|  1.11M|  }
 6263|  8.37k|endEntityValue:
 6264|  8.37k|#ifdef XML_DTD
 6265|  8.37k|  parser->m_prologState.inEntityValue = oldInEntityValue;
 6266|  8.37k|#endif /* XML_DTD */
 6267|  8.37k|  return result;
 6268|  8.37k|}
xmlparse.c:processInternalEntity:
 5717|   880k|processInternalEntity(XML_Parser parser, ENTITY *entity, XML_Bool betweenDecl) {
 5718|   880k|  const char *textStart, *textEnd;
 5719|   880k|  const char *next;
 5720|   880k|  enum XML_Error result;
 5721|   880k|  OPEN_INTERNAL_ENTITY *openEntity;
 5722|       |
 5723|   880k|  if (parser->m_freeInternalEntities) {
  ------------------
  |  Branch (5723:7): [True: 879k, False: 1.97k]
  ------------------
 5724|   879k|    openEntity = parser->m_freeInternalEntities;
 5725|   879k|    parser->m_freeInternalEntities = openEntity->next;
 5726|   879k|  } else {
 5727|  1.97k|    openEntity
 5728|  1.97k|        = (OPEN_INTERNAL_ENTITY *)MALLOC(parser, sizeof(OPEN_INTERNAL_ENTITY));
  ------------------
  |  |  714|  1.97k|#define MALLOC(parser, s) (parser->m_mem.malloc_fcn((s)))
  ------------------
 5729|  1.97k|    if (! openEntity)
  ------------------
  |  Branch (5729:9): [True: 0, False: 1.97k]
  ------------------
 5730|      0|      return XML_ERROR_NO_MEMORY;
 5731|  1.97k|  }
 5732|   880k|  entity->open = XML_TRUE;
  ------------------
  |  |   55|   880k|#define XML_TRUE ((XML_Bool)1)
  ------------------
 5733|   880k|#ifdef XML_DTD
 5734|   880k|  entityTrackingOnOpen(parser, entity, __LINE__);
 5735|   880k|#endif
 5736|   880k|  entity->processed = 0;
 5737|   880k|  openEntity->next = parser->m_openInternalEntities;
 5738|   880k|  parser->m_openInternalEntities = openEntity;
 5739|   880k|  openEntity->entity = entity;
 5740|   880k|  openEntity->startTagLevel = parser->m_tagLevel;
 5741|   880k|  openEntity->betweenDecl = betweenDecl;
 5742|   880k|  openEntity->internalEventPtr = NULL;
 5743|   880k|  openEntity->internalEventEndPtr = NULL;
 5744|   880k|  textStart = (const char *)entity->textPtr;
 5745|   880k|  textEnd = (const char *)(entity->textPtr + entity->textLen);
 5746|       |  /* Set a safe default value in case 'next' does not get set */
 5747|   880k|  next = textStart;
 5748|       |
 5749|   880k|#ifdef XML_DTD
 5750|   880k|  if (entity->is_param) {
  ------------------
  |  Branch (5750:7): [True: 0, False: 880k]
  ------------------
 5751|      0|    int tok
 5752|      0|        = XmlPrologTok(parser->m_internalEncoding, textStart, textEnd, &next);
  ------------------
  |  |  227|      0|  XmlTok(enc, XML_PROLOG_STATE, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |  224|      0|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  |  |  ------------------
  ------------------
 5753|      0|    result = doProlog(parser, parser->m_internalEncoding, textStart, textEnd,
 5754|      0|                      tok, next, &next, XML_FALSE, XML_FALSE,
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
                                    tok, next, &next, XML_FALSE, XML_FALSE,
  ------------------
  |  |   56|      0|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5755|      0|                      XML_ACCOUNT_ENTITY_EXPANSION);
 5756|      0|  } else
 5757|   880k|#endif /* XML_DTD */
 5758|   880k|    result = doContent(parser, parser->m_tagLevel, parser->m_internalEncoding,
 5759|   880k|                       textStart, textEnd, &next, XML_FALSE,
  ------------------
  |  |   56|   880k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5760|   880k|                       XML_ACCOUNT_ENTITY_EXPANSION);
 5761|       |
 5762|   880k|  if (result == XML_ERROR_NONE) {
  ------------------
  |  Branch (5762:7): [True: 880k, False: 974]
  ------------------
 5763|   880k|    if (textEnd != next && parser->m_parsingStatus.parsing == XML_SUSPENDED) {
  ------------------
  |  Branch (5763:9): [True: 0, False: 880k]
  |  Branch (5763:28): [True: 0, False: 0]
  ------------------
 5764|      0|      entity->processed = (int)(next - textStart);
 5765|      0|      parser->m_processor = internalEntityProcessor;
 5766|   880k|    } else {
 5767|   880k|#ifdef XML_DTD
 5768|   880k|      entityTrackingOnClose(parser, entity, __LINE__);
 5769|   880k|#endif /* XML_DTD */
 5770|   880k|      entity->open = XML_FALSE;
  ------------------
  |  |   56|   880k|#define XML_FALSE ((XML_Bool)0)
  ------------------
 5771|   880k|      parser->m_openInternalEntities = openEntity->next;
 5772|       |      /* put openEntity back in list of free instances */
 5773|   880k|      openEntity->next = parser->m_freeInternalEntities;
 5774|   880k|      parser->m_freeInternalEntities = openEntity;
 5775|   880k|    }
 5776|   880k|  }
 5777|   880k|  return result;
 5778|   880k|}
xmlparse.c:entityTrackingOnOpen:
 7828|  3.00M|entityTrackingOnOpen(XML_Parser originParser, ENTITY *entity, int sourceLine) {
 7829|  3.00M|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7830|  3.00M|  assert(! rootParser->m_parentParser);
 7831|       |
 7832|      0|  rootParser->m_entity_stats.countEverOpened++;
 7833|  3.00M|  rootParser->m_entity_stats.currentDepth++;
 7834|  3.00M|  if (rootParser->m_entity_stats.currentDepth
  ------------------
  |  Branch (7834:7): [True: 3.45k, False: 3.00M]
  ------------------
 7835|  3.00M|      > rootParser->m_entity_stats.maximumDepthSeen) {
 7836|  3.45k|    rootParser->m_entity_stats.maximumDepthSeen++;
 7837|  3.45k|  }
 7838|       |
 7839|  3.00M|  entityTrackingReportStats(rootParser, entity, "OPEN ", sourceLine);
 7840|  3.00M|}
xmlparse.c:entityTrackingReportStats:
 7805|  6.01M|                          const char *action, int sourceLine) {
 7806|  6.01M|  assert(! rootParser->m_parentParser);
 7807|  6.01M|  if (rootParser->m_entity_stats.debugLevel == 0u)
  ------------------
  |  Branch (7807:7): [True: 6.01M, False: 0]
  ------------------
 7808|  6.01M|    return;
 7809|       |
 7810|       |#  if defined(XML_UNICODE)
 7811|       |  const char *const entityName = "[..]";
 7812|       |#  else
 7813|      0|  const char *const entityName = entity->name;
 7814|      0|#  endif
 7815|       |
 7816|      0|  fprintf(
 7817|      0|      stderr,
 7818|      0|      "expat: Entities(%p): Count %9d, depth %2d/%2d %*s%s%s; %s length %d (xmlparse.c:%d)\n",
 7819|      0|      (void *)rootParser, rootParser->m_entity_stats.countEverOpened,
 7820|      0|      rootParser->m_entity_stats.currentDepth,
 7821|      0|      rootParser->m_entity_stats.maximumDepthSeen,
 7822|      0|      (rootParser->m_entity_stats.currentDepth - 1) * 2, "",
 7823|      0|      entity->is_param ? "%" : "&", entityName, action, entity->textLen,
  ------------------
  |  Branch (7823:7): [True: 0, False: 0]
  ------------------
 7824|      0|      sourceLine);
 7825|      0|}
xmlparse.c:entityTrackingOnClose:
 7843|  3.00M|entityTrackingOnClose(XML_Parser originParser, ENTITY *entity, int sourceLine) {
 7844|  3.00M|  const XML_Parser rootParser = getRootParserOf(originParser, NULL);
 7845|  3.00M|  assert(! rootParser->m_parentParser);
 7846|       |
 7847|      0|  entityTrackingReportStats(rootParser, entity, "CLOSE", sourceLine);
 7848|  3.00M|  rootParser->m_entity_stats.currentDepth--;
 7849|  3.00M|}
xmlparse.c:reportProcessingInstruction:
 6293|  18.1k|                            const char *start, const char *end) {
 6294|  18.1k|  const XML_Char *target;
 6295|  18.1k|  XML_Char *data;
 6296|  18.1k|  const char *tem;
 6297|  18.1k|  if (! parser->m_processingInstructionHandler) {
  ------------------
  |  Branch (6297:7): [True: 18.1k, False: 0]
  ------------------
 6298|  18.1k|    if (parser->m_defaultHandler)
  ------------------
  |  Branch (6298:9): [True: 0, False: 18.1k]
  ------------------
 6299|      0|      reportDefault(parser, enc, start, end);
 6300|  18.1k|    return 1;
 6301|  18.1k|  }
 6302|      0|  start += enc->minBytesPerChar * 2;
 6303|      0|  tem = start + XmlNameLength(enc, start);
  ------------------
  |  |  257|      0|#define XmlNameLength(enc, ptr) (((enc)->nameLength)(enc, ptr))
  ------------------
 6304|      0|  target = poolStoreString(&parser->m_tempPool, enc, start, tem);
 6305|      0|  if (! target)
  ------------------
  |  Branch (6305:7): [True: 0, False: 0]
  ------------------
 6306|      0|    return 0;
 6307|      0|  poolFinish(&parser->m_tempPool);
  ------------------
  |  |  601|      0|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 6308|      0|  data = poolStoreString(&parser->m_tempPool, enc, XmlSkipS(enc, tem),
  ------------------
  |  |  259|      0|#define XmlSkipS(enc, ptr) (((enc)->skipS)(enc, ptr))
  ------------------
 6309|      0|                         end - enc->minBytesPerChar * 2);
 6310|      0|  if (! data)
  ------------------
  |  Branch (6310:7): [True: 0, False: 0]
  ------------------
 6311|      0|    return 0;
 6312|      0|  normalizeLines(data);
 6313|      0|  parser->m_processingInstructionHandler(parser->m_handlerArg, target, data);
 6314|      0|  poolClear(&parser->m_tempPool);
 6315|      0|  return 1;
 6316|      0|}
xmlparse.c:reportComment:
 6320|  2.59k|              const char *end) {
 6321|  2.59k|  XML_Char *data;
 6322|  2.59k|  if (! parser->m_commentHandler) {
  ------------------
  |  Branch (6322:7): [True: 2.59k, False: 0]
  ------------------
 6323|  2.59k|    if (parser->m_defaultHandler)
  ------------------
  |  Branch (6323:9): [True: 0, False: 2.59k]
  ------------------
 6324|      0|      reportDefault(parser, enc, start, end);
 6325|  2.59k|    return 1;
 6326|  2.59k|  }
 6327|      0|  data = poolStoreString(&parser->m_tempPool, enc,
 6328|      0|                         start + enc->minBytesPerChar * 4,
 6329|      0|                         end - enc->minBytesPerChar * 3);
 6330|      0|  if (! data)
  ------------------
  |  Branch (6330:7): [True: 0, False: 0]
  ------------------
 6331|      0|    return 0;
 6332|      0|  normalizeLines(data);
 6333|      0|  parser->m_commentHandler(parser->m_handlerArg, data);
 6334|      0|  poolClear(&parser->m_tempPool);
 6335|      0|  return 1;
 6336|      0|}
xmlparse.c:getDebugLevel:
 8391|  39.9k|getDebugLevel(const char *variableName, unsigned long defaultDebugLevel) {
 8392|  39.9k|  const char *const valueOrNull = getenv(variableName);
 8393|  39.9k|  if (valueOrNull == NULL) {
  ------------------
  |  Branch (8393:7): [True: 39.9k, False: 0]
  ------------------
 8394|  39.9k|    return defaultDebugLevel;
 8395|  39.9k|  }
 8396|      0|  const char *const value = valueOrNull;
 8397|       |
 8398|      0|  errno = 0;
 8399|      0|  char *afterValue = NULL;
 8400|      0|  unsigned long debugLevel = strtoul(value, &afterValue, 10);
 8401|      0|  if ((errno != 0) || (afterValue == value) || (afterValue[0] != '\0')) {
  ------------------
  |  Branch (8401:7): [True: 0, False: 0]
  |  Branch (8401:23): [True: 0, False: 0]
  |  Branch (8401:48): [True: 0, False: 0]
  ------------------
 8402|      0|    errno = 0;
 8403|      0|    return defaultDebugLevel;
 8404|      0|  }
 8405|       |
 8406|      0|  return debugLevel;
 8407|      0|}
xmlparse.c:destroyBindings:
 1429|  3.30M|destroyBindings(BINDING *bindings, XML_Parser parser) {
 1430|  3.30M|  for (;;) {
 1431|  3.30M|    BINDING *b = bindings;
 1432|  3.30M|    if (! b)
  ------------------
  |  Branch (1432:9): [True: 3.30M, False: 0]
  ------------------
 1433|  3.30M|      break;
 1434|      0|    bindings = b->nextTagBinding;
 1435|      0|    FREE(parser, b->uri);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1436|      0|    FREE(parser, b);
  ------------------
  |  |  716|      0|#define FREE(parser, p) (parser->m_mem.free_fcn((p)))
  ------------------
 1437|      0|  }
 1438|  3.30M|}
xmlparse.c:startParsing:
  954|  19.9k|startParsing(XML_Parser parser) {
  955|       |  /* hash functions must be initialized before setContext() is called */
  956|  19.9k|  if (parser->m_hash_secret_salt == 0)
  ------------------
  |  Branch (956:7): [True: 0, False: 19.9k]
  ------------------
  957|      0|    parser->m_hash_secret_salt = generate_hash_secret_salt(parser);
  958|  19.9k|  if (parser->m_ns) {
  ------------------
  |  Branch (958:7): [True: 0, False: 19.9k]
  ------------------
  959|       |    /* implicit context only set for root parser, since child
  960|       |       parsers (i.e. external entity parsers) will inherit it
  961|       |    */
  962|      0|    return setContext(parser, implicitContext);
  963|      0|  }
  964|  19.9k|  return XML_TRUE;
  ------------------
  |  |   55|  19.9k|#define XML_TRUE ((XML_Bool)1)
  ------------------
  965|  19.9k|}
xmlparse.c:dtdDestroy:
 6789|  19.9k|dtdDestroy(DTD *p, XML_Bool isDocEntity, const XML_Memory_Handling_Suite *ms) {
 6790|  19.9k|  HASH_TABLE_ITER iter;
 6791|  19.9k|  hashTableIterInit(&iter, &(p->elementTypes));
 6792|  43.9k|  for (;;) {
 6793|  43.9k|    ELEMENT_TYPE *e = (ELEMENT_TYPE *)hashTableIterNext(&iter);
 6794|  43.9k|    if (! e)
  ------------------
  |  Branch (6794:9): [True: 19.9k, False: 23.9k]
  ------------------
 6795|  19.9k|      break;
 6796|  23.9k|    if (e->allocDefaultAtts != 0)
  ------------------
  |  Branch (6796:9): [True: 1.07k, False: 22.8k]
  ------------------
 6797|  1.07k|      ms->free_fcn(e->defaultAtts);
 6798|  23.9k|  }
 6799|  19.9k|  hashTableDestroy(&(p->generalEntities));
 6800|  19.9k|#ifdef XML_DTD
 6801|  19.9k|  hashTableDestroy(&(p->paramEntities));
 6802|  19.9k|#endif /* XML_DTD */
 6803|  19.9k|  hashTableDestroy(&(p->elementTypes));
 6804|  19.9k|  hashTableDestroy(&(p->attributeIds));
 6805|  19.9k|  hashTableDestroy(&(p->prefixes));
 6806|  19.9k|  poolDestroy(&(p->pool));
 6807|  19.9k|  poolDestroy(&(p->entityValuePool));
 6808|  19.9k|  if (isDocEntity) {
  ------------------
  |  Branch (6808:7): [True: 19.9k, False: 0]
  ------------------
 6809|  19.9k|    ms->free_fcn(p->scaffIndex);
 6810|  19.9k|    ms->free_fcn(p->scaffold);
 6811|  19.9k|  }
 6812|  19.9k|  ms->free_fcn(p);
 6813|  19.9k|}
xmlparse.c:hashTableDestroy:
 7142|  99.8k|hashTableDestroy(HASH_TABLE *table) {
 7143|  99.8k|  size_t i;
 7144|  1.26M|  for (i = 0; i < table->size; i++)
  ------------------
  |  Branch (7144:15): [True: 1.16M, False: 99.8k]
  ------------------
 7145|  1.16M|    table->mem->free_fcn(table->v[i]);
 7146|  99.8k|  table->mem->free_fcn(table->v);
 7147|  99.8k|}
xmlparse.c:poolClear:
 7185|  3.43M|poolClear(STRING_POOL *pool) {
 7186|  3.43M|  if (! pool->freeBlocks)
  ------------------
  |  Branch (7186:7): [True: 1.61M, False: 1.81M]
  ------------------
 7187|  1.61M|    pool->freeBlocks = pool->blocks;
 7188|  1.81M|  else {
 7189|  1.81M|    BLOCK *p = pool->blocks;
 7190|  1.81M|    while (p) {
  ------------------
  |  Branch (7190:12): [True: 2.01k, False: 1.81M]
  ------------------
 7191|  2.01k|      BLOCK *tem = p->next;
 7192|  2.01k|      p->next = pool->freeBlocks;
 7193|  2.01k|      pool->freeBlocks = p;
 7194|  2.01k|      p = tem;
 7195|  2.01k|    }
 7196|  1.81M|  }
 7197|  3.43M|  pool->blocks = NULL;
 7198|  3.43M|  pool->start = NULL;
 7199|  3.43M|  pool->ptr = NULL;
 7200|  3.43M|  pool->end = NULL;
 7201|  3.43M|}
xmlparse.c:poolDestroy:
 7204|  79.8k|poolDestroy(STRING_POOL *pool) {
 7205|  79.8k|  BLOCK *p = pool->blocks;
 7206|  97.8k|  while (p) {
  ------------------
  |  Branch (7206:10): [True: 17.9k, False: 79.8k]
  ------------------
 7207|  17.9k|    BLOCK *tem = p->next;
 7208|  17.9k|    pool->mem->free_fcn(p);
 7209|  17.9k|    p = tem;
 7210|  17.9k|  }
 7211|  79.8k|  p = pool->freeBlocks;
 7212|  82.9k|  while (p) {
  ------------------
  |  Branch (7212:10): [True: 3.04k, False: 79.8k]
  ------------------
 7213|  3.04k|    BLOCK *tem = p->next;
 7214|  3.04k|    pool->mem->free_fcn(p);
 7215|  3.04k|    p = tem;
 7216|  3.04k|  }
 7217|  79.8k|}
xmlparse.c:poolCopyString:
 7237|  16.4k|poolCopyString(STRING_POOL *pool, const XML_Char *s) {
 7238|  3.49M|  do {
 7239|  3.49M|    if (! poolAppendChar(pool, *s))
  ------------------
  |  |  603|  3.49M|  (((pool)->ptr == (pool)->end && ! poolGrow(pool))                            \
  |  |  ------------------
  |  |  |  Branch (603:5): [True: 8.01k, False: 3.48M]
  |  |  |  Branch (603:35): [True: 0, False: 8.01k]
  |  |  ------------------
  |  |  604|  3.49M|       ? 0                                                                     \
  |  |  605|  3.49M|       : ((*((pool)->ptr)++ = c), 1))
  ------------------
  |  Branch (7239:9): [True: 0, False: 3.49M]
  ------------------
 7240|      0|      return NULL;
 7241|  3.49M|  } while (*s++);
  ------------------
  |  Branch (7241:12): [True: 3.47M, False: 16.4k]
  ------------------
 7242|  16.4k|  s = pool->start;
 7243|  16.4k|  poolFinish(pool);
  ------------------
  |  |  601|  16.4k|#define poolFinish(pool) ((pool)->start = (pool)->ptr)
  ------------------
 7244|  16.4k|  return s;
 7245|  16.4k|}
xmlparse.c:copyString:
 7637|  19.9k|copyString(const XML_Char *s, const XML_Memory_Handling_Suite *memsuite) {
 7638|  19.9k|  size_t charsRequired = 0;
 7639|  19.9k|  XML_Char *result;
 7640|       |
 7641|       |  /* First determine how long the string is */
 7642|   179k|  while (s[charsRequired] != 0) {
  ------------------
  |  Branch (7642:10): [True: 159k, False: 19.9k]
  ------------------
 7643|   159k|    charsRequired++;
 7644|   159k|  }
 7645|       |  /* Include the terminator */
 7646|  19.9k|  charsRequired++;
 7647|       |
 7648|       |  /* Now allocate space for the copy */
 7649|  19.9k|  result = memsuite->malloc_fcn(charsRequired * sizeof(XML_Char));
 7650|  19.9k|  if (result == NULL)
  ------------------
  |  Branch (7650:7): [True: 0, False: 19.9k]
  ------------------
 7651|      0|    return NULL;
 7652|       |  /* Copy the original into place */
 7653|  19.9k|  memcpy(result, s, charsRequired * sizeof(XML_Char));
 7654|  19.9k|  return result;
 7655|  19.9k|}

XmlPrologStateInit:
 1237|  19.9k|XmlPrologStateInit(PROLOG_STATE *state) {
 1238|  19.9k|  state->handler = prolog0;
 1239|  19.9k|#ifdef XML_DTD
 1240|  19.9k|  state->documentEntity = 1;
 1241|  19.9k|  state->includeLevel = 0;
 1242|  19.9k|  state->inEntityValue = 0;
 1243|  19.9k|#endif /* XML_DTD */
 1244|  19.9k|}
xmlrole.c:prolog0:
  142|  18.5k|        const ENCODING *enc) {
  143|  18.5k|  switch (tok) {
  ------------------
  |  Branch (143:11): [True: 319, False: 18.1k]
  ------------------
  144|    601|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    601|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (144:3): [True: 601, False: 17.9k]
  ------------------
  145|    601|    state->handler = prolog1;
  146|    601|    return XML_ROLE_NONE;
  147|    357|  case XML_TOK_XML_DECL:
  ------------------
  |  |   77|    357|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  |  Branch (147:3): [True: 357, False: 18.1k]
  ------------------
  148|    357|    state->handler = prolog1;
  149|    357|    return XML_ROLE_XML_DECL;
  150|    330|  case XML_TOK_PI:
  ------------------
  |  |   76|    330|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (150:3): [True: 330, False: 18.1k]
  ------------------
  151|    330|    state->handler = prolog1;
  152|    330|    return XML_ROLE_PI;
  153|     54|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|     54|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (153:3): [True: 54, False: 18.4k]
  ------------------
  154|     54|    state->handler = prolog1;
  155|     54|    return XML_ROLE_COMMENT;
  156|  1.78k|  case XML_TOK_BOM:
  ------------------
  |  |   79|  1.78k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
  |  Branch (156:3): [True: 1.78k, False: 16.7k]
  ------------------
  157|  1.78k|    return XML_ROLE_NONE;
  158|  5.84k|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|  5.84k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (158:3): [True: 5.84k, False: 12.6k]
  ------------------
  159|  5.84k|    if (! XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  5.84k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (159:9): [True: 102, False: 5.74k]
  ------------------
  160|  5.84k|                              KW_DOCTYPE))
  161|    102|      break;
  162|  5.74k|    state->handler = doctype0;
  163|  5.74k|    return XML_ROLE_DOCTYPE_NONE;
  164|  9.22k|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|  9.22k|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (164:3): [True: 9.22k, False: 9.28k]
  ------------------
  165|  9.22k|    state->handler = error;
  166|  9.22k|    return XML_ROLE_INSTANCE_START;
  167|  18.5k|  }
  168|    421|  return common(state, tok);
  169|  18.5k|}
xmlrole.c:prolog1:
  173|  4.61k|        const ENCODING *enc) {
  174|  4.61k|  switch (tok) {
  ------------------
  |  Branch (174:11): [True: 8, False: 4.60k]
  ------------------
  175|    454|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    454|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (175:3): [True: 454, False: 4.16k]
  ------------------
  176|    454|    return XML_ROLE_NONE;
  177|  3.17k|  case XML_TOK_PI:
  ------------------
  |  |   76|  3.17k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (177:3): [True: 3.17k, False: 1.44k]
  ------------------
  178|  3.17k|    return XML_ROLE_PI;
  179|    595|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    595|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (179:3): [True: 595, False: 4.02k]
  ------------------
  180|    595|    return XML_ROLE_COMMENT;
  181|      0|  case XML_TOK_BOM:
  ------------------
  |  |   79|      0|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
  |  Branch (181:3): [True: 0, False: 4.61k]
  ------------------
  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|    332|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|    332|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (190:3): [True: 332, False: 4.28k]
  ------------------
  191|    332|    if (! XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|    332|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (191:9): [True: 4, False: 328]
  ------------------
  192|    332|                              KW_DOCTYPE))
  193|      4|      break;
  194|    328|    state->handler = doctype0;
  195|    328|    return XML_ROLE_DOCTYPE_NONE;
  196|     52|  case XML_TOK_INSTANCE_START:
  ------------------
  |  |   96|     52|#define XML_TOK_INSTANCE_START 29
  ------------------
  |  Branch (196:3): [True: 52, False: 4.56k]
  ------------------
  197|     52|    state->handler = error;
  198|     52|    return XML_ROLE_INSTANCE_START;
  199|  4.61k|  }
  200|     12|  return common(state, tok);
  201|  4.61k|}
xmlrole.c:doctype0:
  225|  12.1k|         const ENCODING *enc) {
  226|  12.1k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  12.1k|#  define UNUSED_P(p) (void)p
  ------------------
  227|  12.1k|  UNUSED_P(end);
  ------------------
  |  |  135|  12.1k|#  define UNUSED_P(p) (void)p
  ------------------
  228|  12.1k|  UNUSED_P(enc);
  ------------------
  |  |  135|  12.1k|#  define UNUSED_P(p) (void)p
  ------------------
  229|  12.1k|  switch (tok) {
  ------------------
  |  Branch (229:11): [True: 10, False: 12.1k]
  ------------------
  230|  6.06k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  6.06k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (230:3): [True: 6.06k, False: 6.05k]
  ------------------
  231|  6.06k|    return XML_ROLE_DOCTYPE_NONE;
  232|  6.04k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  6.04k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (232:3): [True: 6.04k, False: 6.07k]
  ------------------
  233|  6.04k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  6.04k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (233:3): [True: 0, False: 12.1k]
  ------------------
  234|  6.04k|    state->handler = doctype1;
  235|  6.04k|    return XML_ROLE_DOCTYPE_NAME;
  236|  12.1k|  }
  237|     10|  return common(state, tok);
  238|  12.1k|}
xmlrole.c:doctype1:
  242|  7.63k|         const ENCODING *enc) {
  243|  7.63k|  switch (tok) {
  ------------------
  |  Branch (243:11): [True: 4, False: 7.62k]
  ------------------
  244|  1.60k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.60k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (244:3): [True: 1.60k, False: 6.03k]
  ------------------
  245|  1.60k|    return XML_ROLE_DOCTYPE_NONE;
  246|  5.20k|  case XML_TOK_OPEN_BRACKET:
  ------------------
  |  |   92|  5.20k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
  |  Branch (246:3): [True: 5.20k, False: 2.42k]
  ------------------
  247|  5.20k|    state->handler = internalSubset;
  248|  5.20k|    return XML_ROLE_DOCTYPE_INTERNAL_SUBSET;
  249|     44|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|     44|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (249:3): [True: 44, False: 7.58k]
  ------------------
  250|     44|    state->handler = prolog2;
  251|     44|    return XML_ROLE_DOCTYPE_CLOSE;
  252|    779|  case XML_TOK_NAME:
  ------------------
  |  |   85|    779|#define XML_TOK_NAME 18
  ------------------
  |  Branch (252:3): [True: 779, False: 6.85k]
  ------------------
  253|    779|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|    779|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 10, False: 769]
  |  |  ------------------
  ------------------
  254|     10|      state->handler = doctype3;
  255|     10|      return XML_ROLE_DOCTYPE_NONE;
  256|     10|    }
  257|    769|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|    769|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 739, False: 30]
  |  |  ------------------
  ------------------
  258|    739|      state->handler = doctype2;
  259|    739|      return XML_ROLE_DOCTYPE_NONE;
  260|    739|    }
  261|     30|    break;
  262|  7.63k|  }
  263|     34|  return common(state, tok);
  264|  7.63k|}
xmlrole.c:internalSubset:
  335|  48.1k|               const ENCODING *enc) {
  336|  48.1k|  switch (tok) {
  ------------------
  |  Branch (336:11): [True: 83, False: 48.0k]
  ------------------
  337|  5.32k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  5.32k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (337:3): [True: 5.32k, False: 42.8k]
  ------------------
  338|  5.32k|    return XML_ROLE_NONE;
  339|  33.0k|  case XML_TOK_DECL_OPEN:
  ------------------
  |  |   83|  33.0k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  |  Branch (339:3): [True: 33.0k, False: 15.0k]
  ------------------
  340|  33.0k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  33.0k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 12.9k, False: 20.0k]
  |  |  ------------------
  ------------------
  341|  33.0k|                            KW_ENTITY)) {
  342|  12.9k|      state->handler = entity0;
  343|  12.9k|      return XML_ROLE_ENTITY_NONE;
  344|  12.9k|    }
  345|  20.0k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  20.0k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 10.4k, False: 9.59k]
  |  |  ------------------
  ------------------
  346|  20.0k|                            KW_ATTLIST)) {
  347|  10.4k|      state->handler = attlist0;
  348|  10.4k|      return XML_ROLE_ATTLIST_NONE;
  349|  10.4k|    }
  350|  9.59k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  9.59k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 8.10k, False: 1.49k]
  |  |  ------------------
  ------------------
  351|  9.59k|                            KW_ELEMENT)) {
  352|  8.10k|      state->handler = element0;
  353|  8.10k|      return XML_ROLE_ELEMENT_NONE;
  354|  8.10k|    }
  355|  1.49k|    if (XmlNameMatchesAscii(enc, ptr + 2 * MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  1.49k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.45k, False: 34]
  |  |  ------------------
  ------------------
  356|  1.49k|                            KW_NOTATION)) {
  357|  1.45k|      state->handler = notation0;
  358|  1.45k|      return XML_ROLE_NOTATION_NONE;
  359|  1.45k|    }
  360|     34|    break;
  361|  3.47k|  case XML_TOK_PI:
  ------------------
  |  |   76|  3.47k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (361:3): [True: 3.47k, False: 44.6k]
  ------------------
  362|  3.47k|    return XML_ROLE_PI;
  363|    197|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    197|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (363:3): [True: 197, False: 47.9k]
  ------------------
  364|    197|    return XML_ROLE_COMMENT;
  365|  3.68k|  case XML_TOK_PARAM_ENTITY_REF:
  ------------------
  |  |   95|  3.68k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  |  Branch (365:3): [True: 3.68k, False: 44.4k]
  ------------------
  366|  3.68k|    return XML_ROLE_PARAM_ENTITY_REF;
  367|  2.31k|  case XML_TOK_CLOSE_BRACKET:
  ------------------
  |  |   93|  2.31k|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
  |  Branch (367:3): [True: 2.31k, False: 45.8k]
  ------------------
  368|  2.31k|    state->handler = doctype5;
  369|  2.31k|    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: 48.1k]
  ------------------
  371|      0|    return XML_ROLE_NONE;
  372|  48.1k|  }
  373|    117|  return common(state, tok);
  374|  48.1k|}
xmlrole.c:entity0:
  417|  25.9k|        const ENCODING *enc) {
  418|  25.9k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  25.9k|#  define UNUSED_P(p) (void)p
  ------------------
  419|  25.9k|  UNUSED_P(end);
  ------------------
  |  |  135|  25.9k|#  define UNUSED_P(p) (void)p
  ------------------
  420|  25.9k|  UNUSED_P(enc);
  ------------------
  |  |  135|  25.9k|#  define UNUSED_P(p) (void)p
  ------------------
  421|  25.9k|  switch (tok) {
  ------------------
  |  Branch (421:11): [True: 17, False: 25.8k]
  ------------------
  422|  12.9k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  12.9k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (422:3): [True: 12.9k, False: 12.9k]
  ------------------
  423|  12.9k|    return XML_ROLE_ENTITY_NONE;
  424|  3.88k|  case XML_TOK_PERCENT:
  ------------------
  |  |   89|  3.88k|#define XML_TOK_PERCENT 22
  ------------------
  |  Branch (424:3): [True: 3.88k, False: 22.0k]
  ------------------
  425|  3.88k|    state->handler = entity1;
  426|  3.88k|    return XML_ROLE_ENTITY_NONE;
  427|  9.04k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  9.04k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (427:3): [True: 9.04k, False: 16.8k]
  ------------------
  428|  9.04k|    state->handler = entity2;
  429|  9.04k|    return XML_ROLE_GENERAL_ENTITY_NAME;
  430|  25.9k|  }
  431|     17|  return common(state, tok);
  432|  25.9k|}
xmlrole.c:entity1:
  436|  7.74k|        const ENCODING *enc) {
  437|  7.74k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  7.74k|#  define UNUSED_P(p) (void)p
  ------------------
  438|  7.74k|  UNUSED_P(end);
  ------------------
  |  |  135|  7.74k|#  define UNUSED_P(p) (void)p
  ------------------
  439|  7.74k|  UNUSED_P(enc);
  ------------------
  |  |  135|  7.74k|#  define UNUSED_P(p) (void)p
  ------------------
  440|  7.74k|  switch (tok) {
  ------------------
  |  Branch (440:11): [True: 39, False: 7.70k]
  ------------------
  441|  3.87k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  3.87k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (441:3): [True: 3.87k, False: 3.86k]
  ------------------
  442|  3.87k|    return XML_ROLE_ENTITY_NONE;
  443|  3.83k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  3.83k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (443:3): [True: 3.83k, False: 3.91k]
  ------------------
  444|  3.83k|    state->handler = entity7;
  445|  3.83k|    return XML_ROLE_PARAM_ENTITY_NAME;
  446|  7.74k|  }
  447|     39|  return common(state, tok);
  448|  7.74k|}
xmlrole.c:entity7:
  544|  7.62k|        const ENCODING *enc) {
  545|  7.62k|  switch (tok) {
  ------------------
  |  Branch (545:11): [True: 16, False: 7.60k]
  ------------------
  546|  3.81k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  3.81k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (546:3): [True: 3.81k, False: 3.80k]
  ------------------
  547|  3.81k|    return XML_ROLE_ENTITY_NONE;
  548|  1.31k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.31k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (548:3): [True: 1.31k, False: 6.31k]
  ------------------
  549|  1.31k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  1.31k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 402, False: 909]
  |  |  ------------------
  ------------------
  550|    402|      state->handler = entity9;
  551|    402|      return XML_ROLE_ENTITY_NONE;
  552|    402|    }
  553|    909|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|    909|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 906, False: 3]
  |  |  ------------------
  ------------------
  554|    906|      state->handler = entity8;
  555|    906|      return XML_ROLE_ENTITY_NONE;
  556|    906|    }
  557|      3|    break;
  558|  2.47k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  2.47k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (558:3): [True: 2.47k, False: 5.14k]
  ------------------
  559|  2.47k|    state->handler = declClose;
  560|  2.47k|    state->role_none = XML_ROLE_ENTITY_NONE;
  561|  2.47k|    return XML_ROLE_ENTITY_VALUE;
  562|  7.62k|  }
  563|     19|  return common(state, tok);
  564|  7.62k|}
xmlrole.c:entity9:
  584|  2.58k|        const ENCODING *enc) {
  585|  2.58k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.58k|#  define UNUSED_P(p) (void)p
  ------------------
  586|  2.58k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.58k|#  define UNUSED_P(p) (void)p
  ------------------
  587|  2.58k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.58k|#  define UNUSED_P(p) (void)p
  ------------------
  588|  2.58k|  switch (tok) {
  ------------------
  |  Branch (588:11): [True: 9, False: 2.57k]
  ------------------
  589|  1.29k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.29k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (589:3): [True: 1.29k, False: 1.29k]
  ------------------
  590|  1.29k|    return XML_ROLE_ENTITY_NONE;
  591|  1.28k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.28k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (591:3): [True: 1.28k, False: 1.30k]
  ------------------
  592|  1.28k|    state->handler = entity10;
  593|  1.28k|    return XML_ROLE_ENTITY_SYSTEM_ID;
  594|  2.58k|  }
  595|      9|  return common(state, tok);
  596|  2.58k|}
xmlrole.c:entity10:
  600|  1.96k|         const ENCODING *enc) {
  601|  1.96k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.96k|#  define UNUSED_P(p) (void)p
  ------------------
  602|  1.96k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.96k|#  define UNUSED_P(p) (void)p
  ------------------
  603|  1.96k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.96k|#  define UNUSED_P(p) (void)p
  ------------------
  604|  1.96k|  switch (tok) {
  ------------------
  |  Branch (604:11): [True: 6, False: 1.95k]
  ------------------
  605|    685|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    685|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (605:3): [True: 685, False: 1.27k]
  ------------------
  606|    685|    return XML_ROLE_ENTITY_NONE;
  607|  1.27k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  1.27k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (607:3): [True: 1.27k, False: 691]
  ------------------
  608|  1.27k|    setTopLevel(state);
  ------------------
  |  |  116|  1.27k|    ((state)->handler                                                          \
  |  |  117|  1.27k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 1.27k, False: 0]
  |  |  ------------------
  ------------------
  609|  1.27k|    return XML_ROLE_ENTITY_COMPLETE;
  610|  1.96k|  }
  611|      6|  return common(state, tok);
  612|  1.96k|}
xmlrole.c:entity8:
  568|  1.80k|        const ENCODING *enc) {
  569|  1.80k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.80k|#  define UNUSED_P(p) (void)p
  ------------------
  570|  1.80k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.80k|#  define UNUSED_P(p) (void)p
  ------------------
  571|  1.80k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.80k|#  define UNUSED_P(p) (void)p
  ------------------
  572|  1.80k|  switch (tok) {
  ------------------
  |  Branch (572:11): [True: 1, False: 1.80k]
  ------------------
  573|    906|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    906|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (573:3): [True: 906, False: 901]
  ------------------
  574|    906|    return XML_ROLE_ENTITY_NONE;
  575|    900|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    900|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (575:3): [True: 900, False: 907]
  ------------------
  576|    900|    state->handler = entity9;
  577|    900|    return XML_ROLE_ENTITY_PUBLIC_ID;
  578|  1.80k|  }
  579|      1|  return common(state, tok);
  580|  1.80k|}
xmlrole.c:declClose:
 1178|  19.1k|          const ENCODING *enc) {
 1179|  19.1k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  19.1k|#  define UNUSED_P(p) (void)p
  ------------------
 1180|  19.1k|  UNUSED_P(end);
  ------------------
  |  |  135|  19.1k|#  define UNUSED_P(p) (void)p
  ------------------
 1181|  19.1k|  UNUSED_P(enc);
  ------------------
  |  |  135|  19.1k|#  define UNUSED_P(p) (void)p
  ------------------
 1182|  19.1k|  switch (tok) {
  ------------------
  |  Branch (1182:11): [True: 143, False: 19.0k]
  ------------------
 1183|  1.21k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.21k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1183:3): [True: 1.21k, False: 17.9k]
  ------------------
 1184|  1.21k|    return state->role_none;
 1185|  17.8k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  17.8k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (1185:3): [True: 17.8k, False: 1.35k]
  ------------------
 1186|  17.8k|    setTopLevel(state);
  ------------------
  |  |  116|  17.8k|    ((state)->handler                                                          \
  |  |  117|  17.8k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 17.8k, False: 0]
  |  |  ------------------
  ------------------
 1187|  17.8k|    return state->role_none;
 1188|  19.1k|  }
 1189|    143|  return common(state, tok);
 1190|  19.1k|}
xmlrole.c:entity2:
  452|  18.0k|        const ENCODING *enc) {
  453|  18.0k|  switch (tok) {
  ------------------
  |  Branch (453:11): [True: 8, False: 18.0k]
  ------------------
  454|  9.03k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  9.03k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (454:3): [True: 9.03k, False: 9.00k]
  ------------------
  455|  9.03k|    return XML_ROLE_ENTITY_NONE;
  456|  2.27k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  2.27k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (456:3): [True: 2.27k, False: 15.7k]
  ------------------
  457|  2.27k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  2.27k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 936, False: 1.33k]
  |  |  ------------------
  ------------------
  458|    936|      state->handler = entity4;
  459|    936|      return XML_ROLE_ENTITY_NONE;
  460|    936|    }
  461|  1.33k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|  1.33k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.33k, False: 5]
  |  |  ------------------
  ------------------
  462|  1.33k|      state->handler = entity3;
  463|  1.33k|      return XML_ROLE_ENTITY_NONE;
  464|  1.33k|    }
  465|      5|    break;
  466|  6.71k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  6.71k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (466:3): [True: 6.71k, False: 11.3k]
  ------------------
  467|  6.71k|    state->handler = declClose;
  468|  6.71k|    state->role_none = XML_ROLE_ENTITY_NONE;
  469|  6.71k|    return XML_ROLE_ENTITY_VALUE;
  470|  18.0k|  }
  471|     13|  return common(state, tok);
  472|  18.0k|}
xmlrole.c:entity4:
  492|  4.47k|        const ENCODING *enc) {
  493|  4.47k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  4.47k|#  define UNUSED_P(p) (void)p
  ------------------
  494|  4.47k|  UNUSED_P(end);
  ------------------
  |  |  135|  4.47k|#  define UNUSED_P(p) (void)p
  ------------------
  495|  4.47k|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.47k|#  define UNUSED_P(p) (void)p
  ------------------
  496|  4.47k|  switch (tok) {
  ------------------
  |  Branch (496:11): [True: 3, False: 4.47k]
  ------------------
  497|  2.25k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  2.25k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (497:3): [True: 2.25k, False: 2.22k]
  ------------------
  498|  2.25k|    return XML_ROLE_ENTITY_NONE;
  499|  2.22k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  2.22k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (499:3): [True: 2.22k, False: 2.25k]
  ------------------
  500|  2.22k|    state->handler = entity5;
  501|  2.22k|    return XML_ROLE_ENTITY_SYSTEM_ID;
  502|  4.47k|  }
  503|      3|  return common(state, tok);
  504|  4.47k|}
xmlrole.c:entity5:
  508|  3.57k|        const ENCODING *enc) {
  509|  3.57k|  switch (tok) {
  ------------------
  |  Branch (509:11): [True: 1, False: 3.57k]
  ------------------
  510|  1.36k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.36k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (510:3): [True: 1.36k, False: 2.21k]
  ------------------
  511|  1.36k|    return XML_ROLE_ENTITY_NONE;
  512|  1.39k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  1.39k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (512:3): [True: 1.39k, False: 2.18k]
  ------------------
  513|  1.39k|    setTopLevel(state);
  ------------------
  |  |  116|  1.39k|    ((state)->handler                                                          \
  |  |  117|  1.39k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 1.39k, False: 0]
  |  |  ------------------
  ------------------
  514|  1.39k|    return XML_ROLE_ENTITY_COMPLETE;
  515|    815|  case XML_TOK_NAME:
  ------------------
  |  |   85|    815|#define XML_TOK_NAME 18
  ------------------
  |  Branch (515:3): [True: 815, False: 2.76k]
  ------------------
  516|    815|    if (XmlNameMatchesAscii(enc, ptr, end, KW_NDATA)) {
  ------------------
  |  |  255|    815|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 812, False: 3]
  |  |  ------------------
  ------------------
  517|    812|      state->handler = entity6;
  518|    812|      return XML_ROLE_ENTITY_NONE;
  519|    812|    }
  520|      3|    break;
  521|  3.57k|  }
  522|      4|  return common(state, tok);
  523|  3.57k|}
xmlrole.c:entity6:
  527|  1.62k|        const ENCODING *enc) {
  528|  1.62k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.62k|#  define UNUSED_P(p) (void)p
  ------------------
  529|  1.62k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.62k|#  define UNUSED_P(p) (void)p
  ------------------
  530|  1.62k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.62k|#  define UNUSED_P(p) (void)p
  ------------------
  531|  1.62k|  switch (tok) {
  ------------------
  |  Branch (531:11): [True: 1, False: 1.62k]
  ------------------
  532|    811|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    811|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (532:3): [True: 811, False: 810]
  ------------------
  533|    811|    return XML_ROLE_ENTITY_NONE;
  534|    809|  case XML_TOK_NAME:
  ------------------
  |  |   85|    809|#define XML_TOK_NAME 18
  ------------------
  |  Branch (534:3): [True: 809, False: 812]
  ------------------
  535|    809|    state->handler = declClose;
  536|    809|    state->role_none = XML_ROLE_ENTITY_NONE;
  537|    809|    return XML_ROLE_ENTITY_NOTATION_NAME;
  538|  1.62k|  }
  539|      1|  return common(state, tok);
  540|  1.62k|}
xmlrole.c:entity3:
  476|  2.66k|        const ENCODING *enc) {
  477|  2.66k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.66k|#  define UNUSED_P(p) (void)p
  ------------------
  478|  2.66k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.66k|#  define UNUSED_P(p) (void)p
  ------------------
  479|  2.66k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.66k|#  define UNUSED_P(p) (void)p
  ------------------
  480|  2.66k|  switch (tok) {
  ------------------
  |  Branch (480:11): [True: 3, False: 2.66k]
  ------------------
  481|  1.33k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.33k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (481:3): [True: 1.33k, False: 1.33k]
  ------------------
  482|  1.33k|    return XML_ROLE_ENTITY_NONE;
  483|  1.32k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.32k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (483:3): [True: 1.32k, False: 1.33k]
  ------------------
  484|  1.32k|    state->handler = entity4;
  485|  1.32k|    return XML_ROLE_ENTITY_PUBLIC_ID;
  486|  2.66k|  }
  487|      3|  return common(state, tok);
  488|  2.66k|}
xmlrole.c:attlist0:
  705|  20.9k|         const ENCODING *enc) {
  706|  20.9k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  20.9k|#  define UNUSED_P(p) (void)p
  ------------------
  707|  20.9k|  UNUSED_P(end);
  ------------------
  |  |  135|  20.9k|#  define UNUSED_P(p) (void)p
  ------------------
  708|  20.9k|  UNUSED_P(enc);
  ------------------
  |  |  135|  20.9k|#  define UNUSED_P(p) (void)p
  ------------------
  709|  20.9k|  switch (tok) {
  ------------------
  |  Branch (709:11): [True: 10, False: 20.9k]
  ------------------
  710|  10.4k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  10.4k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (710:3): [True: 10.4k, False: 10.4k]
  ------------------
  711|  10.4k|    return XML_ROLE_ATTLIST_NONE;
  712|  10.4k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  10.4k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (712:3): [True: 10.4k, False: 10.5k]
  ------------------
  713|  10.4k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  10.4k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (713:3): [True: 0, False: 20.9k]
  ------------------
  714|  10.4k|    state->handler = attlist1;
  715|  10.4k|    return XML_ROLE_ATTLIST_ELEMENT_NAME;
  716|  20.9k|  }
  717|     10|  return common(state, tok);
  718|  20.9k|}
xmlrole.c:attlist1:
  722|  38.1k|         const ENCODING *enc) {
  723|  38.1k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  38.1k|#  define UNUSED_P(p) (void)p
  ------------------
  724|  38.1k|  UNUSED_P(end);
  ------------------
  |  |  135|  38.1k|#  define UNUSED_P(p) (void)p
  ------------------
  725|  38.1k|  UNUSED_P(enc);
  ------------------
  |  |  135|  38.1k|#  define UNUSED_P(p) (void)p
  ------------------
  726|  38.1k|  switch (tok) {
  ------------------
  |  Branch (726:11): [True: 43, False: 38.1k]
  ------------------
  727|  14.3k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  14.3k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (727:3): [True: 14.3k, False: 23.8k]
  ------------------
  728|  14.3k|    return XML_ROLE_ATTLIST_NONE;
  729|  9.67k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  9.67k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (729:3): [True: 9.67k, False: 28.4k]
  ------------------
  730|  9.67k|    setTopLevel(state);
  ------------------
  |  |  116|  9.67k|    ((state)->handler                                                          \
  |  |  117|  9.67k|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 9.67k, False: 0]
  |  |  ------------------
  ------------------
  731|  9.67k|    return XML_ROLE_ATTLIST_NONE;
  732|  14.1k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  14.1k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (732:3): [True: 14.1k, False: 24.0k]
  ------------------
  733|  14.1k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  14.1k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (733:3): [True: 0, False: 38.1k]
  ------------------
  734|  14.1k|    state->handler = attlist2;
  735|  14.1k|    return XML_ROLE_ATTRIBUTE_NAME;
  736|  38.1k|  }
  737|     43|  return common(state, tok);
  738|  38.1k|}
xmlrole.c:attlist2:
  742|  28.1k|         const ENCODING *enc) {
  743|  28.1k|  switch (tok) {
  ------------------
  |  Branch (743:11): [True: 15, False: 28.1k]
  ------------------
  744|  14.0k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  14.0k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (744:3): [True: 14.0k, False: 14.0k]
  ------------------
  745|  14.0k|    return XML_ROLE_ATTLIST_NONE;
  746|  10.1k|  case XML_TOK_NAME: {
  ------------------
  |  |   85|  10.1k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (746:3): [True: 10.1k, False: 18.0k]
  ------------------
  747|  10.1k|    static const char *const types[] = {
  748|  10.1k|        KW_CDATA,  KW_ID,       KW_IDREF,   KW_IDREFS,
  749|  10.1k|        KW_ENTITY, KW_ENTITIES, KW_NMTOKEN, KW_NMTOKENS,
  750|  10.1k|    };
  751|  10.1k|    int i;
  752|  31.1k|    for (i = 0; i < (int)(sizeof(types) / sizeof(types[0])); i++)
  ------------------
  |  Branch (752:17): [True: 30.8k, False: 353]
  ------------------
  753|  30.8k|      if (XmlNameMatchesAscii(enc, ptr, end, types[i])) {
  ------------------
  |  |  255|  30.8k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 9.76k, False: 21.0k]
  |  |  ------------------
  ------------------
  754|  9.76k|        state->handler = attlist8;
  755|  9.76k|        return XML_ROLE_ATTRIBUTE_TYPE_CDATA + i;
  756|  9.76k|      }
  757|  10.1k|  }
  758|    353|    if (XmlNameMatchesAscii(enc, ptr, end, KW_NOTATION)) {
  ------------------
  |  |  255|    353|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 313, False: 40]
  |  |  ------------------
  ------------------
  759|    313|      state->handler = attlist5;
  760|    313|      return XML_ROLE_ATTLIST_NONE;
  761|    313|    }
  762|     40|    break;
  763|  3.90k|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  3.90k|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (763:3): [True: 3.90k, False: 24.2k]
  ------------------
  764|  3.90k|    state->handler = attlist3;
  765|  3.90k|    return XML_ROLE_ATTLIST_NONE;
  766|  28.1k|  }
  767|     55|  return common(state, tok);
  768|  28.1k|}
xmlrole.c:attlist8:
  861|  27.3k|         const ENCODING *enc) {
  862|  27.3k|  switch (tok) {
  ------------------
  |  Branch (862:11): [True: 7, False: 27.3k]
  ------------------
  863|  13.7k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  13.7k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (863:3): [True: 13.7k, False: 13.6k]
  ------------------
  864|  13.7k|    return XML_ROLE_ATTLIST_NONE;
  865|  7.01k|  case XML_TOK_POUND_NAME:
  ------------------
  |  |   87|  7.01k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  |  Branch (865:3): [True: 7.01k, False: 20.3k]
  ------------------
  866|  7.01k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  7.01k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 3.26k, False: 3.74k]
  |  |  ------------------
  ------------------
  867|  7.01k|                            KW_IMPLIED)) {
  868|  3.26k|      state->handler = attlist1;
  869|  3.26k|      return XML_ROLE_IMPLIED_ATTRIBUTE_VALUE;
  870|  3.26k|    }
  871|  3.74k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  3.74k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 2.83k, False: 914]
  |  |  ------------------
  ------------------
  872|  3.74k|                            KW_REQUIRED)) {
  873|  2.83k|      state->handler = attlist1;
  874|  2.83k|      return XML_ROLE_REQUIRED_ATTRIBUTE_VALUE;
  875|  2.83k|    }
  876|    914|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|    914|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 901, False: 13]
  |  |  ------------------
  ------------------
  877|    914|                            KW_FIXED)) {
  878|    901|      state->handler = attlist9;
  879|    901|      return XML_ROLE_ATTLIST_NONE;
  880|    901|    }
  881|     13|    break;
  882|  6.63k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  6.63k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (882:3): [True: 6.63k, False: 20.7k]
  ------------------
  883|  6.63k|    state->handler = attlist1;
  884|  6.63k|    return XML_ROLE_DEFAULT_ATTRIBUTE_VALUE;
  885|  27.3k|  }
  886|     20|  return common(state, tok);
  887|  27.3k|}
xmlrole.c:attlist9:
  891|  1.78k|         const ENCODING *enc) {
  892|  1.78k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.78k|#  define UNUSED_P(p) (void)p
  ------------------
  893|  1.78k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.78k|#  define UNUSED_P(p) (void)p
  ------------------
  894|  1.78k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.78k|#  define UNUSED_P(p) (void)p
  ------------------
  895|  1.78k|  switch (tok) {
  ------------------
  |  Branch (895:11): [True: 22, False: 1.76k]
  ------------------
  896|    901|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    901|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (896:3): [True: 901, False: 886]
  ------------------
  897|    901|    return XML_ROLE_ATTLIST_NONE;
  898|    864|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    864|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (898:3): [True: 864, False: 923]
  ------------------
  899|    864|    state->handler = attlist1;
  900|    864|    return XML_ROLE_FIXED_ATTRIBUTE_VALUE;
  901|  1.78k|  }
  902|     22|  return common(state, tok);
  903|  1.78k|}
xmlrole.c:attlist5:
  809|    623|         const ENCODING *enc) {
  810|    623|  UNUSED_P(ptr);
  ------------------
  |  |  135|    623|#  define UNUSED_P(p) (void)p
  ------------------
  811|    623|  UNUSED_P(end);
  ------------------
  |  |  135|    623|#  define UNUSED_P(p) (void)p
  ------------------
  812|    623|  UNUSED_P(enc);
  ------------------
  |  |  135|    623|#  define UNUSED_P(p) (void)p
  ------------------
  813|    623|  switch (tok) {
  ------------------
  |  Branch (813:11): [True: 1, False: 622]
  ------------------
  814|    312|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    312|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (814:3): [True: 312, False: 311]
  ------------------
  815|    312|    return XML_ROLE_ATTLIST_NONE;
  816|    310|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|    310|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (816:3): [True: 310, False: 313]
  ------------------
  817|    310|    state->handler = attlist6;
  818|    310|    return XML_ROLE_ATTLIST_NONE;
  819|    623|  }
  820|      1|  return common(state, tok);
  821|    623|}
xmlrole.c:attlist6:
  825|  1.27k|         const ENCODING *enc) {
  826|  1.27k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.27k|#  define UNUSED_P(p) (void)p
  ------------------
  827|  1.27k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.27k|#  define UNUSED_P(p) (void)p
  ------------------
  828|  1.27k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.27k|#  define UNUSED_P(p) (void)p
  ------------------
  829|  1.27k|  switch (tok) {
  ------------------
  |  Branch (829:11): [True: 6, False: 1.26k]
  ------------------
  830|    276|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    276|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (830:3): [True: 276, False: 994]
  ------------------
  831|    276|    return XML_ROLE_ATTLIST_NONE;
  832|    988|  case XML_TOK_NAME:
  ------------------
  |  |   85|    988|#define XML_TOK_NAME 18
  ------------------
  |  Branch (832:3): [True: 988, False: 282]
  ------------------
  833|    988|    state->handler = attlist7;
  834|    988|    return XML_ROLE_ATTRIBUTE_NOTATION_VALUE;
  835|  1.27k|  }
  836|      6|  return common(state, tok);
  837|  1.27k|}
xmlrole.c:attlist7:
  841|  1.24k|         const ENCODING *enc) {
  842|  1.24k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.24k|#  define UNUSED_P(p) (void)p
  ------------------
  843|  1.24k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.24k|#  define UNUSED_P(p) (void)p
  ------------------
  844|  1.24k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.24k|#  define UNUSED_P(p) (void)p
  ------------------
  845|  1.24k|  switch (tok) {
  ------------------
  |  Branch (845:11): [True: 2, False: 1.24k]
  ------------------
  846|    260|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    260|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (846:3): [True: 260, False: 983]
  ------------------
  847|    260|    return XML_ROLE_ATTLIST_NONE;
  848|    275|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|    275|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (848:3): [True: 275, False: 968]
  ------------------
  849|    275|    state->handler = attlist8;
  850|    275|    return XML_ROLE_ATTLIST_NONE;
  851|    706|  case XML_TOK_OR:
  ------------------
  |  |   88|    706|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (851:3): [True: 706, False: 537]
  ------------------
  852|    706|    state->handler = attlist6;
  853|    706|    return XML_ROLE_ATTLIST_NONE;
  854|  1.24k|  }
  855|      2|  return common(state, tok);
  856|  1.24k|}
xmlrole.c:attlist3:
  772|  11.2k|         const ENCODING *enc) {
  773|  11.2k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  11.2k|#  define UNUSED_P(p) (void)p
  ------------------
  774|  11.2k|  UNUSED_P(end);
  ------------------
  |  |  135|  11.2k|#  define UNUSED_P(p) (void)p
  ------------------
  775|  11.2k|  UNUSED_P(enc);
  ------------------
  |  |  135|  11.2k|#  define UNUSED_P(p) (void)p
  ------------------
  776|  11.2k|  switch (tok) {
  ------------------
  |  Branch (776:11): [True: 7, False: 11.2k]
  ------------------
  777|    702|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    702|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (777:3): [True: 702, False: 10.5k]
  ------------------
  778|    702|    return XML_ROLE_ATTLIST_NONE;
  779|  4.70k|  case XML_TOK_NMTOKEN:
  ------------------
  |  |   86|  4.70k|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (779:3): [True: 4.70k, False: 6.50k]
  ------------------
  780|  10.4k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  10.4k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (780:3): [True: 5.79k, False: 5.41k]
  ------------------
  781|  10.4k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  10.4k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (781:3): [True: 0, False: 11.2k]
  ------------------
  782|  10.4k|    state->handler = attlist4;
  783|  10.4k|    return XML_ROLE_ATTRIBUTE_ENUM_VALUE;
  784|  11.2k|  }
  785|      7|  return common(state, tok);
  786|  11.2k|}
xmlrole.c:attlist4:
  790|  12.6k|         const ENCODING *enc) {
  791|  12.6k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  12.6k|#  define UNUSED_P(p) (void)p
  ------------------
  792|  12.6k|  UNUSED_P(end);
  ------------------
  |  |  135|  12.6k|#  define UNUSED_P(p) (void)p
  ------------------
  793|  12.6k|  UNUSED_P(enc);
  ------------------
  |  |  135|  12.6k|#  define UNUSED_P(p) (void)p
  ------------------
  794|  12.6k|  switch (tok) {
  ------------------
  |  Branch (794:11): [True: 20, False: 12.6k]
  ------------------
  795|  2.19k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  2.19k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (795:3): [True: 2.19k, False: 10.4k]
  ------------------
  796|  2.19k|    return XML_ROLE_ATTLIST_NONE;
  797|  3.70k|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|  3.70k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (797:3): [True: 3.70k, False: 8.94k]
  ------------------
  798|  3.70k|    state->handler = attlist8;
  799|  3.70k|    return XML_ROLE_ATTLIST_NONE;
  800|  6.73k|  case XML_TOK_OR:
  ------------------
  |  |   88|  6.73k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (800:3): [True: 6.73k, False: 5.92k]
  ------------------
  801|  6.73k|    state->handler = attlist3;
  802|  6.73k|    return XML_ROLE_ATTLIST_NONE;
  803|  12.6k|  }
  804|     20|  return common(state, tok);
  805|  12.6k|}
xmlrole.c:element0:
  907|  16.2k|         const ENCODING *enc) {
  908|  16.2k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  16.2k|#  define UNUSED_P(p) (void)p
  ------------------
  909|  16.2k|  UNUSED_P(end);
  ------------------
  |  |  135|  16.2k|#  define UNUSED_P(p) (void)p
  ------------------
  910|  16.2k|  UNUSED_P(enc);
  ------------------
  |  |  135|  16.2k|#  define UNUSED_P(p) (void)p
  ------------------
  911|  16.2k|  switch (tok) {
  ------------------
  |  Branch (911:11): [True: 2, False: 16.1k]
  ------------------
  912|  8.10k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  8.10k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (912:3): [True: 8.10k, False: 8.09k]
  ------------------
  913|  8.10k|    return XML_ROLE_ELEMENT_NONE;
  914|  8.09k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  8.09k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (914:3): [True: 8.09k, False: 8.10k]
  ------------------
  915|  8.09k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  8.09k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (915:3): [True: 0, False: 16.2k]
  ------------------
  916|  8.09k|    state->handler = element1;
  917|  8.09k|    return XML_ROLE_ELEMENT_NAME;
  918|  16.2k|  }
  919|      2|  return common(state, tok);
  920|  16.2k|}
xmlrole.c:element1:
  924|  16.1k|         const ENCODING *enc) {
  925|  16.1k|  switch (tok) {
  ------------------
  |  Branch (925:11): [True: 3, False: 16.1k]
  ------------------
  926|  8.09k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  8.09k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (926:3): [True: 8.09k, False: 8.09k]
  ------------------
  927|  8.09k|    return XML_ROLE_ELEMENT_NONE;
  928|  1.74k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.74k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (928:3): [True: 1.74k, False: 14.4k]
  ------------------
  929|  1.74k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_EMPTY)) {
  ------------------
  |  |  255|  1.74k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 34, False: 1.70k]
  |  |  ------------------
  ------------------
  930|     34|      state->handler = declClose;
  931|     34|      state->role_none = XML_ROLE_ELEMENT_NONE;
  932|     34|      return XML_ROLE_CONTENT_EMPTY;
  933|     34|    }
  934|  1.70k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_ANY)) {
  ------------------
  |  |  255|  1.70k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.70k, False: 5]
  |  |  ------------------
  ------------------
  935|  1.70k|      state->handler = declClose;
  936|  1.70k|      state->role_none = XML_ROLE_ELEMENT_NONE;
  937|  1.70k|      return XML_ROLE_CONTENT_ANY;
  938|  1.70k|    }
  939|      5|    break;
  940|  6.34k|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  6.34k|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (940:3): [True: 6.34k, False: 9.83k]
  ------------------
  941|  6.34k|    state->handler = element2;
  942|  6.34k|    state->level = 1;
  943|  6.34k|    return XML_ROLE_GROUP_OPEN;
  944|  16.1k|  }
  945|      8|  return common(state, tok);
  946|  16.1k|}
xmlrole.c:element2:
  950|  7.70k|         const ENCODING *enc) {
  951|  7.70k|  switch (tok) {
  ------------------
  |  Branch (951:11): [True: 3, False: 7.69k]
  ------------------
  952|  1.36k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.36k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (952:3): [True: 1.36k, False: 6.33k]
  ------------------
  953|  1.36k|    return XML_ROLE_ELEMENT_NONE;
  954|  2.07k|  case XML_TOK_POUND_NAME:
  ------------------
  |  |   87|  2.07k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  |  Branch (954:3): [True: 2.07k, False: 5.62k]
  ------------------
  955|  2.07k|    if (XmlNameMatchesAscii(enc, ptr + MIN_BYTES_PER_CHAR(enc), end,
  ------------------
  |  |  255|  2.07k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 2.07k, False: 5]
  |  |  ------------------
  ------------------
  956|  2.07k|                            KW_PCDATA)) {
  957|  2.07k|      state->handler = element3;
  958|  2.07k|      return XML_ROLE_CONTENT_PCDATA;
  959|  2.07k|    }
  960|      5|    break;
  961|    510|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|    510|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (961:3): [True: 510, False: 7.19k]
  ------------------
  962|    510|    state->level = 2;
  963|    510|    state->handler = element6;
  964|    510|    return XML_ROLE_GROUP_OPEN;
  965|  2.38k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  2.38k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (965:3): [True: 2.38k, False: 5.31k]
  ------------------
  966|  2.38k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  2.38k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (966:3): [True: 0, False: 7.70k]
  ------------------
  967|  2.38k|    state->handler = element7;
  968|  2.38k|    return XML_ROLE_CONTENT_ELEMENT;
  969|    438|  case XML_TOK_NAME_QUESTION:
  ------------------
  |  |   99|    438|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
  |  Branch (969:3): [True: 438, False: 7.26k]
  ------------------
  970|    438|    state->handler = element7;
  971|    438|    return XML_ROLE_CONTENT_ELEMENT_OPT;
  972|    501|  case XML_TOK_NAME_ASTERISK:
  ------------------
  |  |  100|    501|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
  |  Branch (972:3): [True: 501, False: 7.20k]
  ------------------
  973|    501|    state->handler = element7;
  974|    501|    return XML_ROLE_CONTENT_ELEMENT_REP;
  975|    426|  case XML_TOK_NAME_PLUS:
  ------------------
  |  |  101|    426|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
  |  Branch (975:3): [True: 426, False: 7.27k]
  ------------------
  976|    426|    state->handler = element7;
  977|    426|    return XML_ROLE_CONTENT_ELEMENT_PLUS;
  978|  7.70k|  }
  979|      8|  return common(state, tok);
  980|  7.70k|}
xmlrole.c:element3:
  984|  2.50k|         const ENCODING *enc) {
  985|  2.50k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.50k|#  define UNUSED_P(p) (void)p
  ------------------
  986|  2.50k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.50k|#  define UNUSED_P(p) (void)p
  ------------------
  987|  2.50k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.50k|#  define UNUSED_P(p) (void)p
  ------------------
  988|  2.50k|  switch (tok) {
  ------------------
  |  Branch (988:11): [True: 5, False: 2.49k]
  ------------------
  989|    434|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    434|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (989:3): [True: 434, False: 2.06k]
  ------------------
  990|    434|    return XML_ROLE_ELEMENT_NONE;
  991|    737|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|    737|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (991:3): [True: 737, False: 1.76k]
  ------------------
  992|    737|    state->handler = declClose;
  993|    737|    state->role_none = XML_ROLE_ELEMENT_NONE;
  994|    737|    return XML_ROLE_GROUP_CLOSE;
  995|    453|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|    453|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (995:3): [True: 453, False: 2.04k]
  ------------------
  996|    453|    state->handler = declClose;
  997|    453|    state->role_none = XML_ROLE_ELEMENT_NONE;
  998|    453|    return XML_ROLE_GROUP_CLOSE_REP;
  999|    873|  case XML_TOK_OR:
  ------------------
  |  |   88|    873|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (999:3): [True: 873, False: 1.62k]
  ------------------
 1000|    873|    state->handler = element4;
 1001|    873|    return XML_ROLE_ELEMENT_NONE;
 1002|  2.50k|  }
 1003|      5|  return common(state, tok);
 1004|  2.50k|}
xmlrole.c:element4:
 1008|  4.37k|         const ENCODING *enc) {
 1009|  4.37k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  4.37k|#  define UNUSED_P(p) (void)p
  ------------------
 1010|  4.37k|  UNUSED_P(end);
  ------------------
  |  |  135|  4.37k|#  define UNUSED_P(p) (void)p
  ------------------
 1011|  4.37k|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.37k|#  define UNUSED_P(p) (void)p
  ------------------
 1012|  4.37k|  switch (tok) {
  ------------------
  |  Branch (1012:11): [True: 14, False: 4.36k]
  ------------------
 1013|  1.32k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.32k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1013:3): [True: 1.32k, False: 3.04k]
  ------------------
 1014|  1.32k|    return XML_ROLE_ELEMENT_NONE;
 1015|  3.03k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  3.03k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1015:3): [True: 3.03k, False: 1.34k]
  ------------------
 1016|  3.03k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  3.03k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1016:3): [True: 0, False: 4.37k]
  ------------------
 1017|  3.03k|    state->handler = element5;
 1018|  3.03k|    return XML_ROLE_CONTENT_ELEMENT;
 1019|  4.37k|  }
 1020|     14|  return common(state, tok);
 1021|  4.37k|}
xmlrole.c:element5:
 1025|  3.41k|         const ENCODING *enc) {
 1026|  3.41k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.41k|#  define UNUSED_P(p) (void)p
  ------------------
 1027|  3.41k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.41k|#  define UNUSED_P(p) (void)p
  ------------------
 1028|  3.41k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.41k|#  define UNUSED_P(p) (void)p
  ------------------
 1029|  3.41k|  switch (tok) {
  ------------------
  |  Branch (1029:11): [True: 3, False: 3.40k]
  ------------------
 1030|    380|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    380|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1030:3): [True: 380, False: 3.03k]
  ------------------
 1031|    380|    return XML_ROLE_ELEMENT_NONE;
 1032|    821|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|    821|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (1032:3): [True: 821, False: 2.58k]
  ------------------
 1033|    821|    state->handler = declClose;
 1034|    821|    state->role_none = XML_ROLE_ELEMENT_NONE;
 1035|    821|    return XML_ROLE_GROUP_CLOSE_REP;
 1036|  2.20k|  case XML_TOK_OR:
  ------------------
  |  |   88|  2.20k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (1036:3): [True: 2.20k, False: 1.20k]
  ------------------
 1037|  2.20k|    state->handler = element4;
 1038|  2.20k|    return XML_ROLE_ELEMENT_NONE;
 1039|  3.41k|  }
 1040|      3|  return common(state, tok);
 1041|  3.41k|}
xmlrole.c:element6:
 1045|  4.56M|         const ENCODING *enc) {
 1046|  4.56M|  UNUSED_P(ptr);
  ------------------
  |  |  135|  4.56M|#  define UNUSED_P(p) (void)p
  ------------------
 1047|  4.56M|  UNUSED_P(end);
  ------------------
  |  |  135|  4.56M|#  define UNUSED_P(p) (void)p
  ------------------
 1048|  4.56M|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.56M|#  define UNUSED_P(p) (void)p
  ------------------
 1049|  4.56M|  switch (tok) {
  ------------------
  |  Branch (1049:11): [True: 46, False: 4.56M]
  ------------------
 1050|  30.2k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  30.2k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1050:3): [True: 30.2k, False: 4.53M]
  ------------------
 1051|  30.2k|    return XML_ROLE_ELEMENT_NONE;
 1052|  4.51M|  case XML_TOK_OPEN_PAREN:
  ------------------
  |  |   90|  4.51M|#define XML_TOK_OPEN_PAREN 23
  ------------------
  |  Branch (1052:3): [True: 4.51M, False: 49.4k]
  ------------------
 1053|  4.51M|    state->level += 1;
 1054|  4.51M|    return XML_ROLE_GROUP_OPEN;
 1055|  15.1k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  15.1k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1055:3): [True: 15.1k, False: 4.55M]
  ------------------
 1056|  15.1k|  case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|  15.1k|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1056:3): [True: 0, False: 4.56M]
  ------------------
 1057|  15.1k|    state->handler = element7;
 1058|  15.1k|    return XML_ROLE_CONTENT_ELEMENT;
 1059|    801|  case XML_TOK_NAME_QUESTION:
  ------------------
  |  |   99|    801|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
  |  Branch (1059:3): [True: 801, False: 4.56M]
  ------------------
 1060|    801|    state->handler = element7;
 1061|    801|    return XML_ROLE_CONTENT_ELEMENT_OPT;
 1062|    571|  case XML_TOK_NAME_ASTERISK:
  ------------------
  |  |  100|    571|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
  |  Branch (1062:3): [True: 571, False: 4.56M]
  ------------------
 1063|    571|    state->handler = element7;
 1064|    571|    return XML_ROLE_CONTENT_ELEMENT_REP;
 1065|  2.54k|  case XML_TOK_NAME_PLUS:
  ------------------
  |  |  101|  2.54k|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
  |  Branch (1065:3): [True: 2.54k, False: 4.56M]
  ------------------
 1066|  2.54k|    state->handler = element7;
 1067|  2.54k|    return XML_ROLE_CONTENT_ELEMENT_PLUS;
 1068|  4.56M|  }
 1069|     46|  return common(state, tok);
 1070|  4.56M|}
xmlrole.c:element7:
 1074|   249k|         const ENCODING *enc) {
 1075|   249k|  UNUSED_P(ptr);
  ------------------
  |  |  135|   249k|#  define UNUSED_P(p) (void)p
  ------------------
 1076|   249k|  UNUSED_P(end);
  ------------------
  |  |  135|   249k|#  define UNUSED_P(p) (void)p
  ------------------
 1077|   249k|  UNUSED_P(enc);
  ------------------
  |  |  135|   249k|#  define UNUSED_P(p) (void)p
  ------------------
 1078|   249k|  switch (tok) {
  ------------------
  |  Branch (1078:11): [True: 71, False: 249k]
  ------------------
 1079|  26.2k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  26.2k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (1079:3): [True: 26.2k, False: 223k]
  ------------------
 1080|  26.2k|    return XML_ROLE_ELEMENT_NONE;
 1081|   106k|  case XML_TOK_CLOSE_PAREN:
  ------------------
  |  |   91|   106k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
  |  Branch (1081:3): [True: 106k, False: 143k]
  ------------------
 1082|   106k|    state->level -= 1;
 1083|   106k|    if (state->level == 0) {
  ------------------
  |  Branch (1083:9): [True: 1.71k, False: 105k]
  ------------------
 1084|  1.71k|      state->handler = declClose;
 1085|  1.71k|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1086|  1.71k|    }
 1087|   106k|    return XML_ROLE_GROUP_CLOSE;
 1088|  7.86k|  case XML_TOK_CLOSE_PAREN_ASTERISK:
  ------------------
  |  |  105|  7.86k|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
  |  Branch (1088:3): [True: 7.86k, False: 241k]
  ------------------
 1089|  7.86k|    state->level -= 1;
 1090|  7.86k|    if (state->level == 0) {
  ------------------
  |  Branch (1090:9): [True: 989, False: 6.87k]
  ------------------
 1091|    989|      state->handler = declClose;
 1092|    989|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1093|    989|    }
 1094|  7.86k|    return XML_ROLE_GROUP_CLOSE_REP;
 1095|  1.98k|  case XML_TOK_CLOSE_PAREN_QUESTION:
  ------------------
  |  |  104|  1.98k|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
  |  Branch (1095:3): [True: 1.98k, False: 247k]
  ------------------
 1096|  1.98k|    state->level -= 1;
 1097|  1.98k|    if (state->level == 0) {
  ------------------
  |  Branch (1097:9): [True: 617, False: 1.36k]
  ------------------
 1098|    617|      state->handler = declClose;
 1099|    617|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1100|    617|    }
 1101|  1.98k|    return XML_ROLE_GROUP_CLOSE_OPT;
 1102|  88.0k|  case XML_TOK_CLOSE_PAREN_PLUS:
  ------------------
  |  |  106|  88.0k|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
  |  Branch (1102:3): [True: 88.0k, False: 161k]
  ------------------
 1103|  88.0k|    state->level -= 1;
 1104|  88.0k|    if (state->level == 0) {
  ------------------
  |  Branch (1104:9): [True: 512, False: 87.5k]
  ------------------
 1105|    512|      state->handler = declClose;
 1106|    512|      state->role_none = XML_ROLE_ELEMENT_NONE;
 1107|    512|    }
 1108|  88.0k|    return XML_ROLE_GROUP_CLOSE_PLUS;
 1109|  8.11k|  case XML_TOK_COMMA:
  ------------------
  |  |  107|  8.11k|#define XML_TOK_COMMA 38
  ------------------
  |  Branch (1109:3): [True: 8.11k, False: 241k]
  ------------------
 1110|  8.11k|    state->handler = element6;
 1111|  8.11k|    return XML_ROLE_GROUP_SEQUENCE;
 1112|  10.6k|  case XML_TOK_OR:
  ------------------
  |  |   88|  10.6k|#define XML_TOK_OR 21         /* | */
  ------------------
  |  Branch (1112:3): [True: 10.6k, False: 239k]
  ------------------
 1113|  10.6k|    state->handler = element6;
 1114|  10.6k|    return XML_ROLE_GROUP_CHOICE;
 1115|   249k|  }
 1116|     71|  return common(state, tok);
 1117|   249k|}
xmlrole.c:notation0:
  616|  2.89k|          const ENCODING *enc) {
  617|  2.89k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.89k|#  define UNUSED_P(p) (void)p
  ------------------
  618|  2.89k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.89k|#  define UNUSED_P(p) (void)p
  ------------------
  619|  2.89k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.89k|#  define UNUSED_P(p) (void)p
  ------------------
  620|  2.89k|  switch (tok) {
  ------------------
  |  Branch (620:11): [True: 2, False: 2.89k]
  ------------------
  621|  1.45k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.45k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (621:3): [True: 1.45k, False: 1.43k]
  ------------------
  622|  1.45k|    return XML_ROLE_NOTATION_NONE;
  623|  1.43k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.43k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (623:3): [True: 1.43k, False: 1.46k]
  ------------------
  624|  1.43k|    state->handler = notation1;
  625|  1.43k|    return XML_ROLE_NOTATION_NAME;
  626|  2.89k|  }
  627|      2|  return common(state, tok);
  628|  2.89k|}
xmlrole.c:notation1:
  632|  2.86k|          const ENCODING *enc) {
  633|  2.86k|  switch (tok) {
  ------------------
  |  Branch (633:11): [True: 5, False: 2.86k]
  ------------------
  634|  1.43k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.43k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (634:3): [True: 1.43k, False: 1.43k]
  ------------------
  635|  1.43k|    return XML_ROLE_NOTATION_NONE;
  636|  1.42k|  case XML_TOK_NAME:
  ------------------
  |  |   85|  1.42k|#define XML_TOK_NAME 18
  ------------------
  |  Branch (636:3): [True: 1.42k, False: 1.44k]
  ------------------
  637|  1.42k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_SYSTEM)) {
  ------------------
  |  |  255|  1.42k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 347, False: 1.07k]
  |  |  ------------------
  ------------------
  638|    347|      state->handler = notation3;
  639|    347|      return XML_ROLE_NOTATION_NONE;
  640|    347|    }
  641|  1.07k|    if (XmlNameMatchesAscii(enc, ptr, end, KW_PUBLIC)) {
  ------------------
  |  |  255|  1.07k|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 1.07k, False: 4]
  |  |  ------------------
  ------------------
  642|  1.07k|      state->handler = notation2;
  643|  1.07k|      return XML_ROLE_NOTATION_NONE;
  644|  1.07k|    }
  645|      4|    break;
  646|  2.86k|  }
  647|      9|  return common(state, tok);
  648|  2.86k|}
xmlrole.c:notation3:
  668|    689|          const ENCODING *enc) {
  669|    689|  UNUSED_P(ptr);
  ------------------
  |  |  135|    689|#  define UNUSED_P(p) (void)p
  ------------------
  670|    689|  UNUSED_P(end);
  ------------------
  |  |  135|    689|#  define UNUSED_P(p) (void)p
  ------------------
  671|    689|  UNUSED_P(enc);
  ------------------
  |  |  135|    689|#  define UNUSED_P(p) (void)p
  ------------------
  672|    689|  switch (tok) {
  ------------------
  |  Branch (672:11): [True: 4, False: 685]
  ------------------
  673|    346|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    346|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (673:3): [True: 346, False: 343]
  ------------------
  674|    346|    return XML_ROLE_NOTATION_NONE;
  675|    339|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    339|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (675:3): [True: 339, False: 350]
  ------------------
  676|    339|    state->handler = declClose;
  677|    339|    state->role_none = XML_ROLE_NOTATION_NONE;
  678|    339|    return XML_ROLE_NOTATION_SYSTEM_ID;
  679|    689|  }
  680|      4|  return common(state, tok);
  681|    689|}
xmlrole.c:notation2:
  652|  2.14k|          const ENCODING *enc) {
  653|  2.14k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.14k|#  define UNUSED_P(p) (void)p
  ------------------
  654|  2.14k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.14k|#  define UNUSED_P(p) (void)p
  ------------------
  655|  2.14k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.14k|#  define UNUSED_P(p) (void)p
  ------------------
  656|  2.14k|  switch (tok) {
  ------------------
  |  Branch (656:11): [True: 3, False: 2.13k]
  ------------------
  657|  1.07k|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|  1.07k|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (657:3): [True: 1.07k, False: 1.07k]
  ------------------
  658|  1.07k|    return XML_ROLE_NOTATION_NONE;
  659|  1.06k|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|  1.06k|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (659:3): [True: 1.06k, False: 1.07k]
  ------------------
  660|  1.06k|    state->handler = notation4;
  661|  1.06k|    return XML_ROLE_NOTATION_PUBLIC_ID;
  662|  2.14k|  }
  663|      3|  return common(state, tok);
  664|  2.14k|}
xmlrole.c:notation4:
  685|  1.44k|          const ENCODING *enc) {
  686|  1.44k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.44k|#  define UNUSED_P(p) (void)p
  ------------------
  687|  1.44k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.44k|#  define UNUSED_P(p) (void)p
  ------------------
  688|  1.44k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.44k|#  define UNUSED_P(p) (void)p
  ------------------
  689|  1.44k|  switch (tok) {
  ------------------
  |  Branch (689:11): [True: 1, False: 1.44k]
  ------------------
  690|    384|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    384|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (690:3): [True: 384, False: 1.05k]
  ------------------
  691|    384|    return XML_ROLE_NOTATION_NONE;
  692|    308|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    308|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (692:3): [True: 308, False: 1.13k]
  ------------------
  693|    308|    state->handler = declClose;
  694|    308|    state->role_none = XML_ROLE_NOTATION_NONE;
  695|    308|    return XML_ROLE_NOTATION_SYSTEM_ID;
  696|    748|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|    748|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (696:3): [True: 748, False: 693]
  ------------------
  697|    748|    setTopLevel(state);
  ------------------
  |  |  116|    748|    ((state)->handler                                                          \
  |  |  117|    748|     = ((state)->documentEntity ? internalSubset : externalSubset1))
  |  |  ------------------
  |  |  |  Branch (117:9): [True: 748, False: 0]
  |  |  ------------------
  ------------------
  698|    748|    return XML_ROLE_NOTATION_NO_SYSTEM_ID;
  699|  1.44k|  }
  700|      1|  return common(state, tok);
  701|  1.44k|}
xmlrole.c:doctype5:
  319|  2.33k|         const ENCODING *enc) {
  320|  2.33k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  2.33k|#  define UNUSED_P(p) (void)p
  ------------------
  321|  2.33k|  UNUSED_P(end);
  ------------------
  |  |  135|  2.33k|#  define UNUSED_P(p) (void)p
  ------------------
  322|  2.33k|  UNUSED_P(enc);
  ------------------
  |  |  135|  2.33k|#  define UNUSED_P(p) (void)p
  ------------------
  323|  2.33k|  switch (tok) {
  ------------------
  |  Branch (323:11): [True: 5, False: 2.33k]
  ------------------
  324|     27|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|     27|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (324:3): [True: 27, False: 2.31k]
  ------------------
  325|     27|    return XML_ROLE_DOCTYPE_NONE;
  326|  2.30k|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|  2.30k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (326:3): [True: 2.30k, False: 32]
  ------------------
  327|  2.30k|    state->handler = prolog2;
  328|  2.30k|    return XML_ROLE_DOCTYPE_CLOSE;
  329|  2.33k|  }
  330|      5|  return common(state, tok);
  331|  2.33k|}
xmlrole.c:prolog2:
  205|  3.59k|        const ENCODING *enc) {
  206|  3.59k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  3.59k|#  define UNUSED_P(p) (void)p
  ------------------
  207|  3.59k|  UNUSED_P(end);
  ------------------
  |  |  135|  3.59k|#  define UNUSED_P(p) (void)p
  ------------------
  208|  3.59k|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.59k|#  define UNUSED_P(p) (void)p
  ------------------
  209|  3.59k|  switch (tok) {
  ------------------
  |  Branch (209:11): [True: 18, False: 3.58k]
  ------------------
  210|    497|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    497|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (210:3): [True: 497, False: 3.10k]
  ------------------
  211|    497|    return XML_ROLE_NONE;
  212|    463|  case XML_TOK_PI:
  ------------------
  |  |   76|    463|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  |  Branch (212:3): [True: 463, False: 3.13k]
  ------------------
  213|    463|    return XML_ROLE_PI;
  214|    321|  case XML_TOK_COMMENT:
  ------------------
  |  |   78|    321|#define XML_TOK_COMMENT 13
  ------------------
  |  Branch (214:3): [True: 321, False: 3.27k]
  ------------------
  215|    321|    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: 1.29k]
  ------------------
  217|  2.29k|    state->handler = error;
  218|  2.29k|    return XML_ROLE_INSTANCE_START;
  219|  3.59k|  }
  220|     18|  return common(state, tok);
  221|  3.59k|}
xmlrole.c:doctype3:
  284|    405|         const ENCODING *enc) {
  285|    405|  UNUSED_P(ptr);
  ------------------
  |  |  135|    405|#  define UNUSED_P(p) (void)p
  ------------------
  286|    405|  UNUSED_P(end);
  ------------------
  |  |  135|    405|#  define UNUSED_P(p) (void)p
  ------------------
  287|    405|  UNUSED_P(enc);
  ------------------
  |  |  135|    405|#  define UNUSED_P(p) (void)p
  ------------------
  288|    405|  switch (tok) {
  ------------------
  |  Branch (288:11): [True: 125, False: 280]
  ------------------
  289|    240|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    240|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (289:3): [True: 240, False: 165]
  ------------------
  290|    240|    return XML_ROLE_DOCTYPE_NONE;
  291|     40|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|     40|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (291:3): [True: 40, False: 365]
  ------------------
  292|     40|    state->handler = doctype4;
  293|     40|    return XML_ROLE_DOCTYPE_SYSTEM_ID;
  294|    405|  }
  295|    125|  return common(state, tok);
  296|    405|}
xmlrole.c:doctype4:
  300|     47|         const ENCODING *enc) {
  301|     47|  UNUSED_P(ptr);
  ------------------
  |  |  135|     47|#  define UNUSED_P(p) (void)p
  ------------------
  302|     47|  UNUSED_P(end);
  ------------------
  |  |  135|     47|#  define UNUSED_P(p) (void)p
  ------------------
  303|     47|  UNUSED_P(enc);
  ------------------
  |  |  135|     47|#  define UNUSED_P(p) (void)p
  ------------------
  304|     47|  switch (tok) {
  ------------------
  |  Branch (304:11): [True: 9, False: 38]
  ------------------
  305|     26|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|     26|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (305:3): [True: 26, False: 21]
  ------------------
  306|     26|    return XML_ROLE_DOCTYPE_NONE;
  307|      7|  case XML_TOK_OPEN_BRACKET:
  ------------------
  |  |   92|      7|#define XML_TOK_OPEN_BRACKET 25
  ------------------
  |  Branch (307:3): [True: 7, False: 40]
  ------------------
  308|      7|    state->handler = internalSubset;
  309|      7|    return XML_ROLE_DOCTYPE_INTERNAL_SUBSET;
  310|      5|  case XML_TOK_DECL_CLOSE:
  ------------------
  |  |   84|      5|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
  |  Branch (310:3): [True: 5, False: 42]
  ------------------
  311|      5|    state->handler = prolog2;
  312|      5|    return XML_ROLE_DOCTYPE_CLOSE;
  313|     47|  }
  314|      9|  return common(state, tok);
  315|     47|}
xmlrole.c:doctype2:
  268|  1.46k|         const ENCODING *enc) {
  269|  1.46k|  UNUSED_P(ptr);
  ------------------
  |  |  135|  1.46k|#  define UNUSED_P(p) (void)p
  ------------------
  270|  1.46k|  UNUSED_P(end);
  ------------------
  |  |  135|  1.46k|#  define UNUSED_P(p) (void)p
  ------------------
  271|  1.46k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.46k|#  define UNUSED_P(p) (void)p
  ------------------
  272|  1.46k|  switch (tok) {
  ------------------
  |  Branch (272:11): [True: 10, False: 1.45k]
  ------------------
  273|    738|  case XML_TOK_PROLOG_S:
  ------------------
  |  |   82|    738|#define XML_TOK_PROLOG_S 15
  ------------------
  |  Branch (273:3): [True: 738, False: 730]
  ------------------
  274|    738|    return XML_ROLE_DOCTYPE_NONE;
  275|    720|  case XML_TOK_LITERAL:
  ------------------
  |  |   94|    720|#define XML_TOK_LITERAL 27
  ------------------
  |  Branch (275:3): [True: 720, False: 748]
  ------------------
  276|    720|    state->handler = doctype3;
  277|    720|    return XML_ROLE_DOCTYPE_PUBLIC_ID;
  278|  1.46k|  }
  279|     10|  return common(state, tok);
  280|  1.46k|}
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|  33.1M|                                           const char **fromLimRef) {
  328|  33.1M|  const char *fromLim = *fromLimRef;
  329|  33.1M|  size_t walked = 0;
  330|  44.3M|  for (; fromLim > from; fromLim--, walked++) {
  ------------------
  |  Branch (330:10): [True: 44.3M, False: 5.51k]
  ------------------
  331|  44.3M|    const unsigned char prev = (unsigned char)fromLim[-1];
  332|  44.3M|    if ((prev & 0xf8u)
  ------------------
  |  Branch (332:9): [True: 871k, False: 43.4M]
  ------------------
  333|  44.3M|        == 0xf0u) { /* 4-byte character, lead by 0b11110xxx byte */
  334|   871k|      if (walked + 1 >= 4) {
  ------------------
  |  Branch (334:11): [True: 871k, False: 265]
  ------------------
  335|   871k|        fromLim += 4 - 1;
  336|   871k|        break;
  337|   871k|      } else {
  338|    265|        walked = 0;
  339|    265|      }
  340|  43.4M|    } else if ((prev & 0xf0u)
  ------------------
  |  Branch (340:16): [True: 4.24M, False: 39.2M]
  ------------------
  341|  43.4M|               == 0xe0u) { /* 3-byte character, lead by 0b1110xxxx byte */
  342|  4.24M|      if (walked + 1 >= 3) {
  ------------------
  |  Branch (342:11): [True: 4.24M, False: 1.33k]
  ------------------
  343|  4.24M|        fromLim += 3 - 1;
  344|  4.24M|        break;
  345|  4.24M|      } else {
  346|  1.33k|        walked = 0;
  347|  1.33k|      }
  348|  39.2M|    } else if ((prev & 0xe0u)
  ------------------
  |  Branch (348:16): [True: 113k, False: 39.1M]
  ------------------
  349|  39.2M|               == 0xc0u) { /* 2-byte character, lead by 0b110xxxxx byte */
  350|   113k|      if (walked + 1 >= 2) {
  ------------------
  |  Branch (350:11): [True: 113k, False: 262]
  ------------------
  351|   113k|        fromLim += 2 - 1;
  352|   113k|        break;
  353|   113k|      } else {
  354|    262|        walked = 0;
  355|    262|      }
  356|  39.1M|    } else if ((prev & 0x80u)
  ------------------
  |  Branch (356:16): [True: 27.9M, False: 11.2M]
  ------------------
  357|  39.1M|               == 0x00u) { /* 1-byte character, matching 0b0xxxxxxx */
  358|  27.9M|      break;
  359|  27.9M|    }
  360|  44.3M|  }
  361|  33.1M|  *fromLimRef = fromLim;
  362|  33.1M|}
XmlUtf8Encode:
 1255|  10.5k|XmlUtf8Encode(int c, char *buf) {
 1256|  10.5k|  enum {
 1257|       |    /* minN is minimum legal resulting value for N byte sequence */
 1258|  10.5k|    min2 = 0x80,
 1259|  10.5k|    min3 = 0x800,
 1260|  10.5k|    min4 = 0x10000
 1261|  10.5k|  };
 1262|       |
 1263|  10.5k|  if (c < 0)
  ------------------
  |  Branch (1263:7): [True: 0, False: 10.5k]
  ------------------
 1264|      0|    return 0; /* LCOV_EXCL_LINE: this case is always eliminated beforehand */
 1265|  10.5k|  if (c < min2) {
  ------------------
  |  Branch (1265:7): [True: 1.21k, False: 9.33k]
  ------------------
 1266|  1.21k|    buf[0] = (char)(c | UTF8_cval1);
 1267|  1.21k|    return 1;
 1268|  1.21k|  }
 1269|  9.33k|  if (c < min3) {
  ------------------
  |  Branch (1269:7): [True: 5.18k, False: 4.14k]
  ------------------
 1270|  5.18k|    buf[0] = (char)((c >> 6) | UTF8_cval2);
 1271|  5.18k|    buf[1] = (char)((c & 0x3f) | 0x80);
 1272|  5.18k|    return 2;
 1273|  5.18k|  }
 1274|  4.14k|  if (c < min4) {
  ------------------
  |  Branch (1274:7): [True: 2.80k, False: 1.33k]
  ------------------
 1275|  2.80k|    buf[0] = (char)((c >> 12) | UTF8_cval3);
 1276|  2.80k|    buf[1] = (char)(((c >> 6) & 0x3f) | 0x80);
 1277|  2.80k|    buf[2] = (char)((c & 0x3f) | 0x80);
 1278|  2.80k|    return 3;
 1279|  2.80k|  }
 1280|  1.33k|  if (c < 0x110000) {
  ------------------
  |  Branch (1280:7): [True: 1.33k, False: 0]
  ------------------
 1281|  1.33k|    buf[0] = (char)((c >> 18) | UTF8_cval4);
 1282|  1.33k|    buf[1] = (char)(((c >> 12) & 0x3f) | 0x80);
 1283|  1.33k|    buf[2] = (char)(((c >> 6) & 0x3f) | 0x80);
 1284|  1.33k|    buf[3] = (char)((c & 0x3f) | 0x80);
 1285|  1.33k|    return 4;
 1286|  1.33k|  }
 1287|      0|  return 0; /* LCOV_EXCL_LINE: this case too is eliminated before calling */
 1288|  1.33k|}
xmltok.c:checkCharRefNumber:
 1231|  20.6k|checkCharRefNumber(int result) {
 1232|  20.6k|  switch (result >> 8) {
  ------------------
  |  Branch (1232:11): [True: 13.3k, False: 7.26k]
  ------------------
 1233|      3|  case 0xD8:
  ------------------
  |  Branch (1233:3): [True: 3, False: 20.6k]
  ------------------
 1234|      6|  case 0xD9:
  ------------------
  |  Branch (1234:3): [True: 3, False: 20.6k]
  ------------------
 1235|      9|  case 0xDA:
  ------------------
  |  Branch (1235:3): [True: 3, False: 20.6k]
  ------------------
 1236|     12|  case 0xDB:
  ------------------
  |  Branch (1236:3): [True: 3, False: 20.6k]
  ------------------
 1237|     15|  case 0xDC:
  ------------------
  |  Branch (1237:3): [True: 3, False: 20.6k]
  ------------------
 1238|     28|  case 0xDD:
  ------------------
  |  Branch (1238:3): [True: 13, False: 20.6k]
  ------------------
 1239|     31|  case 0xDE:
  ------------------
  |  Branch (1239:3): [True: 3, False: 20.6k]
  ------------------
 1240|     34|  case 0xDF:
  ------------------
  |  Branch (1240:3): [True: 3, False: 20.6k]
  ------------------
 1241|     34|    return -1;
 1242|  6.08k|  case 0:
  ------------------
  |  Branch (1242:3): [True: 6.08k, False: 14.5k]
  ------------------
 1243|  6.08k|    if (latin1_encoding.type[result] == BT_NONXML)
  ------------------
  |  Branch (1243:9): [True: 130, False: 5.95k]
  ------------------
 1244|    130|      return -1;
 1245|  5.95k|    break;
 1246|  5.95k|  case 0xFF:
  ------------------
  |  Branch (1246:3): [True: 1.15k, False: 19.5k]
  ------------------
 1247|  1.15k|    if (result == 0xFFFE || result == 0xFFFF)
  ------------------
  |  Branch (1247:9): [True: 4, False: 1.14k]
  |  Branch (1247:29): [True: 11, False: 1.13k]
  ------------------
 1248|     15|      return -1;
 1249|  1.13k|    break;
 1250|  20.6k|  }
 1251|  20.4k|  return result;
 1252|  20.6k|}
xmltok.c:utf8_toUtf8:
  366|  33.1M|            char **toP, const char *toLim) {
  367|  33.1M|  bool input_incomplete = false;
  368|  33.1M|  bool output_exhausted = false;
  369|       |
  370|       |  /* Avoid copying partial characters (due to limited space). */
  371|  33.1M|  const ptrdiff_t bytesAvailable = fromLim - *fromP;
  372|  33.1M|  const ptrdiff_t bytesStorable = toLim - *toP;
  373|  33.1M|  UNUSED_P(enc);
  ------------------
  |  |  135|  33.1M|#  define UNUSED_P(p) (void)p
  ------------------
  374|  33.1M|  if (bytesAvailable > bytesStorable) {
  ------------------
  |  Branch (374:7): [True: 8.23k, False: 33.1M]
  ------------------
  375|  8.23k|    fromLim = *fromP + bytesStorable;
  376|  8.23k|    output_exhausted = true;
  377|  8.23k|  }
  378|       |
  379|       |  /* Avoid copying partial characters (from incomplete input). */
  380|  33.1M|  {
  381|  33.1M|    const char *const fromLimBefore = fromLim;
  382|  33.1M|    _INTERNAL_trim_to_complete_utf8_characters(*fromP, &fromLim);
  383|  33.1M|    if (fromLim < fromLimBefore) {
  ------------------
  |  Branch (383:9): [True: 1.86k, False: 33.1M]
  ------------------
  384|  1.86k|      input_incomplete = true;
  385|  1.86k|    }
  386|  33.1M|  }
  387|       |
  388|  33.1M|  {
  389|  33.1M|    const ptrdiff_t bytesToCopy = fromLim - *fromP;
  390|  33.1M|    memcpy(*toP, *fromP, bytesToCopy);
  391|  33.1M|    *fromP += bytesToCopy;
  392|  33.1M|    *toP += bytesToCopy;
  393|  33.1M|  }
  394|       |
  395|  33.1M|  if (output_exhausted) /* needs to go first */
  ------------------
  |  Branch (395:7): [True: 8.23k, False: 33.1M]
  ------------------
  396|  8.23k|    return XML_CONVERT_OUTPUT_EXHAUSTED;
  397|  33.1M|  else if (input_incomplete)
  ------------------
  |  Branch (397:12): [True: 0, False: 33.1M]
  ------------------
  398|      0|    return XML_CONVERT_INPUT_INCOMPLETE;
  399|  33.1M|  else
  400|  33.1M|    return XML_CONVERT_COMPLETED;
  401|  33.1M|}
xmltok.c:utf8_isName2:
  140|   338k|utf8_isName2(const ENCODING *enc, const char *p) {
  141|   338k|  UNUSED_P(enc);
  ------------------
  |  |  135|   338k|#  define UNUSED_P(p) (void)p
  ------------------
  142|   338k|  return UTF8_GET_NAMING2(namePages, (const unsigned char *)p);
  ------------------
  |  |   86|   338k|  (namingBitmap[((pages)[(((byte)[0]) >> 2) & 7] << 3)                         \
  |  |   87|   338k|                + ((((byte)[0]) & 3) << 1) + ((((byte)[1]) >> 5) & 1)]         \
  |  |   88|   338k|   & (1u << (((byte)[1]) & 0x1F)))
  ------------------
  143|   338k|}
xmltok.c:utf8_isName3:
  146|  1.20M|utf8_isName3(const ENCODING *enc, const char *p) {
  147|  1.20M|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.20M|#  define UNUSED_P(p) (void)p
  ------------------
  148|  1.20M|  return UTF8_GET_NAMING3(namePages, (const unsigned char *)p);
  ------------------
  |  |   96|  1.20M|  (namingBitmap                                                                \
  |  |   97|  1.20M|       [((pages)[((((byte)[0]) & 0xF) << 4) + ((((byte)[1]) >> 2) & 0xF)]      \
  |  |   98|  1.20M|         << 3)                                                                 \
  |  |   99|  1.20M|        + ((((byte)[1]) & 3) << 1) + ((((byte)[2]) >> 5) & 1)]                 \
  |  |  100|  1.20M|   & (1u << (((byte)[2]) & 0x1F)))
  ------------------
  149|  1.20M|}
xmltok.c:isNever:
  133|    146|isNever(const ENCODING *enc, const char *p) {
  134|    146|  UNUSED_P(enc);
  ------------------
  |  |  135|    146|#  define UNUSED_P(p) (void)p
  ------------------
  135|    146|  UNUSED_P(p);
  ------------------
  |  |  135|    146|#  define UNUSED_P(p) (void)p
  ------------------
  136|    146|  return 0;
  137|    146|}
xmltok.c:utf8_isNmstrt2:
  154|   515k|utf8_isNmstrt2(const ENCODING *enc, const char *p) {
  155|   515k|  UNUSED_P(enc);
  ------------------
  |  |  135|   515k|#  define UNUSED_P(p) (void)p
  ------------------
  156|   515k|  return UTF8_GET_NAMING2(nmstrtPages, (const unsigned char *)p);
  ------------------
  |  |   86|   515k|  (namingBitmap[((pages)[(((byte)[0]) >> 2) & 7] << 3)                         \
  |  |   87|   515k|                + ((((byte)[0]) & 3) << 1) + ((((byte)[1]) >> 5) & 1)]         \
  |  |   88|   515k|   & (1u << (((byte)[1]) & 0x1F)))
  ------------------
  157|   515k|}
xmltok.c:utf8_isNmstrt3:
  160|  7.89k|utf8_isNmstrt3(const ENCODING *enc, const char *p) {
  161|  7.89k|  UNUSED_P(enc);
  ------------------
  |  |  135|  7.89k|#  define UNUSED_P(p) (void)p
  ------------------
  162|  7.89k|  return UTF8_GET_NAMING3(nmstrtPages, (const unsigned char *)p);
  ------------------
  |  |   96|  7.89k|  (namingBitmap                                                                \
  |  |   97|  7.89k|       [((pages)[((((byte)[0]) & 0xF) << 4) + ((((byte)[1]) >> 2) & 0xF)]      \
  |  |   98|  7.89k|         << 3)                                                                 \
  |  |   99|  7.89k|        + ((((byte)[1]) & 3) << 1) + ((((byte)[2]) >> 5) & 1)]                 \
  |  |  100|  7.89k|   & (1u << (((byte)[2]) & 0x1F)))
  ------------------
  163|  7.89k|}
xmltok.c:utf8_isInvalid2:
  168|   986k|utf8_isInvalid2(const ENCODING *enc, const char *p) {
  169|   986k|  UNUSED_P(enc);
  ------------------
  |  |  135|   986k|#  define UNUSED_P(p) (void)p
  ------------------
  170|   986k|  return UTF8_INVALID2((const unsigned char *)p);
  ------------------
  |  |  113|   986k|  ((*p) < 0xC2 || ((p)[1] & 0x80) == 0 || ((p)[1] & 0xC0) == 0xC0)
  |  |  ------------------
  |  |  |  Branch (113:4): [True: 28, False: 986k]
  |  |  |  Branch (113:19): [True: 77, False: 986k]
  |  |  |  Branch (113:43): [True: 43, False: 986k]
  |  |  ------------------
  ------------------
  171|   986k|}
xmltok.c:utf8_isInvalid3:
  174|  35.3M|utf8_isInvalid3(const ENCODING *enc, const char *p) {
  175|  35.3M|  UNUSED_P(enc);
  ------------------
  |  |  135|  35.3M|#  define UNUSED_P(p) (void)p
  ------------------
  176|  35.3M|  return UTF8_INVALID3((const unsigned char *)p);
  ------------------
  |  |  116|  35.3M|  (((p)[2] & 0x80) == 0                                                        \
  |  |  ------------------
  |  |  |  Branch (116:4): [True: 66, False: 35.3M]
  |  |  ------------------
  |  |  117|  35.3M|   || ((*p) == 0xEF && (p)[1] == 0xBF ? (p)[2] > 0xBD                          \
  |  |  ------------------
  |  |  |  Branch (117:7): [True: 29, False: 35.3M]
  |  |  |  Branch (117:8): [True: 169k, False: 35.1M]
  |  |  |  Branch (117:24): [True: 13.7k, False: 155k]
  |  |  ------------------
  |  |  118|  35.3M|                                      : ((p)[2] & 0xC0) == 0xC0)               \
  |  |  119|  35.3M|   || ((*p) == 0xE0                                                            \
  |  |  ------------------
  |  |  |  Branch (119:7): [True: 36, False: 35.3M]
  |  |  |  Branch (119:8): [True: 2.14M, False: 33.2M]
  |  |  ------------------
  |  |  120|  35.3M|           ? (p)[1] < 0xA0 || ((p)[1] & 0xC0) == 0xC0                          \
  |  |  ------------------
  |  |  |  Branch (120:14): [True: 11, False: 2.14M]
  |  |  |  Branch (120:31): [True: 3, False: 2.14M]
  |  |  ------------------
  |  |  121|  35.3M|           : ((p)[1] & 0x80) == 0                                              \
  |  |  ------------------
  |  |  |  Branch (121:14): [True: 12, False: 33.2M]
  |  |  ------------------
  |  |  122|  33.2M|                 || ((*p) == 0xED ? (p)[1] > 0x9F : ((p)[1] & 0xC0) == 0xC0)))
  |  |  ------------------
  |  |  |  Branch (122:21): [True: 10, False: 33.2M]
  |  |  |  Branch (122:22): [True: 777k, False: 32.4M]
  |  |  ------------------
  ------------------
  177|  35.3M|}
xmltok.c:utf8_isInvalid4:
  180|   161k|utf8_isInvalid4(const ENCODING *enc, const char *p) {
  181|   161k|  UNUSED_P(enc);
  ------------------
  |  |  135|   161k|#  define UNUSED_P(p) (void)p
  ------------------
  182|   161k|  return UTF8_INVALID4((const unsigned char *)p);
  ------------------
  |  |  125|   161k|  (((p)[3] & 0x80) == 0 || ((p)[3] & 0xC0) == 0xC0 || ((p)[2] & 0x80) == 0     \
  |  |  ------------------
  |  |  |  Branch (125:4): [True: 110, False: 161k]
  |  |  |  Branch (125:28): [True: 47, False: 161k]
  |  |  |  Branch (125:55): [True: 8, False: 161k]
  |  |  ------------------
  |  |  126|   161k|   || ((p)[2] & 0xC0) == 0xC0                                                  \
  |  |  ------------------
  |  |  |  Branch (126:7): [True: 7, False: 161k]
  |  |  ------------------
  |  |  127|   161k|   || ((*p) == 0xF0                                                            \
  |  |  ------------------
  |  |  |  Branch (127:7): [True: 55, False: 161k]
  |  |  |  Branch (127:8): [True: 13.6k, False: 147k]
  |  |  ------------------
  |  |  128|   161k|           ? (p)[1] < 0x90 || ((p)[1] & 0xC0) == 0xC0                          \
  |  |  ------------------
  |  |  |  Branch (128:14): [True: 17, False: 13.6k]
  |  |  |  Branch (128:31): [True: 10, False: 13.6k]
  |  |  ------------------
  |  |  129|   161k|           : ((p)[1] & 0x80) == 0                                              \
  |  |  ------------------
  |  |  |  Branch (129:14): [True: 9, False: 147k]
  |  |  ------------------
  |  |  130|   147k|                 || ((*p) == 0xF4 ? (p)[1] > 0x8F : ((p)[1] & 0xC0) == 0xC0)))
  |  |  ------------------
  |  |  |  Branch (130:21): [True: 19, False: 147k]
  |  |  |  Branch (130:22): [True: 4.78k, False: 142k]
  |  |  ------------------
  ------------------
  183|   161k|}
xmltok.c:unicode_byte_type:
  595|   140M|unicode_byte_type(char hi, char lo) {
  596|   140M|  switch ((unsigned char)hi) {
  ------------------
  |  Branch (596:11): [True: 138M, False: 1.99M]
  ------------------
  597|       |  /* 0xD800-0xDBFF first 16-bit code unit or high surrogate (W1) */
  598|   916k|  case 0xD8:
  ------------------
  |  Branch (598:3): [True: 916k, False: 139M]
  ------------------
  599|  1.23M|  case 0xD9:
  ------------------
  |  Branch (599:3): [True: 313k, False: 140M]
  ------------------
  600|  1.51M|  case 0xDA:
  ------------------
  |  Branch (600:3): [True: 285k, False: 140M]
  ------------------
  601|  1.80M|  case 0xDB:
  ------------------
  |  Branch (601:3): [True: 288k, False: 140M]
  ------------------
  602|  1.80M|    return BT_LEAD4;
  603|       |  /* 0xDC00-0xDFFF second 16-bit code unit or low surrogate (W2) */
  604|    103|  case 0xDC:
  ------------------
  |  Branch (604:3): [True: 103, False: 140M]
  ------------------
  605|    191|  case 0xDD:
  ------------------
  |  Branch (605:3): [True: 88, False: 140M]
  ------------------
  606|    281|  case 0xDE:
  ------------------
  |  Branch (606:3): [True: 90, False: 140M]
  ------------------
  607|    371|  case 0xDF:
  ------------------
  |  Branch (607:3): [True: 90, False: 140M]
  ------------------
  608|    371|    return BT_TRAIL;
  609|   186k|  case 0xFF:
  ------------------
  |  Branch (609:3): [True: 186k, False: 140M]
  ------------------
  610|   186k|    switch ((unsigned char)lo) {
  ------------------
  |  Branch (610:13): [True: 185k, False: 193]
  ------------------
  611|    176|    case 0xFF: /* noncharacter-FFFF */
  ------------------
  |  Branch (611:5): [True: 176, False: 185k]
  ------------------
  612|    193|    case 0xFE: /* noncharacter-FFFE */
  ------------------
  |  Branch (612:5): [True: 17, False: 186k]
  ------------------
  613|    193|      return BT_NONXML;
  614|   186k|    }
  615|   185k|    break;
  616|   140M|  }
  617|   138M|  return BT_NONASCII;
  618|   140M|}
xmltok.c:little2_toUtf8:
  623|   139k|      char **toP, const char *toLim) {                                         \
  624|   139k|    const char *from = *fromP;                                                 \
  625|   139k|    UNUSED_P(enc);                                                             \
  ------------------
  |  |  135|   139k|#  define UNUSED_P(p) (void)p
  ------------------
  626|   139k|    fromLim = from + (((fromLim - from) >> 1) << 1); /* shrink to even */      \
  627|  26.0M|    for (; from < fromLim; from += 2) {                                        \
  ------------------
  |  Branch (627:12): [True: 25.8M, False: 135k]
  ------------------
  628|  25.8M|      int plane;                                                               \
  629|  25.8M|      unsigned char lo2;                                                       \
  630|  25.8M|      unsigned char lo = GET_LO(from);                                         \
  ------------------
  |  |  718|  25.8M|#define GET_LO(ptr) ((unsigned char)(ptr)[0])
  ------------------
  631|  25.8M|      unsigned char hi = GET_HI(from);                                         \
  ------------------
  |  |  719|  25.8M|#define GET_HI(ptr) ((unsigned char)(ptr)[1])
  ------------------
  632|  25.8M|      switch (hi) {                                                            \
  633|   348k|      case 0:                                                                  \
  ------------------
  |  Branch (633:7): [True: 348k, False: 25.5M]
  ------------------
  634|   348k|        if (lo < 0x80) {                                                       \
  ------------------
  |  Branch (634:13): [True: 316k, False: 31.7k]
  ------------------
  635|   316k|          if (*toP == toLim) {                                                 \
  ------------------
  |  Branch (635:15): [True: 410, False: 316k]
  ------------------
  636|    410|            *fromP = from;                                                     \
  637|    410|            return XML_CONVERT_OUTPUT_EXHAUSTED;                               \
  638|    410|          }                                                                    \
  639|   316k|          *(*toP)++ = lo;                                                      \
  640|   316k|          break;                                                               \
  641|   316k|        }                                                                      \
  642|   348k|        /* fall through */                                                     \
  643|   348k|      case 0x1:                                                                \
  ------------------
  |  Branch (643:7): [True: 20.2k, False: 25.8M]
  ------------------
  644|  56.6k|      case 0x2:                                                                \
  ------------------
  |  Branch (644:7): [True: 4.60k, False: 25.8M]
  ------------------
  645|  59.4k|      case 0x3:                                                                \
  ------------------
  |  Branch (645:7): [True: 2.75k, False: 25.8M]
  ------------------
  646|  67.1k|      case 0x4:                                                                \
  ------------------
  |  Branch (646:7): [True: 7.70k, False: 25.8M]
  ------------------
  647|   196k|      case 0x5:                                                                \
  ------------------
  |  Branch (647:7): [True: 129k, False: 25.7M]
  ------------------
  648|   197k|      case 0x6:                                                                \
  ------------------
  |  Branch (648:7): [True: 963, False: 25.8M]
  ------------------
  649|   201k|      case 0x7:                                                                \
  ------------------
  |  Branch (649:7): [True: 3.92k, False: 25.8M]
  ------------------
  650|   201k|        if (toLim - *toP < 2) {                                                \
  ------------------
  |  Branch (650:13): [True: 255, False: 201k]
  ------------------
  651|    255|          *fromP = from;                                                       \
  652|    255|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  653|    255|        }                                                                      \
  654|   201k|        *(*toP)++ = ((lo >> 6) | (hi << 2) | UTF8_cval2);                      \
  655|   201k|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  656|   201k|        break;                                                                 \
  657|  25.0M|      default:                                                                 \
  ------------------
  |  Branch (657:7): [True: 25.0M, False: 787k]
  ------------------
  658|  25.0M|        if (toLim - *toP < 3) {                                                \
  ------------------
  |  Branch (658:13): [True: 3.14k, False: 25.0M]
  ------------------
  659|  3.14k|          *fromP = from;                                                       \
  660|  3.14k|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  661|  3.14k|        }                                                                      \
  662|  25.0M|        /* 16 bits divided 4, 6, 6 amongst 3 bytes */                          \
  663|  25.0M|        *(*toP)++ = ((hi >> 4) | UTF8_cval3);                                  \
  664|  25.0M|        *(*toP)++ = (((hi & 0xf) << 2) | (lo >> 6) | 0x80);                    \
  665|  25.0M|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  666|  25.0M|        break;                                                                 \
  667|  25.0M|      case 0xD8:                                                               \
  ------------------
  |  Branch (667:7): [True: 184k, False: 25.6M]
  ------------------
  668|   236k|      case 0xD9:                                                               \
  ------------------
  |  Branch (668:7): [True: 51.2k, False: 25.8M]
  ------------------
  669|   255k|      case 0xDA:                                                               \
  ------------------
  |  Branch (669:7): [True: 19.3k, False: 25.8M]
  ------------------
  670|   269k|      case 0xDB:                                                               \
  ------------------
  |  Branch (670:7): [True: 13.9k, False: 25.8M]
  ------------------
  671|   269k|        if (toLim - *toP < 4) {                                                \
  ------------------
  |  Branch (671:13): [True: 255, False: 269k]
  ------------------
  672|    255|          *fromP = from;                                                       \
  673|    255|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  674|    255|        }                                                                      \
  675|   269k|        if (fromLim - from < 4) {                                              \
  ------------------
  |  Branch (675:13): [True: 0, False: 269k]
  ------------------
  676|      0|          *fromP = from;                                                       \
  677|      0|          return XML_CONVERT_INPUT_INCOMPLETE;                                 \
  678|      0|        }                                                                      \
  679|   269k|        plane = (((hi & 0x3) << 2) | ((lo >> 6) & 0x3)) + 1;                   \
  680|   269k|        *(*toP)++ = (char)((plane >> 2) | UTF8_cval4);                         \
  681|   269k|        *(*toP)++ = (((lo >> 2) & 0xF) | ((plane & 0x3) << 4) | 0x80);         \
  682|   269k|        from += 2;                                                             \
  683|   269k|        lo2 = GET_LO(from);                                                    \
  ------------------
  |  |  718|   269k|#define GET_LO(ptr) ((unsigned char)(ptr)[0])
  ------------------
  684|   269k|        *(*toP)++ = (((lo & 0x3) << 4) | ((GET_HI(from) & 0x3) << 2)           \
  ------------------
  |  |  719|   269k|#define GET_HI(ptr) ((unsigned char)(ptr)[1])
  ------------------
  685|   269k|                     | (lo2 >> 6) | 0x80);                                     \
  686|   269k|        *(*toP)++ = ((lo2 & 0x3f) | 0x80);                                     \
  687|   269k|        break;                                                                 \
  688|  25.8M|      }                                                                        \
  689|  25.8M|    }                                                                          \
  690|   139k|    *fromP = from;                                                             \
  691|   135k|    if (from < fromLim)                                                        \
  ------------------
  |  Branch (691:9): [True: 0, False: 135k]
  ------------------
  692|   135k|      return XML_CONVERT_INPUT_INCOMPLETE;                                     \
  693|   135k|    else                                                                       \
  694|   135k|      return XML_CONVERT_COMPLETED;                                            \
  695|   135k|  }
xmltok.c:getEncodingIndex:
 1502|  39.9k|getEncodingIndex(const char *name) {
 1503|  39.9k|  static const char *const encodingNames[] = {
 1504|  39.9k|      KW_ISO_8859_1, KW_US_ASCII, KW_UTF_8, KW_UTF_16, KW_UTF_16BE, KW_UTF_16LE,
 1505|  39.9k|  };
 1506|  39.9k|  int i;
 1507|  39.9k|  if (name == NULL)
  ------------------
  |  Branch (1507:7): [True: 19.9k, False: 20.0k]
  ------------------
 1508|  19.9k|    return NO_ENC;
 1509|  40.2k|  for (i = 0; i < (int)(sizeof(encodingNames) / sizeof(encodingNames[0])); i++)
  ------------------
  |  Branch (1509:15): [True: 40.2k, False: 48]
  ------------------
 1510|  40.2k|    if (streqci(name, encodingNames[i]))
  ------------------
  |  Branch (1510:9): [True: 19.9k, False: 20.2k]
  ------------------
 1511|  19.9k|      return i;
 1512|     48|  return UNKNOWN_ENC;
 1513|  20.0k|}
xmltok.c:streqci:
 1005|  40.2k|streqci(const char *s1, const char *s2) {
 1006|   200k|  for (;;) {
 1007|   200k|    char c1 = *s1++;
 1008|   200k|    char c2 = *s2++;
 1009|   200k|    if (ASCII_a <= c1 && c1 <= ASCII_z)
  ------------------
  |  |   63|   200k|#define ASCII_a 0x61
  ------------------
                  if (ASCII_a <= c1 && c1 <= ASCII_z)
  ------------------
  |  |   88|    244|#define ASCII_z 0x7A
  ------------------
  |  Branch (1009:9): [True: 244, False: 200k]
  |  Branch (1009:26): [True: 244, False: 0]
  ------------------
 1010|    244|      c1 += ASCII_A - ASCII_a;
  ------------------
  |  |   36|    244|#define ASCII_A 0x41
  ------------------
                    c1 += ASCII_A - ASCII_a;
  ------------------
  |  |   63|    244|#define ASCII_a 0x61
  ------------------
 1011|   200k|    if (ASCII_a <= c2 && c2 <= ASCII_z)
  ------------------
  |  |   63|   200k|#define ASCII_a 0x61
  ------------------
                  if (ASCII_a <= c2 && c2 <= ASCII_z)
  ------------------
  |  |   88|      0|#define ASCII_z 0x7A
  ------------------
  |  Branch (1011:9): [True: 0, False: 200k]
  |  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|   200k|    if (c1 != c2)
  ------------------
  |  Branch (1017:9): [True: 20.3k, False: 180k]
  ------------------
 1018|  20.3k|      return 0;
 1019|   180k|    if (! c1)
  ------------------
  |  Branch (1019:9): [True: 19.9k, False: 160k]
  ------------------
 1020|  19.9k|      break;
 1021|   180k|  }
 1022|  19.9k|  return 1;
 1023|  40.2k|}
xmltok.c:initScan:
 1531|  19.9k|         int state, const char *ptr, const char *end, const char **nextTokPtr) {
 1532|  19.9k|  const ENCODING **encPtr;
 1533|       |
 1534|  19.9k|  if (ptr >= end)
  ------------------
  |  Branch (1534:7): [True: 0, False: 19.9k]
  ------------------
 1535|      0|    return XML_TOK_NONE;
  ------------------
  |  |   51|      0|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1536|  19.9k|  encPtr = enc->encPtr;
 1537|  19.9k|  if (ptr + 1 == end) {
  ------------------
  |  Branch (1537:7): [True: 36, False: 19.9k]
  ------------------
 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|     36|    switch (INIT_ENC_INDEX(enc)) {
  ------------------
  |  | 1519|     36|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  |  |  ------------------
  |  |  |  Branch (1519:29): [True: 36, False: 0]
  |  |  ------------------
  ------------------
 1547|      0|    case UTF_16_ENC:
  ------------------
  |  Branch (1547:5): [True: 0, False: 36]
  ------------------
 1548|      0|    case UTF_16LE_ENC:
  ------------------
  |  Branch (1548:5): [True: 0, False: 36]
  ------------------
 1549|      0|    case UTF_16BE_ENC:
  ------------------
  |  Branch (1549:5): [True: 0, False: 36]
  ------------------
 1550|      0|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1551|     36|    }
 1552|     36|    switch ((unsigned char)*ptr) {
  ------------------
  |  Branch (1552:13): [True: 31, False: 5]
  ------------------
 1553|      1|    case 0xFE:
  ------------------
  |  Branch (1553:5): [True: 1, False: 35]
  ------------------
 1554|      2|    case 0xFF:
  ------------------
  |  Branch (1554:5): [True: 1, False: 35]
  ------------------
 1555|      3|    case 0xEF: /* possibly first byte of UTF-8 BOM */
  ------------------
  |  Branch (1555:5): [True: 1, False: 35]
  ------------------
 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|      0|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1556:11): [True: 0, False: 3]
  |  Branch (1556:52): [True: 0, False: 0]
  ------------------
 1557|      0|        break;
 1558|       |      /* fall through */
 1559|      4|    case 0x00:
  ------------------
  |  Branch (1559:5): [True: 1, False: 35]
  ------------------
 1560|      5|    case 0x3C:
  ------------------
  |  Branch (1560:5): [True: 1, False: 35]
  ------------------
 1561|      5|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1562|     36|    }
 1563|  19.9k|  } else {
 1564|  19.9k|    switch (((unsigned char)ptr[0] << 8) | (unsigned char)ptr[1]) {
 1565|     10|    case 0xFEFF:
  ------------------
  |  Branch (1565:5): [True: 10, False: 19.9k]
  ------------------
 1566|     10|      if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  | 1519|     10|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
                    if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  |  131|      0|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1566:11): [True: 0, False: 10]
  |  Branch (1566:52): [True: 0, False: 0]
  ------------------
 1567|      0|        break;
 1568|     10|      *nextTokPtr = ptr + 2;
 1569|     10|      *encPtr = encodingTable[UTF_16BE_ENC];
 1570|     10|      return XML_TOK_BOM;
  ------------------
  |  |   79|     10|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1571|       |    /* 00 3C is handled in the default case */
 1572|  5.29k|    case 0x3C00:
  ------------------
  |  Branch (1572:5): [True: 5.29k, False: 14.6k]
  ------------------
 1573|  5.29k|      if ((INIT_ENC_INDEX(enc) == UTF_16BE_ENC
  ------------------
  |  | 1519|  5.29k|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
  |  Branch (1573:12): [True: 0, False: 5.29k]
  ------------------
 1574|  5.29k|           || INIT_ENC_INDEX(enc) == UTF_16_ENC)
  ------------------
  |  | 1519|  5.29k|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
  |  Branch (1574:15): [True: 0, False: 5.29k]
  ------------------
 1575|  5.29k|          && state == XML_CONTENT_STATE)
  ------------------
  |  |  131|      0|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1575:14): [True: 0, False: 0]
  ------------------
 1576|      0|        break;
 1577|  5.29k|      *encPtr = encodingTable[UTF_16LE_ENC];
 1578|  5.29k|      return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|  5.29k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1579|      1|    case 0xFFFE:
  ------------------
  |  Branch (1579:5): [True: 1, False: 19.9k]
  ------------------
 1580|      1|      if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  | 1519|      1|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
                    if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC && state == XML_CONTENT_STATE)
  ------------------
  |  |  131|      0|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1580:11): [True: 0, False: 1]
  |  Branch (1580:52): [True: 0, False: 0]
  ------------------
 1581|      0|        break;
 1582|      1|      *nextTokPtr = ptr + 2;
 1583|      1|      *encPtr = encodingTable[UTF_16LE_ENC];
 1584|      1|      return XML_TOK_BOM;
  ------------------
  |  |   79|      1|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1585|  1.78k|    case 0xEFBB:
  ------------------
  |  Branch (1585:5): [True: 1.78k, False: 18.1k]
  ------------------
 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.78k|      if (state == XML_CONTENT_STATE) {
  ------------------
  |  |  131|  1.78k|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1593:11): [True: 0, False: 1.78k]
  ------------------
 1594|      0|        int e = INIT_ENC_INDEX(enc);
  ------------------
  |  | 1519|      0|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
 1595|      0|        if (e == ISO_8859_1_ENC || e == UTF_16BE_ENC || e == UTF_16LE_ENC
  ------------------
  |  Branch (1595:13): [True: 0, False: 0]
  |  Branch (1595:36): [True: 0, False: 0]
  |  Branch (1595:57): [True: 0, False: 0]
  ------------------
 1596|      0|            || e == UTF_16_ENC)
  ------------------
  |  Branch (1596:16): [True: 0, False: 0]
  ------------------
 1597|      0|          break;
 1598|      0|      }
 1599|  1.78k|      if (ptr + 2 == end)
  ------------------
  |  Branch (1599:11): [True: 1, False: 1.78k]
  ------------------
 1600|      1|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1601|  1.78k|      if ((unsigned char)ptr[2] == 0xBF) {
  ------------------
  |  Branch (1601:11): [True: 1.77k, False: 11]
  ------------------
 1602|  1.77k|        *nextTokPtr = ptr + 3;
 1603|  1.77k|        *encPtr = encodingTable[UTF_8_ENC];
 1604|  1.77k|        return XML_TOK_BOM;
  ------------------
  |  |   79|  1.77k|#define XML_TOK_BOM 14 /* Byte order mark */
  ------------------
 1605|  1.77k|      }
 1606|     11|      break;
 1607|  12.8k|    default:
  ------------------
  |  Branch (1607:5): [True: 12.8k, False: 7.09k]
  ------------------
 1608|  12.8k|      if (ptr[0] == '\0') {
  ------------------
  |  Branch (1608:11): [True: 6.04k, False: 6.79k]
  ------------------
 1609|       |        /* 0 isn't a legal data character. Furthermore a document
 1610|       |           entity can only start with ASCII characters.  So the only
 1611|       |           way this can fail to be big-endian UTF-16 if it it's an
 1612|       |           external parsed general entity that's labelled as
 1613|       |           UTF-16LE.
 1614|       |        */
 1615|  6.04k|        if (state == XML_CONTENT_STATE && INIT_ENC_INDEX(enc) == UTF_16LE_ENC)
  ------------------
  |  |  131|  12.0k|#define XML_CONTENT_STATE 1
  ------------------
                      if (state == XML_CONTENT_STATE && INIT_ENC_INDEX(enc) == UTF_16LE_ENC)
  ------------------
  |  | 1519|      0|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
  |  Branch (1615:13): [True: 0, False: 6.04k]
  |  Branch (1615:43): [True: 0, False: 0]
  ------------------
 1616|      0|          break;
 1617|  6.04k|        *encPtr = encodingTable[UTF_16BE_ENC];
 1618|  6.04k|        return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|  6.04k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1619|  6.79k|      } else if (ptr[1] == '\0') {
  ------------------
  |  Branch (1619:18): [True: 893, False: 5.90k]
  ------------------
 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|    893|        if (state == XML_CONTENT_STATE)
  ------------------
  |  |  131|    893|#define XML_CONTENT_STATE 1
  ------------------
  |  Branch (1629:13): [True: 0, False: 893]
  ------------------
 1630|      0|          break;
 1631|    893|        *encPtr = encodingTable[UTF_16LE_ENC];
 1632|    893|        return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|    893|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1633|    893|      }
 1634|  5.90k|      break;
 1635|  19.9k|    }
 1636|  19.9k|  }
 1637|  5.94k|  *encPtr = encodingTable[INIT_ENC_INDEX(enc)];
  ------------------
  |  | 1519|  5.94k|#define INIT_ENC_INDEX(enc) ((int)(enc)->initEnc.isUtf16)
  ------------------
 1638|  5.94k|  return XmlTok(*encPtr, state, ptr, end, nextTokPtr);
  ------------------
  |  |  224|  5.94k|  (((enc)->scanners[state])(enc, ptr, end, nextTokPtr))
  ------------------
 1639|  19.9k|}
xmltok.c:ascii_toUtf8:
  561|   676k|             char **toP, const char *toLim) {
  562|   676k|  UNUSED_P(enc);
  ------------------
  |  |  135|   676k|#  define UNUSED_P(p) (void)p
  ------------------
  563|  3.66M|  while (*fromP < fromLim && *toP < toLim)
  ------------------
  |  Branch (563:10): [True: 2.99M, False: 670k]
  |  Branch (563:30): [True: 2.99M, False: 6.47k]
  ------------------
  564|  2.99M|    *(*toP)++ = *(*fromP)++;
  565|       |
  566|   676k|  if ((*toP == toLim) && (*fromP < fromLim))
  ------------------
  |  Branch (566:7): [True: 6.98k, False: 669k]
  |  Branch (566:26): [True: 6.47k, False: 509]
  ------------------
  567|  6.47k|    return XML_CONVERT_OUTPUT_EXHAUSTED;
  568|   670k|  else
  569|   670k|    return XML_CONVERT_COMPLETED;
  570|   676k|}
xmltok.c:big2_toUtf8:
  623|   322k|      char **toP, const char *toLim) {                                         \
  624|   322k|    const char *from = *fromP;                                                 \
  625|   322k|    UNUSED_P(enc);                                                             \
  ------------------
  |  |  135|   322k|#  define UNUSED_P(p) (void)p
  ------------------
  626|   322k|    fromLim = from + (((fromLim - from) >> 1) << 1); /* shrink to even */      \
  627|  30.2M|    for (; from < fromLim; from += 2) {                                        \
  ------------------
  |  Branch (627:12): [True: 29.8M, False: 319k]
  ------------------
  628|  29.8M|      int plane;                                                               \
  629|  29.8M|      unsigned char lo2;                                                       \
  630|  29.8M|      unsigned char lo = GET_LO(from);                                         \
  ------------------
  |  |  727|  29.8M|#define GET_LO(ptr) ((unsigned char)(ptr)[1])
  ------------------
  631|  29.8M|      unsigned char hi = GET_HI(from);                                         \
  ------------------
  |  |  728|  29.8M|#define GET_HI(ptr) ((unsigned char)(ptr)[0])
  ------------------
  632|  29.8M|      switch (hi) {                                                            \
  633|   469k|      case 0:                                                                  \
  ------------------
  |  Branch (633:7): [True: 469k, False: 29.4M]
  ------------------
  634|   469k|        if (lo < 0x80) {                                                       \
  ------------------
  |  Branch (634:13): [True: 432k, False: 36.4k]
  ------------------
  635|   432k|          if (*toP == toLim) {                                                 \
  ------------------
  |  Branch (635:15): [True: 367, False: 432k]
  ------------------
  636|    367|            *fromP = from;                                                     \
  637|    367|            return XML_CONVERT_OUTPUT_EXHAUSTED;                               \
  638|    367|          }                                                                    \
  639|   432k|          *(*toP)++ = lo;                                                      \
  640|   432k|          break;                                                               \
  641|   432k|        }                                                                      \
  642|   469k|        /* fall through */                                                     \
  643|   469k|      case 0x1:                                                                \
  ------------------
  |  Branch (643:7): [True: 7.46k, False: 29.8M]
  ------------------
  644|  49.5k|      case 0x2:                                                                \
  ------------------
  |  Branch (644:7): [True: 5.63k, False: 29.8M]
  ------------------
  645|  53.6k|      case 0x3:                                                                \
  ------------------
  |  Branch (645:7): [True: 4.04k, False: 29.8M]
  ------------------
  646|  55.3k|      case 0x4:                                                                \
  ------------------
  |  Branch (646:7): [True: 1.76k, False: 29.8M]
  ------------------
  647|  61.3k|      case 0x5:                                                                \
  ------------------
  |  Branch (647:7): [True: 5.96k, False: 29.8M]
  ------------------
  648|  65.5k|      case 0x6:                                                                \
  ------------------
  |  Branch (648:7): [True: 4.16k, False: 29.8M]
  ------------------
  649|  68.7k|      case 0x7:                                                                \
  ------------------
  |  Branch (649:7): [True: 3.24k, False: 29.8M]
  ------------------
  650|  68.7k|        if (toLim - *toP < 2) {                                                \
  ------------------
  |  Branch (650:13): [True: 301, False: 68.4k]
  ------------------
  651|    301|          *fromP = from;                                                       \
  652|    301|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  653|    301|        }                                                                      \
  654|  68.7k|        *(*toP)++ = ((lo >> 6) | (hi << 2) | UTF8_cval2);                      \
  655|  68.4k|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  656|  68.4k|        break;                                                                 \
  657|  29.1M|      default:                                                                 \
  ------------------
  |  Branch (657:7): [True: 29.1M, False: 717k]
  ------------------
  658|  29.1M|        if (toLim - *toP < 3) {                                                \
  ------------------
  |  Branch (658:13): [True: 2.64k, False: 29.1M]
  ------------------
  659|  2.64k|          *fromP = from;                                                       \
  660|  2.64k|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  661|  2.64k|        }                                                                      \
  662|  29.1M|        /* 16 bits divided 4, 6, 6 amongst 3 bytes */                          \
  663|  29.1M|        *(*toP)++ = ((hi >> 4) | UTF8_cval3);                                  \
  664|  29.1M|        *(*toP)++ = (((hi & 0xf) << 2) | (lo >> 6) | 0x80);                    \
  665|  29.1M|        *(*toP)++ = ((lo & 0x3f) | 0x80);                                      \
  666|  29.1M|        break;                                                                 \
  667|  29.1M|      case 0xD8:                                                               \
  ------------------
  |  Branch (667:7): [True: 60.3k, False: 29.8M]
  ------------------
  668|  93.8k|      case 0xD9:                                                               \
  ------------------
  |  Branch (668:7): [True: 33.5k, False: 29.8M]
  ------------------
  669|   159k|      case 0xDA:                                                               \
  ------------------
  |  Branch (669:7): [True: 65.5k, False: 29.8M]
  ------------------
  670|   215k|      case 0xDB:                                                               \
  ------------------
  |  Branch (670:7): [True: 56.3k, False: 29.8M]
  ------------------
  671|   215k|        if (toLim - *toP < 4) {                                                \
  ------------------
  |  Branch (671:13): [True: 238, False: 215k]
  ------------------
  672|    238|          *fromP = from;                                                       \
  673|    238|          return XML_CONVERT_OUTPUT_EXHAUSTED;                                 \
  674|    238|        }                                                                      \
  675|   215k|        if (fromLim - from < 4) {                                              \
  ------------------
  |  Branch (675:13): [True: 0, False: 215k]
  ------------------
  676|      0|          *fromP = from;                                                       \
  677|      0|          return XML_CONVERT_INPUT_INCOMPLETE;                                 \
  678|      0|        }                                                                      \
  679|   215k|        plane = (((hi & 0x3) << 2) | ((lo >> 6) & 0x3)) + 1;                   \
  680|   215k|        *(*toP)++ = (char)((plane >> 2) | UTF8_cval4);                         \
  681|   215k|        *(*toP)++ = (((lo >> 2) & 0xF) | ((plane & 0x3) << 4) | 0x80);         \
  682|   215k|        from += 2;                                                             \
  683|   215k|        lo2 = GET_LO(from);                                                    \
  ------------------
  |  |  727|   215k|#define GET_LO(ptr) ((unsigned char)(ptr)[1])
  ------------------
  684|   215k|        *(*toP)++ = (((lo & 0x3) << 4) | ((GET_HI(from) & 0x3) << 2)           \
  ------------------
  |  |  728|   215k|#define GET_HI(ptr) ((unsigned char)(ptr)[0])
  ------------------
  685|   215k|                     | (lo2 >> 6) | 0x80);                                     \
  686|   215k|        *(*toP)++ = ((lo2 & 0x3f) | 0x80);                                     \
  687|   215k|        break;                                                                 \
  688|  29.8M|      }                                                                        \
  689|  29.8M|    }                                                                          \
  690|   322k|    *fromP = from;                                                             \
  691|   319k|    if (from < fromLim)                                                        \
  ------------------
  |  Branch (691:9): [True: 0, False: 319k]
  ------------------
  692|   319k|      return XML_CONVERT_INPUT_INCOMPLETE;                                     \
  693|   319k|    else                                                                       \
  694|   319k|      return XML_CONVERT_COMPLETED;                                            \
  695|   319k|  }
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|    357|               const ENCODING **encoding, int *standalone) {
 1156|    357|  const char *val = NULL;
 1157|    357|  const char *name = NULL;
 1158|    357|  const char *nameEnd = NULL;
 1159|    357|  ptr += 5 * enc->minBytesPerChar;
 1160|    357|  end -= 2 * enc->minBytesPerChar;
 1161|    357|  if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)
  ------------------
  |  Branch (1161:7): [True: 191, False: 166]
  ------------------
 1162|    357|      || ! name) {
  ------------------
  |  Branch (1162:10): [True: 19, False: 147]
  ------------------
 1163|    210|    *badPtr = ptr;
 1164|    210|    return 0;
 1165|    210|  }
 1166|    147|  if (! XmlNameMatchesAscii(enc, name, nameEnd, KW_version)) {
  ------------------
  |  |  255|    147|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (1166:7): [True: 5, False: 142]
  ------------------
 1167|      5|    if (! isGeneralTextEntity) {
  ------------------
  |  Branch (1167:9): [True: 5, False: 0]
  ------------------
 1168|      5|      *badPtr = name;
 1169|      5|      return 0;
 1170|      5|    }
 1171|    142|  } else {
 1172|    142|    if (versionPtr)
  ------------------
  |  Branch (1172:9): [True: 142, False: 0]
  ------------------
 1173|    142|      *versionPtr = val;
 1174|    142|    if (versionEndPtr)
  ------------------
  |  Branch (1174:9): [True: 142, False: 0]
  ------------------
 1175|    142|      *versionEndPtr = ptr;
 1176|    142|    if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) {
  ------------------
  |  Branch (1176:9): [True: 19, False: 123]
  ------------------
 1177|     19|      *badPtr = ptr;
 1178|     19|      return 0;
 1179|     19|    }
 1180|    123|    if (! name) {
  ------------------
  |  Branch (1180:9): [True: 14, False: 109]
  ------------------
 1181|     14|      if (isGeneralTextEntity) {
  ------------------
  |  Branch (1181:11): [True: 0, False: 14]
  ------------------
 1182|       |        /* a TextDecl must have an EncodingDecl */
 1183|      0|        *badPtr = ptr;
 1184|      0|        return 0;
 1185|      0|      }
 1186|     14|      return 1;
 1187|     14|    }
 1188|    123|  }
 1189|    109|  if (XmlNameMatchesAscii(enc, name, nameEnd, KW_encoding)) {
  ------------------
  |  |  255|    109|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 59, False: 50]
  |  |  ------------------
  ------------------
 1190|     59|    int c = toAscii(enc, val, end);
 1191|     59|    if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   63|     59|#define ASCII_a 0x61
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   88|     21|#define ASCII_z 0x7A
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   36|     38|#define ASCII_A 0x41
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)) {
  ------------------
  |  |   61|     34|#define ASCII_Z 0x5A
  ------------------
  |  Branch (1191:12): [True: 21, False: 38]
  |  Branch (1191:28): [True: 21, False: 0]
  |  Branch (1191:48): [True: 34, False: 4]
  |  Branch (1191:64): [True: 33, False: 1]
  ------------------
 1192|      5|      *badPtr = val;
 1193|      5|      return 0;
 1194|      5|    }
 1195|     54|    if (encodingName)
  ------------------
  |  Branch (1195:9): [True: 54, False: 0]
  ------------------
 1196|     54|      *encodingName = val;
 1197|     54|    if (encoding)
  ------------------
  |  Branch (1197:9): [True: 54, False: 0]
  ------------------
 1198|     54|      *encoding = encodingFinder(enc, val, ptr - enc->minBytesPerChar);
 1199|     54|    if (! parsePseudoAttribute(enc, ptr, end, &name, &nameEnd, &val, &ptr)) {
  ------------------
  |  Branch (1199:9): [True: 11, False: 43]
  ------------------
 1200|     11|      *badPtr = ptr;
 1201|     11|      return 0;
 1202|     11|    }
 1203|     43|    if (! name)
  ------------------
  |  Branch (1203:9): [True: 41, False: 2]
  ------------------
 1204|     41|      return 1;
 1205|     43|  }
 1206|     52|  if (! XmlNameMatchesAscii(enc, name, nameEnd, KW_standalone)
  ------------------
  |  |  255|    104|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  ------------------
  |  Branch (1206:7): [True: 5, False: 47]
  ------------------
 1207|     52|      || isGeneralTextEntity) {
  ------------------
  |  Branch (1207:10): [True: 0, False: 47]
  ------------------
 1208|      5|    *badPtr = name;
 1209|      5|    return 0;
 1210|      5|  }
 1211|     47|  if (XmlNameMatchesAscii(enc, val, ptr - enc->minBytesPerChar, KW_yes)) {
  ------------------
  |  |  255|     47|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 28, False: 19]
  |  |  ------------------
  ------------------
 1212|     28|    if (standalone)
  ------------------
  |  Branch (1212:9): [True: 28, False: 0]
  ------------------
 1213|     28|      *standalone = 1;
 1214|     28|  } else if (XmlNameMatchesAscii(enc, val, ptr - enc->minBytesPerChar, KW_no)) {
  ------------------
  |  |  255|     19|  (((enc)->nameMatchesAscii)(enc, ptr1, end1, ptr2))
  |  |  ------------------
  |  |  |  Branch (255:3): [True: 18, False: 1]
  |  |  ------------------
  ------------------
 1215|     18|    if (standalone)
  ------------------
  |  Branch (1215:9): [True: 18, False: 0]
  ------------------
 1216|     18|      *standalone = 0;
 1217|     18|  } else {
 1218|      1|    *badPtr = val;
 1219|      1|    return 0;
 1220|      1|  }
 1221|    241|  while (isSpace(toAscii(enc, ptr, end)))
  ------------------
  |  Branch (1221:10): [True: 195, False: 46]
  ------------------
 1222|    195|    ptr += enc->minBytesPerChar;
 1223|     46|  if (ptr != end) {
  ------------------
  |  Branch (1223:7): [True: 8, False: 38]
  ------------------
 1224|      8|    *badPtr = ptr;
 1225|      8|    return 0;
 1226|      8|  }
 1227|     38|  return 1;
 1228|     46|}
xmltok.c:parsePseudoAttribute:
 1061|    553|                     const char **valPtr, const char **nextTokPtr) {
 1062|    553|  int c;
 1063|    553|  char open;
 1064|    553|  if (ptr == end) {
  ------------------
  |  Branch (1064:7): [True: 57, False: 496]
  ------------------
 1065|     57|    *namePtr = NULL;
 1066|     57|    return 1;
 1067|     57|  }
 1068|    496|  if (! isSpace(toAscii(enc, ptr, end))) {
  ------------------
  |  Branch (1068:7): [True: 3, False: 493]
  ------------------
 1069|      3|    *nextTokPtr = ptr;
 1070|      3|    return 0;
 1071|      3|  }
 1072|    839|  do {
 1073|    839|    ptr += enc->minBytesPerChar;
 1074|    839|  } while (isSpace(toAscii(enc, ptr, end)));
  ------------------
  |  Branch (1074:12): [True: 346, False: 493]
  ------------------
 1075|    493|  if (ptr == end) {
  ------------------
  |  Branch (1075:7): [True: 17, False: 476]
  ------------------
 1076|     17|    *namePtr = NULL;
 1077|     17|    return 1;
 1078|     17|  }
 1079|    476|  *namePtr = ptr;
 1080|  3.24k|  for (;;) {
 1081|  3.24k|    c = toAscii(enc, ptr, end);
 1082|  3.24k|    if (c == -1) {
  ------------------
  |  Branch (1082:9): [True: 48, False: 3.19k]
  ------------------
 1083|     48|      *nextTokPtr = ptr;
 1084|     48|      return 0;
 1085|     48|    }
 1086|  3.19k|    if (c == ASCII_EQUALS) {
  ------------------
  |  |  112|  3.19k|#define ASCII_EQUALS 0x3D
  ------------------
  |  Branch (1086:9): [True: 379, False: 2.81k]
  ------------------
 1087|    379|      *nameEndPtr = ptr;
 1088|    379|      break;
 1089|    379|    }
 1090|  2.81k|    if (isSpace(c)) {
  ------------------
  |  Branch (1090:9): [True: 49, False: 2.76k]
  ------------------
 1091|     49|      *nameEndPtr = ptr;
 1092|    459|      do {
 1093|    459|        ptr += enc->minBytesPerChar;
 1094|    459|      } while (isSpace(c = toAscii(enc, ptr, end)));
  ------------------
  |  Branch (1094:16): [True: 410, False: 49]
  ------------------
 1095|     49|      if (c != ASCII_EQUALS) {
  ------------------
  |  |  112|     49|#define ASCII_EQUALS 0x3D
  ------------------
  |  Branch (1095:11): [True: 36, False: 13]
  ------------------
 1096|     36|        *nextTokPtr = ptr;
 1097|     36|        return 0;
 1098|     36|      }
 1099|     13|      break;
 1100|     49|    }
 1101|  2.76k|    ptr += enc->minBytesPerChar;
 1102|  2.76k|  }
 1103|    392|  if (ptr == *namePtr) {
  ------------------
  |  Branch (1103:7): [True: 9, False: 383]
  ------------------
 1104|      9|    *nextTokPtr = ptr;
 1105|      9|    return 0;
 1106|      9|  }
 1107|    383|  ptr += enc->minBytesPerChar;
 1108|    383|  c = toAscii(enc, ptr, end);
 1109|    775|  while (isSpace(c)) {
  ------------------
  |  Branch (1109:10): [True: 392, False: 383]
  ------------------
 1110|    392|    ptr += enc->minBytesPerChar;
 1111|    392|    c = toAscii(enc, ptr, end);
 1112|    392|  }
 1113|    383|  if (c != ASCII_QUOT && c != ASCII_APOS) {
  ------------------
  |  |  104|    766|#define ASCII_QUOT 0x22
  ------------------
                if (c != ASCII_QUOT && c != ASCII_APOS) {
  ------------------
  |  |  106|     87|#define ASCII_APOS 0x27
  ------------------
  |  Branch (1113:7): [True: 87, False: 296]
  |  Branch (1113:26): [True: 41, False: 46]
  ------------------
 1114|     41|    *nextTokPtr = ptr;
 1115|     41|    return 0;
 1116|     41|  }
 1117|    342|  open = (char)c;
 1118|    342|  ptr += enc->minBytesPerChar;
 1119|    342|  *valPtr = ptr;
 1120|  2.36k|  for (;; ptr += enc->minBytesPerChar) {
 1121|  2.36k|    c = toAscii(enc, ptr, end);
 1122|  2.36k|    if (c == open)
  ------------------
  |  Branch (1122:9): [True: 258, False: 2.10k]
  ------------------
 1123|    258|      break;
 1124|  2.10k|    if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   63|  2.10k|#define ASCII_a 0x61
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   88|    581|#define ASCII_z 0x7A
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   36|  1.53k|#define ASCII_A 0x41
  ------------------
                  if (! (ASCII_a <= c && c <= ASCII_z) && ! (ASCII_A <= c && c <= ASCII_Z)
  ------------------
  |  |   61|    517|#define ASCII_Z 0x5A
  ------------------
  |  Branch (1124:12): [True: 581, False: 1.52k]
  |  Branch (1124:28): [True: 579, False: 2]
  |  Branch (1124:48): [True: 517, False: 1.01k]
  |  Branch (1124:64): [True: 309, False: 208]
  ------------------
 1125|  2.10k|        && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |   90|  1.22k|#define ASCII_0 0x30
  ------------------
                      && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |   99|    490|#define ASCII_9 0x39
  ------------------
                      && ! (ASCII_0 <= c && c <= ASCII_9) && c != ASCII_PERIOD
  ------------------
  |  |  108|  3.05k|#define ASCII_PERIOD 0x2E
  ------------------
  |  Branch (1125:15): [True: 490, False: 731]
  |  Branch (1125:31): [True: 276, False: 214]
  |  Branch (1125:48): [True: 611, False: 334]
  ------------------
 1126|  2.10k|        && c != ASCII_MINUS && c != ASCII_UNDERSCORE) {
  ------------------
  |  |  107|  2.72k|#define ASCII_MINUS 0x2D
  ------------------
                      && c != ASCII_MINUS && c != ASCII_UNDERSCORE) {
  ------------------
  |  |  116|    286|#define ASCII_UNDERSCORE 0x5F
  ------------------
  |  Branch (1126:12): [True: 286, False: 325]
  |  Branch (1126:32): [True: 84, False: 202]
  ------------------
 1127|     84|      *nextTokPtr = ptr;
 1128|     84|      return 0;
 1129|     84|    }
 1130|  2.10k|  }
 1131|    258|  *nextTokPtr = ptr + enc->minBytesPerChar;
 1132|    258|  return 1;
 1133|    342|}
xmltok.c:toAscii:
 1033|  8.47k|toAscii(const ENCODING *enc, const char *ptr, const char *end) {
 1034|  8.47k|  char buf[1];
 1035|  8.47k|  char *p = buf;
 1036|  8.47k|  XmlUtf8Convert(enc, &ptr, end, &p, p + 1);
  ------------------
  |  |  276|  8.47k|  (((enc)->utf8Convert)(enc, fromP, fromLim, toP, toLim))
  ------------------
 1037|  8.47k|  if (p == buf)
  ------------------
  |  Branch (1037:7): [True: 236, False: 8.24k]
  ------------------
 1038|    236|    return -1;
 1039|  8.24k|  else
 1040|  8.24k|    return buf[0];
 1041|  8.47k|}
xmltok.c:isSpace:
 1044|  5.62k|isSpace(int c) {
 1045|  5.62k|  switch (c) {
  ------------------
  |  Branch (1045:11): [True: 3.74k, False: 1.88k]
  ------------------
 1046|    779|  case 0x20:
  ------------------
  |  Branch (1046:3): [True: 779, False: 4.84k]
  ------------------
 1047|  1.08k|  case 0xD:
  ------------------
  |  Branch (1047:3): [True: 301, False: 5.32k]
  ------------------
 1048|  1.50k|  case 0xA:
  ------------------
  |  Branch (1048:3): [True: 426, False: 5.20k]
  ------------------
 1049|  1.88k|  case 0x9:
  ------------------
  |  Branch (1049:3): [True: 379, False: 5.24k]
  ------------------
 1050|  1.88k|    return 1;
 1051|  5.62k|  }
 1052|  3.74k|  return 0;
 1053|  5.62k|}

xmltok.c:normal_prologTok:
 1018|  5.02M|                  const char **nextTokPtr) {
 1019|  5.02M|  int tok;
 1020|  5.02M|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 1.13k, False: 5.02M]
  ------------------
 1021|  1.13k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.13k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  5.02M|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|  5.02M|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|      0|    size_t n = end - ptr;
 1024|      0|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1024:9): [True: 0, False: 0]
  ------------------
 1025|      0|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
 1026|      0|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 0, False: 0]
  ------------------
 1027|      0|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|      0|      end = ptr + n;
 1029|      0|    }
 1030|      0|  }
 1031|  5.02M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  5.02M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  5.02M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1032|  7.45k|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 7.45k, False: 5.02M]
  ------------------
 1033|  7.45k|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  7.45k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  7.45k|#  define MINBPC(enc) 1
  ------------------
 1034|  9.93k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 9.93k, False: 5.01M]
  ------------------
 1035|  9.93k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  9.93k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  9.93k|#  define MINBPC(enc) 1
  ------------------
 1036|  33.6k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 33.6k, False: 4.99M]
  ------------------
 1037|  33.6k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  33.6k|#  define MINBPC(enc) 1
  ------------------
 1038|  33.6k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  33.6k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  33.6k|    {                                                                          \
  |  |  |  |  135|  33.6k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  33.6k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  33.6k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 18, False: 33.5k]
  |  |  |  |  ------------------
  |  |  |  |  136|     18|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     18|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     18|      }                                                                        \
  |  |  |  |  138|  33.6k|    }
  |  |  ------------------
  ------------------
 1039|  33.5k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  33.5k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  33.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 20, False: 33.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  25.4k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 25.4k, False: 8.13k]
  ------------------
 1041|  25.4k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  25.4k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  25.4k|#  define MINBPC(enc) 1
  ------------------
 1042|  4.17k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 4.17k, False: 29.4k]
  ------------------
 1043|  4.17k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  4.17k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  4.17k|#  define MINBPC(enc) 1
  ------------------
 1044|  2.44k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 2.44k, False: 31.1k]
  ------------------
 1045|  3.87k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 1.42k, False: 32.1k]
  ------------------
 1046|  3.87k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 0, False: 33.5k]
  ------------------
 1047|  3.91k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 38, False: 33.5k]
  ------------------
 1048|  3.93k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 29, False: 33.5k]
  ------------------
 1049|  3.94k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 5, False: 33.5k]
  ------------------
 1050|  3.94k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  242|  3.94k|#  define MINBPC(enc) 1
  ------------------
 1051|  3.94k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  3.94k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  33.5k|    }
 1053|     20|    *nextTokPtr = ptr;
 1054|     20|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     20|#define XML_TOK_INVALID 0
  ------------------
 1055|  33.5k|  }
 1056|  43.0k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 43.0k, False: 4.98M]
  ------------------
 1057|  43.0k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  242|  43.0k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1057:9): [True: 239, False: 42.8k]
  ------------------
 1058|    239|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|    239|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    239|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|    239|    }
 1062|       |    /* fall through */
 1063|   120k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 77.7k, False: 4.95M]
  ------------------
 1064|   141k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 20.5k, False: 5.00M]
  ------------------
 1065|   148k|    for (;;) {
 1066|   148k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   148k|#  define MINBPC(enc) 1
  ------------------
 1067|   148k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   148k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   148k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   148k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 532, False: 147k]
  ------------------
 1068|    532|        break;
 1069|   147k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   147k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   147k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1070|  3.61k|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 3.61k, False: 144k]
  ------------------
 1071|  5.51k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 1.90k, False: 146k]
  ------------------
 1072|  5.51k|        break;
 1073|  1.93k|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 1.93k, False: 146k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|  1.93k|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  242|  1.93k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1075:13): [True: 1.92k, False: 12]
  ------------------
 1076|  1.92k|          break;
 1077|       |        /* fall through */
 1078|   140k|      default:
  ------------------
  |  Branch (1078:7): [True: 140k, False: 7.44k]
  ------------------
 1079|   140k|        *nextTokPtr = ptr;
 1080|   140k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|   140k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|   147k|      }
 1082|   147k|    }
 1083|    532|    *nextTokPtr = ptr;
 1084|    532|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    532|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  4.51k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 4.51k, False: 5.02M]
  ------------------
 1086|  4.51k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  4.51k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  4.51k|#  define MINBPC(enc) 1
  ------------------
 1087|  1.37k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 1.37k, False: 5.02M]
  ------------------
 1088|  1.37k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.37k|#  define MINBPC(enc) 1
  ------------------
 1089|  1.37k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  1.37k|#define XML_TOK_COMMA 38
  ------------------
 1090|  2.84k|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 2.84k, False: 5.02M]
  ------------------
 1091|  2.84k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.84k|#  define MINBPC(enc) 1
  ------------------
 1092|  2.84k|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|  2.84k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|  1.06k|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 1.06k, False: 5.02M]
  ------------------
 1094|  1.06k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.06k|#  define MINBPC(enc) 1
  ------------------
 1095|  1.06k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  1.06k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.06k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.06k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 5, False: 1.06k]
  ------------------
 1096|      5|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      5|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|  1.06k|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  300|  1.06k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 23, False: 1.04k]
  |  |  ------------------
  ------------------
 1098|     23|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     23|    {                                                                          \
  |  |  135|     23|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     23|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|     23|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 22]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     23|    }
  ------------------
 1099|     22|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  300|     22|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1, False: 21]
  |  |  ------------------
  ------------------
 1100|      1|        *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  242|      1|#  define MINBPC(enc) 1
  ------------------
 1101|      1|        return XML_TOK_COND_SECT_CLOSE;
  ------------------
  |  |  103|      1|#define XML_TOK_COND_SECT_CLOSE 34      /* ]]> */
  ------------------
 1102|      1|      }
 1103|     22|    }
 1104|  1.06k|    *nextTokPtr = ptr;
 1105|  1.06k|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|  1.06k|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  4.51M|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 4.51M, False: 513k]
  ------------------
 1107|  4.51M|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  4.51M|#  define MINBPC(enc) 1
  ------------------
 1108|  4.51M|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  4.51M|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|   202k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 202k, False: 4.82M]
  ------------------
 1110|   202k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|   202k|#  define MINBPC(enc) 1
  ------------------
 1111|   202k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   202k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   202k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   202k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 20, False: 202k]
  ------------------
 1112|     20|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|     20|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|   202k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   202k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   202k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 15, False: 202k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|  8.02k|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 8.02k, False: 194k]
  ------------------
 1115|  8.02k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  8.02k|#  define MINBPC(enc) 1
  ------------------
 1116|  8.02k|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|  8.02k|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|  1.71k|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 1.71k, False: 200k]
  ------------------
 1118|  1.71k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.71k|#  define MINBPC(enc) 1
  ------------------
 1119|  1.71k|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|  1.71k|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|  87.4k|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 87.4k, False: 114k]
  ------------------
 1121|  87.4k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  87.4k|#  define MINBPC(enc) 1
  ------------------
 1122|  87.4k|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|  87.4k|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|  1.75k|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 1.75k, False: 200k]
  ------------------
 1124|  1.99k|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 242, False: 201k]
  ------------------
 1125|  22.9k|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 20.9k, False: 181k]
  ------------------
 1126|  24.0k|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 1.02k, False: 201k]
  ------------------
 1127|  24.2k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 202, False: 201k]
  ------------------
 1128|  31.1k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 6.90k, False: 195k]
  ------------------
 1129|   104k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 73.8k, False: 128k]
  ------------------
 1130|   104k|      *nextTokPtr = ptr;
 1131|   104k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|   104k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|   202k|    }
 1133|     15|    *nextTokPtr = ptr;
 1134|     15|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
 1135|  13.0k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 13.0k, False: 5.01M]
  ------------------
 1136|  13.0k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  13.0k|#  define MINBPC(enc) 1
  ------------------
 1137|  13.0k|    return XML_TOK_OR;
  ------------------
  |  |   88|  13.0k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  21.0k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 21.0k, False: 5.00M]
  ------------------
 1139|  21.0k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  21.0k|#  define MINBPC(enc) 1
  ------------------
 1140|  21.0k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  21.0k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  5.97k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 5.97k, False: 5.02M]
  ------------------
 1142|  5.97k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  5.97k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  5.97k|#  define MINBPC(enc) 1
  ------------------
 1143|      0|#  define LEAD_CASE(n)                                                         \
 1144|      0|  case BT_LEAD##n:                                                             \
 1145|      0|    if (end - ptr < n)                                                         \
 1146|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
 1147|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
 1148|      0|      *nextTokPtr = ptr;                                                       \
 1149|      0|      return XML_TOK_INVALID;                                                  \
 1150|      0|    }                                                                          \
 1151|      0|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
 1152|      0|      ptr += n;                                                                \
 1153|      0|      tok = XML_TOK_NAME;                                                      \
 1154|      0|      break;                                                                   \
 1155|      0|    }                                                                          \
 1156|      0|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
 1157|      0|      ptr += n;                                                                \
 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
 1159|      0|      break;                                                                   \
 1160|      0|    }                                                                          \
 1161|      0|    *nextTokPtr = ptr;                                                         \
 1162|      0|    return XML_TOK_INVALID;
 1163|  1.52k|    LEAD_CASE(2)
  ------------------
  |  | 1144|      1|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 438, False: 5.02M]
  |  |  ------------------
  |  | 1145|    438|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 2, False: 436]
  |  |  ------------------
  |  | 1146|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|    436|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|    436|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    436|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 5, False: 431]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|      5|      *nextTokPtr = ptr;                                                       \
  |  | 1149|      5|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|      5|    }                                                                          \
  |  | 1151|    436|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|    431|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    431|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 215, False: 216]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|    215|      ptr += n;                                                                \
  |  | 1153|    215|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|    215|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|    215|      break;                                                                   \
  |  | 1155|    215|    }                                                                          \
  |  | 1156|    431|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|    216|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    216|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 215, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|    215|      ptr += n;                                                                \
  |  | 1158|    215|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|    215|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|    215|      break;                                                                   \
  |  | 1160|    215|    }                                                                          \
  |  | 1161|    216|    *nextTokPtr = ptr;                                                         \
  |  | 1162|      1|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1164|  2.05k|    LEAD_CASE(3)
  ------------------
  |  | 1144|      9|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 617, False: 5.02M]
  |  |  ------------------
  |  | 1145|    617|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 3, False: 614]
  |  |  ------------------
  |  | 1146|      9|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|    614|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|    614|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    614|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 39, False: 575]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|     39|      *nextTokPtr = ptr;                                                       \
  |  | 1149|     39|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     39|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|     39|    }                                                                          \
  |  | 1151|    614|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  270|    575|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    575|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (270:35): [True: 326, False: 249]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|    326|      ptr += n;                                                                \
  |  | 1153|    326|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|    326|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|    326|      break;                                                                   \
  |  | 1155|    326|    }                                                                          \
  |  | 1156|    575|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|    249|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|    249|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 240, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|    240|      ptr += n;                                                                \
  |  | 1158|    240|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|    240|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|    240|      break;                                                                   \
  |  | 1160|    240|    }                                                                          \
  |  | 1161|    249|    *nextTokPtr = ptr;                                                         \
  |  | 1162|      9|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1165|    132|    LEAD_CASE(4)
  ------------------
  |  | 1144|     13|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 54, False: 5.02M]
  |  |  ------------------
  |  | 1145|     54|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 2, False: 52]
  |  |  ------------------
  |  | 1146|     13|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     52|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |  277|     52|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     52|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 39, False: 13]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1148|     39|      *nextTokPtr = ptr;                                                       \
  |  | 1149|     39|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     39|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  | 1150|     39|    }                                                                          \
  |  | 1151|     52|    if (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 (270:35): [True: 0, False: 13]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1152|      0|      ptr += n;                                                                \
  |  | 1153|      0|      tok = XML_TOK_NAME;                                                      \
  |  |  ------------------
  |  |  |  |   85|      0|#define XML_TOK_NAME 18
  |  |  ------------------
  |  | 1154|      0|      break;                                                                   \
  |  | 1155|      0|    }                                                                          \
  |  | 1156|     13|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  269|     13|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|     13|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (269:33): [True: 0, False: 13]
  |  |  |  |  ------------------
  |  |  ------------------
  |  | 1157|      0|      ptr += n;                                                                \
  |  | 1158|      0|      tok = XML_TOK_NMTOKEN;                                                   \
  |  |  ------------------
  |  |  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  |  |  ------------------
  |  | 1159|      0|      break;                                                                   \
  |  | 1160|      0|    }                                                                          \
  |  | 1161|     13|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     13|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|  50.5k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 50.5k, False: 4.97M]
  ------------------
 1168|  66.7k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 16.2k, False: 5.01M]
  ------------------
 1169|  66.7k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|  66.7k|#define XML_TOK_NAME 18
  ------------------
 1170|  66.7k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  66.7k|#  define MINBPC(enc) 1
  ------------------
 1171|  66.7k|    break;
 1172|    302|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 302, False: 5.02M]
  ------------------
 1173|    576|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 274, False: 5.02M]
  ------------------
 1174|  1.08k|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 510, False: 5.02M]
  ------------------
 1175|  1.08k|#  ifdef XML_NS
 1176|  1.08k|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 5.02M]
  ------------------
 1177|  1.08k|#  endif
 1178|  1.08k|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|  1.08k|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|  1.08k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.08k|#  define MINBPC(enc) 1
  ------------------
 1180|  1.08k|    break;
 1181|      0|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 0, False: 5.02M]
  ------------------
 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|    122|  default:
  ------------------
  |  Branch (1193:3): [True: 122, False: 5.02M]
  ------------------
 1194|    122|    *nextTokPtr = ptr;
 1195|    122|    return XML_TOK_INVALID;
  ------------------
  |  |   57|    122|#define XML_TOK_INVALID 0
  ------------------
 1196|  5.02M|  }
 1197|   289k|  while (HAS_CHAR(enc, ptr, end)) {
 1198|   289k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   289k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   289k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1199|   754k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   219k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 289k]
  |  |  ------------------
  |  |   82|   219k|    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|   219k|    /* fall through */                                                         \
  |  |   87|   219k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 129k, False: 159k]
  |  |  ------------------
  |  |   88|   188k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 58.8k, False: 230k]
  |  |  ------------------
  |  |   89|   215k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 27.2k, False: 262k]
  |  |  ------------------
  |  |   90|   218k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 3.23k, False: 286k]
  |  |  ------------------
  |  |   91|   219k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 935, False: 288k]
  |  |  ------------------
  |  |   92|   219k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   219k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|   219k|    break;                                                                     \
  |  |   94|   219k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    552|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 566, False: 288k]
  |  |  |  |  ------------------
  |  |  |  |   71|    566|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 565]
  |  |  |  |  ------------------
  |  |  |  |   72|    552|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    565|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.13k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    565|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 554]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    554|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    554|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 2, False: 552]
  |  |  |  |  ------------------
  |  |  |  |   74|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     13|    }                                                                          \
  |  |  |  |   77|    565|    ptr += n;                                                                  \
  |  |  |  |   78|    552|    break;
  |  |  ------------------
  |  |   95|    559|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    550|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 559, False: 288k]
  |  |  |  |  ------------------
  |  |  |  |   71|    559|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 556]
  |  |  |  |  ------------------
  |  |  |  |   72|    550|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    556|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.11k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    556|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 553]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    553|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    553|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 550]
  |  |  |  |  ------------------
  |  |  |  |   74|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      6|    }                                                                          \
  |  |  |  |   77|    556|    ptr += n;                                                                  \
  |  |  |  |   78|    550|    break;
  |  |  ------------------
  |  |   96|    550|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 16, False: 289k]
  |  |  |  |  ------------------
  |  |  |  |   71|     16|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 14]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     14|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     28|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     14|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, 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|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     14|    }                                                                          \
  |  |  |  |   77|     14|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
 1200|  7.42k|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 7.42k, False: 281k]
  ------------------
 1201|  19.8k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 12.3k, False: 276k]
  ------------------
 1202|  20.3k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 558, False: 288k]
  ------------------
 1203|  24.4k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 4.12k, False: 285k]
  ------------------
 1204|  27.2k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 2.72k, False: 286k]
  ------------------
 1205|  27.2k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 5, False: 289k]
  ------------------
 1206|  38.7k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 11.5k, False: 277k]
  ------------------
 1207|  59.7k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 21.0k, False: 268k]
  ------------------
 1208|  66.9k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 7.18k, False: 282k]
  ------------------
 1209|  66.9k|      *nextTokPtr = ptr;
 1210|  66.9k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 289k]
  ------------------
 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|    220|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 220, False: 289k]
  ------------------
 1232|    220|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    220|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 3, False: 217]
  ------------------
 1233|      3|        *nextTokPtr = ptr;
 1234|      3|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
 1235|      3|      }
 1236|    217|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|    217|#  define MINBPC(enc) 1
  ------------------
 1237|    217|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|    217|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    699|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 699, False: 288k]
  ------------------
 1239|    699|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    699|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 2, False: 697]
  ------------------
 1240|      2|        *nextTokPtr = ptr;
 1241|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
 1242|      2|      }
 1243|    697|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|    697|#  define MINBPC(enc) 1
  ------------------
 1244|    697|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    697|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|    644|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 644, False: 288k]
  ------------------
 1246|    644|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    644|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 3, False: 641]
  ------------------
 1247|      3|        *nextTokPtr = ptr;
 1248|      3|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
 1249|      3|      }
 1250|    641|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|    641|#  define MINBPC(enc) 1
  ------------------
 1251|    641|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|    641|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     43|    default:
  ------------------
  |  Branch (1252:5): [True: 43, False: 289k]
  ------------------
 1253|     43|      *nextTokPtr = ptr;
 1254|     43|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     43|#define XML_TOK_INVALID 0
  ------------------
 1255|   289k|    }
 1256|   289k|  }
 1257|    270|  return -tok;
 1258|  68.8k|}
xmltok.c:normal_scanLit:
  984|  17.3k|                const char **nextTokPtr) {
  985|  15.3M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  15.3M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  15.3M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  15.3M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  987|  15.3M|    switch (t) {
  988|  4.73k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  1.09k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  1.07k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 1.09k, False: 15.3M]
  |  |  |  |  ------------------
  |  |  |  |   50|  1.09k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 1.09k]
  |  |  |  |  ------------------
  |  |  |  |   51|  1.07k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  1.09k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.09k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.09k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 15, False: 1.07k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     15|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     15|    }                                                                          \
  |  |  |  |   56|  1.09k|    ptr += n;                                                                  \
  |  |  |  |   57|  1.07k|    break;
  |  |  ------------------
  |  |   61|  1.07k|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|    685|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 687, False: 15.3M]
  |  |  |  |  ------------------
  |  |  |  |   50|    687|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 686]
  |  |  |  |  ------------------
  |  |  |  |   51|    685|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|    686|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    686|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    686|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 685]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      1|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      1|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      1|    }                                                                          \
  |  |  |  |   56|    686|    ptr += n;                                                                  \
  |  |  |  |   57|    685|    break;
  |  |  ------------------
  |  |   62|    685|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|    554|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 568, False: 15.3M]
  |  |  |  |  ------------------
  |  |  |  |   50|    568|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 3, False: 565]
  |  |  |  |  ------------------
  |  |  |  |   51|    554|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|    565|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    565|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    565|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 554]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     11|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     11|    }                                                                          \
  |  |  |  |   56|    565|    ptr += n;                                                                  \
  |  |  |  |   57|    554|    break;
  |  |  ------------------
  |  |   63|    554|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 18, False: 15.3M]
  |  |  ------------------
  |  |   64|     19|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 1, False: 15.3M]
  |  |  ------------------
  |  |   65|     22|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 3, False: 15.3M]
  |  |  ------------------
  |  |   66|     22|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     22|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     22|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  9.82k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 9.82k, False: 15.3M]
  ------------------
  990|  21.3k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 11.5k, False: 15.3M]
  ------------------
  991|  21.3k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  21.3k|#  define MINBPC(enc) 1
  ------------------
  992|  21.3k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 4.10k, False: 17.2k]
  ------------------
  993|  4.10k|        break;
  994|  17.2k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  17.2k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  17.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  17.2k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 3, False: 17.2k]
  ------------------
  995|      3|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      3|#define XML_TOK_LITERAL 27
  ------------------
  996|  17.2k|      *nextTokPtr = ptr;
  997|  17.2k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  17.2k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  17.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  998|  2.85k|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 2.85k, False: 14.3k]
  ------------------
  999|  6.07k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 3.21k, False: 14.0k]
  ------------------
 1000|  9.27k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 3.20k, False: 14.0k]
  ------------------
 1001|  17.1k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 7.87k, False: 9.36k]
  ------------------
 1002|  17.1k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 47, False: 17.1k]
  ------------------
 1003|  17.2k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 27, False: 17.2k]
  ------------------
 1004|  17.2k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  17.2k|#define XML_TOK_LITERAL 27
  ------------------
 1005|     16|      default:
  ------------------
  |  Branch (1005:7): [True: 16, False: 17.2k]
  ------------------
 1006|     16|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
 1007|  17.2k|      }
 1008|  15.3M|    default:
  ------------------
  |  Branch (1008:5): [True: 15.3M, False: 23.7k]
  ------------------
 1009|  15.3M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  15.3M|#  define MINBPC(enc) 1
  ------------------
 1010|  15.3M|      break;
 1011|  15.3M|    }
 1012|  15.3M|  }
 1013|     85|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     85|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  17.3k|}
xmltok.c:normal_scanDecl:
  183|  25.4k|                 const char **nextTokPtr) {
  184|  25.4k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  25.4k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  25.4k|    {                                                                          \
  |  |  |  |  135|  25.4k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  25.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  25.4k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 25.4k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  25.4k|    }
  |  |  ------------------
  ------------------
  185|  25.4k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  25.4k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  25.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  186|    964|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 964, False: 24.4k]
  ------------------
  187|    964|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|    964|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|    964|#  define MINBPC(enc) 1
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 25.4k]
  ------------------
  189|      1|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|      1|#  define MINBPC(enc) 1
  ------------------
  190|      1|    return XML_TOK_COND_SECT_OPEN;
  ------------------
  |  |  102|      1|#define XML_TOK_COND_SECT_OPEN 33       /* <![ */
  ------------------
  191|    770|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 770, False: 24.6k]
  ------------------
  192|  24.4k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 23.7k, False: 1.74k]
  ------------------
  193|  24.4k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  24.4k|#  define MINBPC(enc) 1
  ------------------
  194|  24.4k|    break;
  195|      5|  default:
  ------------------
  |  Branch (195:3): [True: 5, False: 25.4k]
  ------------------
  196|      5|    *nextTokPtr = ptr;
  197|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  198|  25.4k|  }
  199|   163k|  while (HAS_CHAR(enc, ptr, end)) {
  200|   163k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   163k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   163k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  201|      7|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 7, False: 163k]
  ------------------
  202|      7|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|      7|    {                                                                          \
  |  |  135|      7|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|      7|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|      7|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 6]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|      7|    }
  ------------------
  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|  10.7k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 10.7k, False: 152k]
  ------------------
  214|  18.8k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 8.03k, False: 155k]
  ------------------
  215|  24.4k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 5.59k, False: 158k]
  ------------------
  216|  24.4k|      *nextTokPtr = ptr;
  217|  24.4k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  24.4k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|   125k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 125k, False: 38.1k]
  ------------------
  219|   139k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 13.7k, False: 149k]
  ------------------
  220|   139k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   139k|#  define MINBPC(enc) 1
  ------------------
  221|   139k|      break;
  222|     18|    default:
  ------------------
  |  Branch (222:5): [True: 18, False: 163k]
  ------------------
  223|     18|      *nextTokPtr = ptr;
  224|     18|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  225|   163k|    }
  226|   163k|  }
  227|     34|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     34|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  24.4k|}
xmltok.c:normal_scanComment:
  146|  1.69k|                    const char **nextTokPtr) {
  147|  1.69k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  1.69k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.69k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.69k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 1.68k, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|  1.68k|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  300|  1.68k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (148:9): [True: 12, False: 1.67k]
  ------------------
  149|     12|      *nextTokPtr = ptr;
  150|     12|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  151|     12|    }
  152|  1.67k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.67k|#  define MINBPC(enc) 1
  ------------------
  153|  4.77M|    while (HAS_CHAR(enc, ptr, end)) {
  154|  4.77M|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.77M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.77M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  155|  9.50M|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  11.2k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  11.2k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 11.2k, False: 4.76M]
  |  |  |  |  ------------------
  |  |  |  |   50|  11.2k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 11.2k]
  |  |  |  |  ------------------
  |  |  |  |   51|  11.2k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  11.2k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  11.2k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  11.2k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 11.2k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      4|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      4|    }                                                                          \
  |  |  |  |   56|  11.2k|    ptr += n;                                                                  \
  |  |  |  |   57|  11.2k|    break;
  |  |  ------------------
  |  |   61|  4.73M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  4.73M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 4.73M, False: 47.7k]
  |  |  |  |  ------------------
  |  |  |  |   50|  4.73M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 3, False: 4.73M]
  |  |  |  |  ------------------
  |  |  |  |   51|  4.73M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  4.73M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  4.73M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  4.73M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 4.73M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      1|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      1|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      1|    }                                                                          \
  |  |  |  |   56|  4.73M|    ptr += n;                                                                  \
  |  |  |  |   57|  4.73M|    break;
  |  |  ------------------
  |  |   62|  4.73M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  10.1k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 10.1k, False: 4.76M]
  |  |  |  |  ------------------
  |  |  |  |   50|  10.1k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 10.1k]
  |  |  |  |  ------------------
  |  |  |  |   51|  10.1k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  10.1k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  10.1k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  10.1k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 10.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      4|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      4|    }                                                                          \
  |  |  |  |   56|  10.1k|    ptr += n;                                                                  \
  |  |  |  |   57|  10.1k|    break;
  |  |  ------------------
  |  |   63|  10.1k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 15, False: 4.77M]
  |  |  ------------------
  |  |   64|     16|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 1, False: 4.77M]
  |  |  ------------------
  |  |   65|     17|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 1, False: 4.77M]
  |  |  ------------------
  |  |   66|     17|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     17|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  2.48k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 2.48k, False: 4.77M]
  ------------------
  157|  2.48k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.48k|#  define MINBPC(enc) 1
  ------------------
  158|  2.48k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.48k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.48k|    {                                                                          \
  |  |  |  |  135|  2.48k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.48k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.48k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 2.48k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  2.48k|    }
  |  |  ------------------
  ------------------
  159|  2.48k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  300|  2.48k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 1.50k, False: 978]
  |  |  ------------------
  ------------------
  160|  1.50k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.50k|#  define MINBPC(enc) 1
  ------------------
  161|  1.50k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.50k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.50k|    {                                                                          \
  |  |  |  |  135|  1.50k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.50k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.50k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.50k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.50k|    }
  |  |  ------------------
  ------------------
  162|  1.50k|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  1.50k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (162:15): [True: 4, False: 1.50k]
  ------------------
  163|      4|            *nextTokPtr = ptr;
  164|      4|            return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  165|      4|          }
  166|  1.50k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.50k|#  define MINBPC(enc) 1
  ------------------
  167|  1.50k|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|  1.50k|#define XML_TOK_COMMENT 13
  ------------------
  168|  1.50k|        }
  169|    978|        break;
  170|  23.8k|      default:
  ------------------
  |  Branch (170:7): [True: 23.8k, False: 4.75M]
  ------------------
  171|  23.8k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  23.8k|#  define MINBPC(enc) 1
  ------------------
  172|  23.8k|        break;
  173|  4.77M|      }
  174|  4.77M|    }
  175|  1.67k|  }
  176|    147|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    147|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|  1.69k|}
xmltok.c:normal_scanPi:
  277|  8.96k|               const char **nextTokPtr) {
  278|  8.96k|  int tok;
  279|  8.96k|  const char *target = ptr;
  280|  8.96k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  8.96k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  8.96k|    {                                                                          \
  |  |  |  |  135|  8.96k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  8.96k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  8.96k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 10, False: 8.95k]
  |  |  |  |  ------------------
  |  |  |  |  136|     10|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     10|      }                                                                        \
  |  |  |  |  138|  8.96k|    }
  |  |  ------------------
  ------------------
  281|  8.95k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  8.95k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  8.95k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  282|  7.94k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  7.83k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 8.95k]
  |  |  ------------------
  |  |  111|  7.83k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  7.83k|    /* fall through */                                                         \
  |  |  116|  7.83k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 5.69k, False: 3.26k]
  |  |  ------------------
  |  |  117|  7.83k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 2.13k, False: 6.82k]
  |  |  ------------------
  |  |  118|  7.83k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  7.83k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  7.83k|    break;                                                                     \
  |  |  120|  7.83k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    434|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 437, False: 8.52k]
  |  |  |  |  ------------------
  |  |  |  |  100|    437|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 436]
  |  |  |  |  ------------------
  |  |  |  |  101|    434|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    436|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    872|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    436|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 435]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    435|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    435|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 434]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      2|    }                                                                          \
  |  |  |  |  106|    436|    ptr += n;                                                                  \
  |  |  |  |  107|    434|    break;
  |  |  ------------------
  |  |  121|    682|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    677|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 682, False: 8.27k]
  |  |  |  |  ------------------
  |  |  |  |  100|    682|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 680]
  |  |  |  |  ------------------
  |  |  |  |  101|    677|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    680|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.36k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    680|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 679]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    679|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    679|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 677]
  |  |  |  |  ------------------
  |  |  |  |  103|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|    680|    ptr += n;                                                                  \
  |  |  |  |  107|    677|    break;
  |  |  ------------------
  |  |  122|    677|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 5, False: 8.95k]
  |  |  |  |  ------------------
  |  |  |  |  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|      1|  default:
  ------------------
  |  Branch (283:3): [True: 1, False: 8.95k]
  ------------------
  284|      1|    *nextTokPtr = ptr;
  285|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  286|  8.95k|  }
  287|   785k|  while (HAS_CHAR(enc, ptr, end)) {
  288|   785k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   785k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   785k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  289|  2.97M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   774k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 785k]
  |  |  ------------------
  |  |   82|   774k|    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|   774k|    /* fall through */                                                         \
  |  |   87|   774k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 709k, False: 76.3k]
  |  |  ------------------
  |  |   88|   713k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 3.62k, False: 782k]
  |  |  ------------------
  |  |   89|   773k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 60.2k, False: 725k]
  |  |  ------------------
  |  |   90|   773k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 619, False: 785k]
  |  |  ------------------
  |  |   91|   774k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 371, False: 785k]
  |  |  ------------------
  |  |   92|   774k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   774k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|   774k|    break;                                                                     \
  |  |   94|   774k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    459|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 476, False: 785k]
  |  |  |  |  ------------------
  |  |  |  |   71|    476|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 475]
  |  |  |  |  ------------------
  |  |  |  |   72|    459|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    475|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    950|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    475|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 11, False: 464]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    464|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    464|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 5, False: 459]
  |  |  |  |  ------------------
  |  |  |  |   74|     16|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     16|    }                                                                          \
  |  |  |  |   77|    475|    ptr += n;                                                                  \
  |  |  |  |   78|    459|    break;
  |  |  ------------------
  |  |   95|  2.22k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  2.19k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 2.22k, False: 783k]
  |  |  |  |  ------------------
  |  |  |  |   71|  2.22k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 3, False: 2.22k]
  |  |  |  |  ------------------
  |  |  |  |   72|  2.19k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  2.22k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  4.44k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.22k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 2.22k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  2.22k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.22k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 22, False: 2.19k]
  |  |  |  |  ------------------
  |  |  |  |   74|     25|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     25|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     25|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     25|    }                                                                          \
  |  |  |  |   77|  2.22k|    ptr += n;                                                                  \
  |  |  |  |   78|  2.19k|    break;
  |  |  ------------------
  |  |   96|  2.19k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 35, False: 785k]
  |  |  |  |  ------------------
  |  |  |  |   71|     35|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 33]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     33|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     66|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     33|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 27]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|     27|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     27|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 27, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     33|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     33|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     33|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     33|    }                                                                          \
  |  |  |  |   77|     33|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  290|    777|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 777, False: 784k]
  ------------------
  291|  2.03k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 1.25k, False: 784k]
  ------------------
  292|  4.41k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 2.38k, False: 783k]
  ------------------
  293|  4.41k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  303|  4.41k|#define PREFIX(ident) normal_##ident
  ------------------
  |  Branch (293:11): [True: 3, False: 4.41k]
  ------------------
  294|      3|        *nextTokPtr = ptr;
  295|      3|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  296|      3|      }
  297|  4.41k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  4.41k|#  define MINBPC(enc) 1
  ------------------
  298|  3.43M|      while (HAS_CHAR(enc, ptr, end)) {
  299|  3.43M|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.43M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.43M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  300|  6.74M|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  5.70k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  5.70k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 5.70k, False: 3.42M]
  |  |  |  |  ------------------
  |  |  |  |   50|  5.70k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 5.70k]
  |  |  |  |  ------------------
  |  |  |  |   51|  5.70k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  5.70k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  5.70k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  5.70k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 5.70k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      2|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      2|    }                                                                          \
  |  |  |  |   56|  5.70k|    ptr += n;                                                                  \
  |  |  |  |   57|  5.70k|    break;
  |  |  ------------------
  |  |   61|  3.35M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  3.35M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.35M, False: 77.5k]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.35M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 3.35M]
  |  |  |  |  ------------------
  |  |  |  |   51|  3.35M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  3.35M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  3.35M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.35M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 3.35M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      1|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      1|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      1|    }                                                                          \
  |  |  |  |   56|  3.35M|    ptr += n;                                                                  \
  |  |  |  |   57|  3.35M|    break;
  |  |  ------------------
  |  |   62|  3.35M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  10.5k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 10.5k, False: 3.42M]
  |  |  |  |  ------------------
  |  |  |  |   50|  10.5k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 10.5k]
  |  |  |  |  ------------------
  |  |  |  |   51|  10.5k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  10.5k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  10.5k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  10.5k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 10.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      2|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      2|    }                                                                          \
  |  |  |  |   56|  10.5k|    ptr += n;                                                                  \
  |  |  |  |   57|  10.5k|    break;
  |  |  ------------------
  |  |   63|  10.5k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 11, False: 3.43M]
  |  |  ------------------
  |  |   64|     13|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 2, False: 3.43M]
  |  |  ------------------
  |  |   65|     14|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 1, False: 3.43M]
  |  |  ------------------
  |  |   66|     14|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     14|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  7.00k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 7.00k, False: 3.42M]
  ------------------
  302|  7.00k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  7.00k|#  define MINBPC(enc) 1
  ------------------
  303|  7.00k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  7.00k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  7.00k|    {                                                                          \
  |  |  |  |  135|  7.00k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  7.00k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  7.00k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 6.99k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  7.00k|    }
  |  |  ------------------
  ------------------
  304|  6.99k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  6.99k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 4.25k, False: 2.74k]
  |  |  ------------------
  ------------------
  305|  4.25k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  4.25k|#  define MINBPC(enc) 1
  ------------------
  306|  4.25k|            return tok;
  307|  4.25k|          }
  308|  2.74k|          break;
  309|  54.2k|        default:
  ------------------
  |  Branch (309:9): [True: 54.2k, False: 3.37M]
  ------------------
  310|  54.2k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  54.2k|#  define MINBPC(enc) 1
  ------------------
  311|  54.2k|          break;
  312|  3.43M|        }
  313|  3.43M|      }
  314|    132|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    132|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  4.36k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 4.36k, False: 781k]
  ------------------
  316|  4.36k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  303|  4.36k|#define PREFIX(ident) normal_##ident
  ------------------
  |  Branch (316:11): [True: 3, False: 4.36k]
  ------------------
  317|      3|        *nextTokPtr = ptr;
  318|      3|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      3|#define XML_TOK_INVALID 0
  ------------------
  319|      3|      }
  320|  4.36k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  4.36k|#  define MINBPC(enc) 1
  ------------------
  321|  4.36k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.36k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.36k|    {                                                                          \
  |  |  |  |  135|  4.36k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.36k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  4.36k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 34, False: 4.33k]
  |  |  |  |  ------------------
  |  |  |  |  136|     34|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     34|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     34|      }                                                                        \
  |  |  |  |  138|  4.36k|    }
  |  |  ------------------
  ------------------
  322|  4.33k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  4.33k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 4.30k, False: 22]
  |  |  ------------------
  ------------------
  323|  4.30k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  4.30k|#  define MINBPC(enc) 1
  ------------------
  324|  4.30k|        return tok;
  325|  4.30k|      }
  326|       |      /* fall through */
  327|     30|    default:
  ------------------
  |  Branch (327:5): [True: 8, False: 785k]
  ------------------
  328|     30|      *nextTokPtr = ptr;
  329|     30|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     30|#define XML_TOK_INVALID 0
  ------------------
  330|   785k|    }
  331|   785k|  }
  332|     72|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     72|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  8.94k|}
xmltok.c:normal_checkPiTarget:
  232|  8.78k|                      int *tokPtr) {
  233|  8.78k|  int upper = 0;
  234|  8.78k|  UNUSED_P(enc);
  ------------------
  |  |  135|  8.78k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  8.78k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  8.78k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  8.78k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  242|  8.78k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (236:7): [True: 5.79k, False: 2.98k]
  ------------------
  237|  5.79k|    return 1;
  238|  2.98k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  2.98k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  239|  1.00k|  case ASCII_x:
  ------------------
  |  |   86|  1.00k|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 1.00k, False: 1.97k]
  ------------------
  240|  1.00k|    break;
  241|  1.03k|  case ASCII_X:
  ------------------
  |  |   59|  1.03k|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 1.03k, False: 1.94k]
  ------------------
  242|  1.03k|    upper = 1;
  243|  1.03k|    break;
  244|    939|  default:
  ------------------
  |  Branch (244:3): [True: 939, False: 2.04k]
  ------------------
  245|    939|    return 1;
  246|  2.98k|  }
  247|  2.04k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.04k|#  define MINBPC(enc) 1
  ------------------
  248|  2.04k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  2.04k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  249|    752|  case ASCII_m:
  ------------------
  |  |   75|    752|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 752, False: 1.29k]
  ------------------
  250|    752|    break;
  251|    671|  case ASCII_M:
  ------------------
  |  |   48|    671|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 671, False: 1.37k]
  ------------------
  252|    671|    upper = 1;
  253|    671|    break;
  254|    624|  default:
  ------------------
  |  Branch (254:3): [True: 624, False: 1.42k]
  ------------------
  255|    624|    return 1;
  256|  2.04k|  }
  257|  1.42k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.42k|#  define MINBPC(enc) 1
  ------------------
  258|  1.42k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  1.42k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  259|    302|  case ASCII_l:
  ------------------
  |  |   74|    302|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 302, False: 1.12k]
  ------------------
  260|    302|    break;
  261|      2|  case ASCII_L:
  ------------------
  |  |   47|      2|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 2, False: 1.42k]
  ------------------
  262|      2|    upper = 1;
  263|      2|    break;
  264|  1.11k|  default:
  ------------------
  |  Branch (264:3): [True: 1.11k, False: 304]
  ------------------
  265|  1.11k|    return 1;
  266|  1.42k|  }
  267|    304|  if (upper)
  ------------------
  |  Branch (267:7): [True: 6, False: 298]
  ------------------
  268|      6|    return 0;
  269|    298|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|    298|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|    298|  return 1;
  271|    304|}
xmltok.c:normal_scanPercent:
  924|  4.52k|                    const char **nextTokPtr) {
  925|  4.52k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.52k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.52k|    {                                                                          \
  |  |  |  |  135|  4.52k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.52k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  4.52k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 56, False: 4.46k]
  |  |  |  |  ------------------
  |  |  |  |  136|     56|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     56|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     56|      }                                                                        \
  |  |  |  |  138|  4.52k|    }
  |  |  ------------------
  ------------------
  926|  4.46k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.46k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.46k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  927|  2.23k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.49k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 4.46k]
  |  |  ------------------
  |  |  111|  1.49k|    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.49k|    /* fall through */                                                         \
  |  |  116|  1.49k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 931, False: 3.53k]
  |  |  ------------------
  |  |  117|  1.49k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 564, False: 3.90k]
  |  |  ------------------
  |  |  118|  1.49k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.49k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  1.49k|    break;                                                                     \
  |  |  120|  1.49k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    408|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 427, False: 4.03k]
  |  |  |  |  ------------------
  |  |  |  |  100|    427|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 425]
  |  |  |  |  ------------------
  |  |  |  |  101|    408|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    425|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    850|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    425|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 13, False: 412]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    412|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    412|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 4, False: 408]
  |  |  |  |  ------------------
  |  |  |  |  103|     17|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     17|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     17|    }                                                                          \
  |  |  |  |  106|    425|    ptr += n;                                                                  \
  |  |  |  |  107|    408|    break;
  |  |  ------------------
  |  |  121|    408|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    207|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 212, False: 4.25k]
  |  |  |  |  ------------------
  |  |  |  |  100|    212|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 211]
  |  |  |  |  ------------------
  |  |  |  |  101|    207|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    211|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    422|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    211|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 208]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    208|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    208|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 207]
  |  |  |  |  ------------------
  |  |  |  |  103|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      4|    }                                                                          \
  |  |  |  |  106|    211|    ptr += n;                                                                  \
  |  |  |  |  107|    207|    break;
  |  |  ------------------
  |  |  122|    207|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 15, False: 4.45k]
  |  |  |  |  ------------------
  |  |  |  |  100|     15|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 13]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     13|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     26|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     13|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 12, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      1|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      1|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|     13|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     13|    }                                                                          \
  |  |  |  |  106|     13|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  928|  1.35k|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 1.35k, False: 3.10k]
  ------------------
  929|  1.63k|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 277, False: 4.18k]
  ------------------
  930|  2.30k|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 669, False: 3.79k]
  ------------------
  931|  2.31k|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 6, False: 4.46k]
  ------------------
  932|  2.31k|    *nextTokPtr = ptr;
  933|  2.31k|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|  2.31k|#define XML_TOK_PERCENT 22
  ------------------
  934|      6|  default:
  ------------------
  |  Branch (934:3): [True: 6, False: 4.46k]
  ------------------
  935|      6|    *nextTokPtr = ptr;
  936|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  937|  4.46k|  }
  938|  4.36k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  4.36k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.36k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.36k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  940|  5.94k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.79k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 4.36k]
  |  |  ------------------
  |  |   82|  1.79k|    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.79k|    /* fall through */                                                         \
  |  |   87|  1.79k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 748, False: 3.62k]
  |  |  ------------------
  |  |   88|  1.11k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 364, False: 4.00k]
  |  |  ------------------
  |  |   89|  1.36k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 256, False: 4.11k]
  |  |  ------------------
  |  |   90|  1.57k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 206, False: 4.16k]
  |  |  ------------------
  |  |   91|  1.79k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 223, False: 4.14k]
  |  |  ------------------
  |  |   92|  1.79k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  1.79k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  1.79k|    break;                                                                     \
  |  |   94|  1.79k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    332|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 340, False: 4.02k]
  |  |  |  |  ------------------
  |  |  |  |   71|    340|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 338]
  |  |  |  |  ------------------
  |  |  |  |   72|    332|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    338|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    676|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    338|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 335]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    335|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    335|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 332]
  |  |  |  |  ------------------
  |  |  |  |   74|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      6|    }                                                                          \
  |  |  |  |   77|    338|    ptr += n;                                                                  \
  |  |  |  |   78|    332|    break;
  |  |  ------------------
  |  |   95|    332|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    216|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 223, False: 4.14k]
  |  |  |  |  ------------------
  |  |  |  |   71|    223|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 221]
  |  |  |  |  ------------------
  |  |  |  |   72|    216|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    221|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    442|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    221|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 218]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    218|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    218|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 2, False: 216]
  |  |  |  |  ------------------
  |  |  |  |   74|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      5|    }                                                                          \
  |  |  |  |   77|    221|    ptr += n;                                                                  \
  |  |  |  |   78|    216|    break;
  |  |  ------------------
  |  |   96|    216|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 10, False: 4.35k]
  |  |  |  |  ------------------
  |  |  |  |   71|     10|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 9]
  |  |  |  |  ------------------
  |  |  |  |   72|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      9|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     18|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      9|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 8, 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|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      9|    }                                                                          \
  |  |  |  |   77|      9|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  941|  1.97k|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 1.97k, False: 2.39k]
  ------------------
  942|  1.97k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.97k|#  define MINBPC(enc) 1
  ------------------
  943|  1.97k|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|  1.97k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|     20|    default:
  ------------------
  |  Branch (944:5): [True: 20, False: 4.34k]
  ------------------
  945|     20|      *nextTokPtr = ptr;
  946|     20|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     20|#define XML_TOK_INVALID 0
  ------------------
  947|  4.36k|    }
  948|  4.36k|  }
  949|     87|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     87|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|  2.11k|}
xmltok.c:normal_scanPoundName:
  954|  5.97k|                      const char **nextTokPtr) {
  955|  5.97k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.97k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.97k|    {                                                                          \
  |  |  |  |  135|  5.97k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.97k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  5.97k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 5.97k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  5.97k|    }
  |  |  ------------------
  ------------------
  956|  5.97k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  5.97k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  5.97k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  957|  5.43k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  5.92k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 5.97k]
  |  |  ------------------
  |  |  111|  5.92k|    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.92k|    /* fall through */                                                         \
  |  |  116|  5.92k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 5.34k, False: 621]
  |  |  ------------------
  |  |  117|  5.92k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 572, False: 5.39k]
  |  |  ------------------
  |  |  118|  5.92k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  5.92k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  5.92k|    break;                                                                     \
  |  |  120|  5.92k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      7|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 22, False: 5.94k]
  |  |  |  |  ------------------
  |  |  |  |  100|     22|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 21]
  |  |  |  |  ------------------
  |  |  |  |  101|      7|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     21|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     42|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     21|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 10, False: 11]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|     11|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     11|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 4, False: 7]
  |  |  |  |  ------------------
  |  |  |  |  103|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     14|    }                                                                          \
  |  |  |  |  106|     21|    ptr += n;                                                                  \
  |  |  |  |  107|      7|    break;
  |  |  ------------------
  |  |  121|      9|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      2|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 9, False: 5.96k]
  |  |  |  |  ------------------
  |  |  |  |  100|      9|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 8]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      8|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     16|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      8|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 3]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      3|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      3|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 2]
  |  |  |  |  ------------------
  |  |  |  |  103|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      6|    }                                                                          \
  |  |  |  |  106|      8|    ptr += n;                                                                  \
  |  |  |  |  107|      2|    break;
  |  |  ------------------
  |  |  122|     16|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 16, False: 5.95k]
  |  |  |  |  ------------------
  |  |  |  |  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: 10, False: 4]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      4|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      4|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 4, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|     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|      2|  default:
  ------------------
  |  Branch (958:3): [True: 2, False: 5.96k]
  ------------------
  959|      2|    *nextTokPtr = ptr;
  960|      2|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  961|  5.97k|  }
  962|  42.7k|  while (HAS_CHAR(enc, ptr, end)) {
  963|  42.7k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  42.7k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  42.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  964|   128k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  36.4k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 42.7k]
  |  |  ------------------
  |  |   82|  36.4k|    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|  36.4k|    /* fall through */                                                         \
  |  |   87|  36.4k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 19.8k, False: 22.8k]
  |  |  ------------------
  |  |   88|  35.4k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 15.6k, False: 27.0k]
  |  |  ------------------
  |  |   89|  35.7k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 272, False: 42.4k]
  |  |  ------------------
  |  |   90|  36.0k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 271, False: 42.4k]
  |  |  ------------------
  |  |   91|  36.4k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 377, False: 42.3k]
  |  |  ------------------
  |  |   92|  36.4k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  36.4k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  36.4k|    break;                                                                     \
  |  |   94|  36.4k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    218|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 231, False: 42.4k]
  |  |  |  |  ------------------
  |  |  |  |   71|    231|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 229]
  |  |  |  |  ------------------
  |  |  |  |   72|    218|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    229|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    458|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    229|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 8, False: 221]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    221|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    221|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 218]
  |  |  |  |  ------------------
  |  |  |  |   74|     11|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     11|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     11|    }                                                                          \
  |  |  |  |   77|    229|    ptr += n;                                                                  \
  |  |  |  |   78|    218|    break;
  |  |  ------------------
  |  |   95|    235|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    213|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 235, False: 42.4k]
  |  |  |  |  ------------------
  |  |  |  |   71|    235|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 233]
  |  |  |  |  ------------------
  |  |  |  |   72|    213|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    233|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    466|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    233|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 12, False: 221]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    221|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    221|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 8, False: 213]
  |  |  |  |  ------------------
  |  |  |  |   74|     20|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     20|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     20|    }                                                                          \
  |  |  |  |   77|    233|    ptr += n;                                                                  \
  |  |  |  |   78|    213|    break;
  |  |  ------------------
  |  |   96|    213|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 22, False: 42.6k]
  |  |  |  |  ------------------
  |  |  |  |   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|  2.33k|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 2.33k, False: 40.3k]
  ------------------
  966|  3.94k|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 1.61k, False: 41.0k]
  ------------------
  967|  4.60k|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 658, False: 42.0k]
  ------------------
  968|  4.83k|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 234, False: 42.4k]
  ------------------
  969|  5.51k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 680, False: 42.0k]
  ------------------
  970|  5.51k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 1, False: 42.7k]
  ------------------
  971|  5.77k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 254, False: 42.4k]
  ------------------
  972|  5.77k|      *nextTokPtr = ptr;
  973|  5.77k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  5.77k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|     34|    default:
  ------------------
  |  Branch (974:5): [True: 34, False: 42.6k]
  ------------------
  975|     34|      *nextTokPtr = ptr;
  976|     34|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     34|#define XML_TOK_INVALID 0
  ------------------
  977|  42.7k|    }
  978|  42.7k|  }
  979|     69|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     69|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  5.93k|}
xmltok.c:normal_contentTok:
  824|  12.9M|                   const char **nextTokPtr) {
  825|  12.9M|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 849k, False: 12.0M]
  ------------------
  826|   849k|    return XML_TOK_NONE;
  ------------------
  |  |   51|   849k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|  12.0M|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|  12.0M|#  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|  12.0M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  12.0M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  12.0M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  837|  3.56M|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 3.56M, False: 8.52M]
  ------------------
  838|  3.56M|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  3.56M|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  3.56M|#  define MINBPC(enc) 1
  ------------------
  839|   886k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 886k, False: 11.2M]
  ------------------
  840|   886k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|   886k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|   886k|#  define MINBPC(enc) 1
  ------------------
  841|  2.84k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 2.84k, False: 12.0M]
  ------------------
  842|  2.84k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.84k|#  define MINBPC(enc) 1
  ------------------
  843|  2.84k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  2.84k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  2.84k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  2.84k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 24, False: 2.82k]
  ------------------
  844|     24|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     24|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  2.82k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  2.82k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.82k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 262, False: 2.56k]
  ------------------
  846|    262|      ptr += MINBPC(enc);
  ------------------
  |  |  242|    262|#  define MINBPC(enc) 1
  ------------------
  847|  2.82k|    *nextTokPtr = ptr;
  848|  2.82k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  2.82k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|  5.83M|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 5.83M, False: 6.25M]
  ------------------
  850|  5.83M|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  5.83M|#  define MINBPC(enc) 1
  ------------------
  851|  5.83M|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  5.83M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  41.4k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 41.4k, False: 12.0M]
  ------------------
  853|  41.4k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  41.4k|#  define MINBPC(enc) 1
  ------------------
  854|  41.4k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  41.4k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  41.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  41.4k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 32.4k, False: 8.93k]
  ------------------
  855|  32.4k|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|  32.4k|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  8.93k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  300|  8.93k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (856:9): [True: 4.71k, False: 4.22k]
  ------------------
  857|  4.71k|      break;
  858|  4.22k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  4.22k|#  define MINBPC(enc) 1
  ------------------
  859|  4.22k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  4.22k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  4.22k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  4.22k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 213, False: 4.01k]
  ------------------
  860|    213|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|    213|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|  4.01k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  4.01k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (861:9): [True: 4.00k, False: 1]
  ------------------
  862|  4.00k|      ptr -= MINBPC(enc);
  ------------------
  |  |  242|  4.00k|#  define MINBPC(enc) 1
  ------------------
  863|  4.00k|      break;
  864|  4.00k|    }
  865|      1|    *nextTokPtr = ptr;
  866|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  867|  74.8k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  2.43k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.42k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.43k, False: 12.0M]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.43k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 2.43k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.42k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.43k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.43k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.43k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 10, False: 2.42k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     10|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     10|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     10|    }                                                                          \
  |  |  |  |   56|  2.43k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.42k|    break;
  |  |  ------------------
  |  |   61|  8.47k|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  8.46k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 8.47k, False: 12.0M]
  |  |  |  |  ------------------
  |  |  |  |   50|  8.47k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 3, False: 8.47k]
  |  |  |  |  ------------------
  |  |  |  |   51|  8.46k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  8.47k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  8.47k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  8.47k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 13, False: 8.46k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     13|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     13|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     13|    }                                                                          \
  |  |  |  |   56|  8.47k|    ptr += n;                                                                  \
  |  |  |  |   57|  8.46k|    break;
  |  |  ------------------
  |  |   62|  26.4k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  26.4k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 26.4k, False: 12.0M]
  |  |  |  |  ------------------
  |  |  |  |   50|  26.4k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 4, False: 26.4k]
  |  |  |  |  ------------------
  |  |  |  |   51|  26.4k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  26.4k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  26.4k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  26.4k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 23, False: 26.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|     23|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|     23|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     23|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|     23|    }                                                                          \
  |  |  |  |   56|  26.4k|    ptr += n;                                                                  \
  |  |  |  |   57|  26.4k|    break;
  |  |  ------------------
  |  |   63|  26.4k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 62, False: 12.0M]
  |  |  ------------------
  |  |   64|     66|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 4, False: 12.0M]
  |  |  ------------------
  |  |   65|     72|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 6, False: 12.0M]
  |  |  ------------------
  |  |   66|     72|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     72|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     72|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|  1.72M|  default:
  ------------------
  |  Branch (868:3): [True: 1.72M, False: 10.3M]
  ------------------
  869|  1.72M|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.72M|#  define MINBPC(enc) 1
  ------------------
  870|  1.72M|    break;
  871|  12.0M|  }
  872|  30.4M|  while (HAS_CHAR(enc, ptr, end)) {
  873|  30.4M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  30.4M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  30.4M|  (((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|  43.7k|      LEAD_CASE(2)
  ------------------
  |  |  875|  43.7k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 43.7k, False: 30.4M]
  |  |  ------------------
  |  |  876|  43.7k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  43.7k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  43.7k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 9, False: 43.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 1, False: 43.7k]
  |  |  ------------------
  |  |  877|     10|      *nextTokPtr = ptr;                                                       \
  |  |  878|     10|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     10|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     10|    }                                                                          \
  |  |  880|  43.7k|    ptr += n;                                                                  \
  |  |  881|  43.7k|    break;
  ------------------
  883|  8.94M|      LEAD_CASE(3)
  ------------------
  |  |  875|  8.94M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 8.94M, False: 21.5M]
  |  |  ------------------
  |  |  876|  8.94M|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  8.94M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  8.94M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 9, False: 8.94M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 1, False: 8.94M]
  |  |  ------------------
  |  |  877|     10|      *nextTokPtr = ptr;                                                       \
  |  |  878|     10|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     10|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     10|    }                                                                          \
  |  |  880|  8.94M|    ptr += n;                                                                  \
  |  |  881|  8.94M|    break;
  ------------------
  884|  26.5k|      LEAD_CASE(4)
  ------------------
  |  |  875|  26.5k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 26.5k, False: 30.4M]
  |  |  ------------------
  |  |  876|  26.5k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  26.5k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  26.5k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 21, False: 26.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 2, False: 26.5k]
  |  |  ------------------
  |  |  877|     23|      *nextTokPtr = ptr;                                                       \
  |  |  878|     23|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     23|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     23|    }                                                                          \
  |  |  880|  26.5k|    ptr += n;                                                                  \
  |  |  881|  26.5k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|  17.4k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 17.4k, False: 30.4M]
  ------------------
  887|  17.4k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|  17.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  242|  17.4k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 17.2k, False: 219]
  |  |  ------------------
  ------------------
  888|  17.2k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  300|  17.2k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (888:13): [True: 10.8k, False: 6.39k]
  ------------------
  889|  10.8k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  10.8k|#  define MINBPC(enc) 1
  ------------------
  890|  10.8k|          break;
  891|  10.8k|        }
  892|  6.39k|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|  6.39k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  242|  6.39k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 6.19k, False: 199]
  |  |  ------------------
  ------------------
  893|  6.19k|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  300|  6.19k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (893:15): [True: 6.19k, False: 2]
  ------------------
  894|  6.19k|            ptr += MINBPC(enc);
  ------------------
  |  |  242|  6.19k|#  define MINBPC(enc) 1
  ------------------
  895|  6.19k|            break;
  896|  6.19k|          }
  897|      2|          *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  242|      2|#  define MINBPC(enc) 1
  ------------------
  898|      2|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  899|  6.19k|        }
  900|  6.39k|      }
  901|       |      /* fall through */
  902|   187k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 187k, False: 30.2M]
  ------------------
  903|   457k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 269k, False: 30.1M]
  ------------------
  904|   457k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 41, False: 30.4M]
  ------------------
  905|   457k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 1, False: 30.4M]
  ------------------
  906|   457k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 1, False: 30.4M]
  ------------------
  907|   459k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 1.88k, False: 30.4M]
  ------------------
  908|  1.08M|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 628k, False: 29.8M]
  ------------------
  909|  1.08M|      *nextTokPtr = ptr;
  910|  1.08M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.08M|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|  20.3M|    default:
  ------------------
  |  Branch (911:5): [True: 20.3M, False: 10.1M]
  ------------------
  912|  20.3M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  20.3M|#  define MINBPC(enc) 1
  ------------------
  913|  20.3M|      break;
  914|  30.4M|    }
  915|  30.4M|  }
  916|   686k|  *nextTokPtr = ptr;
  917|   686k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   686k|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|  1.77M|}
xmltok.c:normal_scanLt:
  726|  3.56M|               const char **nextTokPtr) {
  727|  3.56M|#  ifdef XML_NS
  728|  3.56M|  int hadColon;
  729|  3.56M|#  endif
  730|  3.56M|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.56M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.56M|    {                                                                          \
  |  |  |  |  135|  3.56M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.56M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.56M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 26, False: 3.56M]
  |  |  |  |  ------------------
  |  |  |  |  136|     26|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     26|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     26|      }                                                                        \
  |  |  |  |  138|  3.56M|    }
  |  |  ------------------
  ------------------
  731|  3.56M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.56M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.56M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  732|  3.32M|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  3.40M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 3.56M]
  |  |  ------------------
  |  |  111|  3.40M|    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.40M|    /* fall through */                                                         \
  |  |  116|  3.40M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.32M, False: 239k]
  |  |  ------------------
  |  |  117|  3.40M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 80.0k, False: 3.48M]
  |  |  ------------------
  |  |  118|  3.40M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  3.40M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  3.40M|    break;                                                                     \
  |  |  120|  3.40M|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  1.01k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 1.01k, False: 3.56M]
  |  |  |  |  ------------------
  |  |  |  |  100|  1.01k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 1.01k]
  |  |  |  |  ------------------
  |  |  |  |  101|  1.01k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  1.01k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.03k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.01k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 1.01k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  1.01k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.01k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 1.01k]
  |  |  |  |  ------------------
  |  |  |  |  103|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      6|    }                                                                          \
  |  |  |  |  106|  1.01k|    ptr += n;                                                                  \
  |  |  |  |  107|  1.01k|    break;
  |  |  ------------------
  |  |  121|  1.25k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  1.23k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 1.25k, False: 3.56M]
  |  |  |  |  ------------------
  |  |  |  |  100|  1.25k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 1.24k]
  |  |  |  |  ------------------
  |  |  |  |  101|  1.23k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  1.24k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.49k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.24k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 1.24k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  1.24k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.24k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 17, False: 1.23k]
  |  |  |  |  ------------------
  |  |  |  |  103|     19|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     19|    }                                                                          \
  |  |  |  |  106|  1.24k|    ptr += n;                                                                  \
  |  |  |  |  107|  1.23k|    break;
  |  |  ------------------
  |  |  122|  1.23k|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 25, False: 3.56M]
  |  |  |  |  ------------------
  |  |  |  |  100|     25|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 23]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     23|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     46|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     23|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 21]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|     21|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     21|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 21, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|     23|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     23|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     23|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     23|    }                                                                          \
  |  |  |  |  106|     23|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  733|  2.48k|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 2.48k, False: 3.56M]
  ------------------
  734|  2.48k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.48k|#  define MINBPC(enc) 1
  ------------------
  735|  2.48k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.48k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.48k|    {                                                                          \
  |  |  |  |  135|  2.48k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.48k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.48k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 2.47k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  2.48k|    }
  |  |  ------------------
  ------------------
  736|  2.47k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.47k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.47k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (246:3): [True: 17, False: 2.46k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    733|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 733, False: 1.74k]
  ------------------
  738|    733|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|    733|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|    733|#  define MINBPC(enc) 1
  ------------------
  739|  1.72k|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 1.72k, False: 750]
  ------------------
  740|  1.72k|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  1.72k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  1.72k|#  define MINBPC(enc) 1
  ------------------
  741|  2.47k|    }
  742|     17|    *nextTokPtr = ptr;
  743|     17|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
  744|  4.79k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 4.79k, False: 3.55M]
  ------------------
  745|  4.79k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  4.79k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  4.79k|#  define MINBPC(enc) 1
  ------------------
  746|   149k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 149k, False: 3.41M]
  ------------------
  747|   149k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|   149k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|   149k|#  define MINBPC(enc) 1
  ------------------
  748|     28|  default:
  ------------------
  |  Branch (748:3): [True: 28, False: 3.56M]
  ------------------
  749|     28|    *nextTokPtr = ptr;
  750|     28|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     28|#define XML_TOK_INVALID 0
  ------------------
  751|  3.56M|  }
  752|  3.40M|#  ifdef XML_NS
  753|  3.40M|  hadColon = 0;
  754|  3.40M|#  endif
  755|       |  /* we have a start-tag */
  756|  4.05M|  while (HAS_CHAR(enc, ptr, end)) {
  757|  4.05M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.05M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.05M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  758|  2.36M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   639k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 4.05M]
  |  |  ------------------
  |  |   82|   639k|    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|   639k|    /* fall through */                                                         \
  |  |   87|   639k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 502k, False: 3.55M]
  |  |  ------------------
  |  |   88|   598k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 95.9k, False: 3.96M]
  |  |  ------------------
  |  |   89|   618k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 20.0k, False: 4.03M]
  |  |  ------------------
  |  |   90|   618k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 284, False: 4.05M]
  |  |  ------------------
  |  |   91|   639k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 21.0k, False: 4.03M]
  |  |  ------------------
  |  |   92|   639k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   639k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|   639k|    break;                                                                     \
  |  |   94|   639k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  2.04k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 2.05k, False: 4.05M]
  |  |  |  |  ------------------
  |  |  |  |   71|  2.05k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 2.05k]
  |  |  |  |  ------------------
  |  |  |  |   72|  2.04k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  2.05k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  4.11k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.05k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 2.05k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  2.05k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.05k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 3, False: 2.04k]
  |  |  |  |  ------------------
  |  |  |  |   74|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      8|    }                                                                          \
  |  |  |  |   77|  2.05k|    ptr += n;                                                                  \
  |  |  |  |   78|  2.04k|    break;
  |  |  ------------------
  |  |   95|  10.9k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  10.9k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 10.9k, False: 4.04M]
  |  |  |  |  ------------------
  |  |  |  |   71|  10.9k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 10.9k]
  |  |  |  |  ------------------
  |  |  |  |   72|  10.9k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|  10.9k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  21.9k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  10.9k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 10.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|  10.9k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  10.9k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 28, False: 10.9k]
  |  |  |  |  ------------------
  |  |  |  |   74|     29|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     29|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     29|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     29|    }                                                                          \
  |  |  |  |   77|  10.9k|    ptr += n;                                                                  \
  |  |  |  |   78|  10.9k|    break;
  |  |  ------------------
  |  |   96|  10.9k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 14, False: 4.05M]
  |  |  |  |  ------------------
  |  |  |  |   71|     14|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 2, False: 12]
  |  |  |  |  ------------------
  |  |  |  |   72|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     12|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     24|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     12|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 6, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      6|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      6|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 6, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     12|    }                                                                          \
  |  |  |  |   77|     12|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 4.05M]
  ------------------
  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|  12.5k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 12.5k, False: 4.04M]
  ------------------
  777|  13.0k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 449, False: 4.05M]
  ------------------
  778|  15.4k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 2.48k, False: 4.05M]
  ------------------
  779|  15.4k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  15.4k|#  define MINBPC(enc) 1
  ------------------
  780|  16.6k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  16.6k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  16.6k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  16.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  782|  10.9k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  11.1k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 16.6k]
  |  |  ------------------
  |  |  111|  11.1k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  11.1k|    /* fall through */                                                         \
  |  |  116|  11.1k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 8.42k, False: 8.24k]
  |  |  ------------------
  |  |  117|  11.1k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 2.68k, False: 13.9k]
  |  |  ------------------
  |  |  118|  11.1k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  11.1k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  11.1k|    break;                                                                     \
  |  |  120|  11.1k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    558|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 564, False: 16.1k]
  |  |  |  |  ------------------
  |  |  |  |  100|    564|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 563]
  |  |  |  |  ------------------
  |  |  |  |  101|    558|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    563|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.12k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    563|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 559]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    559|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    559|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 558]
  |  |  |  |  ------------------
  |  |  |  |  103|      5|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      5|    }                                                                          \
  |  |  |  |  106|    563|    ptr += n;                                                                  \
  |  |  |  |  107|    558|    break;
  |  |  ------------------
  |  |  121|    684|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    668|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 684, False: 15.9k]
  |  |  |  |  ------------------
  |  |  |  |  100|    684|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 682]
  |  |  |  |  ------------------
  |  |  |  |  101|    668|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    682|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.36k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    682|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 677]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    677|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    677|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 9, False: 668]
  |  |  |  |  ------------------
  |  |  |  |  103|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     14|    }                                                                          \
  |  |  |  |  106|    682|    ptr += n;                                                                  \
  |  |  |  |  107|    668|    break;
  |  |  ------------------
  |  |  122|    668|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 17, False: 16.6k]
  |  |  |  |  ------------------
  |  |  |  |  100|     17|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 15]
  |  |  |  |  ------------------
  |  |  |  |  101|      2|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     15|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     30|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     15|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 9, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      6|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      6|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 6, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|     15|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     15|    }                                                                          \
  |  |  |  |  106|     15|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  783|  1.57k|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 1.57k, False: 15.0k]
  ------------------
  784|  1.57k|          goto gt;
  785|  1.49k|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 1.49k, False: 15.1k]
  ------------------
  786|  1.49k|          goto sol;
  787|    346|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 346, False: 16.3k]
  ------------------
  788|    843|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 497, False: 16.1k]
  ------------------
  789|  1.21k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 372, False: 16.2k]
  ------------------
  790|  1.21k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.21k|#  define MINBPC(enc) 1
  ------------------
  791|  1.21k|          continue;
  792|      4|        default:
  ------------------
  |  Branch (792:9): [True: 4, False: 16.6k]
  ------------------
  793|      4|          *nextTokPtr = ptr;
  794|      4|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  795|  16.6k|        }
  796|  12.3k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  303|  12.3k|#define PREFIX(ident) normal_##ident
  ------------------
  797|  16.6k|      }
  798|     38|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     38|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  15.4k|    }
  800|  3.38M|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 3.38M, False: 669k]
  ------------------
  801|  3.39M|    gt:
  802|  3.39M|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.39M|#  define MINBPC(enc) 1
  ------------------
  803|  3.39M|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  3.39M|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|  1.29k|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 1.29k, False: 4.05M]
  ------------------
  805|  2.78k|    sol:
  806|  2.78k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.78k|#  define MINBPC(enc) 1
  ------------------
  807|  2.78k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.78k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.78k|    {                                                                          \
  |  |  |  |  135|  2.78k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.78k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.78k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 10, False: 2.77k]
  |  |  |  |  ------------------
  |  |  |  |  136|     10|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     10|      }                                                                        \
  |  |  |  |  138|  2.78k|    }
  |  |  ------------------
  ------------------
  808|  2.77k|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  2.77k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (808:11): [True: 14, False: 2.76k]
  ------------------
  809|     14|        *nextTokPtr = ptr;
  810|     14|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  811|     14|      }
  812|  2.76k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.76k|#  define MINBPC(enc) 1
  ------------------
  813|  2.76k|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|  2.76k|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|     24|    default:
  ------------------
  |  Branch (814:5): [True: 24, False: 4.05M]
  ------------------
  815|     24|      *nextTokPtr = ptr;
  816|     24|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     24|#define XML_TOK_INVALID 0
  ------------------
  817|  4.05M|    }
  818|  4.05M|  }
  819|    106|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    106|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  3.40M|}
xmltok.c:normal_scanCdataSection:
  337|  1.72k|                         const char **nextTokPtr) {
  338|  1.72k|  static const char CDATA_LSQB[]
  339|  1.72k|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|  1.72k|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|  1.72k|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|  1.72k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|  1.72k|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|  1.72k|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|  1.72k|#define ASCII_LSQB 0x5B
  ------------------
  340|  1.72k|  int i;
  341|  1.72k|  UNUSED_P(enc);
  ------------------
  |  |  135|  1.72k|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|  1.72k|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|  1.72k|    {                                                                          \
  |  |  135|  1.72k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|  1.72k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  1.72k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 2, False: 1.72k]
  |  |  ------------------
  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      2|      }                                                                        \
  |  |  138|  1.72k|    }
  ------------------
  344|  12.0k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  10.3k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (344:15): [True: 10.3k, False: 1.71k]
  ------------------
  345|  10.3k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  300|  10.3k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (345:9): [True: 8, False: 10.3k]
  ------------------
  346|      8|      *nextTokPtr = ptr;
  347|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  348|      8|    }
  349|  10.3k|  }
  350|  1.71k|  *nextTokPtr = ptr;
  351|  1.71k|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|  1.71k|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|  1.72k|}
xmltok.c:normal_scanEndTag:
  432|   149k|                   const char **nextTokPtr) {
  433|   149k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   149k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   149k|    {                                                                          \
  |  |  |  |  135|   149k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   149k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|   149k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 149k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|   149k|    }
  |  |  ------------------
  ------------------
  434|   149k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   149k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   149k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  435|   100k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   149k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 149k]
  |  |  ------------------
  |  |  111|   149k|    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|   149k|    /* fall through */                                                         \
  |  |  116|   149k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 99.4k, False: 50.2k]
  |  |  ------------------
  |  |  117|   149k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 49.8k, False: 99.9k]
  |  |  ------------------
  |  |  118|   149k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   149k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|   149k|    break;                                                                     \
  |  |  120|   149k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    209|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 220, False: 149k]
  |  |  |  |  ------------------
  |  |  |  |  100|    220|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 219]
  |  |  |  |  ------------------
  |  |  |  |  101|    209|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    219|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    438|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    219|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 8, False: 211]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    211|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    211|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 2, False: 209]
  |  |  |  |  ------------------
  |  |  |  |  103|     10|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     10|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     10|    }                                                                          \
  |  |  |  |  106|    219|    ptr += n;                                                                  \
  |  |  |  |  107|    209|    break;
  |  |  ------------------
  |  |  121|    246|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    243|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 246, False: 149k]
  |  |  |  |  ------------------
  |  |  |  |  100|    246|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 245]
  |  |  |  |  ------------------
  |  |  |  |  101|    243|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    245|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    490|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    245|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 244]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    244|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    244|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 243]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      2|    }                                                                          \
  |  |  |  |  106|    245|    ptr += n;                                                                  \
  |  |  |  |  107|    243|    break;
  |  |  ------------------
  |  |  122|    243|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 9, False: 149k]
  |  |  |  |  ------------------
  |  |  |  |  100|      9|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 8]
  |  |  |  |  ------------------
  |  |  |  |  101|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      8|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     16|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      8|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 7]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      7|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      7|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 7, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      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;
  |  |  ------------------
  ------------------
  436|      1|  default:
  ------------------
  |  Branch (436:3): [True: 1, False: 149k]
  ------------------
  437|      1|    *nextTokPtr = ptr;
  438|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  439|   149k|  }
  440|  1.43M|  while (HAS_CHAR(enc, ptr, end)) {
  441|  1.43M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.43M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.43M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  442|  3.31M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   412k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 1.43M]
  |  |  ------------------
  |  |   82|   412k|    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|   412k|    /* fall through */                                                         \
  |  |   87|   412k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 329k, False: 1.10M]
  |  |  ------------------
  |  |   88|   411k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 82.2k, False: 1.35M]
  |  |  ------------------
  |  |   89|   411k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 283, False: 1.43M]
  |  |  ------------------
  |  |   90|   412k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 196, False: 1.43M]
  |  |  ------------------
  |  |   91|   412k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 288, False: 1.43M]
  |  |  ------------------
  |  |   92|   412k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|   412k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|   412k|    break;                                                                     \
  |  |   94|   412k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    539|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 543, False: 1.43M]
  |  |  |  |  ------------------
  |  |  |  |   71|    543|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 542]
  |  |  |  |  ------------------
  |  |  |  |   72|    539|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    542|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.08k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    542|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 541]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    541|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    541|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 2, False: 539]
  |  |  |  |  ------------------
  |  |  |  |   74|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      3|    }                                                                          \
  |  |  |  |   77|    542|    ptr += n;                                                                  \
  |  |  |  |   78|    539|    break;
  |  |  ------------------
  |  |   95|   873k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|   873k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 873k, False: 562k]
  |  |  |  |  ------------------
  |  |  |  |   71|   873k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 873k]
  |  |  |  |  ------------------
  |  |  |  |   72|   873k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|   873k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.74M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   873k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 873k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|   873k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   873k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 34, False: 873k]
  |  |  |  |  ------------------
  |  |  |  |   74|     35|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     35|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     35|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     35|    }                                                                          \
  |  |  |  |   77|   873k|    ptr += n;                                                                  \
  |  |  |  |   78|   873k|    break;
  |  |  ------------------
  |  |   96|   873k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 8, False: 1.43M]
  |  |  |  |  ------------------
  |  |  |  |   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: 2, False: 5]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|      5|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      5|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 5, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|      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|    259|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 259, False: 1.43M]
  ------------------
  444|    512|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 253, False: 1.43M]
  ------------------
  445|  18.1k|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 17.6k, False: 1.41M]
  ------------------
  446|  34.7k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  18.1k|#  define MINBPC(enc) 1
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  16.5k|#  define MINBPC(enc) 1
  ------------------
  447|  34.7k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  34.7k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  34.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  448|    226|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 226, False: 34.5k]
  ------------------
  449|    607|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 381, False: 34.3k]
  ------------------
  450|  16.5k|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 15.9k, False: 18.7k]
  ------------------
  451|  16.5k|          break;
  452|  18.1k|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 18.1k, False: 16.6k]
  ------------------
  453|  18.1k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  18.1k|#  define MINBPC(enc) 1
  ------------------
  454|  18.1k|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|  18.1k|#define XML_TOK_END_TAG 5
  ------------------
  455|      6|        default:
  ------------------
  |  Branch (455:9): [True: 6, False: 34.7k]
  ------------------
  456|      6|          *nextTokPtr = ptr;
  457|      6|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  458|  34.7k|        }
  459|  34.7k|      }
  460|     39|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     39|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  461|      0|#  ifdef XML_NS
  462|      0|    case BT_COLON:
  ------------------
  |  Branch (462:5): [True: 0, False: 1.43M]
  ------------------
  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|   131k|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 131k, False: 1.30M]
  ------------------
  469|   131k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|   131k|#  define MINBPC(enc) 1
  ------------------
  470|   131k|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|   131k|#define XML_TOK_END_TAG 5
  ------------------
  471|      8|    default:
  ------------------
  |  Branch (471:5): [True: 8, False: 1.43M]
  ------------------
  472|      8|      *nextTokPtr = ptr;
  473|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  474|  1.43M|    }
  475|  1.43M|  }
  476|     76|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     76|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|   149k|}
xmltok.c:normal_scanAtts:
  573|  12.3k|                 const char **nextTokPtr) {
  574|  12.3k|#  ifdef XML_NS
  575|  12.3k|  int hadColon = 0;
  576|  12.3k|#  endif
  577|  6.15M|  while (HAS_CHAR(enc, ptr, end)) {
  578|  6.15M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  6.15M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  6.15M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  579|  12.0M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  2.73M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 6.15M]
  |  |  ------------------
  |  |   82|  2.73M|    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.73M|    /* fall through */                                                         \
  |  |   87|  2.73M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 2.67M, False: 3.47M]
  |  |  ------------------
  |  |   88|  2.68M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 4.05k, False: 6.14M]
  |  |  ------------------
  |  |   89|  2.68M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 1.17k, False: 6.15M]
  |  |  ------------------
  |  |   90|  2.68M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 219, False: 6.15M]
  |  |  ------------------
  |  |   91|  2.73M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 57.6k, False: 6.09M]
  |  |  ------------------
  |  |   92|  2.73M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  2.73M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  2.73M|    break;                                                                     \
  |  |   94|  2.73M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|   333k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 333k, False: 5.81M]
  |  |  |  |  ------------------
  |  |  |  |   71|   333k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 333k]
  |  |  |  |  ------------------
  |  |  |  |   72|   333k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|   333k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   667k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   333k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 333k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|   333k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   333k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 333k]
  |  |  |  |  ------------------
  |  |  |  |   74|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      3|    }                                                                          \
  |  |  |  |   77|   333k|    ptr += n;                                                                  \
  |  |  |  |   78|   333k|    break;
  |  |  ------------------
  |  |   95|   333k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|   316k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 316k, False: 5.83M]
  |  |  |  |  ------------------
  |  |  |  |   71|   316k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 316k]
  |  |  |  |  ------------------
  |  |  |  |   72|   316k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|   316k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|   633k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   316k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 316k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|   316k|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   316k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 22, False: 316k]
  |  |  |  |  ------------------
  |  |  |  |   74|     25|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     25|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     25|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     25|    }                                                                          \
  |  |  |  |   77|   316k|    ptr += n;                                                                  \
  |  |  |  |   78|   316k|    break;
  |  |  ------------------
  |  |   96|   316k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 27, False: 6.15M]
  |  |  |  |  ------------------
  |  |  |  |   71|     27|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 26]
  |  |  |  |  ------------------
  |  |  |  |   72|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     26|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     52|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     26|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 4, False: 22]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|     22|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     22|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 22, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   74|     26|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     26|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     26|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     26|    }                                                                          \
  |  |  |  |   77|     26|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  580|      0|#  ifdef XML_NS
  581|      0|    case BT_COLON:
  ------------------
  |  Branch (581:5): [True: 0, False: 6.15M]
  ------------------
  582|      0|      if (hadColon) {
  ------------------
  |  Branch (582:11): [True: 0, False: 0]
  ------------------
  583|      0|        *nextTokPtr = ptr;
  584|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  585|      0|      }
  586|      0|      hadColon = 1;
  587|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  242|      0|#  define MINBPC(enc) 1
  ------------------
  588|      0|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|      0|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|      0|    {                                                                          \
  |  |  |  |  135|      0|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|      0|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|      0|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      0|      }                                                                        \
  |  |  |  |  138|      0|    }
  |  |  ------------------
  ------------------
  589|      0|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|      0|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|      0|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  590|      0|        CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|      0|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  111|      0|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|      0|    /* fall through */                                                         \
  |  |  116|      0|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  117|      0|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  118|      0|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|      0|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|      0|    break;                                                                     \
  |  |  120|      0|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      0|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      0|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      0|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      0|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|      0|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      0|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 0, False: 0]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      0|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      0|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  591|      0|      default:
  ------------------
  |  Branch (591:7): [True: 0, False: 0]
  ------------------
  592|      0|        *nextTokPtr = ptr;
  593|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  594|      0|      }
  595|      0|      break;
  596|      0|#  endif
  597|    291|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 291, False: 6.15M]
  ------------------
  598|    674|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 383, False: 6.15M]
  ------------------
  599|  1.06k|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 391, False: 6.15M]
  ------------------
  600|  1.67k|      for (;;) {
  601|  1.67k|        int t;
  602|       |
  603|  1.67k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  1.67k|#  define MINBPC(enc) 1
  ------------------
  604|  1.67k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.67k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.67k|    {                                                                          \
  |  |  |  |  135|  1.67k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.67k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  1.67k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 39, False: 1.63k]
  |  |  |  |  ------------------
  |  |  |  |  136|     39|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     39|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     39|      }                                                                        \
  |  |  |  |  138|  1.67k|    }
  |  |  ------------------
  ------------------
  605|  1.63k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  1.63k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.63k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  606|  1.63k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 1.01k, False: 619]
  ------------------
  607|  1.01k|          break;
  608|    619|        switch (t) {
  609|    201|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 201, False: 418]
  ------------------
  610|    403|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 202, False: 417]
  ------------------
  611|    609|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 206, False: 413]
  ------------------
  612|    609|          break;
  613|     10|        default:
  ------------------
  |  Branch (613:9): [True: 10, False: 609]
  ------------------
  614|     10|          *nextTokPtr = ptr;
  615|     10|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  616|    619|        }
  617|    619|      }
  618|       |      /* fall through */
  619|  2.76M|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 2.76M, False: 3.39M]
  ------------------
  620|  2.76M|      int open;
  621|  2.76M|#  ifdef XML_NS
  622|  2.76M|      hadColon = 0;
  623|  2.76M|#  endif
  624|  2.76M|      for (;;) {
  625|  2.76M|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.76M|#  define MINBPC(enc) 1
  ------------------
  626|  2.76M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.76M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.76M|    {                                                                          \
  |  |  |  |  135|  2.76M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.76M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.76M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 36, False: 2.76M]
  |  |  |  |  ------------------
  |  |  |  |  136|     36|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     36|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     36|      }                                                                        \
  |  |  |  |  138|  2.76M|    }
  |  |  ------------------
  ------------------
  627|  2.76M|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  2.76M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.76M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  628|  2.76M|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 23.5k, False: 2.74M]
  |  Branch (628:32): [True: 2.74M, False: 677]
  ------------------
  629|  2.76M|          break;
  630|    677|        switch (open) {
  631|    235|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 235, False: 442]
  ------------------
  632|    462|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 227, False: 450]
  ------------------
  633|    663|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 201, False: 476]
  ------------------
  634|    663|          break;
  635|     14|        default:
  ------------------
  |  Branch (635:9): [True: 14, False: 663]
  ------------------
  636|     14|          *nextTokPtr = ptr;
  637|     14|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  638|    677|        }
  639|    677|      }
  640|  2.76M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.76M|#  define MINBPC(enc) 1
  ------------------
  641|       |      /* in attribute value */
  642|  16.2M|      for (;;) {
  643|  16.2M|        int t;
  644|  16.2M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  16.2M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  16.2M|    {                                                                          \
  |  |  |  |  135|  16.2M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  16.2M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  16.2M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 89, False: 16.2M]
  |  |  |  |  ------------------
  |  |  |  |  136|     89|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     89|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     89|      }                                                                        \
  |  |  |  |  138|  16.2M|    }
  |  |  ------------------
  ------------------
  645|  16.2M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  255|  16.2M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  16.2M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  646|  16.2M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 2.76M, False: 13.4M]
  ------------------
  647|  2.76M|          break;
  648|  13.4M|        switch (t) {
  649|  17.3M|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  5.73k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  5.72k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 5.73k, False: 13.4M]
  |  |  |  |  ------------------
  |  |  |  |   50|  5.73k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 5.73k]
  |  |  |  |  ------------------
  |  |  |  |   51|  5.72k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  5.73k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  5.73k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  5.73k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 5.72k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      3|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      3|    }                                                                          \
  |  |  |  |   56|  5.73k|    ptr += n;                                                                  \
  |  |  |  |   57|  5.72k|    break;
  |  |  ------------------
  |  |   61|  8.67M|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  8.67M|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 8.67M, False: 4.76M]
  |  |  |  |  ------------------
  |  |  |  |   50|  8.67M|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 1, False: 8.67M]
  |  |  |  |  ------------------
  |  |  |  |   51|  8.67M|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  8.67M|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  8.67M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  8.67M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 3, False: 8.67M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      3|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      3|    }                                                                          \
  |  |  |  |   56|  8.67M|    ptr += n;                                                                  \
  |  |  |  |   57|  8.67M|    break;
  |  |  ------------------
  |  |   62|  8.67M|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  4.26k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 4.27k, False: 13.4M]
  |  |  |  |  ------------------
  |  |  |  |   50|  4.27k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 3, False: 4.27k]
  |  |  |  |  ------------------
  |  |  |  |   51|  4.26k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      3|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  4.27k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  4.27k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  4.27k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 4.26k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      5|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      5|    }                                                                          \
  |  |  |  |   56|  4.27k|    ptr += n;                                                                  \
  |  |  |  |   57|  4.26k|    break;
  |  |  ------------------
  |  |   63|  4.26k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 6, False: 13.4M]
  |  |  ------------------
  |  |   64|      7|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 1, False: 13.4M]
  |  |  ------------------
  |  |   65|      9|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 2, False: 13.4M]
  |  |  ------------------
  |  |   66|      9|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|      9|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  12.1k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 12.1k, False: 13.4M]
  ------------------
  651|  12.1k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  303|  12.1k|#define PREFIX(ident) normal_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  242|  12.1k|#  define MINBPC(enc) 1
  ------------------
  652|  12.1k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 11, False: 12.1k]
  ------------------
  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|  12.1k|          break;
  658|  12.1k|        }
  659|  12.1k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 13, False: 13.4M]
  ------------------
  660|     13|          *nextTokPtr = ptr;
  661|     13|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  662|  4.74M|        default:
  ------------------
  |  Branch (662:9): [True: 4.74M, False: 8.69M]
  ------------------
  663|  4.74M|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  4.74M|#  define MINBPC(enc) 1
  ------------------
  664|  4.74M|          break;
  665|  13.4M|        }
  666|  13.4M|      }
  667|  2.76M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.76M|#  define MINBPC(enc) 1
  ------------------
  668|  2.76M|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.76M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.76M|    {                                                                          \
  |  |  |  |  135|  2.76M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.76M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  2.76M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 2.76M]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  2.76M|    }
  |  |  ------------------
  ------------------
  669|  2.76M|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.76M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.76M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  670|   234k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 234k, False: 2.52M]
  ------------------
  671|  2.74M|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 2.51M, False: 253k]
  ------------------
  672|  2.75M|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 8.29k, False: 2.75M]
  ------------------
  673|  2.75M|        break;
  674|  3.50k|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 3.50k, False: 2.76M]
  ------------------
  675|  3.50k|        goto sol;
  676|  7.10k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 7.10k, False: 2.75M]
  ------------------
  677|  7.10k|        goto gt;
  678|     12|      default:
  ------------------
  |  Branch (678:7): [True: 12, False: 2.76M]
  ------------------
  679|     12|        *nextTokPtr = ptr;
  680|     12|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  681|  2.76M|      }
  682|       |      /* ptr points to closing quote */
  683|  3.13M|      for (;;) {
  684|  3.13M|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.13M|#  define MINBPC(enc) 1
  ------------------
  685|  3.13M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.13M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.13M|    {                                                                          \
  |  |  |  |  135|  3.13M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.13M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.13M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 43, False: 3.13M]
  |  |  |  |  ------------------
  |  |  |  |  136|     43|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     43|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     43|      }                                                                        \
  |  |  |  |  138|  3.13M|    }
  |  |  ------------------
  ------------------
  686|  3.13M|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.13M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.13M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  687|  3.25M|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.23M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 3.13M]
  |  |  ------------------
  |  |  111|  2.23M|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  287|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) (0)
  |  |  ------------------
  |  |  |  Branch (111:9): [Folded - Ignored]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|  2.23M|    /* fall through */                                                         \
  |  |  116|  2.23M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 2.22M, False: 915k]
  |  |  ------------------
  |  |  117|  2.23M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 13.2k, False: 3.12M]
  |  |  ------------------
  |  |  118|  2.23M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  2.23M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  2.23M|    break;                                                                     \
  |  |  120|  2.23M|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|   512k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 512k, False: 2.62M]
  |  |  |  |  ------------------
  |  |  |  |  100|   512k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 512k]
  |  |  |  |  ------------------
  |  |  |  |  101|   512k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|   512k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  1.02M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   512k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 512k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|   512k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|   512k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 512k]
  |  |  |  |  ------------------
  |  |  |  |  103|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|   512k|    ptr += n;                                                                  \
  |  |  |  |  107|   512k|    break;
  |  |  ------------------
  |  |  121|   512k|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|  3.84k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 3.85k, False: 3.13M]
  |  |  |  |  ------------------
  |  |  |  |  100|  3.85k|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 3.85k]
  |  |  |  |  ------------------
  |  |  |  |  101|  3.84k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|  3.85k|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  7.70k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.85k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 3.84k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|  3.84k|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  3.84k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 9, False: 3.84k]
  |  |  |  |  ------------------
  |  |  |  |  103|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     14|    }                                                                          \
  |  |  |  |  106|  3.85k|    ptr += n;                                                                  \
  |  |  |  |  107|  3.84k|    break;
  |  |  ------------------
  |  |  122|  3.84k|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 15, False: 3.13M]
  |  |  |  |  ------------------
  |  |  |  |  100|     15|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 14]
  |  |  |  |  ------------------
  |  |  |  |  101|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     14|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|     28|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|     14|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 8, False: 6]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      6|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      6|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 6, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     14|    }                                                                          \
  |  |  |  |  106|     14|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  688|  2.62k|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 2.62k, False: 3.13M]
  ------------------
  689|   384k|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 381k, False: 2.75M]
  ------------------
  690|   384k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 509, False: 3.13M]
  ------------------
  691|   384k|          continue;
  692|    276|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 276, False: 3.13M]
  ------------------
  693|  7.37k|        gt:
  694|  7.37k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  7.37k|#  define MINBPC(enc) 1
  ------------------
  695|  7.37k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  7.37k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|    960|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 960, False: 3.13M]
  ------------------
  697|  4.46k|        sol:
  698|  4.46k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  4.46k|#  define MINBPC(enc) 1
  ------------------
  699|  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: 6, False: 4.46k]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|  4.46k|    }
  |  |  ------------------
  ------------------
  700|  4.46k|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  4.46k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (700:15): [True: 19, False: 4.44k]
  ------------------
  701|     19|            *nextTokPtr = ptr;
  702|     19|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     19|#define XML_TOK_INVALID 0
  ------------------
  703|     19|          }
  704|  4.44k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  4.44k|#  define MINBPC(enc) 1
  ------------------
  705|  4.44k|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|  4.44k|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|      6|        default:
  ------------------
  |  Branch (706:9): [True: 6, False: 3.13M]
  ------------------
  707|      6|          *nextTokPtr = ptr;
  708|      6|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  709|  3.13M|        }
  710|  2.75M|        break;
  711|  3.13M|      }
  712|  2.75M|      break;
  713|  2.75M|    }
  714|  2.75M|    default:
  ------------------
  |  Branch (714:5): [True: 8, False: 6.15M]
  ------------------
  715|      8|      *nextTokPtr = ptr;
  716|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  717|  6.15M|    }
  718|  6.15M|  }
  719|     91|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     91|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  12.3k|}
xmltok.c:normal_scanRef:
  545|  3.96M|                const char **nextTokPtr) {
  546|  3.96M|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.96M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.96M|    {                                                                          \
  |  |  |  |  135|  3.96M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.96M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.96M|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 33, False: 3.96M]
  |  |  |  |  ------------------
  |  |  |  |  136|     33|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     33|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     33|      }                                                                        \
  |  |  |  |  138|  3.96M|    }
  |  |  ------------------
  ------------------
  547|  3.96M|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  3.96M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.96M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  548|  3.94M|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  3.95M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 3.96M]
  |  |  ------------------
  |  |  111|  3.95M|    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.95M|    /* fall through */                                                         \
  |  |  116|  3.95M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.93M, False: 24.1k]
  |  |  ------------------
  |  |  117|  3.95M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 15.9k, False: 3.94M]
  |  |  ------------------
  |  |  118|  3.95M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  3.95M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |  119|  3.95M|    break;                                                                     \
  |  |  120|  3.95M|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    471|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 476, False: 3.96M]
  |  |  |  |  ------------------
  |  |  |  |  100|    476|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 474]
  |  |  |  |  ------------------
  |  |  |  |  101|    471|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    474|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    948|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    474|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 472]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    472|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    472|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 471]
  |  |  |  |  ------------------
  |  |  |  |  103|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|    474|    ptr += n;                                                                  \
  |  |  |  |  107|    471|    break;
  |  |  ------------------
  |  |  121|    471|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|    413|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 418, False: 3.96M]
  |  |  |  |  ------------------
  |  |  |  |  100|    418|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 2, False: 416]
  |  |  |  |  ------------------
  |  |  |  |  101|    413|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|    416|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    832|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    416|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 414]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|    414|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    414|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 413]
  |  |  |  |  ------------------
  |  |  |  |  103|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      3|    }                                                                          \
  |  |  |  |  106|    416|    ptr += n;                                                                  \
  |  |  |  |  107|    413|    break;
  |  |  ------------------
  |  |  122|    413|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 3, False: 3.96M]
  |  |  |  |  ------------------
  |  |  |  |  100|      3|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 1, False: 2]
  |  |  |  |  ------------------
  |  |  |  |  101|      1|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      2|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|      4|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      2|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 1, False: 1]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  270|      1|#define IS_NMSTRT_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isNmstrt##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|      1|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [True: 1, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  103|      2|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      2|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      2|    }                                                                          \
  |  |  |  |  106|      2|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  549|  7.28k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 7.28k, False: 3.95M]
  ------------------
  550|  7.28k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  7.28k|#define PREFIX(ident) normal_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  7.28k|#  define MINBPC(enc) 1
  ------------------
  551|      9|  default:
  ------------------
  |  Branch (551:3): [True: 9, False: 3.96M]
  ------------------
  552|      9|    *nextTokPtr = ptr;
  553|      9|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  554|  3.96M|  }
  555|  21.1M|  while (HAS_CHAR(enc, ptr, end)) {
  556|  21.1M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  21.1M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  21.1M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  557|  60.3M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  17.2M|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 21.1M]
  |  |  ------------------
  |  |   82|  17.2M|    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|  17.2M|    /* fall through */                                                         \
  |  |   87|  17.2M|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 11.5M, False: 9.64M]
  |  |  ------------------
  |  |   88|  14.3M|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 2.83M, False: 18.3M]
  |  |  ------------------
  |  |   89|  17.2M|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 2.84M, False: 18.3M]
  |  |  ------------------
  |  |   90|  17.2M|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 313, False: 21.1M]
  |  |  ------------------
  |  |   91|  17.2M|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 691, False: 21.1M]
  |  |  ------------------
  |  |   92|  17.2M|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  242|  17.2M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  |   93|  17.2M|    break;                                                                     \
  |  |   94|  17.2M|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|    308|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 312, False: 21.1M]
  |  |  |  |  ------------------
  |  |  |  |   71|    312|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 311]
  |  |  |  |  ------------------
  |  |  |  |   72|    308|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|    311|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|    622|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    311|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 309]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|    309|#define IS_NAME_CHAR(enc, p, n) (AS_NORMAL_ENCODING(enc)->isName##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|    309|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [True: 1, False: 308]
  |  |  |  |  ------------------
  |  |  |  |   74|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      3|    }                                                                          \
  |  |  |  |   77|    311|    ptr += n;                                                                  \
  |  |  |  |   78|    308|    break;
  |  |  ------------------
  |  |   95|  1.08k|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|  1.08k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 1.08k, False: 21.1M]
  |  |  |  |  ------------------
  |  |  |  |   71|  1.08k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 1, False: 1.08k]
  |  |  |  |  ------------------
  |  |  |  |   72|  1.08k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      1|#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.16k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  1.08k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 2, False: 1.08k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_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: 1, False: 1.08k]
  |  |  |  |  ------------------
  |  |  |  |   74|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      3|    }                                                                          \
  |  |  |  |   77|  1.08k|    ptr += n;                                                                  \
  |  |  |  |   78|  1.08k|    break;
  |  |  ------------------
  |  |   96|  1.08k|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 23, False: 21.1M]
  |  |  |  |  ------------------
  |  |  |  |   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: 15, 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|     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|  3.95M|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 3.95M, False: 17.2M]
  ------------------
  559|  3.95M|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  3.95M|#  define MINBPC(enc) 1
  ------------------
  560|  3.95M|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|  3.95M|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|      7|    default:
  ------------------
  |  Branch (561:5): [True: 7, False: 21.1M]
  ------------------
  562|      7|      *nextTokPtr = ptr;
  563|      7|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  564|  21.1M|    }
  565|  21.1M|  }
  566|     50|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     50|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|  3.95M|}
xmltok.c:normal_scanCharRef:
  514|  7.28k|                    const char **nextTokPtr) {
  515|  7.28k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  7.28k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  7.28k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  7.28k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 7.28k, False: 3]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  7.28k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  300|  7.28k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 4.99k, False: 2.29k]
  |  |  ------------------
  ------------------
  517|  4.99k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  4.99k|#define PREFIX(ident) normal_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  4.99k|#  define MINBPC(enc) 1
  ------------------
  518|  2.29k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.29k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.29k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  519|  2.27k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 2.27k, False: 17]
  ------------------
  520|  2.27k|      break;
  521|     17|    default:
  ------------------
  |  Branch (521:5): [True: 17, False: 2.27k]
  ------------------
  522|     17|      *nextTokPtr = ptr;
  523|     17|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
  524|  2.29k|    }
  525|  6.16k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  2.27k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  3.89k|#  define MINBPC(enc) 1
  ------------------
  526|  6.16k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  6.16k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  6.16k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  527|  3.89k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 3.89k, False: 2.26k]
  ------------------
  528|  3.89k|        break;
  529|  2.26k|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 2.26k, False: 3.90k]
  ------------------
  530|  2.26k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.26k|#  define MINBPC(enc) 1
  ------------------
  531|  2.26k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  2.26k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|      9|      default:
  ------------------
  |  Branch (532:7): [True: 9, False: 6.15k]
  ------------------
  533|      9|        *nextTokPtr = ptr;
  534|      9|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  535|  6.16k|      }
  536|  6.16k|    }
  537|  2.27k|  }
  538|     10|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  7.28k|}
xmltok.c:normal_scanHexCharRef:
  483|  4.99k|                       const char **nextTokPtr) {
  484|  4.99k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  4.99k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  4.99k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  4.99k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 4.99k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  4.99k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  4.99k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  4.99k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  486|  1.41k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 1.41k, False: 3.57k]
  ------------------
  487|  4.98k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 3.56k, False: 1.42k]
  ------------------
  488|  4.98k|      break;
  489|      7|    default:
  ------------------
  |  Branch (489:5): [True: 7, False: 4.98k]
  ------------------
  490|      7|      *nextTokPtr = ptr;
  491|      7|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  492|  4.99k|    }
  493|  16.7k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  4.98k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  11.8k|#  define MINBPC(enc) 1
  ------------------
  494|  16.7k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  16.7k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  16.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  495|  3.70k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 3.70k, False: 13.0k]
  ------------------
  496|  11.8k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 8.10k, False: 8.67k]
  ------------------
  497|  11.8k|        break;
  498|  4.95k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 4.95k, False: 11.8k]
  ------------------
  499|  4.95k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  4.95k|#  define MINBPC(enc) 1
  ------------------
  500|  4.95k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  4.95k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|      8|      default:
  ------------------
  |  Branch (501:7): [True: 8, False: 16.7k]
  ------------------
  502|      8|        *nextTokPtr = ptr;
  503|      8|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  504|  16.7k|      }
  505|  16.7k|    }
  506|  4.98k|  }
  507|     17|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     17|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  4.99k|}
xmltok.c:normal_cdataSectionTok:
  356|   157k|                        const char **nextTokPtr) {
  357|   157k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 194, False: 157k]
  ------------------
  358|    194|    return XML_TOK_NONE;
  ------------------
  |  |   51|    194|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|   157k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  242|   157k|#  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|   157k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|   157k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   157k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  369|  25.8k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 25.8k, False: 131k]
  ------------------
  370|  25.8k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  25.8k|#  define MINBPC(enc) 1
  ------------------
  371|  25.8k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  25.8k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  25.8k|    {                                                                          \
  |  |  |  |  135|  25.8k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  25.8k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  25.8k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 25.8k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  25.8k|    }
  |  |  ------------------
  ------------------
  372|  25.8k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  300|  25.8k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (372:9): [True: 15.4k, False: 10.4k]
  ------------------
  373|  15.4k|      break;
  374|  10.4k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  10.4k|#  define MINBPC(enc) 1
  ------------------
  375|  10.4k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  10.4k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  10.4k|    {                                                                          \
  |  |  |  |  135|  10.4k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  10.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  10.4k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 10.4k]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|  10.4k|    }
  |  |  ------------------
  ------------------
  376|  10.4k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  300|  10.4k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (376:9): [True: 8.96k, False: 1.45k]
  ------------------
  377|  8.96k|      ptr -= MINBPC(enc);
  ------------------
  |  |  242|  8.96k|#  define MINBPC(enc) 1
  ------------------
  378|  8.96k|      break;
  379|  8.96k|    }
  380|  1.45k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  1.45k|#  define MINBPC(enc) 1
  ------------------
  381|  1.45k|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|  1.45k|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  3.40k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 3.40k, False: 154k]
  ------------------
  383|  3.40k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  3.40k|#  define MINBPC(enc) 1
  ------------------
  384|  3.40k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.40k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.40k|    {                                                                          \
  |  |  |  |  135|  3.40k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.40k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  242|  3.40k|#  define MINBPC(enc) 1
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 11, False: 3.39k]
  |  |  |  |  ------------------
  |  |  |  |  136|     11|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     11|      }                                                                        \
  |  |  |  |  138|  3.40k|    }
  |  |  ------------------
  ------------------
  385|  3.39k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|  3.39k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  3.39k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 345, False: 3.04k]
  ------------------
  386|    345|      ptr += MINBPC(enc);
  ------------------
  |  |  242|    345|#  define MINBPC(enc) 1
  ------------------
  387|  3.39k|    *nextTokPtr = ptr;
  388|  3.39k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  3.39k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  70.0k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 70.0k, False: 87.3k]
  ------------------
  390|  70.0k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  70.0k|#  define MINBPC(enc) 1
  ------------------
  391|  70.0k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  70.0k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|   101k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|  2.32k|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  2.31k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 2.32k, False: 155k]
  |  |  |  |  ------------------
  |  |  |  |   50|  2.32k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 2.32k]
  |  |  |  |  ------------------
  |  |  |  |   51|  2.31k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  2.32k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  2.32k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  2.32k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 8, False: 2.31k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      8|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      8|    }                                                                          \
  |  |  |  |   56|  2.32k|    ptr += n;                                                                  \
  |  |  |  |   57|  2.31k|    break;
  |  |  ------------------
  |  |   61|  10.3k|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  10.3k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 10.3k, False: 147k]
  |  |  |  |  ------------------
  |  |  |  |   50|  10.3k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 10.3k]
  |  |  |  |  ------------------
  |  |  |  |   51|  10.3k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  10.3k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  10.3k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  10.3k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 7, False: 10.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      7|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      7|    }                                                                          \
  |  |  |  |   56|  10.3k|    ptr += n;                                                                  \
  |  |  |  |   57|  10.3k|    break;
  |  |  ------------------
  |  |   62|  37.9k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  37.9k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 37.9k, False: 119k]
  |  |  |  |  ------------------
  |  |  |  |   50|  37.9k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 2, False: 37.9k]
  |  |  |  |  ------------------
  |  |  |  |   51|  37.9k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      2|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  37.9k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |  277|  37.9k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  206|  37.9k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (277:5): [True: 5, False: 37.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      5|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      5|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      5|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      5|    }                                                                          \
  |  |  |  |   56|  37.9k|    ptr += n;                                                                  \
  |  |  |  |   57|  37.9k|    break;
  |  |  ------------------
  |  |   63|  37.9k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 20, False: 157k]
  |  |  ------------------
  |  |   64|     22|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 2, False: 157k]
  |  |  ------------------
  |  |   65|     25|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 3, False: 157k]
  |  |  ------------------
  |  |   66|     25|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     25|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     25|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  7.39k|  default:
  ------------------
  |  Branch (393:3): [True: 7.39k, False: 150k]
  ------------------
  394|  7.39k|    ptr += MINBPC(enc);
  ------------------
  |  |  242|  7.39k|#  define MINBPC(enc) 1
  ------------------
  395|  7.39k|    break;
  396|   157k|  }
  397|  8.71M|  while (HAS_CHAR(enc, ptr, end)) {
  398|  8.71M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  8.71M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  8.71M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  399|      0|#  define LEAD_CASE(n)                                                         \
  400|      0|  case BT_LEAD##n:                                                             \
  401|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  402|      0|      *nextTokPtr = ptr;                                                       \
  403|      0|      return XML_TOK_DATA_CHARS;                                               \
  404|      0|    }                                                                          \
  405|      0|    ptr += n;                                                                  \
  406|      0|    break;
  407|  60.2k|      LEAD_CASE(2)
  ------------------
  |  |  400|  60.2k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 60.2k, False: 8.64M]
  |  |  ------------------
  |  |  401|  60.2k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  60.2k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  60.2k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 5, False: 60.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 1, False: 60.2k]
  |  |  ------------------
  |  |  402|      6|      *nextTokPtr = ptr;                                                       \
  |  |  403|      6|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      6|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      6|    }                                                                          \
  |  |  405|  60.2k|    ptr += n;                                                                  \
  |  |  406|  60.2k|    break;
  ------------------
  408|  8.42M|      LEAD_CASE(3)
  ------------------
  |  |  400|  8.42M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 8.42M, False: 286k]
  |  |  ------------------
  |  |  401|  8.42M|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  8.42M|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  8.42M|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 5, False: 8.42M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 1, False: 8.42M]
  |  |  ------------------
  |  |  402|      6|      *nextTokPtr = ptr;                                                       \
  |  |  403|      6|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      6|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      6|    }                                                                          \
  |  |  405|  8.42M|    ptr += n;                                                                  \
  |  |  406|  8.42M|    break;
  ------------------
  409|  44.7k|      LEAD_CASE(4)
  ------------------
  |  |  400|  44.7k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 44.7k, False: 8.66M]
  |  |  ------------------
  |  |  401|  44.7k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |  277|  44.7k|    (AS_NORMAL_ENCODING(enc)->isInvalid##n(enc, p))
  |  |  |  |  ------------------
  |  |  |  |  |  |  206|  44.7k|#define AS_NORMAL_ENCODING(enc) ((const struct normal_encoding *)(enc))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (277:5): [True: 3, False: 44.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 1, False: 44.7k]
  |  |  ------------------
  |  |  402|      4|      *nextTokPtr = ptr;                                                       \
  |  |  403|      4|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      4|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      4|    }                                                                          \
  |  |  405|  44.7k|    ptr += n;                                                                  \
  |  |  406|  44.7k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|     13|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 13, False: 8.71M]
  ------------------
  412|     14|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 1, False: 8.71M]
  ------------------
  413|     16|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 2, False: 8.71M]
  ------------------
  414|  1.82k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 1.80k, False: 8.70M]
  ------------------
  415|  64.8k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 63.0k, False: 8.64M]
  ------------------
  416|  82.2k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 17.4k, False: 8.69M]
  ------------------
  417|  82.2k|      *nextTokPtr = ptr;
  418|  82.2k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  82.2k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|  99.5k|    default:
  ------------------
  |  Branch (419:5): [True: 99.5k, False: 8.61M]
  ------------------
  420|  99.5k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  99.5k|#  define MINBPC(enc) 1
  ------------------
  421|  99.5k|      break;
  422|  8.71M|    }
  423|  8.71M|  }
  424|    163|  *nextTokPtr = ptr;
  425|    163|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    163|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  82.4k|}
xmltok.c:normal_attributeValueTok:
 1262|  99.9M|                          const char **nextTokPtr) {
 1263|  99.9M|  const char *start;
 1264|  99.9M|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 2.13M, False: 97.7M]
  ------------------
 1265|  2.13M|    return XML_TOK_NONE;
  ------------------
  |  |   51|  2.13M|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|  97.7M|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  97.7M|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  97.7M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|  97.7M|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 97.7M]
  ------------------
 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|  97.7M|  start = ptr;
 1275|  1.19G|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  1.19G|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  1.19G|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  1.19G|  (((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|  6.60M|      LEAD_CASE(2)
  ------------------
  |  | 1278|  6.60M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 6.60M, False: 1.19G]
  |  |  ------------------
  |  | 1279|  6.60M|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  6.60M|    break;
  ------------------
 1282|   815M|      LEAD_CASE(3)
  ------------------
  |  | 1278|   815M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 815M, False: 382M]
  |  |  ------------------
  |  | 1279|   815M|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|   815M|    break;
  ------------------
 1283|  53.8M|      LEAD_CASE(4)
  ------------------
  |  | 1278|  53.8M|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 53.8M, False: 1.14G]
  |  |  ------------------
  |  | 1279|  53.8M|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  53.8M|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|  4.48M|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 4.48M, False: 1.19G]
  ------------------
 1286|  4.48M|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 3.05M, False: 1.42M]
  ------------------
 1287|  3.05M|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  3.05M|#define PREFIX(ident) normal_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  3.05M|#  define MINBPC(enc) 1
  ------------------
 1288|  1.42M|      *nextTokPtr = ptr;
 1289|  1.42M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.42M|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      4|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 4, False: 1.19G]
  ------------------
 1291|       |      /* this is for inside entity references */
 1292|      4|      *nextTokPtr = ptr;
 1293|      4|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
 1294|  82.2M|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 82.2M, False: 1.11G]
  ------------------
 1295|  82.2M|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 60.9M, False: 21.2M]
  ------------------
 1296|  60.9M|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  60.9M|#  define MINBPC(enc) 1
  ------------------
 1297|  60.9M|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  60.9M|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|  60.9M|      }
 1299|  21.2M|      *nextTokPtr = ptr;
 1300|  21.2M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  21.2M|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|   993k|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 993k, False: 1.19G]
  ------------------
 1302|   993k|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 583k, False: 410k]
  ------------------
 1303|   583k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   583k|#  define MINBPC(enc) 1
  ------------------
 1304|   583k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   583k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   583k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   583k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 959, False: 582k]
  ------------------
 1305|    959|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    959|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|   582k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|   582k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   582k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 64.3k, False: 517k]
  ------------------
 1307|  64.3k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  64.3k|#  define MINBPC(enc) 1
  ------------------
 1308|   582k|        *nextTokPtr = ptr;
 1309|   582k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   582k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|   583k|      }
 1311|   410k|      *nextTokPtr = ptr;
 1312|   410k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|   410k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  8.27M|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 8.27M, False: 1.18G]
  ------------------
 1314|  8.27M|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 5.81M, False: 2.46M]
  ------------------
 1315|  5.81M|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  5.81M|#  define MINBPC(enc) 1
  ------------------
 1316|  5.81M|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  5.81M|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  5.81M|      }
 1318|  2.46M|      *nextTokPtr = ptr;
 1319|  2.46M|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.46M|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|   225M|    default:
  ------------------
  |  Branch (1320:5): [True: 225M, False: 971M]
  ------------------
 1321|   225M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   225M|#  define MINBPC(enc) 1
  ------------------
 1322|   225M|      break;
 1323|  1.19G|    }
 1324|  1.19G|  }
 1325|  1.76M|  *nextTokPtr = ptr;
 1326|  1.76M|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.76M|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|  97.7M|}
xmltok.c:normal_entityValueTok:
 1331|   751k|                       const char **nextTokPtr) {
 1332|   751k|  const char *start;
 1333|   751k|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 4.52k, False: 747k]
  ------------------
 1334|  4.52k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  4.52k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|   747k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   747k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   747k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   747k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 747k]
  ------------------
 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|   747k|  start = ptr;
 1344|  11.2M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  11.2M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  11.2M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  11.2M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1346|      0|#  define LEAD_CASE(n)                                                         \
 1347|      0|  case BT_LEAD##n:                                                             \
 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1349|      0|    break;
 1350|    508|      LEAD_CASE(2)
  ------------------
  |  | 1347|    508|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 508, False: 11.2M]
  |  |  ------------------
  |  | 1348|    508|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|    508|    break;
  ------------------
 1351|    570|      LEAD_CASE(3)
  ------------------
  |  | 1347|    570|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 570, False: 11.2M]
  |  |  ------------------
  |  | 1348|    570|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|    570|    break;
  ------------------
 1352|    356|      LEAD_CASE(4)
  ------------------
  |  | 1347|    356|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 356, False: 11.2M]
  |  |  ------------------
  |  | 1348|    356|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|    356|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  9.06k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 9.06k, False: 11.2M]
  ------------------
 1355|  9.06k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 7.85k, False: 1.21k]
  ------------------
 1356|  7.85k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|  7.85k|#define PREFIX(ident) normal_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|  7.85k|#  define MINBPC(enc) 1
  ------------------
 1357|  1.21k|      *nextTokPtr = ptr;
 1358|  1.21k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.21k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      5|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 5, False: 11.2M]
  ------------------
 1360|      5|      if (ptr == start) {
  ------------------
  |  Branch (1360:11): [True: 4, False: 1]
  ------------------
 1361|      4|        int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  303|      4|#define PREFIX(ident) normal_##ident
  ------------------
                      int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  242|      4|#  define MINBPC(enc) 1
  ------------------
 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|      1|      *nextTokPtr = ptr;
 1365|      1|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|      1|#define XML_TOK_DATA_CHARS 6
  ------------------
 1366|  9.16k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 9.16k, False: 11.2M]
  ------------------
 1367|  9.16k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 6.15k, False: 3.01k]
  ------------------
 1368|  6.15k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  6.15k|#  define MINBPC(enc) 1
  ------------------
 1369|  6.15k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  6.15k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|  6.15k|      }
 1371|  3.01k|      *nextTokPtr = ptr;
 1372|  3.01k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  3.01k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|   727k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 727k, False: 10.5M]
  ------------------
 1374|   727k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 650k, False: 77.2k]
  ------------------
 1375|   650k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   650k|#  define MINBPC(enc) 1
  ------------------
 1376|   650k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|   650k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   650k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   650k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 282, False: 649k]
  ------------------
 1377|    282|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    282|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|   649k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|   649k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   649k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 19.6k, False: 630k]
  ------------------
 1379|  19.6k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  19.6k|#  define MINBPC(enc) 1
  ------------------
 1380|   649k|        *nextTokPtr = ptr;
 1381|   649k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|   649k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|   650k|      }
 1383|  77.2k|      *nextTokPtr = ptr;
 1384|  77.2k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  77.2k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  10.4M|    default:
  ------------------
  |  Branch (1385:5): [True: 10.4M, False: 746k]
  ------------------
 1386|  10.4M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  10.4M|#  define MINBPC(enc) 1
  ------------------
 1387|  10.4M|      break;
 1388|  11.2M|    }
 1389|  11.2M|  }
 1390|  1.53k|  *nextTokPtr = ptr;
 1391|  1.53k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.53k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|   747k|}
xmltok.c:normal_nameMatchesAscii:
 1715|  81.4k|                         const char *end1, const char *ptr2) {
 1716|  81.4k|  UNUSED_P(enc);
  ------------------
  |  |  135|  81.4k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|   356k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  242|   274k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1717:10): [True: 311k, False: 44.3k]
  ------------------
 1718|   311k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  242|   311k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1718:9): [True: 43, False: 311k]
  ------------------
 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|     43|      return 0; /* LCOV_EXCL_LINE */
 1725|     43|    }
 1726|   311k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  300|   311k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (1726:9): [True: 37.0k, False: 274k]
  ------------------
 1727|  37.0k|      return 0;
 1728|   311k|  }
 1729|  44.3k|  return ptr1 == end1;
 1730|  81.4k|}
xmltok.c:normal_nameLength:
 1733|  3.57M|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  3.57M|  const char *start = ptr;
 1735|  8.92M|  for (;;) {
 1736|  8.92M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  8.92M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  8.92M|  (((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|  4.38k|      LEAD_CASE(2)
  ------------------
  |  | 1738|  4.38k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 4.38k, False: 8.92M]
  |  |  ------------------
  |  | 1739|  4.38k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|  4.38k|    break;
  ------------------
 1742|   728k|      LEAD_CASE(3)
  ------------------
  |  | 1738|   728k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 728k, False: 8.19M]
  |  |  ------------------
  |  | 1739|   728k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|   728k|    break;
  ------------------
 1743|      0|      LEAD_CASE(4)
  ------------------
  |  | 1738|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1738:3): [True: 0, False: 8.92M]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1744|      0|#  undef LEAD_CASE
 1745|      0|    case BT_NONASCII:
  ------------------
  |  Branch (1745:5): [True: 0, False: 8.92M]
  ------------------
 1746|  4.26M|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 4.26M, False: 4.65M]
  ------------------
 1747|  4.26M|#  ifdef XML_NS
 1748|  4.26M|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 8.92M]
  ------------------
 1749|  4.26M|#  endif
 1750|  4.58M|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 312k, False: 8.61M]
  ------------------
 1751|  4.60M|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 21.0k, False: 8.90M]
  ------------------
 1752|  4.60M|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 342, False: 8.92M]
  ------------------
 1753|  4.62M|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 21.2k, False: 8.90M]
  ------------------
 1754|  4.62M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  4.62M|#  define MINBPC(enc) 1
  ------------------
 1755|  4.62M|      break;
 1756|  3.57M|    default:
  ------------------
  |  Branch (1756:5): [True: 3.57M, False: 5.35M]
  ------------------
 1757|  3.57M|      return (int)(ptr - start);
 1758|  8.92M|    }
 1759|  8.92M|  }
 1760|  3.57M|}
xmltok.c:normal_getAtts:
 1510|  3.40M|                ATTRIBUTE *atts) {
 1511|  3.40M|  enum { other, inName, inValue } state = inName;
 1512|  3.40M|  int nAtts = 0;
 1513|  3.40M|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  53.9M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  3.40M|#  define MINBPC(enc) 1
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  50.4M|#  define MINBPC(enc) 1
  ------------------
 1517|  53.9M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  53.9M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  53.9M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1518|      0|#  define START_NAME                                                           \
 1519|      0|    if (state == other) {                                                      \
 1520|      0|      if (nAtts < attsMax) {                                                   \
 1521|      0|        atts[nAtts].name = ptr;                                                \
 1522|      0|        atts[nAtts].normalized = 1;                                            \
 1523|      0|      }                                                                        \
 1524|      0|      state = inName;                                                          \
 1525|      0|    }
 1526|      0|#  define LEAD_CASE(n)                                                         \
 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
 1529|      0|    break;
 1530|  1.69M|      LEAD_CASE(2)
  ------------------
  |  | 1527|  1.69M|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 1.69M, False: 52.2M]
  |  |  ------------------
  |  | 1528|  1.69M|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  1.69M|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 1.02M, False: 675k]
  |  |  |  |  ------------------
  |  |  |  | 1520|  1.02M|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 512k, False: 511k]
  |  |  |  |  ------------------
  |  |  |  | 1521|   512k|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|   512k|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|   512k|      }                                                                        \
  |  |  |  | 1524|  1.02M|      state = inName;                                                          \
  |  |  |  | 1525|  1.02M|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  242|  1.69M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|  1.69M|    break;
  ------------------
 1531|  6.03M|      LEAD_CASE(3)
  ------------------
  |  | 1527|  6.03M|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 6.03M, False: 47.8M]
  |  |  ------------------
  |  | 1528|  6.03M|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  6.03M|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 7.98k, False: 6.02M]
  |  |  |  |  ------------------
  |  |  |  | 1520|  7.98k|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 4.40k, False: 3.57k]
  |  |  |  |  ------------------
  |  |  |  | 1521|  4.40k|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|  4.40k|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|  4.40k|      }                                                                        \
  |  |  |  | 1524|  7.98k|      state = inName;                                                          \
  |  |  |  | 1525|  7.98k|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  242|  6.03M|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|  6.03M|    break;
  ------------------
 1532|  3.80k|      LEAD_CASE(4)
  ------------------
  |  | 1527|  3.80k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 3.80k, False: 53.8M]
  |  |  ------------------
  |  | 1528|  3.80k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|  3.80k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 3.80k]
  |  |  |  |  ------------------
  |  |  |  | 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|  3.80k|#  define MINBPC(enc) 1
  |  |  ------------------
  |  | 1529|  3.80k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|      0|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 0, False: 53.9M]
  ------------------
 1535|  15.2M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 15.2M, False: 38.6M]
  ------------------
 1536|  16.7M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 1.45M, False: 52.4M]
  ------------------
 1537|  16.7M|      START_NAME
  ------------------
  |  | 1519|  16.7M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 4.47M, False: 12.2M]
  |  |  ------------------
  |  | 1520|  4.47M|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 2.24M, False: 2.22M]
  |  |  ------------------
  |  | 1521|  2.24M|        atts[nAtts].name = ptr;                                                \
  |  | 1522|  2.24M|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|  2.24M|      }                                                                        \
  |  | 1524|  4.47M|      state = inName;                                                          \
  |  | 1525|  4.47M|    }
  ------------------
 1538|  16.7M|      break;
 1539|      0|#  undef START_NAME
 1540|   138k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 138k, False: 53.7M]
  ------------------
 1541|   138k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 31.2k, False: 107k]
  ------------------
 1542|  31.2k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 24.0k, False: 7.23k]
  ------------------
 1543|  24.0k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  24.0k|#  define MINBPC(enc) 1
  ------------------
 1544|  31.2k|        state = inValue;
 1545|  31.2k|        open = BT_QUOT;
 1546|   107k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 31.2k, False: 76.2k]
  ------------------
 1547|  31.2k|        state = other;
 1548|  31.2k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 24.0k, False: 7.23k]
  ------------------
 1549|  24.0k|          atts[nAtts].valueEnd = ptr;
 1550|  31.2k|        nAtts++;
 1551|  31.2k|      }
 1552|   138k|      break;
 1553|  11.0M|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 11.0M, False: 42.8M]
  ------------------
 1554|  11.0M|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 5.47M, False: 5.54M]
  ------------------
 1555|  5.47M|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 2.74M, False: 2.73M]
  ------------------
 1556|  2.74M|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  242|  2.74M|#  define MINBPC(enc) 1
  ------------------
 1557|  5.47M|        state = inValue;
 1558|  5.47M|        open = BT_APOS;
 1559|  5.54M|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 5.47M, False: 63.0k]
  ------------------
 1560|  5.47M|        state = other;
 1561|  5.47M|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 2.74M, False: 2.73M]
  ------------------
 1562|  2.74M|          atts[nAtts].valueEnd = ptr;
 1563|  5.47M|        nAtts++;
 1564|  5.47M|      }
 1565|  11.0M|      break;
 1566|  12.8k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 12.8k, False: 53.8M]
  ------------------
 1567|  12.8k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 12.1k, False: 684]
  ------------------
 1568|  12.1k|        atts[nAtts].normalized = 0;
 1569|  12.8k|      break;
 1570|   549k|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 549k, False: 53.3M]
  ------------------
 1571|   549k|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 12.5k, False: 536k]
  ------------------
 1572|  12.5k|        state = other;
 1573|   536k|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 67.8k, False: 468k]
  |  Branch (1573:36): [True: 48.5k, False: 19.3k]
  |  Branch (1573:55): [True: 21.1k, False: 27.3k]
  ------------------
 1574|   536k|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 1.07k, False: 20.1k]
  ------------------
 1575|  21.1k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  266|  20.1k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|  41.3k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 296, False: 19.8k]
  ------------------
 1576|  21.1k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  266|  19.8k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|  41.0k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 249, False: 19.5k]
  ------------------
 1577|  21.1k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  255|  19.5k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  19.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 278, False: 19.2k]
  ------------------
 1578|  1.89k|        atts[nAtts].normalized = 0;
 1579|   549k|      break;
 1580|  6.36M|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 6.36M, False: 47.5M]
  ------------------
 1581|  6.80M|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 440k, False: 53.4M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|  6.80M|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 3.31k, False: 6.79M]
  ------------------
 1585|  3.31k|        state = other;
 1586|  6.79M|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 999k, False: 5.79M]
  |  Branch (1586:36): [True: 991k, False: 8.82k]
  ------------------
 1587|   991k|        atts[nAtts].normalized = 0;
 1588|  6.80M|      break;
 1589|  3.40M|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 3.40M, False: 50.5M]
  ------------------
 1590|  3.43M|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 36.0k, False: 53.8M]
  ------------------
 1591|  3.43M|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 3.40M, False: 32.5k]
  ------------------
 1592|  3.40M|        return nAtts;
 1593|  32.5k|      break;
 1594|  7.48M|    default:
  ------------------
  |  Branch (1594:5): [True: 7.48M, False: 46.4M]
  ------------------
 1595|  7.48M|      break;
 1596|  53.9M|    }
 1597|  53.9M|  }
 1598|       |  /* not reached */
 1599|  3.40M|}
xmltok.c:normal_charRefNumber:
 1602|  5.31k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  5.31k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  5.31k|  UNUSED_P(enc);
  ------------------
  |  |  135|  5.31k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  5.31k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  242|  5.31k|#  define MINBPC(enc) 1
  ------------------
 1607|  5.31k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  300|  5.31k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 3.59k, False: 1.72k]
  |  |  ------------------
  ------------------
 1608|  15.8k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  242|  3.59k|#  define MINBPC(enc) 1
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  300|  15.8k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
  |  Branch (1608:30): [True: 12.3k, False: 3.55k]
  ------------------
 1609|  12.3k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  12.2k|#  define MINBPC(enc) 1
  ------------------
 1610|  12.3k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  266|  12.3k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1611|  12.3k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 12.3k]
  ------------------
 1612|    520|      case ASCII_0:
  ------------------
  |  |   90|    520|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 520, False: 11.8k]
  ------------------
 1613|    950|      case ASCII_1:
  ------------------
  |  |   91|    950|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 430, False: 11.8k]
  ------------------
 1614|  1.21k|      case ASCII_2:
  ------------------
  |  |   92|  1.21k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 262, False: 12.0k]
  ------------------
 1615|  1.61k|      case ASCII_3:
  ------------------
  |  |   93|  1.61k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 404, False: 11.9k]
  ------------------
 1616|  2.11k|      case ASCII_4:
  ------------------
  |  |   94|  2.11k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 496, False: 11.8k]
  ------------------
 1617|  2.56k|      case ASCII_5:
  ------------------
  |  |   95|  2.56k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 457, False: 11.8k]
  ------------------
 1618|  2.84k|      case ASCII_6:
  ------------------
  |  |   96|  2.84k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 279, False: 12.0k]
  ------------------
 1619|  3.17k|      case ASCII_7:
  ------------------
  |  |   97|  3.17k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 330, False: 11.9k]
  ------------------
 1620|  3.82k|      case ASCII_8:
  ------------------
  |  |   98|  3.82k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 646, False: 11.6k]
  ------------------
 1621|  4.20k|      case ASCII_9:
  ------------------
  |  |   99|  4.20k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 385, False: 11.9k]
  ------------------
 1622|  4.20k|        result <<= 4;
 1623|  4.20k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  4.20k|#define ASCII_0 0x30
  ------------------
 1624|  4.20k|        break;
 1625|    661|      case ASCII_A:
  ------------------
  |  |   36|    661|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 661, False: 11.6k]
  ------------------
 1626|  1.16k|      case ASCII_B:
  ------------------
  |  |   37|  1.16k|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 504, False: 11.8k]
  ------------------
 1627|  1.54k|      case ASCII_C:
  ------------------
  |  |   38|  1.54k|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 384, False: 11.9k]
  ------------------
 1628|  2.11k|      case ASCII_D:
  ------------------
  |  |   39|  2.11k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 564, False: 11.7k]
  ------------------
 1629|  4.16k|      case ASCII_E:
  ------------------
  |  |   40|  4.16k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 2.05k, False: 10.2k]
  ------------------
 1630|  5.55k|      case ASCII_F:
  ------------------
  |  |   41|  5.55k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 1.39k, False: 10.9k]
  ------------------
 1631|  5.55k|        result <<= 4;
 1632|  5.55k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  5.55k|#define ASCII_A 0x41
  ------------------
 1633|  5.55k|        break;
 1634|    356|      case ASCII_a:
  ------------------
  |  |   63|    356|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 356, False: 11.9k]
  ------------------
 1635|    635|      case ASCII_b:
  ------------------
  |  |   64|    635|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 279, False: 12.0k]
  ------------------
 1636|    967|      case ASCII_c:
  ------------------
  |  |   65|    967|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 332, False: 11.9k]
  ------------------
 1637|  1.36k|      case ASCII_d:
  ------------------
  |  |   66|  1.36k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 397, False: 11.9k]
  ------------------
 1638|  1.60k|      case ASCII_e:
  ------------------
  |  |   67|  1.60k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 237, False: 12.0k]
  ------------------
 1639|  2.55k|      case ASCII_f:
  ------------------
  |  |   68|  2.55k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 956, False: 11.3k]
  ------------------
 1640|  2.55k|        result <<= 4;
 1641|  2.55k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  2.55k|#define ASCII_a 0x61
  ------------------
 1642|  2.55k|        break;
 1643|  12.3k|      }
 1644|  12.3k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 36, False: 12.2k]
  ------------------
 1645|     36|        return -1;
 1646|  12.3k|    }
 1647|  3.59k|  } else {
 1648|  6.29k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  300|  6.29k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  4.57k|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1648:12): [True: 4.58k, False: 1.71k]
  ------------------
 1649|  4.58k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  266|  4.58k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1650|  4.58k|      result *= 10;
 1651|  4.58k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  4.58k|#define ASCII_0 0x30
  ------------------
 1652|  4.58k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 9, False: 4.57k]
  ------------------
 1653|      9|        return -1;
 1654|  4.58k|    }
 1655|  1.72k|  }
 1656|  5.27k|  return checkCharRefNumber(result);
 1657|  5.31k|}
xmltok.c:normal_predefinedEntityName:
 1661|  3.94M|                             const char *end) {
 1662|  3.94M|  UNUSED_P(enc);
  ------------------
  |  |  135|  3.94M|#  define UNUSED_P(p) (void)p
  ------------------
 1663|  3.94M|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  242|  3.94M|#  define MINBPC(enc) 1
  ------------------
  |  Branch (1663:11): [True: 2.90M, False: 1.03M]
  ------------------
 1664|  39.5k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 39.5k, False: 3.90M]
  ------------------
 1665|  39.5k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  300|  39.5k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 38.7k, False: 766]
  |  |  ------------------
  ------------------
 1666|  38.7k|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|  38.7k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  |  |  ------------------
  |  |  |  Branch (266:33): [True: 3, False: 38.7k]
  |  |  ------------------
  ------------------
 1667|  38.4k|      case ASCII_l:
  ------------------
  |  |   74|  38.4k|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 38.4k, False: 335]
  ------------------
 1668|  38.4k|        return ASCII_LT;
  ------------------
  |  |  111|  38.4k|#define ASCII_LT 0x3C
  ------------------
 1669|    332|      case ASCII_g:
  ------------------
  |  |   69|    332|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 332, False: 38.4k]
  ------------------
 1670|    332|        return ASCII_GT;
  ------------------
  |  |  113|    332|#define ASCII_GT 0x3E
  ------------------
 1671|  38.7k|      }
 1672|  38.7k|    }
 1673|    769|    break;
 1674|  1.31k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.31k, False: 3.94M]
  ------------------
 1675|  1.31k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  300|  1.31k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 720, False: 590]
  |  |  ------------------
  ------------------
 1676|    720|      ptr += MINBPC(enc);
  ------------------
  |  |  242|    720|#  define MINBPC(enc) 1
  ------------------
 1677|    720|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  300|    720|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 513, False: 207]
  |  |  ------------------
  ------------------
 1678|    513|        ptr += MINBPC(enc);
  ------------------
  |  |  242|    513|#  define MINBPC(enc) 1
  ------------------
 1679|    513|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  300|    513|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 301, False: 212]
  |  |  ------------------
  ------------------
 1680|    301|          return ASCII_AMP;
  ------------------
  |  |  105|    301|#define ASCII_AMP 0x26
  ------------------
 1681|    513|      }
 1682|    720|    }
 1683|  1.00k|    break;
 1684|   993k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 993k, False: 2.95M]
  ------------------
 1685|   993k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|   993k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  |  |  ------------------
  |  |  |  Branch (266:33): [True: 389, False: 993k]
  |  |  ------------------
  ------------------
 1686|   986k|    case ASCII_q:
  ------------------
  |  |   79|   986k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 986k, False: 7.18k]
  ------------------
 1687|   986k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   986k|#  define MINBPC(enc) 1
  ------------------
 1688|   986k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  300|   986k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 985k, False: 335]
  |  |  ------------------
  ------------------
 1689|   985k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|   985k|#  define MINBPC(enc) 1
  ------------------
 1690|   985k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  300|   985k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 985k, False: 240]
  |  |  ------------------
  ------------------
 1691|   985k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|   985k|#  define MINBPC(enc) 1
  ------------------
 1692|   985k|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  300|   985k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 985k, False: 202]
  |  |  ------------------
  ------------------
 1693|   985k|            return ASCII_QUOT;
  ------------------
  |  |  104|   985k|#define ASCII_QUOT 0x22
  ------------------
 1694|   985k|        }
 1695|   985k|      }
 1696|    777|      break;
 1697|  6.79k|    case ASCII_a:
  ------------------
  |  |   63|  6.79k|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 6.79k, False: 986k]
  ------------------
 1698|  6.79k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  6.79k|#  define MINBPC(enc) 1
  ------------------
 1699|  6.79k|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  300|  6.79k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 6.59k, False: 204]
  |  |  ------------------
  ------------------
 1700|  6.59k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  6.59k|#  define MINBPC(enc) 1
  ------------------
 1701|  6.59k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  300|  6.59k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 6.24k, False: 354]
  |  |  ------------------
  ------------------
 1702|  6.24k|          ptr += MINBPC(enc);
  ------------------
  |  |  242|  6.24k|#  define MINBPC(enc) 1
  ------------------
 1703|  6.24k|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  300|  6.24k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 6.03k, False: 210]
  |  |  ------------------
  ------------------
 1704|  6.03k|            return ASCII_APOS;
  ------------------
  |  |  106|  6.03k|#define ASCII_APOS 0x27
  ------------------
 1705|  6.24k|        }
 1706|  6.59k|      }
 1707|    768|      break;
 1708|   993k|    }
 1709|  3.94M|  }
 1710|  2.91M|  return 0;
 1711|  3.94M|}
xmltok.c:normal_updatePosition:
 1779|  4.85k|                       POSITION *pos) {
 1780|  6.70M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  6.70M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  6.70M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  6.70M|  (((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.66k|      LEAD_CASE(2)
  ------------------
  |  | 1783|  1.66k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 1.66k, False: 6.70M]
  |  |  ------------------
  |  | 1784|  1.66k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  1.66k|    pos->columnNumber++;                                                       \
  |  | 1786|  1.66k|    break;
  ------------------
 1788|  2.15k|      LEAD_CASE(3)
  ------------------
  |  | 1783|  2.15k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 2.15k, False: 6.70M]
  |  |  ------------------
  |  | 1784|  2.15k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  2.15k|    pos->columnNumber++;                                                       \
  |  | 1786|  2.15k|    break;
  ------------------
 1789|    771|      LEAD_CASE(4)
  ------------------
  |  | 1783|    771|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 771, False: 6.70M]
  |  |  ------------------
  |  | 1784|    771|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|    771|    pos->columnNumber++;                                                       \
  |  | 1786|    771|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|   156k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 156k, False: 6.55M]
  ------------------
 1792|   156k|      pos->columnNumber = 0;
 1793|   156k|      pos->lineNumber++;
 1794|   156k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   156k|#  define MINBPC(enc) 1
  ------------------
 1795|   156k|      break;
 1796|   707k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 707k, False: 6.00M]
  ------------------
 1797|   707k|      pos->lineNumber++;
 1798|   707k|      ptr += MINBPC(enc);
  ------------------
  |  |  242|   707k|#  define MINBPC(enc) 1
  ------------------
 1799|   707k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|   707k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.41M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|   707k|#  define MINBPC(enc) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 707k, False: 85]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  255|   707k|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|   707k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 40.8k, False: 666k]
  ------------------
 1800|  40.8k|        ptr += MINBPC(enc);
  ------------------
  |  |  242|  40.8k|#  define MINBPC(enc) 1
  ------------------
 1801|   707k|      pos->columnNumber = 0;
 1802|   707k|      break;
 1803|  5.84M|    default:
  ------------------
  |  Branch (1803:5): [True: 5.84M, False: 868k]
  ------------------
 1804|  5.84M|      ptr += MINBPC(enc);
  ------------------
  |  |  242|  5.84M|#  define MINBPC(enc) 1
  ------------------
 1805|  5.84M|      pos->columnNumber++;
 1806|  5.84M|      break;
 1807|  6.70M|    }
 1808|  6.70M|  }
 1809|  4.85k|}
xmltok.c:normal_isPublicId:
 1450|  2.24k|                   const char **badPtr) {
 1451|  2.24k|  ptr += MINBPC(enc);
  ------------------
  |  |  242|  2.24k|#  define MINBPC(enc) 1
  ------------------
 1452|  2.24k|  end -= MINBPC(enc);
  ------------------
  |  |  242|  2.24k|#  define MINBPC(enc) 1
  ------------------
 1453|  2.33M|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  242|  2.33M|#  define MINBPC(enc) 1
  ------------------
 1454|  2.33M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  255|  2.33M|#  define BYTE_TYPE(enc, p) SB_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  246|  2.33M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  ------------------
  ------------------
 1455|  7.85k|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 7.85k, False: 2.32M]
  ------------------
 1456|  2.31M|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 2.31M, False: 19.8k]
  ------------------
 1457|  2.31M|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 367, False: 2.32M]
  ------------------
 1458|  2.31M|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 617, False: 2.32M]
  ------------------
 1459|  2.31M|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 719, False: 2.32M]
  ------------------
 1460|  2.32M|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 250, False: 2.32M]
  ------------------
 1461|  2.32M|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 201, False: 2.32M]
  ------------------
 1462|  2.32M|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 255, False: 2.32M]
  ------------------
 1463|  2.32M|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 404, False: 2.32M]
  ------------------
 1464|  2.32M|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 231, False: 2.32M]
  ------------------
 1465|  2.32M|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 202, False: 2.32M]
  ------------------
 1466|  2.32M|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 1.30k, False: 2.32M]
  ------------------
 1467|  2.32M|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 391, False: 2.32M]
  ------------------
 1468|  2.32M|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 263, False: 2.32M]
  ------------------
 1469|  2.32M|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 198, False: 2.32M]
  ------------------
 1470|  2.32M|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 372, False: 2.32M]
  ------------------
 1471|  2.32M|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 460, False: 2.32M]
  ------------------
 1472|  2.32M|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 221, False: 2.32M]
  ------------------
 1473|  2.32M|#  ifdef XML_NS
 1474|  2.32M|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 2.33M]
  ------------------
 1475|  2.32M|#  endif
 1476|  2.32M|      break;
 1477|  1.26k|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 1.26k, False: 2.32M]
  ------------------
 1478|  1.26k|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  300|  1.26k|#  define CHAR_MATCHES(enc, p, c) (*(p) == (c))
  |  |  ------------------
  |  |  |  Branch (300:35): [True: 5, False: 1.25k]
  |  |  ------------------
  ------------------
 1479|      5|        *badPtr = ptr;
 1480|      5|        return 0;
 1481|      5|      }
 1482|  1.25k|      break;
 1483|  1.25k|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 275, False: 2.32M]
  ------------------
 1484|  3.81k|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 3.53k, False: 2.32M]
  ------------------
 1485|  3.81k|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  266|  3.81k|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
  |  Branch (1485:11): [True: 3.81k, False: 0]
  ------------------
 1486|  3.81k|        break;
 1487|       |      /* fall through */
 1488|    427|    default:
  ------------------
  |  Branch (1488:5): [True: 427, False: 2.32M]
  ------------------
 1489|    427|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  266|    427|#  define BYTE_TO_ASCII(enc, p) (*(p))
  ------------------
 1490|    213|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 213, False: 214]
  ------------------
 1491|    418|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 205, False: 222]
  ------------------
 1492|    418|        break;
 1493|      9|      default:
  ------------------
  |  Branch (1493:7): [True: 9, False: 418]
  ------------------
 1494|      9|        *badPtr = ptr;
 1495|      9|        return 0;
 1496|    427|      }
 1497|    418|      break;
 1498|  2.33M|    }
 1499|  2.33M|  }
 1500|  2.23k|  return 1;
 1501|  2.24k|}
xmltok.c:little2_prologTok:
 1018|   102k|                  const char **nextTokPtr) {
 1019|   102k|  int tok;
 1020|   102k|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 275, False: 102k]
  ------------------
 1021|    275|    return XML_TOK_NONE;
  ------------------
  |  |   51|    275|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|   102k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|   102k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|   102k|    size_t n = end - ptr;
 1024|   102k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|   102k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1024:9): [True: 33.3k, False: 69.1k]
  ------------------
 1025|  33.3k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  33.3k|#  define MINBPC(enc) 2
  ------------------
 1026|  33.3k|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 12, False: 33.3k]
  ------------------
 1027|     12|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     12|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|  33.3k|      end = ptr + n;
 1029|  33.3k|    }
 1030|   102k|  }
 1031|   102k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   102k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   102k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  98.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 98.7k, False: 3.72k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1032|    421|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 421, False: 102k]
  ------------------
 1033|    421|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    421|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    421|#  define MINBPC(enc) 2
  ------------------
 1034|  2.65k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 2.65k, False: 99.8k]
  ------------------
 1035|  2.65k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.65k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.65k|#  define MINBPC(enc) 2
  ------------------
 1036|  15.9k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 15.9k, False: 86.5k]
  ------------------
 1037|  15.9k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  15.9k|#  define MINBPC(enc) 2
  ------------------
 1038|  15.9k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  15.9k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  15.9k|    {                                                                          \
  |  |  |  |  135|  15.9k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  15.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  15.9k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 4, False: 15.9k]
  |  |  |  |  ------------------
  |  |  |  |  136|      4|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      4|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      4|      }                                                                        \
  |  |  |  |  138|  15.9k|    }
  |  |  ------------------
  ------------------
 1039|  15.9k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  15.9k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  15.9k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  14.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 5, False: 15.9k]
  |  |  |  |  |  Branch (737:4): [True: 14.1k, False: 1.74k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  8.72k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 8.72k, False: 7.20k]
  ------------------
 1041|  8.72k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  8.72k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  8.72k|#  define MINBPC(enc) 2
  ------------------
 1042|  3.33k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 3.33k, False: 12.5k]
  ------------------
 1043|  3.33k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  3.33k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  3.33k|#  define MINBPC(enc) 2
  ------------------
 1044|  1.47k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 1.47k, False: 14.4k]
  ------------------
 1045|  2.11k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 641, False: 15.2k]
  ------------------
 1046|  3.83k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 1.72k, False: 14.2k]
  ------------------
 1047|  3.83k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 0, False: 15.9k]
  ------------------
 1048|  3.83k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 0, False: 15.9k]
  ------------------
 1049|  3.85k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 22, False: 15.9k]
  ------------------
 1050|  3.85k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  783|  3.85k|#  define MINBPC(enc) 2
  ------------------
 1051|  3.85k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  3.85k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  15.9k|    }
 1053|      5|    *nextTokPtr = ptr;
 1054|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
 1055|  15.9k|  }
 1056|  4.07k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 4.07k, False: 98.4k]
  ------------------
 1057|  4.07k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  783|  4.07k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1057:9): [True: 66, False: 4.01k]
  ------------------
 1058|     66|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|     66|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|     66|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|     66|    }
 1062|       |    /* fall through */
 1063|  23.1k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 19.1k, False: 83.3k]
  ------------------
 1064|  27.8k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 4.65k, False: 97.8k]
  ------------------
 1065|  29.9k|    for (;;) {
 1066|  29.9k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  29.9k|#  define MINBPC(enc) 2
  ------------------
 1067|  29.9k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  29.9k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  29.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  29.9k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 118, False: 29.8k]
  ------------------
 1068|    118|        break;
 1069|  29.8k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  29.8k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  29.8k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  27.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 27.9k, False: 1.85k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1070|  1.15k|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 1.15k, False: 28.6k]
  ------------------
 1071|  1.73k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 577, False: 29.2k]
  ------------------
 1072|  1.73k|        break;
 1073|    416|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 416, False: 29.4k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|    416|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  783|    416|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1075:13): [True: 414, False: 2]
  ------------------
 1076|    414|          break;
 1077|       |        /* fall through */
 1078|  27.6k|      default:
  ------------------
  |  Branch (1078:7): [True: 27.6k, False: 2.15k]
  ------------------
 1079|  27.6k|        *nextTokPtr = ptr;
 1080|  27.6k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|  27.6k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|  29.8k|      }
 1082|  29.8k|    }
 1083|    118|    *nextTokPtr = ptr;
 1084|    118|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    118|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  1.34k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 1.34k, False: 101k]
  ------------------
 1086|  1.34k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.34k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.34k|#  define MINBPC(enc) 2
  ------------------
 1087|  3.02k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 3.02k, False: 99.4k]
  ------------------
 1088|  3.02k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  3.02k|#  define MINBPC(enc) 2
  ------------------
 1089|  3.02k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  3.02k|#define XML_TOK_COMMA 38
  ------------------
 1090|  1.27k|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 1.27k, False: 101k]
  ------------------
 1091|  1.27k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.27k|#  define MINBPC(enc) 2
  ------------------
 1092|  1.27k|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|  1.27k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|    777|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 777, False: 101k]
  ------------------
 1094|    777|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    777|#  define MINBPC(enc) 2
  ------------------
 1095|    777|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    777|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    777|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    777|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 1, False: 776]
  ------------------
 1096|      1|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      1|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|    776|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  787|    776|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    776|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 766, False: 10]
  |  |  |  |  |  Branch (739:52): [True: 43, False: 723]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1098|     43|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     43|    {                                                                          \
  |  |  135|     43|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     43|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|     43|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 42]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     43|    }
  ------------------
 1099|     42|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  787|     42|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|     42|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 21, False: 21]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 20]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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|     42|    }
 1104|    774|    *nextTokPtr = ptr;
 1105|    774|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|    774|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  7.25k|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 7.25k, False: 95.2k]
  ------------------
 1107|  7.25k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  7.25k|#  define MINBPC(enc) 2
  ------------------
 1108|  7.25k|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  7.25k|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|  5.02k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 5.02k, False: 97.4k]
  ------------------
 1110|  5.02k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  5.02k|#  define MINBPC(enc) 2
  ------------------
 1111|  5.02k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  5.02k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  5.02k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  5.02k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 7, False: 5.02k]
  ------------------
 1112|      7|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|      7|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|  5.02k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  5.02k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.02k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.99k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 37, False: 4.98k]
  |  |  |  |  |  Branch (737:4): [True: 4.99k, False: 29]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|    805|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 805, False: 4.21k]
  ------------------
 1115|    805|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    805|#  define MINBPC(enc) 2
  ------------------
 1116|    805|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|    805|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|    215|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 215, False: 4.80k]
  ------------------
 1118|    215|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    215|#  define MINBPC(enc) 2
  ------------------
 1119|    215|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|    215|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|    397|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 397, False: 4.62k]
  ------------------
 1121|    397|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    397|#  define MINBPC(enc) 2
  ------------------
 1122|    397|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|    397|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|    303|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 303, False: 4.71k]
  ------------------
 1124|    697|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 394, False: 4.62k]
  ------------------
 1125|  1.01k|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 321, False: 4.69k]
  ------------------
 1126|  2.02k|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 1.00k, False: 4.01k]
  ------------------
 1127|  2.39k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 374, False: 4.64k]
  ------------------
 1128|  2.84k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 449, False: 4.57k]
  ------------------
 1129|  3.56k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 721, False: 4.29k]
  ------------------
 1130|  3.56k|      *nextTokPtr = ptr;
 1131|  3.56k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  3.56k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|  5.02k|    }
 1133|     37|    *nextTokPtr = ptr;
 1134|     37|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     37|#define XML_TOK_INVALID 0
  ------------------
 1135|  4.44k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 4.44k, False: 98.0k]
  ------------------
 1136|  4.44k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  4.44k|#  define MINBPC(enc) 2
  ------------------
 1137|  4.44k|    return XML_TOK_OR;
  ------------------
  |  |   88|  4.44k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  6.97k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 6.97k, False: 95.5k]
  ------------------
 1139|  6.97k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  6.97k|#  define MINBPC(enc) 2
  ------------------
 1140|  6.97k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  6.97k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  2.17k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 2.17k, False: 100k]
  ------------------
 1142|  2.17k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.17k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.17k|#  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: 102k]
  |  |  ------------------
  |  | 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: 102k]
  |  |  ------------------
  |  | 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|    106|    LEAD_CASE(4)
  ------------------
  |  | 1144|     25|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 31, False: 102k]
  |  |  ------------------
  |  | 1145|     31|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 6, False: 25]
  |  |  ------------------
  |  | 1146|     25|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      6|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     25|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|     25|#    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|     25|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  790|     25|#  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|     25|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  788|     25|#  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|     25|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     25|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     25|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|  8.82k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 8.82k, False: 93.6k]
  ------------------
 1168|  18.7k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 9.97k, False: 92.5k]
  ------------------
 1169|  18.7k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|  18.7k|#define XML_TOK_NAME 18
  ------------------
 1170|  18.7k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  18.7k|#  define MINBPC(enc) 2
  ------------------
 1171|  18.7k|    break;
 1172|    240|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 240, False: 102k]
  ------------------
 1173|    449|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 209, False: 102k]
  ------------------
 1174|    770|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 321, False: 102k]
  ------------------
 1175|    770|#  ifdef XML_NS
 1176|    770|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 102k]
  ------------------
 1177|    770|#  endif
 1178|    770|    tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    770|#define XML_TOK_NMTOKEN 19
  ------------------
 1179|    770|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    770|#  define MINBPC(enc) 2
  ------------------
 1180|    770|    break;
 1181|  3.68k|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 3.68k, False: 98.8k]
  ------------------
 1182|  3.68k|    if (IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  791|  3.68k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  743|  3.68k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  3.68k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 3.27k, False: 415]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1183|  3.27k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  3.27k|#  define MINBPC(enc) 2
  ------------------
 1184|  3.27k|      tok = XML_TOK_NAME;
  ------------------
  |  |   85|  3.27k|#define XML_TOK_NAME 18
  ------------------
 1185|  3.27k|      break;
 1186|  3.27k|    }
 1187|    415|    if (IS_NAME_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  789|    415|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  741|    415|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|    415|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 374, False: 41]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1188|    374|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    374|#  define MINBPC(enc) 2
  ------------------
 1189|    374|      tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    374|#define XML_TOK_NMTOKEN 19
  ------------------
 1190|    374|      break;
 1191|    374|    }
 1192|       |    /* fall through */
 1193|     58|  default:
  ------------------
  |  Branch (1193:3): [True: 17, False: 102k]
  ------------------
 1194|     58|    *nextTokPtr = ptr;
 1195|     58|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     58|#define XML_TOK_INVALID 0
  ------------------
 1196|   102k|  }
 1197|  41.3k|  while (HAS_CHAR(enc, ptr, end)) {
 1198|  41.3k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  41.3k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  41.3k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  40.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 40.0k, False: 1.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1199|  64.9k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  18.2k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 1.22k, False: 40.0k]
  |  |  ------------------
  |  |   82|  18.2k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  1.22k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  1.22k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.22k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 29, False: 1.19k]
  |  |  ------------------
  |  |   83|     29|      *nextTokPtr = ptr;                                                       \
  |  |   84|     29|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     29|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     29|    }                                                                          \
  |  |   86|  18.2k|    /* fall through */                                                         \
  |  |   87|  18.2k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 9.72k, False: 31.5k]
  |  |  ------------------
  |  |   88|  16.9k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 6.04k, False: 35.2k]
  |  |  ------------------
  |  |   89|  17.8k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 850, False: 40.4k]
  |  |  ------------------
  |  |   90|  18.0k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 199, False: 41.1k]
  |  |  ------------------
  |  |   91|  18.2k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 203, False: 41.1k]
  |  |  ------------------
  |  |   92|  18.2k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  18.2k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  18.2k|    break;                                                                     \
  |  |   94|  18.2k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 41.3k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 41.3k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     28|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 28, False: 41.2k]
  |  |  |  |  ------------------
  |  |  |  |   71|     28|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 23]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     23|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     46|#    define IS_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|     23|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     23|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     23|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     23|    }                                                                          \
  |  |  |  |   77|     23|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
 1200|  2.09k|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 2.09k, False: 39.2k]
  ------------------
 1201|  4.39k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 2.30k, False: 39.0k]
  ------------------
 1202|  4.94k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 548, False: 40.7k]
  ------------------
 1203|  7.56k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 2.62k, False: 38.6k]
  ------------------
 1204|  8.36k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 800, False: 40.5k]
  ------------------
 1205|  8.37k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 5, False: 41.2k]
  ------------------
 1206|  17.4k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 9.08k, False: 32.2k]
  ------------------
 1207|  19.1k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 1.73k, False: 39.5k]
  ------------------
 1208|  20.8k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 1.69k, False: 39.6k]
  ------------------
 1209|  20.8k|      *nextTokPtr = ptr;
 1210|  20.8k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 41.3k]
  ------------------
 1213|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  783|      0|#  define MINBPC(enc) 2
  ------------------
 1214|      0|      switch (tok) {
  ------------------
  |  Branch (1214:15): [True: 0, False: 0]
  ------------------
 1215|      0|      case XML_TOK_NAME:
  ------------------
  |  |   85|      0|#define XML_TOK_NAME 18
  ------------------
  |  Branch (1215:7): [True: 0, False: 0]
  ------------------
 1216|      0|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|      0|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|      0|    {                                                                          \
  |  |  |  |  135|      0|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|      0|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|      0|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      0|      }                                                                        \
  |  |  |  |  138|      0|    }
  |  |  ------------------
  ------------------
 1217|      0|        tok = XML_TOK_PREFIXED_NAME;
  ------------------
  |  |  118|      0|#define XML_TOK_PREFIXED_NAME 41
  ------------------
 1218|      0|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|      0|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|      0|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|      0|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1219|      0|          CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|      0|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   82|      0|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|      0|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|      0|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|      0|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   83|      0|      *nextTokPtr = ptr;                                                       \
  |  |   84|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|      0|    }                                                                          \
  |  |   86|      0|    /* fall through */                                                         \
  |  |   87|      0|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   88|      0|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   89|      0|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   90|      0|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   91|      0|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 0, False: 0]
  |  |  ------------------
  |  |   92|      0|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|      0|    break;                                                                     \
  |  |   94|      0|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|      0|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
 1220|      0|        default:
  ------------------
  |  Branch (1220:9): [True: 0, False: 0]
  ------------------
 1221|      0|          tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  ------------------
 1222|      0|          break;
 1223|      0|        }
 1224|      0|        break;
 1225|      0|      case XML_TOK_PREFIXED_NAME:
  ------------------
  |  |  118|      0|#define XML_TOK_PREFIXED_NAME 41
  ------------------
  |  Branch (1225:7): [True: 0, False: 0]
  ------------------
 1226|      0|        tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|      0|#define XML_TOK_NMTOKEN 19
  ------------------
 1227|      0|        break;
 1228|      0|      }
 1229|      0|      break;
 1230|      0|#  endif
 1231|  1.64k|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 1.64k, False: 39.6k]
  ------------------
 1232|  1.64k|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|  1.64k|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 2, False: 1.63k]
  ------------------
 1233|      2|        *nextTokPtr = ptr;
 1234|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
 1235|      2|      }
 1236|  1.63k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.63k|#  define MINBPC(enc) 2
  ------------------
 1237|  1.63k|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|  1.63k|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    199|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 199, False: 41.1k]
  ------------------
 1239|    199|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    199|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 198]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|    198|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    198|#  define MINBPC(enc) 2
  ------------------
 1244|    198|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    198|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|    300|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 300, False: 41.0k]
  ------------------
 1246|    300|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    300|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 1, False: 299]
  ------------------
 1247|      1|        *nextTokPtr = ptr;
 1248|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1249|      1|      }
 1250|    299|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    299|#  define MINBPC(enc) 2
  ------------------
 1251|    299|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|    299|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     13|    default:
  ------------------
  |  Branch (1252:5): [True: 13, False: 41.2k]
  ------------------
 1253|     13|      *nextTokPtr = ptr;
 1254|     13|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
 1255|  41.3k|    }
 1256|  41.3k|  }
 1257|    122|  return -tok;
 1258|  23.2k|}
xmltok.c:little2_scanLit:
  984|  3.07k|                const char **nextTokPtr) {
  985|  24.5M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  24.5M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  24.5M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  24.5M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   399k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 399k, False: 24.1M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  987|  24.5M|    switch (t) {
  988|   236k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 24.5M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 24.5M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|   118k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|   118k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 118k, False: 24.4M]
  |  |  |  |  ------------------
  |  |  |  |   50|   118k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 31, False: 118k]
  |  |  |  |  ------------------
  |  |  |  |   51|   118k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     31|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|   118k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   118k|#    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|   118k|    ptr += n;                                                                  \
  |  |  |  |   57|   118k|    break;
  |  |  ------------------
  |  |   63|   118k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 9, False: 24.5M]
  |  |  ------------------
  |  |   64|      9|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 24.5M]
  |  |  ------------------
  |  |   65|     13|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 24.5M]
  |  |  ------------------
  |  |   66|     13|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     13|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  13.0k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 13.0k, False: 24.5M]
  ------------------
  990|  16.2k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 3.19k, False: 24.5M]
  ------------------
  991|  16.2k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  16.2k|#  define MINBPC(enc) 2
  ------------------
  992|  16.2k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 13.3k, False: 2.97k]
  ------------------
  993|  13.3k|        break;
  994|  2.97k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  2.97k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  2.97k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  2.97k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 4, False: 2.97k]
  ------------------
  995|      4|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      4|#define XML_TOK_LITERAL 27
  ------------------
  996|  2.97k|      *nextTokPtr = ptr;
  997|  2.97k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.97k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.97k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.93k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.93k, False: 34]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  998|    800|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 800, False: 2.17k]
  ------------------
  999|  1.15k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 353, False: 2.62k]
  ------------------
 1000|  1.37k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 222, False: 2.75k]
  ------------------
 1001|  2.88k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 1.50k, False: 1.46k]
  ------------------
 1002|  2.93k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 52, False: 2.92k]
  ------------------
 1003|  2.93k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 5, False: 2.96k]
  ------------------
 1004|  2.93k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  2.93k|#define XML_TOK_LITERAL 27
  ------------------
 1005|     36|      default:
  ------------------
  |  Branch (1005:7): [True: 36, False: 2.93k]
  ------------------
 1006|     36|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     36|#define XML_TOK_INVALID 0
  ------------------
 1007|  2.97k|      }
 1008|  24.4M|    default:
  ------------------
  |  Branch (1008:5): [True: 24.4M, False: 134k]
  ------------------
 1009|  24.4M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  24.4M|#  define MINBPC(enc) 2
  ------------------
 1010|  24.4M|      break;
 1011|  24.5M|    }
 1012|  24.5M|  }
 1013|     58|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     58|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  3.07k|}
xmltok.c:little2_scanDecl:
  183|  8.72k|                 const char **nextTokPtr) {
  184|  8.72k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  8.72k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  8.72k|    {                                                                          \
  |  |  |  |  135|  8.72k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  8.72k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  8.72k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 8.72k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  8.72k|    }
  |  |  ------------------
  ------------------
  185|  8.72k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  8.72k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  8.72k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  8.70k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 8.70k, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|    449|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 449, False: 8.27k]
  ------------------
  187|    449|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    449|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    449|#  define MINBPC(enc) 2
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 8.72k]
  ------------------
  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|    153|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 153, False: 8.57k]
  ------------------
  192|  8.25k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 8.10k, False: 625]
  ------------------
  193|  8.25k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  8.25k|#  define MINBPC(enc) 2
  ------------------
  194|  8.25k|    break;
  195|     22|  default:
  ------------------
  |  Branch (195:3): [True: 22, False: 8.70k]
  ------------------
  196|     22|    *nextTokPtr = ptr;
  197|     22|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     22|#define XML_TOK_INVALID 0
  ------------------
  198|  8.72k|  }
  199|  56.0k|  while (HAS_CHAR(enc, ptr, end)) {
  200|  56.0k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  56.0k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  56.0k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  56.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 56.0k, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|     36|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 36, False: 56.0k]
  ------------------
  202|     36|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     36|    {                                                                          \
  |  |  135|     36|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     36|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|     36|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 35]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     36|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|     35|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  785|     35|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|     35|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|      8|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 31, False: 4]
  |  |  |  |  |  Branch (737:4): [True: 8, False: 27]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      1|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 1, False: 34]
  ------------------
  206|      2|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 34]
  ------------------
  207|      3|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 1, False: 34]
  ------------------
  208|      4|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 1, False: 34]
  ------------------
  209|      4|        *nextTokPtr = ptr;
  210|      4|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  211|     35|      }
  212|       |      /* fall through */
  213|  7.27k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 7.23k, False: 48.8k]
  ------------------
  214|  7.64k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 373, False: 55.6k]
  ------------------
  215|  8.19k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 547, False: 55.5k]
  ------------------
  216|  8.19k|      *nextTokPtr = ptr;
  217|  8.19k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  8.19k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|  36.3k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 36.3k, False: 19.7k]
  ------------------
  219|  47.8k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 11.4k, False: 44.5k]
  ------------------
  220|  47.8k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  47.8k|#  define MINBPC(enc) 2
  ------------------
  221|  47.8k|      break;
  222|     29|    default:
  ------------------
  |  Branch (222:5): [True: 29, False: 56.0k]
  ------------------
  223|     29|      *nextTokPtr = ptr;
  224|     29|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     29|#define XML_TOK_INVALID 0
  ------------------
  225|  56.0k|    }
  226|  56.0k|  }
  227|     29|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     29|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  8.25k|}
xmltok.c:little2_scanComment:
  146|    702|                    const char **nextTokPtr) {
  147|    702|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|    702|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    702|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    702|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 689, False: 13]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|    689|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  787|    689|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    689|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 681, False: 8]
  |  |  |  |  |  Branch (739:52): [True: 669, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  149|     20|      *nextTokPtr = ptr;
  150|     20|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     20|#define XML_TOK_INVALID 0
  ------------------
  151|     20|    }
  152|    669|    ptr += MINBPC(enc);
  ------------------
  |  |  783|    669|#  define MINBPC(enc) 2
  ------------------
  153|   194k|    while (HAS_CHAR(enc, ptr, end)) {
  154|   194k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   194k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   194k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  17.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 17.0k, False: 177k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|  6.75k|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 194k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 194k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  3.36k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  3.33k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.36k, False: 190k]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.36k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 29, False: 3.33k]
  |  |  |  |  ------------------
  |  |  |  |   51|  3.33k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     29|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  3.33k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  3.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|  3.33k|    ptr += n;                                                                  \
  |  |  |  |   57|  3.33k|    break;
  |  |  ------------------
  |  |   63|  3.33k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 26, False: 194k]
  |  |  ------------------
  |  |   64|     26|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 194k]
  |  |  ------------------
  |  |   65|     35|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 9, False: 194k]
  |  |  ------------------
  |  |   66|     35|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     35|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     35|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  1.05k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 1.05k, False: 193k]
  ------------------
  157|  1.05k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.05k|#  define MINBPC(enc) 2
  ------------------
  158|  1.05k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.05k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.05k|    {                                                                          \
  |  |  |  |  135|  1.05k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.05k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.05k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.05k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.05k|    }
  |  |  ------------------
  ------------------
  159|  1.05k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  787|  1.05k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.05k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 738, False: 320]
  |  |  |  |  |  Branch (739:52): [True: 533, False: 205]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|    533|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    533|#  define MINBPC(enc) 2
  ------------------
  161|    533|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    533|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    533|    {                                                                          \
  |  |  |  |  135|    533|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    533|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    533|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 2, False: 531]
  |  |  |  |  ------------------
  |  |  |  |  136|      2|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      2|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      2|      }                                                                        \
  |  |  |  |  138|    533|    }
  |  |  ------------------
  ------------------
  162|    531|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    531|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    531|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 522, False: 9]
  |  |  |  |  |  Branch (739:52): [True: 513, False: 9]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|     18|            *nextTokPtr = ptr;
  164|     18|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  165|     18|          }
  166|    513|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    513|#  define MINBPC(enc) 2
  ------------------
  167|    513|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|    513|#define XML_TOK_COMMENT 13
  ------------------
  168|    531|        }
  169|    525|        break;
  170|   189k|      default:
  ------------------
  |  Branch (170:7): [True: 189k, False: 4.45k]
  ------------------
  171|   189k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   189k|#  define MINBPC(enc) 2
  ------------------
  172|   189k|        break;
  173|   194k|      }
  174|   194k|    }
  175|    669|  }
  176|     84|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     84|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|    702|}
xmltok.c:little2_scanPi:
  277|  5.83k|               const char **nextTokPtr) {
  278|  5.83k|  int tok;
  279|  5.83k|  const char *target = ptr;
  280|  5.83k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  5.83k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  5.83k|    {                                                                          \
  |  |  |  |  135|  5.83k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  5.83k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  5.83k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 13, False: 5.82k]
  |  |  |  |  ------------------
  |  |  |  |  136|     13|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     13|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     13|      }                                                                        \
  |  |  |  |  138|  5.83k|    }
  |  |  ------------------
  ------------------
  281|  5.82k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  5.82k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.82k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.84k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.84k, False: 973]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  282|  6.12k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  5.77k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 944, False: 4.87k]
  |  |  ------------------
  |  |  111|  5.77k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    944|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    944|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    944|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 11, False: 933]
  |  |  ------------------
  |  |  112|     11|      *nextTokPtr = ptr;                                                       \
  |  |  113|     11|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     11|    }                                                                          \
  |  |  115|  5.77k|    /* fall through */                                                         \
  |  |  116|  5.77k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.21k, False: 1.61k]
  |  |  ------------------
  |  |  117|  5.77k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 636, False: 5.18k]
  |  |  ------------------
  |  |  118|  5.77k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  5.77k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  5.77k|    break;                                                                     \
  |  |  120|  5.77k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 5.82k]
  |  |  |  |  ------------------
  |  |  |  |  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.82k]
  |  |  |  |  ------------------
  |  |  |  |  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: 5.79k]
  |  |  |  |  ------------------
  |  |  |  |  100|     23|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 19]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     19|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     38|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     19|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     19|    }                                                                          \
  |  |  |  |  106|     19|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  283|      7|  default:
  ------------------
  |  Branch (283:3): [True: 7, False: 5.81k]
  ------------------
  284|      7|    *nextTokPtr = ptr;
  285|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  286|  5.82k|  }
  287|  42.8k|  while (HAS_CHAR(enc, ptr, end)) {
  288|  42.8k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  42.8k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  42.8k|  ((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: 28.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  289|   171k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  37.1k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 28.3k, False: 14.4k]
  |  |  ------------------
  |  |   82|  37.1k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  28.3k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  28.3k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  28.3k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 15, False: 28.3k]
  |  |  ------------------
  |  |   83|     15|      *nextTokPtr = ptr;                                                       \
  |  |   84|     15|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     15|    }                                                                          \
  |  |   86|  37.1k|    /* fall through */                                                         \
  |  |   87|  37.1k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 5.79k, False: 37.0k]
  |  |  ------------------
  |  |   88|  35.9k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.78k, False: 41.0k]
  |  |  ------------------
  |  |   89|  36.1k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 231, False: 42.5k]
  |  |  ------------------
  |  |   90|  36.8k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 657, False: 42.1k]
  |  |  ------------------
  |  |   91|  37.1k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 295, False: 42.5k]
  |  |  ------------------
  |  |   92|  37.1k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  37.1k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  37.1k|    break;                                                                     \
  |  |   94|  37.1k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 42.8k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 42.8k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     18|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 18, False: 42.8k]
  |  |  |  |  ------------------
  |  |  |  |   71|     18|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 14]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     14|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     28|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     14|    }                                                                          \
  |  |  |  |   77|     14|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  290|  1.29k|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 1.29k, False: 41.5k]
  ------------------
  291|  2.08k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 790, False: 42.0k]
  ------------------
  292|  3.00k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 916, False: 41.9k]
  ------------------
  293|  3.00k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  782|  3.00k|#  define PREFIX(ident) little2_##ident
  ------------------
  |  Branch (293:11): [True: 1, False: 2.99k]
  ------------------
  294|      1|        *nextTokPtr = ptr;
  295|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  296|      1|      }
  297|  2.99k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.99k|#  define MINBPC(enc) 2
  ------------------
  298|   160k|      while (HAS_CHAR(enc, ptr, end)) {
  299|   160k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   160k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   160k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  27.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 27.4k, False: 132k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  300|  7.62k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 160k]
  |  |  |  |  ------------------
  |  |  |  |   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: 160k]
  |  |  |  |  ------------------
  |  |  |  |   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.81k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  3.78k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 3.81k, False: 156k]
  |  |  |  |  ------------------
  |  |  |  |   50|  3.81k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 30, False: 3.78k]
  |  |  |  |  ------------------
  |  |  |  |   51|  3.78k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     30|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  3.78k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  3.78k|#    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.78k|    ptr += n;                                                                  \
  |  |  |  |   57|  3.78k|    break;
  |  |  ------------------
  |  |   63|  3.78k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 10, False: 160k]
  |  |  ------------------
  |  |   64|     10|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 160k]
  |  |  ------------------
  |  |   65|     15|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 5, False: 160k]
  |  |  ------------------
  |  |   66|     15|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     15|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  4.56k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 4.56k, False: 155k]
  ------------------
  302|  4.56k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.56k|#  define MINBPC(enc) 2
  ------------------
  303|  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)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  4.56k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 6, False: 4.55k]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|  4.56k|    }
  |  |  ------------------
  ------------------
  304|  4.55k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  4.55k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  4.55k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 4.25k, False: 305]
  |  |  |  |  |  Branch (739:52): [True: 2.82k, False: 1.43k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  305|  2.82k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.82k|#  define MINBPC(enc) 2
  ------------------
  306|  2.82k|            return tok;
  307|  2.82k|          }
  308|  1.73k|          break;
  309|   151k|        default:
  ------------------
  |  Branch (309:9): [True: 151k, False: 8.39k]
  ------------------
  310|   151k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|   151k|#  define MINBPC(enc) 2
  ------------------
  311|   151k|          break;
  312|   160k|        }
  313|   160k|      }
  314|    127|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    127|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  2.66k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 2.66k, False: 40.1k]
  ------------------
  316|  2.66k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  782|  2.66k|#  define PREFIX(ident) little2_##ident
  ------------------
  |  Branch (316:11): [True: 2, False: 2.65k]
  ------------------
  317|      2|        *nextTokPtr = ptr;
  318|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  319|      2|      }
  320|  2.65k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.65k|#  define MINBPC(enc) 2
  ------------------
  321|  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)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.65k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 42, False: 2.61k]
  |  |  |  |  ------------------
  |  |  |  |  136|     42|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     42|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     42|      }                                                                        \
  |  |  |  |  138|  2.65k|    }
  |  |  ------------------
  ------------------
  322|  2.61k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  2.61k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.61k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 2.60k, False: 11]
  |  |  |  |  |  Branch (739:52): [True: 2.59k, False: 13]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  323|  2.59k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.59k|#  define MINBPC(enc) 2
  ------------------
  324|  2.59k|        return tok;
  325|  2.59k|      }
  326|       |      /* fall through */
  327|     33|    default:
  ------------------
  |  Branch (327:5): [True: 9, False: 42.8k]
  ------------------
  328|     33|      *nextTokPtr = ptr;
  329|     33|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     33|#define XML_TOK_INVALID 0
  ------------------
  330|  42.8k|    }
  331|  42.8k|  }
  332|     77|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     77|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  5.77k|}
xmltok.c:little2_checkPiTarget:
  232|  5.66k|                      int *tokPtr) {
  233|  5.66k|  int upper = 0;
  234|  5.66k|  UNUSED_P(enc);
  ------------------
  |  |  135|  5.66k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  5.66k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  5.66k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  5.66k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  783|  5.66k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (236:7): [True: 2.59k, False: 3.06k]
  ------------------
  237|  2.59k|    return 1;
  238|  3.06k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  3.06k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  3.06k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 2.62k, False: 441]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  239|    818|  case ASCII_x:
  ------------------
  |  |   86|    818|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 818, False: 2.24k]
  ------------------
  240|    818|    break;
  241|  1.28k|  case ASCII_X:
  ------------------
  |  |   59|  1.28k|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 1.28k, False: 1.77k]
  ------------------
  242|  1.28k|    upper = 1;
  243|  1.28k|    break;
  244|    958|  default:
  ------------------
  |  Branch (244:3): [True: 958, False: 2.10k]
  ------------------
  245|    958|    return 1;
  246|  3.06k|  }
  247|  2.10k|  ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.10k|#  define MINBPC(enc) 2
  ------------------
  248|  2.10k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  2.10k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  2.10k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 1.51k, False: 587]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|    757|  case ASCII_m:
  ------------------
  |  |   75|    757|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 757, False: 1.34k]
  ------------------
  250|    757|    break;
  251|    731|  case ASCII_M:
  ------------------
  |  |   48|    731|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 731, False: 1.37k]
  ------------------
  252|    731|    upper = 1;
  253|    731|    break;
  254|    616|  default:
  ------------------
  |  Branch (254:3): [True: 616, False: 1.48k]
  ------------------
  255|    616|    return 1;
  256|  2.10k|  }
  257|  1.48k|  ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.48k|#  define MINBPC(enc) 2
  ------------------
  258|  1.48k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  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.03k, False: 449]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|     37|  case ASCII_l:
  ------------------
  |  |   74|     37|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 37, False: 1.45k]
  ------------------
  260|     37|    break;
  261|      2|  case ASCII_L:
  ------------------
  |  |   47|      2|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 2, False: 1.48k]
  ------------------
  262|      2|    upper = 1;
  263|      2|    break;
  264|  1.44k|  default:
  ------------------
  |  Branch (264:3): [True: 1.44k, False: 39]
  ------------------
  265|  1.44k|    return 1;
  266|  1.48k|  }
  267|     39|  if (upper)
  ------------------
  |  Branch (267:7): [True: 3, False: 36]
  ------------------
  268|      3|    return 0;
  269|     36|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|     36|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|     36|  return 1;
  271|     39|}
xmltok.c:little2_scanPercent:
  924|  1.35k|                    const char **nextTokPtr) {
  925|  1.35k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.35k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.35k|    {                                                                          \
  |  |  |  |  135|  1.35k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.35k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.35k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 48, False: 1.30k]
  |  |  |  |  ------------------
  |  |  |  |  136|     48|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     48|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     48|      }                                                                        \
  |  |  |  |  138|  1.35k|    }
  |  |  ------------------
  ------------------
  926|  1.30k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.30k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.30k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.08k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.08k, False: 224]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  927|    663|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|    680|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 203, False: 1.10k]
  |  |  ------------------
  |  |  111|    680|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    203|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    203|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    203|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 12, False: 191]
  |  |  ------------------
  |  |  112|     12|      *nextTokPtr = ptr;                                                       \
  |  |  113|     12|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     12|    }                                                                          \
  |  |  115|    680|    /* fall through */                                                         \
  |  |  116|    680|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 241, False: 1.06k]
  |  |  ------------------
  |  |  117|    680|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 248, False: 1.05k]
  |  |  ------------------
  |  |  118|    680|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|    680|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|    680|    break;                                                                     \
  |  |  120|    680|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.30k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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.30k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     16|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 16, False: 1.28k]
  |  |  |  |  ------------------
  |  |  |  |  100|     16|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 12]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     12|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     24|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     12|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     12|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     12|    }                                                                          \
  |  |  |  |  106|     12|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  928|    195|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 195, False: 1.11k]
  ------------------
  929|    262|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 67, False: 1.23k]
  ------------------
  930|    586|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 324, False: 981]
  ------------------
  931|    589|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 3, False: 1.30k]
  ------------------
  932|    589|    *nextTokPtr = ptr;
  933|    589|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|    589|#define XML_TOK_PERCENT 22
  ------------------
  934|      8|  default:
  ------------------
  |  Branch (934:3): [True: 8, False: 1.29k]
  ------------------
  935|      8|    *nextTokPtr = ptr;
  936|      8|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  937|  1.30k|  }
  938|  2.19k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  2.19k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.19k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.19k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.67k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.67k, False: 512]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  940|  4.71k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.58k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 493, False: 1.69k]
  |  |  ------------------
  |  |   82|  1.58k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    493|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    493|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    493|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 22, False: 471]
  |  |  ------------------
  |  |   83|     22|      *nextTokPtr = ptr;                                                       \
  |  |   84|     22|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     22|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     22|    }                                                                          \
  |  |   86|  1.58k|    /* fall through */                                                         \
  |  |   87|  1.58k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 253, False: 1.93k]
  |  |  ------------------
  |  |   88|    950|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 226, False: 1.96k]
  |  |  ------------------
  |  |   89|  1.14k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 198, False: 1.99k]
  |  |  ------------------
  |  |   90|  1.37k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 231, False: 1.96k]
  |  |  ------------------
  |  |   91|  1.58k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 202, False: 1.98k]
  |  |  ------------------
  |  |   92|  1.58k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.58k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.58k|    break;                                                                     \
  |  |   94|  1.58k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 2.19k]
  |  |  |  |  ------------------
  |  |  |  |   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.19k]
  |  |  |  |  ------------------
  |  |  |  |   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: 2.17k]
  |  |  |  |  ------------------
  |  |  |  |   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)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      7|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      7|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      7|    }                                                                          \
  |  |  |  |   77|      7|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  941|    563|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 563, False: 1.62k]
  ------------------
  942|    563|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    563|#  define MINBPC(enc) 2
  ------------------
  943|    563|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|    563|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|     13|    default:
  ------------------
  |  Branch (944:5): [True: 13, False: 2.17k]
  ------------------
  945|     13|      *nextTokPtr = ptr;
  946|     13|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  947|  2.19k|    }
  948|  2.19k|  }
  949|     70|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     70|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|    680|}
xmltok.c:little2_scanPoundName:
  954|  2.17k|                      const char **nextTokPtr) {
  955|  2.17k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.17k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.17k|    {                                                                          \
  |  |  |  |  135|  2.17k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.17k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.17k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 2.16k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  2.17k|    }
  |  |  ------------------
  ------------------
  956|  2.16k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.16k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.16k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.04k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.04k, False: 122]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  957|  1.94k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.12k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 96, False: 2.06k]
  |  |  ------------------
  |  |  111|  2.12k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|     96|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|     96|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|     96|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 15, False: 81]
  |  |  ------------------
  |  |  112|     15|      *nextTokPtr = ptr;                                                       \
  |  |  113|     15|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     15|    }                                                                          \
  |  |  115|  2.12k|    /* fall through */                                                         \
  |  |  116|  2.12k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.72k, False: 440]
  |  |  ------------------
  |  |  117|  2.12k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 316, False: 1.84k]
  |  |  ------------------
  |  |  118|  2.12k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  2.12k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  2.12k|    break;                                                                     \
  |  |  120|  2.12k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.16k]
  |  |  |  |  ------------------
  |  |  |  |  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.16k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     21|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 21, False: 2.14k]
  |  |  |  |  ------------------
  |  |  |  |  100|     21|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 17]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     17|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     34|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     17|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     17|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     17|    }                                                                          \
  |  |  |  |  106|     17|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  958|      7|  default:
  ------------------
  |  Branch (958:3): [True: 7, False: 2.15k]
  ------------------
  959|      7|    *nextTokPtr = ptr;
  960|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  961|  2.16k|  }
  962|  14.6k|  while (HAS_CHAR(enc, ptr, end)) {
  963|  14.6k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  14.6k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  14.6k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  14.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 14.1k, False: 543]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  964|  42.9k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  12.6k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 525, False: 14.1k]
  |  |  ------------------
  |  |   82|  12.6k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    525|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    525|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    525|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 26, False: 499]
  |  |  ------------------
  |  |   83|     26|      *nextTokPtr = ptr;                                                       \
  |  |   84|     26|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     26|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     26|    }                                                                          \
  |  |   86|  12.6k|    /* fall through */                                                         \
  |  |   87|  12.6k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 5.30k, False: 9.37k]
  |  |  ------------------
  |  |   88|  12.0k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 6.19k, False: 8.48k]
  |  |  ------------------
  |  |   89|  12.2k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 196, False: 14.4k]
  |  |  ------------------
  |  |   90|  12.3k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 194, False: 14.4k]
  |  |  ------------------
  |  |   91|  12.6k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 223, False: 14.4k]
  |  |  ------------------
  |  |   92|  12.6k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  12.6k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  12.6k|    break;                                                                     \
  |  |   94|  12.6k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 14.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: 14.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: 14.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|     68|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 68, False: 14.6k]
  ------------------
  966|    483|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 415, False: 14.2k]
  ------------------
  967|    927|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 444, False: 14.2k]
  ------------------
  968|  1.27k|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 347, False: 14.3k]
  ------------------
  969|  1.59k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 317, False: 14.3k]
  ------------------
  970|  1.59k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 1, False: 14.6k]
  ------------------
  971|  2.01k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 422, False: 14.2k]
  ------------------
  972|  2.01k|      *nextTokPtr = ptr;
  973|  2.01k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  2.01k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|      9|    default:
  ------------------
  |  Branch (974:5): [True: 9, False: 14.6k]
  ------------------
  975|      9|      *nextTokPtr = ptr;
  976|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  977|  14.6k|    }
  978|  14.6k|  }
  979|     60|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     60|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  2.12k|}
xmltok.c:little2_contentTok:
  824|  56.5k|                   const char **nextTokPtr) {
  825|  56.5k|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 1.09k, False: 55.4k]
  ------------------
  826|  1.09k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.09k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|  55.4k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  55.4k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (827:7): [Folded - Ignored]
  ------------------
  828|  55.4k|    size_t n = end - ptr;
  829|  55.4k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  55.4k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (829:9): [True: 16.0k, False: 39.3k]
  ------------------
  830|  16.0k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  16.0k|#  define MINBPC(enc) 2
  ------------------
  831|  16.0k|      if (n == 0)
  ------------------
  |  Branch (831:11): [True: 98, False: 15.9k]
  ------------------
  832|     98|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     98|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  833|  15.9k|      end = ptr + n;
  834|  15.9k|    }
  835|  55.4k|  }
  836|  55.3k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  55.3k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  55.3k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  44.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 44.1k, False: 11.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  837|  15.2k|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 15.2k, False: 40.1k]
  ------------------
  838|  15.2k|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  15.2k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  15.2k|#  define MINBPC(enc) 2
  ------------------
  839|  10.9k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 10.9k, False: 44.3k]
  ------------------
  840|  10.9k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  10.9k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  10.9k|#  define MINBPC(enc) 2
  ------------------
  841|  10.5k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 10.5k, False: 44.7k]
  ------------------
  842|  10.5k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  10.5k|#  define MINBPC(enc) 2
  ------------------
  843|  10.5k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  10.5k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  10.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  10.5k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 22, False: 10.5k]
  ------------------
  844|     22|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     22|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  10.5k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  10.5k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  10.5k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.99k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 3.99k, False: 6.55k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 363, False: 10.1k]
  ------------------
  846|    363|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    363|#  define MINBPC(enc) 2
  ------------------
  847|  10.5k|    *nextTokPtr = ptr;
  848|  10.5k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  10.5k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|  1.48k|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 1.48k, False: 53.8k]
  ------------------
  850|  1.48k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.48k|#  define MINBPC(enc) 2
  ------------------
  851|  1.48k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  1.48k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  2.32k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 2.32k, False: 53.0k]
  ------------------
  853|  2.32k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.32k|#  define MINBPC(enc) 2
  ------------------
  854|  2.32k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  2.32k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  2.32k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  2.32k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 3, False: 2.31k]
  ------------------
  855|      3|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      3|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  2.31k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  787|  2.31k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.31k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.43k, False: 882]
  |  |  |  |  |  Branch (739:52): [True: 1.03k, False: 406]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  857|  1.28k|      break;
  858|  1.03k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.03k|#  define MINBPC(enc) 2
  ------------------
  859|  1.03k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  1.03k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  1.03k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  1.03k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 6, False: 1.02k]
  ------------------
  860|      6|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      6|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|  1.02k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  1.02k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.02k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 712, False: 312]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 711]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  862|  1.02k|      ptr -= MINBPC(enc);
  ------------------
  |  |  783|  1.02k|#  define MINBPC(enc) 2
  ------------------
  863|  1.02k|      break;
  864|  1.02k|    }
  865|      1|    *nextTokPtr = ptr;
  866|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  867|  10.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: 55.3k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 55.3k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  4.99k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  4.93k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 4.99k, False: 50.3k]
  |  |  |  |  ------------------
  |  |  |  |   50|  4.99k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 55, False: 4.93k]
  |  |  |  |  ------------------
  |  |  |  |   51|  4.93k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     55|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  4.93k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  4.93k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  4.93k|    ptr += n;                                                                  \
  |  |  |  |   57|  4.93k|    break;
  |  |  ------------------
  |  |   63|  4.93k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 49, False: 55.2k]
  |  |  ------------------
  |  |   64|     49|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 55.3k]
  |  |  ------------------
  |  |   65|     60|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 11, False: 55.3k]
  |  |  ------------------
  |  |   66|     60|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     60|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     60|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|  9.74k|  default:
  ------------------
  |  Branch (868:3): [True: 9.74k, False: 45.5k]
  ------------------
  869|  9.74k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  9.74k|#  define MINBPC(enc) 2
  ------------------
  870|  9.74k|    break;
  871|  55.3k|  }
  872|   888k|  while (HAS_CHAR(enc, ptr, end)) {
  873|   888k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   888k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   888k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  34.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 34.2k, False: 854k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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: 888k]
  |  |  ------------------
  |  |  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: 888k]
  |  |  ------------------
  |  |  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|  5.15k|      LEAD_CASE(4)
  ------------------
  |  |  875|  5.10k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 5.15k, False: 883k]
  |  |  ------------------
  |  |  876|  5.15k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  5.10k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 50, False: 5.10k]
  |  |  ------------------
  |  |  877|     50|      *nextTokPtr = ptr;                                                       \
  |  |  878|     50|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     50|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     50|    }                                                                          \
  |  |  880|  5.10k|    ptr += n;                                                                  \
  |  |  881|  5.10k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|  3.44k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 3.44k, False: 885k]
  ------------------
  887|  3.44k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|  3.44k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  783|  3.44k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 3.44k, False: 1]
  |  |  ------------------
  ------------------
  888|  3.44k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  787|  3.44k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  3.44k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 2.40k, False: 1.03k]
  |  |  |  |  |  Branch (739:52): [True: 830, False: 1.57k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  889|  2.61k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.61k|#  define MINBPC(enc) 2
  ------------------
  890|  2.61k|          break;
  891|  2.61k|        }
  892|    830|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|    830|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  783|    830|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 825, False: 5]
  |  |  ------------------
  ------------------
  893|    825|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  787|    825|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    825|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 468, False: 357]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 467]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  894|    824|            ptr += MINBPC(enc);
  ------------------
  |  |  783|    824|#  define MINBPC(enc) 2
  ------------------
  895|    824|            break;
  896|    824|          }
  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|    825|        }
  900|    830|      }
  901|       |      /* fall through */
  902|  3.30k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 3.29k, False: 885k]
  ------------------
  903|  7.02k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 3.72k, False: 885k]
  ------------------
  904|  7.07k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 43, False: 888k]
  ------------------
  905|  7.07k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 0, False: 888k]
  ------------------
  906|  7.07k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 6, False: 888k]
  ------------------
  907|  15.6k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 8.53k, False: 880k]
  ------------------
  908|  16.5k|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 985, False: 887k]
  ------------------
  909|  16.5k|      *nextTokPtr = ptr;
  910|  16.5k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  16.5k|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|   863k|    default:
  ------------------
  |  Branch (911:5): [True: 863k, False: 25.1k]
  ------------------
  912|   863k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   863k|#  define MINBPC(enc) 2
  ------------------
  913|   863k|      break;
  914|   888k|    }
  915|   888k|  }
  916|    354|  *nextTokPtr = ptr;
  917|    354|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    354|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|  16.9k|}
xmltok.c:little2_scanLt:
  726|  15.2k|               const char **nextTokPtr) {
  727|  15.2k|#  ifdef XML_NS
  728|  15.2k|  int hadColon;
  729|  15.2k|#  endif
  730|  15.2k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  15.2k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  15.2k|    {                                                                          \
  |  |  |  |  135|  15.2k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  15.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  15.2k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 11, False: 15.1k]
  |  |  |  |  ------------------
  |  |  |  |  136|     11|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     11|      }                                                                        \
  |  |  |  |  138|  15.2k|    }
  |  |  ------------------
  ------------------
  731|  15.1k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  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|  12.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 12.2k, False: 2.90k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  732|  10.1k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  9.87k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 2.87k, False: 12.3k]
  |  |  ------------------
  |  |  111|  9.87k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  2.87k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  2.87k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  2.87k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 15, False: 2.86k]
  |  |  ------------------
  |  |  112|     15|      *nextTokPtr = ptr;                                                       \
  |  |  113|     15|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     15|    }                                                                          \
  |  |  115|  9.87k|    /* fall through */                                                         \
  |  |  116|  9.87k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.39k, False: 10.7k]
  |  |  ------------------
  |  |  117|  9.87k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 2.62k, False: 12.5k]
  |  |  ------------------
  |  |  118|  9.87k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  9.87k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  9.87k|    break;                                                                     \
  |  |  120|  9.87k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 15.1k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 15.1k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     22|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 22, False: 15.1k]
  |  |  |  |  ------------------
  |  |  |  |  100|     22|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 18]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     18|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     36|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     18|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     18|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     18|    }                                                                          \
  |  |  |  |  106|     18|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  733|  1.17k|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 1.17k, False: 14.0k]
  ------------------
  734|  1.17k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.17k|#  define MINBPC(enc) 2
  ------------------
  735|  1.17k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.17k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.17k|    {                                                                          \
  |  |  |  |  135|  1.17k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.17k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.17k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.17k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.17k|    }
  |  |  ------------------
  ------------------
  736|  1.17k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.17k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.17k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.15k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:3): [True: 27, False: 1.14k]
  |  |  |  |  |  Branch (737:4): [True: 1.15k, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    253|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 253, False: 921]
  ------------------
  738|    253|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    253|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    253|#  define MINBPC(enc) 2
  ------------------
  739|    894|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 894, False: 280]
  ------------------
  740|    894|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|    894|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|    894|#  define MINBPC(enc) 2
  ------------------
  741|  1.17k|    }
  742|     27|    *nextTokPtr = ptr;
  743|     27|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     27|#define XML_TOK_INVALID 0
  ------------------
  744|  2.49k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 2.49k, False: 12.6k]
  ------------------
  745|  2.49k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  2.49k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  2.49k|#  define MINBPC(enc) 2
  ------------------
  746|  1.59k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 1.59k, False: 13.5k]
  ------------------
  747|  1.59k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  1.59k|#  define PREFIX(ident) little2_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  1.59k|#  define MINBPC(enc) 2
  ------------------
  748|     13|  default:
  ------------------
  |  Branch (748:3): [True: 13, False: 15.1k]
  ------------------
  749|     13|    *nextTokPtr = ptr;
  750|     13|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  751|  15.1k|  }
  752|  9.87k|#  ifdef XML_NS
  753|  9.87k|  hadColon = 0;
  754|  9.87k|#  endif
  755|       |  /* we have a start-tag */
  756|   815k|  while (HAS_CHAR(enc, ptr, end)) {
  757|   815k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   815k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   815k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  12.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 12.5k, False: 802k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  758|  4.02M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   805k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 802k, False: 12.5k]
  |  |  ------------------
  |  |   82|   805k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|   802k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|   802k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|   802k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 18, False: 802k]
  |  |  ------------------
  |  |   83|     18|      *nextTokPtr = ptr;                                                       \
  |  |   84|     18|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     18|    }                                                                          \
  |  |   86|   805k|    /* fall through */                                                         \
  |  |   87|   805k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.24k, False: 814k]
  |  |  ------------------
  |  |   88|   804k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 400, False: 814k]
  |  |  ------------------
  |  |   89|   805k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 636, False: 814k]
  |  |  ------------------
  |  |   90|   805k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 195, False: 815k]
  |  |  ------------------
  |  |   91|   805k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 322, False: 815k]
  |  |  ------------------
  |  |   92|   805k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|   805k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|   805k|    break;                                                                     \
  |  |   94|   805k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 815k]
  |  |  |  |  ------------------
  |  |  |  |   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: 815k]
  |  |  |  |  ------------------
  |  |  |  |   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: 815k]
  |  |  |  |  ------------------
  |  |  |  |   71|     10|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 6]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      6|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     12|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      6|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      6|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      6|    }                                                                          \
  |  |  |  |   77|      6|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 815k]
  ------------------
  761|      0|      if (hadColon) {
  ------------------
  |  Branch (761:11): [True: 0, False: 0]
  ------------------
  762|      0|        *nextTokPtr = ptr;
  763|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  764|      0|      }
  765|      0|      hadColon = 1;
  766|      0|      ptr += MINBPC(enc);
  ------------------
  |  |  783|      0|#  define MINBPC(enc) 2
  ------------------
  767|      0|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|      0|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|      0|    {                                                                          \
  |  |  |  |  135|      0|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|      0|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|      0|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  136|      0|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      0|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      0|      }                                                                        \
  |  |  |  |  138|      0|    }
  |  |  ------------------
  ------------------
  768|      0|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|      0|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|      0|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|      0|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  769|      0|        CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|      0|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  111|      0|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|      0|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|      0|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|      0|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  112|      0|      *nextTokPtr = ptr;                                                       \
  |  |  113|      0|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      0|    }                                                                          \
  |  |  115|      0|    /* fall through */                                                         \
  |  |  116|      0|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  117|      0|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 0, False: 0]
  |  |  ------------------
  |  |  118|      0|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|      0|    break;                                                                     \
  |  |  120|      0|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|      0|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  770|      0|      default:
  ------------------
  |  Branch (770:7): [True: 0, False: 0]
  ------------------
  771|      0|        *nextTokPtr = ptr;
  772|      0|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      0|#define XML_TOK_INVALID 0
  ------------------
  773|      0|      }
  774|      0|      break;
  775|      0|#  endif
  776|  2.03k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 2.03k, False: 813k]
  ------------------
  777|  3.12k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 1.09k, False: 814k]
  ------------------
  778|  4.19k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 1.06k, False: 814k]
  ------------------
  779|  4.19k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.19k|#  define MINBPC(enc) 2
  ------------------
  780|  5.35k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  5.35k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  5.35k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  5.35k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.13k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.13k, False: 1.21k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  782|  3.42k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.86k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.18k, False: 4.16k]
  |  |  ------------------
  |  |  111|  2.86k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  1.18k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  1.18k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.18k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 13, False: 1.17k]
  |  |  ------------------
  |  |  112|     13|      *nextTokPtr = ptr;                                                       \
  |  |  113|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     13|    }                                                                          \
  |  |  115|  2.86k|    /* fall through */                                                         \
  |  |  116|  2.86k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.01k, False: 4.33k]
  |  |  ------------------
  |  |  117|  2.86k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 671, False: 4.68k]
  |  |  ------------------
  |  |  118|  2.86k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  2.86k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  2.86k|    break;                                                                     \
  |  |  120|  2.86k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 5.35k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 5.35k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     21|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 21, False: 5.33k]
  |  |  |  |  ------------------
  |  |  |  |  100|     21|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 17]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     17|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     34|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     17|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     17|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     17|    }                                                                          \
  |  |  |  |  106|     17|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  783|  1.05k|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 1.05k, False: 4.29k]
  ------------------
  784|  1.05k|          goto gt;
  785|    196|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 196, False: 5.15k]
  ------------------
  786|    196|          goto sol;
  787|    332|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 332, False: 5.02k]
  ------------------
  788|    727|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 395, False: 4.95k]
  ------------------
  789|  1.19k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 469, False: 4.88k]
  ------------------
  790|  1.19k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.19k|#  define MINBPC(enc) 2
  ------------------
  791|  1.19k|          continue;
  792|      6|        default:
  ------------------
  |  Branch (792:9): [True: 6, False: 5.34k]
  ------------------
  793|      6|          *nextTokPtr = ptr;
  794|      6|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  795|  5.35k|        }
  796|  2.86k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  782|  2.86k|#  define PREFIX(ident) little2_##ident
  ------------------
  797|  5.35k|      }
  798|     42|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     42|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  4.19k|    }
  800|  5.28k|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 5.28k, False: 810k]
  ------------------
  801|  6.33k|    gt:
  802|  6.33k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  6.33k|#  define MINBPC(enc) 2
  ------------------
  803|  6.33k|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  6.33k|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|    287|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 287, False: 815k]
  ------------------
  805|    483|    sol:
  806|    483|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    483|#  define MINBPC(enc) 2
  ------------------
  807|    483|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    483|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    483|    {                                                                          \
  |  |  |  |  135|    483|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    483|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    483|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 11, False: 472]
  |  |  |  |  ------------------
  |  |  |  |  136|     11|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     11|      }                                                                        \
  |  |  |  |  138|    483|    }
  |  |  ------------------
  ------------------
  808|    472|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    472|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    472|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 466, False: 6]
  |  |  |  |  |  Branch (739:52): [True: 448, False: 18]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  809|     24|        *nextTokPtr = ptr;
  810|     24|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     24|#define XML_TOK_INVALID 0
  ------------------
  811|     24|      }
  812|    448|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    448|#  define MINBPC(enc) 2
  ------------------
  813|    448|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|    448|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|     11|    default:
  ------------------
  |  Branch (814:5): [True: 11, False: 815k]
  ------------------
  815|     11|      *nextTokPtr = ptr;
  816|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  817|   815k|    }
  818|   815k|  }
  819|     69|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     69|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  9.87k|}
xmltok.c:little2_scanCdataSection:
  337|    894|                         const char **nextTokPtr) {
  338|    894|  static const char CDATA_LSQB[]
  339|    894|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|    894|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|    894|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    894|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|    894|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    894|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|    894|#define ASCII_LSQB 0x5B
  ------------------
  340|    894|  int i;
  341|    894|  UNUSED_P(enc);
  ------------------
  |  |  135|    894|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|    894|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|    894|    {                                                                          \
  |  |  135|    894|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|    894|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|    894|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 6, False: 888]
  |  |  ------------------
  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      6|      }                                                                        \
  |  |  138|    894|    }
  ------------------
  344|  6.16k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  5.27k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (344:15): [True: 5.29k, False: 876]
  ------------------
  345|  5.29k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  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.28k, False: 10]
  |  |  |  |  |  Branch (739:52): [True: 5.27k, False: 2]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  346|     12|      *nextTokPtr = ptr;
  347|     12|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  348|     12|    }
  349|  5.29k|  }
  350|    876|  *nextTokPtr = ptr;
  351|    876|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|    876|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|    888|}
xmltok.c:little2_scanEndTag:
  432|  1.59k|                   const char **nextTokPtr) {
  433|  1.59k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.59k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.59k|    {                                                                          \
  |  |  |  |  135|  1.59k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.59k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  1.59k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.59k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.59k|    }
  |  |  ------------------
  ------------------
  434|  1.59k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.59k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.59k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.24k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.24k, False: 354]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  435|  1.42k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.57k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 334, False: 1.26k]
  |  |  ------------------
  |  |  111|  1.57k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    334|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    334|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    334|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 2, False: 332]
  |  |  ------------------
  |  |  112|      2|      *nextTokPtr = ptr;                                                       \
  |  |  113|      2|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      2|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      2|    }                                                                          \
  |  |  115|  1.57k|    /* fall through */                                                         \
  |  |  116|  1.57k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 729, False: 866]
  |  |  ------------------
  |  |  117|  1.57k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 512, False: 1.08k]
  |  |  ------------------
  |  |  118|  1.57k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.57k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.57k|    break;                                                                     \
  |  |  120|  1.57k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.59k]
  |  |  |  |  ------------------
  |  |  |  |  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.59k]
  |  |  |  |  ------------------
  |  |  |  |  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.58k]
  |  |  |  |  ------------------
  |  |  |  |  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.59k]
  ------------------
  437|      5|    *nextTokPtr = ptr;
  438|      5|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  439|  1.59k|  }
  440|  3.00k|  while (HAS_CHAR(enc, ptr, end)) {
  441|  3.00k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  3.00k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  3.00k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.50k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.50k, False: 502]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  442|  4.48k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.50k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 478, False: 2.53k]
  |  |  ------------------
  |  |   82|  1.50k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|    478|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|    478|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    478|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 15, False: 463]
  |  |  ------------------
  |  |   83|     15|      *nextTokPtr = ptr;                                                       \
  |  |   84|     15|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     15|    }                                                                          \
  |  |   86|  1.50k|    /* fall through */                                                         \
  |  |   87|  1.50k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 197, False: 2.81k]
  |  |  ------------------
  |  |   88|    895|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 235, False: 2.77k]
  |  |  ------------------
  |  |   89|  1.10k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 210, False: 2.79k]
  |  |  ------------------
  |  |   90|  1.31k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 206, False: 2.80k]
  |  |  ------------------
  |  |   91|  1.50k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 194, False: 2.81k]
  |  |  ------------------
  |  |   92|  1.50k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  1.50k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.50k|    break;                                                                     \
  |  |   94|  1.50k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 3.00k]
  |  |  |  |  ------------------
  |  |  |  |   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.00k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     19|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 19, False: 2.98k]
  |  |  |  |  ------------------
  |  |  |  |   71|     19|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 15]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     15|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     30|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     15|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     15|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     15|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     15|    }                                                                          \
  |  |  |  |   77|     15|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  443|    237|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 237, False: 2.77k]
  ------------------
  444|    482|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 245, False: 2.76k]
  ------------------
  445|    905|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 423, False: 2.58k]
  ------------------
  446|  1.60k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|    905|#  define MINBPC(enc) 2
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|    739|#  define MINBPC(enc) 2
  ------------------
  447|  1.60k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.60k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.60k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.58k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.58k, False: 17]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  448|    205|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 205, False: 1.39k]
  ------------------
  449|    524|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 319, False: 1.28k]
  ------------------
  450|    739|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 215, False: 1.38k]
  ------------------
  451|    739|          break;
  452|    843|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 843, False: 757]
  ------------------
  453|    843|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    843|#  define MINBPC(enc) 2
  ------------------
  454|    843|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|    843|#define XML_TOK_END_TAG 5
  ------------------
  455|     18|        default:
  ------------------
  |  Branch (455:9): [True: 18, False: 1.58k]
  ------------------
  456|     18|          *nextTokPtr = ptr;
  457|     18|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     18|#define XML_TOK_INVALID 0
  ------------------
  458|  1.60k|        }
  459|  1.60k|      }
  460|     44|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     44|#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.00k]
  ------------------
  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|    557|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 557, False: 2.45k]
  ------------------
  469|    557|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    557|#  define MINBPC(enc) 2
  ------------------
  470|    557|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|    557|#define XML_TOK_END_TAG 5
  ------------------
  471|      7|    default:
  ------------------
  |  Branch (471:5): [True: 7, False: 3.00k]
  ------------------
  472|      7|      *nextTokPtr = ptr;
  473|      7|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  474|  3.00k|    }
  475|  3.00k|  }
  476|     70|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     70|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  1.57k|}
xmltok.c:little2_scanAtts:
  573|  2.86k|                 const char **nextTokPtr) {
  574|  2.86k|#  ifdef XML_NS
  575|  2.86k|  int hadColon = 0;
  576|  2.86k|#  endif
  577|   153k|  while (HAS_CHAR(enc, ptr, end)) {
  578|   153k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   153k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   153k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   147k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 147k, False: 6.19k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  579|  37.8k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  8.49k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 6.18k, False: 147k]
  |  |  ------------------
  |  |   82|  8.49k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  6.18k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  6.18k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  6.18k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 17, False: 6.16k]
  |  |  ------------------
  |  |   83|     17|      *nextTokPtr = ptr;                                                       \
  |  |   84|     17|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     17|    }                                                                          \
  |  |   86|  8.49k|    /* fall through */                                                         \
  |  |   87|  8.49k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 1.24k, False: 152k]
  |  |  ------------------
  |  |   88|  7.89k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 488, False: 153k]
  |  |  ------------------
  |  |   89|  8.09k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 195, False: 153k]
  |  |  ------------------
  |  |   90|  8.28k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 194, False: 153k]
  |  |  ------------------
  |  |   91|  8.49k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 210, False: 153k]
  |  |  ------------------
  |  |   92|  8.49k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  8.49k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  8.49k|    break;                                                                     \
  |  |   94|  8.49k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 153k]
  |  |  |  |  ------------------
  |  |  |  |   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: 153k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|      8|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 8, False: 153k]
  |  |  |  |  ------------------
  |  |  |  |   71|      8|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 3]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      3|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      6|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      3|    }                                                                          \
  |  |  |  |   77|      3|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  580|      0|#  ifdef XML_NS
  581|      0|    case BT_COLON:
  ------------------
  |  Branch (581:5): [True: 0, False: 153k]
  ------------------
  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|    388|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 388, False: 153k]
  ------------------
  598|    768|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 380, False: 153k]
  ------------------
  599|  1.05k|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 290, False: 153k]
  ------------------
  600|  2.02k|      for (;;) {
  601|  2.02k|        int t;
  602|       |
  603|  2.02k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.02k|#  define MINBPC(enc) 2
  ------------------
  604|  2.02k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.02k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.02k|    {                                                                          \
  |  |  |  |  135|  2.02k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.02k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.02k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 44, False: 1.98k]
  |  |  |  |  ------------------
  |  |  |  |  136|     44|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     44|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     44|      }                                                                        \
  |  |  |  |  138|  2.02k|    }
  |  |  ------------------
  ------------------
  605|  1.98k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  1.98k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.98k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.97k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 1.97k, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  606|  1.98k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 1.00k, False: 984]
  ------------------
  607|  1.00k|          break;
  608|    984|        switch (t) {
  609|    502|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 502, False: 482]
  ------------------
  610|    744|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 242, False: 742]
  ------------------
  611|    970|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 226, False: 758]
  ------------------
  612|    970|          break;
  613|     14|        default:
  ------------------
  |  Branch (613:9): [True: 14, False: 970]
  ------------------
  614|     14|          *nextTokPtr = ptr;
  615|     14|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  616|    984|        }
  617|    984|      }
  618|       |      /* fall through */
  619|   145k|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 144k, False: 9.58k]
  ------------------
  620|   145k|      int open;
  621|   145k|#  ifdef XML_NS
  622|   145k|      hadColon = 0;
  623|   145k|#  endif
  624|   146k|      for (;;) {
  625|   146k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   146k|#  define MINBPC(enc) 2
  ------------------
  626|   146k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   146k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   146k|    {                                                                          \
  |  |  |  |  135|   146k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   146k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   146k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 44, False: 146k]
  |  |  |  |  ------------------
  |  |  |  |  136|     44|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     44|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     44|      }                                                                        \
  |  |  |  |  138|   146k|    }
  |  |  ------------------
  ------------------
  627|   146k|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|   146k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   146k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   146k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 146k, False: 30]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  628|   146k|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 7.04k, False: 139k]
  |  Branch (628:32): [True: 138k, False: 1.20k]
  ------------------
  629|   145k|          break;
  630|  1.20k|        switch (open) {
  631|    474|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 474, False: 727]
  ------------------
  632|    964|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 490, False: 711]
  ------------------
  633|  1.17k|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 206, False: 995]
  ------------------
  634|  1.17k|          break;
  635|     31|        default:
  ------------------
  |  Branch (635:9): [True: 31, False: 1.17k]
  ------------------
  636|     31|          *nextTokPtr = ptr;
  637|     31|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     31|#define XML_TOK_INVALID 0
  ------------------
  638|  1.20k|        }
  639|  1.20k|      }
  640|   145k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   145k|#  define MINBPC(enc) 2
  ------------------
  641|       |      /* in attribute value */
  642|  2.16M|      for (;;) {
  643|  2.16M|        int t;
  644|  2.16M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.16M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.16M|    {                                                                          \
  |  |  |  |  135|  2.16M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.16M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.16M|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 64, False: 2.16M]
  |  |  |  |  ------------------
  |  |  |  |  136|     64|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     64|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     64|      }                                                                        \
  |  |  |  |  138|  2.16M|    }
  |  |  ------------------
  ------------------
  645|  2.16M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  785|  2.16M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.16M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   651k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 651k, False: 1.51M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  646|  2.16M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 145k, False: 2.02M]
  ------------------
  647|   145k|          break;
  648|  2.02M|        switch (t) {
  649|   345k|          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.02M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 2.02M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|   172k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|   172k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 172k, False: 1.85M]
  |  |  |  |  ------------------
  |  |  |  |   50|   172k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 29, False: 172k]
  |  |  |  |  ------------------
  |  |  |  |   51|   172k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     29|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|   172k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   172k|#    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|   172k|    ptr += n;                                                                  \
  |  |  |  |   57|   172k|    break;
  |  |  ------------------
  |  |   63|   172k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 12, False: 2.02M]
  |  |  ------------------
  |  |   64|     12|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 2.02M]
  |  |  ------------------
  |  |   65|     16|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 2.02M]
  |  |  ------------------
  |  |   66|     16|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     16|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|  5.94k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 5.94k, False: 2.01M]
  ------------------
  651|  5.94k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  782|  5.94k|#  define PREFIX(ident) little2_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  783|  5.94k|#  define MINBPC(enc) 2
  ------------------
  652|  5.94k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 14, False: 5.93k]
  ------------------
  653|     14|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 9, False: 5]
  ------------------
  654|      9|              *nextTokPtr = ptr;
  655|     14|            return tok;
  656|     14|          }
  657|  5.93k|          break;
  658|  5.94k|        }
  659|  5.93k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 5, False: 2.02M]
  ------------------
  660|      5|          *nextTokPtr = ptr;
  661|      5|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      5|#define XML_TOK_INVALID 0
  ------------------
  662|  1.84M|        default:
  ------------------
  |  Branch (662:9): [True: 1.84M, False: 178k]
  ------------------
  663|  1.84M|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.84M|#  define MINBPC(enc) 2
  ------------------
  664|  1.84M|          break;
  665|  2.02M|        }
  666|  2.02M|      }
  667|   145k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   145k|#  define MINBPC(enc) 2
  ------------------
  668|   145k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   145k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   145k|    {                                                                          \
  |  |  |  |  135|   145k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   145k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   145k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 6, False: 145k]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|   145k|    }
  |  |  ------------------
  ------------------
  669|   145k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   145k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   145k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   145k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 145k, False: 25]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  670|   138k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 138k, False: 6.48k]
  ------------------
  671|   141k|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 3.03k, False: 142k]
  ------------------
  672|   143k|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 1.60k, False: 143k]
  ------------------
  673|   143k|        break;
  674|    244|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 244, False: 144k]
  ------------------
  675|    244|        goto sol;
  676|  1.57k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 1.57k, False: 143k]
  ------------------
  677|  1.57k|        goto gt;
  678|     27|      default:
  ------------------
  |  Branch (678:7): [True: 27, False: 145k]
  ------------------
  679|     27|        *nextTokPtr = ptr;
  680|     27|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     27|#define XML_TOK_INVALID 0
  ------------------
  681|   145k|      }
  682|       |      /* ptr points to closing quote */
  683|   148k|      for (;;) {
  684|   148k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|   148k|#  define MINBPC(enc) 2
  ------------------
  685|   148k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   148k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   148k|    {                                                                          \
  |  |  |  |  135|   148k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   148k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|   148k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 42, False: 148k]
  |  |  |  |  ------------------
  |  |  |  |  136|     42|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     42|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     42|      }                                                                        \
  |  |  |  |  138|   148k|    }
  |  |  ------------------
  ------------------
  686|   148k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   148k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   148k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   147k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 147k, False: 819]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  687|   111k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   142k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 791, False: 147k]
  |  |  ------------------
  |  |  111|   142k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|    791|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|    791|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    791|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 3, False: 788]
  |  |  ------------------
  |  |  112|      3|      *nextTokPtr = ptr;                                                       \
  |  |  113|      3|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      3|    }                                                                          \
  |  |  115|   142k|    /* fall through */                                                         \
  |  |  116|   142k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 109k, False: 38.3k]
  |  |  ------------------
  |  |  117|   142k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 32.0k, False: 116k]
  |  |  ------------------
  |  |  118|   142k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|   142k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   142k|    break;                                                                     \
  |  |  120|   142k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 148k]
  |  |  |  |  ------------------
  |  |  |  |  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: 148k]
  |  |  |  |  ------------------
  |  |  |  |  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: 148k]
  |  |  |  |  ------------------
  |  |  |  |  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;
  |  |  ------------------
  ------------------
  688|  3.71k|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 3.71k, False: 144k]
  ------------------
  689|  4.20k|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 481, False: 147k]
  ------------------
  690|  4.92k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 729, False: 147k]
  ------------------
  691|  4.92k|          continue;
  692|    362|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 362, False: 147k]
  ------------------
  693|  1.93k|        gt:
  694|  1.93k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  1.93k|#  define MINBPC(enc) 2
  ------------------
  695|  1.93k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  1.93k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|    196|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 196, False: 148k]
  ------------------
  697|    440|        sol:
  698|    440|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    440|#  define MINBPC(enc) 2
  ------------------
  699|    440|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    440|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    440|    {                                                                          \
  |  |  |  |  135|    440|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    440|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|    440|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 11, False: 429]
  |  |  |  |  ------------------
  |  |  |  |  136|     11|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     11|      }                                                                        \
  |  |  |  |  138|    440|    }
  |  |  ------------------
  ------------------
  700|    429|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|    429|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    429|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 424, False: 5]
  |  |  |  |  |  Branch (739:52): [True: 420, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  701|      9|            *nextTokPtr = ptr;
  702|      9|            return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  703|      9|          }
  704|    420|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    420|#  define MINBPC(enc) 2
  ------------------
  705|    420|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|    420|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|      6|        default:
  ------------------
  |  Branch (706:9): [True: 6, False: 148k]
  ------------------
  707|      6|          *nextTokPtr = ptr;
  708|      6|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  709|   148k|        }
  710|   142k|        break;
  711|   148k|      }
  712|   142k|      break;
  713|   143k|    }
  714|   142k|    default:
  ------------------
  |  Branch (714:5): [True: 7, False: 153k]
  ------------------
  715|      7|      *nextTokPtr = ptr;
  716|      7|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  717|   153k|    }
  718|   153k|  }
  719|     90|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     90|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  2.86k|}
xmltok.c:little2_scanRef:
  545|  23.6k|                const char **nextTokPtr) {
  546|  23.6k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  23.6k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  23.6k|    {                                                                          \
  |  |  |  |  135|  23.6k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  23.6k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  23.6k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 38, False: 23.6k]
  |  |  |  |  ------------------
  |  |  |  |  136|     38|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     38|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     38|      }                                                                        \
  |  |  |  |  138|  23.6k|    }
  |  |  ------------------
  ------------------
  547|  23.6k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  23.6k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  23.6k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  22.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 22.1k, False: 1.50k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  548|  6.59k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  16.4k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.48k, False: 22.1k]
  |  |  ------------------
  |  |  111|  16.4k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  791|  1.48k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) LITTLE2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  743|  1.48k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.48k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 11, False: 1.47k]
  |  |  ------------------
  |  |  112|     11|      *nextTokPtr = ptr;                                                       \
  |  |  113|     11|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     11|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     11|    }                                                                          \
  |  |  115|  16.4k|    /* fall through */                                                         \
  |  |  116|  16.4k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.61k, False: 20.0k]
  |  |  ------------------
  |  |  117|  16.4k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 11.3k, False: 12.2k]
  |  |  ------------------
  |  |  118|  16.4k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  16.4k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  16.4k|    break;                                                                     \
  |  |  120|  16.4k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 23.6k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 23.6k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     13|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 13, False: 23.6k]
  |  |  |  |  ------------------
  |  |  |  |  100|     13|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 8]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      8|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     16|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  790|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      8|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      8|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      8|    }                                                                          \
  |  |  |  |  106|      8|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  549|  7.13k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 7.13k, False: 16.4k]
  ------------------
  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: 23.6k]
  ------------------
  552|      7|    *nextTokPtr = ptr;
  553|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  554|  23.6k|  }
  555|  36.8k|  while (HAS_CHAR(enc, ptr, end)) {
  556|  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|  32.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 32.4k, False: 4.42k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  557|  82.3k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  20.4k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 4.40k, False: 32.4k]
  |  |  ------------------
  |  |   82|  20.4k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  789|  4.40k|#  define IS_NAME_CHAR_MINBPC(enc, p) LITTLE2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  741|  4.40k|  UCS2_GET_NAMING(namePages, (unsigned char)p[1], (unsigned char)p[0])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  4.40k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 17, False: 4.38k]
  |  |  ------------------
  |  |   83|     17|      *nextTokPtr = ptr;                                                       \
  |  |   84|     17|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     17|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     17|    }                                                                          \
  |  |   86|  20.4k|    /* fall through */                                                         \
  |  |   87|  20.4k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 13.8k, False: 23.0k]
  |  |  ------------------
  |  |   88|  19.5k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 1.40k, False: 35.4k]
  |  |  ------------------
  |  |   89|  19.8k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 286, False: 36.5k]
  |  |  ------------------
  |  |   90|  20.2k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 379, False: 36.4k]
  |  |  ------------------
  |  |   91|  20.4k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 212, False: 36.6k]
  |  |  ------------------
  |  |   92|  20.4k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  783|  20.4k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  20.4k|    break;                                                                     \
  |  |   94|  20.4k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 36.8k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 36.8k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  788|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     20|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 20, False: 36.8k]
  |  |  |  |  ------------------
  |  |  |  |   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|  16.3k|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 16.3k, False: 20.5k]
  ------------------
  559|  16.3k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  16.3k|#  define MINBPC(enc) 2
  ------------------
  560|  16.3k|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|  16.3k|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|     10|    default:
  ------------------
  |  Branch (561:5): [True: 10, False: 36.8k]
  ------------------
  562|     10|      *nextTokPtr = ptr;
  563|     10|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  564|  36.8k|    }
  565|  36.8k|  }
  566|     61|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     61|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|  16.4k|}
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: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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: 4.49k, False: 2.63k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  517|  4.49k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  4.49k|#  define PREFIX(ident) little2_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  4.49k|#  define MINBPC(enc) 2
  ------------------
  518|  2.63k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.63k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.63k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.63k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.63k, False: 3]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  519|  2.63k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 2.63k, False: 8]
  ------------------
  520|  2.63k|      break;
  521|      8|    default:
  ------------------
  |  Branch (521:5): [True: 8, False: 2.63k]
  ------------------
  522|      8|      *nextTokPtr = ptr;
  523|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  524|  2.63k|    }
  525|  7.71k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  2.63k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  5.09k|#  define MINBPC(enc) 2
  ------------------
  526|  7.71k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  7.71k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  7.71k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.69k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 7.69k, False: 20]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  527|  5.09k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 5.09k, False: 2.62k]
  ------------------
  528|  5.09k|        break;
  529|  2.60k|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 2.60k, False: 5.11k]
  ------------------
  530|  2.60k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.60k|#  define MINBPC(enc) 2
  ------------------
  531|  2.60k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  2.60k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     20|      default:
  ------------------
  |  Branch (532:7): [True: 20, False: 7.69k]
  ------------------
  533|     20|        *nextTokPtr = ptr;
  534|     20|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     20|#define XML_TOK_INVALID 0
  ------------------
  535|  7.71k|      }
  536|  7.71k|    }
  537|  2.63k|  }
  538|     11|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  7.13k|}
xmltok.c:little2_scanHexCharRef:
  483|  4.49k|                       const char **nextTokPtr) {
  484|  4.49k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  4.49k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  4.49k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  4.49k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 4.49k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  4.49k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  4.49k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  4.49k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.49k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 4.49k, False: 5]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  486|  3.02k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 3.02k, False: 1.47k]
  ------------------
  487|  4.48k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 1.46k, False: 3.03k]
  ------------------
  488|  4.48k|      break;
  489|      9|    default:
  ------------------
  |  Branch (489:5): [True: 9, False: 4.48k]
  ------------------
  490|      9|      *nextTokPtr = ptr;
  491|      9|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  492|  4.49k|    }
  493|  16.0k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  4.48k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  11.5k|#  define MINBPC(enc) 2
  ------------------
  494|  16.0k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  16.0k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  16.0k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  15.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 15.9k, False: 23]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  495|  5.83k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 5.83k, False: 10.1k]
  ------------------
  496|  11.5k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 5.69k, False: 10.3k]
  ------------------
  497|  11.5k|        break;
  498|  4.44k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 4.44k, False: 11.5k]
  ------------------
  499|  4.44k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  4.44k|#  define MINBPC(enc) 2
  ------------------
  500|  4.44k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  4.44k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|     26|      default:
  ------------------
  |  Branch (501:7): [True: 26, False: 15.9k]
  ------------------
  502|     26|        *nextTokPtr = ptr;
  503|     26|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     26|#define XML_TOK_INVALID 0
  ------------------
  504|  16.0k|      }
  505|  16.0k|    }
  506|  4.48k|  }
  507|     13|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     13|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  4.49k|}
xmltok.c:little2_cdataSectionTok:
  356|  25.4k|                        const char **nextTokPtr) {
  357|  25.4k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 154, False: 25.3k]
  ------------------
  358|    154|    return XML_TOK_NONE;
  ------------------
  |  |   51|    154|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|  25.3k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  783|  25.3k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (359:7): [Folded - Ignored]
  ------------------
  360|  25.3k|    size_t n = end - ptr;
  361|  25.3k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  783|  25.3k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (361:9): [True: 2.72k, False: 22.6k]
  ------------------
  362|  2.72k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  783|  2.72k|#  define MINBPC(enc) 2
  ------------------
  363|  2.72k|      if (n == 0)
  ------------------
  |  Branch (363:11): [True: 12, False: 2.71k]
  ------------------
  364|     12|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     12|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  365|  2.71k|      end = ptr + n;
  366|  2.71k|    }
  367|  25.3k|  }
  368|  25.3k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  25.3k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  25.3k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  18.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 18.4k, False: 6.90k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  369|  4.82k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 4.82k, False: 20.5k]
  ------------------
  370|  4.82k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.82k|#  define MINBPC(enc) 2
  ------------------
  371|  4.82k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.82k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.82k|    {                                                                          \
  |  |  |  |  135|  4.82k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.82k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  4.82k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 4.81k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  4.82k|    }
  |  |  ------------------
  ------------------
  372|  4.81k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  787|  4.81k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  4.81k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 3.48k, False: 1.33k]
  |  |  |  |  |  Branch (739:52): [True: 2.17k, False: 1.30k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  373|  2.63k|      break;
  374|  2.17k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.17k|#  define MINBPC(enc) 2
  ------------------
  375|  2.17k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.17k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.17k|    {                                                                          \
  |  |  |  |  135|  2.17k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.17k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  2.17k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 7, False: 2.17k]
  |  |  |  |  ------------------
  |  |  |  |  136|      7|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      7|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      7|      }                                                                        \
  |  |  |  |  138|  2.17k|    }
  |  |  ------------------
  ------------------
  376|  2.17k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  787|  2.17k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  2.17k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.55k, False: 620]
  |  |  |  |  |  Branch (739:52): [True: 573, False: 979]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  377|  1.59k|      ptr -= MINBPC(enc);
  ------------------
  |  |  783|  1.59k|#  define MINBPC(enc) 2
  ------------------
  378|  1.59k|      break;
  379|  1.59k|    }
  380|    573|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|    573|#  define MINBPC(enc) 2
  ------------------
  381|    573|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|    573|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  9.30k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 9.30k, False: 16.0k]
  ------------------
  383|  9.30k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  9.30k|#  define MINBPC(enc) 2
  ------------------
  384|  9.30k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  9.30k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  9.30k|    {                                                                          \
  |  |  |  |  135|  9.30k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  9.30k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  783|  9.30k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 17, False: 9.28k]
  |  |  |  |  ------------------
  |  |  |  |  136|     17|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     17|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     17|      }                                                                        \
  |  |  |  |  138|  9.30k|    }
  |  |  ------------------
  ------------------
  385|  9.28k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  9.28k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  9.28k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.08k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 3.08k, False: 6.20k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 393, False: 8.89k]
  ------------------
  386|    393|      ptr += MINBPC(enc);
  ------------------
  |  |  783|    393|#  define MINBPC(enc) 2
  ------------------
  387|  9.28k|    *nextTokPtr = ptr;
  388|  9.28k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  9.28k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  2.38k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 2.38k, False: 22.9k]
  ------------------
  390|  2.38k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  2.38k|#  define MINBPC(enc) 2
  ------------------
  391|  2.38k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  2.38k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  8.65k|    INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 25.3k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 25.3k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  4.32k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  4.25k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 4.32k, False: 21.0k]
  |  |  |  |  ------------------
  |  |  |  |   50|  4.32k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 65, False: 4.25k]
  |  |  |  |  ------------------
  |  |  |  |   51|  4.25k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     65|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  4.25k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  4.25k|#    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|  4.25k|    ptr += n;                                                                  \
  |  |  |  |   57|  4.25k|    break;
  |  |  ------------------
  |  |   63|  4.25k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 34, False: 25.2k]
  |  |  ------------------
  |  |   64|     34|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 25.3k]
  |  |  ------------------
  |  |   65|     45|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 11, False: 25.3k]
  |  |  ------------------
  |  |   66|     45|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     45|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     45|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  4.44k|  default:
  ------------------
  |  Branch (393:3): [True: 4.44k, False: 20.8k]
  ------------------
  394|  4.44k|    ptr += MINBPC(enc);
  ------------------
  |  |  783|  4.44k|#  define MINBPC(enc) 2
  ------------------
  395|  4.44k|    break;
  396|  25.3k|  }
  397|  1.03M|  while (HAS_CHAR(enc, ptr, end)) {
  398|  1.03M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  1.03M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  1.03M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  34.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 34.8k, False: 995k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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.03M]
  |  |  ------------------
  |  |  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.03M]
  |  |  ------------------
  |  |  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|  6.86k|      LEAD_CASE(4)
  ------------------
  |  |  400|  6.80k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 6.86k, False: 1.02M]
  |  |  ------------------
  |  |  401|  6.86k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  6.80k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 57, False: 6.80k]
  |  |  ------------------
  |  |  402|     57|      *nextTokPtr = ptr;                                                       \
  |  |  403|     57|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     57|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|     57|    }                                                                          \
  |  |  405|  6.80k|    ptr += n;                                                                  \
  |  |  406|  6.80k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|     30|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 30, False: 1.03M]
  ------------------
  412|     30|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 0, False: 1.03M]
  ------------------
  413|     37|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 7, False: 1.03M]
  ------------------
  414|  7.98k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 7.94k, False: 1.02M]
  ------------------
  415|  9.86k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 1.88k, False: 1.02M]
  ------------------
  416|  12.7k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 2.88k, False: 1.02M]
  ------------------
  417|  12.7k|      *nextTokPtr = ptr;
  418|  12.7k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  12.7k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|  1.01M|    default:
  ------------------
  |  Branch (419:5): [True: 1.01M, False: 19.6k]
  ------------------
  420|  1.01M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.01M|#  define MINBPC(enc) 2
  ------------------
  421|  1.01M|      break;
  422|  1.03M|    }
  423|  1.03M|  }
  424|    136|  *nextTokPtr = ptr;
  425|    136|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    136|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  12.9k|}
xmltok.c:little2_attributeValueTok:
 1262|  39.1k|                          const char **nextTokPtr) {
 1263|  39.1k|  const char *start;
 1264|  39.1k|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 2.09k, False: 37.0k]
  ------------------
 1265|  2.09k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  2.09k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|  37.0k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  37.0k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  37.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  37.0k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 37.0k]
  ------------------
 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|  37.0k|  start = ptr;
 1275|   803k|  while (HAS_CHAR(enc, ptr, end)) {
 1276|   803k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   803k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   803k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  79.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 79.7k, False: 724k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 803k]
  |  |  ------------------
  |  | 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: 803k]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1283|   152k|      LEAD_CASE(4)
  ------------------
  |  | 1278|   152k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 152k, False: 651k]
  |  |  ------------------
  |  | 1279|   152k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|   152k|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|  6.15k|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 6.15k, False: 797k]
  ------------------
 1286|  6.15k|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 3.37k, False: 2.78k]
  ------------------
 1287|  3.37k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  3.37k|#  define PREFIX(ident) little2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  3.37k|#  define MINBPC(enc) 2
  ------------------
 1288|  2.78k|      *nextTokPtr = ptr;
 1289|  2.78k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.78k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      1|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 1, False: 803k]
  ------------------
 1291|       |      /* this is for inside entity references */
 1292|      1|      *nextTokPtr = ptr;
 1293|      1|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1294|  5.36k|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 5.36k, False: 798k]
  ------------------
 1295|  5.36k|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 3.32k, False: 2.04k]
  ------------------
 1296|  3.32k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  3.32k|#  define MINBPC(enc) 2
  ------------------
 1297|  3.32k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  3.32k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|  3.32k|      }
 1299|  2.04k|      *nextTokPtr = ptr;
 1300|  2.04k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.04k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|  9.92k|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 9.92k, False: 794k]
  ------------------
 1302|  9.92k|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 6.81k, False: 3.10k]
  ------------------
 1303|  6.81k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  6.81k|#  define MINBPC(enc) 2
  ------------------
 1304|  6.81k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  6.81k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  6.81k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  6.81k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 447, False: 6.37k]
  ------------------
 1305|    447|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    447|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|  6.37k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  6.37k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  6.37k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.85k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 3.85k, False: 2.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 756, False: 5.61k]
  ------------------
 1307|    756|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    756|#  define MINBPC(enc) 2
  ------------------
 1308|  6.37k|        *nextTokPtr = ptr;
 1309|  6.37k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  6.37k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|  6.81k|      }
 1311|  3.10k|      *nextTokPtr = ptr;
 1312|  3.10k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  3.10k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  14.9k|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 14.9k, False: 789k]
  ------------------
 1314|  14.9k|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 9.01k, False: 5.90k]
  ------------------
 1315|  9.01k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  9.01k|#  define MINBPC(enc) 2
  ------------------
 1316|  9.01k|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  9.01k|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  9.01k|      }
 1318|  5.90k|      *nextTokPtr = ptr;
 1319|  5.90k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  5.90k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|   615k|    default:
  ------------------
  |  Branch (1320:5): [True: 615k, False: 188k]
  ------------------
 1321|   615k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   615k|#  define MINBPC(enc) 2
  ------------------
 1322|   615k|      break;
 1323|   803k|    }
 1324|   803k|  }
 1325|    663|  *nextTokPtr = ptr;
 1326|    663|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    663|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|  37.0k|}
xmltok.c:little2_entityValueTok:
 1331|   199k|                       const char **nextTokPtr) {
 1332|   199k|  const char *start;
 1333|   199k|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 1.59k, False: 197k]
  ------------------
 1334|  1.59k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.59k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|   197k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   197k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   197k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|   197k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 197k]
  ------------------
 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|   197k|  start = ptr;
 1344|  24.4M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  24.4M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  24.4M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  24.4M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   454k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 454k, False: 23.9M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1346|      0|#  define LEAD_CASE(n)                                                         \
 1347|      0|  case BT_LEAD##n:                                                             \
 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1349|      0|    break;
 1350|      0|      LEAD_CASE(2)
  ------------------
  |  | 1347|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 0, False: 24.4M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1351|      0|      LEAD_CASE(3)
  ------------------
  |  | 1347|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 0, False: 24.4M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1352|   115k|      LEAD_CASE(4)
  ------------------
  |  | 1347|   115k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 115k, False: 24.3M]
  |  |  ------------------
  |  | 1348|   115k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|   115k|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  6.26k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 6.26k, False: 24.4M]
  ------------------
 1355|  6.26k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 3.38k, False: 2.87k]
  ------------------
 1356|  3.38k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|  3.38k|#  define PREFIX(ident) little2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|  3.38k|#  define MINBPC(enc) 2
  ------------------
 1357|  2.87k|      *nextTokPtr = ptr;
 1358|  2.87k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  2.87k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      7|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 7, False: 24.4M]
  ------------------
 1360|      7|      if (ptr == start) {
  ------------------
  |  Branch (1360:11): [True: 5, False: 2]
  ------------------
 1361|      5|        int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  782|      5|#  define PREFIX(ident) little2_##ident
  ------------------
                      int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  783|      5|#  define MINBPC(enc) 2
  ------------------
 1362|      5|        return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   89|      5|#define XML_TOK_PERCENT 22
  ------------------
                      return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (1362:16): [True: 1, False: 4]
  ------------------
 1363|      5|      }
 1364|      2|      *nextTokPtr = ptr;
 1365|      2|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|      2|#define XML_TOK_DATA_CHARS 6
  ------------------
 1366|  28.5k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 28.5k, False: 24.3M]
  ------------------
 1367|  28.5k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 15.0k, False: 13.4k]
  ------------------
 1368|  15.0k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  15.0k|#  define MINBPC(enc) 2
  ------------------
 1369|  15.0k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  15.0k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|  15.0k|      }
 1371|  13.4k|      *nextTokPtr = ptr;
 1372|  13.4k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  13.4k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|   161k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 161k, False: 24.2M]
  ------------------
 1374|   161k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 86.3k, False: 75.5k]
  ------------------
 1375|  86.3k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  86.3k|#  define MINBPC(enc) 2
  ------------------
 1376|  86.3k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  86.3k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  86.3k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  86.3k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 202, False: 86.1k]
  ------------------
 1377|    202|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    202|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|  86.1k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  86.1k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  86.1k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  31.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 31.8k, False: 54.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 1.94k, False: 84.1k]
  ------------------
 1379|  1.94k|          ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.94k|#  define MINBPC(enc) 2
  ------------------
 1380|  86.1k|        *nextTokPtr = ptr;
 1381|  86.1k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  86.1k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|  86.3k|      }
 1383|  75.5k|      *nextTokPtr = ptr;
 1384|  75.5k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  75.5k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  24.1M|    default:
  ------------------
  |  Branch (1385:5): [True: 24.1M, False: 311k]
  ------------------
 1386|  24.1M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  24.1M|#  define MINBPC(enc) 2
  ------------------
 1387|  24.1M|      break;
 1388|  24.4M|    }
 1389|  24.4M|  }
 1390|    913|  *nextTokPtr = ptr;
 1391|    913|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    913|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|   197k|}
xmltok.c:little2_nameMatchesAscii:
 1715|  29.6k|                         const char *end1, const char *ptr2) {
 1716|  29.6k|  UNUSED_P(enc);
  ------------------
  |  |  135|  29.6k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|   116k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  783|  86.9k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1717:10): [True: 102k, False: 14.4k]
  ------------------
 1718|   102k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  783|   102k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1718:9): [True: 34, False: 102k]
  ------------------
 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|     34|      return 0; /* LCOV_EXCL_LINE */
 1725|     34|    }
 1726|   102k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  787|   102k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|   102k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 102k, False: 30]
  |  |  |  |  |  Branch (739:52): [True: 86.9k, False: 15.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1727|  15.1k|      return 0;
 1728|   102k|  }
 1729|  14.4k|  return ptr1 == end1;
 1730|  29.6k|}
xmltok.c:little2_nameLength:
 1733|  13.5k|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  13.5k|  const char *start = ptr;
 1735|   832k|  for (;;) {
 1736|   832k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|   832k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|   832k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  25.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 25.1k, False: 807k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 832k]
  |  |  ------------------
  |  | 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: 832k]
  |  |  ------------------
  |  | 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: 832k]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1744|      0|#  undef LEAD_CASE
 1745|   807k|    case BT_NONASCII:
  ------------------
  |  Branch (1745:5): [True: 807k, False: 25.1k]
  ------------------
 1746|   814k|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 7.01k, False: 825k]
  ------------------
 1747|   814k|#  ifdef XML_NS
 1748|   814k|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 832k]
  ------------------
 1749|   814k|#  endif
 1750|   818k|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 4.03k, False: 828k]
  ------------------
 1751|   819k|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 438, False: 832k]
  ------------------
 1752|   819k|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 0, False: 832k]
  ------------------
 1753|   819k|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 127, False: 832k]
  ------------------
 1754|   819k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|   819k|#  define MINBPC(enc) 2
  ------------------
 1755|   819k|      break;
 1756|  13.5k|    default:
  ------------------
  |  Branch (1756:5): [True: 13.5k, False: 819k]
  ------------------
 1757|  13.5k|      return (int)(ptr - start);
 1758|   832k|    }
 1759|   832k|  }
 1760|  13.5k|}
xmltok.c:little2_getAtts:
 1510|  9.24k|                ATTRIBUTE *atts) {
 1511|  9.24k|  enum { other, inName, inValue } state = inName;
 1512|  9.24k|  int nAtts = 0;
 1513|  9.24k|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  4.70M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  9.24k|#  define MINBPC(enc) 2
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  4.69M|#  define MINBPC(enc) 2
  ------------------
 1517|  4.70M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  4.70M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  4.70M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.38M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 2.38M, False: 2.32M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1518|      0|#  define START_NAME                                                           \
 1519|      0|    if (state == other) {                                                      \
 1520|      0|      if (nAtts < attsMax) {                                                   \
 1521|      0|        atts[nAtts].name = ptr;                                                \
 1522|      0|        atts[nAtts].normalized = 1;                                            \
 1523|      0|      }                                                                        \
 1524|      0|      state = inName;                                                          \
 1525|      0|    }
 1526|      0|#  define LEAD_CASE(n)                                                         \
 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
 1529|      0|    break;
 1530|      0|      LEAD_CASE(2)
  ------------------
  |  | 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 0, False: 4.70M]
  |  |  ------------------
  |  | 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: 4.70M]
  |  |  ------------------
  |  | 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|   179k|      LEAD_CASE(4)
  ------------------
  |  | 1527|   179k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 179k, False: 4.52M]
  |  |  ------------------
  |  | 1528|   179k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|   179k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 179k]
  |  |  |  |  ------------------
  |  |  |  | 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|   179k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|   179k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|  2.14M|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 2.14M, False: 2.56M]
  ------------------
 1535|  2.41M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 278k, False: 4.42M]
  ------------------
 1536|  2.50M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 87.4k, False: 4.61M]
  ------------------
 1537|  2.50M|      START_NAME
  ------------------
  |  | 1519|  2.50M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 283k, False: 2.22M]
  |  |  ------------------
  |  | 1520|   283k|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 144k, False: 138k]
  |  |  ------------------
  |  | 1521|   144k|        atts[nAtts].name = ptr;                                                \
  |  | 1522|   144k|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|   144k|      }                                                                        \
  |  | 1524|   283k|      state = inName;                                                          \
  |  | 1525|   283k|    }
  ------------------
 1538|  2.50M|      break;
 1539|      0|#  undef START_NAME
 1540|  29.1k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 29.1k, False: 4.67M]
  ------------------
 1541|  29.1k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 11.0k, False: 18.1k]
  ------------------
 1542|  11.0k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 6.76k, False: 4.24k]
  ------------------
 1543|  6.76k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|  6.76k|#  define MINBPC(enc) 2
  ------------------
 1544|  11.0k|        state = inValue;
 1545|  11.0k|        open = BT_QUOT;
 1546|  18.1k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 11.0k, False: 7.13k]
  ------------------
 1547|  11.0k|        state = other;
 1548|  11.0k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 6.76k, False: 4.24k]
  ------------------
 1549|  6.76k|          atts[nAtts].valueEnd = ptr;
 1550|  11.0k|        nAtts++;
 1551|  11.0k|      }
 1552|  29.1k|      break;
 1553|   550k|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 550k, False: 4.15M]
  ------------------
 1554|   550k|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 272k, False: 277k]
  ------------------
 1555|   272k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 138k, False: 134k]
  ------------------
 1556|   138k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  783|   138k|#  define MINBPC(enc) 2
  ------------------
 1557|   272k|        state = inValue;
 1558|   272k|        open = BT_APOS;
 1559|   277k|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 272k, False: 4.94k]
  ------------------
 1560|   272k|        state = other;
 1561|   272k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 138k, False: 134k]
  ------------------
 1562|   138k|          atts[nAtts].valueEnd = ptr;
 1563|   272k|        nAtts++;
 1564|   272k|      }
 1565|   550k|      break;
 1566|  7.33k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 7.33k, False: 4.69M]
  ------------------
 1567|  7.33k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 5.51k, False: 1.81k]
  ------------------
 1568|  5.51k|        atts[nAtts].normalized = 0;
 1569|  7.33k|      break;
 1570|   747k|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 747k, False: 3.95M]
  ------------------
 1571|   747k|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 1.97k, False: 745k]
  ------------------
 1572|  1.97k|        state = other;
 1573|   745k|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 463k, False: 281k]
  |  Branch (1573:36): [True: 237k, False: 225k]
  |  Branch (1573:55): [True: 118k, False: 119k]
  ------------------
 1574|   745k|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 27.2k, False: 91.6k]
  ------------------
 1575|   118k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  786|  91.6k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  91.6k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 91.6k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|   210k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 4.29k, False: 87.3k]
  ------------------
 1576|   118k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  786|  87.3k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  87.3k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 80.8k, False: 6.48k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|   206k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 51.6k, False: 35.7k]
  ------------------
 1577|   118k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  785|  35.7k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  35.7k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  29.2k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 29.2k, False: 6.48k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 25.5k, False: 10.1k]
  ------------------
 1578|   108k|        atts[nAtts].normalized = 0;
 1579|   747k|      break;
 1580|  71.0k|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 71.0k, False: 4.63M]
  ------------------
 1581|  79.3k|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 8.31k, False: 4.69M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|  79.3k|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 2.29k, False: 77.0k]
  ------------------
 1585|  2.29k|        state = other;
 1586|  77.0k|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 69.6k, False: 7.48k]
  |  Branch (1586:36): [True: 40.3k, False: 29.2k]
  ------------------
 1587|  40.3k|        atts[nAtts].normalized = 0;
 1588|  79.3k|      break;
 1589|   112k|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 112k, False: 4.58M]
  ------------------
 1590|   113k|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 1.29k, False: 4.69M]
  ------------------
 1591|   113k|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 9.24k, False: 104k]
  ------------------
 1592|  9.24k|        return nAtts;
 1593|   104k|      break;
 1594|   487k|    default:
  ------------------
  |  Branch (1594:5): [True: 487k, False: 4.21M]
  ------------------
 1595|   487k|      break;
 1596|  4.70M|    }
 1597|  4.70M|  }
 1598|       |  /* not reached */
 1599|  9.24k|}
xmltok.c:little2_charRefNumber:
 1602|  6.18k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  6.18k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  6.18k|  UNUSED_P(enc);
  ------------------
  |  |  135|  6.18k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  6.18k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  783|  6.18k|#  define MINBPC(enc) 2
  ------------------
 1607|  6.18k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  787|  6.18k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  6.18k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 6.18k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 3.92k, False: 2.25k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1608|  18.1k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  783|  3.92k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  787|  18.1k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  18.1k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 18.1k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 3.90k, False: 14.2k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1609|  14.2k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  14.1k|#  define MINBPC(enc) 2
  ------------------
 1610|  14.2k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  786|  14.2k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  14.2k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 14.2k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1611|  14.2k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 14.2k]
  ------------------
 1612|    508|      case ASCII_0:
  ------------------
  |  |   90|    508|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 508, False: 13.7k]
  ------------------
 1613|  1.43k|      case ASCII_1:
  ------------------
  |  |   91|  1.43k|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 926, False: 13.2k]
  ------------------
 1614|  3.03k|      case ASCII_2:
  ------------------
  |  |   92|  3.03k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 1.60k, False: 12.6k]
  ------------------
 1615|  3.86k|      case ASCII_3:
  ------------------
  |  |   93|  3.86k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 827, False: 13.3k]
  ------------------
 1616|  4.19k|      case ASCII_4:
  ------------------
  |  |   94|  4.19k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 329, False: 13.8k]
  ------------------
 1617|  5.65k|      case ASCII_5:
  ------------------
  |  |   95|  5.65k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 1.46k, False: 12.7k]
  ------------------
 1618|  6.26k|      case ASCII_6:
  ------------------
  |  |   96|  6.26k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 606, False: 13.6k]
  ------------------
 1619|  6.50k|      case ASCII_7:
  ------------------
  |  |   97|  6.50k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 243, False: 13.9k]
  ------------------
 1620|  7.12k|      case ASCII_8:
  ------------------
  |  |   98|  7.12k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 619, False: 13.6k]
  ------------------
 1621|  7.73k|      case ASCII_9:
  ------------------
  |  |   99|  7.73k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 613, False: 13.6k]
  ------------------
 1622|  7.73k|        result <<= 4;
 1623|  7.73k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  7.73k|#define ASCII_0 0x30
  ------------------
 1624|  7.73k|        break;
 1625|    684|      case ASCII_A:
  ------------------
  |  |   36|    684|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 684, False: 13.5k]
  ------------------
 1626|  1.85k|      case ASCII_B:
  ------------------
  |  |   37|  1.85k|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 1.17k, False: 13.0k]
  ------------------
 1627|  2.16k|      case ASCII_C:
  ------------------
  |  |   38|  2.16k|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 309, False: 13.9k]
  ------------------
 1628|  2.44k|      case ASCII_D:
  ------------------
  |  |   39|  2.44k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 275, False: 13.9k]
  ------------------
 1629|  2.81k|      case ASCII_E:
  ------------------
  |  |   40|  2.81k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 369, False: 13.8k]
  ------------------
 1630|  3.06k|      case ASCII_F:
  ------------------
  |  |   41|  3.06k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 254, False: 13.9k]
  ------------------
 1631|  3.06k|        result <<= 4;
 1632|  3.06k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  3.06k|#define ASCII_A 0x41
  ------------------
 1633|  3.06k|        break;
 1634|    250|      case ASCII_a:
  ------------------
  |  |   63|    250|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 250, False: 13.9k]
  ------------------
 1635|    684|      case ASCII_b:
  ------------------
  |  |   64|    684|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 434, False: 13.7k]
  ------------------
 1636|  1.32k|      case ASCII_c:
  ------------------
  |  |   65|  1.32k|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 636, False: 13.5k]
  ------------------
 1637|  1.63k|      case ASCII_d:
  ------------------
  |  |   66|  1.63k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 317, False: 13.9k]
  ------------------
 1638|  2.35k|      case ASCII_e:
  ------------------
  |  |   67|  2.35k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 720, False: 13.5k]
  ------------------
 1639|  3.42k|      case ASCII_f:
  ------------------
  |  |   68|  3.42k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 1.06k, False: 13.1k]
  ------------------
 1640|  3.42k|        result <<= 4;
 1641|  3.42k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  3.42k|#define ASCII_a 0x61
  ------------------
 1642|  3.42k|        break;
 1643|  14.2k|      }
 1644|  14.2k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 25, False: 14.1k]
  ------------------
 1645|     25|        return -1;
 1646|  14.2k|    }
 1647|  3.92k|  } else {
 1648|  8.87k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  787|  8.87k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  8.87k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 8.87k, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 2.25k, False: 6.61k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  6.61k|#  define MINBPC(enc) 2
  ------------------
 1649|  6.61k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  786|  6.61k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  6.61k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 6.61k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1650|  6.61k|      result *= 10;
 1651|  6.61k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  6.61k|#define ASCII_0 0x30
  ------------------
 1652|  6.61k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 1, False: 6.61k]
  ------------------
 1653|      1|        return -1;
 1654|  6.61k|    }
 1655|  2.25k|  }
 1656|  6.16k|  return checkCharRefNumber(result);
 1657|  6.18k|}
xmltok.c:little2_predefinedEntityName:
 1661|  11.4k|                             const char *end) {
 1662|  11.4k|  UNUSED_P(enc);
  ------------------
  |  |  135|  11.4k|#  define UNUSED_P(p) (void)p
  ------------------
 1663|  11.4k|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  783|  11.4k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1663:11): [True: 4.60k, False: 6.82k]
  ------------------
 1664|  1.38k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 1.38k, False: 10.0k]
  ------------------
 1665|  1.38k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  787|  1.38k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.38k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.14k, False: 236]
  |  |  |  |  |  Branch (739:52): [True: 625, False: 523]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1666|    625|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|    625|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|    625|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:34): [True: 228, False: 397]
  |  |  |  |  |  Branch (738:35): [True: 413, False: 212]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1667|    133|      case ASCII_l:
  ------------------
  |  |   74|    133|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 133, False: 492]
  ------------------
 1668|    133|        return ASCII_LT;
  ------------------
  |  |  111|    133|#define ASCII_LT 0x3C
  ------------------
 1669|    264|      case ASCII_g:
  ------------------
  |  |   69|    264|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 264, False: 361]
  ------------------
 1670|    264|        return ASCII_GT;
  ------------------
  |  |  113|    264|#define ASCII_GT 0x3E
  ------------------
 1671|    625|      }
 1672|    625|    }
 1673|    987|    break;
 1674|  1.91k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.91k, False: 9.52k]
  ------------------
 1675|  1.91k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  787|  1.91k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.91k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.51k, False: 399]
  |  |  |  |  |  Branch (739:52): [True: 1.17k, False: 333]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1676|  1.17k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.17k|#  define MINBPC(enc) 2
  ------------------
 1677|  1.17k|      if (CHAR_MATCHES(enc, ptr, ASCII_m)) {
  ------------------
  |  |  787|  1.17k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.17k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 946, False: 233]
  |  |  |  |  |  Branch (739:52): [True: 707, False: 239]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1678|    707|        ptr += MINBPC(enc);
  ------------------
  |  |  783|    707|#  define MINBPC(enc) 2
  ------------------
 1679|    707|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  787|    707|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    707|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 510, False: 197]
  |  |  |  |  |  Branch (739:52): [True: 287, False: 223]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1680|    287|          return ASCII_AMP;
  ------------------
  |  |  105|    287|#define ASCII_AMP 0x26
  ------------------
 1681|    707|      }
 1682|  1.17k|    }
 1683|  1.62k|    break;
 1684|  3.53k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 3.53k, False: 7.89k]
  ------------------
 1685|  3.53k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|  3.53k|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|  3.53k|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:34): [True: 431, False: 3.10k]
  |  |  |  |  |  Branch (738:35): [True: 3.16k, False: 363]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1686|  1.52k|    case ASCII_q:
  ------------------
  |  |   79|  1.52k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 1.52k, False: 2.01k]
  ------------------
 1687|  1.52k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.52k|#  define MINBPC(enc) 2
  ------------------
 1688|  1.52k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  787|  1.52k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.52k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.32k, False: 195]
  |  |  |  |  |  Branch (739:52): [True: 1.12k, False: 198]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1689|  1.12k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.12k|#  define MINBPC(enc) 2
  ------------------
 1690|  1.12k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  787|  1.12k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.12k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 932, False: 196]
  |  |  |  |  |  Branch (739:52): [True: 706, False: 226]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1691|    706|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    706|#  define MINBPC(enc) 2
  ------------------
 1692|    706|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  787|    706|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    706|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 507, False: 199]
  |  |  |  |  |  Branch (739:52): [True: 224, False: 283]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1693|    224|            return ASCII_QUOT;
  ------------------
  |  |  104|    224|#define ASCII_QUOT 0x22
  ------------------
 1694|    706|        }
 1695|  1.12k|      }
 1696|  1.29k|      break;
 1697|  1.58k|    case ASCII_a:
  ------------------
  |  |   63|  1.58k|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 1.58k, False: 1.95k]
  ------------------
 1698|  1.58k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.58k|#  define MINBPC(enc) 2
  ------------------
 1699|  1.58k|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  787|  1.58k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.58k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 1.38k, False: 200]
  |  |  |  |  |  Branch (739:52): [True: 1.15k, False: 227]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1700|  1.15k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.15k|#  define MINBPC(enc) 2
  ------------------
 1701|  1.15k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  787|  1.15k|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|  1.15k|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 931, False: 222]
  |  |  |  |  |  Branch (739:52): [True: 726, False: 205]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1702|    726|          ptr += MINBPC(enc);
  ------------------
  |  |  783|    726|#  define MINBPC(enc) 2
  ------------------
 1703|    726|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  787|    726|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    726|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 532, False: 194]
  |  |  |  |  |  Branch (739:52): [True: 293, False: 239]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1704|    293|            return ASCII_APOS;
  ------------------
  |  |  106|    293|#define ASCII_APOS 0x27
  ------------------
 1705|    726|        }
 1706|  1.15k|      }
 1707|  1.28k|      break;
 1708|  3.53k|    }
 1709|  11.4k|  }
 1710|  10.2k|  return 0;
 1711|  11.4k|}
xmltok.c:little2_updatePosition:
 1779|  3.51k|                       POSITION *pos) {
 1780|  2.89M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  2.89M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  2.89M|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  2.89M|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   270k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 270k, False: 2.62M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1782|      0|#  define LEAD_CASE(n)                                                         \
 1783|      0|  case BT_LEAD##n:                                                             \
 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
 1785|      0|    pos->columnNumber++;                                                       \
 1786|      0|    break;
 1787|      0|      LEAD_CASE(2)
  ------------------
  |  | 1783|      0|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 0, False: 2.89M]
  |  |  ------------------
  |  | 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.89M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1789|   168k|      LEAD_CASE(4)
  ------------------
  |  | 1783|   168k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 168k, False: 2.72M]
  |  |  ------------------
  |  | 1784|   168k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|   168k|    pos->columnNumber++;                                                       \
  |  | 1786|   168k|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|  9.21k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 9.21k, False: 2.88M]
  ------------------
 1792|  9.21k|      pos->columnNumber = 0;
 1793|  9.21k|      pos->lineNumber++;
 1794|  9.21k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  9.21k|#  define MINBPC(enc) 2
  ------------------
 1795|  9.21k|      break;
 1796|  21.1k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 21.1k, False: 2.87M]
  ------------------
 1797|  21.1k|      pos->lineNumber++;
 1798|  21.1k|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  21.1k|#  define MINBPC(enc) 2
  ------------------
 1799|  21.1k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|  21.1k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  42.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  783|  21.1k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 21.0k, False: 34]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  785|  21.0k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  21.0k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  10.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 10.5k, False: 10.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 1.20k, False: 19.8k]
  ------------------
 1800|  1.20k|        ptr += MINBPC(enc);
  ------------------
  |  |  783|  1.20k|#  define MINBPC(enc) 2
  ------------------
 1801|  21.1k|      pos->columnNumber = 0;
 1802|  21.1k|      break;
 1803|  2.69M|    default:
  ------------------
  |  Branch (1803:5): [True: 2.69M, False: 199k]
  ------------------
 1804|  2.69M|      ptr += MINBPC(enc);
  ------------------
  |  |  783|  2.69M|#  define MINBPC(enc) 2
  ------------------
 1805|  2.69M|      pos->columnNumber++;
 1806|  2.69M|      break;
 1807|  2.89M|    }
 1808|  2.89M|  }
 1809|  3.51k|}
xmltok.c:little2_isPublicId:
 1450|    347|                   const char **badPtr) {
 1451|    347|  ptr += MINBPC(enc);
  ------------------
  |  |  783|    347|#  define MINBPC(enc) 2
  ------------------
 1452|    347|  end -= MINBPC(enc);
  ------------------
  |  |  783|    347|#  define MINBPC(enc) 2
  ------------------
 1453|  7.04k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  783|  7.00k|#  define MINBPC(enc) 2
  ------------------
 1454|  7.04k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  785|  7.04k|#  define BYTE_TYPE(enc, p) LITTLE2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  737|  7.04k|  ((p)[1] == 0 ? SB_BYTE_TYPE(enc, p) : unicode_byte_type((p)[1], (p)[0]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.01k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (737:4): [True: 7.01k, False: 35]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1455|    247|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 247, False: 6.79k]
  ------------------
 1456|    730|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 483, False: 6.56k]
  ------------------
 1457|  1.06k|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 330, False: 6.71k]
  ------------------
 1458|  1.54k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 485, False: 6.56k]
  ------------------
 1459|  1.87k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 329, False: 6.71k]
  ------------------
 1460|  2.22k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 350, False: 6.69k]
  ------------------
 1461|  2.44k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 219, False: 6.82k]
  ------------------
 1462|  2.69k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 256, False: 6.79k]
  ------------------
 1463|  2.91k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 215, False: 6.83k]
  ------------------
 1464|  3.28k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 367, False: 6.67k]
  ------------------
 1465|  3.49k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 216, False: 6.83k]
  ------------------
 1466|  3.87k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 379, False: 6.66k]
  ------------------
 1467|  4.20k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 333, False: 6.71k]
  ------------------
 1468|  4.50k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 291, False: 6.75k]
  ------------------
 1469|  4.70k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 204, False: 6.84k]
  ------------------
 1470|  4.95k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 253, False: 6.79k]
  ------------------
 1471|  5.19k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 233, False: 6.81k]
  ------------------
 1472|  5.40k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 214, False: 6.83k]
  ------------------
 1473|  5.40k|#  ifdef XML_NS
 1474|  5.40k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 7.04k]
  ------------------
 1475|  5.40k|#  endif
 1476|  5.40k|      break;
 1477|    399|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 399, False: 6.64k]
  ------------------
 1478|    399|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  787|    399|#  define CHAR_MATCHES(enc, p, c) LITTLE2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  739|    399|#define LITTLE2_CHAR_MATCHES(p, c) ((p)[1] == 0 && (p)[0] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (739:37): [True: 399, False: 0]
  |  |  |  |  |  Branch (739:52): [True: 1, False: 398]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1479|      1|        *badPtr = ptr;
 1480|      1|        return 0;
 1481|      1|      }
 1482|    398|      break;
 1483|    398|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 251, False: 6.79k]
  ------------------
 1484|    733|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 482, False: 6.56k]
  ------------------
 1485|    733|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  786|    733|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|    733|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 733, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1485:11): [True: 725, False: 8]
  ------------------
 1486|    725|        break;
 1487|       |      /* fall through */
 1488|    518|    default:
  ------------------
  |  Branch (1488:5): [True: 510, False: 6.53k]
  ------------------
 1489|    518|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  786|    518|#  define BYTE_TO_ASCII(enc, p) LITTLE2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  738|    518|#define LITTLE2_BYTE_TO_ASCII(p) ((p)[1] == 0 ? (p)[0] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (738:35): [True: 483, False: 35]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1490|    236|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 236, False: 282]
  ------------------
 1491|    475|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 239, False: 279]
  ------------------
 1492|    475|        break;
 1493|     43|      default:
  ------------------
  |  Branch (1493:7): [True: 43, False: 475]
  ------------------
 1494|     43|        *badPtr = ptr;
 1495|     43|        return 0;
 1496|    518|      }
 1497|    475|      break;
 1498|  7.04k|    }
 1499|  7.04k|  }
 1500|    303|  return 1;
 1501|    347|}
xmltok.c:big2_prologTok:
 1018|  89.6k|                  const char **nextTokPtr) {
 1019|  89.6k|  int tok;
 1020|  89.6k|  if (ptr >= end)
  ------------------
  |  Branch (1020:7): [True: 262, False: 89.4k]
  ------------------
 1021|    262|    return XML_TOK_NONE;
  ------------------
  |  |   51|    262|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1022|  89.4k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  89.4k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1022:7): [Folded - Ignored]
  ------------------
 1023|  89.4k|    size_t n = end - ptr;
 1024|  89.4k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  89.4k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1024:9): [True: 43.7k, False: 45.6k]
  ------------------
 1025|  43.7k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  43.7k|#  define MINBPC(enc) 2
  ------------------
 1026|  43.7k|      if (n == 0)
  ------------------
  |  Branch (1026:11): [True: 24, False: 43.7k]
  ------------------
 1027|     24|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     24|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1028|  43.7k|      end = ptr + n;
 1029|  43.7k|    }
 1030|  89.4k|  }
 1031|  89.3k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  89.3k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  89.3k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  87.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 87.4k, False: 1.97k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1032|    827|  case BT_QUOT:
  ------------------
  |  Branch (1032:3): [True: 827, False: 88.5k]
  ------------------
 1033|    827|    return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    827|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_QUOT, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    827|#  define MINBPC(enc) 2
  ------------------
 1034|  4.12k|  case BT_APOS:
  ------------------
  |  Branch (1034:3): [True: 4.12k, False: 85.2k]
  ------------------
 1035|  4.12k|    return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  4.12k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLit)(BT_APOS, enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  4.12k|#  define MINBPC(enc) 2
  ------------------
 1036|  12.7k|  case BT_LT: {
  ------------------
  |  Branch (1036:3): [True: 12.7k, False: 76.6k]
  ------------------
 1037|  12.7k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  12.7k|#  define MINBPC(enc) 2
  ------------------
 1038|  12.7k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  12.7k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  12.7k|    {                                                                          \
  |  |  |  |  135|  12.7k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  12.7k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  12.7k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 12.7k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  12.7k|    }
  |  |  ------------------
  ------------------
 1039|  12.7k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  12.7k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  12.7k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  11.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 9, False: 12.7k]
  |  |  |  |  |  Branch (870:4): [True: 11.1k, False: 1.57k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1040|  7.14k|    case BT_EXCL:
  ------------------
  |  Branch (1040:5): [True: 7.14k, False: 5.58k]
  ------------------
 1041|  7.14k|      return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  7.14k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanDecl)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  7.14k|#  define MINBPC(enc) 2
  ------------------
 1042|  1.78k|    case BT_QUEST:
  ------------------
  |  Branch (1042:5): [True: 1.78k, False: 10.9k]
  ------------------
 1043|  1.78k|      return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  1.78k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  1.78k|#  define MINBPC(enc) 2
  ------------------
 1044|  1.07k|    case BT_NMSTRT:
  ------------------
  |  Branch (1044:5): [True: 1.07k, False: 11.6k]
  ------------------
 1045|  2.22k|    case BT_HEX:
  ------------------
  |  Branch (1045:5): [True: 1.14k, False: 11.5k]
  ------------------
 1046|  3.77k|    case BT_NONASCII:
  ------------------
  |  Branch (1046:5): [True: 1.55k, False: 11.1k]
  ------------------
 1047|  3.77k|    case BT_LEAD2:
  ------------------
  |  Branch (1047:5): [True: 0, False: 12.7k]
  ------------------
 1048|  3.77k|    case BT_LEAD3:
  ------------------
  |  Branch (1048:5): [True: 0, False: 12.7k]
  ------------------
 1049|  3.79k|    case BT_LEAD4:
  ------------------
  |  Branch (1049:5): [True: 19, False: 12.7k]
  ------------------
 1050|  3.79k|      *nextTokPtr = ptr - MINBPC(enc);
  ------------------
  |  |  916|  3.79k|#  define MINBPC(enc) 2
  ------------------
 1051|  3.79k|      return XML_TOK_INSTANCE_START;
  ------------------
  |  |   96|  3.79k|#define XML_TOK_INSTANCE_START 29
  ------------------
 1052|  12.7k|    }
 1053|      9|    *nextTokPtr = ptr;
 1054|      9|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
 1055|  12.7k|  }
 1056|  5.71k|  case BT_CR:
  ------------------
  |  Branch (1056:3): [True: 5.71k, False: 83.6k]
  ------------------
 1057|  5.71k|    if (ptr + MINBPC(enc) == end) {
  ------------------
  |  |  916|  5.71k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1057:9): [True: 62, False: 5.65k]
  ------------------
 1058|     62|      *nextTokPtr = end;
 1059|       |      /* indicate that this might be part of a CR/LF pair */
 1060|     62|      return -XML_TOK_PROLOG_S;
  ------------------
  |  |   82|     62|#define XML_TOK_PROLOG_S 15
  ------------------
 1061|     62|    }
 1062|       |    /* fall through */
 1063|  18.3k|  case BT_S:
  ------------------
  |  Branch (1063:3): [True: 12.6k, False: 76.7k]
  ------------------
 1064|  24.9k|  case BT_LF:
  ------------------
  |  Branch (1064:3): [True: 6.55k, False: 82.8k]
  ------------------
 1065|  27.9k|    for (;;) {
 1066|  27.9k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  27.9k|#  define MINBPC(enc) 2
  ------------------
 1067|  27.9k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  27.9k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  27.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  27.9k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1067:11): [True: 138, False: 27.8k]
  ------------------
 1068|    138|        break;
 1069|  27.8k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  27.8k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  27.8k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  26.9k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 26.9k, False: 875]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1070|    953|      case BT_S:
  ------------------
  |  Branch (1070:7): [True: 953, False: 26.9k]
  ------------------
 1071|  2.08k|      case BT_LF:
  ------------------
  |  Branch (1071:7): [True: 1.12k, False: 26.7k]
  ------------------
 1072|  2.08k|        break;
 1073|  1.02k|      case BT_CR:
  ------------------
  |  Branch (1073:7): [True: 1.02k, False: 26.8k]
  ------------------
 1074|       |        /* don't split CR/LF pair */
 1075|  1.02k|        if (ptr + MINBPC(enc) != end)
  ------------------
  |  |  916|  1.02k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1075:13): [True: 1.01k, False: 3]
  ------------------
 1076|  1.01k|          break;
 1077|       |        /* fall through */
 1078|  24.7k|      default:
  ------------------
  |  Branch (1078:7): [True: 24.7k, False: 3.10k]
  ------------------
 1079|  24.7k|        *nextTokPtr = ptr;
 1080|  24.7k|        return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|  24.7k|#define XML_TOK_PROLOG_S 15
  ------------------
 1081|  27.8k|      }
 1082|  27.8k|    }
 1083|    138|    *nextTokPtr = ptr;
 1084|    138|    return XML_TOK_PROLOG_S;
  ------------------
  |  |   82|    138|#define XML_TOK_PROLOG_S 15
  ------------------
 1085|  2.41k|  case BT_PERCNT:
  ------------------
  |  Branch (1085:3): [True: 2.41k, False: 86.9k]
  ------------------
 1086|  2.41k|    return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  2.41k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  2.41k|#  define MINBPC(enc) 2
  ------------------
 1087|  3.73k|  case BT_COMMA:
  ------------------
  |  Branch (1087:3): [True: 3.73k, False: 85.6k]
  ------------------
 1088|  3.73k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  3.73k|#  define MINBPC(enc) 2
  ------------------
 1089|  3.73k|    return XML_TOK_COMMA;
  ------------------
  |  |  107|  3.73k|#define XML_TOK_COMMA 38
  ------------------
 1090|  1.14k|  case BT_LSQB:
  ------------------
  |  Branch (1090:3): [True: 1.14k, False: 88.2k]
  ------------------
 1091|  1.14k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.14k|#  define MINBPC(enc) 2
  ------------------
 1092|  1.14k|    return XML_TOK_OPEN_BRACKET;
  ------------------
  |  |   92|  1.14k|#define XML_TOK_OPEN_BRACKET 25
  ------------------
 1093|    638|  case BT_RSQB:
  ------------------
  |  Branch (1093:3): [True: 638, False: 88.7k]
  ------------------
 1094|    638|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    638|#  define MINBPC(enc) 2
  ------------------
 1095|    638|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|    638|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    638|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    638|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1095:9): [True: 2, False: 636]
  ------------------
 1096|      2|      return -XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|      2|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1097|    636|    if (CHAR_MATCHES(enc, ptr, ASCII_RSQB)) {
  ------------------
  |  |  920|    636|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    636|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 630, False: 6]
  |  |  |  |  |  Branch (872:49): [True: 38, False: 592]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1098|     38|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     38|    {                                                                          \
  |  |  135|     38|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     38|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|     38|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 37]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     38|    }
  ------------------
 1099|     37|      if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  920|     37|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|     37|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 24, False: 13]
  |  |  |  |  |  Branch (872:49): [True: 2, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1100|      2|        *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  916|      2|#  define MINBPC(enc) 2
  ------------------
 1101|      2|        return XML_TOK_COND_SECT_CLOSE;
  ------------------
  |  |  103|      2|#define XML_TOK_COND_SECT_CLOSE 34      /* ]]> */
  ------------------
 1102|      2|      }
 1103|     37|    }
 1104|    633|    *nextTokPtr = ptr;
 1105|    633|    return XML_TOK_CLOSE_BRACKET;
  ------------------
  |  |   93|    633|#define XML_TOK_CLOSE_BRACKET 26
  ------------------
 1106|  5.80k|  case BT_LPAR:
  ------------------
  |  Branch (1106:3): [True: 5.80k, False: 83.5k]
  ------------------
 1107|  5.80k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  5.80k|#  define MINBPC(enc) 2
  ------------------
 1108|  5.80k|    return XML_TOK_OPEN_PAREN;
  ------------------
  |  |   90|  5.80k|#define XML_TOK_OPEN_PAREN 23
  ------------------
 1109|  3.76k|  case BT_RPAR:
  ------------------
  |  Branch (1109:3): [True: 3.76k, False: 85.6k]
  ------------------
 1110|  3.76k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.76k|#  define MINBPC(enc) 2
  ------------------
 1111|  3.76k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  3.76k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  3.76k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  3.76k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1111:9): [True: 5, False: 3.75k]
  ------------------
 1112|      5|      return -XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|      5|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1113|  3.75k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  3.75k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  3.75k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.73k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 27, False: 3.73k]
  |  |  |  |  |  Branch (870:4): [True: 3.73k, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1114|    327|    case BT_AST:
  ------------------
  |  Branch (1114:5): [True: 327, False: 3.43k]
  ------------------
 1115|    327|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    327|#  define MINBPC(enc) 2
  ------------------
 1116|    327|      return XML_TOK_CLOSE_PAREN_ASTERISK;
  ------------------
  |  |  105|    327|#define XML_TOK_CLOSE_PAREN_ASTERISK 36 /* )* */
  ------------------
 1117|     66|    case BT_QUEST:
  ------------------
  |  Branch (1117:5): [True: 66, False: 3.69k]
  ------------------
 1118|     66|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|     66|#  define MINBPC(enc) 2
  ------------------
 1119|     66|      return XML_TOK_CLOSE_PAREN_QUESTION;
  ------------------
  |  |  104|     66|#define XML_TOK_CLOSE_PAREN_QUESTION 35 /* )? */
  ------------------
 1120|    194|    case BT_PLUS:
  ------------------
  |  Branch (1120:5): [True: 194, False: 3.56k]
  ------------------
 1121|    194|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    194|#  define MINBPC(enc) 2
  ------------------
 1122|    194|      return XML_TOK_CLOSE_PAREN_PLUS;
  ------------------
  |  |  106|    194|#define XML_TOK_CLOSE_PAREN_PLUS 37     /* )+ */
  ------------------
 1123|    709|    case BT_CR:
  ------------------
  |  Branch (1123:5): [True: 709, False: 3.05k]
  ------------------
 1124|  1.11k|    case BT_LF:
  ------------------
  |  Branch (1124:5): [True: 409, False: 3.35k]
  ------------------
 1125|  1.64k|    case BT_S:
  ------------------
  |  Branch (1125:5): [True: 531, False: 3.22k]
  ------------------
 1126|  1.90k|    case BT_GT:
  ------------------
  |  Branch (1126:5): [True: 251, False: 3.50k]
  ------------------
 1127|  2.48k|    case BT_COMMA:
  ------------------
  |  Branch (1127:5): [True: 581, False: 3.17k]
  ------------------
 1128|  2.80k|    case BT_VERBAR:
  ------------------
  |  Branch (1128:5): [True: 323, False: 3.43k]
  ------------------
 1129|  3.14k|    case BT_RPAR:
  ------------------
  |  Branch (1129:5): [True: 341, False: 3.41k]
  ------------------
 1130|  3.14k|      *nextTokPtr = ptr;
 1131|  3.14k|      return XML_TOK_CLOSE_PAREN;
  ------------------
  |  |   91|  3.14k|#define XML_TOK_CLOSE_PAREN 24
  ------------------
 1132|  3.75k|    }
 1133|     27|    *nextTokPtr = ptr;
 1134|     27|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     27|#define XML_TOK_INVALID 0
  ------------------
 1135|  3.68k|  case BT_VERBAR:
  ------------------
  |  Branch (1135:3): [True: 3.68k, False: 85.7k]
  ------------------
 1136|  3.68k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  3.68k|#  define MINBPC(enc) 2
  ------------------
 1137|  3.68k|    return XML_TOK_OR;
  ------------------
  |  |   88|  3.68k|#define XML_TOK_OR 21         /* | */
  ------------------
 1138|  5.42k|  case BT_GT:
  ------------------
  |  Branch (1138:3): [True: 5.42k, False: 83.9k]
  ------------------
 1139|  5.42k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  5.42k|#  define MINBPC(enc) 2
  ------------------
 1140|  5.42k|    return XML_TOK_DECL_CLOSE;
  ------------------
  |  |   84|  5.42k|#define XML_TOK_DECL_CLOSE 17 /* > */
  ------------------
 1141|  1.54k|  case BT_NUM:
  ------------------
  |  Branch (1141:3): [True: 1.54k, False: 87.8k]
  ------------------
 1142|  1.54k|    return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  1.54k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPoundName)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  1.54k|#  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: 89.3k]
  |  |  ------------------
  |  | 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: 89.3k]
  |  |  ------------------
  |  | 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|     69|    LEAD_CASE(4)
  ------------------
  |  | 1144|     16|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1144:3): [True: 21, False: 89.3k]
  |  |  ------------------
  |  | 1145|     21|    if (end - ptr < n)                                                         \
  |  |  ------------------
  |  |  |  Branch (1145:9): [True: 5, False: 16]
  |  |  ------------------
  |  | 1146|     16|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  ------------------
  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  ------------------
  |  | 1147|     16|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  ------------------
  |  |  |  |   45|     16|#    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|     16|    if (IS_NMSTRT_CHAR(enc, ptr, n)) {                                         \
  |  |  ------------------
  |  |  |  |  923|     16|#  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|     16|    if (IS_NAME_CHAR(enc, ptr, n)) {                                           \
  |  |  ------------------
  |  |  |  |  921|     16|#  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|     16|    *nextTokPtr = ptr;                                                         \
  |  | 1162|     16|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
 1166|      0|#  undef LEAD_CASE
 1167|  9.60k|  case BT_NMSTRT:
  ------------------
  |  Branch (1167:3): [True: 9.60k, False: 79.7k]
  ------------------
 1168|  14.5k|  case BT_HEX:
  ------------------
  |  Branch (1168:3): [True: 4.93k, False: 84.4k]
  ------------------
 1169|  14.5k|    tok = XML_TOK_NAME;
  ------------------
  |  |   85|  14.5k|#define XML_TOK_NAME 18
  ------------------
 1170|  14.5k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  14.5k|#  define MINBPC(enc) 2
  ------------------
 1171|  14.5k|    break;
 1172|    655|  case BT_DIGIT:
  ------------------
  |  Branch (1172:3): [True: 655, False: 88.7k]
  ------------------
 1173|    882|  case BT_NAME:
  ------------------
  |  Branch (1173:3): [True: 227, False: 89.1k]
  ------------------
 1174|  2.04k|  case BT_MINUS:
  ------------------
  |  Branch (1174:3): [True: 1.16k, False: 88.2k]
  ------------------
 1175|  2.04k|#  ifdef XML_NS
 1176|  2.04k|  case BT_COLON:
  ------------------
  |  Branch (1176:3): [True: 0, False: 89.3k]
  ------------------
 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);
  ------------------
  |  |  916|  2.04k|#  define MINBPC(enc) 2
  ------------------
 1180|  2.04k|    break;
 1181|  1.94k|  case BT_NONASCII:
  ------------------
  |  Branch (1181:3): [True: 1.94k, False: 87.4k]
  ------------------
 1182|  1.94k|    if (IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  924|  1.94k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  876|  1.94k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|  1.94k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 1.68k, False: 262]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1183|  1.68k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.68k|#  define MINBPC(enc) 2
  ------------------
 1184|  1.68k|      tok = XML_TOK_NAME;
  ------------------
  |  |   85|  1.68k|#define XML_TOK_NAME 18
  ------------------
 1185|  1.68k|      break;
 1186|  1.68k|    }
 1187|    262|    if (IS_NAME_CHAR_MINBPC(enc, ptr)) {
  ------------------
  |  |  922|    262|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  ------------------
  |  |  |  |  874|    262|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  ------------------
  |  |  |  |  |  |   79|    262|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (79:3): [True: 225, False: 37]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1188|    225|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    225|#  define MINBPC(enc) 2
  ------------------
 1189|    225|      tok = XML_TOK_NMTOKEN;
  ------------------
  |  |   86|    225|#define XML_TOK_NMTOKEN 19
  ------------------
 1190|    225|      break;
 1191|    225|    }
 1192|       |    /* fall through */
 1193|     59|  default:
  ------------------
  |  Branch (1193:3): [True: 22, False: 89.3k]
  ------------------
 1194|     59|    *nextTokPtr = ptr;
 1195|     59|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     59|#define XML_TOK_INVALID 0
  ------------------
 1196|  89.3k|  }
 1197|  44.3k|  while (HAS_CHAR(enc, ptr, end)) {
 1198|  44.3k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  44.3k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  44.3k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  32.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 32.3k, False: 11.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1199|   105k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  25.9k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 11.9k, False: 32.3k]
  |  |  ------------------
  |  |   82|  25.9k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  11.9k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  11.9k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  11.9k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 26, False: 11.9k]
  |  |  ------------------
  |  |   83|     26|      *nextTokPtr = ptr;                                                       \
  |  |   84|     26|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     26|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     26|    }                                                                          \
  |  |   86|  25.9k|    /* fall through */                                                         \
  |  |   87|  25.9k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 6.88k, False: 37.4k]
  |  |  ------------------
  |  |   88|  24.4k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 5.63k, False: 38.6k]
  |  |  ------------------
  |  |   89|  25.1k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 749, False: 43.5k]
  |  |  ------------------
  |  |   90|  25.4k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 278, False: 44.0k]
  |  |  ------------------
  |  |   91|  25.9k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 492, False: 43.8k]
  |  |  ------------------
  |  |   92|  25.9k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  25.9k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  25.9k|    break;                                                                     \
  |  |   94|  25.9k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 44.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: 44.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|     14|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 14, False: 44.3k]
  |  |  |  |  ------------------
  |  |  |  |   71|     14|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 9]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      9|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     18|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      9|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      9|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      9|    }                                                                          \
  |  |  |  |   77|      9|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
 1200|    477|    case BT_GT:
  ------------------
  |  Branch (1200:5): [True: 477, False: 43.8k]
  ------------------
 1201|  2.16k|    case BT_RPAR:
  ------------------
  |  Branch (1201:5): [True: 1.68k, False: 42.6k]
  ------------------
 1202|  2.92k|    case BT_COMMA:
  ------------------
  |  Branch (1202:5): [True: 764, False: 43.5k]
  ------------------
 1203|  4.40k|    case BT_VERBAR:
  ------------------
  |  Branch (1203:5): [True: 1.47k, False: 42.8k]
  ------------------
 1204|  5.30k|    case BT_LSQB:
  ------------------
  |  Branch (1204:5): [True: 902, False: 43.4k]
  ------------------
 1205|  5.30k|    case BT_PERCNT:
  ------------------
  |  Branch (1205:5): [True: 4, False: 44.3k]
  ------------------
 1206|  11.7k|    case BT_S:
  ------------------
  |  Branch (1206:5): [True: 6.46k, False: 37.8k]
  ------------------
 1207|  14.4k|    case BT_CR:
  ------------------
  |  Branch (1207:5): [True: 2.70k, False: 41.6k]
  ------------------
 1208|  16.6k|    case BT_LF:
  ------------------
  |  Branch (1208:5): [True: 2.18k, False: 42.1k]
  ------------------
 1209|  16.6k|      *nextTokPtr = ptr;
 1210|  16.6k|      return tok;
 1211|      0|#  ifdef XML_NS
 1212|      0|    case BT_COLON:
  ------------------
  |  Branch (1212:5): [True: 0, False: 44.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|  1.14k|    case BT_PLUS:
  ------------------
  |  Branch (1231:5): [True: 1.14k, False: 43.1k]
  ------------------
 1232|  1.14k|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|  1.14k|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1232:11): [True: 1, False: 1.13k]
  ------------------
 1233|      1|        *nextTokPtr = ptr;
 1234|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1235|      1|      }
 1236|  1.13k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.13k|#  define MINBPC(enc) 2
  ------------------
 1237|  1.13k|      return XML_TOK_NAME_PLUS;
  ------------------
  |  |  101|  1.13k|#define XML_TOK_NAME_PLUS 32            /* name+ */
  ------------------
 1238|    195|    case BT_AST:
  ------------------
  |  Branch (1238:5): [True: 195, False: 44.1k]
  ------------------
 1239|    195|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    195|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1239:11): [True: 1, False: 194]
  ------------------
 1240|      1|        *nextTokPtr = ptr;
 1241|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1242|      1|      }
 1243|    194|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    194|#  define MINBPC(enc) 2
  ------------------
 1244|    194|      return XML_TOK_NAME_ASTERISK;
  ------------------
  |  |  100|    194|#define XML_TOK_NAME_ASTERISK 31        /* name* */
  ------------------
 1245|    320|    case BT_QUEST:
  ------------------
  |  Branch (1245:5): [True: 320, False: 43.9k]
  ------------------
 1246|    320|      if (tok == XML_TOK_NMTOKEN) {
  ------------------
  |  |   86|    320|#define XML_TOK_NMTOKEN 19
  ------------------
  |  Branch (1246:11): [True: 1, False: 319]
  ------------------
 1247|      1|        *nextTokPtr = ptr;
 1248|      1|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
 1249|      1|      }
 1250|    319|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    319|#  define MINBPC(enc) 2
  ------------------
 1251|    319|      return XML_TOK_NAME_QUESTION;
  ------------------
  |  |   99|    319|#define XML_TOK_NAME_QUESTION 30        /* name? */
  ------------------
 1252|     13|    default:
  ------------------
  |  Branch (1252:5): [True: 13, False: 44.3k]
  ------------------
 1253|     13|      *nextTokPtr = ptr;
 1254|     13|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
 1255|  44.3k|    }
 1256|  44.3k|  }
 1257|    124|  return -tok;
 1258|  18.4k|}
xmltok.c:big2_scanLit:
  984|  4.95k|                const char **nextTokPtr) {
  985|  24.3M|  while (HAS_CHAR(enc, ptr, end)) {
  986|  24.3M|    int t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  24.3M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  24.3M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   307k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 307k, False: 24.0M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  987|  24.3M|    switch (t) {
  988|   246k|      INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 24.3M]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 24.3M]
  |  |  |  |  ------------------
  |  |  |  |   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|   123k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|   123k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 123k, False: 24.2M]
  |  |  |  |  ------------------
  |  |  |  |   50|   123k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 31, False: 123k]
  |  |  |  |  ------------------
  |  |  |  |   51|   123k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     31|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|   123k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   123k|#    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|   123k|    ptr += n;                                                                  \
  |  |  |  |   57|   123k|    break;
  |  |  ------------------
  |  |   63|   123k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 8, False: 24.3M]
  |  |  ------------------
  |  |   64|      8|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 24.3M]
  |  |  ------------------
  |  |   65|     12|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 4, False: 24.3M]
  |  |  ------------------
  |  |   66|     12|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     12|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     12|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  989|  12.4k|    case BT_QUOT:
  ------------------
  |  Branch (989:5): [True: 12.4k, False: 24.3M]
  ------------------
  990|  16.8k|    case BT_APOS:
  ------------------
  |  Branch (990:5): [True: 4.46k, False: 24.3M]
  ------------------
  991|  16.8k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  16.8k|#  define MINBPC(enc) 2
  ------------------
  992|  16.8k|      if (t != open)
  ------------------
  |  Branch (992:11): [True: 12.0k, False: 4.85k]
  ------------------
  993|  12.0k|        break;
  994|  4.85k|      if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  4.85k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  4.85k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  4.85k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (994:11): [True: 3, False: 4.84k]
  ------------------
  995|      3|        return -XML_TOK_LITERAL;
  ------------------
  |  |   94|      3|#define XML_TOK_LITERAL 27
  ------------------
  996|  4.84k|      *nextTokPtr = ptr;
  997|  4.84k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  4.84k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.84k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  4.82k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 4.82k, False: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  998|    388|      case BT_S:
  ------------------
  |  Branch (998:7): [True: 388, False: 4.46k]
  ------------------
  999|  1.31k|      case BT_CR:
  ------------------
  |  Branch (999:7): [True: 924, False: 3.92k]
  ------------------
 1000|  2.20k|      case BT_LF:
  ------------------
  |  Branch (1000:7): [True: 894, False: 3.95k]
  ------------------
 1001|  4.75k|      case BT_GT:
  ------------------
  |  Branch (1001:7): [True: 2.54k, False: 2.30k]
  ------------------
 1002|  4.81k|      case BT_PERCNT:
  ------------------
  |  Branch (1002:7): [True: 62, False: 4.78k]
  ------------------
 1003|  4.82k|      case BT_LSQB:
  ------------------
  |  Branch (1003:7): [True: 7, False: 4.84k]
  ------------------
 1004|  4.82k|        return XML_TOK_LITERAL;
  ------------------
  |  |   94|  4.82k|#define XML_TOK_LITERAL 27
  ------------------
 1005|     28|      default:
  ------------------
  |  Branch (1005:7): [True: 28, False: 4.82k]
  ------------------
 1006|     28|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     28|#define XML_TOK_INVALID 0
  ------------------
 1007|  4.84k|      }
 1008|  24.2M|    default:
  ------------------
  |  Branch (1008:5): [True: 24.2M, False: 140k]
  ------------------
 1009|  24.2M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  24.2M|#  define MINBPC(enc) 2
  ------------------
 1010|  24.2M|      break;
 1011|  24.3M|    }
 1012|  24.3M|  }
 1013|     61|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     61|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
 1014|  4.95k|}
xmltok.c:big2_scanDecl:
  183|  7.14k|                 const char **nextTokPtr) {
  184|  7.14k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  7.14k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  7.14k|    {                                                                          \
  |  |  |  |  135|  7.14k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  7.14k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  7.14k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 5, False: 7.13k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  7.14k|    }
  |  |  ------------------
  ------------------
  185|  7.13k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  7.13k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  7.13k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.11k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 7.11k, False: 20]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  186|    394|  case BT_MINUS:
  ------------------
  |  Branch (186:3): [True: 394, False: 6.74k]
  ------------------
  187|    394|    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    394|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    394|#  define MINBPC(enc) 2
  ------------------
  188|      1|  case BT_LSQB:
  ------------------
  |  Branch (188:3): [True: 1, False: 7.13k]
  ------------------
  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|    677|  case BT_NMSTRT:
  ------------------
  |  Branch (191:3): [True: 677, False: 6.46k]
  ------------------
  192|  6.72k|  case BT_HEX:
  ------------------
  |  Branch (192:3): [True: 6.04k, False: 1.09k]
  ------------------
  193|  6.72k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  6.72k|#  define MINBPC(enc) 2
  ------------------
  194|  6.72k|    break;
  195|     21|  default:
  ------------------
  |  Branch (195:3): [True: 21, False: 7.11k]
  ------------------
  196|     21|    *nextTokPtr = ptr;
  197|     21|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     21|#define XML_TOK_INVALID 0
  ------------------
  198|  7.13k|  }
  199|  44.8k|  while (HAS_CHAR(enc, ptr, end)) {
  200|  44.8k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  44.8k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  44.8k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  44.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 44.7k, False: 25]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  201|     34|    case BT_PERCNT:
  ------------------
  |  Branch (201:5): [True: 34, False: 44.7k]
  ------------------
  202|     34|      REQUIRE_CHARS(enc, ptr, end, 2);
  ------------------
  |  |  134|     34|    {                                                                          \
  |  |  135|     34|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|     34|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|     34|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 1, False: 33]
  |  |  ------------------
  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      1|      }                                                                        \
  |  |  138|     34|    }
  ------------------
  203|       |      /* don't allow <!ENTITY% foo "whatever"> */
  204|     33|      switch (BYTE_TYPE(enc, ptr + MINBPC(enc))) {
  ------------------
  |  |  918|     33|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|     33|  ((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: 29, False: 4]
  |  |  |  |  |  Branch (870:4): [True: 7, False: 26]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  205|      1|      case BT_S:
  ------------------
  |  Branch (205:7): [True: 1, False: 32]
  ------------------
  206|      2|      case BT_CR:
  ------------------
  |  Branch (206:7): [True: 1, False: 32]
  ------------------
  207|      3|      case BT_LF:
  ------------------
  |  Branch (207:7): [True: 1, False: 32]
  ------------------
  208|      4|      case BT_PERCNT:
  ------------------
  |  Branch (208:7): [True: 1, False: 32]
  ------------------
  209|      4|        *nextTokPtr = ptr;
  210|      4|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      4|#define XML_TOK_INVALID 0
  ------------------
  211|     33|      }
  212|       |      /* fall through */
  213|  4.58k|    case BT_S:
  ------------------
  |  Branch (213:5): [True: 4.55k, False: 40.2k]
  ------------------
  214|  5.06k|    case BT_CR:
  ------------------
  |  Branch (214:5): [True: 485, False: 44.3k]
  ------------------
  215|  6.65k|    case BT_LF:
  ------------------
  |  Branch (215:5): [True: 1.58k, False: 43.2k]
  ------------------
  216|  6.65k|      *nextTokPtr = ptr;
  217|  6.65k|      return XML_TOK_DECL_OPEN;
  ------------------
  |  |   83|  6.65k|#define XML_TOK_DECL_OPEN 16  /* <!foo */
  ------------------
  218|  32.6k|    case BT_NMSTRT:
  ------------------
  |  Branch (218:5): [True: 32.6k, False: 12.1k]
  ------------------
  219|  38.1k|    case BT_HEX:
  ------------------
  |  Branch (219:5): [True: 5.42k, False: 39.3k]
  ------------------
  220|  38.1k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  38.1k|#  define MINBPC(enc) 2
  ------------------
  221|  38.1k|      break;
  222|     32|    default:
  ------------------
  |  Branch (222:5): [True: 32, False: 44.7k]
  ------------------
  223|     32|      *nextTokPtr = ptr;
  224|     32|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     32|#define XML_TOK_INVALID 0
  ------------------
  225|  44.8k|    }
  226|  44.8k|  }
  227|     29|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     29|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  228|  6.72k|}
xmltok.c:big2_scanComment:
  146|    765|                    const char **nextTokPtr) {
  147|    765|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|    765|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|    765|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    765|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 753, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  148|    753|    if (! CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  920|    753|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    753|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 745, False: 8]
  |  |  |  |  |  Branch (872:49): [True: 741, False: 4]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  149|     12|      *nextTokPtr = ptr;
  150|     12|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  151|     12|    }
  152|    741|    ptr += MINBPC(enc);
  ------------------
  |  |  916|    741|#  define MINBPC(enc) 2
  ------------------
  153|   153k|    while (HAS_CHAR(enc, ptr, end)) {
  154|   153k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   153k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   153k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  10.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 10.7k, False: 142k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  155|  12.4k|        INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 153k]
  |  |  |  |  ------------------
  |  |  |  |   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: 153k]
  |  |  |  |  ------------------
  |  |  |  |   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.18k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  6.15k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 6.18k, False: 147k]
  |  |  |  |  ------------------
  |  |  |  |   50|  6.18k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 30, False: 6.15k]
  |  |  |  |  ------------------
  |  |  |  |   51|  6.15k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     30|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  6.15k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  6.15k|#    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.15k|    ptr += n;                                                                  \
  |  |  |  |   57|  6.15k|    break;
  |  |  ------------------
  |  |   63|  6.15k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 32, False: 153k]
  |  |  ------------------
  |  |   64|     32|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 153k]
  |  |  ------------------
  |  |   65|     38|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 6, False: 153k]
  |  |  ------------------
  |  |   66|     38|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     38|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     38|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  156|  1.46k|      case BT_MINUS:
  ------------------
  |  Branch (156:7): [True: 1.46k, False: 152k]
  ------------------
  157|  1.46k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.46k|#  define MINBPC(enc) 2
  ------------------
  158|  1.46k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.46k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.46k|    {                                                                          \
  |  |  |  |  135|  1.46k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.46k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.46k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.46k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.46k|    }
  |  |  ------------------
  ------------------
  159|  1.46k|        if (CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
  ------------------
  |  |  920|  1.46k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.46k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.22k, False: 247]
  |  |  |  |  |  Branch (872:49): [True: 602, False: 618]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  160|    602|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    602|#  define MINBPC(enc) 2
  ------------------
  161|    602|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    602|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    602|    {                                                                          \
  |  |  |  |  135|    602|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    602|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    602|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 601]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|    602|    }
  |  |  ------------------
  ------------------
  162|    601|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    601|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    601|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 592, False: 9]
  |  |  |  |  |  Branch (872:49): [True: 584, False: 8]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  163|     17|            *nextTokPtr = ptr;
  164|     17|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     17|#define XML_TOK_INVALID 0
  ------------------
  165|     17|          }
  166|    584|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    584|#  define MINBPC(enc) 2
  ------------------
  167|    584|          return XML_TOK_COMMENT;
  ------------------
  |  |   78|    584|#define XML_TOK_COMMENT 13
  ------------------
  168|    601|        }
  169|    865|        break;
  170|   145k|      default:
  ------------------
  |  Branch (170:7): [True: 145k, False: 7.69k]
  ------------------
  171|   145k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|   145k|#  define MINBPC(enc) 2
  ------------------
  172|   145k|        break;
  173|   153k|      }
  174|   153k|    }
  175|    741|  }
  176|     82|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     82|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  177|    765|}
xmltok.c:big2_scanPi:
  277|  4.93k|               const char **nextTokPtr) {
  278|  4.93k|  int tok;
  279|  4.93k|  const char *target = ptr;
  280|  4.93k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  4.93k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  4.93k|    {                                                                          \
  |  |  |  |  135|  4.93k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  4.93k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  4.93k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 10, False: 4.92k]
  |  |  |  |  ------------------
  |  |  |  |  136|     10|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     10|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     10|      }                                                                        \
  |  |  |  |  138|  4.93k|    }
  |  |  ------------------
  ------------------
  281|  4.92k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  4.92k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.92k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.95k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 3.95k, False: 968]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  282|  5.10k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  4.89k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 944, False: 3.98k]
  |  |  ------------------
  |  |  111|  4.89k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    944|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    944|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    944|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 3, False: 941]
  |  |  ------------------
  |  |  112|      3|      *nextTokPtr = ptr;                                                       \
  |  |  113|      3|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      3|    }                                                                          \
  |  |  115|  4.89k|    /* fall through */                                                         \
  |  |  116|  4.89k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 3.18k, False: 1.74k]
  |  |  ------------------
  |  |  117|  4.89k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 771, False: 4.15k]
  |  |  ------------------
  |  |  118|  4.89k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  4.89k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  4.89k|    break;                                                                     \
  |  |  120|  4.89k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 4.92k]
  |  |  |  |  ------------------
  |  |  |  |  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.92k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     18|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 18, False: 4.90k]
  |  |  |  |  ------------------
  |  |  |  |  100|     18|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 14]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     14|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     28|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     14|    }                                                                          \
  |  |  |  |  106|     14|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  283|      7|  default:
  ------------------
  |  Branch (283:3): [True: 7, False: 4.91k]
  ------------------
  284|      7|    *nextTokPtr = ptr;
  285|      7|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  286|  4.92k|  }
  287|  42.0k|  while (HAS_CHAR(enc, ptr, end)) {
  288|  42.0k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  42.0k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  42.0k|  ((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: 32.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  289|   178k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  37.2k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 32.3k, False: 9.72k]
  |  |  ------------------
  |  |   82|  37.2k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  32.3k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  32.3k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  32.3k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 14, False: 32.3k]
  |  |  ------------------
  |  |   83|     14|      *nextTokPtr = ptr;                                                       \
  |  |   84|     14|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     14|    }                                                                          \
  |  |   86|  37.2k|    /* fall through */                                                         \
  |  |   87|  37.2k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 3.58k, False: 38.4k]
  |  |  ------------------
  |  |   88|  36.4k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 545, False: 41.5k]
  |  |  ------------------
  |  |   89|  36.6k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 203, False: 41.8k]
  |  |  ------------------
  |  |   90|  36.9k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 345, False: 41.7k]
  |  |  ------------------
  |  |   91|  37.2k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 230, False: 41.8k]
  |  |  ------------------
  |  |   92|  37.2k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  37.2k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  37.2k|    break;                                                                     \
  |  |   94|  37.2k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 42.0k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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: 42.0k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     21|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 21, False: 42.0k]
  |  |  |  |  ------------------
  |  |  |  |   71|     21|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 5, False: 16]
  |  |  |  |  ------------------
  |  |  |  |   72|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     16|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     32|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     16|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     16|    }                                                                          \
  |  |  |  |   77|     16|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  290|    510|    case BT_S:
  ------------------
  |  Branch (290:5): [True: 510, False: 41.5k]
  ------------------
  291|  1.61k|    case BT_CR:
  ------------------
  |  Branch (291:5): [True: 1.10k, False: 40.9k]
  ------------------
  292|  2.41k|    case BT_LF:
  ------------------
  |  Branch (292:5): [True: 800, False: 41.2k]
  ------------------
  293|  2.41k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  915|  2.41k|#  define PREFIX(ident) big2_##ident
  ------------------
  |  Branch (293:11): [True: 2, False: 2.40k]
  ------------------
  294|      2|        *nextTokPtr = ptr;
  295|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  296|      2|      }
  297|  2.40k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.40k|#  define MINBPC(enc) 2
  ------------------
  298|   680k|      while (HAS_CHAR(enc, ptr, end)) {
  299|   680k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   680k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   680k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  41.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 41.6k, False: 639k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  300|  17.9k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 680k]
  |  |  |  |  ------------------
  |  |  |  |   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: 680k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  8.98k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  8.94k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 8.98k, False: 671k]
  |  |  |  |  ------------------
  |  |  |  |   50|  8.98k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 33, False: 8.94k]
  |  |  |  |  ------------------
  |  |  |  |   51|  8.94k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     33|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  8.94k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  8.94k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  8.94k|    ptr += n;                                                                  \
  |  |  |  |   57|  8.94k|    break;
  |  |  ------------------
  |  |   63|  8.94k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 32, False: 680k]
  |  |  ------------------
  |  |   64|     32|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 680k]
  |  |  ------------------
  |  |   65|     38|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 6, False: 680k]
  |  |  ------------------
  |  |   66|     38|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     38|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     38|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  301|  3.99k|        case BT_QUEST:
  ------------------
  |  Branch (301:9): [True: 3.99k, False: 676k]
  ------------------
  302|  3.99k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.99k|#  define MINBPC(enc) 2
  ------------------
  303|  3.99k|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  3.99k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  3.99k|    {                                                                          \
  |  |  |  |  135|  3.99k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  3.99k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  3.99k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 3.99k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  3.99k|    }
  |  |  ------------------
  ------------------
  304|  3.99k|          if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  3.99k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  3.99k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 3.38k, False: 610]
  |  |  |  |  |  Branch (872:49): [True: 2.21k, False: 1.16k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  305|  2.21k|            *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.21k|#  define MINBPC(enc) 2
  ------------------
  306|  2.21k|            return tok;
  307|  2.21k|          }
  308|  1.77k|          break;
  309|   667k|        default:
  ------------------
  |  Branch (309:9): [True: 667k, False: 13.0k]
  ------------------
  310|   667k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|   667k|#  define MINBPC(enc) 2
  ------------------
  311|   667k|          break;
  312|   680k|        }
  313|   680k|      }
  314|    121|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    121|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  315|  2.37k|    case BT_QUEST:
  ------------------
  |  Branch (315:5): [True: 2.37k, False: 39.6k]
  ------------------
  316|  2.37k|      if (! PREFIX(checkPiTarget)(enc, target, ptr, &tok)) {
  ------------------
  |  |  915|  2.37k|#  define PREFIX(ident) big2_##ident
  ------------------
  |  Branch (316:11): [True: 2, False: 2.37k]
  ------------------
  317|      2|        *nextTokPtr = ptr;
  318|      2|        return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  319|      2|      }
  320|  2.37k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.37k|#  define MINBPC(enc) 2
  ------------------
  321|  2.37k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.37k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.37k|    {                                                                          \
  |  |  |  |  135|  2.37k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.37k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.37k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 51, False: 2.32k]
  |  |  |  |  ------------------
  |  |  |  |  136|     51|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     51|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     51|      }                                                                        \
  |  |  |  |  138|  2.37k|    }
  |  |  ------------------
  ------------------
  322|  2.32k|      if (CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  2.32k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.32k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.30k, False: 12]
  |  |  |  |  |  Branch (872:49): [True: 2.30k, False: 6]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  323|  2.30k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.30k|#  define MINBPC(enc) 2
  ------------------
  324|  2.30k|        return tok;
  325|  2.30k|      }
  326|       |      /* fall through */
  327|     28|    default:
  ------------------
  |  Branch (327:5): [True: 10, False: 42.0k]
  ------------------
  328|     28|      *nextTokPtr = ptr;
  329|     28|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     28|#define XML_TOK_INVALID 0
  ------------------
  330|  42.0k|    }
  331|  42.0k|  }
  332|     69|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     69|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  333|  4.89k|}
xmltok.c:big2_checkPiTarget:
  232|  4.78k|                      int *tokPtr) {
  233|  4.78k|  int upper = 0;
  234|  4.78k|  UNUSED_P(enc);
  ------------------
  |  |  135|  4.78k|#  define UNUSED_P(p) (void)p
  ------------------
  235|  4.78k|  *tokPtr = XML_TOK_PI;
  ------------------
  |  |   76|  4.78k|#define XML_TOK_PI 11       /* processing instruction */
  ------------------
  236|  4.78k|  if (end - ptr != MINBPC(enc) * 3)
  ------------------
  |  |  916|  4.78k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (236:7): [True: 1.78k, False: 3.00k]
  ------------------
  237|  1.78k|    return 1;
  238|  3.00k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  3.00k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  3.00k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 2.38k, False: 623]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  239|  1.12k|  case ASCII_x:
  ------------------
  |  |   86|  1.12k|#define ASCII_x 0x78
  ------------------
  |  Branch (239:3): [True: 1.12k, False: 1.88k]
  ------------------
  240|  1.12k|    break;
  241|  1.09k|  case ASCII_X:
  ------------------
  |  |   59|  1.09k|#define ASCII_X 0x58
  ------------------
  |  Branch (241:3): [True: 1.09k, False: 1.91k]
  ------------------
  242|  1.09k|    upper = 1;
  243|  1.09k|    break;
  244|    788|  default:
  ------------------
  |  Branch (244:3): [True: 788, False: 2.21k]
  ------------------
  245|    788|    return 1;
  246|  3.00k|  }
  247|  2.21k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.21k|#  define MINBPC(enc) 2
  ------------------
  248|  2.21k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  2.21k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  2.21k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.68k, False: 532]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  249|    573|  case ASCII_m:
  ------------------
  |  |   75|    573|#define ASCII_m 0x6D
  ------------------
  |  Branch (249:3): [True: 573, False: 1.64k]
  ------------------
  250|    573|    break;
  251|  1.08k|  case ASCII_M:
  ------------------
  |  |   48|  1.08k|#define ASCII_M 0x4D
  ------------------
  |  Branch (251:3): [True: 1.08k, False: 1.12k]
  ------------------
  252|  1.08k|    upper = 1;
  253|  1.08k|    break;
  254|    554|  default:
  ------------------
  |  Branch (254:3): [True: 554, False: 1.66k]
  ------------------
  255|    554|    return 1;
  256|  2.21k|  }
  257|  1.66k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.66k|#  define MINBPC(enc) 2
  ------------------
  258|  1.66k|  switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  1.66k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  1.66k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 874, False: 787]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|     38|  case ASCII_l:
  ------------------
  |  |   74|     38|#define ASCII_l 0x6C
  ------------------
  |  Branch (259:3): [True: 38, False: 1.62k]
  ------------------
  260|     38|    break;
  261|      2|  case ASCII_L:
  ------------------
  |  |   47|      2|#define ASCII_L 0x4C
  ------------------
  |  Branch (261:3): [True: 2, False: 1.65k]
  ------------------
  262|      2|    upper = 1;
  263|      2|    break;
  264|  1.62k|  default:
  ------------------
  |  Branch (264:3): [True: 1.62k, False: 40]
  ------------------
  265|  1.62k|    return 1;
  266|  1.66k|  }
  267|     40|  if (upper)
  ------------------
  |  Branch (267:7): [True: 4, False: 36]
  ------------------
  268|      4|    return 0;
  269|     36|  *tokPtr = XML_TOK_XML_DECL;
  ------------------
  |  |   77|     36|#define XML_TOK_XML_DECL 12 /* XML decl or text decl */
  ------------------
  270|     36|  return 1;
  271|     40|}
xmltok.c:big2_scanPercent:
  924|  2.42k|                    const char **nextTokPtr) {
  925|  2.42k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.42k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.42k|    {                                                                          \
  |  |  |  |  135|  2.42k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.42k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.42k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 58, False: 2.36k]
  |  |  |  |  ------------------
  |  |  |  |  136|     58|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     58|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     58|      }                                                                        \
  |  |  |  |  138|  2.42k|    }
  |  |  ------------------
  ------------------
  926|  2.36k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.36k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.36k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.85k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.85k, False: 506]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  927|  1.56k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.28k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 492, False: 1.87k]
  |  |  ------------------
  |  |  111|  1.28k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    492|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    492|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    492|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 14, False: 478]
  |  |  ------------------
  |  |  112|     14|      *nextTokPtr = ptr;                                                       \
  |  |  113|     14|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     14|    }                                                                          \
  |  |  115|  1.28k|    /* fall through */                                                         \
  |  |  116|  1.28k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 587, False: 1.77k]
  |  |  ------------------
  |  |  117|  1.28k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 215, False: 2.14k]
  |  |  ------------------
  |  |  118|  1.28k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.28k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.28k|    break;                                                                     \
  |  |  120|  1.28k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.36k]
  |  |  |  |  ------------------
  |  |  |  |  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.36k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|      8|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 8, False: 2.35k]
  |  |  |  |  ------------------
  |  |  |  |  100|      8|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 4]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      4|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      8|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      4|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      4|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      4|    }                                                                          \
  |  |  |  |  106|      4|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  928|    246|  case BT_S:
  ------------------
  |  Branch (928:3): [True: 246, False: 2.11k]
  ------------------
  929|    705|  case BT_LF:
  ------------------
  |  Branch (929:3): [True: 459, False: 1.90k]
  ------------------
  930|  1.04k|  case BT_CR:
  ------------------
  |  Branch (930:3): [True: 344, False: 2.01k]
  ------------------
  931|  1.05k|  case BT_PERCNT:
  ------------------
  |  Branch (931:3): [True: 3, False: 2.36k]
  ------------------
  932|  1.05k|    *nextTokPtr = ptr;
  933|  1.05k|    return XML_TOK_PERCENT;
  ------------------
  |  |   89|  1.05k|#define XML_TOK_PERCENT 22
  ------------------
  934|      9|  default:
  ------------------
  |  Branch (934:3): [True: 9, False: 2.35k]
  ------------------
  935|      9|    *nextTokPtr = ptr;
  936|      9|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  937|  2.36k|  }
  938|  4.70k|  while (HAS_CHAR(enc, ptr, end)) {
  939|  4.70k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  4.70k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  4.70k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  3.08k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 3.08k, False: 1.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  940|  12.6k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  3.50k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 1.60k, False: 3.10k]
  |  |  ------------------
  |  |   82|  3.50k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  1.60k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  1.60k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.60k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 28, False: 1.57k]
  |  |  ------------------
  |  |   83|     28|      *nextTokPtr = ptr;                                                       \
  |  |   84|     28|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     28|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     28|    }                                                                          \
  |  |   86|  3.50k|    /* fall through */                                                         \
  |  |   87|  3.50k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 643, False: 4.06k]
  |  |  ------------------
  |  |   88|  2.63k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 413, False: 4.29k]
  |  |  ------------------
  |  |   89|  2.90k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 271, False: 4.43k]
  |  |  ------------------
  |  |   90|  3.29k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 393, False: 4.31k]
  |  |  ------------------
  |  |   91|  3.50k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 209, False: 4.50k]
  |  |  ------------------
  |  |   92|  3.50k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  3.50k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  3.50k|    break;                                                                     \
  |  |   94|  3.50k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 4.70k]
  |  |  |  |  ------------------
  |  |  |  |   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: 4.70k]
  |  |  |  |  ------------------
  |  |  |  |   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: 4.69k]
  |  |  |  |  ------------------
  |  |  |  |   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;
  |  |  ------------------
  ------------------
  941|  1.14k|    case BT_SEMI:
  ------------------
  |  Branch (941:5): [True: 1.14k, False: 3.56k]
  ------------------
  942|  1.14k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.14k|#  define MINBPC(enc) 2
  ------------------
  943|  1.14k|      return XML_TOK_PARAM_ENTITY_REF;
  ------------------
  |  |   95|  1.14k|#define XML_TOK_PARAM_ENTITY_REF 28
  ------------------
  944|     13|    default:
  ------------------
  |  Branch (944:5): [True: 13, False: 4.69k]
  ------------------
  945|     13|      *nextTokPtr = ptr;
  946|     13|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  947|  4.70k|    }
  948|  4.70k|  }
  949|     74|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     74|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  950|  1.28k|}
xmltok.c:big2_scanPoundName:
  954|  1.54k|                      const char **nextTokPtr) {
  955|  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.53k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.54k|    }
  |  |  ------------------
  ------------------
  956|  1.53k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.53k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.53k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.43k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.43k, False: 100]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  957|  1.45k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  1.48k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 65, False: 1.47k]
  |  |  ------------------
  |  |  111|  1.48k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|     65|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|     65|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|     65|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 16, False: 49]
  |  |  ------------------
  |  |  112|     16|      *nextTokPtr = ptr;                                                       \
  |  |  113|     16|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     16|    }                                                                          \
  |  |  115|  1.48k|    /* fall through */                                                         \
  |  |  116|  1.48k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.29k, False: 247]
  |  |  ------------------
  |  |  117|  1.48k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 145, False: 1.39k]
  |  |  ------------------
  |  |  118|  1.48k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.48k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  1.48k|    break;                                                                     \
  |  |  120|  1.48k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.53k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 1.53k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     28|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 28, False: 1.51k]
  |  |  |  |  ------------------
  |  |  |  |  100|     28|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 24]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     24|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     48|#    define IS_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|     24|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     24|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     24|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     24|    }                                                                          \
  |  |  |  |  106|     24|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  958|      9|  default:
  ------------------
  |  Branch (958:3): [True: 9, False: 1.53k]
  ------------------
  959|      9|    *nextTokPtr = ptr;
  960|      9|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      9|#define XML_TOK_INVALID 0
  ------------------
  961|  1.53k|  }
  962|  10.7k|  while (HAS_CHAR(enc, ptr, end)) {
  963|  10.7k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  10.7k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  10.7k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  10.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 10.4k, False: 324]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  964|  31.6k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  9.31k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 312, False: 10.4k]
  |  |  ------------------
  |  |   82|  9.31k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    312|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    312|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    312|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 10, False: 302]
  |  |  ------------------
  |  |   83|     10|      *nextTokPtr = ptr;                                                       \
  |  |   84|     10|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     10|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     10|    }                                                                          \
  |  |   86|  9.31k|    /* fall through */                                                         \
  |  |   87|  9.31k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 4.25k, False: 6.48k]
  |  |  ------------------
  |  |   88|  8.72k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 4.17k, False: 6.57k]
  |  |  ------------------
  |  |   89|  8.92k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 194, False: 10.5k]
  |  |  ------------------
  |  |   90|  9.11k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 194, False: 10.5k]
  |  |  ------------------
  |  |   91|  9.31k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 195, False: 10.5k]
  |  |  ------------------
  |  |   92|  9.31k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  9.31k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  9.31k|    break;                                                                     \
  |  |   94|  9.31k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 10.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: 10.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|      7|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 7, False: 10.7k]
  |  |  |  |  ------------------
  |  |  |  |   71|      7|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 3]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      3|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      6|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      3|    }                                                                          \
  |  |  |  |   77|      3|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  965|    241|    case BT_CR:
  ------------------
  |  Branch (965:5): [True: 241, False: 10.5k]
  ------------------
  966|    334|    case BT_LF:
  ------------------
  |  Branch (966:5): [True: 93, False: 10.6k]
  ------------------
  967|    643|    case BT_S:
  ------------------
  |  Branch (967:5): [True: 309, False: 10.4k]
  ------------------
  968|    848|    case BT_RPAR:
  ------------------
  |  Branch (968:5): [True: 205, False: 10.5k]
  ------------------
  969|  1.20k|    case BT_GT:
  ------------------
  |  Branch (969:5): [True: 352, False: 10.3k]
  ------------------
  970|  1.20k|    case BT_PERCNT:
  ------------------
  |  Branch (970:5): [True: 1, False: 10.7k]
  ------------------
  971|  1.40k|    case BT_VERBAR:
  ------------------
  |  Branch (971:5): [True: 207, False: 10.5k]
  ------------------
  972|  1.40k|      *nextTokPtr = ptr;
  973|  1.40k|      return XML_TOK_POUND_NAME;
  ------------------
  |  |   87|  1.40k|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  974|      7|    default:
  ------------------
  |  Branch (974:5): [True: 7, False: 10.7k]
  ------------------
  975|      7|      *nextTokPtr = ptr;
  976|      7|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      7|#define XML_TOK_INVALID 0
  ------------------
  977|  10.7k|    }
  978|  10.7k|  }
  979|     54|  return -XML_TOK_POUND_NAME;
  ------------------
  |  |   87|     54|#define XML_TOK_POUND_NAME 20 /* #name */
  ------------------
  980|  1.48k|}
xmltok.c:big2_contentTok:
  824|   107k|                   const char **nextTokPtr) {
  825|   107k|  if (ptr >= end)
  ------------------
  |  Branch (825:7): [True: 1.08k, False: 106k]
  ------------------
  826|  1.08k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.08k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  827|   106k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|   106k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (827:7): [Folded - Ignored]
  ------------------
  828|   106k|    size_t n = end - ptr;
  829|   106k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|   106k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (829:9): [True: 26.4k, False: 79.8k]
  ------------------
  830|  26.4k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  26.4k|#  define MINBPC(enc) 2
  ------------------
  831|  26.4k|      if (n == 0)
  ------------------
  |  Branch (831:11): [True: 125, False: 26.3k]
  ------------------
  832|    125|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|    125|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  833|  26.3k|      end = ptr + n;
  834|  26.3k|    }
  835|   106k|  }
  836|   106k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   106k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   106k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  85.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 85.7k, False: 20.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  837|  17.9k|  case BT_LT:
  ------------------
  |  Branch (837:3): [True: 17.9k, False: 88.1k]
  ------------------
  838|  17.9k|    return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  17.9k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanLt)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  17.9k|#  define MINBPC(enc) 2
  ------------------
  839|  12.0k|  case BT_AMP:
  ------------------
  |  Branch (839:3): [True: 12.0k, False: 94.0k]
  ------------------
  840|  12.0k|    return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  12.0k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  12.0k|#  define MINBPC(enc) 2
  ------------------
  841|  33.4k|  case BT_CR:
  ------------------
  |  Branch (841:3): [True: 33.4k, False: 72.6k]
  ------------------
  842|  33.4k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  33.4k|#  define MINBPC(enc) 2
  ------------------
  843|  33.4k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  33.4k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  33.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  33.4k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (843:9): [True: 21, False: 33.4k]
  ------------------
  844|     21|      return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|     21|  -3                            /* A CR at the end of the scan;                \
  ------------------
  845|  33.4k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  33.4k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  33.4k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  18.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 18.5k, False: 14.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (845:9): [True: 440, False: 33.0k]
  ------------------
  846|    440|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    440|#  define MINBPC(enc) 2
  ------------------
  847|  33.4k|    *nextTokPtr = ptr;
  848|  33.4k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  33.4k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  849|  2.00k|  case BT_LF:
  ------------------
  |  Branch (849:3): [True: 2.00k, False: 104k]
  ------------------
  850|  2.00k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.00k|#  define MINBPC(enc) 2
  ------------------
  851|  2.00k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  2.00k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  852|  13.6k|  case BT_RSQB:
  ------------------
  |  Branch (852:3): [True: 13.6k, False: 92.4k]
  ------------------
  853|  13.6k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  13.6k|#  define MINBPC(enc) 2
  ------------------
  854|  13.6k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  13.6k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  13.6k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  13.6k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (854:9): [True: 2, False: 13.6k]
  ------------------
  855|      2|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      2|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  856|  13.6k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  920|  13.6k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  13.6k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 11.7k, False: 1.85k]
  |  |  |  |  |  Branch (872:49): [True: 6.60k, False: 5.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  857|  7.03k|      break;
  858|  6.60k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  6.60k|#  define MINBPC(enc) 2
  ------------------
  859|  6.60k|    if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  6.60k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  6.60k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  6.60k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (859:9): [True: 8, False: 6.59k]
  ------------------
  860|      8|      return XML_TOK_TRAILING_RSQB;
  ------------------
  |  |   46|      8|  -5 /* ] or ]] at the end of the scan; might be                               \
  ------------------
  861|  6.59k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|  6.59k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  6.59k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 5.91k, False: 681]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 5.91k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  862|  6.59k|      ptr -= MINBPC(enc);
  ------------------
  |  |  916|  6.59k|#  define MINBPC(enc) 2
  ------------------
  863|  6.59k|      break;
  864|  6.59k|    }
  865|      1|    *nextTokPtr = ptr;
  866|      1|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  867|  25.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: 106k]
  |  |  |  |  ------------------
  |  |  |  |   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: 106k]
  |  |  |  |  ------------------
  |  |  |  |   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|  12.5k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  12.4k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 12.5k, False: 93.6k]
  |  |  |  |  ------------------
  |  |  |  |   50|  12.5k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 55, False: 12.4k]
  |  |  |  |  ------------------
  |  |  |  |   51|  12.4k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     55|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  12.4k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  12.4k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  12.4k|    ptr += n;                                                                  \
  |  |  |  |   57|  12.4k|    break;
  |  |  ------------------
  |  |   63|  12.4k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 70, False: 106k]
  |  |  ------------------
  |  |   64|     70|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 106k]
  |  |  ------------------
  |  |   65|     82|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 12, False: 106k]
  |  |  ------------------
  |  |   66|     82|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     82|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     82|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  868|  14.4k|  default:
  ------------------
  |  Branch (868:3): [True: 14.4k, False: 91.7k]
  ------------------
  869|  14.4k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  14.4k|#  define MINBPC(enc) 2
  ------------------
  870|  14.4k|    break;
  871|   106k|  }
  872|  2.07M|  while (HAS_CHAR(enc, ptr, end)) {
  873|  2.07M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.07M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.07M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  92.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 92.8k, False: 1.98M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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: 2.07M]
  |  |  ------------------
  |  |  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: 2.07M]
  |  |  ------------------
  |  |  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|  14.0k|      LEAD_CASE(4)
  ------------------
  |  |  875|  14.0k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (875:3): [True: 14.0k, False: 2.05M]
  |  |  ------------------
  |  |  876|  14.0k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  14.0k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (876:9): [True: 50, False: 14.0k]
  |  |  ------------------
  |  |  877|     50|      *nextTokPtr = ptr;                                                       \
  |  |  878|     50|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     50|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  879|     50|    }                                                                          \
  |  |  880|  14.0k|    ptr += n;                                                                  \
  |  |  881|  14.0k|    break;
  ------------------
  885|      0|#  undef LEAD_CASE
  886|  18.0k|    case BT_RSQB:
  ------------------
  |  Branch (886:5): [True: 18.0k, False: 2.05M]
  ------------------
  887|  18.0k|      if (HAS_CHARS(enc, ptr, end, 2)) {
  ------------------
  |  |  129|  18.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  916|  18.0k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 18.0k, False: 1]
  |  |  ------------------
  ------------------
  888|  18.0k|        if (! CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_RSQB)) {
  ------------------
  |  |  920|  18.0k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  18.0k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 15.4k, False: 2.55k]
  |  |  |  |  |  Branch (872:49): [True: 5.67k, False: 9.77k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  889|  12.3k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  12.3k|#  define MINBPC(enc) 2
  ------------------
  890|  12.3k|          break;
  891|  12.3k|        }
  892|  5.67k|        if (HAS_CHARS(enc, ptr, end, 3)) {
  ------------------
  |  |  129|  5.67k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  ------------------
  |  |  |  |  916|  5.67k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  |  Branch (129:5): [True: 5.67k, False: 7]
  |  |  ------------------
  ------------------
  893|  5.67k|          if (! CHAR_MATCHES(enc, ptr + 2 * MINBPC(enc), ASCII_GT)) {
  ------------------
  |  |  920|  5.67k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  5.67k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 4.83k, False: 835]
  |  |  |  |  |  Branch (872:49): [True: 2, False: 4.83k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  894|  5.66k|            ptr += MINBPC(enc);
  ------------------
  |  |  916|  5.66k|#  define MINBPC(enc) 2
  ------------------
  895|  5.66k|            break;
  896|  5.66k|          }
  897|      2|          *nextTokPtr = ptr + 2 * MINBPC(enc);
  ------------------
  |  |  916|      2|#  define MINBPC(enc) 2
  ------------------
  898|      2|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      2|#define XML_TOK_INVALID 0
  ------------------
  899|  5.67k|        }
  900|  5.67k|      }
  901|       |      /* fall through */
  902|  4.51k|    case BT_AMP:
  ------------------
  |  Branch (902:5): [True: 4.50k, False: 2.06M]
  ------------------
  903|  9.45k|    case BT_LT:
  ------------------
  |  Branch (903:5): [True: 4.94k, False: 2.06M]
  ------------------
  904|  9.50k|    case BT_NONXML:
  ------------------
  |  Branch (904:5): [True: 49, False: 2.07M]
  ------------------
  905|  9.50k|    case BT_MALFORM:
  ------------------
  |  Branch (905:5): [True: 0, False: 2.07M]
  ------------------
  906|  9.51k|    case BT_TRAIL:
  ------------------
  |  Branch (906:5): [True: 8, False: 2.07M]
  ------------------
  907|  38.4k|    case BT_CR:
  ------------------
  |  Branch (907:5): [True: 28.8k, False: 2.04M]
  ------------------
  908|  40.0k|    case BT_LF:
  ------------------
  |  Branch (908:5): [True: 1.65k, False: 2.07M]
  ------------------
  909|  40.0k|      *nextTokPtr = ptr;
  910|  40.0k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  40.0k|#define XML_TOK_DATA_CHARS 6
  ------------------
  911|  2.00M|    default:
  ------------------
  |  Branch (911:5): [True: 2.00M, False: 72.1k]
  ------------------
  912|  2.00M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.00M|#  define MINBPC(enc) 2
  ------------------
  913|  2.00M|      break;
  914|  2.07M|    }
  915|  2.07M|  }
  916|    380|  *nextTokPtr = ptr;
  917|    380|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    380|#define XML_TOK_DATA_CHARS 6
  ------------------
  918|  40.4k|}
xmltok.c:big2_scanLt:
  726|  17.9k|               const char **nextTokPtr) {
  727|  17.9k|#  ifdef XML_NS
  728|  17.9k|  int hadColon;
  729|  17.9k|#  endif
  730|  17.9k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  17.9k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  17.9k|    {                                                                          \
  |  |  |  |  135|  17.9k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  17.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  17.9k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 14, False: 17.9k]
  |  |  |  |  ------------------
  |  |  |  |  136|     14|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     14|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     14|      }                                                                        \
  |  |  |  |  138|  17.9k|    }
  |  |  ------------------
  ------------------
  731|  17.9k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  17.9k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  17.9k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  14.8k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 14.8k, False: 3.06k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  732|  10.8k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  11.3k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 3.03k, False: 14.9k]
  |  |  ------------------
  |  |  111|  11.3k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  3.03k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  3.03k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  3.03k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 21, False: 3.01k]
  |  |  ------------------
  |  |  112|     21|      *nextTokPtr = ptr;                                                       \
  |  |  113|     21|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     21|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     21|    }                                                                          \
  |  |  115|  11.3k|    /* fall through */                                                         \
  |  |  116|  11.3k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 4.77k, False: 13.1k]
  |  |  ------------------
  |  |  117|  11.3k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 3.57k, False: 14.3k]
  |  |  ------------------
  |  |  118|  11.3k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  11.3k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  11.3k|    break;                                                                     \
  |  |  120|  11.3k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 17.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: 17.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|     20|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 20, False: 17.9k]
  |  |  |  |  ------------------
  |  |  |  |  100|     20|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 16]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     16|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     32|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     16|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     16|    }                                                                          \
  |  |  |  |  106|     16|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  733|  1.32k|  case BT_EXCL:
  ------------------
  |  Branch (733:3): [True: 1.32k, False: 16.6k]
  ------------------
  734|  1.32k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.32k|#  define MINBPC(enc) 2
  ------------------
  735|  1.32k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  1.32k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  1.32k|    {                                                                          \
  |  |  |  |  135|  1.32k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  1.32k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  1.32k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 1.32k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  1.32k|    }
  |  |  ------------------
  ------------------
  736|  1.32k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.32k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.32k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.31k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:3): [True: 16, False: 1.31k]
  |  |  |  |  |  Branch (870:4): [True: 1.31k, False: 13]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  737|    371|    case BT_MINUS:
  ------------------
  |  Branch (737:5): [True: 371, False: 955]
  ------------------
  738|    371|      return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    371|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanComment)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    371|#  define MINBPC(enc) 2
  ------------------
  739|    939|    case BT_LSQB:
  ------------------
  |  Branch (739:5): [True: 939, False: 387]
  ------------------
  740|    939|      return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|    939|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanCdataSection)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|    939|#  define MINBPC(enc) 2
  ------------------
  741|  1.32k|    }
  742|     16|    *nextTokPtr = ptr;
  743|     16|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     16|#define XML_TOK_INVALID 0
  ------------------
  744|  3.15k|  case BT_QUEST:
  ------------------
  |  Branch (744:3): [True: 3.15k, False: 14.7k]
  ------------------
  745|  3.15k|    return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  3.15k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanPi)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  3.15k|#  define MINBPC(enc) 2
  ------------------
  746|  2.04k|  case BT_SOL:
  ------------------
  |  Branch (746:3): [True: 2.04k, False: 15.8k]
  ------------------
  747|  2.04k|    return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  2.04k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanEndTag)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  2.04k|#  define MINBPC(enc) 2
  ------------------
  748|     11|  default:
  ------------------
  |  Branch (748:3): [True: 11, False: 17.9k]
  ------------------
  749|     11|    *nextTokPtr = ptr;
  750|     11|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  751|  17.9k|  }
  752|  11.3k|#  ifdef XML_NS
  753|  11.3k|  hadColon = 0;
  754|  11.3k|#  endif
  755|       |  /* we have a start-tag */
  756|   362k|  while (HAS_CHAR(enc, ptr, end)) {
  757|   362k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   362k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   362k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  19.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 19.3k, False: 342k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  758|  1.73M|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|   350k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 342k, False: 19.3k]
  |  |  ------------------
  |  |   82|   350k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|   342k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|   342k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|   342k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 19, False: 342k]
  |  |  ------------------
  |  |   83|     19|      *nextTokPtr = ptr;                                                       \
  |  |   84|     19|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     19|    }                                                                          \
  |  |   86|   350k|    /* fall through */                                                         \
  |  |   87|   350k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 5.25k, False: 357k]
  |  |  ------------------
  |  |   88|   348k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 421, False: 361k]
  |  |  ------------------
  |  |   89|   348k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 243, False: 362k]
  |  |  ------------------
  |  |   90|   350k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 1.79k, False: 360k]
  |  |  ------------------
  |  |   91|   350k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 343, False: 361k]
  |  |  ------------------
  |  |   92|   350k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   350k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|   350k|    break;                                                                     \
  |  |   94|   350k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 362k]
  |  |  |  |  ------------------
  |  |  |  |   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: 362k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     18|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 18, False: 362k]
  |  |  |  |  ------------------
  |  |  |  |   71|     18|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 14]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     14|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     28|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     14|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     14|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     14|    }                                                                          \
  |  |  |  |   77|     14|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  759|      0|#  ifdef XML_NS
  760|      0|    case BT_COLON:
  ------------------
  |  Branch (760:5): [True: 0, False: 362k]
  ------------------
  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.95k|    case BT_S:
  ------------------
  |  Branch (776:5): [True: 1.95k, False: 360k]
  ------------------
  777|  3.20k|    case BT_CR:
  ------------------
  |  Branch (777:5): [True: 1.25k, False: 361k]
  ------------------
  778|  4.61k|    case BT_LF: {
  ------------------
  |  Branch (778:5): [True: 1.40k, False: 360k]
  ------------------
  779|  4.61k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.61k|#  define MINBPC(enc) 2
  ------------------
  780|  5.98k|      while (HAS_CHAR(enc, ptr, end)) {
  781|  5.98k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  5.98k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  5.98k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  5.00k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 5.00k, False: 979]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  782|  3.73k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  3.37k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 959, False: 5.02k]
  |  |  ------------------
  |  |  111|  3.37k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    959|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    959|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    959|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 13, False: 946]
  |  |  ------------------
  |  |  112|     13|      *nextTokPtr = ptr;                                                       \
  |  |  113|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     13|    }                                                                          \
  |  |  115|  3.37k|    /* fall through */                                                         \
  |  |  116|  3.37k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.80k, False: 4.18k]
  |  |  ------------------
  |  |  117|  3.37k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 629, False: 5.35k]
  |  |  ------------------
  |  |  118|  3.37k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  3.37k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  3.37k|    break;                                                                     \
  |  |  120|  3.37k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 5.98k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 5.98k]
  |  |  |  |  ------------------
  |  |  |  |  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: 5.96k]
  |  |  |  |  ------------------
  |  |  |  |  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|    771|        case BT_GT:
  ------------------
  |  Branch (783:9): [True: 771, False: 5.21k]
  ------------------
  784|    771|          goto gt;
  785|    390|        case BT_SOL:
  ------------------
  |  Branch (785:9): [True: 390, False: 5.59k]
  ------------------
  786|    390|          goto sol;
  787|    523|        case BT_S:
  ------------------
  |  Branch (787:9): [True: 523, False: 5.45k]
  ------------------
  788|    854|        case BT_CR:
  ------------------
  |  Branch (788:9): [True: 331, False: 5.65k]
  ------------------
  789|  1.41k|        case BT_LF:
  ------------------
  |  Branch (789:9): [True: 556, False: 5.42k]
  ------------------
  790|  1.41k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.41k|#  define MINBPC(enc) 2
  ------------------
  791|  1.41k|          continue;
  792|      6|        default:
  ------------------
  |  Branch (792:9): [True: 6, False: 5.97k]
  ------------------
  793|      6|          *nextTokPtr = ptr;
  794|      6|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  795|  5.98k|        }
  796|  3.37k|        return PREFIX(scanAtts)(enc, ptr, end, nextTokPtr);
  ------------------
  |  |  915|  3.37k|#  define PREFIX(ident) big2_##ident
  ------------------
  797|  5.98k|      }
  798|     42|      return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     42|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  799|  4.61k|    }
  800|  6.36k|    case BT_GT:
  ------------------
  |  Branch (800:5): [True: 6.36k, False: 355k]
  ------------------
  801|  7.13k|    gt:
  802|  7.13k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  7.13k|#  define MINBPC(enc) 2
  ------------------
  803|  7.13k|      return XML_TOK_START_TAG_NO_ATTS;
  ------------------
  |  |   63|  7.13k|#define XML_TOK_START_TAG_NO_ATTS 2
  ------------------
  804|    265|    case BT_SOL:
  ------------------
  |  Branch (804:5): [True: 265, False: 362k]
  ------------------
  805|    655|    sol:
  806|    655|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    655|#  define MINBPC(enc) 2
  ------------------
  807|    655|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    655|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    655|    {                                                                          \
  |  |  |  |  135|    655|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    655|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    655|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 11, False: 644]
  |  |  |  |  ------------------
  |  |  |  |  136|     11|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     11|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     11|      }                                                                        \
  |  |  |  |  138|    655|    }
  |  |  ------------------
  ------------------
  808|    644|      if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    644|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    644|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 630, False: 14]
  |  |  |  |  |  Branch (872:49): [True: 618, False: 12]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  809|     26|        *nextTokPtr = ptr;
  810|     26|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     26|#define XML_TOK_INVALID 0
  ------------------
  811|     26|      }
  812|    618|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    618|#  define MINBPC(enc) 2
  ------------------
  813|    618|      return XML_TOK_EMPTY_ELEMENT_NO_ATTS;
  ------------------
  |  |   65|    618|#define XML_TOK_EMPTY_ELEMENT_NO_ATTS 4
  ------------------
  814|     12|    default:
  ------------------
  |  Branch (814:5): [True: 12, False: 362k]
  ------------------
  815|     12|      *nextTokPtr = ptr;
  816|     12|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  817|   362k|    }
  818|   362k|  }
  819|     71|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     71|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  820|  11.3k|}
xmltok.c:big2_scanCdataSection:
  337|    939|                         const char **nextTokPtr) {
  338|    939|  static const char CDATA_LSQB[]
  339|    939|      = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   38|    939|#define ASCII_C 0x43
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   39|    939|#define ASCII_D 0x44
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    939|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   55|    939|#define ASCII_T 0x54
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |   36|    939|#define ASCII_A 0x41
  ------------------
                    = {ASCII_C, ASCII_D, ASCII_A, ASCII_T, ASCII_A, ASCII_LSQB};
  ------------------
  |  |  114|    939|#define ASCII_LSQB 0x5B
  ------------------
  340|    939|  int i;
  341|    939|  UNUSED_P(enc);
  ------------------
  |  |  135|    939|#  define UNUSED_P(p) (void)p
  ------------------
  342|       |  /* CDATA[ */
  343|    939|  REQUIRE_CHARS(enc, ptr, end, 6);
  ------------------
  |  |  134|    939|    {                                                                          \
  |  |  135|    939|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  ------------------
  |  |  |  |  129|    939|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|    939|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (135:11): [True: 3, False: 936]
  |  |  ------------------
  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  ------------------
  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  ------------------
  |  |  137|      3|      }                                                                        \
  |  |  138|    939|    }
  ------------------
  344|  6.49k|  for (i = 0; i < 6; i++, ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  5.55k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (344:15): [True: 5.57k, False: 922]
  ------------------
  345|  5.57k|    if (! CHAR_MATCHES(enc, ptr, CDATA_LSQB[i])) {
  ------------------
  |  |  920|  5.57k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  5.57k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 5.56k, False: 4]
  |  |  |  |  |  Branch (872:49): [True: 5.55k, False: 10]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  346|     14|      *nextTokPtr = ptr;
  347|     14|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     14|#define XML_TOK_INVALID 0
  ------------------
  348|     14|    }
  349|  5.57k|  }
  350|    922|  *nextTokPtr = ptr;
  351|    922|  return XML_TOK_CDATA_SECT_OPEN;
  ------------------
  |  |   69|    922|#define XML_TOK_CDATA_SECT_OPEN 8
  ------------------
  352|    936|}
xmltok.c:big2_scanEndTag:
  432|  2.04k|                   const char **nextTokPtr) {
  433|  2.04k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.04k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.04k|    {                                                                          \
  |  |  |  |  135|  2.04k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.04k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.04k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 1, False: 2.04k]
  |  |  |  |  ------------------
  |  |  |  |  136|      1|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      1|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      1|      }                                                                        \
  |  |  |  |  138|  2.04k|    }
  |  |  ------------------
  ------------------
  434|  2.04k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.04k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.04k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.72k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.72k, False: 322]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  435|  1.69k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  2.01k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 297, False: 1.74k]
  |  |  ------------------
  |  |  111|  2.01k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|    297|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|    297|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    297|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 1, False: 296]
  |  |  ------------------
  |  |  112|      1|      *nextTokPtr = ptr;                                                       \
  |  |  113|      1|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      1|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      1|    }                                                                          \
  |  |  115|  2.01k|    /* fall through */                                                         \
  |  |  116|  2.01k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 1.06k, False: 979]
  |  |  ------------------
  |  |  117|  2.01k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 656, False: 1.38k]
  |  |  ------------------
  |  |  118|  2.01k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  2.01k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  2.01k|    break;                                                                     \
  |  |  120|  2.01k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 2.04k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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.04k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     20|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 20, False: 2.02k]
  |  |  |  |  ------------------
  |  |  |  |  100|     20|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 16]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     16|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     32|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     16|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     16|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     16|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     16|    }                                                                          \
  |  |  |  |  106|     16|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  436|      6|  default:
  ------------------
  |  Branch (436:3): [True: 6, False: 2.03k]
  ------------------
  437|      6|    *nextTokPtr = ptr;
  438|      6|    return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  439|  2.04k|  }
  440|  3.42k|  while (HAS_CHAR(enc, ptr, end)) {
  441|  3.42k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  3.42k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  3.42k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.91k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.91k, False: 509]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  442|  4.43k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  1.48k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 481, False: 2.94k]
  |  |  ------------------
  |  |   82|  1.48k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|    481|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|    481|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|    481|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 13, False: 468]
  |  |  ------------------
  |  |   83|     13|      *nextTokPtr = ptr;                                                       \
  |  |   84|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     13|    }                                                                          \
  |  |   86|  1.48k|    /* fall through */                                                         \
  |  |   87|  1.48k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 208, False: 3.21k]
  |  |  ------------------
  |  |   88|    881|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 205, False: 3.22k]
  |  |  ------------------
  |  |   89|  1.07k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 196, False: 3.23k]
  |  |  ------------------
  |  |   90|  1.27k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 201, False: 3.22k]
  |  |  ------------------
  |  |   91|  1.48k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 203, False: 3.22k]
  |  |  ------------------
  |  |   92|  1.48k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  1.48k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  1.48k|    break;                                                                     \
  |  |   94|  1.48k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 3.42k]
  |  |  |  |  ------------------
  |  |  |  |   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.42k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     23|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 23, False: 3.40k]
  |  |  |  |  ------------------
  |  |  |  |   71|     23|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 19]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|     19|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     38|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|     19|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|     19|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|     19|    }                                                                          \
  |  |  |  |   77|     19|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  443|    224|    case BT_S:
  ------------------
  |  Branch (443:5): [True: 224, False: 3.20k]
  ------------------
  444|    455|    case BT_CR:
  ------------------
  |  Branch (444:5): [True: 231, False: 3.19k]
  ------------------
  445|  1.32k|    case BT_LF:
  ------------------
  |  Branch (445:5): [True: 874, False: 2.55k]
  ------------------
  446|  2.00k|      for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  1.32k|#  define MINBPC(enc) 2
  ------------------
                    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|    720|#  define MINBPC(enc) 2
  ------------------
  447|  2.00k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.00k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.00k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  1.97k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 1.97k, False: 31]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  448|    214|        case BT_S:
  ------------------
  |  Branch (448:9): [True: 214, False: 1.79k]
  ------------------
  449|    467|        case BT_CR:
  ------------------
  |  Branch (449:9): [True: 253, False: 1.75k]
  ------------------
  450|    720|        case BT_LF:
  ------------------
  |  Branch (450:9): [True: 253, False: 1.75k]
  ------------------
  451|    720|          break;
  452|  1.25k|        case BT_GT:
  ------------------
  |  Branch (452:9): [True: 1.25k, False: 757]
  ------------------
  453|  1.25k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  1.25k|#  define MINBPC(enc) 2
  ------------------
  454|  1.25k|          return XML_TOK_END_TAG;
  ------------------
  |  |   66|  1.25k|#define XML_TOK_END_TAG 5
  ------------------
  455|     37|        default:
  ------------------
  |  Branch (455:9): [True: 37, False: 1.97k]
  ------------------
  456|     37|          *nextTokPtr = ptr;
  457|     37|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     37|#define XML_TOK_INVALID 0
  ------------------
  458|  2.00k|        }
  459|  2.00k|      }
  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.42k]
  ------------------
  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|    569|    case BT_GT:
  ------------------
  |  Branch (468:5): [True: 569, False: 2.85k]
  ------------------
  469|    569|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    569|#  define MINBPC(enc) 2
  ------------------
  470|    569|      return XML_TOK_END_TAG;
  ------------------
  |  |   66|    569|#define XML_TOK_END_TAG 5
  ------------------
  471|     11|    default:
  ------------------
  |  Branch (471:5): [True: 11, False: 3.41k]
  ------------------
  472|     11|      *nextTokPtr = ptr;
  473|     11|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  474|  3.42k|    }
  475|  3.42k|  }
  476|     70|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     70|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  477|  2.01k|}
xmltok.c:big2_scanAtts:
  573|  3.37k|                 const char **nextTokPtr) {
  574|  3.37k|#  ifdef XML_NS
  575|  3.37k|  int hadColon = 0;
  576|  3.37k|#  endif
  577|  95.8k|  while (HAS_CHAR(enc, ptr, end)) {
  578|  95.8k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  95.8k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  95.8k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  94.4k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 94.4k, False: 1.37k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  579|  11.2k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  3.08k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 1.34k, False: 94.4k]
  |  |  ------------------
  |  |   82|  3.08k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  1.34k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  1.34k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.34k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 18, False: 1.33k]
  |  |  ------------------
  |  |   83|     18|      *nextTokPtr = ptr;                                                       \
  |  |   84|     18|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     18|    }                                                                          \
  |  |   86|  3.08k|    /* fall through */                                                         \
  |  |   87|  3.08k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 517, False: 95.3k]
  |  |  ------------------
  |  |   88|  2.45k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 602, False: 95.2k]
  |  |  ------------------
  |  |   89|  2.64k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 196, False: 95.6k]
  |  |  ------------------
  |  |   90|  2.87k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 226, False: 95.6k]
  |  |  ------------------
  |  |   91|  3.08k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 210, False: 95.6k]
  |  |  ------------------
  |  |   92|  3.08k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  3.08k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  3.08k|    break;                                                                     \
  |  |   94|  3.08k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 95.8k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   95|      0|    CHECK_NAME_CASE(3, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 95.8k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|     24|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 24, False: 95.8k]
  |  |  |  |  ------------------
  |  |  |  |   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: 95.8k]
  ------------------
  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|    759|    case BT_S:
  ------------------
  |  Branch (597:5): [True: 759, False: 95.0k]
  ------------------
  598|  1.18k|    case BT_CR:
  ------------------
  |  Branch (598:5): [True: 426, False: 95.4k]
  ------------------
  599|  1.40k|    case BT_LF:
  ------------------
  |  Branch (599:5): [True: 223, False: 95.6k]
  ------------------
  600|  2.59k|      for (;;) {
  601|  2.59k|        int t;
  602|       |
  603|  2.59k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.59k|#  define MINBPC(enc) 2
  ------------------
  604|  2.59k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  2.59k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  2.59k|    {                                                                          \
  |  |  |  |  135|  2.59k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  2.59k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  2.59k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 42, False: 2.55k]
  |  |  |  |  ------------------
  |  |  |  |  136|     42|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     42|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     42|      }                                                                        \
  |  |  |  |  138|  2.59k|    }
  |  |  ------------------
  ------------------
  605|  2.55k|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  2.55k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.55k|  ((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: 24]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  606|  2.55k|        if (t == BT_EQUALS)
  ------------------
  |  Branch (606:13): [True: 1.33k, False: 1.21k]
  ------------------
  607|  1.33k|          break;
  608|  1.21k|        switch (t) {
  609|    681|        case BT_S:
  ------------------
  |  Branch (609:9): [True: 681, False: 531]
  ------------------
  610|    961|        case BT_LF:
  ------------------
  |  Branch (610:9): [True: 280, False: 932]
  ------------------
  611|  1.18k|        case BT_CR:
  ------------------
  |  Branch (611:9): [True: 223, False: 989]
  ------------------
  612|  1.18k|          break;
  613|     28|        default:
  ------------------
  |  Branch (613:9): [True: 28, False: 1.18k]
  ------------------
  614|     28|          *nextTokPtr = ptr;
  615|     28|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     28|#define XML_TOK_INVALID 0
  ------------------
  616|  1.21k|        }
  617|  1.21k|      }
  618|       |      /* fall through */
  619|  92.6k|    case BT_EQUALS: {
  ------------------
  |  Branch (619:5): [True: 91.2k, False: 4.54k]
  ------------------
  620|  92.6k|      int open;
  621|  92.6k|#  ifdef XML_NS
  622|  92.6k|      hadColon = 0;
  623|  92.6k|#  endif
  624|  93.5k|      for (;;) {
  625|  93.5k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  93.5k|#  define MINBPC(enc) 2
  ------------------
  626|  93.5k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  93.5k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  93.5k|    {                                                                          \
  |  |  |  |  135|  93.5k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  93.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  93.5k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 40, False: 93.5k]
  |  |  |  |  ------------------
  |  |  |  |  136|     40|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     40|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     40|      }                                                                        \
  |  |  |  |  138|  93.5k|    }
  |  |  ------------------
  ------------------
  627|  93.5k|        open = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  93.5k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  93.5k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  93.5k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 93.5k, False: 26]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  628|  93.5k|        if (open == BT_QUOT || open == BT_APOS)
  ------------------
  |  Branch (628:13): [True: 3.32k, False: 90.2k]
  |  Branch (628:32): [True: 89.2k, False: 997]
  ------------------
  629|  92.5k|          break;
  630|    997|        switch (open) {
  631|    240|        case BT_S:
  ------------------
  |  Branch (631:9): [True: 240, False: 757]
  ------------------
  632|    631|        case BT_LF:
  ------------------
  |  Branch (632:9): [True: 391, False: 606]
  ------------------
  633|    967|        case BT_CR:
  ------------------
  |  Branch (633:9): [True: 336, False: 661]
  ------------------
  634|    967|          break;
  635|     30|        default:
  ------------------
  |  Branch (635:9): [True: 30, False: 967]
  ------------------
  636|     30|          *nextTokPtr = ptr;
  637|     30|          return XML_TOK_INVALID;
  ------------------
  |  |   57|     30|#define XML_TOK_INVALID 0
  ------------------
  638|    997|        }
  639|    997|      }
  640|  92.5k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  92.5k|#  define MINBPC(enc) 2
  ------------------
  641|       |      /* in attribute value */
  642|  7.71M|      for (;;) {
  643|  7.71M|        int t;
  644|  7.71M|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  7.71M|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  7.71M|    {                                                                          \
  |  |  |  |  135|  7.71M|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  7.71M|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  7.71M|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 70, False: 7.71M]
  |  |  |  |  ------------------
  |  |  |  |  136|     70|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     70|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     70|      }                                                                        \
  |  |  |  |  138|  7.71M|    }
  |  |  ------------------
  ------------------
  645|  7.71M|        t = BYTE_TYPE(enc, ptr);
  ------------------
  |  |  918|  7.71M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  7.71M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   827k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 827k, False: 6.89M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  646|  7.71M|        if (t == open)
  ------------------
  |  Branch (646:13): [True: 92.4k, False: 7.62M]
  ------------------
  647|  92.4k|          break;
  648|  7.62M|        switch (t) {
  649|   220k|          INVALID_CASES(ptr, nextTokPtr)
  ------------------
  |  |   60|      0|    INVALID_LEAD_CASE(2, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 7.62M]
  |  |  |  |  ------------------
  |  |  |  |   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: 7.62M]
  |  |  |  |  ------------------
  |  |  |  |   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|   110k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|   110k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 110k, False: 7.51M]
  |  |  |  |  ------------------
  |  |  |  |   50|   110k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 29, False: 110k]
  |  |  |  |  ------------------
  |  |  |  |   51|   110k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     29|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|   110k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|   110k|#    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|   110k|    ptr += n;                                                                  \
  |  |  |  |   57|   110k|    break;
  |  |  ------------------
  |  |   63|   110k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 13, False: 7.62M]
  |  |  ------------------
  |  |   64|     13|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 7.62M]
  |  |  ------------------
  |  |   65|     18|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 5, False: 7.62M]
  |  |  ------------------
  |  |   66|     18|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     18|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  650|   110k|        case BT_AMP: {
  ------------------
  |  Branch (650:9): [True: 110k, False: 7.51M]
  ------------------
  651|   110k|          int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  915|   110k|#  define PREFIX(ident) big2_##ident
  ------------------
                        int tok = PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, &ptr);
  ------------------
  |  |  916|   110k|#  define MINBPC(enc) 2
  ------------------
  652|   110k|          if (tok <= 0) {
  ------------------
  |  Branch (652:15): [True: 13, False: 110k]
  ------------------
  653|     13|            if (tok == XML_TOK_INVALID)
  ------------------
  |  |   57|     13|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (653:17): [True: 9, False: 4]
  ------------------
  654|      9|              *nextTokPtr = ptr;
  655|     13|            return tok;
  656|     13|          }
  657|   110k|          break;
  658|   110k|        }
  659|   110k|        case BT_LT:
  ------------------
  |  Branch (659:9): [True: 8, False: 7.62M]
  ------------------
  660|      8|          *nextTokPtr = ptr;
  661|      8|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  662|  7.40M|        default:
  ------------------
  |  Branch (662:9): [True: 7.40M, False: 221k]
  ------------------
  663|  7.40M|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  7.40M|#  define MINBPC(enc) 2
  ------------------
  664|  7.40M|          break;
  665|  7.62M|        }
  666|  7.62M|      }
  667|  92.4k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  92.4k|#  define MINBPC(enc) 2
  ------------------
  668|  92.4k|      REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  92.4k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  92.4k|    {                                                                          \
  |  |  |  |  135|  92.4k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  92.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  92.4k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 6, False: 92.4k]
  |  |  |  |  ------------------
  |  |  |  |  136|      6|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      6|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      6|      }                                                                        \
  |  |  |  |  138|  92.4k|    }
  |  |  ------------------
  ------------------
  669|  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|  92.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 92.3k, False: 22]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  670|  84.2k|      case BT_S:
  ------------------
  |  Branch (670:7): [True: 84.2k, False: 8.12k]
  ------------------
  671|  88.5k|      case BT_CR:
  ------------------
  |  Branch (671:7): [True: 4.23k, False: 88.1k]
  ------------------
  672|  90.2k|      case BT_LF:
  ------------------
  |  Branch (672:7): [True: 1.75k, False: 90.6k]
  ------------------
  673|  90.2k|        break;
  674|    321|      case BT_SOL:
  ------------------
  |  Branch (674:7): [True: 321, False: 92.0k]
  ------------------
  675|    321|        goto sol;
  676|  1.79k|      case BT_GT:
  ------------------
  |  Branch (676:7): [True: 1.79k, False: 90.6k]
  ------------------
  677|  1.79k|        goto gt;
  678|     24|      default:
  ------------------
  |  Branch (678:7): [True: 24, False: 92.3k]
  ------------------
  679|     24|        *nextTokPtr = ptr;
  680|     24|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     24|#define XML_TOK_INVALID 0
  ------------------
  681|  92.4k|      }
  682|       |      /* ptr points to closing quote */
  683|  93.1k|      for (;;) {
  684|  93.1k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  93.1k|#  define MINBPC(enc) 2
  ------------------
  685|  93.1k|        REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  93.1k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  93.1k|    {                                                                          \
  |  |  |  |  135|  93.1k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  93.1k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  93.1k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 40, False: 93.1k]
  |  |  |  |  ------------------
  |  |  |  |  136|     40|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     40|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     40|      }                                                                        \
  |  |  |  |  138|  93.1k|    }
  |  |  ------------------
  ------------------
  686|  93.1k|        switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  93.1k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  93.1k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  92.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 92.0k, False: 1.08k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  687|  70.6k|          CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|  89.4k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 1.05k, False: 92.0k]
  |  |  ------------------
  |  |  111|  89.4k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  1.05k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  1.05k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  1.05k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 13, False: 1.04k]
  |  |  ------------------
  |  |  112|     13|      *nextTokPtr = ptr;                                                       \
  |  |  113|     13|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     13|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|     13|    }                                                                          \
  |  |  115|  89.4k|    /* fall through */                                                         \
  |  |  116|  89.4k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 68.5k, False: 24.5k]
  |  |  ------------------
  |  |  117|  89.4k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 19.8k, False: 73.2k]
  |  |  ------------------
  |  |  118|  89.4k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  89.4k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|  89.4k|    break;                                                                     \
  |  |  120|  89.4k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 93.1k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  121|      0|    CHECK_NMSTRT_CASE(3, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 93.1k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     22|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 22, False: 93.1k]
  |  |  |  |  ------------------
  |  |  |  |  100|     22|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 4, False: 18]
  |  |  |  |  ------------------
  |  |  |  |  101|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     18|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     36|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|     18|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|     18|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     18|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|     18|    }                                                                          \
  |  |  |  |  106|     18|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  ------------------
  688|  1.14k|        case BT_S:
  ------------------
  |  Branch (688:9): [True: 1.14k, False: 91.9k]
  ------------------
  689|  2.03k|        case BT_CR:
  ------------------
  |  Branch (689:9): [True: 887, False: 92.2k]
  ------------------
  690|  2.90k|        case BT_LF:
  ------------------
  |  Branch (690:9): [True: 872, False: 92.2k]
  ------------------
  691|  2.90k|          continue;
  692|    286|        case BT_GT:
  ------------------
  |  Branch (692:9): [True: 286, False: 92.8k]
  ------------------
  693|  2.08k|        gt:
  694|  2.08k|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.08k|#  define MINBPC(enc) 2
  ------------------
  695|  2.08k|          return XML_TOK_START_TAG_WITH_ATTS;
  ------------------
  |  |   62|  2.08k|#define XML_TOK_START_TAG_WITH_ATTS 1
  ------------------
  696|    448|        case BT_SOL:
  ------------------
  |  Branch (696:9): [True: 448, False: 92.6k]
  ------------------
  697|    769|        sol:
  698|    769|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    769|#  define MINBPC(enc) 2
  ------------------
  699|    769|          REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|    769|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|    769|    {                                                                          \
  |  |  |  |  135|    769|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|    769|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|    769|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 12, False: 757]
  |  |  |  |  ------------------
  |  |  |  |  136|     12|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     12|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     12|      }                                                                        \
  |  |  |  |  138|    769|    }
  |  |  ------------------
  ------------------
  700|    757|          if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  920|    757|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    757|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 753, False: 4]
  |  |  |  |  |  Branch (872:49): [True: 746, False: 7]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  701|     11|            *nextTokPtr = ptr;
  702|     11|            return XML_TOK_INVALID;
  ------------------
  |  |   57|     11|#define XML_TOK_INVALID 0
  ------------------
  703|     11|          }
  704|    746|          *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    746|#  define MINBPC(enc) 2
  ------------------
  705|    746|          return XML_TOK_EMPTY_ELEMENT_WITH_ATTS;
  ------------------
  |  |   64|    746|#define XML_TOK_EMPTY_ELEMENT_WITH_ATTS 3 /* empty element tag <e/> */
  ------------------
  706|      6|        default:
  ------------------
  |  Branch (706:9): [True: 6, False: 93.1k]
  ------------------
  707|      6|          *nextTokPtr = ptr;
  708|      6|          return XML_TOK_INVALID;
  ------------------
  |  |   57|      6|#define XML_TOK_INVALID 0
  ------------------
  709|  93.1k|        }
  710|  89.4k|        break;
  711|  93.1k|      }
  712|  89.4k|      break;
  713|  90.2k|    }
  714|  89.4k|    default:
  ------------------
  |  Branch (714:5): [True: 8, False: 95.8k]
  ------------------
  715|      8|      *nextTokPtr = ptr;
  716|      8|      return XML_TOK_INVALID;
  ------------------
  |  |   57|      8|#define XML_TOK_INVALID 0
  ------------------
  717|  95.8k|    }
  718|  95.8k|  }
  719|     89|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     89|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  720|  3.37k|}
xmltok.c:big2_scanRef:
  545|   228k|                const char **nextTokPtr) {
  546|   228k|  REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|   228k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|   228k|    {                                                                          \
  |  |  |  |  135|   228k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|   228k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|   228k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 32, False: 228k]
  |  |  |  |  ------------------
  |  |  |  |  136|     32|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     32|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     32|      }                                                                        \
  |  |  |  |  138|   228k|    }
  |  |  ------------------
  ------------------
  547|   228k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   228k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   228k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   224k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 224k, False: 4.57k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  548|  14.8k|    CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |  110|   216k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (110:3): [True: 4.55k, False: 224k]
  |  |  ------------------
  |  |  111|   216k|    if (! IS_NMSTRT_CHAR_MINBPC(enc, ptr)) {                                   \
  |  |  ------------------
  |  |  |  |  924|  4.55k|#  define IS_NMSTRT_CHAR_MINBPC(enc, p) BIG2_IS_NMSTRT_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  876|  4.55k|  UCS2_GET_NAMING(nmstrtPages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  4.55k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (111:9): [True: 6, False: 4.55k]
  |  |  ------------------
  |  |  112|      6|      *nextTokPtr = ptr;                                                       \
  |  |  113|      6|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|      6|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |  114|      6|    }                                                                          \
  |  |  115|   216k|    /* fall through */                                                         \
  |  |  116|   216k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (116:3): [True: 5.68k, False: 223k]
  |  |  ------------------
  |  |  117|   216k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (117:3): [True: 206k, False: 22.7k]
  |  |  ------------------
  |  |  118|   216k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|   216k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |  119|   216k|    break;                                                                     \
  |  |  120|   216k|    CHECK_NMSTRT_CASE(2, enc, ptr, end, nextTokPtr)                            \
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 0, False: 228k]
  |  |  |  |  ------------------
  |  |  |  |  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: 228k]
  |  |  |  |  ------------------
  |  |  |  |  100|      0|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |  101|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  923|      0|#  define IS_NMSTRT_CHAR(enc, p, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |  103|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |  104|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |  105|      0|    }                                                                          \
  |  |  |  |  106|      0|    ptr += n;                                                                  \
  |  |  |  |  107|      0|    break;
  |  |  ------------------
  |  |  122|     16|    CHECK_NMSTRT_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   99|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:3): [True: 16, False: 228k]
  |  |  |  |  ------------------
  |  |  |  |  100|     16|    if ((end) - (ptr) < (n))                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (100:9): [True: 5, False: 11]
  |  |  |  |  ------------------
  |  |  |  |  101|      5|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      5|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |  102|     11|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|     22|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NMSTRT_CHAR(enc, ptr, n)) {       \
  |  |  |  |  ------------------
  |  |  |  |  |  |  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;
  |  |  ------------------
  ------------------
  549|  12.4k|  case BT_NUM:
  ------------------
  |  Branch (549:3): [True: 12.4k, False: 216k]
  ------------------
  550|  12.4k|    return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  12.4k|#  define PREFIX(ident) big2_##ident
  ------------------
                  return PREFIX(scanCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  12.4k|#  define MINBPC(enc) 2
  ------------------
  551|     10|  default:
  ------------------
  |  Branch (551:3): [True: 10, False: 228k]
  ------------------
  552|     10|    *nextTokPtr = ptr;
  553|     10|    return XML_TOK_INVALID;
  ------------------
  |  |   57|     10|#define XML_TOK_INVALID 0
  ------------------
  554|   228k|  }
  555|   250k|  while (HAS_CHAR(enc, ptr, end)) {
  556|   250k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   250k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   250k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   246k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 246k, False: 4.67k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  557|   128k|      CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  ------------------
  |  |   81|  34.5k|  case BT_NONASCII:                                                            \
  |  |  ------------------
  |  |  |  Branch (81:3): [True: 4.65k, False: 246k]
  |  |  ------------------
  |  |   82|  34.5k|    if (! IS_NAME_CHAR_MINBPC(enc, ptr)) {                                     \
  |  |  ------------------
  |  |  |  |  922|  4.65k|#  define IS_NAME_CHAR_MINBPC(enc, p) BIG2_IS_NAME_CHAR_MINBPC(p)
  |  |  |  |  ------------------
  |  |  |  |  |  |  874|  4.65k|  UCS2_GET_NAMING(namePages, (unsigned char)p[0], (unsigned char)p[1])
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   79|  4.65k|  (namingBitmap[(pages[hi] << 3) + ((lo) >> 5)] & (1u << ((lo)&0x1F)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (82:9): [True: 20, False: 4.63k]
  |  |  ------------------
  |  |   83|     20|      *nextTokPtr = ptr;                                                       \
  |  |   84|     20|      return XML_TOK_INVALID;                                                  \
  |  |  ------------------
  |  |  |  |   57|     20|#define XML_TOK_INVALID 0
  |  |  ------------------
  |  |   85|     20|    }                                                                          \
  |  |   86|  34.5k|    /* fall through */                                                         \
  |  |   87|  34.5k|  case BT_NMSTRT:                                                              \
  |  |  ------------------
  |  |  |  Branch (87:3): [True: 21.1k, False: 229k]
  |  |  ------------------
  |  |   88|  30.3k|  case BT_HEX:                                                                 \
  |  |  ------------------
  |  |  |  Branch (88:3): [True: 4.58k, False: 246k]
  |  |  ------------------
  |  |   89|  33.8k|  case BT_DIGIT:                                                               \
  |  |  ------------------
  |  |  |  Branch (89:3): [True: 3.48k, False: 247k]
  |  |  ------------------
  |  |   90|  34.1k|  case BT_NAME:                                                                \
  |  |  ------------------
  |  |  |  Branch (90:3): [True: 261, False: 250k]
  |  |  ------------------
  |  |   91|  34.5k|  case BT_MINUS:                                                               \
  |  |  ------------------
  |  |  |  Branch (91:3): [True: 415, False: 250k]
  |  |  ------------------
  |  |   92|  34.5k|    ptr += MINBPC(enc);                                                        \
  |  |  ------------------
  |  |  |  |  916|  34.5k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  |   93|  34.5k|    break;                                                                     \
  |  |   94|  34.5k|    CHECK_NAME_CASE(2, enc, ptr, end, nextTokPtr)                              \
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 0, False: 250k]
  |  |  |  |  ------------------
  |  |  |  |   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: 250k]
  |  |  |  |  ------------------
  |  |  |  |   71|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   72|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      0|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      0|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      0|    }                                                                          \
  |  |  |  |   77|      0|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  |  |   96|      7|    CHECK_NAME_CASE(4, enc, ptr, end, nextTokPtr)
  |  |  ------------------
  |  |  |  |   70|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (70:3): [True: 7, False: 250k]
  |  |  |  |  ------------------
  |  |  |  |   71|      7|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (71:9): [True: 4, False: 3]
  |  |  |  |  ------------------
  |  |  |  |   72|      4|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      4|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   73|      3|    if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      6|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |                   if (IS_INVALID_CHAR(enc, ptr, n) || ! IS_NAME_CHAR(enc, ptr, n)) {         \
  |  |  |  |  ------------------
  |  |  |  |  |  |  921|      0|#  define IS_NAME_CHAR(enc, p, n) 0
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (73:41): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  |  |   74|      3|      *nextTokPtr = ptr;                                                       \
  |  |  |  |   75|      3|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   76|      3|    }                                                                          \
  |  |  |  |   77|      3|    ptr += n;                                                                  \
  |  |  |  |   78|      0|    break;
  |  |  ------------------
  ------------------
  558|   216k|    case BT_SEMI:
  ------------------
  |  Branch (558:5): [True: 216k, False: 34.6k]
  ------------------
  559|   216k|      *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|   216k|#  define MINBPC(enc) 2
  ------------------
  560|   216k|      return XML_TOK_ENTITY_REF;
  ------------------
  |  |   70|   216k|#define XML_TOK_ENTITY_REF 9
  ------------------
  561|     15|    default:
  ------------------
  |  Branch (561:5): [True: 15, False: 250k]
  ------------------
  562|     15|      *nextTokPtr = ptr;
  563|     15|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     15|#define XML_TOK_INVALID 0
  ------------------
  564|   250k|    }
  565|   250k|  }
  566|     60|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     60|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  567|   216k|}
xmltok.c:big2_scanCharRef:
  514|  12.4k|                    const char **nextTokPtr) {
  515|  12.4k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  12.4k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  12.4k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  12.4k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 12.4k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  516|  12.4k|    if (CHAR_MATCHES(enc, ptr, ASCII_x))
  ------------------
  |  |  920|  12.4k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  12.4k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 12.4k, False: 7]
  |  |  |  |  |  Branch (872:49): [True: 10.0k, False: 2.35k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  517|  10.0k|      return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  10.0k|#  define PREFIX(ident) big2_##ident
  ------------------
                    return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  10.0k|#  define MINBPC(enc) 2
  ------------------
  518|  2.36k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  2.36k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  2.36k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.35k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.35k, False: 7]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  519|  2.33k|    case BT_DIGIT:
  ------------------
  |  Branch (519:5): [True: 2.33k, False: 22]
  ------------------
  520|  2.33k|      break;
  521|     22|    default:
  ------------------
  |  Branch (521:5): [True: 22, False: 2.33k]
  ------------------
  522|     22|      *nextTokPtr = ptr;
  523|     22|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     22|#define XML_TOK_INVALID 0
  ------------------
  524|  2.36k|    }
  525|  6.99k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  2.33k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  4.66k|#  define MINBPC(enc) 2
  ------------------
  526|  6.99k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  6.99k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  6.99k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  6.96k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 6.96k, False: 29]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  527|  4.66k|      case BT_DIGIT:
  ------------------
  |  Branch (527:7): [True: 4.66k, False: 2.33k]
  ------------------
  528|  4.66k|        break;
  529|  2.29k|      case BT_SEMI:
  ------------------
  |  Branch (529:7): [True: 2.29k, False: 4.69k]
  ------------------
  530|  2.29k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.29k|#  define MINBPC(enc) 2
  ------------------
  531|  2.29k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  2.29k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  532|     32|      default:
  ------------------
  |  Branch (532:7): [True: 32, False: 6.96k]
  ------------------
  533|     32|        *nextTokPtr = ptr;
  534|     32|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     32|#define XML_TOK_INVALID 0
  ------------------
  535|  6.99k|      }
  536|  6.99k|    }
  537|  2.33k|  }
  538|      8|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|      8|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  539|  12.4k|}
xmltok.c:big2_scanHexCharRef:
  483|  10.0k|                       const char **nextTokPtr) {
  484|  10.0k|  if (HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|  10.0k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  10.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  10.0k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 10.0k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  485|  10.0k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  10.0k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  10.0k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  10.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 10.0k, False: 8]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  486|  8.15k|    case BT_DIGIT:
  ------------------
  |  Branch (486:5): [True: 8.15k, False: 1.94k]
  ------------------
  487|  10.0k|    case BT_HEX:
  ------------------
  |  Branch (487:5): [True: 1.92k, False: 8.16k]
  ------------------
  488|  10.0k|      break;
  489|     12|    default:
  ------------------
  |  Branch (489:5): [True: 12, False: 10.0k]
  ------------------
  490|     12|      *nextTokPtr = ptr;
  491|     12|      return XML_TOK_INVALID;
  ------------------
  |  |   57|     12|#define XML_TOK_INVALID 0
  ------------------
  492|  10.0k|    }
  493|  33.7k|    for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  10.0k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  23.6k|#  define MINBPC(enc) 2
  ------------------
  494|  33.7k|      switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  33.7k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  33.7k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  33.6k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 33.6k, False: 36]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  495|  12.9k|      case BT_DIGIT:
  ------------------
  |  Branch (495:7): [True: 12.9k, False: 20.7k]
  ------------------
  496|  23.6k|      case BT_HEX:
  ------------------
  |  Branch (496:7): [True: 10.7k, False: 23.0k]
  ------------------
  497|  23.6k|        break;
  498|  10.0k|      case BT_SEMI:
  ------------------
  |  Branch (498:7): [True: 10.0k, False: 23.7k]
  ------------------
  499|  10.0k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  10.0k|#  define MINBPC(enc) 2
  ------------------
  500|  10.0k|        return XML_TOK_CHAR_REF;
  ------------------
  |  |   71|  10.0k|#define XML_TOK_CHAR_REF 10 /* numeric character reference */
  ------------------
  501|     46|      default:
  ------------------
  |  Branch (501:7): [True: 46, False: 33.6k]
  ------------------
  502|     46|        *nextTokPtr = ptr;
  503|     46|        return XML_TOK_INVALID;
  ------------------
  |  |   57|     46|#define XML_TOK_INVALID 0
  ------------------
  504|  33.7k|      }
  505|  33.7k|    }
  506|  10.0k|  }
  507|     16|  return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     16|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  508|  10.0k|}
xmltok.c:big2_cdataSectionTok:
  356|  68.4k|                        const char **nextTokPtr) {
  357|  68.4k|  if (ptr >= end)
  ------------------
  |  Branch (357:7): [True: 155, False: 68.3k]
  ------------------
  358|    155|    return XML_TOK_NONE;
  ------------------
  |  |   51|    155|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
  359|  68.3k|  if (MINBPC(enc) > 1) {
  ------------------
  |  |  916|  68.3k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (359:7): [Folded - Ignored]
  ------------------
  360|  68.3k|    size_t n = end - ptr;
  361|  68.3k|    if (n & (MINBPC(enc) - 1)) {
  ------------------
  |  |  916|  68.3k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (361:9): [True: 17.5k, False: 50.8k]
  ------------------
  362|  17.5k|      n &= ~(MINBPC(enc) - 1);
  ------------------
  |  |  916|  17.5k|#  define MINBPC(enc) 2
  ------------------
  363|  17.5k|      if (n == 0)
  ------------------
  |  Branch (363:11): [True: 22, False: 17.4k]
  ------------------
  364|     22|        return XML_TOK_PARTIAL;
  ------------------
  |  |   56|     22|#define XML_TOK_PARTIAL -1      /* only part of a token */
  ------------------
  365|  17.4k|      end = ptr + n;
  366|  17.4k|    }
  367|  68.3k|  }
  368|  68.2k|  switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  68.2k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  68.2k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  54.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 54.1k, False: 14.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  369|  24.0k|  case BT_RSQB:
  ------------------
  |  Branch (369:3): [True: 24.0k, False: 44.2k]
  ------------------
  370|  24.0k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  24.0k|#  define MINBPC(enc) 2
  ------------------
  371|  24.0k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  24.0k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  24.0k|    {                                                                          \
  |  |  |  |  135|  24.0k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  24.0k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  24.0k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 3, False: 24.0k]
  |  |  |  |  ------------------
  |  |  |  |  136|      3|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      3|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      3|      }                                                                        \
  |  |  |  |  138|  24.0k|    }
  |  |  ------------------
  ------------------
  372|  24.0k|    if (! CHAR_MATCHES(enc, ptr, ASCII_RSQB))
  ------------------
  |  |  920|  24.0k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  24.0k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 22.4k, False: 1.60k]
  |  |  |  |  |  Branch (872:49): [True: 11.8k, False: 10.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  373|  12.1k|      break;
  374|  11.8k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  11.8k|#  define MINBPC(enc) 2
  ------------------
  375|  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: 5, False: 11.8k]
  |  |  |  |  ------------------
  |  |  |  |  136|      5|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|      5|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|      5|      }                                                                        \
  |  |  |  |  138|  11.8k|    }
  |  |  ------------------
  ------------------
  376|  11.8k|    if (! CHAR_MATCHES(enc, ptr, ASCII_GT)) {
  ------------------
  |  |  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: 11.1k, False: 750]
  |  |  |  |  |  Branch (872:49): [True: 622, False: 10.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  377|  11.2k|      ptr -= MINBPC(enc);
  ------------------
  |  |  916|  11.2k|#  define MINBPC(enc) 2
  ------------------
  378|  11.2k|      break;
  379|  11.2k|    }
  380|    622|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|    622|#  define MINBPC(enc) 2
  ------------------
  381|    622|    return XML_TOK_CDATA_SECT_CLOSE;
  ------------------
  |  |  113|    622|#define XML_TOK_CDATA_SECT_CLOSE 40
  ------------------
  382|  24.9k|  case BT_CR:
  ------------------
  |  Branch (382:3): [True: 24.9k, False: 43.3k]
  ------------------
  383|  24.9k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  24.9k|#  define MINBPC(enc) 2
  ------------------
  384|  24.9k|    REQUIRE_CHAR(enc, ptr, end);
  ------------------
  |  |  140|  24.9k|#  define REQUIRE_CHAR(enc, ptr, end) REQUIRE_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  134|  24.9k|    {                                                                          \
  |  |  |  |  135|  24.9k|      if (! HAS_CHARS(enc, ptr, end, count)) {                                 \
  |  |  |  |  ------------------
  |  |  |  |  |  |  129|  24.9k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  916|  24.9k|#  define MINBPC(enc) 2
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (135:11): [True: 17, False: 24.9k]
  |  |  |  |  ------------------
  |  |  |  |  136|     17|        return XML_TOK_PARTIAL;                                                \
  |  |  |  |  ------------------
  |  |  |  |  |  |   56|     17|#define XML_TOK_PARTIAL -1      /* only part of a token */
  |  |  |  |  ------------------
  |  |  |  |  137|     17|      }                                                                        \
  |  |  |  |  138|  24.9k|    }
  |  |  ------------------
  ------------------
  385|  24.9k|    if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  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|  11.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 11.7k, False: 13.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 320, False: 24.6k]
  ------------------
  386|    320|      ptr += MINBPC(enc);
  ------------------
  |  |  916|    320|#  define MINBPC(enc) 2
  ------------------
  387|  24.9k|    *nextTokPtr = ptr;
  388|  24.9k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  24.9k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  389|  2.34k|  case BT_LF:
  ------------------
  |  Branch (389:3): [True: 2.34k, False: 65.9k]
  ------------------
  390|  2.34k|    *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.34k|#  define MINBPC(enc) 2
  ------------------
  391|  2.34k|    return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  2.34k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
  392|  20.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: 68.2k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   61|      0|    INVALID_LEAD_CASE(3, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|      0|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 0, False: 68.2k]
  |  |  |  |  ------------------
  |  |  |  |   50|      0|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   51|      0|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|      0|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|      0|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|      0|    ptr += n;                                                                  \
  |  |  |  |   57|      0|    break;
  |  |  ------------------
  |  |   62|  10.1k|    INVALID_LEAD_CASE(4, ptr, nextTokPtr)                                      \
  |  |  ------------------
  |  |  |  |   49|  10.1k|  case BT_LEAD##n:                                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (49:3): [True: 10.1k, False: 58.1k]
  |  |  |  |  ------------------
  |  |  |  |   50|  10.1k|    if (end - ptr < n)                                                         \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (50:9): [True: 55, False: 10.1k]
  |  |  |  |  ------------------
  |  |  |  |   51|  10.1k|      return XML_TOK_PARTIAL_CHAR;                                             \
  |  |  |  |  ------------------
  |  |  |  |  |  |   55|     55|#define XML_TOK_PARTIAL_CHAR -2 /* only part of a multibyte sequence */
  |  |  |  |  ------------------
  |  |  |  |   52|  10.1k|    if (IS_INVALID_CHAR(enc, ptr, n)) {                                        \
  |  |  |  |  ------------------
  |  |  |  |  |  |   45|  10.1k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   53|      0|      *(nextTokPtr) = (ptr);                                                   \
  |  |  |  |   54|      0|      return XML_TOK_INVALID;                                                  \
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define XML_TOK_INVALID 0
  |  |  |  |  ------------------
  |  |  |  |   55|      0|    }                                                                          \
  |  |  |  |   56|  10.1k|    ptr += n;                                                                  \
  |  |  |  |   57|  10.1k|    break;
  |  |  ------------------
  |  |   63|  10.1k|  case BT_NONXML:                                                              \
  |  |  ------------------
  |  |  |  Branch (63:3): [True: 36, False: 68.2k]
  |  |  ------------------
  |  |   64|     36|  case BT_MALFORM:                                                             \
  |  |  ------------------
  |  |  |  Branch (64:3): [True: 0, False: 68.2k]
  |  |  ------------------
  |  |   65|     43|  case BT_TRAIL:                                                               \
  |  |  ------------------
  |  |  |  Branch (65:3): [True: 7, False: 68.2k]
  |  |  ------------------
  |  |   66|     43|    *(nextTokPtr) = (ptr);                                                     \
  |  |   67|     43|    return XML_TOK_INVALID;
  |  |  ------------------
  |  |  |  |   57|     43|#define XML_TOK_INVALID 0
  |  |  ------------------
  ------------------
  393|  6.68k|  default:
  ------------------
  |  Branch (393:3): [True: 6.68k, False: 61.6k]
  ------------------
  394|  6.68k|    ptr += MINBPC(enc);
  ------------------
  |  |  916|  6.68k|#  define MINBPC(enc) 2
  ------------------
  395|  6.68k|    break;
  396|  68.2k|  }
  397|  1.20M|  while (HAS_CHAR(enc, ptr, end)) {
  398|  1.20M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  1.20M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  1.20M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  96.0k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 96.0k, False: 1.11M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  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.20M]
  |  |  ------------------
  |  |  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.20M]
  |  |  ------------------
  |  |  401|      0|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|      0|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 0, False: 0]
  |  |  ------------------
  |  |  402|      0|      *nextTokPtr = ptr;                                                       \
  |  |  403|      0|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|      0|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|      0|    }                                                                          \
  |  |  405|      0|    ptr += n;                                                                  \
  |  |  406|      0|    break;
  ------------------
  409|  10.6k|      LEAD_CASE(4)
  ------------------
  |  |  400|  10.6k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (400:3): [True: 10.6k, False: 1.19M]
  |  |  ------------------
  |  |  401|  10.6k|    if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) {                       \
  |  |  ------------------
  |  |  |  |   45|  10.6k|#    define IS_INVALID_CHAR(enc, ptr, n) (0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (45:42): [Folded - Ignored]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (401:9): [True: 50, False: 10.6k]
  |  |  ------------------
  |  |  402|     50|      *nextTokPtr = ptr;                                                       \
  |  |  403|     50|      return XML_TOK_DATA_CHARS;                                               \
  |  |  ------------------
  |  |  |  |   67|     50|#define XML_TOK_DATA_CHARS 6
  |  |  ------------------
  |  |  404|     50|    }                                                                          \
  |  |  405|  10.6k|    ptr += n;                                                                  \
  |  |  406|  10.6k|    break;
  ------------------
  410|      0|#  undef LEAD_CASE
  411|     33|    case BT_NONXML:
  ------------------
  |  Branch (411:5): [True: 33, False: 1.20M]
  ------------------
  412|     33|    case BT_MALFORM:
  ------------------
  |  Branch (412:5): [True: 0, False: 1.20M]
  ------------------
  413|     38|    case BT_TRAIL:
  ------------------
  |  Branch (413:5): [True: 5, False: 1.20M]
  ------------------
  414|  21.5k|    case BT_CR:
  ------------------
  |  Branch (414:5): [True: 21.5k, False: 1.18M]
  ------------------
  415|  23.3k|    case BT_LF:
  ------------------
  |  Branch (415:5): [True: 1.78k, False: 1.20M]
  ------------------
  416|  40.0k|    case BT_RSQB:
  ------------------
  |  Branch (416:5): [True: 16.6k, False: 1.18M]
  ------------------
  417|  40.0k|      *nextTokPtr = ptr;
  418|  40.0k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  40.0k|#define XML_TOK_DATA_CHARS 6
  ------------------
  419|  1.15M|    default:
  ------------------
  |  Branch (419:5): [True: 1.15M, False: 50.7k]
  ------------------
  420|  1.15M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.15M|#  define MINBPC(enc) 2
  ------------------
  421|  1.15M|      break;
  422|  1.20M|    }
  423|  1.20M|  }
  424|    145|  *nextTokPtr = ptr;
  425|    145|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    145|#define XML_TOK_DATA_CHARS 6
  ------------------
  426|  40.2k|}
xmltok.c:big2_attributeValueTok:
 1262|   288k|                          const char **nextTokPtr) {
 1263|   288k|  const char *start;
 1264|   288k|  if (ptr >= end)
  ------------------
  |  Branch (1264:7): [True: 1.67k, False: 287k]
  ------------------
 1265|  1.67k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  1.67k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1266|   287k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   287k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   287k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|   287k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1266:12): [True: 0, False: 287k]
  ------------------
 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|   287k|  start = ptr;
 1275|  6.07M|  while (HAS_CHAR(enc, ptr, end)) {
 1276|  6.07M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  6.07M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  6.07M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   447k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 447k, False: 5.62M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 6.07M]
  |  |  ------------------
  |  | 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: 6.07M]
  |  |  ------------------
  |  | 1279|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|      0|    break;
  ------------------
 1283|  95.4k|      LEAD_CASE(4)
  ------------------
  |  | 1278|  95.4k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1278:3): [True: 95.4k, False: 5.97M]
  |  |  ------------------
  |  | 1279|  95.4k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1280|  95.4k|    break;
  ------------------
 1284|      0|#  undef LEAD_CASE
 1285|   150k|    case BT_AMP:
  ------------------
  |  Branch (1285:5): [True: 150k, False: 5.92M]
  ------------------
 1286|   150k|      if (ptr == start)
  ------------------
  |  Branch (1286:11): [True: 101k, False: 48.4k]
  ------------------
 1287|   101k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|   101k|#  define PREFIX(ident) big2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|   101k|#  define MINBPC(enc) 2
  ------------------
 1288|  48.4k|      *nextTokPtr = ptr;
 1289|  48.4k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  48.4k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1290|      1|    case BT_LT:
  ------------------
  |  Branch (1290:5): [True: 1, False: 6.07M]
  ------------------
 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|  13.4k|    case BT_LF:
  ------------------
  |  Branch (1294:5): [True: 13.4k, False: 6.05M]
  ------------------
 1295|  13.4k|      if (ptr == start) {
  ------------------
  |  Branch (1295:11): [True: 7.43k, False: 6.03k]
  ------------------
 1296|  7.43k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  7.43k|#  define MINBPC(enc) 2
  ------------------
 1297|  7.43k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  7.43k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1298|  7.43k|      }
 1299|  6.03k|      *nextTokPtr = ptr;
 1300|  6.03k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  6.03k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1301|   107k|    case BT_CR:
  ------------------
  |  Branch (1301:5): [True: 107k, False: 5.96M]
  ------------------
 1302|   107k|      if (ptr == start) {
  ------------------
  |  Branch (1302:11): [True: 56.2k, False: 51.7k]
  ------------------
 1303|  56.2k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  56.2k|#  define MINBPC(enc) 2
  ------------------
 1304|  56.2k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  56.2k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  56.2k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  56.2k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1304:13): [True: 527, False: 55.6k]
  ------------------
 1305|    527|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    527|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1306|  55.6k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  55.6k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  55.6k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  30.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 30.1k, False: 25.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1306:13): [True: 4.28k, False: 51.3k]
  ------------------
 1307|  4.28k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  4.28k|#  define MINBPC(enc) 2
  ------------------
 1308|  55.6k|        *nextTokPtr = ptr;
 1309|  55.6k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  55.6k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1310|  56.2k|      }
 1311|  51.7k|      *nextTokPtr = ptr;
 1312|  51.7k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  51.7k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1313|  14.7k|    case BT_S:
  ------------------
  |  Branch (1313:5): [True: 14.7k, False: 6.05M]
  ------------------
 1314|  14.7k|      if (ptr == start) {
  ------------------
  |  Branch (1314:11): [True: 9.77k, False: 4.93k]
  ------------------
 1315|  9.77k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  9.77k|#  define MINBPC(enc) 2
  ------------------
 1316|  9.77k|        return XML_TOK_ATTRIBUTE_VALUE_S;
  ------------------
  |  |  110|  9.77k|#define XML_TOK_ATTRIBUTE_VALUE_S 39
  ------------------
 1317|  9.77k|      }
 1318|  4.93k|      *nextTokPtr = ptr;
 1319|  4.93k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  4.93k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1320|  5.69M|    default:
  ------------------
  |  Branch (1320:5): [True: 5.69M, False: 381k]
  ------------------
 1321|  5.69M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  5.69M|#  define MINBPC(enc) 2
  ------------------
 1322|  5.69M|      break;
 1323|  6.07M|    }
 1324|  6.07M|  }
 1325|    692|  *nextTokPtr = ptr;
 1326|    692|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|    692|#define XML_TOK_DATA_CHARS 6
  ------------------
 1327|   287k|}
xmltok.c:big2_entityValueTok:
 1331|   169k|                       const char **nextTokPtr) {
 1332|   169k|  const char *start;
 1333|   169k|  if (ptr >= end)
  ------------------
  |  Branch (1333:7): [True: 2.18k, False: 167k]
  ------------------
 1334|  2.18k|    return XML_TOK_NONE;
  ------------------
  |  |   51|  2.18k|#define XML_TOK_NONE -4 /* The string to be scanned is empty */
  ------------------
 1335|   167k|  else if (! HAS_CHAR(enc, ptr, end)) {
  ------------------
  |  |  131|   167k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   167k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|   167k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1335:12): [True: 0, False: 167k]
  ------------------
 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|   167k|  start = ptr;
 1344|  23.7M|  while (HAS_CHAR(enc, ptr, end)) {
 1345|  23.7M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  23.7M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  23.7M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   325k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 325k, False: 23.4M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 23.7M]
  |  |  ------------------
  |  | 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: 23.7M]
  |  |  ------------------
  |  | 1348|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|      0|    break;
  ------------------
 1352|   118k|      LEAD_CASE(4)
  ------------------
  |  | 1347|   118k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1347:3): [True: 118k, False: 23.6M]
  |  |  ------------------
  |  | 1348|   118k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1349|   118k|    break;
  ------------------
 1353|      0|#  undef LEAD_CASE
 1354|  8.28k|    case BT_AMP:
  ------------------
  |  Branch (1354:5): [True: 8.28k, False: 23.7M]
  ------------------
 1355|  8.28k|      if (ptr == start)
  ------------------
  |  Branch (1355:11): [True: 4.23k, False: 4.04k]
  ------------------
 1356|  4.23k|        return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|  4.23k|#  define PREFIX(ident) big2_##ident
  ------------------
                      return PREFIX(scanRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|  4.23k|#  define MINBPC(enc) 2
  ------------------
 1357|  4.04k|      *nextTokPtr = ptr;
 1358|  4.04k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  4.04k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1359|      6|    case BT_PERCNT:
  ------------------
  |  Branch (1359:5): [True: 6, False: 23.7M]
  ------------------
 1360|      6|      if (ptr == start) {
  ------------------
  |  Branch (1360:11): [True: 5, False: 1]
  ------------------
 1361|      5|        int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  915|      5|#  define PREFIX(ident) big2_##ident
  ------------------
                      int tok = PREFIX(scanPercent)(enc, ptr + MINBPC(enc), end, nextTokPtr);
  ------------------
  |  |  916|      5|#  define MINBPC(enc) 2
  ------------------
 1362|      5|        return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   89|      5|#define XML_TOK_PERCENT 22
  ------------------
                      return (tok == XML_TOK_PERCENT) ? XML_TOK_INVALID : tok;
  ------------------
  |  |   57|      1|#define XML_TOK_INVALID 0
  ------------------
  |  Branch (1362:16): [True: 1, False: 4]
  ------------------
 1363|      5|      }
 1364|      1|      *nextTokPtr = ptr;
 1365|      1|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|      1|#define XML_TOK_DATA_CHARS 6
  ------------------
 1366|  14.6k|    case BT_LF:
  ------------------
  |  Branch (1366:5): [True: 14.6k, False: 23.7M]
  ------------------
 1367|  14.6k|      if (ptr == start) {
  ------------------
  |  Branch (1367:11): [True: 7.94k, False: 6.71k]
  ------------------
 1368|  7.94k|        *nextTokPtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  7.94k|#  define MINBPC(enc) 2
  ------------------
 1369|  7.94k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  7.94k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1370|  7.94k|      }
 1371|  6.71k|      *nextTokPtr = ptr;
 1372|  6.71k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  6.71k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1373|   143k|    case BT_CR:
  ------------------
  |  Branch (1373:5): [True: 143k, False: 23.6M]
  ------------------
 1374|   143k|      if (ptr == start) {
  ------------------
  |  Branch (1374:11): [True: 75.5k, False: 67.6k]
  ------------------
 1375|  75.5k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  75.5k|#  define MINBPC(enc) 2
  ------------------
 1376|  75.5k|        if (! HAS_CHAR(enc, ptr, end))
  ------------------
  |  |  131|  75.5k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|  75.5k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  75.5k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1376:13): [True: 331, False: 75.1k]
  ------------------
 1377|    331|          return XML_TOK_TRAILING_CR;
  ------------------
  |  |   53|    331|  -3                            /* A CR at the end of the scan;                \
  ------------------
 1378|  75.1k|        if (BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  75.1k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  75.1k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  21.3k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 21.3k, False: 53.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1378:13): [True: 1.85k, False: 73.3k]
  ------------------
 1379|  1.85k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.85k|#  define MINBPC(enc) 2
  ------------------
 1380|  75.1k|        *nextTokPtr = ptr;
 1381|  75.1k|        return XML_TOK_DATA_NEWLINE;
  ------------------
  |  |   68|  75.1k|#define XML_TOK_DATA_NEWLINE 7
  ------------------
 1382|  75.5k|      }
 1383|  67.6k|      *nextTokPtr = ptr;
 1384|  67.6k|      return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  67.6k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1385|  23.4M|    default:
  ------------------
  |  Branch (1385:5): [True: 23.4M, False: 284k]
  ------------------
 1386|  23.4M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  23.4M|#  define MINBPC(enc) 2
  ------------------
 1387|  23.4M|      break;
 1388|  23.7M|    }
 1389|  23.7M|  }
 1390|  1.27k|  *nextTokPtr = ptr;
 1391|  1.27k|  return XML_TOK_DATA_CHARS;
  ------------------
  |  |   67|  1.27k|#define XML_TOK_DATA_CHARS 6
  ------------------
 1392|   167k|}
xmltok.c:big2_nameMatchesAscii:
 1715|  18.8k|                         const char *end1, const char *ptr2) {
 1716|  18.8k|  UNUSED_P(enc);
  ------------------
  |  |  135|  18.8k|#  define UNUSED_P(p) (void)p
  ------------------
 1717|  85.4k|  for (; *ptr2; ptr1 += MINBPC(enc), ptr2++) {
  ------------------
  |  |  916|  66.6k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1717:10): [True: 74.8k, False: 10.6k]
  ------------------
 1718|  74.8k|    if (end1 - ptr1 < MINBPC(enc)) {
  ------------------
  |  |  916|  74.8k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1718:9): [True: 31, False: 74.8k]
  ------------------
 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|     31|      return 0; /* LCOV_EXCL_LINE */
 1725|     31|    }
 1726|  74.8k|    if (! CHAR_MATCHES(enc, ptr1, *ptr2))
  ------------------
  |  |  920|  74.8k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  74.8k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 74.7k, False: 51]
  |  |  |  |  |  Branch (872:49): [True: 66.6k, False: 8.12k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1727|  8.17k|      return 0;
 1728|  74.8k|  }
 1729|  10.6k|  return ptr1 == end1;
 1730|  18.8k|}
xmltok.c:big2_nameLength:
 1733|  15.7k|PREFIX(nameLength)(const ENCODING *enc, const char *ptr) {
 1734|  15.7k|  const char *start = ptr;
 1735|   381k|  for (;;) {
 1736|   381k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|   381k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|   381k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  34.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 34.7k, False: 347k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 381k]
  |  |  ------------------
  |  | 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: 381k]
  |  |  ------------------
  |  | 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: 381k]
  |  |  ------------------
  |  | 1739|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1740|      0|    break;
  ------------------
 1744|      0|#  undef LEAD_CASE
 1745|   347k|    case BT_NONASCII:
  ------------------
  |  Branch (1745:5): [True: 347k, False: 34.7k]
  ------------------
 1746|   359k|    case BT_NMSTRT:
  ------------------
  |  Branch (1746:5): [True: 12.3k, False: 369k]
  ------------------
 1747|   359k|#  ifdef XML_NS
 1748|   359k|    case BT_COLON:
  ------------------
  |  Branch (1748:5): [True: 0, False: 381k]
  ------------------
 1749|   359k|#  endif
 1750|   364k|    case BT_HEX:
  ------------------
  |  Branch (1750:5): [True: 4.84k, False: 376k]
  ------------------
 1751|   364k|    case BT_DIGIT:
  ------------------
  |  Branch (1751:5): [True: 48, False: 381k]
  ------------------
 1752|   365k|    case BT_NAME:
  ------------------
  |  Branch (1752:5): [True: 1.59k, False: 380k]
  ------------------
 1753|   366k|    case BT_MINUS:
  ------------------
  |  Branch (1753:5): [True: 167, False: 381k]
  ------------------
 1754|   366k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|   366k|#  define MINBPC(enc) 2
  ------------------
 1755|   366k|      break;
 1756|  15.7k|    default:
  ------------------
  |  Branch (1756:5): [True: 15.7k, False: 366k]
  ------------------
 1757|  15.7k|      return (int)(ptr - start);
 1758|   381k|    }
 1759|   381k|  }
 1760|  15.7k|}
xmltok.c:big2_getAtts:
 1510|  10.6k|                ATTRIBUTE *atts) {
 1511|  10.6k|  enum { other, inName, inValue } state = inName;
 1512|  10.6k|  int nAtts = 0;
 1513|  10.6k|  int open = 0; /* defined when state == inValue;
 1514|       |                   initialization just to shut up compilers */
 1515|       |
 1516|  10.4M|  for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  10.6k|#  define MINBPC(enc) 2
  ------------------
                for (ptr += MINBPC(enc);; ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  10.4M|#  define MINBPC(enc) 2
  ------------------
 1517|  10.4M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  10.4M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  10.4M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  2.29M|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 2.29M, False: 8.14M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1518|      0|#  define START_NAME                                                           \
 1519|      0|    if (state == other) {                                                      \
 1520|      0|      if (nAtts < attsMax) {                                                   \
 1521|      0|        atts[nAtts].name = ptr;                                                \
 1522|      0|        atts[nAtts].normalized = 1;                                            \
 1523|      0|      }                                                                        \
 1524|      0|      state = inName;                                                          \
 1525|      0|    }
 1526|      0|#  define LEAD_CASE(n)                                                         \
 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
 1529|      0|    break;
 1530|      0|      LEAD_CASE(2)
  ------------------
  |  | 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 0, False: 10.4M]
  |  |  ------------------
  |  | 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|      0|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  916|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|      0|    break;
  ------------------
 1531|      0|      LEAD_CASE(3)
  ------------------
  |  | 1527|      0|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 0, False: 10.4M]
  |  |  ------------------
  |  | 1528|      0|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|      0|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1520|      0|      if (nAtts < attsMax) {                                                   \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1520:11): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  | 1521|      0|        atts[nAtts].name = ptr;                                                \
  |  |  |  | 1522|      0|        atts[nAtts].normalized = 1;                                            \
  |  |  |  | 1523|      0|      }                                                                        \
  |  |  |  | 1524|      0|      state = inName;                                                          \
  |  |  |  | 1525|      0|    }
  |  |  ------------------
  |  |                   START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  |  916|      0|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|      0|    break;
  ------------------
 1532|   116k|      LEAD_CASE(4)
  ------------------
  |  | 1527|   116k|  case BT_LEAD##n: /* NOTE: The encoding has already been validated. */        \
  |  |  ------------------
  |  |  |  Branch (1527:3): [True: 116k, False: 10.3M]
  |  |  ------------------
  |  | 1528|   116k|    START_NAME ptr += (n - MINBPC(enc));                                       \
  |  |  ------------------
  |  |  |  | 1519|   116k|    if (state == other) {                                                      \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (1519:9): [True: 0, False: 116k]
  |  |  |  |  ------------------
  |  |  |  | 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|   116k|#  define MINBPC(enc) 2
  |  |  ------------------
  |  | 1529|   116k|    break;
  ------------------
 1533|      0|#  undef LEAD_CASE
 1534|  8.03M|    case BT_NONASCII:
  ------------------
  |  Branch (1534:5): [True: 8.03M, False: 2.40M]
  ------------------
 1535|  8.25M|    case BT_NMSTRT:
  ------------------
  |  Branch (1535:5): [True: 227k, False: 10.2M]
  ------------------
 1536|  8.45M|    case BT_HEX:
  ------------------
  |  Branch (1536:5): [True: 201k, False: 10.2M]
  ------------------
 1537|  8.45M|      START_NAME
  ------------------
  |  | 1519|  8.45M|    if (state == other) {                                                      \
  |  |  ------------------
  |  |  |  Branch (1519:9): [True: 178k, False: 8.28M]
  |  |  ------------------
  |  | 1520|   178k|      if (nAtts < attsMax) {                                                   \
  |  |  ------------------
  |  |  |  Branch (1520:11): [True: 92.4k, False: 85.8k]
  |  |  ------------------
  |  | 1521|  92.4k|        atts[nAtts].name = ptr;                                                \
  |  | 1522|  92.4k|        atts[nAtts].normalized = 1;                                            \
  |  | 1523|  92.4k|      }                                                                        \
  |  | 1524|   178k|      state = inName;                                                          \
  |  | 1525|   178k|    }
  ------------------
 1538|  8.45M|      break;
 1539|      0|#  undef START_NAME
 1540|  21.0k|    case BT_QUOT:
  ------------------
  |  Branch (1540:5): [True: 21.0k, False: 10.4M]
  ------------------
 1541|  21.0k|      if (state != inValue) {
  ------------------
  |  Branch (1541:11): [True: 3.43k, False: 17.5k]
  ------------------
 1542|  3.43k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1542:13): [True: 2.47k, False: 964]
  ------------------
 1543|  2.47k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  2.47k|#  define MINBPC(enc) 2
  ------------------
 1544|  3.43k|        state = inValue;
 1545|  3.43k|        open = BT_QUOT;
 1546|  17.5k|      } else if (open == BT_QUOT) {
  ------------------
  |  Branch (1546:18): [True: 3.43k, False: 14.1k]
  ------------------
 1547|  3.43k|        state = other;
 1548|  3.43k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1548:13): [True: 2.47k, False: 964]
  ------------------
 1549|  2.47k|          atts[nAtts].valueEnd = ptr;
 1550|  3.43k|        nAtts++;
 1551|  3.43k|      }
 1552|  21.0k|      break;
 1553|   350k|    case BT_APOS:
  ------------------
  |  Branch (1553:5): [True: 350k, False: 10.0M]
  ------------------
 1554|   350k|      if (state != inValue) {
  ------------------
  |  Branch (1554:11): [True: 174k, False: 176k]
  ------------------
 1555|   174k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1555:13): [True: 90.0k, False: 84.8k]
  ------------------
 1556|  90.0k|          atts[nAtts].valuePtr = ptr + MINBPC(enc);
  ------------------
  |  |  916|  90.0k|#  define MINBPC(enc) 2
  ------------------
 1557|   174k|        state = inValue;
 1558|   174k|        open = BT_APOS;
 1559|   176k|      } else if (open == BT_APOS) {
  ------------------
  |  Branch (1559:18): [True: 174k, False: 1.24k]
  ------------------
 1560|   174k|        state = other;
 1561|   174k|        if (nAtts < attsMax)
  ------------------
  |  Branch (1561:13): [True: 90.0k, False: 84.8k]
  ------------------
 1562|  90.0k|          atts[nAtts].valueEnd = ptr;
 1563|   174k|        nAtts++;
 1564|   174k|      }
 1565|   350k|      break;
 1566|   114k|    case BT_AMP:
  ------------------
  |  Branch (1566:5): [True: 114k, False: 10.3M]
  ------------------
 1567|   114k|      if (nAtts < attsMax)
  ------------------
  |  Branch (1567:11): [True: 109k, False: 4.93k]
  ------------------
 1568|   109k|        atts[nAtts].normalized = 0;
 1569|   114k|      break;
 1570|   507k|    case BT_S:
  ------------------
  |  Branch (1570:5): [True: 507k, False: 9.92M]
  ------------------
 1571|   507k|      if (state == inName)
  ------------------
  |  Branch (1571:11): [True: 2.29k, False: 505k]
  ------------------
 1572|  2.29k|        state = other;
 1573|   505k|      else if (state == inValue && nAtts < attsMax && atts[nAtts].normalized
  ------------------
  |  Branch (1573:16): [True: 336k, False: 168k]
  |  Branch (1573:36): [True: 174k, False: 162k]
  |  Branch (1573:55): [True: 84.6k, False: 90.1k]
  ------------------
 1574|   505k|               && (ptr == atts[nAtts].valuePtr
  ------------------
  |  Branch (1574:20): [True: 15.3k, False: 69.2k]
  ------------------
 1575|  84.6k|                   || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  919|  69.2k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  69.2k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 69.2k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr) != ASCII_SPACE
  ------------------
  |  |  102|   153k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1575:23): [True: 4.08k, False: 65.1k]
  ------------------
 1576|  84.6k|                   || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  919|  65.1k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  65.1k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 56.0k, False: 9.13k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                                 || BYTE_TO_ASCII(enc, ptr + MINBPC(enc)) == ASCII_SPACE
  ------------------
  |  |  102|   149k|#define ASCII_SPACE 0x20
  ------------------
  |  Branch (1576:23): [True: 35.3k, False: 29.8k]
  ------------------
 1577|  84.6k|                   || BYTE_TYPE(enc, ptr + MINBPC(enc)) == open))
  ------------------
  |  |  918|  29.8k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  29.8k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  20.7k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 20.7k, False: 9.13k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1577:23): [True: 17.3k, False: 12.5k]
  ------------------
 1578|  72.1k|        atts[nAtts].normalized = 0;
 1579|   507k|      break;
 1580|   171k|    case BT_CR:
  ------------------
  |  Branch (1580:5): [True: 171k, False: 10.2M]
  ------------------
 1581|   202k|    case BT_LF:
  ------------------
  |  Branch (1581:5): [True: 31.0k, False: 10.4M]
  ------------------
 1582|       |      /* This case ensures that the first attribute name is counted
 1583|       |         Apart from that we could just change state on the quote. */
 1584|   202k|      if (state == inName)
  ------------------
  |  Branch (1584:11): [True: 2.62k, False: 199k]
  ------------------
 1585|  2.62k|        state = other;
 1586|   199k|      else if (state == inValue && nAtts < attsMax)
  ------------------
  |  Branch (1586:16): [True: 189k, False: 10.4k]
  |  Branch (1586:36): [True: 129k, False: 59.8k]
  ------------------
 1587|   129k|        atts[nAtts].normalized = 0;
 1588|   202k|      break;
 1589|   147k|    case BT_GT:
  ------------------
  |  Branch (1589:5): [True: 147k, False: 10.2M]
  ------------------
 1590|   154k|    case BT_SOL:
  ------------------
  |  Branch (1590:5): [True: 6.45k, False: 10.4M]
  ------------------
 1591|   154k|      if (state != inValue)
  ------------------
  |  Branch (1591:11): [True: 10.6k, False: 143k]
  ------------------
 1592|  10.6k|        return nAtts;
 1593|   143k|      break;
 1594|   510k|    default:
  ------------------
  |  Branch (1594:5): [True: 510k, False: 9.92M]
  ------------------
 1595|   510k|      break;
 1596|  10.4M|    }
 1597|  10.4M|  }
 1598|       |  /* not reached */
 1599|  10.6k|}
xmltok.c:big2_charRefNumber:
 1602|  9.25k|PREFIX(charRefNumber)(const ENCODING *enc, const char *ptr) {
 1603|  9.25k|  int result = 0;
 1604|       |  /* skip &# */
 1605|  9.25k|  UNUSED_P(enc);
  ------------------
  |  |  135|  9.25k|#  define UNUSED_P(p) (void)p
  ------------------
 1606|  9.25k|  ptr += 2 * MINBPC(enc);
  ------------------
  |  |  916|  9.25k|#  define MINBPC(enc) 2
  ------------------
 1607|  9.25k|  if (CHAR_MATCHES(enc, ptr, ASCII_x)) {
  ------------------
  |  |  920|  9.25k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  9.25k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 9.25k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 7.52k, False: 1.73k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1608|  34.3k|    for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  916|  7.52k|#  define MINBPC(enc) 2
  ------------------
                  for (ptr += MINBPC(enc); ! CHAR_MATCHES(enc, ptr, ASCII_SEMI);
  ------------------
  |  |  920|  34.3k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  34.3k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 34.3k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 7.50k, False: 26.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1609|  26.8k|         ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  26.8k|#  define MINBPC(enc) 2
  ------------------
 1610|  26.8k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  919|  26.8k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  26.8k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 26.8k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1611|  26.8k|      switch (c) {
  ------------------
  |  Branch (1611:15): [True: 0, False: 26.8k]
  ------------------
 1612|    396|      case ASCII_0:
  ------------------
  |  |   90|    396|#define ASCII_0 0x30
  ------------------
  |  Branch (1612:7): [True: 396, False: 26.4k]
  ------------------
 1613|  3.37k|      case ASCII_1:
  ------------------
  |  |   91|  3.37k|#define ASCII_1 0x31
  ------------------
  |  Branch (1613:7): [True: 2.97k, False: 23.8k]
  ------------------
 1614|  9.33k|      case ASCII_2:
  ------------------
  |  |   92|  9.33k|#define ASCII_2 0x32
  ------------------
  |  Branch (1614:7): [True: 5.96k, False: 20.8k]
  ------------------
 1615|  10.1k|      case ASCII_3:
  ------------------
  |  |   93|  10.1k|#define ASCII_3 0x33
  ------------------
  |  Branch (1615:7): [True: 814, False: 26.0k]
  ------------------
 1616|  10.5k|      case ASCII_4:
  ------------------
  |  |   94|  10.5k|#define ASCII_4 0x34
  ------------------
  |  Branch (1616:7): [True: 352, False: 26.5k]
  ------------------
 1617|  13.1k|      case ASCII_5:
  ------------------
  |  |   95|  13.1k|#define ASCII_5 0x35
  ------------------
  |  Branch (1617:7): [True: 2.66k, False: 24.1k]
  ------------------
 1618|  14.0k|      case ASCII_6:
  ------------------
  |  |   96|  14.0k|#define ASCII_6 0x36
  ------------------
  |  Branch (1618:7): [True: 871, False: 25.9k]
  ------------------
 1619|  15.0k|      case ASCII_7:
  ------------------
  |  |   97|  15.0k|#define ASCII_7 0x37
  ------------------
  |  Branch (1619:7): [True: 1.04k, False: 25.8k]
  ------------------
 1620|  16.0k|      case ASCII_8:
  ------------------
  |  |   98|  16.0k|#define ASCII_8 0x38
  ------------------
  |  Branch (1620:7): [True: 1.02k, False: 25.8k]
  ------------------
 1621|  17.2k|      case ASCII_9:
  ------------------
  |  |   99|  17.2k|#define ASCII_9 0x39
  ------------------
  |  Branch (1621:7): [True: 1.10k, False: 25.7k]
  ------------------
 1622|  17.2k|        result <<= 4;
 1623|  17.2k|        result |= (c - ASCII_0);
  ------------------
  |  |   90|  17.2k|#define ASCII_0 0x30
  ------------------
 1624|  17.2k|        break;
 1625|    362|      case ASCII_A:
  ------------------
  |  |   36|    362|#define ASCII_A 0x41
  ------------------
  |  Branch (1625:7): [True: 362, False: 26.4k]
  ------------------
 1626|  4.48k|      case ASCII_B:
  ------------------
  |  |   37|  4.48k|#define ASCII_B 0x42
  ------------------
  |  Branch (1626:7): [True: 4.12k, False: 22.7k]
  ------------------
 1627|  5.02k|      case ASCII_C:
  ------------------
  |  |   38|  5.02k|#define ASCII_C 0x43
  ------------------
  |  Branch (1627:7): [True: 535, False: 26.3k]
  ------------------
 1628|  5.36k|      case ASCII_D:
  ------------------
  |  |   39|  5.36k|#define ASCII_D 0x44
  ------------------
  |  Branch (1628:7): [True: 343, False: 26.5k]
  ------------------
 1629|  5.57k|      case ASCII_E:
  ------------------
  |  |   40|  5.57k|#define ASCII_E 0x45
  ------------------
  |  Branch (1629:7): [True: 208, False: 26.6k]
  ------------------
 1630|  6.11k|      case ASCII_F:
  ------------------
  |  |   41|  6.11k|#define ASCII_F 0x46
  ------------------
  |  Branch (1630:7): [True: 544, False: 26.3k]
  ------------------
 1631|  6.11k|        result <<= 4;
 1632|  6.11k|        result += 10 + (c - ASCII_A);
  ------------------
  |  |   36|  6.11k|#define ASCII_A 0x41
  ------------------
 1633|  6.11k|        break;
 1634|    216|      case ASCII_a:
  ------------------
  |  |   63|    216|#define ASCII_a 0x61
  ------------------
  |  Branch (1634:7): [True: 216, False: 26.6k]
  ------------------
 1635|    611|      case ASCII_b:
  ------------------
  |  |   64|    611|#define ASCII_b 0x62
  ------------------
  |  Branch (1635:7): [True: 395, False: 26.4k]
  ------------------
 1636|    934|      case ASCII_c:
  ------------------
  |  |   65|    934|#define ASCII_c 0x63
  ------------------
  |  Branch (1636:7): [True: 323, False: 26.5k]
  ------------------
 1637|  1.41k|      case ASCII_d:
  ------------------
  |  |   66|  1.41k|#define ASCII_d 0x64
  ------------------
  |  Branch (1637:7): [True: 476, False: 26.3k]
  ------------------
 1638|  2.16k|      case ASCII_e:
  ------------------
  |  |   67|  2.16k|#define ASCII_e 0x65
  ------------------
  |  Branch (1638:7): [True: 752, False: 26.1k]
  ------------------
 1639|  3.53k|      case ASCII_f:
  ------------------
  |  |   68|  3.53k|#define ASCII_f 0x66
  ------------------
  |  Branch (1639:7): [True: 1.37k, False: 25.4k]
  ------------------
 1640|  3.53k|        result <<= 4;
 1641|  3.53k|        result += 10 + (c - ASCII_a);
  ------------------
  |  |   63|  3.53k|#define ASCII_a 0x61
  ------------------
 1642|  3.53k|        break;
 1643|  26.8k|      }
 1644|  26.8k|      if (result >= 0x110000)
  ------------------
  |  Branch (1644:11): [True: 17, False: 26.8k]
  ------------------
 1645|     17|        return -1;
 1646|  26.8k|    }
 1647|  7.52k|  } else {
 1648|  6.87k|    for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  920|  6.87k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  6.87k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 6.87k, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 1.72k, False: 5.14k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                  for (; ! CHAR_MATCHES(enc, ptr, ASCII_SEMI); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  5.14k|#  define MINBPC(enc) 2
  ------------------
 1649|  5.14k|      int c = BYTE_TO_ASCII(enc, ptr);
  ------------------
  |  |  919|  5.14k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  5.14k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 5.14k, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1650|  5.14k|      result *= 10;
 1651|  5.14k|      result += (c - ASCII_0);
  ------------------
  |  |   90|  5.14k|#define ASCII_0 0x30
  ------------------
 1652|  5.14k|      if (result >= 0x110000)
  ------------------
  |  Branch (1652:11): [True: 8, False: 5.14k]
  ------------------
 1653|      8|        return -1;
 1654|  5.14k|    }
 1655|  1.73k|  }
 1656|  9.22k|  return checkCharRefNumber(result);
 1657|  9.25k|}
xmltok.c:big2_predefinedEntityName:
 1661|   109k|                             const char *end) {
 1662|   109k|  UNUSED_P(enc);
  ------------------
  |  |  135|   109k|#  define UNUSED_P(p) (void)p
  ------------------
 1663|   109k|  switch ((end - ptr) / MINBPC(enc)) {
  ------------------
  |  |  916|   109k|#  define MINBPC(enc) 2
  ------------------
  |  Branch (1663:11): [True: 101k, False: 7.53k]
  ------------------
 1664|  1.77k|  case 2:
  ------------------
  |  Branch (1664:3): [True: 1.77k, False: 107k]
  ------------------
 1665|  1.77k|    if (CHAR_MATCHES(enc, ptr + MINBPC(enc), ASCII_t)) {
  ------------------
  |  |  920|  1.77k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.77k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.26k, False: 510]
  |  |  |  |  |  Branch (872:49): [True: 716, False: 546]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1666|    716|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|    716|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|    716|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:31): [True: 455, False: 261]
  |  |  |  |  |  Branch (871:32): [True: 404, False: 312]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1667|    172|      case ASCII_l:
  ------------------
  |  |   74|    172|#define ASCII_l 0x6C
  ------------------
  |  Branch (1667:7): [True: 172, False: 544]
  ------------------
 1668|    172|        return ASCII_LT;
  ------------------
  |  |  111|    172|#define ASCII_LT 0x3C
  ------------------
 1669|     89|      case ASCII_g:
  ------------------
  |  |   69|     89|#define ASCII_g 0x67
  ------------------
  |  Branch (1669:7): [True: 89, False: 627]
  ------------------
 1670|     89|        return ASCII_GT;
  ------------------
  |  |  113|     89|#define ASCII_GT 0x3E
  ------------------
 1671|    716|      }
 1672|    716|    }
 1673|  1.51k|    break;
 1674|  1.58k|  case 3:
  ------------------
  |  Branch (1674:3): [True: 1.58k, False: 107k]
  ------------------
 1675|  1.58k|    if (CHAR_MATCHES(enc, ptr, ASCII_a)) {
  ------------------
  |  |  920|  1.58k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.58k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.37k, False: 217]
  |  |  |  |  |  Branch (872:49): [True: 1.04k, False: 329]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 822, False: 221]
  |  |  |  |  |  Branch (872:49): [True: 592, False: 230]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1678|    592|        ptr += MINBPC(enc);
  ------------------
  |  |  916|    592|#  define MINBPC(enc) 2
  ------------------
 1679|    592|        if (CHAR_MATCHES(enc, ptr, ASCII_p))
  ------------------
  |  |  920|    592|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    592|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 398, False: 194]
  |  |  |  |  |  Branch (872:49): [True: 196, False: 202]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1680|    196|          return ASCII_AMP;
  ------------------
  |  |  105|    196|#define ASCII_AMP 0x26
  ------------------
 1681|    592|      }
 1682|  1.04k|    }
 1683|  1.39k|    break;
 1684|  4.17k|  case 4:
  ------------------
  |  Branch (1684:3): [True: 4.17k, False: 105k]
  ------------------
 1685|  4.17k|    switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  4.17k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  4.17k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:31): [True: 363, False: 3.81k]
  |  |  |  |  |  Branch (871:32): [True: 3.84k, False: 330]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1686|  2.37k|    case ASCII_q:
  ------------------
  |  |   79|  2.37k|#define ASCII_q 0x71
  ------------------
  |  Branch (1686:5): [True: 2.37k, False: 1.80k]
  ------------------
 1687|  2.37k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  2.37k|#  define MINBPC(enc) 2
  ------------------
 1688|  2.37k|      if (CHAR_MATCHES(enc, ptr, ASCII_u)) {
  ------------------
  |  |  920|  2.37k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  2.37k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 2.17k, False: 194]
  |  |  |  |  |  Branch (872:49): [True: 1.97k, False: 204]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1689|  1.97k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.97k|#  define MINBPC(enc) 2
  ------------------
 1690|  1.97k|        if (CHAR_MATCHES(enc, ptr, ASCII_o)) {
  ------------------
  |  |  920|  1.97k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.97k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.77k, False: 200]
  |  |  |  |  |  Branch (872:49): [True: 1.57k, False: 202]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1691|  1.57k|          ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.57k|#  define MINBPC(enc) 2
  ------------------
 1692|  1.57k|          if (CHAR_MATCHES(enc, ptr, ASCII_t))
  ------------------
  |  |  920|  1.57k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.57k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.36k, False: 201]
  |  |  |  |  |  Branch (872:49): [True: 1.16k, False: 206]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1693|  1.16k|            return ASCII_QUOT;
  ------------------
  |  |  104|  1.16k|#define ASCII_QUOT 0x22
  ------------------
 1694|  1.57k|        }
 1695|  1.97k|      }
 1696|  1.20k|      break;
 1697|  1.44k|    case ASCII_a:
  ------------------
  |  |   63|  1.44k|#define ASCII_a 0x61
  ------------------
  |  Branch (1697:5): [True: 1.44k, False: 2.73k]
  ------------------
 1698|  1.44k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.44k|#  define MINBPC(enc) 2
  ------------------
 1699|  1.44k|      if (CHAR_MATCHES(enc, ptr, ASCII_p)) {
  ------------------
  |  |  920|  1.44k|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|  1.44k|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 1.22k, False: 220]
  |  |  |  |  |  Branch (872:49): [True: 1.01k, False: 210]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1700|  1.01k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.01k|#  define MINBPC(enc) 2
  ------------------
 1701|  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: 816, False: 198]
  |  |  |  |  |  Branch (872:49): [True: 599, False: 217]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1702|    599|          ptr += MINBPC(enc);
  ------------------
  |  |  916|    599|#  define MINBPC(enc) 2
  ------------------
 1703|    599|          if (CHAR_MATCHES(enc, ptr, ASCII_s))
  ------------------
  |  |  920|    599|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    599|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 400, False: 199]
  |  |  |  |  |  Branch (872:49): [True: 205, False: 195]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1704|    205|            return ASCII_APOS;
  ------------------
  |  |  106|    205|#define ASCII_APOS 0x27
  ------------------
 1705|    599|        }
 1706|  1.01k|      }
 1707|  1.23k|      break;
 1708|  4.17k|    }
 1709|   109k|  }
 1710|   107k|  return 0;
 1711|   109k|}
xmltok.c:big2_updatePosition:
 1779|  3.50k|                       POSITION *pos) {
 1780|  8.91M|  while (HAS_CHAR(enc, ptr, end)) {
 1781|  8.91M|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  8.91M|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  8.91M|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|   528k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 528k, False: 8.39M]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 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: 8.91M]
  |  |  ------------------
  |  | 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: 8.91M]
  |  |  ------------------
  |  | 1784|      0|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|      0|    pos->columnNumber++;                                                       \
  |  | 1786|      0|    break;
  ------------------
 1789|  84.5k|      LEAD_CASE(4)
  ------------------
  |  | 1783|  84.5k|  case BT_LEAD##n:                                                             \
  |  |  ------------------
  |  |  |  Branch (1783:3): [True: 84.5k, False: 8.83M]
  |  |  ------------------
  |  | 1784|  84.5k|    ptr += n; /* NOTE: The encoding has already been validated. */             \
  |  | 1785|  84.5k|    pos->columnNumber++;                                                       \
  |  | 1786|  84.5k|    break;
  ------------------
 1790|      0|#  undef LEAD_CASE
 1791|  14.4k|    case BT_LF:
  ------------------
  |  Branch (1791:5): [True: 14.4k, False: 8.90M]
  ------------------
 1792|  14.4k|      pos->columnNumber = 0;
 1793|  14.4k|      pos->lineNumber++;
 1794|  14.4k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  14.4k|#  define MINBPC(enc) 2
  ------------------
 1795|  14.4k|      break;
 1796|  76.0k|    case BT_CR:
  ------------------
  |  Branch (1796:5): [True: 76.0k, False: 8.84M]
  ------------------
 1797|  76.0k|      pos->lineNumber++;
 1798|  76.0k|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  76.0k|#  define MINBPC(enc) 2
  ------------------
 1799|  76.0k|      if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  131|  76.0k|#  define HAS_CHAR(enc, ptr, end) HAS_CHARS(enc, ptr, end, 1)
  |  |  ------------------
  |  |  |  |  129|   152k|    ((end) - (ptr) >= ((count)*MINBPC(enc)))
  |  |  |  |  ------------------
  |  |  |  |  |  |  916|  76.0k|#  define MINBPC(enc) 2
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (129:5): [True: 76.0k, False: 38]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                    if (HAS_CHAR(enc, ptr, end) && BYTE_TYPE(enc, ptr) == BT_LF)
  ------------------
  |  |  918|  76.0k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  76.0k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  43.1k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 43.1k, False: 32.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1799:38): [True: 3.10k, False: 72.9k]
  ------------------
 1800|  3.10k|        ptr += MINBPC(enc);
  ------------------
  |  |  916|  3.10k|#  define MINBPC(enc) 2
  ------------------
 1801|  76.0k|      pos->columnNumber = 0;
 1802|  76.0k|      break;
 1803|  8.74M|    default:
  ------------------
  |  Branch (1803:5): [True: 8.74M, False: 175k]
  ------------------
 1804|  8.74M|      ptr += MINBPC(enc);
  ------------------
  |  |  916|  8.74M|#  define MINBPC(enc) 2
  ------------------
 1805|  8.74M|      pos->columnNumber++;
 1806|  8.74M|      break;
 1807|  8.91M|    }
 1808|  8.91M|  }
 1809|  3.50k|}
xmltok.c:big2_isPublicId:
 1450|  1.42k|                   const char **badPtr) {
 1451|  1.42k|  ptr += MINBPC(enc);
  ------------------
  |  |  916|  1.42k|#  define MINBPC(enc) 2
  ------------------
 1452|  1.42k|  end -= MINBPC(enc);
  ------------------
  |  |  916|  1.42k|#  define MINBPC(enc) 2
  ------------------
 1453|  7.82k|  for (; HAS_CHAR(enc, ptr, end); ptr += MINBPC(enc)) {
  ------------------
  |  |  916|  7.78k|#  define MINBPC(enc) 2
  ------------------
 1454|  7.82k|    switch (BYTE_TYPE(enc, ptr)) {
  ------------------
  |  |  918|  7.82k|#  define BYTE_TYPE(enc, p) BIG2_BYTE_TYPE(enc, p)
  |  |  ------------------
  |  |  |  |  870|  7.82k|  ((p)[0] == 0 ? SB_BYTE_TYPE(enc, p + 1) : unicode_byte_type((p)[0], (p)[1]))
  |  |  |  |  ------------------
  |  |  |  |  |  |  246|  7.79k|  (((const struct normal_encoding *)(enc))->type[(unsigned char)*(p)])
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (870:4): [True: 7.79k, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1455|    254|    case BT_DIGIT:
  ------------------
  |  Branch (1455:5): [True: 254, False: 7.57k]
  ------------------
 1456|    604|    case BT_HEX:
  ------------------
  |  Branch (1456:5): [True: 350, False: 7.47k]
  ------------------
 1457|    900|    case BT_MINUS:
  ------------------
  |  Branch (1457:5): [True: 296, False: 7.52k]
  ------------------
 1458|  1.09k|    case BT_APOS:
  ------------------
  |  Branch (1458:5): [True: 197, False: 7.62k]
  ------------------
 1459|  1.51k|    case BT_LPAR:
  ------------------
  |  Branch (1459:5): [True: 416, False: 7.40k]
  ------------------
 1460|  1.73k|    case BT_RPAR:
  ------------------
  |  Branch (1460:5): [True: 226, False: 7.59k]
  ------------------
 1461|  1.93k|    case BT_PLUS:
  ------------------
  |  Branch (1461:5): [True: 196, False: 7.62k]
  ------------------
 1462|  2.18k|    case BT_COMMA:
  ------------------
  |  Branch (1462:5): [True: 246, False: 7.57k]
  ------------------
 1463|  2.40k|    case BT_SOL:
  ------------------
  |  Branch (1463:5): [True: 225, False: 7.59k]
  ------------------
 1464|  2.66k|    case BT_EQUALS:
  ------------------
  |  Branch (1464:5): [True: 254, False: 7.57k]
  ------------------
 1465|  2.86k|    case BT_QUEST:
  ------------------
  |  Branch (1465:5): [True: 207, False: 7.61k]
  ------------------
 1466|  3.10k|    case BT_CR:
  ------------------
  |  Branch (1466:5): [True: 242, False: 7.58k]
  ------------------
 1467|  3.42k|    case BT_LF:
  ------------------
  |  Branch (1467:5): [True: 314, False: 7.51k]
  ------------------
 1468|  3.73k|    case BT_SEMI:
  ------------------
  |  Branch (1468:5): [True: 312, False: 7.51k]
  ------------------
 1469|  4.78k|    case BT_EXCL:
  ------------------
  |  Branch (1469:5): [True: 1.04k, False: 6.77k]
  ------------------
 1470|  5.00k|    case BT_AST:
  ------------------
  |  Branch (1470:5): [True: 225, False: 7.59k]
  ------------------
 1471|  5.21k|    case BT_PERCNT:
  ------------------
  |  Branch (1471:5): [True: 203, False: 7.62k]
  ------------------
 1472|  5.42k|    case BT_NUM:
  ------------------
  |  Branch (1472:5): [True: 211, False: 7.61k]
  ------------------
 1473|  5.42k|#  ifdef XML_NS
 1474|  5.42k|    case BT_COLON:
  ------------------
  |  Branch (1474:5): [True: 0, False: 7.82k]
  ------------------
 1475|  5.42k|#  endif
 1476|  5.42k|      break;
 1477|    306|    case BT_S:
  ------------------
  |  Branch (1477:5): [True: 306, False: 7.51k]
  ------------------
 1478|    306|      if (CHAR_MATCHES(enc, ptr, ASCII_TAB)) {
  ------------------
  |  |  920|    306|#  define CHAR_MATCHES(enc, p, c) BIG2_CHAR_MATCHES(p, c)
  |  |  ------------------
  |  |  |  |  872|    306|#define BIG2_CHAR_MATCHES(p, c) ((p)[0] == 0 && (p)[1] == (c))
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (872:34): [True: 306, False: 0]
  |  |  |  |  |  Branch (872:49): [True: 1, False: 305]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1479|      1|        *badPtr = ptr;
 1480|      1|        return 0;
 1481|      1|      }
 1482|    305|      break;
 1483|    305|    case BT_NAME:
  ------------------
  |  Branch (1483:5): [True: 204, False: 7.62k]
  ------------------
 1484|    641|    case BT_NMSTRT:
  ------------------
  |  Branch (1484:5): [True: 437, False: 7.38k]
  ------------------
 1485|    641|      if (! (BYTE_TO_ASCII(enc, ptr) & ~0x7f))
  ------------------
  |  |  919|    641|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|    641|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 641, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (1485:11): [True: 633, False: 8]
  ------------------
 1486|    633|        break;
 1487|       |      /* fall through */
 1488|  1.46k|    default:
  ------------------
  |  Branch (1488:5): [True: 1.45k, False: 6.37k]
  ------------------
 1489|  1.46k|      switch (BYTE_TO_ASCII(enc, ptr)) {
  ------------------
  |  |  919|  1.46k|#  define BYTE_TO_ASCII(enc, p) BIG2_BYTE_TO_ASCII(p)
  |  |  ------------------
  |  |  |  |  871|  1.46k|#define BIG2_BYTE_TO_ASCII(p) ((p)[0] == 0 ? (p)[1] : -1)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (871:32): [True: 1.43k, False: 28]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1490|    312|      case 0x24: /* $ */
  ------------------
  |  Branch (1490:7): [True: 312, False: 1.15k]
  ------------------
 1491|  1.42k|      case 0x40: /* @ */
  ------------------
  |  Branch (1491:7): [True: 1.11k, False: 351]
  ------------------
 1492|  1.42k|        break;
 1493|     39|      default:
  ------------------
  |  Branch (1493:7): [True: 39, False: 1.42k]
  ------------------
 1494|     39|        *badPtr = ptr;
 1495|     39|        return 0;
 1496|  1.46k|      }
 1497|  1.42k|      break;
 1498|  7.82k|    }
 1499|  7.82k|  }
 1500|  1.38k|  return 1;
 1501|  1.42k|}

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

