dtoa:
  336|  1.81k|unsigned dtoa(double d, char* buffer) {
  337|  1.81k|    uint64_t bits = 0;
  338|  1.81k|    memcpy(&bits, &d, sizeof(double));
  339|       |
  340|  1.81k|    uint64_t mantissa = bits & ((1ull << mantissa_bits) - 1);
  ------------------
  |  |   33|  1.81k|#define mantissa_bits 52
  ------------------
  341|  1.81k|    uint32_t exponent = (uint32_t)
  342|  1.81k|        ((bits >> mantissa_bits) & ((1u << exponent_bits) - 1));
  ------------------
  |  |   33|  1.81k|#define mantissa_bits 52
  ------------------
                      ((bits >> mantissa_bits) & ((1u << exponent_bits) - 1));
  ------------------
  |  |   34|  1.81k|#define exponent_bits 11
  ------------------
  343|       |
  344|  1.81k|    if(exponent == 0 && mantissa == 0) {
  ------------------
  |  Branch (344:8): [True: 582, False: 1.23k]
  |  Branch (344:25): [True: 24, False: 558]
  ------------------
  345|     24|        memcpy(buffer, "0.0", 3);
  346|     24|        return 3;
  347|     24|    }
  348|       |
  349|  1.81k|    bool sign = ((bits >> (mantissa_bits + exponent_bits)) & 1) != 0;
  ------------------
  |  |   33|  1.79k|#define mantissa_bits 52
  ------------------
                  bool sign = ((bits >> (mantissa_bits + exponent_bits)) & 1) != 0;
  ------------------
  |  |   34|  1.79k|#define exponent_bits 11
  ------------------
  350|  1.79k|    unsigned pos = 0;
  351|  1.79k|    if(sign) {
  ------------------
  |  Branch (351:8): [True: 81, False: 1.71k]
  ------------------
  352|     81|        buffer[0] = '-';
  353|     81|        pos++;
  354|     81|    }
  355|       |
  356|  1.79k|    if(exponent == ((1u << exponent_bits) - 1u)) {
  ------------------
  |  |   34|  1.79k|#define exponent_bits 11
  ------------------
  |  Branch (356:8): [True: 0, False: 1.79k]
  ------------------
  357|      0|        if(mantissa != 0) {
  ------------------
  |  Branch (357:12): [True: 0, False: 0]
  ------------------
  358|      0|            memcpy(buffer, "nan", 3);
  359|      0|            return 3;
  360|      0|        } else {
  361|      0|            memcpy(&buffer[pos], "inf", 3);
  362|      0|            return pos + 3;
  363|      0|        }
  364|      0|    }
  365|       |
  366|  1.79k|    int K = 0;
  367|  1.79k|    char digits[18];
  368|  1.79k|    memset(digits, 0, 18);
  369|  1.79k|    unsigned ndigits = grisu2(bits, digits, &K);
  370|  1.79k|    return pos + emit_digits(digits, ndigits, &buffer[pos], K, sign);
  371|  1.79k|}
dtoa.c:grisu2:
  255|  1.79k|static unsigned grisu2(uint64_t bits, char* digits, int* K) {
  256|  1.79k|    Fp w = build_fp(bits);
  257|  1.79k|    Fp lower, upper;
  258|  1.79k|    get_normalized_boundaries(&w, &lower, &upper);
  259|  1.79k|    normalize(&w);
  260|  1.79k|    int k;
  261|  1.79k|    Fp cp = find_cachedpow10(upper.exp, &k);
  262|  1.79k|    w     = multiply(&w,     &cp);
  263|  1.79k|    upper = multiply(&upper, &cp);
  264|  1.79k|    lower = multiply(&lower, &cp);
  265|  1.79k|    lower.frac++;
  266|  1.79k|    upper.frac--;
  267|  1.79k|    *K = -k;
  268|  1.79k|    return generate_digits(&w, &upper, &lower, digits, K);
  269|  1.79k|}
dtoa.c:build_fp:
  132|  1.79k|static Fp build_fp(uint64_t bits) {
  133|  1.79k|    Fp fp;
  134|  1.79k|    fp.frac = bits & fracmask;
  ------------------
  |  |   35|  1.79k|#define fracmask  0x000FFFFFFFFFFFFFU
  ------------------
  135|  1.79k|    fp.exp = (bits & expmask) >> 52;
  ------------------
  |  |   36|  1.79k|#define expmask   0x7FF0000000000000U
  ------------------
  136|  1.79k|    if(fp.exp) {
  ------------------
  |  Branch (136:8): [True: 1.23k, False: 558]
  ------------------
  137|  1.23k|        fp.frac += hiddenbit;
  ------------------
  |  |   37|  1.23k|#define hiddenbit 0x0010000000000000U
  ------------------
  138|  1.23k|        fp.exp -= expbias;
  ------------------
  |  |   39|  1.23k|#define expbias   (1023 + 52)
  ------------------
  139|  1.23k|    } else {
  140|    558|        fp.exp = -expbias + 1;
  ------------------
  |  |   39|    558|#define expbias   (1023 + 52)
  ------------------
  141|    558|    }
  142|  1.79k|    return fp;
  143|  1.79k|}
dtoa.c:get_normalized_boundaries:
  155|  1.79k|static void get_normalized_boundaries(Fp* fp, Fp* lower, Fp* upper) {
  156|  1.79k|    upper->frac = (fp->frac << 1) + 1;
  157|  1.79k|    upper->exp  = fp->exp - 1;
  158|  16.1k|    while ((upper->frac & (hiddenbit << 1)) == 0) {
  ------------------
  |  |   37|  16.1k|#define hiddenbit 0x0010000000000000U
  ------------------
  |  Branch (158:12): [True: 14.3k, False: 1.79k]
  ------------------
  159|  14.3k|        upper->frac <<= 1;
  160|  14.3k|        upper->exp--;
  161|  14.3k|    }
  162|       |
  163|  1.79k|    int u_shift = 64 - 52 - 2;
  164|  1.79k|    upper->frac <<= u_shift;
  165|  1.79k|    upper->exp = upper->exp - u_shift;
  166|       |
  167|  1.79k|    int l_shift = fp->frac == hiddenbit ? 2 : 1;
  ------------------
  |  |   37|  1.79k|#define hiddenbit 0x0010000000000000U
  ------------------
  |  Branch (167:19): [True: 60, False: 1.73k]
  ------------------
  168|  1.79k|    lower->frac = (fp->frac << l_shift) - 1;
  169|  1.79k|    lower->exp = fp->exp - l_shift;
  170|  1.79k|    lower->frac <<= lower->exp - upper->exp;
  171|  1.79k|    lower->exp = upper->exp;
  172|  1.79k|}
dtoa.c:normalize:
  145|  1.79k|static void normalize(Fp* fp) {
  146|  16.1k|    while((fp->frac & hiddenbit) == 0) {
  ------------------
  |  |   37|  16.1k|#define hiddenbit 0x0010000000000000U
  ------------------
  |  Branch (146:11): [True: 14.3k, False: 1.79k]
  ------------------
  147|  14.3k|        fp->frac <<= 1;
  148|  14.3k|        fp->exp--;
  149|  14.3k|    }
  150|  1.79k|    int shift = 64 - 52 - 1;
  151|  1.79k|    fp->frac <<= shift;
  152|  1.79k|    fp->exp -= shift;
  153|  1.79k|}
dtoa.c:find_cachedpow10:
  113|  1.79k|find_cachedpow10(int exp, int* k) {
  114|  1.79k|    const double one_log_ten = 0.30102999566398114;
  115|  1.79k|    int approx = (int)(-(exp + npowers) * one_log_ten);
  ------------------
  |  |   54|  1.79k|#define npowers     87
  ------------------
  116|  1.79k|    int idx = (approx - firstpower) / steppowers;
  ------------------
  |  |   56|  1.79k|#define firstpower -348 /* 10 ^ -348 */
  ------------------
                  int idx = (approx - firstpower) / steppowers;
  ------------------
  |  |   55|  1.79k|#define steppowers  8
  ------------------
  117|  5.17k|    while(1) {
  ------------------
  |  Branch (117:11): [True: 5.17k, Folded]
  ------------------
  118|  5.17k|        int current = exp + powers_ten[idx].exp + 64;
  119|  5.17k|        if(current < expmin) {
  ------------------
  |  |   58|  5.17k|#define expmin     -60
  ------------------
  |  Branch (119:12): [True: 3.38k, False: 1.79k]
  ------------------
  120|  3.38k|            idx++;
  121|  3.38k|            continue;
  122|  3.38k|        }
  123|  1.79k|        if(current > expmax) {
  ------------------
  |  |   57|  1.79k|#define expmax     -32
  ------------------
  |  Branch (123:12): [True: 0, False: 1.79k]
  ------------------
  124|      0|            idx--;
  125|      0|            continue;
  126|      0|        }
  127|  1.79k|        *k = (firstpower + idx * steppowers);
  ------------------
  |  |   56|  1.79k|#define firstpower -348 /* 10 ^ -348 */
  ------------------
                      *k = (firstpower + idx * steppowers);
  ------------------
  |  |   55|  1.79k|#define steppowers  8
  ------------------
  128|  1.79k|        return powers_ten[idx];
  129|  1.79k|    }
  130|  1.79k|}
dtoa.c:multiply:
  174|  5.37k|static Fp multiply(Fp* a, Fp* b) {
  175|  5.37k|    const uint64_t lomask = 0x00000000FFFFFFFF;
  176|  5.37k|    uint64_t ah_bl = (a->frac >> 32)    * (b->frac & lomask);
  177|  5.37k|    uint64_t al_bh = (a->frac & lomask) * (b->frac >> 32);
  178|  5.37k|    uint64_t al_bl = (a->frac & lomask) * (b->frac & lomask);
  179|  5.37k|    uint64_t ah_bh = (a->frac >> 32)    * (b->frac >> 32);
  180|  5.37k|    uint64_t tmp = (ah_bl & lomask) + (al_bh & lomask) + (al_bl >> 32); 
  181|       |    /* round up */
  182|  5.37k|    tmp += 1U << 31;
  183|  5.37k|    Fp fp;
  184|  5.37k|    fp.frac = ah_bh + (ah_bl >> 32) + (al_bh >> 32) + (tmp >> 32);
  185|  5.37k|    fp.exp = a->exp + b->exp + 64;
  186|  5.37k|    return fp;
  187|  5.37k|}
dtoa.c:generate_digits:
  198|  1.79k|static unsigned generate_digits(Fp* fp, Fp* upper, Fp* lower, char* digits, int* K) {
  199|  1.79k|    uint64_t wfrac = upper->frac - fp->frac;
  200|  1.79k|    uint64_t delta = upper->frac - lower->frac;
  201|       |
  202|  1.79k|    Fp one;
  203|  1.79k|    one.frac = 1ULL << -upper->exp;
  204|  1.79k|    one.exp  = upper->exp;
  205|       |
  206|  1.79k|    uint64_t part1 = upper->frac >> -one.exp;
  207|  1.79k|    uint64_t part2 = upper->frac & (one.frac - 1);
  208|       |
  209|  1.79k|    unsigned idx = 0;
  210|  1.79k|    int kappa = 10;
  211|  1.79k|    uint64_t* divp;
  212|       |
  213|       |    /* 1000000000 */
  214|  16.7k|    for(divp = tens + 10; kappa > 0; divp++) {
  ------------------
  |  Branch (214:27): [True: 15.7k, False: 954]
  ------------------
  215|  15.7k|        uint64_t div = *divp;
  216|  15.7k|        uint64_t digit = part1 / div;
  217|  15.7k|        if(digit || idx) {
  ------------------
  |  Branch (217:12): [True: 6.30k, False: 9.46k]
  |  Branch (217:21): [True: 1.07k, False: 8.38k]
  ------------------
  218|  7.38k|            digits[idx++] = (char)(digit + '0');
  219|  7.38k|        }
  220|       |
  221|  15.7k|        part1 -= digit * div;
  222|  15.7k|        kappa--;
  223|       |
  224|  15.7k|        uint64_t tmp = (part1 <<-one.exp) + part2;
  225|  15.7k|        if(tmp <= delta) {
  ------------------
  |  Branch (225:12): [True: 837, False: 14.9k]
  ------------------
  226|    837|            *K += kappa;
  227|    837|            round_digit(digits, idx, delta, tmp, div << -one.exp, wfrac);
  228|    837|            return idx;
  229|    837|        }
  230|  15.7k|    }
  231|       |
  232|       |    /* 10 */
  233|    954|    uint64_t* unit = tens + 18;
  234|  8.43k|    while(true) {
  ------------------
  |  Branch (234:11): [True: 8.43k, Folded]
  ------------------
  235|  8.43k|        part2 *= 10;
  236|  8.43k|        delta *= 10;
  237|  8.43k|        kappa--;
  238|       |
  239|  8.43k|        uint64_t digit = part2 >> -one.exp;
  240|  8.43k|        if(digit || idx) {
  ------------------
  |  Branch (240:12): [True: 6.51k, False: 1.92k]
  |  Branch (240:21): [True: 1.92k, False: 0]
  ------------------
  241|  8.43k|            digits[idx++] = (char)(digit + '0');
  242|  8.43k|        }
  243|       |
  244|  8.43k|        part2 &= one.frac - 1;
  245|  8.43k|        if(part2 < delta) {
  ------------------
  |  Branch (245:12): [True: 954, False: 7.48k]
  ------------------
  246|    954|            *K += kappa;
  247|    954|            round_digit(digits, idx, delta, part2, one.frac, wfrac * *unit);
  248|    954|            break;
  249|    954|        }
  250|  7.48k|        unit--;
  251|  7.48k|    }
  252|    954|    return idx;
  253|  1.79k|}
dtoa.c:round_digit:
  190|  1.79k|                        uint64_t rem, uint64_t kappa, uint64_t frac) {
  191|  3.06k|    while(rem < frac && delta - rem >= kappa &&
  ------------------
  |  Branch (191:11): [True: 1.89k, False: 1.16k]
  |  Branch (191:25): [True: 1.51k, False: 381]
  ------------------
  192|  1.51k|          (rem + kappa < frac || frac - rem > rem + kappa - frac)) {
  ------------------
  |  Branch (192:12): [True: 753, False: 765]
  |  Branch (192:34): [True: 519, False: 246]
  ------------------
  193|  1.27k|        digits[ndigits - 1]--;
  194|  1.27k|        rem += kappa;
  195|  1.27k|    }
  196|  1.79k|}
dtoa.c:emit_digits:
  272|  1.79k|emit_digits(char* digits, unsigned ndigits, char* dest, int K, bool neg) {
  273|  1.79k|    int exp = absv(K + (int)ndigits - 1);
  ------------------
  |  |   41|  1.79k|#define absv(n) ((n) < 0 ? -(n) : (n))
  |  |  ------------------
  |  |  |  Branch (41:18): [True: 1.07k, False: 720]
  |  |  ------------------
  ------------------
  274|       |
  275|       |    /* write plain integer */
  276|  1.79k|    if(K >= 0 && (exp < (int)ndigits + 7)) {
  ------------------
  |  Branch (276:8): [True: 444, False: 1.34k]
  |  Branch (276:18): [True: 324, False: 120]
  ------------------
  277|    324|        memcpy(dest, digits, ndigits);
  278|    324|        memset(dest + ndigits, '0', (unsigned)K);
  279|    324|        memcpy(dest + ndigits + (unsigned)K, ".0", 2); /* always append .0 for naked integers */
  280|    324|        return (unsigned)(ndigits + (unsigned)K + 2);
  281|    324|    }
  282|       |
  283|       |    /* write decimal w/o scientific notation */
  284|  1.46k|    if(K < 0 && (K > -7 || exp < 4)) {
  ------------------
  |  Branch (284:8): [True: 1.34k, False: 120]
  |  Branch (284:18): [True: 213, False: 1.13k]
  |  Branch (284:28): [True: 318, False: 816]
  ------------------
  285|    531|        int offset = (int)ndigits - absv(K);
  ------------------
  |  |   41|    531|#define absv(n) ((n) < 0 ? -(n) : (n))
  |  |  ------------------
  |  |  |  Branch (41:18): [True: 531, False: 0]
  |  |  ------------------
  ------------------
  286|    531|        if(offset <= 0) {
  ------------------
  |  Branch (286:12): [True: 312, False: 219]
  ------------------
  287|       |            /* fp < 1.0 -> write leading zero */
  288|    312|            offset = -offset;
  289|    312|            dest[0] = '0';
  290|    312|            dest[1] = '.';
  291|    312|            memset(dest + 2, '0', (size_t)offset);
  292|    312|            memcpy(dest + offset + 2, digits, ndigits);
  293|    312|            return ndigits + 2 + (unsigned)offset;
  294|    312|        } else {
  295|       |            /* fp > 1.0 */
  296|    219|            memcpy(dest, digits, (size_t)offset);
  297|    219|            dest[offset] = '.';
  298|    219|            memcpy(dest + offset + 1, digits + offset, ndigits - (unsigned)offset);
  299|    219|            return ndigits + 1;
  300|    219|        }
  301|    531|    }
  302|       |
  303|       |    /* write decimal w/ scientific notation */
  304|    936|    ndigits = minv(ndigits, (unsigned)(18 - neg));
  ------------------
  |  |   42|    936|#define minv(a, b) ((a) < (b) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (42:21): [True: 924, False: 12]
  |  |  ------------------
  ------------------
  305|    936|    unsigned idx = 0;
  306|    936|    dest[idx++] = digits[0];
  307|    936|    if(ndigits > 1) {
  ------------------
  |  Branch (307:8): [True: 786, False: 150]
  ------------------
  308|    786|        dest[idx++] = '.';
  309|    786|        memcpy(dest + idx, digits + 1, ndigits - 1);
  310|    786|        idx += ndigits - 1;
  311|    786|    }
  312|       |
  313|    936|    dest[idx++] = 'e';
  314|       |
  315|    936|    char sign = K + (int)ndigits - 1 < 0 ? '-' : '+';
  ------------------
  |  Branch (315:17): [True: 759, False: 177]
  ------------------
  316|    936|    dest[idx++] = sign;
  317|       |
  318|    936|    int cent = 0;
  319|    936|    if(exp > 99) {
  ------------------
  |  Branch (319:8): [True: 663, False: 273]
  ------------------
  320|    663|        cent = exp / 100;
  321|    663|        dest[idx++] = (char)(cent + '0');
  322|    663|        exp -= cent * 100;
  323|    663|    }
  324|    936|    if(exp > 9) {
  ------------------
  |  Branch (324:8): [True: 660, False: 276]
  ------------------
  325|    660|        int dec = exp / 10;
  326|    660|        dest[idx++] = (char)(dec + '0');
  327|    660|        exp -= dec * 10;
  328|       |
  329|    660|    } else if(cent) {
  ------------------
  |  Branch (329:15): [True: 117, False: 159]
  ------------------
  330|    117|        dest[idx++] = '0';
  331|    117|    }
  332|    936|    dest[idx++] = (char)(exp % 10 + '0');
  333|    936|    return idx;
  334|  1.46k|}

itoaUnsigned:
   42|    825|UA_UInt16 itoaUnsigned(UA_UInt64 value, char* buffer, UA_Byte base) {
   43|       |    /* consider absolute value of number */
   44|    825|    UA_UInt64 n = value;
   45|       |
   46|    825|    UA_UInt16 i = 0;
   47|  8.11k|    while (n) {
  ------------------
  |  Branch (47:12): [True: 7.28k, False: 825]
  ------------------
   48|  7.28k|        UA_UInt64 r = n % base;
   49|       |
   50|  7.28k|        if (r >= 10)
  ------------------
  |  Branch (50:13): [True: 0, False: 7.28k]
  ------------------
   51|      0|            buffer[i++] = (char)(65 + (r - 10));
   52|  7.28k|        else
   53|  7.28k|            buffer[i++] = (char)(48 + r);
   54|       |
   55|  7.28k|        n = n / base;
   56|  7.28k|    }
   57|       |    /* if number is 0 */
   58|    825|    if (i == 0)
  ------------------
  |  Branch (58:9): [True: 51, False: 774]
  ------------------
   59|     51|        buffer[i++] = '0';
   60|       |
   61|    825|    buffer[i] = '\0'; /* null terminate string */
   62|    825|    i--;
   63|       |    /* reverse the string */
   64|    825|    reverse(buffer, 0, i);
   65|    825|    i++;
   66|    825|    return i;
   67|    825|}
itoaSigned:
   70|  1.25k|UA_UInt16 itoaSigned(UA_Int64 value, char* buffer) {
   71|       |    /* Special case for UA_INT64_MIN which can not simply be negated */
   72|       |    /* it will cause a signed integer overflow */
   73|  1.25k|    UA_UInt64 n;
   74|  1.25k|    if(value == UA_INT64_MIN) {
  ------------------
  |  |  120|  1.25k|#define UA_INT64_MIN ((int64_t)-UA_INT64_MAX-1LL)
  |  |  ------------------
  |  |  |  |  119|  1.25k|#define UA_INT64_MAX (int64_t)9223372036854775807LL
  |  |  ------------------
  ------------------
  |  Branch (74:8): [True: 3, False: 1.24k]
  ------------------
   75|      3|        n = (UA_UInt64)UA_INT64_MAX + 1;
  ------------------
  |  |  119|      3|#define UA_INT64_MAX (int64_t)9223372036854775807LL
  ------------------
   76|  1.24k|    } else {
   77|  1.24k|        n = (UA_UInt64)value;
   78|  1.24k|        if(value < 0){
  ------------------
  |  Branch (78:12): [True: 486, False: 762]
  ------------------
   79|    486|            n = (UA_UInt64)-value;
   80|    486|        }
   81|  1.24k|    }
   82|       |
   83|  1.25k|    UA_UInt16 i = 0;
   84|  12.7k|    while(n) {
  ------------------
  |  Branch (84:11): [True: 11.5k, False: 1.25k]
  ------------------
   85|  11.5k|        UA_UInt64 r = n % 10;
   86|  11.5k|        buffer[i++] = (char)('0' + r);
   87|  11.5k|        n = n / 10;
   88|  11.5k|    }
   89|       |
   90|  1.25k|    if(i == 0)
  ------------------
  |  Branch (90:8): [True: 63, False: 1.18k]
  ------------------
   91|     63|        buffer[i++] = '0'; /* if number is 0 */
   92|  1.25k|    if(value < 0)
  ------------------
  |  Branch (92:8): [True: 489, False: 762]
  ------------------
   93|    489|        buffer[i++] = '-';
   94|  1.25k|    buffer[i] = '\0'; /* null terminate string */
   95|  1.25k|    i--;
   96|  1.25k|    reverse(buffer, 0, i); /* reverse the string and return it */
   97|  1.25k|    i++;
   98|  1.25k|    return i;
   99|  1.25k|}
itoa.c:reverse:
   34|  2.07k|static char* reverse(char *buffer, UA_UInt16 i, UA_UInt16 j) {
   35|  11.1k|    while (i < j)
  ------------------
  |  Branch (35:12): [True: 9.09k, False: 2.07k]
  ------------------
   36|  9.09k|        swap(&buffer[i++], &buffer[j--]);
   37|       |
   38|  2.07k|    return buffer;
   39|  2.07k|}
itoa.c:swap:
   27|  9.09k|static void swap(char *x, char *y) {
   28|  9.09k|    char t = *x;
   29|  9.09k|    *x = *y;
   30|  9.09k|    *y = t;
   31|  9.09k|}

parseUInt64:
   30|  2.24k|parseUInt64(const char *str, size_t size, uint64_t *result) {
   31|  2.24k|    size_t i = 0;
   32|  2.24k|    uint64_t n = 0, prev = 0;
   33|       |
   34|       |    /* Hex */
   35|  2.24k|    if(size > 2 && str[0] == '0' && (str[1] | 32) == 'x') {
  ------------------
  |  Branch (35:8): [True: 1.95k, False: 290]
  |  Branch (35:20): [True: 447, False: 1.51k]
  |  Branch (35:37): [True: 265, False: 182]
  ------------------
   36|    265|        i = 2;
   37|  3.45k|        for(; i < size; i++) {
  ------------------
  |  Branch (37:15): [True: 3.24k, False: 207]
  ------------------
   38|  3.24k|            uint8_t c = (uint8_t)str[i] | 32;
   39|  3.24k|            if(c >= '0' && c <= '9')
  ------------------
  |  Branch (39:16): [True: 3.21k, False: 35]
  |  Branch (39:28): [True: 1.68k, False: 1.52k]
  ------------------
   40|  1.68k|                c = (uint8_t)(c - '0');
   41|  1.55k|            else if(c >= 'a' && c <='f')
  ------------------
  |  Branch (41:21): [True: 1.51k, False: 40]
  |  Branch (41:33): [True: 1.50k, False: 10]
  ------------------
   42|  1.50k|                c = (uint8_t)(c - 'a' + 10);
   43|     50|            else if(c >= 'A' && c <='F')
  ------------------
  |  Branch (43:21): [True: 12, False: 38]
  |  Branch (43:33): [True: 0, False: 12]
  ------------------
   44|      0|                c = (uint8_t)(c - 'A' + 10);
   45|     50|            else
   46|     50|                break;
   47|  3.19k|            n = (n << 4) | (c & 0xF);
   48|  3.19k|            if(n < prev) /* Check for overflow */
  ------------------
  |  Branch (48:16): [True: 8, False: 3.18k]
  ------------------
   49|      8|                return 0;
   50|  3.18k|            prev = n;
   51|  3.18k|        }
   52|    257|        *result = n;
   53|    257|        return (i > 2) ? i : 0; /* 2 -> No digit was parsed */
  ------------------
  |  Branch (53:16): [True: 251, False: 6]
  ------------------
   54|    265|    }
   55|       |
   56|       |    /* Decimal */
   57|  23.0k|    for(; i < size; i++) {
  ------------------
  |  Branch (57:11): [True: 21.6k, False: 1.48k]
  ------------------
   58|  21.6k|        if(str[i] < '0' || str[i] > '9')
  ------------------
  |  Branch (58:12): [True: 416, False: 21.1k]
  |  Branch (58:28): [True: 79, False: 21.1k]
  ------------------
   59|    495|            break;
   60|       |        /* Fast multiplication: n*10 == (n*8) + (n*2) */
   61|  21.1k|        n = (n << 3) + (n << 1) + (uint8_t)(str[i] - '0');
   62|  21.1k|        if(n < prev) /* Check for overflow */
  ------------------
  |  Branch (62:12): [True: 2, False: 21.1k]
  ------------------
   63|      2|            return 0;
   64|  21.1k|        prev = n;
   65|  21.1k|    }
   66|  1.98k|    *result = n;
   67|  1.98k|    return i;
   68|  1.98k|}
parseInt64:
   71|  1.44k|parseInt64(const char *str, size_t size, int64_t *result) {
   72|       |    /* Negative value? */
   73|  1.44k|    size_t i = 0;
   74|  1.44k|    bool neg = false;
   75|  1.44k|    if(*str == '-' || *str == '+') {
  ------------------
  |  Branch (75:8): [True: 579, False: 866]
  |  Branch (75:23): [True: 2, False: 864]
  ------------------
   76|    581|        neg = (*str == '-');
   77|    581|        i++;
   78|    581|    }
   79|       |
   80|       |    /* Parse as unsigned */
   81|  1.44k|    uint64_t n = 0;
   82|  1.44k|    size_t len = parseUInt64(&str[i], size - i, &n);
   83|  1.44k|    if(len == 0)
  ------------------
  |  Branch (83:8): [True: 93, False: 1.35k]
  ------------------
   84|     93|        return 0;
   85|       |
   86|       |    /* Check for overflow, adjust and return */
   87|  1.35k|    if(!neg) {
  ------------------
  |  Branch (87:8): [True: 783, False: 569]
  ------------------
   88|    783|        if(n > 9223372036854775807UL)
  ------------------
  |  Branch (88:12): [True: 66, False: 717]
  ------------------
   89|     66|            return 0;
   90|    717|        *result = (int64_t)n;
   91|    717|    } else {
   92|       |        /* n is unsigned, so 9223372036854775808UL == 2^63 fits without
   93|       |         * overflow. (int64_t)n would also fit for n in [0, 2^63], but
   94|       |         * the negation -(int64_t)(2^63) is undefined because the result
   95|       |         * (which is +2^63) cannot be represented. Use the unsigned
   96|       |         * representation and reinterpret as int64_t instead. */
   97|    569|        if(n > 9223372036854775808UL)
  ------------------
  |  Branch (97:12): [True: 6, False: 563]
  ------------------
   98|      6|            return 0;
   99|    563|        *result = (n == 9223372036854775808UL)
  ------------------
  |  Branch (99:19): [True: 4, False: 559]
  ------------------
  100|    563|            ? (int64_t)(-9223372036854775807LL - 1)
  101|    563|            : -(int64_t)n;
  102|    563|    }
  103|  1.28k|    return len + i;
  104|  1.35k|}
parseDouble:
  106|  1.28k|size_t parseDouble(const char *str, size_t size, double *result) {
  107|  1.28k|    char buf[2000];
  108|  1.28k|    if(size >= 2000)
  ------------------
  |  Branch (108:8): [True: 0, False: 1.28k]
  ------------------
  109|      0|        return 0;
  110|  1.28k|    memcpy(buf, str, size);
  111|  1.28k|    buf[size] = 0;
  112|  1.28k|    errno = 0;
  113|  1.28k|    char *endptr;
  114|  1.28k|    *result = strtod(buf, &endptr);
  115|  1.28k|    if(errno != 0 && errno != ERANGE)
  ------------------
  |  Branch (115:8): [True: 301, False: 983]
  |  Branch (115:22): [True: 0, False: 301]
  ------------------
  116|      0|        return 0;
  117|  1.28k|    return (uintptr_t)endptr - (uintptr_t)buf;
  118|  1.28k|}

yxml_init:
  301|  8.80k|void yxml_init(yxml_t *x, void *stack, size_t stacksize) {
  302|  8.80k|	memset(x, 0, sizeof(*x));
  303|  8.80k|	x->line = 1;
  304|  8.80k|	x->stack = (unsigned char*)stack;
  305|  8.80k|	x->stacksize = stacksize;
  306|  8.80k|	*x->stack = 0;
  307|  8.80k|	x->elem = x->pi = x->attr = (char *)x->stack;
  308|  8.80k|	x->state = YXMLS_init;
  309|  8.80k|}
yxml_parse:
  311|   137M|yxml_ret_t yxml_parse(yxml_t *x, int _ch) {
  312|       |	/* Ensure that characters are in the range of 0..255 rather than -126..125.
  313|       |	 * All character comparisons are done with positive integers. */
  314|   137M|	unsigned ch = (unsigned)(_ch+256) & 0xff;
  315|   137M|	if(!ch)
  ------------------
  |  Branch (315:5): [True: 2, False: 137M]
  ------------------
  316|      2|		return YXML_ESYN;
  317|   137M|	x->total++;
  318|       |
  319|       |	/* End-of-Line normalization, "\rX", "\r\n" and "\n" are recognized and
  320|       |	 * normalized to a single '\n' as per XML 1.0 section 2.11. XML 1.1 adds
  321|       |	 * some non-ASCII character sequences to this list, but we can only handle
  322|       |	 * ASCII here without making assumptions about the input encoding. */
  323|   137M|	if(x->ignore == ch) {
  ------------------
  |  Branch (323:5): [True: 2.35k, False: 137M]
  ------------------
  324|  2.35k|		x->ignore = 0;
  325|  2.35k|		return YXML_OK;
  326|  2.35k|	}
  327|   137M|	x->ignore = (ch == 0xd) * 0xa;
  328|   137M|	if(ch == 0xa || ch == 0xd) {
  ------------------
  |  Branch (328:5): [True: 206k, False: 137M]
  |  Branch (328:18): [True: 2.98M, False: 134M]
  ------------------
  329|  3.19M|		ch = 0xa;
  330|  3.19M|		x->line++;
  331|  3.19M|		x->byte = 0;
  332|  3.19M|	}
  333|   137M|	x->byte++;
  334|       |
  335|   137M|	switch((yxml_state_t)x->state) {
  ------------------
  |  Branch (335:9): [True: 137M, False: 0]
  ------------------
  336|  11.8k|	case YXMLS_string:
  ------------------
  |  Branch (336:2): [True: 11.8k, False: 137M]
  ------------------
  337|  11.8k|		if(ch == *x->string) {
  ------------------
  |  Branch (337:6): [True: 11.8k, False: 11]
  ------------------
  338|  11.8k|			x->string++;
  339|  11.8k|			if(!*x->string)
  ------------------
  |  Branch (339:7): [True: 2.22k, False: 9.65k]
  ------------------
  340|  2.22k|				x->state = x->nextstate;
  341|  11.8k|			return YXML_OK;
  342|  11.8k|		}
  343|     11|		break;
  344|  34.6M|	case YXMLS_attr0:
  ------------------
  |  Branch (344:2): [True: 34.6M, False: 102M]
  ------------------
  345|  34.6M|		if(yxml_isName(ch))
  ------------------
  |  |  107|  34.6M|#define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  |  106|  69.2M|#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_' || c >= 128)
  |  |  |  |  ------------------
  |  |  |  |  |  |  102|  69.2M|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (102:25): [True: 8.36M, False: 26.2M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:49): [True: 17.7k, False: 26.2M]
  |  |  |  |  |  Branch (106:61): [True: 2.53k, False: 26.2M]
  |  |  |  |  |  Branch (106:73): [True: 24.1M, False: 2.07M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  |  103|  36.7M|#define yxml_isNum(c) (c-'0' < 10)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:23): [True: 59.6k, False: 2.01M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (107:65): [True: 20.4k, False: 1.99M]
  |  |  |  Branch (107:77): [True: 2.74k, False: 1.98M]
  |  |  ------------------
  ------------------
  346|  32.6M|			return yxml_attrname(x, ch);
  347|  1.98M|		if(yxml_isSP(ch)) {
  ------------------
  |  |  101|  1.98M|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 1.57M, False: 419k]
  |  |  |  Branch (101:36): [True: 232, False: 419k]
  |  |  |  Branch (101:49): [True: 362, False: 418k]
  |  |  ------------------
  ------------------
  348|  1.57M|			x->state = YXMLS_attr1;
  349|  1.57M|			return yxml_attrnameend(x, ch);
  350|  1.57M|		}
  351|   418k|		if(ch == (unsigned char)'=') {
  ------------------
  |  Branch (351:6): [True: 418k, False: 26]
  ------------------
  352|   418k|			x->state = YXMLS_attr2;
  353|   418k|			return yxml_attrnameend(x, ch);
  354|   418k|		}
  355|     26|		break;
  356|  1.57M|	case YXMLS_attr1:
  ------------------
  |  Branch (356:2): [True: 1.57M, False: 135M]
  ------------------
  357|  1.57M|		if(yxml_isSP(ch))
  ------------------
  |  |  101|  1.57M|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 220, False: 1.57M]
  |  |  |  Branch (101:36): [True: 1.67k, False: 1.57M]
  |  |  |  Branch (101:49): [True: 194, False: 1.57M]
  |  |  ------------------
  ------------------
  358|  2.09k|			return YXML_OK;
  359|  1.57M|		if(ch == (unsigned char)'=') {
  ------------------
  |  Branch (359:6): [True: 1.57M, False: 19]
  ------------------
  360|  1.57M|			x->state = YXMLS_attr2;
  361|  1.57M|			return YXML_OK;
  362|  1.57M|		}
  363|     19|		break;
  364|  1.99M|	case YXMLS_attr2:
  ------------------
  |  Branch (364:2): [True: 1.99M, False: 135M]
  ------------------
  365|  1.99M|		if(yxml_isSP(ch))
  ------------------
  |  |  101|  1.99M|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 196, False: 1.99M]
  |  |  |  Branch (101:36): [True: 194, False: 1.98M]
  |  |  |  Branch (101:49): [True: 196, False: 1.98M]
  |  |  ------------------
  ------------------
  366|    586|			return YXML_OK;
  367|  1.98M|		if(ch == (unsigned char)'\'' || ch == (unsigned char)'"') {
  ------------------
  |  Branch (367:6): [True: 412k, False: 1.57M]
  |  Branch (367:35): [True: 1.57M, False: 16]
  ------------------
  368|  1.98M|			x->state = YXMLS_attr3;
  369|  1.98M|			x->quote = ch;
  370|  1.98M|			return YXML_OK;
  371|  1.98M|		}
  372|     16|		break;
  373|  3.84M|	case YXMLS_attr3:
  ------------------
  |  Branch (373:2): [True: 3.84M, False: 133M]
  ------------------
  374|  3.84M|		if(yxml_isAttValue(ch))
  ------------------
  |  |  109|  3.84M|#define yxml_isAttValue(c) (yxml_isChar(c) && c != x->quote && c != '<' && c != '&')
  |  |  ------------------
  |  |  |  |   99|  7.69M|#define yxml_isChar(c) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:24): [True: 3.84M, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (109:47): [True: 1.85M, False: 1.98M]
  |  |  |  Branch (109:64): [True: 1.85M, False: 1]
  |  |  |  Branch (109:76): [True: 1.85M, False: 805]
  |  |  ------------------
  ------------------
  375|  1.85M|			return yxml_dataattr(x, ch);
  376|  1.99M|		if(ch == (unsigned char)'&') {
  ------------------
  |  Branch (376:6): [True: 805, False: 1.98M]
  ------------------
  377|    805|			x->state = YXMLS_attr4;
  378|    805|			return yxml_refstart(x, ch);
  379|    805|		}
  380|  1.98M|		if(x->quote == ch) {
  ------------------
  |  Branch (380:6): [True: 1.98M, False: 1]
  ------------------
  381|  1.98M|			x->state = YXMLS_elem2;
  382|  1.98M|			return yxml_attrvalend(x, ch);
  383|  1.98M|		}
  384|      1|		break;
  385|  3.24k|	case YXMLS_attr4:
  ------------------
  |  Branch (385:2): [True: 3.24k, False: 137M]
  ------------------
  386|  3.24k|		if(yxml_isRef(ch))
  ------------------
  |  |  113|  3.24k|#define yxml_isRef(c) (yxml_isNum(c) || yxml_isAlpha(c) || c == '#')
  |  |  ------------------
  |  |  |  |  103|  6.49k|#define yxml_isNum(c) (c-'0' < 10)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:23): [True: 761, False: 2.48k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define yxml_isRef(c) (yxml_isNum(c) || yxml_isAlpha(c) || c == '#')
  |  |  ------------------
  |  |  |  |  102|  5.73k|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:25): [True: 1.21k, False: 1.27k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (113:60): [True: 503, False: 768]
  |  |  ------------------
  ------------------
  387|  2.47k|			return yxml_ref(x, ch);
  388|    768|		if(ch == (unsigned char)'\x3b') {
  ------------------
  |  Branch (388:6): [True: 754, False: 14]
  ------------------
  389|    754|			x->state = YXMLS_attr3;
  390|    754|			return yxml_refattrval(x, ch);
  391|    754|		}
  392|     14|		break;
  393|  1.82k|	case YXMLS_cd0:
  ------------------
  |  Branch (393:2): [True: 1.82k, False: 137M]
  ------------------
  394|  1.82k|		if(ch == (unsigned char)']') {
  ------------------
  |  Branch (394:6): [True: 748, False: 1.07k]
  ------------------
  395|    748|			x->state = YXMLS_cd1;
  396|    748|			return YXML_OK;
  397|    748|		}
  398|  1.07k|		if(yxml_isChar(ch))
  ------------------
  |  |   99|  1.07k|#define yxml_isChar(c) 1
  |  |  ------------------
  |  |  |  Branch (99:24): [True: 1.07k, Folded]
  |  |  ------------------
  ------------------
  399|  1.07k|			return yxml_datacontent(x, ch);
  400|      0|		break;
  401|    742|	case YXMLS_cd1:
  ------------------
  |  Branch (401:2): [True: 742, False: 137M]
  ------------------
  402|    742|		if(ch == (unsigned char)']') {
  ------------------
  |  Branch (402:6): [True: 505, False: 237]
  ------------------
  403|    505|			x->state = YXMLS_cd2;
  404|    505|			return YXML_OK;
  405|    505|		}
  406|    237|		if(yxml_isChar(ch)) {
  ------------------
  |  |   99|    237|#define yxml_isChar(c) 1
  |  |  ------------------
  |  |  |  Branch (99:24): [True: 237, Folded]
  |  |  ------------------
  ------------------
  407|    237|			x->state = YXMLS_cd0;
  408|    237|			return yxml_datacd1(x, ch);
  409|    237|		}
  410|      0|		break;
  411|    725|	case YXMLS_cd2:
  ------------------
  |  Branch (411:2): [True: 725, False: 137M]
  ------------------
  412|    725|		if(ch == (unsigned char)']')
  ------------------
  |  Branch (412:6): [True: 234, False: 491]
  ------------------
  413|    234|			return yxml_datacontent(x, ch);
  414|    491|		if(ch == (unsigned char)'>') {
  ------------------
  |  Branch (414:6): [True: 238, False: 253]
  ------------------
  415|    238|			x->state = YXMLS_misc2;
  416|    238|			return YXML_OK;
  417|    238|		}
  418|    253|		if(yxml_isChar(ch)) {
  ------------------
  |  |   99|    253|#define yxml_isChar(c) 1
  |  |  ------------------
  |  |  |  Branch (99:24): [True: 253, Folded]
  |  |  ------------------
  ------------------
  419|    253|			x->state = YXMLS_cd0;
  420|    253|			return yxml_datacd2(x, ch);
  421|    253|		}
  422|      0|		break;
  423|    217|	case YXMLS_comment0:
  ------------------
  |  Branch (423:2): [True: 217, False: 137M]
  ------------------
  424|    217|		if(ch == (unsigned char)'-') {
  ------------------
  |  Branch (424:6): [True: 207, False: 10]
  ------------------
  425|    207|			x->state = YXMLS_comment1;
  426|    207|			return YXML_OK;
  427|    207|		}
  428|     10|		break;
  429|  1.21k|	case YXMLS_comment1:
  ------------------
  |  Branch (429:2): [True: 1.21k, False: 137M]
  ------------------
  430|  1.21k|		if(ch == (unsigned char)'-') {
  ------------------
  |  Branch (430:6): [True: 1.20k, False: 10]
  ------------------
  431|  1.20k|			x->state = YXMLS_comment2;
  432|  1.20k|			return YXML_OK;
  433|  1.20k|		}
  434|     10|		break;
  435|  1.84k|	case YXMLS_comment2:
  ------------------
  |  Branch (435:2): [True: 1.84k, False: 137M]
  ------------------
  436|  1.84k|		if(ch == (unsigned char)'-') {
  ------------------
  |  Branch (436:6): [True: 1.55k, False: 285]
  ------------------
  437|  1.55k|			x->state = YXMLS_comment3;
  438|  1.55k|			return YXML_OK;
  439|  1.55k|		}
  440|    285|		if(yxml_isChar(ch))
  ------------------
  |  |   99|    285|#define yxml_isChar(c) 1
  |  |  ------------------
  |  |  |  Branch (99:24): [True: 285, Folded]
  |  |  ------------------
  ------------------
  441|    285|			return YXML_OK;
  442|      0|		break;
  443|  1.54k|	case YXMLS_comment3:
  ------------------
  |  Branch (443:2): [True: 1.54k, False: 137M]
  ------------------
  444|  1.54k|		if(ch == (unsigned char)'-') {
  ------------------
  |  Branch (444:6): [True: 1.15k, False: 389]
  ------------------
  445|  1.15k|			x->state = YXMLS_comment4;
  446|  1.15k|			return YXML_OK;
  447|  1.15k|		}
  448|    389|		if(yxml_isChar(ch)) {
  ------------------
  |  |   99|    389|#define yxml_isChar(c) 1
  |  |  ------------------
  |  |  |  Branch (99:24): [True: 389, Folded]
  |  |  ------------------
  ------------------
  449|    389|			x->state = YXMLS_comment2;
  450|    389|			return YXML_OK;
  451|    389|		}
  452|      0|		break;
  453|  1.15k|	case YXMLS_comment4:
  ------------------
  |  Branch (453:2): [True: 1.15k, False: 137M]
  ------------------
  454|  1.15k|		if(ch == (unsigned char)'>') {
  ------------------
  |  Branch (454:6): [True: 1.14k, False: 9]
  ------------------
  455|  1.14k|			x->state = x->nextstate;
  456|  1.14k|			return YXML_OK;
  457|  1.14k|		}
  458|      9|		break;
  459|  1.95k|	case YXMLS_dt0:
  ------------------
  |  Branch (459:2): [True: 1.95k, False: 137M]
  ------------------
  460|  1.95k|		if(ch == (unsigned char)'>') {
  ------------------
  |  Branch (460:6): [True: 345, False: 1.61k]
  ------------------
  461|    345|			x->state = YXMLS_misc1;
  462|    345|			return YXML_OK;
  463|    345|		}
  464|  1.61k|		if(ch == (unsigned char)'\'' || ch == (unsigned char)'"') {
  ------------------
  |  Branch (464:6): [True: 263, False: 1.34k]
  |  Branch (464:35): [True: 334, False: 1.01k]
  ------------------
  465|    597|			x->state = YXMLS_dt1;
  466|    597|			x->quote = ch;
  467|    597|			x->nextstate = YXMLS_dt0;
  468|    597|			return YXML_OK;
  469|    597|		}
  470|  1.01k|		if(ch == (unsigned char)'<') {
  ------------------
  |  Branch (470:6): [True: 792, False: 221]
  ------------------
  471|    792|			x->state = YXMLS_dt2;
  472|    792|			return YXML_OK;
  473|    792|		}
  474|    221|		if(yxml_isChar(ch))
  ------------------
  |  |   99|    221|#define yxml_isChar(c) 1
  |  |  ------------------
  |  |  |  Branch (99:24): [True: 221, Folded]
  |  |  ------------------
  ------------------
  475|    221|			return YXML_OK;
  476|      0|		break;
  477|  1.13k|	case YXMLS_dt1:
  ------------------
  |  Branch (477:2): [True: 1.13k, False: 137M]
  ------------------
  478|  1.13k|		if(x->quote == ch) {
  ------------------
  |  Branch (478:6): [True: 938, False: 201]
  ------------------
  479|    938|			x->state = x->nextstate;
  480|    938|			return YXML_OK;
  481|    938|		}
  482|    201|		if(yxml_isChar(ch))
  ------------------
  |  |   99|    201|#define yxml_isChar(c) 1
  |  |  ------------------
  |  |  |  Branch (99:24): [True: 201, Folded]
  |  |  ------------------
  ------------------
  483|    201|			return YXML_OK;
  484|      0|		break;
  485|    785|	case YXMLS_dt2:
  ------------------
  |  Branch (485:2): [True: 785, False: 137M]
  ------------------
  486|    785|		if(ch == (unsigned char)'?') {
  ------------------
  |  Branch (486:6): [True: 194, False: 591]
  ------------------
  487|    194|			x->state = YXMLS_pi0;
  488|    194|			x->nextstate = YXMLS_dt0;
  489|    194|			return YXML_OK;
  490|    194|		}
  491|    591|		if(ch == (unsigned char)'!') {
  ------------------
  |  Branch (491:6): [True: 590, False: 1]
  ------------------
  492|    590|			x->state = YXMLS_dt3;
  493|    590|			return YXML_OK;
  494|    590|		}
  495|      1|		break;
  496|    584|	case YXMLS_dt3:
  ------------------
  |  Branch (496:2): [True: 584, False: 137M]
  ------------------
  497|    584|		if(ch == (unsigned char)'-') {
  ------------------
  |  Branch (497:6): [True: 194, False: 390]
  ------------------
  498|    194|			x->state = YXMLS_comment1;
  499|    194|			x->nextstate = YXMLS_dt0;
  500|    194|			return YXML_OK;
  501|    194|		}
  502|    390|		if(yxml_isChar(ch)) {
  ------------------
  |  |   99|    390|#define yxml_isChar(c) 1
  |  |  ------------------
  |  |  |  Branch (99:24): [True: 390, Folded]
  |  |  ------------------
  ------------------
  503|    390|			x->state = YXMLS_dt4;
  504|    390|			return YXML_OK;
  505|    390|		}
  506|      0|		break;
  507|    933|	case YXMLS_dt4:
  ------------------
  |  Branch (507:2): [True: 933, False: 137M]
  ------------------
  508|    933|		if(ch == (unsigned char)'\'' || ch == (unsigned char)'"') {
  ------------------
  |  Branch (508:6): [True: 194, False: 739]
  |  Branch (508:35): [True: 194, False: 545]
  ------------------
  509|    388|			x->state = YXMLS_dt1;
  510|    388|			x->quote = ch;
  511|    388|			x->nextstate = YXMLS_dt4;
  512|    388|			return YXML_OK;
  513|    388|		}
  514|    545|		if(ch == (unsigned char)'>') {
  ------------------
  |  Branch (514:6): [True: 342, False: 203]
  ------------------
  515|    342|			x->state = YXMLS_dt0;
  516|    342|			return YXML_OK;
  517|    342|		}
  518|    203|		if(yxml_isChar(ch))
  ------------------
  |  |   99|    203|#define yxml_isChar(c) 1
  |  |  ------------------
  |  |  |  Branch (99:24): [True: 203, Folded]
  |  |  ------------------
  ------------------
  519|    203|			return YXML_OK;
  520|      0|		break;
  521|  13.3M|	case YXMLS_elem0:
  ------------------
  |  Branch (521:2): [True: 13.3M, False: 123M]
  ------------------
  522|  13.3M|		if(yxml_isName(ch))
  ------------------
  |  |  107|  13.3M|#define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  |  106|  26.7M|#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_' || c >= 128)
  |  |  |  |  ------------------
  |  |  |  |  |  |  102|  26.7M|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (102:25): [True: 315k, False: 13.0M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:49): [True: 391, False: 13.0M]
  |  |  |  |  |  Branch (106:61): [True: 1.07k, False: 13.0M]
  |  |  |  |  |  Branch (106:73): [True: 163k, False: 12.9M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  |  103|  26.2M|#define yxml_isNum(c) (c-'0' < 10)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:23): [True: 9.36k, False: 12.8M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (107:65): [True: 744, False: 12.8M]
  |  |  |  Branch (107:77): [True: 624, False: 12.8M]
  |  |  ------------------
  ------------------
  523|   490k|			return yxml_elemname(x, ch);
  524|  12.8M|		if(yxml_isSP(ch)) {
  ------------------
  |  |  101|  12.8M|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 636, False: 12.8M]
  |  |  |  Branch (101:36): [True: 404, False: 12.8M]
  |  |  |  Branch (101:49): [True: 1.47k, False: 12.8M]
  |  |  ------------------
  ------------------
  525|  2.51k|			x->state = YXMLS_elem1;
  526|  2.51k|			return yxml_elemnameend(x, ch);
  527|  2.51k|		}
  528|  12.8M|		if(ch == (unsigned char)'/') {
  ------------------
  |  Branch (528:6): [True: 12.8M, False: 23.5k]
  ------------------
  529|  12.8M|			x->state = YXMLS_elem3;
  530|  12.8M|			return yxml_elemnameend(x, ch);
  531|  12.8M|		}
  532|  23.5k|		if(ch == (unsigned char)'>') {
  ------------------
  |  Branch (532:6): [True: 23.5k, False: 30]
  ------------------
  533|  23.5k|			x->state = YXMLS_misc2;
  534|  23.5k|			return yxml_elemnameend(x, ch);
  535|  23.5k|		}
  536|     30|		break;
  537|  2.54M|	case YXMLS_elem1:
  ------------------
  |  Branch (537:2): [True: 2.54M, False: 134M]
  ------------------
  538|  2.54M|		if(yxml_isSP(ch))
  ------------------
  |  |  101|  2.54M|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 449k, False: 2.09M]
  |  |  |  Branch (101:36): [True: 1.00k, False: 2.09M]
  |  |  |  Branch (101:49): [True: 106k, False: 1.99M]
  |  |  ------------------
  ------------------
  539|   556k|			return YXML_OK;
  540|  1.99M|		if(ch == (unsigned char)'/') {
  ------------------
  |  Branch (540:6): [True: 947, False: 1.99M]
  ------------------
  541|    947|			x->state = YXMLS_elem3;
  542|    947|			return YXML_OK;
  543|    947|		}
  544|  1.99M|		if(ch == (unsigned char)'>') {
  ------------------
  |  Branch (544:6): [True: 418, False: 1.98M]
  ------------------
  545|    418|			x->state = YXMLS_misc2;
  546|    418|			return YXML_OK;
  547|    418|		}
  548|  1.98M|		if(yxml_isNameStart(ch)) {
  ------------------
  |  |  106|  1.98M|#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_' || c >= 128)
  |  |  ------------------
  |  |  |  |  102|  3.97M|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:25): [True: 803k, False: 1.18M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (106:49): [True: 560, False: 1.18M]
  |  |  |  Branch (106:61): [True: 852, False: 1.18M]
  |  |  |  Branch (106:73): [True: 1.18M, False: 23]
  |  |  ------------------
  ------------------
  549|  1.98M|			x->state = YXMLS_attr0;
  550|  1.98M|			return yxml_attrstart(x, ch);
  551|  1.98M|		}
  552|     23|		break;
  553|  1.98M|	case YXMLS_elem2:
  ------------------
  |  Branch (553:2): [True: 1.98M, False: 135M]
  ------------------
  554|  1.98M|		if(yxml_isSP(ch)) {
  ------------------
  |  |  101|  1.98M|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 412k, False: 1.57M]
  |  |  |  Branch (101:36): [True: 575, False: 1.57M]
  |  |  |  Branch (101:49): [True: 1.57M, False: 606]
  |  |  ------------------
  ------------------
  555|  1.98M|			x->state = YXMLS_elem1;
  556|  1.98M|			return YXML_OK;
  557|  1.98M|		}
  558|    606|		if(ch == (unsigned char)'/') {
  ------------------
  |  Branch (558:6): [True: 375, False: 231]
  ------------------
  559|    375|			x->state = YXMLS_elem3;
  560|    375|			return YXML_OK;
  561|    375|		}
  562|    231|		if(ch == (unsigned char)'>') {
  ------------------
  |  Branch (562:6): [True: 212, False: 19]
  ------------------
  563|    212|			x->state = YXMLS_misc2;
  564|    212|			return YXML_OK;
  565|    212|		}
  566|     19|		break;
  567|  12.8M|	case YXMLS_elem3:
  ------------------
  |  Branch (567:2): [True: 12.8M, False: 124M]
  ------------------
  568|  12.8M|		if(ch == (unsigned char)'>') {
  ------------------
  |  Branch (568:6): [True: 12.8M, False: 10]
  ------------------
  569|  12.8M|			x->state = YXMLS_misc2;
  570|  12.8M|			return yxml_selfclose(x, ch);
  571|  12.8M|		}
  572|     10|		break;
  573|    779|	case YXMLS_enc0:
  ------------------
  |  Branch (573:2): [True: 779, False: 137M]
  ------------------
  574|    779|		if(yxml_isSP(ch))
  ------------------
  |  |  101|    779|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 194, False: 585]
  |  |  |  Branch (101:36): [True: 194, False: 391]
  |  |  |  Branch (101:49): [True: 194, False: 197]
  |  |  ------------------
  ------------------
  575|    582|			return YXML_OK;
  576|    197|		if(ch == (unsigned char)'=') {
  ------------------
  |  Branch (576:6): [True: 190, False: 7]
  ------------------
  577|    190|			x->state = YXMLS_enc1;
  578|    190|			return YXML_OK;
  579|    190|		}
  580|      7|		break;
  581|    747|	case YXMLS_enc1:
  ------------------
  |  Branch (581:2): [True: 747, False: 137M]
  ------------------
  582|    747|		if(yxml_isSP(ch))
  ------------------
  |  |  101|    747|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 194, False: 553]
  |  |  |  Branch (101:36): [True: 194, False: 359]
  |  |  |  Branch (101:49): [True: 194, False: 165]
  |  |  ------------------
  ------------------
  583|    582|			return YXML_OK;
  584|    165|		if(ch == (unsigned char)'\'' || ch == (unsigned char)'"') {
  ------------------
  |  Branch (584:6): [True: 53, False: 112]
  |  Branch (584:35): [True: 97, False: 15]
  ------------------
  585|    150|			x->state = YXMLS_enc2;
  586|    150|			x->quote = ch;
  587|    150|			return YXML_OK;
  588|    150|		}
  589|     15|		break;
  590|    148|	case YXMLS_enc2:
  ------------------
  |  Branch (590:2): [True: 148, False: 137M]
  ------------------
  591|    148|		if(yxml_isAlpha(ch)) {
  ------------------
  |  |  102|    148|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  ------------------
  |  |  |  Branch (102:25): [True: 139, False: 9]
  |  |  ------------------
  ------------------
  592|    139|			x->state = YXMLS_enc3;
  593|    139|			return YXML_OK;
  594|    139|		}
  595|      9|		break;
  596|  1.07k|	case YXMLS_enc3:
  ------------------
  |  Branch (596:2): [True: 1.07k, False: 137M]
  ------------------
  597|  1.07k|		if(yxml_isEncName(ch))
  ------------------
  |  |  105|  1.07k|#define yxml_isEncName(c) (yxml_isAlpha(c) || yxml_isNum(c) || c == '.' || c == '_' || c == '-')
  |  |  ------------------
  |  |  |  |  102|  2.15k|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:25): [True: 201, False: 878]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define yxml_isEncName(c) (yxml_isAlpha(c) || yxml_isNum(c) || c == '.' || c == '_' || c == '-')
  |  |  ------------------
  |  |  |  |  103|  1.95k|#define yxml_isNum(c) (c-'0' < 10)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:23): [True: 196, False: 682]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:64): [True: 198, False: 484]
  |  |  |  Branch (105:76): [True: 194, False: 290]
  |  |  |  Branch (105:88): [True: 197, False: 93]
  |  |  ------------------
  ------------------
  598|    986|			return YXML_OK;
  599|     93|		if(x->quote == ch) {
  ------------------
  |  Branch (599:6): [True: 76, False: 17]
  ------------------
  600|     76|			x->state = YXMLS_xmldecl6;
  601|     76|			return YXML_OK;
  602|     76|		}
  603|     17|		break;
  604|  22.2k|	case YXMLS_etag0:
  ------------------
  |  Branch (604:2): [True: 22.2k, False: 137M]
  ------------------
  605|  22.2k|		if(yxml_isNameStart(ch)) {
  ------------------
  |  |  106|  22.2k|#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_' || c >= 128)
  |  |  ------------------
  |  |  |  |  102|  44.4k|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:25): [True: 12.7k, False: 9.48k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (106:49): [True: 316, False: 9.16k]
  |  |  |  Branch (106:61): [True: 346, False: 8.82k]
  |  |  |  Branch (106:73): [True: 8.80k, False: 16]
  |  |  ------------------
  ------------------
  606|  22.1k|			x->state = YXMLS_etag1;
  607|  22.1k|			return yxml_elemclose(x, ch);
  608|  22.1k|		}
  609|     16|		break;
  610|  83.0k|	case YXMLS_etag1:
  ------------------
  |  Branch (610:2): [True: 83.0k, False: 137M]
  ------------------
  611|  83.0k|		if(yxml_isName(ch))
  ------------------
  |  |  107|  83.0k|#define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  |  106|   166k|#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_' || c >= 128)
  |  |  |  |  ------------------
  |  |  |  |  |  |  102|   166k|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (102:25): [True: 54.9k, False: 28.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:49): [True: 197, False: 27.9k]
  |  |  |  |  |  Branch (106:61): [True: 311, False: 27.6k]
  |  |  |  |  |  Branch (106:73): [True: 345, False: 27.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  |  103|   110k|#define yxml_isNum(c) (c-'0' < 10)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:23): [True: 4.71k, False: 22.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (107:65): [True: 326, False: 22.2k]
  |  |  |  Branch (107:77): [True: 194, False: 22.0k]
  |  |  ------------------
  ------------------
  612|  60.9k|			return yxml_elemclose(x, ch);
  613|  22.0k|		if(yxml_isSP(ch)) {
  ------------------
  |  |  101|  22.0k|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 271, False: 21.8k]
  |  |  |  Branch (101:36): [True: 210, False: 21.6k]
  |  |  |  Branch (101:49): [True: 241, False: 21.3k]
  |  |  ------------------
  ------------------
  614|    722|			x->state = YXMLS_etag2;
  615|    722|			return yxml_elemcloseend(x, ch);
  616|    722|		}
  617|  21.3k|		if(ch == (unsigned char)'>') {
  ------------------
  |  Branch (617:6): [True: 21.3k, False: 20]
  ------------------
  618|  21.3k|			x->state = YXMLS_misc2;
  619|  21.3k|			return yxml_elemcloseend(x, ch);
  620|  21.3k|		}
  621|     20|		break;
  622|  1.26k|	case YXMLS_etag2:
  ------------------
  |  Branch (622:2): [True: 1.26k, False: 137M]
  ------------------
  623|  1.26k|		if(yxml_isSP(ch))
  ------------------
  |  |  101|  1.26k|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 194, False: 1.06k]
  |  |  |  Branch (101:36): [True: 194, False: 874]
  |  |  |  Branch (101:49): [True: 194, False: 680]
  |  |  ------------------
  ------------------
  624|    582|			return YXML_OK;
  625|    680|		if(ch == (unsigned char)'>') {
  ------------------
  |  Branch (625:6): [True: 662, False: 18]
  ------------------
  626|    662|			x->state = YXMLS_misc2;
  627|    662|			return YXML_OK;
  628|    662|		}
  629|     18|		break;
  630|  8.80k|	case YXMLS_init:
  ------------------
  |  Branch (630:2): [True: 8.80k, False: 137M]
  ------------------
  631|  8.80k|		if(ch == (unsigned char)'\xef') {
  ------------------
  |  Branch (631:6): [True: 17, False: 8.78k]
  ------------------
  632|     17|			x->state = YXMLS_string;
  633|     17|			x->nextstate = YXMLS_misc0;
  634|     17|			x->string = (unsigned char *)"\xbb\xbf";
  635|     17|			return YXML_OK;
  636|     17|		}
  637|  8.78k|		if(yxml_isSP(ch)) {
  ------------------
  |  |  101|  8.78k|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 44, False: 8.74k]
  |  |  |  Branch (101:36): [True: 29, False: 8.71k]
  |  |  |  Branch (101:49): [True: 50, False: 8.66k]
  |  |  ------------------
  ------------------
  638|    123|			x->state = YXMLS_misc0;
  639|    123|			return YXML_OK;
  640|    123|		}
  641|  8.66k|		if(ch == (unsigned char)'<') {
  ------------------
  |  Branch (641:6): [True: 8.63k, False: 30]
  ------------------
  642|  8.63k|			x->state = YXMLS_le0;
  643|  8.63k|			return YXML_OK;
  644|  8.63k|		}
  645|     30|		break;
  646|  8.68k|	case YXMLS_le0:
  ------------------
  |  Branch (646:2): [True: 8.68k, False: 137M]
  ------------------
  647|  8.68k|		if(ch == (unsigned char)'!') {
  ------------------
  |  Branch (647:6): [True: 291, False: 8.39k]
  ------------------
  648|    291|			x->state = YXMLS_lee1;
  649|    291|			return YXML_OK;
  650|    291|		}
  651|  8.39k|		if(ch == (unsigned char)'?') {
  ------------------
  |  Branch (651:6): [True: 1.23k, False: 7.16k]
  ------------------
  652|  1.23k|			x->state = YXMLS_leq0;
  653|  1.23k|			return YXML_OK;
  654|  1.23k|		}
  655|  7.16k|		if(yxml_isNameStart(ch)) {
  ------------------
  |  |  106|  7.16k|#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_' || c >= 128)
  |  |  ------------------
  |  |  |  |  102|  14.3k|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:25): [True: 2.24k, False: 4.92k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (106:49): [True: 100, False: 4.82k]
  |  |  |  Branch (106:61): [True: 86, False: 4.73k]
  |  |  |  Branch (106:73): [True: 4.71k, False: 23]
  |  |  ------------------
  ------------------
  656|  7.13k|			x->state = YXMLS_elem0;
  657|  7.13k|			return yxml_elemstart(x, ch);
  658|  7.13k|		}
  659|     23|		break;
  660|  2.42k|	case YXMLS_le1:
  ------------------
  |  Branch (660:2): [True: 2.42k, False: 137M]
  ------------------
  661|  2.42k|		if(ch == (unsigned char)'!') {
  ------------------
  |  Branch (661:6): [True: 764, False: 1.66k]
  ------------------
  662|    764|			x->state = YXMLS_lee1;
  663|    764|			return YXML_OK;
  664|    764|		}
  665|  1.66k|		if(ch == (unsigned char)'?') {
  ------------------
  |  Branch (665:6): [True: 1.45k, False: 207]
  ------------------
  666|  1.45k|			x->state = YXMLS_pi0;
  667|  1.45k|			x->nextstate = YXMLS_misc1;
  668|  1.45k|			return YXML_OK;
  669|  1.45k|		}
  670|    207|		if(yxml_isNameStart(ch)) {
  ------------------
  |  |  106|    207|#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_' || c >= 128)
  |  |  ------------------
  |  |  |  |  102|    414|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:25): [True: 11, False: 196]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (106:49): [True: 3, False: 193]
  |  |  |  Branch (106:61): [True: 31, False: 162]
  |  |  |  Branch (106:73): [True: 148, False: 14]
  |  |  ------------------
  ------------------
  671|    193|			x->state = YXMLS_elem0;
  672|    193|			return yxml_elemstart(x, ch);
  673|    193|		}
  674|     14|		break;
  675|  12.9M|	case YXMLS_le2:
  ------------------
  |  Branch (675:2): [True: 12.9M, False: 124M]
  ------------------
  676|  12.9M|		if(ch == (unsigned char)'!') {
  ------------------
  |  Branch (676:6): [True: 652, False: 12.9M]
  ------------------
  677|    652|			x->state = YXMLS_lee2;
  678|    652|			return YXML_OK;
  679|    652|		}
  680|  12.9M|		if(ch == (unsigned char)'?') {
  ------------------
  |  Branch (680:6): [True: 1.44k, False: 12.9M]
  ------------------
  681|  1.44k|			x->state = YXMLS_pi0;
  682|  1.44k|			x->nextstate = YXMLS_misc2;
  683|  1.44k|			return YXML_OK;
  684|  1.44k|		}
  685|  12.9M|		if(ch == (unsigned char)'/') {
  ------------------
  |  Branch (685:6): [True: 22.2k, False: 12.8M]
  ------------------
  686|  22.2k|			x->state = YXMLS_etag0;
  687|  22.2k|			return YXML_OK;
  688|  22.2k|		}
  689|  12.8M|		if(yxml_isNameStart(ch)) {
  ------------------
  |  |  106|  12.8M|#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_' || c >= 128)
  |  |  ------------------
  |  |  |  |  102|  25.7M|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:25): [True: 36.7k, False: 12.8M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (106:49): [True: 550, False: 12.8M]
  |  |  |  Branch (106:61): [True: 810, False: 12.8M]
  |  |  |  Branch (106:73): [True: 12.8M, False: 22]
  |  |  ------------------
  ------------------
  690|  12.8M|			x->state = YXMLS_elem0;
  691|  12.8M|			return yxml_elemstart(x, ch);
  692|  12.8M|		}
  693|     22|		break;
  694|    627|	case YXMLS_le3:
  ------------------
  |  Branch (694:2): [True: 627, False: 137M]
  ------------------
  695|    627|		if(ch == (unsigned char)'!') {
  ------------------
  |  Branch (695:6): [True: 222, False: 405]
  ------------------
  696|    222|			x->state = YXMLS_comment0;
  697|    222|			x->nextstate = YXMLS_misc3;
  698|    222|			return YXML_OK;
  699|    222|		}
  700|    405|		if(ch == (unsigned char)'?') {
  ------------------
  |  Branch (700:6): [True: 388, False: 17]
  ------------------
  701|    388|			x->state = YXMLS_pi0;
  702|    388|			x->nextstate = YXMLS_misc3;
  703|    388|			return YXML_OK;
  704|    388|		}
  705|     17|		break;
  706|  1.04k|	case YXMLS_lee1:
  ------------------
  |  Branch (706:2): [True: 1.04k, False: 137M]
  ------------------
  707|  1.04k|		if(ch == (unsigned char)'-') {
  ------------------
  |  Branch (707:6): [True: 517, False: 530]
  ------------------
  708|    517|			x->state = YXMLS_comment1;
  709|    517|			x->nextstate = YXMLS_misc1;
  710|    517|			return YXML_OK;
  711|    517|		}
  712|    530|		if(ch == (unsigned char)'D') {
  ------------------
  |  Branch (712:6): [True: 516, False: 14]
  ------------------
  713|    516|			x->state = YXMLS_string;
  714|    516|			x->nextstate = YXMLS_dt0;
  715|    516|			x->string = (unsigned char *)"OCTYPE";
  716|    516|			return YXML_OK;
  717|    516|		}
  718|     14|		break;
  719|    647|	case YXMLS_lee2:
  ------------------
  |  Branch (719:2): [True: 647, False: 137M]
  ------------------
  720|    647|		if(ch == (unsigned char)'-') {
  ------------------
  |  Branch (720:6): [True: 327, False: 320]
  ------------------
  721|    327|			x->state = YXMLS_comment1;
  722|    327|			x->nextstate = YXMLS_misc2;
  723|    327|			return YXML_OK;
  724|    327|		}
  725|    320|		if(ch == (unsigned char)'[') {
  ------------------
  |  Branch (725:6): [True: 306, False: 14]
  ------------------
  726|    306|			x->state = YXMLS_string;
  727|    306|			x->nextstate = YXMLS_cd0;
  728|    306|			x->string = (unsigned char *)"CDATA[";
  729|    306|			return YXML_OK;
  730|    306|		}
  731|     14|		break;
  732|  1.23k|	case YXMLS_leq0:
  ------------------
  |  Branch (732:2): [True: 1.23k, False: 137M]
  ------------------
  733|  1.23k|		if(ch == (unsigned char)'x') {
  ------------------
  |  Branch (733:6): [True: 900, False: 335]
  ------------------
  734|    900|			x->state = YXMLS_xmldecl0;
  735|    900|			x->nextstate = YXMLS_misc1;
  736|    900|			return yxml_pistart(x, ch);
  737|    900|		}
  738|    335|		if(yxml_isNameStart(ch)) {
  ------------------
  |  |  106|    335|#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_' || c >= 128)
  |  |  ------------------
  |  |  |  |  102|    670|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:25): [True: 150, False: 185]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (106:49): [True: 22, False: 163]
  |  |  |  Branch (106:61): [True: 19, False: 144]
  |  |  |  Branch (106:73): [True: 126, False: 18]
  |  |  ------------------
  ------------------
  739|    317|			x->state = YXMLS_pi1;
  740|    317|			x->nextstate = YXMLS_misc1;
  741|    317|			return yxml_pistart(x, ch);
  742|    317|		}
  743|     18|		break;
  744|  1.24k|	case YXMLS_misc0:
  ------------------
  |  Branch (744:2): [True: 1.24k, False: 137M]
  ------------------
  745|  1.24k|		if(yxml_isSP(ch))
  ------------------
  |  |  101|  1.24k|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 194, False: 1.05k]
  |  |  |  Branch (101:36): [True: 197, False: 857]
  |  |  |  Branch (101:49): [True: 778, False: 79]
  |  |  ------------------
  ------------------
  746|  1.16k|			return YXML_OK;
  747|     79|		if(ch == (unsigned char)'<') {
  ------------------
  |  Branch (747:6): [True: 57, False: 22]
  ------------------
  748|     57|			x->state = YXMLS_le0;
  749|     57|			return YXML_OK;
  750|     57|		}
  751|     22|		break;
  752|  3.04k|	case YXMLS_misc1:
  ------------------
  |  Branch (752:2): [True: 3.04k, False: 137M]
  ------------------
  753|  3.04k|		if(yxml_isSP(ch))
  ------------------
  |  |  101|  3.04k|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 194, False: 2.84k]
  |  |  |  Branch (101:36): [True: 194, False: 2.65k]
  |  |  |  Branch (101:49): [True: 209, False: 2.44k]
  |  |  ------------------
  ------------------
  754|    597|			return YXML_OK;
  755|  2.44k|		if(ch == (unsigned char)'<') {
  ------------------
  |  Branch (755:6): [True: 2.43k, False: 11]
  ------------------
  756|  2.43k|			x->state = YXMLS_le1;
  757|  2.43k|			return YXML_OK;
  758|  2.43k|		}
  759|     11|		break;
  760|  50.4M|	case YXMLS_misc2:
  ------------------
  |  Branch (760:2): [True: 50.4M, False: 86.7M]
  ------------------
  761|  50.4M|		if(ch == (unsigned char)'<') {
  ------------------
  |  Branch (761:6): [True: 12.9M, False: 37.5M]
  ------------------
  762|  12.9M|			x->state = YXMLS_le2;
  763|  12.9M|			return YXML_OK;
  764|  12.9M|		}
  765|  37.5M|		if(ch == (unsigned char)'&') {
  ------------------
  |  Branch (765:6): [True: 2.51k, False: 37.5M]
  ------------------
  766|  2.51k|			x->state = YXMLS_misc2a;
  767|  2.51k|			return yxml_refstart(x, ch);
  768|  2.51k|		}
  769|  37.5M|		if(yxml_isChar(ch))
  ------------------
  |  |   99|  37.5M|#define yxml_isChar(c) 1
  |  |  ------------------
  |  |  |  Branch (99:24): [True: 37.5M, Folded]
  |  |  ------------------
  ------------------
  770|  37.5M|			return yxml_datacontent(x, ch);
  771|      0|		break;
  772|  11.3k|	case YXMLS_misc2a:
  ------------------
  |  Branch (772:2): [True: 11.3k, False: 137M]
  ------------------
  773|  11.3k|		if(yxml_isRef(ch))
  ------------------
  |  |  113|  11.3k|#define yxml_isRef(c) (yxml_isNum(c) || yxml_isAlpha(c) || c == '#')
  |  |  ------------------
  |  |  |  |  103|  22.6k|#define yxml_isNum(c) (c-'0' < 10)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:23): [True: 3.02k, False: 8.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define yxml_isRef(c) (yxml_isNum(c) || yxml_isAlpha(c) || c == '#')
  |  |  ------------------
  |  |  |  |  102|  19.5k|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:25): [True: 4.24k, False: 4.03k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (113:60): [True: 1.56k, False: 2.47k]
  |  |  ------------------
  ------------------
  774|  8.83k|			return yxml_ref(x, ch);
  775|  2.47k|		if(ch == (unsigned char)'\x3b') {
  ------------------
  |  Branch (775:6): [True: 2.45k, False: 17]
  ------------------
  776|  2.45k|			x->state = YXMLS_misc2;
  777|  2.45k|			return yxml_refcontent(x, ch);
  778|  2.45k|		}
  779|     17|		break;
  780|  1.24k|	case YXMLS_misc3:
  ------------------
  |  Branch (780:2): [True: 1.24k, False: 137M]
  ------------------
  781|  1.24k|		if(yxml_isSP(ch))
  ------------------
  |  |  101|  1.24k|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 195, False: 1.04k]
  |  |  |  Branch (101:36): [True: 194, False: 851]
  |  |  |  Branch (101:49): [True: 196, False: 655]
  |  |  ------------------
  ------------------
  782|    585|			return YXML_OK;
  783|    655|		if(ch == (unsigned char)'<') {
  ------------------
  |  Branch (783:6): [True: 633, False: 22]
  ------------------
  784|    633|			x->state = YXMLS_le3;
  785|    633|			return YXML_OK;
  786|    633|		}
  787|     22|		break;
  788|  3.45k|	case YXMLS_pi0:
  ------------------
  |  Branch (788:2): [True: 3.45k, False: 137M]
  ------------------
  789|  3.45k|		if(yxml_isNameStart(ch)) {
  ------------------
  |  |  106|  3.45k|#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_' || c >= 128)
  |  |  ------------------
  |  |  |  |  102|  6.90k|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:25): [True: 1.81k, False: 1.63k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (106:49): [True: 669, False: 967]
  |  |  |  Branch (106:61): [True: 416, False: 551]
  |  |  |  Branch (106:73): [True: 537, False: 14]
  |  |  ------------------
  ------------------
  790|  3.43k|			x->state = YXMLS_pi1;
  791|  3.43k|			return yxml_pistart(x, ch);
  792|  3.43k|		}
  793|     14|		break;
  794|  9.08k|	case YXMLS_pi1:
  ------------------
  |  Branch (794:2): [True: 9.08k, False: 137M]
  ------------------
  795|  9.08k|		if(yxml_isName(ch))
  ------------------
  |  |  107|  9.08k|#define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  |  106|  18.1k|#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_' || c >= 128)
  |  |  |  |  ------------------
  |  |  |  |  |  |  102|  18.1k|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (102:25): [True: 2.34k, False: 6.74k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:49): [True: 198, False: 6.54k]
  |  |  |  |  |  Branch (106:61): [True: 202, False: 6.34k]
  |  |  |  |  |  Branch (106:73): [True: 1.84k, False: 4.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  |  103|  13.5k|#define yxml_isNum(c) (c-'0' < 10)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:23): [True: 319, False: 4.17k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (107:65): [True: 196, False: 3.98k]
  |  |  |  Branch (107:77): [True: 206, False: 3.77k]
  |  |  ------------------
  ------------------
  796|  5.31k|			return yxml_piname(x, ch);
  797|  3.77k|		if(ch == (unsigned char)'?') {
  ------------------
  |  Branch (797:6): [True: 2.35k, False: 1.41k]
  ------------------
  798|  2.35k|			x->state = YXMLS_pi4;
  799|  2.35k|			return yxml_pinameend(x, ch);
  800|  2.35k|		}
  801|  1.41k|		if(yxml_isSP(ch)) {
  ------------------
  |  |  101|  1.41k|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 474, False: 945]
  |  |  |  Branch (101:36): [True: 291, False: 654]
  |  |  |  Branch (101:49): [True: 627, False: 27]
  |  |  ------------------
  ------------------
  802|  1.39k|			x->state = YXMLS_pi2;
  803|  1.39k|			return yxml_pinameend(x, ch);
  804|  1.39k|		}
  805|     27|		break;
  806|   794k|	case YXMLS_pi2:
  ------------------
  |  Branch (806:2): [True: 794k, False: 136M]
  ------------------
  807|   794k|		if(ch == (unsigned char)'?') {
  ------------------
  |  Branch (807:6): [True: 1.74k, False: 792k]
  ------------------
  808|  1.74k|			x->state = YXMLS_pi3;
  809|  1.74k|			return YXML_OK;
  810|  1.74k|		}
  811|   792k|		if(yxml_isChar(ch))
  ------------------
  |  |   99|   792k|#define yxml_isChar(c) 1
  |  |  ------------------
  |  |  |  Branch (99:24): [True: 792k, Folded]
  |  |  ------------------
  ------------------
  812|   792k|			return yxml_datapi1(x, ch);
  813|      0|		break;
  814|  1.73k|	case YXMLS_pi3:
  ------------------
  |  Branch (814:2): [True: 1.73k, False: 137M]
  ------------------
  815|  1.73k|		if(ch == (unsigned char)'>') {
  ------------------
  |  Branch (815:6): [True: 1.33k, False: 403]
  ------------------
  816|  1.33k|			x->state = x->nextstate;
  817|  1.33k|			return yxml_pivalend(x, ch);
  818|  1.33k|		}
  819|    403|		if(yxml_isChar(ch)) {
  ------------------
  |  |   99|    403|#define yxml_isChar(c) 1
  |  |  ------------------
  |  |  |  Branch (99:24): [True: 403, Folded]
  |  |  ------------------
  ------------------
  820|    403|			x->state = YXMLS_pi2;
  821|    403|			return yxml_datapi2(x, ch);
  822|    403|		}
  823|      0|		break;
  824|  2.32k|	case YXMLS_pi4:
  ------------------
  |  Branch (824:2): [True: 2.32k, False: 137M]
  ------------------
  825|  2.32k|		if(ch == (unsigned char)'>') {
  ------------------
  |  Branch (825:6): [True: 2.31k, False: 10]
  ------------------
  826|  2.31k|			x->state = x->nextstate;
  827|  2.31k|			return yxml_pivalend(x, ch);
  828|  2.31k|		}
  829|     10|		break;
  830|    700|	case YXMLS_std0:
  ------------------
  |  Branch (830:2): [True: 700, False: 137M]
  ------------------
  831|    700|		if(yxml_isSP(ch))
  ------------------
  |  |  101|    700|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 194, False: 506]
  |  |  |  Branch (101:36): [True: 194, False: 312]
  |  |  |  Branch (101:49): [True: 194, False: 118]
  |  |  ------------------
  ------------------
  832|    582|			return YXML_OK;
  833|    118|		if(ch == (unsigned char)'=') {
  ------------------
  |  Branch (833:6): [True: 105, False: 13]
  ------------------
  834|    105|			x->state = YXMLS_std1;
  835|    105|			return YXML_OK;
  836|    105|		}
  837|     13|		break;
  838|    666|	case YXMLS_std1:
  ------------------
  |  Branch (838:2): [True: 666, False: 137M]
  ------------------
  839|    666|		if(yxml_isSP(ch))
  ------------------
  |  |  101|    666|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 194, False: 472]
  |  |  |  Branch (101:36): [True: 195, False: 277]
  |  |  |  Branch (101:49): [True: 197, False: 80]
  |  |  ------------------
  ------------------
  840|    586|			return YXML_OK;
  841|     80|		if(ch == (unsigned char)'\'' || ch == (unsigned char)'"') {
  ------------------
  |  Branch (841:6): [True: 19, False: 61]
  |  Branch (841:35): [True: 45, False: 16]
  ------------------
  842|     64|			x->state = YXMLS_std2;
  843|     64|			x->quote = ch;
  844|     64|			return YXML_OK;
  845|     64|		}
  846|     16|		break;
  847|     62|	case YXMLS_std2:
  ------------------
  |  Branch (847:2): [True: 62, False: 137M]
  ------------------
  848|     62|		if(ch == (unsigned char)'y') {
  ------------------
  |  Branch (848:6): [True: 3, False: 59]
  ------------------
  849|      3|			x->state = YXMLS_string;
  850|      3|			x->nextstate = YXMLS_std3;
  851|      3|			x->string = (unsigned char *)"es";
  852|      3|			return YXML_OK;
  853|      3|		}
  854|     59|		if(ch == (unsigned char)'n') {
  ------------------
  |  Branch (854:6): [True: 47, False: 12]
  ------------------
  855|     47|			x->state = YXMLS_string;
  856|     47|			x->nextstate = YXMLS_std3;
  857|     47|			x->string = (unsigned char *)"o";
  858|     47|			return YXML_OK;
  859|     47|		}
  860|     12|		break;
  861|     47|	case YXMLS_std3:
  ------------------
  |  Branch (861:2): [True: 47, False: 137M]
  ------------------
  862|     47|		if(x->quote == ch) {
  ------------------
  |  Branch (862:6): [True: 46, False: 1]
  ------------------
  863|     46|			x->state = YXMLS_xmldecl8;
  864|     46|			return YXML_OK;
  865|     46|		}
  866|      1|		break;
  867|  1.09k|	case YXMLS_ver0:
  ------------------
  |  Branch (867:2): [True: 1.09k, False: 137M]
  ------------------
  868|  1.09k|		if(yxml_isSP(ch))
  ------------------
  |  |  101|  1.09k|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 195, False: 903]
  |  |  |  Branch (101:36): [True: 194, False: 709]
  |  |  |  Branch (101:49): [True: 194, False: 515]
  |  |  ------------------
  ------------------
  869|    583|			return YXML_OK;
  870|    515|		if(ch == (unsigned char)'=') {
  ------------------
  |  Branch (870:6): [True: 508, False: 7]
  ------------------
  871|    508|			x->state = YXMLS_ver1;
  872|    508|			return YXML_OK;
  873|    508|		}
  874|      7|		break;
  875|  1.06k|	case YXMLS_ver1:
  ------------------
  |  Branch (875:2): [True: 1.06k, False: 137M]
  ------------------
  876|  1.06k|		if(yxml_isSP(ch))
  ------------------
  |  |  101|  1.06k|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 196, False: 871]
  |  |  |  Branch (101:36): [True: 194, False: 677]
  |  |  |  Branch (101:49): [True: 194, False: 483]
  |  |  ------------------
  ------------------
  877|    584|			return YXML_OK;
  878|    483|		if(ch == (unsigned char)'\'' || ch == (unsigned char)'"') {
  ------------------
  |  Branch (878:6): [True: 4, False: 479]
  |  Branch (878:35): [True: 463, False: 16]
  ------------------
  879|    467|			x->state = YXMLS_string;
  880|    467|			x->quote = ch;
  881|    467|			x->nextstate = YXMLS_ver2;
  882|    467|			x->string = (unsigned char *)"1.";
  883|    467|			return YXML_OK;
  884|    467|		}
  885|     16|		break;
  886|    464|	case YXMLS_ver2:
  ------------------
  |  Branch (886:2): [True: 464, False: 137M]
  ------------------
  887|    464|		if(yxml_isNum(ch)) {
  ------------------
  |  |  103|    464|#define yxml_isNum(c) (c-'0' < 10)
  |  |  ------------------
  |  |  |  Branch (103:23): [True: 458, False: 6]
  |  |  ------------------
  ------------------
  888|    458|			x->state = YXMLS_ver3;
  889|    458|			return YXML_OK;
  890|    458|		}
  891|      6|		break;
  892|    643|	case YXMLS_ver3:
  ------------------
  |  Branch (892:2): [True: 643, False: 137M]
  ------------------
  893|    643|		if(yxml_isNum(ch))
  ------------------
  |  |  103|    643|#define yxml_isNum(c) (c-'0' < 10)
  |  |  ------------------
  |  |  |  Branch (103:23): [True: 194, False: 449]
  |  |  ------------------
  ------------------
  894|    194|			return YXML_OK;
  895|    449|		if(x->quote == ch) {
  ------------------
  |  Branch (895:6): [True: 439, False: 10]
  ------------------
  896|    439|			x->state = YXMLS_xmldecl4;
  897|    439|			return YXML_OK;
  898|    439|		}
  899|     10|		break;
  900|    899|	case YXMLS_xmldecl0:
  ------------------
  |  Branch (900:2): [True: 899, False: 137M]
  ------------------
  901|    899|		if(ch == (unsigned char)'m') {
  ------------------
  |  Branch (901:6): [True: 788, False: 111]
  ------------------
  902|    788|			x->state = YXMLS_xmldecl1;
  903|    788|			return yxml_piname(x, ch);
  904|    788|		}
  905|    111|		if(yxml_isName(ch)) {
  ------------------
  |  |  107|    111|#define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  |  106|    222|#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_' || c >= 128)
  |  |  |  |  ------------------
  |  |  |  |  |  |  102|    222|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (102:25): [True: 23, False: 88]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:49): [True: 4, False: 84]
  |  |  |  |  |  Branch (106:61): [True: 3, False: 81]
  |  |  |  |  |  Branch (106:73): [True: 14, False: 67]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  |  103|    178|#define yxml_isNum(c) (c-'0' < 10)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:23): [True: 5, False: 62]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (107:65): [True: 3, False: 59]
  |  |  |  Branch (107:77): [True: 3, False: 56]
  |  |  ------------------
  ------------------
  906|     55|			x->state = YXMLS_pi1;
  907|     55|			return yxml_piname(x, ch);
  908|     55|		}
  909|     56|		if(ch == (unsigned char)'?') {
  ------------------
  |  Branch (909:6): [True: 13, False: 43]
  ------------------
  910|     13|			x->state = YXMLS_pi4;
  911|     13|			return yxml_pinameend(x, ch);
  912|     13|		}
  913|     43|		if(yxml_isSP(ch)) {
  ------------------
  |  |  101|     43|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 10, False: 33]
  |  |  |  Branch (101:36): [True: 3, False: 30]
  |  |  |  Branch (101:49): [True: 6, False: 24]
  |  |  ------------------
  ------------------
  914|     19|			x->state = YXMLS_pi2;
  915|     19|			return yxml_pinameend(x, ch);
  916|     19|		}
  917|     24|		break;
  918|    787|	case YXMLS_xmldecl1:
  ------------------
  |  Branch (918:2): [True: 787, False: 137M]
  ------------------
  919|    787|		if(ch == (unsigned char)'l') {
  ------------------
  |  Branch (919:6): [True: 709, False: 78]
  ------------------
  920|    709|			x->state = YXMLS_xmldecl2;
  921|    709|			return yxml_piname(x, ch);
  922|    709|		}
  923|     78|		if(yxml_isName(ch)) {
  ------------------
  |  |  107|     78|#define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  |  106|    156|#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_' || c >= 128)
  |  |  |  |  ------------------
  |  |  |  |  |  |  102|    156|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (102:25): [True: 11, False: 67]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:49): [True: 4, False: 63]
  |  |  |  |  |  Branch (106:61): [True: 3, False: 60]
  |  |  |  |  |  Branch (106:73): [True: 11, False: 49]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  |  103|    127|#define yxml_isNum(c) (c-'0' < 10)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:23): [True: 5, False: 44]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (107:65): [True: 4, False: 40]
  |  |  |  Branch (107:77): [True: 3, False: 37]
  |  |  ------------------
  ------------------
  924|     41|			x->state = YXMLS_pi1;
  925|     41|			return yxml_piname(x, ch);
  926|     41|		}
  927|     37|		if(ch == (unsigned char)'?') {
  ------------------
  |  Branch (927:6): [True: 3, False: 34]
  ------------------
  928|      3|			x->state = YXMLS_pi4;
  929|      3|			return yxml_pinameend(x, ch);
  930|      3|		}
  931|     34|		if(yxml_isSP(ch)) {
  ------------------
  |  |  101|     34|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 4, False: 30]
  |  |  |  Branch (101:36): [True: 3, False: 27]
  |  |  |  Branch (101:49): [True: 4, False: 23]
  |  |  ------------------
  ------------------
  932|     11|			x->state = YXMLS_pi2;
  933|     11|			return yxml_pinameend(x, ch);
  934|     11|		}
  935|     23|		break;
  936|    708|	case YXMLS_xmldecl2:
  ------------------
  |  Branch (936:2): [True: 708, False: 137M]
  ------------------
  937|    708|		if(yxml_isSP(ch)) {
  ------------------
  |  |  101|    708|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 561, False: 147]
  |  |  |  Branch (101:36): [True: 11, False: 136]
  |  |  |  Branch (101:49): [True: 12, False: 124]
  |  |  ------------------
  ------------------
  938|    584|			x->state = YXMLS_xmldecl3;
  939|    584|			return yxml_piabort(x, ch);
  940|    584|		}
  941|    124|		if(yxml_isName(ch)) {
  ------------------
  |  |  107|    124|#define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  |  106|    248|#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_' || c >= 128)
  |  |  |  |  ------------------
  |  |  |  |  |  |  102|    248|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (102:25): [True: 8, False: 116]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:49): [True: 4, False: 112]
  |  |  |  |  |  Branch (106:61): [True: 3, False: 109]
  |  |  |  |  |  Branch (106:73): [True: 75, False: 34]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  |  103|    158|#define yxml_isNum(c) (c-'0' < 10)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:23): [True: 8, False: 26]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (107:65): [True: 3, False: 23]
  |  |  |  Branch (107:77): [True: 3, False: 20]
  |  |  ------------------
  ------------------
  942|    104|			x->state = YXMLS_pi1;
  943|    104|			return yxml_piname(x, ch);
  944|    104|		}
  945|     20|		break;
  946|  1.13k|	case YXMLS_xmldecl3:
  ------------------
  |  Branch (946:2): [True: 1.13k, False: 137M]
  ------------------
  947|  1.13k|		if(yxml_isSP(ch))
  ------------------
  |  |  101|  1.13k|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 194, False: 945]
  |  |  |  Branch (101:36): [True: 194, False: 751]
  |  |  |  Branch (101:49): [True: 194, False: 557]
  |  |  ------------------
  ------------------
  948|    582|			return YXML_OK;
  949|    557|		if(ch == (unsigned char)'v') {
  ------------------
  |  Branch (949:6): [True: 542, False: 15]
  ------------------
  950|    542|			x->state = YXMLS_string;
  951|    542|			x->nextstate = YXMLS_ver0;
  952|    542|			x->string = (unsigned char *)"ersion";
  953|    542|			return YXML_OK;
  954|    542|		}
  955|     15|		break;
  956|    438|	case YXMLS_xmldecl4:
  ------------------
  |  Branch (956:2): [True: 438, False: 137M]
  ------------------
  957|    438|		if(yxml_isSP(ch)) {
  ------------------
  |  |  101|    438|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 345, False: 93]
  |  |  |  Branch (101:36): [True: 11, False: 82]
  |  |  |  Branch (101:49): [True: 50, False: 32]
  |  |  ------------------
  ------------------
  958|    406|			x->state = YXMLS_xmldecl5;
  959|    406|			return YXML_OK;
  960|    406|		}
  961|     32|		if(ch == (unsigned char)'?') {
  ------------------
  |  Branch (961:6): [True: 18, False: 14]
  ------------------
  962|     18|			x->state = YXMLS_xmldecl9;
  963|     18|			return YXML_OK;
  964|     18|		}
  965|     14|		break;
  966|    961|	case YXMLS_xmldecl5:
  ------------------
  |  Branch (966:2): [True: 961, False: 137M]
  ------------------
  967|    961|		if(yxml_isSP(ch))
  ------------------
  |  |  101|    961|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 194, False: 767]
  |  |  |  Branch (101:36): [True: 194, False: 573]
  |  |  |  Branch (101:49): [True: 194, False: 379]
  |  |  ------------------
  ------------------
  968|    582|			return YXML_OK;
  969|    379|		if(ch == (unsigned char)'?') {
  ------------------
  |  Branch (969:6): [True: 7, False: 372]
  ------------------
  970|      7|			x->state = YXMLS_xmldecl9;
  971|      7|			return YXML_OK;
  972|      7|		}
  973|    372|		if(ch == (unsigned char)'e') {
  ------------------
  |  Branch (973:6): [True: 222, False: 150]
  ------------------
  974|    222|			x->state = YXMLS_string;
  975|    222|			x->nextstate = YXMLS_enc0;
  976|    222|			x->string = (unsigned char *)"ncoding";
  977|    222|			return YXML_OK;
  978|    222|		}
  979|    150|		if(ch == (unsigned char)'s') {
  ------------------
  |  Branch (979:6): [True: 139, False: 11]
  ------------------
  980|    139|			x->state = YXMLS_string;
  981|    139|			x->nextstate = YXMLS_std0;
  982|    139|			x->string = (unsigned char *)"tandalone";
  983|    139|			return YXML_OK;
  984|    139|		}
  985|     11|		break;
  986|     75|	case YXMLS_xmldecl6:
  ------------------
  |  Branch (986:2): [True: 75, False: 137M]
  ------------------
  987|     75|		if(yxml_isSP(ch)) {
  ------------------
  |  |  101|     75|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 25, False: 50]
  |  |  |  Branch (101:36): [True: 15, False: 35]
  |  |  |  Branch (101:49): [True: 14, False: 21]
  |  |  ------------------
  ------------------
  988|     54|			x->state = YXMLS_xmldecl7;
  989|     54|			return YXML_OK;
  990|     54|		}
  991|     21|		if(ch == (unsigned char)'?') {
  ------------------
  |  Branch (991:6): [True: 5, False: 16]
  ------------------
  992|      5|			x->state = YXMLS_xmldecl9;
  993|      5|			return YXML_OK;
  994|      5|		}
  995|     16|		break;
  996|    609|	case YXMLS_xmldecl7:
  ------------------
  |  Branch (996:2): [True: 609, False: 137M]
  ------------------
  997|    609|		if(yxml_isSP(ch))
  ------------------
  |  |  101|    609|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 194, False: 415]
  |  |  |  Branch (101:36): [True: 194, False: 221]
  |  |  |  Branch (101:49): [True: 194, False: 27]
  |  |  ------------------
  ------------------
  998|    582|			return YXML_OK;
  999|     27|		if(ch == (unsigned char)'?') {
  ------------------
  |  Branch (999:6): [True: 7, False: 20]
  ------------------
 1000|      7|			x->state = YXMLS_xmldecl9;
 1001|      7|			return YXML_OK;
 1002|      7|		}
 1003|     20|		if(ch == (unsigned char)'s') {
  ------------------
  |  Branch (1003:6): [True: 5, False: 15]
  ------------------
 1004|      5|			x->state = YXMLS_string;
 1005|      5|			x->nextstate = YXMLS_std0;
 1006|      5|			x->string = (unsigned char *)"tandalone";
 1007|      5|			return YXML_OK;
 1008|      5|		}
 1009|     15|		break;
 1010|    604|	case YXMLS_xmldecl8:
  ------------------
  |  Branch (1010:2): [True: 604, False: 137M]
  ------------------
 1011|    604|		if(yxml_isSP(ch))
  ------------------
  |  |  101|    604|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 195, False: 409]
  |  |  |  Branch (101:36): [True: 194, False: 215]
  |  |  |  Branch (101:49): [True: 194, False: 21]
  |  |  ------------------
  ------------------
 1012|    583|			return YXML_OK;
 1013|     21|		if(ch == (unsigned char)'?') {
  ------------------
  |  Branch (1013:6): [True: 9, False: 12]
  ------------------
 1014|      9|			x->state = YXMLS_xmldecl9;
 1015|      9|			return YXML_OK;
 1016|      9|		}
 1017|     12|		break;
 1018|     41|	case YXMLS_xmldecl9:
  ------------------
  |  Branch (1018:2): [True: 41, False: 137M]
  ------------------
 1019|     41|		if(ch == (unsigned char)'>') {
  ------------------
  |  Branch (1019:6): [True: 31, False: 10]
  ------------------
 1020|     31|			x->state = YXMLS_misc1;
 1021|     31|			return YXML_OK;
 1022|     31|		}
 1023|     10|		break;
 1024|   137M|	}
 1025|    817|	return YXML_ESYN;
 1026|   137M|}
yxml_eof:
 1028|  7.60k|yxml_ret_t yxml_eof(yxml_t *x) {
 1029|  7.60k|	if(x->state != YXMLS_misc3)
  ------------------
  |  Branch (1029:5): [True: 2.07k, False: 5.53k]
  ------------------
 1030|  2.07k|		return YXML_EEOF;
 1031|  5.53k|	return YXML_OK;
 1032|  7.60k|}
yxml.c:yxml_attrname:
  243|  32.6M|static inline yxml_ret_t yxml_attrname   (yxml_t *x, unsigned ch) { return yxml_pushstackc(x, ch); }
yxml.c:yxml_pushstackc:
  195|  33.1M|static yxml_ret_t yxml_pushstackc(yxml_t *x, unsigned ch) {
  196|  33.1M|	if(x->stacklen+1 >= x->stacksize)
  ------------------
  |  Branch (196:5): [True: 4, False: 33.1M]
  ------------------
  197|      4|		return YXML_ESTACK;
  198|  33.1M|	x->stack[x->stacklen] = (unsigned char)ch;
  199|  33.1M|	x->stacklen++;
  200|  33.1M|	x->stack[x->stacklen] = 0;
  201|  33.1M|	return YXML_OK;
  202|  33.1M|}
yxml.c:yxml_attrnameend:
  244|  1.98M|static inline yxml_ret_t yxml_attrnameend(yxml_t *x, unsigned ch) { return YXML_ATTRSTART; }
yxml.c:yxml_dataattr:
  177|  1.85M|static inline yxml_ret_t yxml_dataattr(yxml_t *x, unsigned ch) {
  178|       |	/* Normalize attribute values according to the XML spec section 3.3.3. */
  179|  1.85M|	yxml_setchar(x->data, ch == 0x9 || ch == 0xa ? 0x20 : ch);
  ------------------
  |  Branch (179:24): [True: 1.36k, False: 1.85M]
  |  Branch (179:37): [True: 92.8k, False: 1.76M]
  ------------------
  180|  1.85M|	x->data[1] = 0;
  181|  1.85M|	return YXML_ATTRVAL;
  182|  1.85M|}
yxml.c:yxml_setchar:
  118|  40.1M|static inline void yxml_setchar(char *dest, unsigned ch) {
  119|  40.1M|	*(unsigned char *)dest = (unsigned char)ch;
  120|  40.1M|}
yxml.c:yxml_refstart:
  255|  3.32k|static inline yxml_ret_t yxml_refstart(yxml_t *x, unsigned ch) {
  256|  3.32k|	memset(x->data, 0, sizeof(x->data));
  257|  3.32k|	x->reflen = 0;
  258|  3.32k|	return YXML_OK;
  259|  3.32k|}
yxml.c:yxml_attrvalend:
  245|  1.98M|static inline yxml_ret_t yxml_attrvalend (yxml_t *x, unsigned ch) { yxml_popstack(x); return YXML_ATTREND; }
yxml.c:yxml_popstack:
  204|  14.8M|static void yxml_popstack(yxml_t *x) {
  205|  14.8M|	do
  206|  62.9M|		x->stacklen--;
  207|  62.9M|	while(x->stack[x->stacklen]);
  ------------------
  |  Branch (207:8): [True: 48.0M, False: 14.8M]
  ------------------
  208|  14.8M|}
yxml.c:yxml_ref:
  261|  11.3k|static yxml_ret_t yxml_ref(yxml_t *x, unsigned ch) {
  262|  11.3k|	if(x->reflen >= sizeof(x->data)-1)
  ------------------
  |  Branch (262:5): [True: 20, False: 11.2k]
  ------------------
  263|     20|		return YXML_EREF;
  264|  11.2k|	yxml_setchar(x->data+x->reflen, ch);
  265|  11.2k|	x->reflen++;
  266|  11.2k|	return YXML_OK;
  267|  11.3k|}
yxml.c:yxml_refattrval:
  299|    754|static inline yxml_ret_t yxml_refattrval(yxml_t *x, unsigned ch) { return yxml_refend(x, YXML_ATTRVAL); }
yxml.c:yxml_refend:
  269|  3.20k|static yxml_ret_t yxml_refend(yxml_t *x, yxml_ret_t ret) {
  270|  3.20k|	unsigned char *r = (unsigned char *)x->data;
  271|  3.20k|	unsigned ch = 0;
  272|  3.20k|	if(*r == '#') {
  ------------------
  |  Branch (272:5): [True: 1.98k, False: 1.22k]
  ------------------
  273|  1.98k|		if(r[1] == 'x')
  ------------------
  |  Branch (273:6): [True: 661, False: 1.32k]
  ------------------
  274|  2.29k|			for(r += 2; yxml_isHex((unsigned)*r); r++)
  ------------------
  |  |  104|  2.29k|#define yxml_isHex(c) (yxml_isNum(c) || (c|32)-'a' < 6)
  |  |  ------------------
  |  |  |  |  103|  4.59k|#define yxml_isNum(c) (c-'0' < 10)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:23): [True: 532, False: 1.76k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (104:41): [True: 1.10k, False: 661]
  |  |  ------------------
  ------------------
  275|  1.63k|				ch = (ch<<4) + (*r <= '9' ? *r-'0' : (*r|32)-'a' + 10);
  ------------------
  |  Branch (275:21): [True: 532, False: 1.10k]
  ------------------
  276|  1.32k|		else
  277|  4.38k|			for(r++; yxml_isNum((unsigned)*r); r++)
  ------------------
  |  |  103|  4.38k|#define yxml_isNum(c) (c-'0' < 10)
  |  |  ------------------
  |  |  |  Branch (103:23): [True: 3.06k, False: 1.32k]
  |  |  ------------------
  ------------------
  278|  3.06k|				ch = (ch*10) + (*r-'0');
  279|  1.98k|		if(*r)
  ------------------
  |  Branch (279:6): [True: 10, False: 1.97k]
  ------------------
  280|     10|			ch = 0;
  281|  1.98k|	} else {
  282|  1.22k|		uint64_t i = INTFROM5CHARS(r[0], r[1], r[2], r[3], r[4]);
  ------------------
  |  |  115|  1.22k|#define INTFROM5CHARS(a, b, c, d, e) ((((uint64_t)(a))<<32) | (((uint64_t)(b))<<24) | (((uint64_t)(c))<<16) | (((uint64_t)(d))<<8) | (uint64_t)(e))
  ------------------
  283|  1.22k|		ch =
  284|  1.22k|			i == INTFROM5CHARS('l','t', 0,  0, 0) ? '<' :
  ------------------
  |  |  115|  1.22k|#define INTFROM5CHARS(a, b, c, d, e) ((((uint64_t)(a))<<32) | (((uint64_t)(b))<<24) | (((uint64_t)(c))<<16) | (((uint64_t)(d))<<8) | (uint64_t)(e))
  ------------------
  |  Branch (284:4): [True: 230, False: 998]
  ------------------
  285|  1.22k|			i == INTFROM5CHARS('g','t', 0,  0, 0) ? '>' :
  ------------------
  |  |  115|    998|#define INTFROM5CHARS(a, b, c, d, e) ((((uint64_t)(a))<<32) | (((uint64_t)(b))<<24) | (((uint64_t)(c))<<16) | (((uint64_t)(d))<<8) | (uint64_t)(e))
  ------------------
  |  Branch (285:4): [True: 194, False: 804]
  ------------------
  286|    998|			i == INTFROM5CHARS('a','m','p', 0, 0) ? '&' :
  ------------------
  |  |  115|    804|#define INTFROM5CHARS(a, b, c, d, e) ((((uint64_t)(a))<<32) | (((uint64_t)(b))<<24) | (((uint64_t)(c))<<16) | (((uint64_t)(d))<<8) | (uint64_t)(e))
  ------------------
  |  Branch (286:4): [True: 194, False: 610]
  ------------------
  287|    804|			i == INTFROM5CHARS('a','p','o','s',0) ? '\'':
  ------------------
  |  |  115|    610|#define INTFROM5CHARS(a, b, c, d, e) ((((uint64_t)(a))<<32) | (((uint64_t)(b))<<24) | (((uint64_t)(c))<<16) | (((uint64_t)(d))<<8) | (uint64_t)(e))
  ------------------
  |  Branch (287:4): [True: 194, False: 416]
  ------------------
  288|    610|			i == INTFROM5CHARS('q','u','o','t',0) ? '"' : 0;
  ------------------
  |  |  115|    416|#define INTFROM5CHARS(a, b, c, d, e) ((((uint64_t)(a))<<32) | (((uint64_t)(b))<<24) | (((uint64_t)(c))<<16) | (((uint64_t)(d))<<8) | (uint64_t)(e))
  ------------------
  |  Branch (288:4): [True: 256, False: 160]
  ------------------
  289|  1.22k|	}
  290|       |
  291|       |	/* Codepoints not allowed in the XML 1.1 definition of a Char */
  292|  3.20k|	if(!ch || ch > 0x10FFFF || ch == 0xFFFE || ch == 0xFFFF || (ch-0xDFFF) < 0x7FF)
  ------------------
  |  Branch (292:5): [True: 187, False: 3.02k]
  |  Branch (292:12): [True: 0, False: 3.02k]
  |  Branch (292:29): [True: 1, False: 3.02k]
  |  Branch (292:45): [True: 1, False: 3.02k]
  |  Branch (292:61): [True: 6, False: 3.01k]
  ------------------
  293|    195|		return YXML_EREF;
  294|  3.01k|	yxml_setutf8(x->data, ch);
  295|  3.01k|	return ret;
  296|  3.20k|}
yxml.c:yxml_setutf8:
  124|  3.01k|static void yxml_setutf8(char *dest, unsigned ch) {
  125|  3.01k|	if(ch <= 0x007F)
  ------------------
  |  Branch (125:5): [True: 2.11k, False: 895]
  ------------------
  126|  2.11k|		yxml_setchar(dest++, ch);
  127|    895|	else if(ch <= 0x07FF) {
  ------------------
  |  Branch (127:10): [True: 218, False: 677]
  ------------------
  128|    218|		yxml_setchar(dest++, 0xC0 | (ch>>6));
  129|    218|		yxml_setchar(dest++, 0x80 | (ch & 0x3F));
  130|    677|	} else if(ch <= 0xFFFF) {
  ------------------
  |  Branch (130:12): [True: 295, False: 382]
  ------------------
  131|    295|		yxml_setchar(dest++, 0xE0 | (ch>>12));
  132|    295|		yxml_setchar(dest++, 0x80 | ((ch>>6) & 0x3F));
  133|    295|		yxml_setchar(dest++, 0x80 | (ch & 0x3F));
  134|    382|	} else {
  135|    382|		yxml_setchar(dest++, 0xF0 | (ch>>18));
  136|    382|		yxml_setchar(dest++, 0x80 | ((ch>>12) & 0x3F));
  137|    382|		yxml_setchar(dest++, 0x80 | ((ch>>6) & 0x3F));
  138|    382|		yxml_setchar(dest++, 0x80 | (ch & 0x3F));
  139|    382|	}
  140|  3.01k|	*dest = 0;
  141|  3.01k|}
yxml.c:yxml_datacontent:
  143|  37.5M|static inline yxml_ret_t yxml_datacontent(yxml_t *x, unsigned ch) {
  144|  37.5M|	yxml_setchar(x->data, ch);
  145|  37.5M|	x->data[1] = 0;
  146|  37.5M|	return YXML_CONTENT;
  147|  37.5M|}
yxml.c:yxml_datacd1:
  162|    237|static inline yxml_ret_t yxml_datacd1(yxml_t *x, unsigned ch) {
  163|    237|	x->data[0] = ']';
  164|    237|	yxml_setchar(x->data+1, ch);
  165|    237|	x->data[2] = 0;
  166|    237|	return YXML_CONTENT;
  167|    237|}
yxml.c:yxml_datacd2:
  169|    253|static inline yxml_ret_t yxml_datacd2(yxml_t *x, unsigned ch) {
  170|    253|	x->data[0] = ']';
  171|    253|	x->data[1] = ']';
  172|    253|	yxml_setchar(x->data+2, ch);
  173|    253|	x->data[3] = 0;
  174|    253|	return YXML_CONTENT;
  175|    253|}
yxml.c:yxml_elemname:
  211|   490k|static inline yxml_ret_t yxml_elemname   (yxml_t *x, unsigned ch) { return yxml_pushstackc(x, ch); }
yxml.c:yxml_elemnameend:
  212|  12.8M|static inline yxml_ret_t yxml_elemnameend(yxml_t *x, unsigned ch) { return YXML_ELEMSTART; }
yxml.c:yxml_attrstart:
  242|  1.98M|static inline yxml_ret_t yxml_attrstart  (yxml_t *x, unsigned ch) { return yxml_pushstack(x, &x->attr, ch); }
yxml.c:yxml_pushstack:
  184|  14.8M|static yxml_ret_t yxml_pushstack(yxml_t *x, char **res, unsigned ch) {
  185|  14.8M|	if(x->stacklen+2 >= x->stacksize)
  ------------------
  |  Branch (185:5): [True: 4, False: 14.8M]
  ------------------
  186|      4|		return YXML_ESTACK;
  187|  14.8M|	x->stacklen++;
  188|  14.8M|	*res = (char *)x->stack+x->stacklen;
  189|  14.8M|	x->stack[x->stacklen] = (unsigned char)ch;
  190|  14.8M|	x->stacklen++;
  191|  14.8M|	x->stack[x->stacklen] = 0;
  192|  14.8M|	return YXML_OK;
  193|  14.8M|}
yxml.c:yxml_selfclose:
  216|  12.8M|static yxml_ret_t yxml_selfclose(yxml_t *x, unsigned ch) {
  217|  12.8M|	yxml_popstack(x);
  218|  12.8M|	if(x->stacklen) {
  ------------------
  |  Branch (218:5): [True: 12.8M, False: 5.64k]
  ------------------
  219|  12.8M|		x->elem = (char *)x->stack+x->stacklen-1;
  220|  58.4M|		while(*(x->elem-1))
  ------------------
  |  Branch (220:9): [True: 45.5M, False: 12.8M]
  ------------------
  221|  45.5M|			x->elem--;
  222|  12.8M|		return YXML_ELEMEND;
  223|  12.8M|	}
  224|  5.64k|	x->elem = (char *)x->stack;
  225|  5.64k|	x->state = YXMLS_misc3;
  226|  5.64k|	return YXML_ELEMEND;
  227|  12.8M|}
yxml.c:yxml_elemclose:
  229|  83.1k|static inline yxml_ret_t yxml_elemclose(yxml_t *x, unsigned ch) {
  230|  83.1k|	if(*((unsigned char *)x->elem) != ch)
  ------------------
  |  Branch (230:5): [True: 95, False: 83.0k]
  ------------------
  231|     95|		return YXML_ECLOSE;
  232|  83.0k|	x->elem++;
  233|  83.0k|	return YXML_OK;
  234|  83.1k|}
yxml.c:yxml_elemcloseend:
  236|  22.0k|static inline yxml_ret_t yxml_elemcloseend(yxml_t *x, unsigned ch) {
  237|  22.0k|	if(*x->elem)
  ------------------
  |  Branch (237:5): [True: 1, False: 22.0k]
  ------------------
  238|      1|		return YXML_ECLOSE;
  239|  22.0k|	return yxml_selfclose(x, ch);
  240|  22.0k|}
yxml.c:yxml_elemstart:
  210|  12.8M|static inline yxml_ret_t yxml_elemstart  (yxml_t *x, unsigned ch) { return yxml_pushstack(x, &x->elem, ch); }
yxml.c:yxml_pistart:
  247|  4.65k|static inline yxml_ret_t yxml_pistart  (yxml_t *x, unsigned ch) { return yxml_pushstack(x, &x->pi, ch); }
yxml.c:yxml_refcontent:
  298|  2.45k|static inline yxml_ret_t yxml_refcontent(yxml_t *x, unsigned ch) { return yxml_refend(x, YXML_CONTENT); }
yxml.c:yxml_piname:
  248|  7.01k|static inline yxml_ret_t yxml_piname   (yxml_t *x, unsigned ch) { return yxml_pushstackc(x, ch); }
yxml.c:yxml_pinameend:
  250|  3.79k|static inline yxml_ret_t yxml_pinameend(yxml_t *x, unsigned ch) {
  251|  3.79k|	return (x->pi[0]|32) == 'x' && (x->pi[1]|32) == 'm' && (x->pi[2]|32) == 'l' && !x->pi[3] ? YXML_ESYN : YXML_PISTART;
  ------------------
  |  Branch (251:9): [True: 1.76k, False: 2.02k]
  |  Branch (251:33): [True: 982, False: 783]
  |  Branch (251:57): [True: 561, False: 421]
  |  Branch (251:81): [True: 14, False: 547]
  ------------------
  252|  3.79k|}
yxml.c:yxml_datapi1:
  149|   792k|static inline yxml_ret_t yxml_datapi1(yxml_t *x, unsigned ch) {
  150|   792k|	yxml_setchar(x->data, ch);
  151|   792k|	x->data[1] = 0;
  152|   792k|	return YXML_PICONTENT;
  153|   792k|}
yxml.c:yxml_pivalend:
  253|  3.64k|static inline yxml_ret_t yxml_pivalend (yxml_t *x, unsigned ch) { yxml_popstack(x); x->pi = (char *)x->stack; return YXML_PIEND; }
yxml.c:yxml_datapi2:
  155|    403|static inline yxml_ret_t yxml_datapi2(yxml_t *x, unsigned ch) {
  156|    403|	x->data[0] = '?';
  157|    403|	yxml_setchar(x->data+1, ch);
  158|    403|	x->data[2] = 0;
  159|    403|	return YXML_PICONTENT;
  160|    403|}
yxml.c:yxml_piabort:
  249|    584|static inline yxml_ret_t yxml_piabort  (yxml_t *x, unsigned ch) { yxml_popstack(x); return YXML_OK; }

UA_STRING:
  220|    788|UA_STRING(char *chars) {
  221|    788|    UA_String s = {0, NULL};
  222|    788|    if(!chars)
  ------------------
  |  Branch (222:8): [True: 0, False: 788]
  ------------------
  223|      0|        return s;
  224|    788|    s.length = strlen(chars);
  225|    788|    s.data = (UA_Byte*)chars;
  226|    788|    return s;
  227|    788|}
UA_String_equal_ignorecase:
  269|    146|UA_String_equal_ignorecase(const UA_String *s1, const UA_String *s2) {
  270|    146|    if(s1->length != s2->length)
  ------------------
  |  Branch (270:8): [True: 0, False: 146]
  ------------------
  271|      0|        return false;
  272|    146|    if(s1->length == 0)
  ------------------
  |  Branch (272:8): [True: 0, False: 146]
  ------------------
  273|      0|        return true;
  274|    146|    if(s2->data == NULL)
  ------------------
  |  Branch (274:8): [True: 0, False: 146]
  ------------------
  275|      0|        return false;
  276|       |
  277|    146|    return casecmp(s1->data, s2->data, s1->length) == 0;
  278|    146|}
UA_DateTime_parse:
  531|     43|UA_DateTime_parse(UA_DateTime *dst, const UA_String str) {
  532|     43|    if(str.length == 0)
  ------------------
  |  Branch (532:8): [True: 43, False: 0]
  ------------------
  533|     43|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     43|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  534|       |
  535|      0|    struct musl_tm dts;
  536|      0|    memset(&dts, 0, sizeof(dts));
  537|       |
  538|       |    /* Parse the year. The ISO standard asks for four digits. But we accept up
  539|       |     * to five with an optional plus or minus in front due to the range of the
  540|       |     * DateTime 64bit integer. But in that case we require the year and the
  541|       |     * month to be separated by a '-'. Otherwise we cannot know where the month
  542|       |     * starts. */
  543|      0|    size_t pos = 0;
  544|      0|    if(str.data[0] == '-' || str.data[0] == '+')
  ------------------
  |  Branch (544:8): [True: 0, False: 0]
  |  Branch (544:30): [True: 0, False: 0]
  ------------------
  545|      0|        pos++;
  546|      0|    UA_Int64 year = 0;
  547|      0|    UA_CHECK(str.length - pos > 5, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  172|      0|    do {                                                                                 \
  |  |  173|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  580|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (580:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  175|      0|        }                                                                                \
  |  |  176|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  548|      0|    size_t len = parseInt64((char*)&str.data[pos], 5, &year);
  549|      0|    pos += len;
  550|      0|    UA_CHECK(len > 0 && pos < str.length, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  172|      0|    do {                                                                                 \
  |  |  173|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  580|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (580:25): [True: 0, False: 0]
  |  |  |  |  |  Branch (580:43): [True: 0, False: 0]
  |  |  |  |  |  Branch (580:43): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  175|      0|        }                                                                                \
  |  |  176|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  551|      0|    UA_CHECK(len == 4 || str.data[pos] == '-', return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  172|      0|    do {                                                                                 \
  |  |  173|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  580|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (580:25): [True: 0, False: 0]
  |  |  |  |  |  Branch (580:43): [True: 0, False: 0]
  |  |  |  |  |  Branch (580:43): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  175|      0|        }                                                                                \
  |  |  176|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  552|      0|    if(str.data[0] == '-')
  ------------------
  |  Branch (552:8): [True: 0, False: 0]
  ------------------
  553|      0|        year = -year;
  554|      0|    dts.tm_year = (UA_Int16)year - 1900;
  555|      0|    if(str.data[pos] == '-')
  ------------------
  |  Branch (555:8): [True: 0, False: 0]
  ------------------
  556|      0|        pos++;
  557|       |
  558|       |    /* Parse the month */
  559|      0|    UA_UInt64 month = 0;
  560|      0|    UA_CHECK(str.length - pos > 2, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  172|      0|    do {                                                                                 \
  |  |  173|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  580|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (580:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  175|      0|        }                                                                                \
  |  |  176|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  561|      0|    len = parseUInt64((char*)&str.data[pos], 2, &month);
  562|      0|    pos += len;
  563|      0|    UA_CHECK(len == 2, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  172|      0|    do {                                                                                 \
  |  |  173|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  580|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (580:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  175|      0|        }                                                                                \
  |  |  176|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  564|      0|    dts.tm_mon = (UA_UInt16)month - 1;
  565|      0|    if(str.data[pos] == '-')
  ------------------
  |  Branch (565:8): [True: 0, False: 0]
  ------------------
  566|      0|        pos++;
  567|       |
  568|       |    /* Parse the day and check the T between date and time */
  569|      0|    UA_UInt64 day = 0;
  570|      0|    UA_CHECK(str.length - pos > 2, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  172|      0|    do {                                                                                 \
  |  |  173|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  580|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (580:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  175|      0|        }                                                                                \
  |  |  176|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  571|      0|    len = parseUInt64((char*)&str.data[pos], 2, &day);
  572|      0|    pos += len;
  573|      0|    UA_CHECK(len == 2 || str.data[pos] != 'T',
  ------------------
  |  |  172|      0|    do {                                                                                 \
  |  |  173|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  580|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (580:25): [True: 0, False: 0]
  |  |  |  |  |  Branch (580:43): [True: 0, False: 0]
  |  |  |  |  |  Branch (580:43): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  175|      0|        }                                                                                \
  |  |  176|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  574|      0|             return UA_STATUSCODE_BADDECODINGERROR);
  575|      0|    dts.tm_mday = (UA_UInt16)day;
  576|      0|    pos++;
  577|       |
  578|       |    /* Parse the hour */
  579|      0|    UA_UInt64 hour = 0;
  580|      0|    UA_CHECK(str.length - pos > 2, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  172|      0|    do {                                                                                 \
  |  |  173|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  580|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (580:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  175|      0|        }                                                                                \
  |  |  176|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  581|      0|    len = parseUInt64((char*)&str.data[pos], 2, &hour);
  582|      0|    pos += len;
  583|      0|    UA_CHECK(len == 2, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  172|      0|    do {                                                                                 \
  |  |  173|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  580|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (580:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  175|      0|        }                                                                                \
  |  |  176|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  584|      0|    dts.tm_hour = (UA_UInt16)hour;
  585|      0|    if(str.data[pos] == ':')
  ------------------
  |  Branch (585:8): [True: 0, False: 0]
  ------------------
  586|      0|        pos++;
  587|       |
  588|       |    /* Parse the minute */
  589|      0|    UA_UInt64 min = 0;
  590|      0|    UA_CHECK(str.length - pos > 2, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  172|      0|    do {                                                                                 \
  |  |  173|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  580|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (580:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  175|      0|        }                                                                                \
  |  |  176|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  591|      0|    len = parseUInt64((char*)&str.data[pos], 2, &min);
  592|      0|    pos += len;
  593|      0|    UA_CHECK(len == 2, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  172|      0|    do {                                                                                 \
  |  |  173|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  580|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (580:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  175|      0|        }                                                                                \
  |  |  176|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  594|      0|    dts.tm_min = (UA_UInt16)min;
  595|      0|    if(str.data[pos] == ':')
  ------------------
  |  Branch (595:8): [True: 0, False: 0]
  ------------------
  596|      0|        pos++;
  597|       |
  598|       |    /* Parse the second */
  599|      0|    UA_UInt64 sec = 0;
  600|      0|    UA_CHECK(str.length - pos >= 2, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  172|      0|    do {                                                                                 \
  |  |  173|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  580|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (580:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  175|      0|        }                                                                                \
  |  |  176|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  601|      0|    len = parseUInt64((char*)&str.data[pos], 2, &sec);
  602|      0|    pos += len;
  603|      0|    UA_CHECK(len == 2, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  172|      0|    do {                                                                                 \
  |  |  173|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  580|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (580:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  175|      0|        }                                                                                \
  |  |  176|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  604|      0|    dts.tm_sec = (UA_UInt16)sec;
  605|       |
  606|       |    /* Compute the seconds since the Unix epoch */
  607|      0|    long long sinceunix = musl_tm_to_secs(&dts);
  608|       |
  609|       |    /* Are we within the range that can be represented? */
  610|      0|    long long sinceunix_min =
  611|      0|        (long long)(UA_INT64_MIN / UA_DATETIME_SEC) -
  ------------------
  |  |  120|      0|#define UA_INT64_MIN ((int64_t)-UA_INT64_MAX-1LL)
  |  |  ------------------
  |  |  |  |  119|      0|#define UA_INT64_MAX (int64_t)9223372036854775807LL
  |  |  ------------------
  ------------------
                      (long long)(UA_INT64_MIN / UA_DATETIME_SEC) -
  ------------------
  |  |  286|      0|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  ------------------
  |  |  |  |  285|      0|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|      0|#define UA_DATETIME_USEC 10LL
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  612|      0|        (long long)(UA_DATETIME_UNIX_EPOCH / UA_DATETIME_SEC) -
  ------------------
  |  |  328|      0|#define UA_DATETIME_UNIX_EPOCH (11644473600LL * UA_DATETIME_SEC)
  |  |  ------------------
  |  |  |  |  286|      0|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|      0|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  284|      0|#define UA_DATETIME_USEC 10LL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      (long long)(UA_DATETIME_UNIX_EPOCH / UA_DATETIME_SEC) -
  ------------------
  |  |  286|      0|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  ------------------
  |  |  |  |  285|      0|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|      0|#define UA_DATETIME_USEC 10LL
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  613|      0|        (long long)1; /* manual correction due to rounding */
  614|      0|    long long sinceunix_max = (long long)
  615|      0|        ((UA_INT64_MAX - UA_DATETIME_UNIX_EPOCH) / UA_DATETIME_SEC);
  ------------------
  |  |  119|      0|#define UA_INT64_MAX (int64_t)9223372036854775807LL
  ------------------
                      ((UA_INT64_MAX - UA_DATETIME_UNIX_EPOCH) / UA_DATETIME_SEC);
  ------------------
  |  |  328|      0|#define UA_DATETIME_UNIX_EPOCH (11644473600LL * UA_DATETIME_SEC)
  |  |  ------------------
  |  |  |  |  286|      0|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|      0|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  284|      0|#define UA_DATETIME_USEC 10LL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      ((UA_INT64_MAX - UA_DATETIME_UNIX_EPOCH) / UA_DATETIME_SEC);
  ------------------
  |  |  286|      0|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  ------------------
  |  |  |  |  285|      0|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|      0|#define UA_DATETIME_USEC 10LL
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  616|      0|    if(sinceunix < sinceunix_min || sinceunix > sinceunix_max)
  ------------------
  |  Branch (616:8): [True: 0, False: 0]
  |  Branch (616:37): [True: 0, False: 0]
  ------------------
  617|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  618|       |
  619|       |    /* Convert to DateTime. Add or subtract one extra second here to prevent
  620|       |     * underflow/overflow. This is reverted once the fractional part has been
  621|       |     * added. */
  622|      0|    sinceunix -= (sinceunix > 0) ? 1 : -1;
  ------------------
  |  Branch (622:18): [True: 0, False: 0]
  ------------------
  623|      0|    UA_DateTime dt = (UA_DateTime)
  624|      0|        (sinceunix + (UA_DATETIME_UNIX_EPOCH / UA_DATETIME_SEC)) * UA_DATETIME_SEC;
  ------------------
  |  |  328|      0|#define UA_DATETIME_UNIX_EPOCH (11644473600LL * UA_DATETIME_SEC)
  |  |  ------------------
  |  |  |  |  286|      0|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|      0|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  284|      0|#define UA_DATETIME_USEC 10LL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      (sinceunix + (UA_DATETIME_UNIX_EPOCH / UA_DATETIME_SEC)) * UA_DATETIME_SEC;
  ------------------
  |  |  286|      0|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  ------------------
  |  |  |  |  285|      0|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|      0|#define UA_DATETIME_USEC 10LL
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      (sinceunix + (UA_DATETIME_UNIX_EPOCH / UA_DATETIME_SEC)) * UA_DATETIME_SEC;
  ------------------
  |  |  286|      0|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  ------------------
  |  |  |  |  285|      0|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|      0|#define UA_DATETIME_USEC 10LL
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  625|       |
  626|       |    /* Parse the fraction of the second if defined */
  627|      0|    UA_CHECK(pos < str.length, goto finish);
  ------------------
  |  |  172|      0|    do {                                                                                 \
  |  |  173|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  580|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (580:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  175|      0|        }                                                                                \
  |  |  176|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  628|      0|    if(str.data[pos] == ',' || str.data[pos] == '.') {
  ------------------
  |  Branch (628:8): [True: 0, False: 0]
  |  Branch (628:32): [True: 0, False: 0]
  ------------------
  629|      0|        pos++;
  630|      0|        double frac = 0.0;
  631|      0|        double denom = 0.1;
  632|      0|        while(pos < str.length && str.data[pos] >= '0' && str.data[pos] <= '9') {
  ------------------
  |  Branch (632:15): [True: 0, False: 0]
  |  Branch (632:35): [True: 0, False: 0]
  |  Branch (632:59): [True: 0, False: 0]
  ------------------
  633|      0|            frac += denom * (str.data[pos] - '0');
  634|      0|            denom *= 0.1;
  635|      0|            pos++;
  636|      0|        }
  637|      0|        frac += 0.00000005; /* Correct rounding when converting to integer */
  638|      0|        dt += (UA_DateTime)(frac * UA_DATETIME_SEC);
  ------------------
  |  |  286|      0|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  ------------------
  |  |  |  |  285|      0|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|      0|#define UA_DATETIME_USEC 10LL
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  639|      0|    }
  640|       |
  641|       |    /* Time zone handling */
  642|      0|    UA_CHECK(pos < str.length, goto finish);
  ------------------
  |  |  172|      0|    do {                                                                                 \
  |  |  173|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  580|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (580:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  175|      0|        }                                                                                \
  |  |  176|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  643|      0|    if(str.data[pos] == 'Z') {
  ------------------
  |  Branch (643:8): [True: 0, False: 0]
  ------------------
  644|      0|        pos++;
  645|      0|    } else if(str.data[pos] == '+' || str.data[pos] == '-') {
  ------------------
  |  Branch (645:15): [True: 0, False: 0]
  |  Branch (645:39): [True: 0, False: 0]
  ------------------
  646|      0|        UA_UInt64 tzHour = 0, tzMin = 0;
  647|      0|        UA_Int64 offsetSeconds = 0;
  648|      0|        UA_Byte tzSign = str.data[pos++];
  649|       |
  650|      0|        UA_CHECK(str.length - pos >= 2, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  172|      0|    do {                                                                                 \
  |  |  173|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  580|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (580:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  175|      0|        }                                                                                \
  |  |  176|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  651|      0|        len = parseUInt64((char*)&str.data[pos], 2, &tzHour);
  652|      0|        pos += len;
  653|      0|        UA_CHECK(len == 2, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  172|      0|    do {                                                                                 \
  |  |  173|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  580|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (580:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  175|      0|        }                                                                                \
  |  |  176|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  654|       |
  655|      0|        UA_CHECK(str.length > pos, goto finish); /* Allow missing tz minutes */
  ------------------
  |  |  172|      0|    do {                                                                                 \
  |  |  173|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  580|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (580:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  175|      0|        }                                                                                \
  |  |  176|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  656|      0|        if(str.data[pos] == ':')
  ------------------
  |  Branch (656:12): [True: 0, False: 0]
  ------------------
  657|      0|            pos++;
  658|       |
  659|      0|        UA_CHECK(str.length - pos >= 2, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  172|      0|    do {                                                                                 \
  |  |  173|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  580|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (580:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  175|      0|        }                                                                                \
  |  |  176|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  660|      0|        len = parseUInt64((char*)&str.data[pos], 2, &tzMin);
  661|      0|        pos += len;
  662|      0|        UA_CHECK(len == 2, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  172|      0|    do {                                                                                 \
  |  |  173|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  580|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (580:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  175|      0|        }                                                                                \
  |  |  176|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  663|       |
  664|      0|        offsetSeconds = (tzHour * 3600) + (tzMin * 60);
  665|      0|        if(tzSign == '-')
  ------------------
  |  Branch (665:12): [True: 0, False: 0]
  ------------------
  666|      0|            offsetSeconds = -offsetSeconds;
  667|      0|        dt -= (UA_DateTime)(offsetSeconds * UA_DATETIME_SEC);
  ------------------
  |  |  286|      0|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  ------------------
  |  |  |  |  285|      0|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|      0|#define UA_DATETIME_USEC 10LL
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  668|      0|    } else {
  669|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  670|      0|    }
  671|       |
  672|      0| finish:
  673|       |    /* Remove the underflow/overflow protection (see above) */
  674|      0|    if(sinceunix > 0) {
  ------------------
  |  Branch (674:8): [True: 0, False: 0]
  ------------------
  675|      0|        if(dt > UA_INT64_MAX - UA_DATETIME_SEC)
  ------------------
  |  |  119|      0|#define UA_INT64_MAX (int64_t)9223372036854775807LL
  ------------------
                      if(dt > UA_INT64_MAX - UA_DATETIME_SEC)
  ------------------
  |  |  286|      0|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  ------------------
  |  |  |  |  285|      0|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|      0|#define UA_DATETIME_USEC 10LL
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (675:12): [True: 0, False: 0]
  ------------------
  676|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  677|      0|        dt += UA_DATETIME_SEC;
  ------------------
  |  |  286|      0|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  ------------------
  |  |  |  |  285|      0|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|      0|#define UA_DATETIME_USEC 10LL
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  678|      0|    } else {
  679|      0|        if(dt < UA_INT64_MIN + UA_DATETIME_SEC)
  ------------------
  |  |  120|      0|#define UA_INT64_MIN ((int64_t)-UA_INT64_MAX-1LL)
  |  |  ------------------
  |  |  |  |  119|      0|#define UA_INT64_MAX (int64_t)9223372036854775807LL
  |  |  ------------------
  ------------------
                      if(dt < UA_INT64_MIN + UA_DATETIME_SEC)
  ------------------
  |  |  286|      0|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  ------------------
  |  |  |  |  285|      0|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|      0|#define UA_DATETIME_USEC 10LL
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (679:12): [True: 0, False: 0]
  ------------------
  680|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  681|      0|        dt -= UA_DATETIME_SEC;
  ------------------
  |  |  286|      0|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  ------------------
  |  |  |  |  285|      0|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|      0|#define UA_DATETIME_USEC 10LL
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  682|      0|    }
  683|       |
  684|       |    /* We must be at the end of the string */
  685|      0|    if(pos != str.length)
  ------------------
  |  Branch (685:8): [True: 0, False: 0]
  ------------------
  686|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  687|       |
  688|      0|    *dst = dt;
  689|      0|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  690|      0|}
UA_ByteString_allocBuffer:
  757|  3.52k|UA_ByteString_allocBuffer(UA_ByteString *bs, size_t length) {
  758|  3.52k|    UA_ByteString_init(bs);
  759|  3.52k|    if(length == 0) {
  ------------------
  |  Branch (759:8): [True: 86, False: 3.43k]
  ------------------
  760|     86|        bs->data = (u8*)UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|     86|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  761|     86|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     86|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  762|     86|    }
  763|  3.43k|    bs->data = (u8*)UA_calloc(1,length);
  ------------------
  |  |   20|  3.43k|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
  764|  3.43k|    if(UA_UNLIKELY(!bs->data))
  ------------------
  |  |  580|  3.43k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  ------------------
  |  |  |  Branch (580:25): [True: 0, False: 3.43k]
  |  |  ------------------
  ------------------
  765|      0|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
  766|  3.43k|    bs->length = length;
  767|  3.43k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  3.43k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  768|  3.43k|}
UA_NodeId_isNull:
  809|     73|UA_NodeId_isNull(const UA_NodeId *p) {
  810|     73|    if(p->namespaceIndex != 0)
  ------------------
  |  Branch (810:8): [True: 0, False: 73]
  ------------------
  811|      0|        return false;
  812|     73|    switch (p->identifierType) {
  ------------------
  |  Branch (812:13): [True: 73, False: 0]
  ------------------
  813|     73|    case UA_NODEIDTYPE_NUMERIC:
  ------------------
  |  Branch (813:5): [True: 73, False: 0]
  ------------------
  814|     73|        return (p->identifier.numeric == 0);
  815|      0|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (815:5): [True: 0, False: 73]
  ------------------
  816|      0|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (816:5): [True: 0, False: 73]
  ------------------
  817|      0|        return (p->identifier.string.length == 0); /* Null and empty string */
  818|      0|    case UA_NODEIDTYPE_GUID:
  ------------------
  |  Branch (818:5): [True: 0, False: 73]
  ------------------
  819|      0|        return (guidOrder(&p->identifier.guid, &UA_GUID_NULL, NULL) == UA_ORDER_EQ);
  820|     73|    }
  821|      0|    return false;
  822|     73|}
nodeId_printEscape:
 1024|    219|                   const UA_NamespaceMapping *nsMapping, UA_Escaping idEsc) {
 1025|       |    /* Try to map the NamespaceIndex to the Uri */
 1026|    219|    UA_String nsUri = UA_STRING_NULL;
 1027|    219|    if(id->namespaceIndex > 0 && nsMapping)
  ------------------
  |  Branch (1027:8): [True: 0, False: 219]
  |  Branch (1027:34): [True: 0, False: 0]
  ------------------
 1028|      0|        UA_NamespaceMapping_index2Uri(nsMapping, id->namespaceIndex, &nsUri);
 1029|       |
 1030|       |    /* Compute the string length and print numerical identifiers. */
 1031|    219|    u8 nsStr[7];
 1032|    219|    u8 numIdStr[12];
 1033|    219|    size_t idLen = nodeIdSize(id, nsStr, numIdStr, nsUri, idEsc);
 1034|    219|    if(idLen == 0)
  ------------------
  |  Branch (1034:8): [True: 0, False: 219]
  ------------------
 1035|      0|        return UA_STATUSCODE_BADINTERNALERROR;
  ------------------
  |  |   29|      0|#define UA_STATUSCODE_BADINTERNALERROR ((UA_StatusCode) 0x80020000)
  ------------------
 1036|       |
 1037|       |    /* Allocate memory if required */
 1038|    219|    if(output->length == 0) {
  ------------------
  |  Branch (1038:8): [True: 219, False: 0]
  ------------------
 1039|    219|        UA_StatusCode res = UA_ByteString_allocBuffer((UA_ByteString*)output, idLen);
 1040|    219|        if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    219|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1040:12): [True: 0, False: 219]
  ------------------
 1041|      0|            return res;
 1042|    219|    } else {
 1043|      0|        if(output->length < idLen)
  ------------------
  |  Branch (1043:12): [True: 0, False: 0]
  ------------------
 1044|      0|            return UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED;
  ------------------
  |  |   47|      0|#define UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED ((UA_StatusCode) 0x80080000)
  ------------------
 1045|      0|        output->length = idLen;
 1046|      0|    }
 1047|       |
 1048|       |    /* Print the NodeId */
 1049|    219|    u8 *pos = printNodeIdBody(id, nsUri, nsStr, numIdStr, output->data, nsMapping, idEsc);
 1050|    219|    output->length = (size_t)(pos - output->data);
 1051|    219|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    219|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1052|    219|}
UA_NodeId_printEx:
 1056|    219|                  const UA_NamespaceMapping *nsMapping) {
 1057|    219|    return nodeId_printEscape(id, output, nsMapping, UA_ESCAPING_NONE);
 1058|    219|}
UA_ExtensionObject_setValue:
 1301|    292|                            const UA_DataType *type) {
 1302|    292|    UA_ExtensionObject_init(eo);
 1303|    292|    eo->content.decoded.data = p;
 1304|    292|    eo->content.decoded.type = type;
 1305|    292|    eo->encoding = UA_EXTENSIONOBJECT_DECODED;
 1306|    292|}
UA_Variant_isScalar:
 1358|  3.05k|UA_Variant_isScalar(const UA_Variant *v) {
 1359|  3.05k|    return (v->type != NULL && v->arrayLength == 0 &&
  ------------------
  |  Branch (1359:13): [True: 3.05k, False: 0]
  |  Branch (1359:32): [True: 3.05k, False: 0]
  ------------------
 1360|  3.05k|            v->data > UA_EMPTY_ARRAY_SENTINEL);
  ------------------
  |  |  756|  3.05k|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  |  Branch (1360:13): [True: 3.04k, False: 10]
  ------------------
 1361|  3.05k|}
UA_new:
 1921|  4.50k|UA_new(const UA_DataType *type) {
 1922|  4.50k|    void *p = UA_calloc(1, type->memSize);
  ------------------
  |  |   20|  4.50k|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
 1923|  4.50k|    return p;
 1924|  4.50k|}
UA_copy:
 2097|     92|UA_copy(const void *src, void *dst, const UA_DataType *type) {
 2098|     92|    memset(dst, 0, type->memSize); /* init */
 2099|     92|    UA_StatusCode retval = copyJumpTable[type->typeKind](src, dst, type);
 2100|     92|    if(retval != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|     92|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2100:8): [True: 0, False: 92]
  ------------------
 2101|      0|        UA_clear(dst, type);
 2102|     92|    return retval;
 2103|     92|}
UA_clear:
 2200|  8.80k|UA_clear(void *p, const UA_DataType *type) {
 2201|  8.80k|    clearJumpTable[type->typeKind](p, type);
 2202|  8.80k|    memset(p, 0, type->memSize); /* init */
 2203|  8.80k|}
UA_order:
 2674|  47.8k|UA_Order UA_order(const void *p1, const void *p2, const UA_DataType *type) {
 2675|  47.8k|    return orderJumpTable[type->typeKind](p1, p2, type);
 2676|  47.8k|}
UA_equal:
 2679|    999|UA_equal(const void *p1, const void *p2, const UA_DataType *type) {
 2680|    999|    return (UA_order(p1, p2, type) == UA_ORDER_EQ);
 2681|    999|}
UA_Array_new:
 2688|     26|UA_Array_new(size_t size, const UA_DataType *type) {
 2689|     26|    if(size > UA_INT32_MAX)
  ------------------
  |  |  101|     26|#define UA_INT32_MAX 2147483647L
  ------------------
  |  Branch (2689:8): [True: 0, False: 26]
  ------------------
 2690|      0|        return NULL;
 2691|     26|    if(size == 0)
  ------------------
  |  Branch (2691:8): [True: 10, False: 16]
  ------------------
 2692|     10|        return UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|     10|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
 2693|     16|    return UA_calloc(size, type->memSize);
  ------------------
  |  |   20|     16|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
 2694|     26|}
UA_Array_copy:
 2698|     92|              void **dst, const UA_DataType *type) {
 2699|     92|    if(size == 0) {
  ------------------
  |  Branch (2699:8): [True: 0, False: 92]
  ------------------
 2700|      0|        if(src == NULL)
  ------------------
  |  Branch (2700:12): [True: 0, False: 0]
  ------------------
 2701|      0|            *dst = NULL;
 2702|      0|        else
 2703|      0|            *dst= UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|      0|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
 2704|      0|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2705|      0|    }
 2706|       |
 2707|       |    /* Check the array consistency -- defensive programming in case the user
 2708|       |     * manually created an inconsistent array */
 2709|     92|    if(UA_UNLIKELY(!type || !src))
  ------------------
  |  |  580|    184|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  ------------------
  |  |  |  Branch (580:25): [True: 0, False: 92]
  |  |  |  Branch (580:43): [True: 0, False: 92]
  |  |  |  Branch (580:43): [True: 0, False: 92]
  |  |  ------------------
  ------------------
 2710|      0|        return UA_STATUSCODE_BADINTERNALERROR;
  ------------------
  |  |   29|      0|#define UA_STATUSCODE_BADINTERNALERROR ((UA_StatusCode) 0x80020000)
  ------------------
 2711|       |
 2712|       |    /* calloc, so we don't have to check retval in every iteration of copying */
 2713|     92|    *dst = UA_calloc(size, type->memSize);
  ------------------
  |  |   20|     92|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
 2714|     92|    if(!*dst)
  ------------------
  |  Branch (2714:8): [True: 0, False: 92]
  ------------------
 2715|      0|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 2716|       |
 2717|     92|    if(type->pointerFree) {
  ------------------
  |  Branch (2717:8): [True: 92, False: 0]
  ------------------
 2718|     92|        memcpy(*dst, src, type->memSize * size);
 2719|     92|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     92|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2720|     92|    }
 2721|       |
 2722|      0|    uintptr_t ptrs = (uintptr_t)src;
 2723|      0|    uintptr_t ptrd = (uintptr_t)*dst;
 2724|      0|    UA_StatusCode retval = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2725|      0|    for(size_t i = 0; i < size; ++i) {
  ------------------
  |  Branch (2725:23): [True: 0, False: 0]
  ------------------
 2726|      0|        retval |= UA_copy((void*)ptrs, (void*)ptrd, type);
 2727|      0|        ptrs += type->memSize;
 2728|      0|        ptrd += type->memSize;
 2729|      0|    }
 2730|      0|    if(retval != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2730:8): [True: 0, False: 0]
  ------------------
 2731|      0|        UA_Array_delete(*dst, size, type);
 2732|       |        *dst = NULL;
 2733|      0|    }
 2734|      0|    return retval;
 2735|     92|}
UA_Array_delete:
 2826|  8.70k|UA_Array_delete(void *p, size_t size, const UA_DataType *type) {
 2827|  8.70k|    if(!type->pointerFree) {
  ------------------
  |  Branch (2827:8): [True: 702, False: 8.00k]
  ------------------
 2828|    702|        uintptr_t ptr = (uintptr_t)p;
 2829|  1.26k|        for(size_t i = 0; i < size; ++i) {
  ------------------
  |  Branch (2829:27): [True: 562, False: 702]
  ------------------
 2830|    562|            UA_clear((void*)ptr, type);
 2831|    562|            ptr += type->memSize;
 2832|    562|        }
 2833|    702|    }
 2834|  8.70k|    UA_free((void*)((uintptr_t)p & ~(uintptr_t)UA_EMPTY_ARRAY_SENTINEL));
  ------------------
  |  |   19|  8.70k|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 2835|  8.70k|}
ua_types.c:casecmp:
  260|    146|casecmp(const UA_Byte *l, const UA_Byte *r, size_t n) {
  261|    146|    if(!n--) return 0;
  ------------------
  |  Branch (261:8): [True: 0, False: 146]
  ------------------
  262|    730|    for(; *l && *r && n && (*l == *r || lowercase(*l) == lowercase(*r)); l++, r++, n--);
  ------------------
  |  Branch (262:11): [True: 730, False: 0]
  |  Branch (262:17): [True: 730, False: 0]
  |  Branch (262:23): [True: 584, False: 146]
  |  Branch (262:29): [True: 584, False: 0]
  |  Branch (262:41): [True: 0, False: 0]
  ------------------
  263|    146|    return lowercase(*l) - lowercase(*r);
  264|    146|}
ua_types.c:lowercase:
  254|    292|lowercase(UA_Byte c) {
  255|    292|    if(((int)c) - 'A' < 26) return c | 32;
  ------------------
  |  Branch (255:8): [True: 0, False: 292]
  ------------------
  256|    292|    return c;
  257|    292|}
ua_types.c:nodeIdSize:
  923|    219|           UA_Escaping idEsc) {
  924|       |    /* Namespace length */
  925|    219|    size_t len = 0;
  926|    219|    if(nsUri.data != NULL) {
  ------------------
  |  Branch (926:8): [True: 0, False: 219]
  ------------------
  927|      0|        len += 5; /* nsu=; */
  928|      0|        len += UA_String_escapedSize(nsUri, UA_ESCAPING_PERCENT);
  929|    219|    } else if(id->namespaceIndex > 0) {
  ------------------
  |  Branch (929:15): [True: 0, False: 219]
  ------------------
  930|      0|        len += 4; /* ns=; */
  931|      0|        size_t nsStrSize = itoaUnsigned(id->namespaceIndex, (char*)nsStr, 10);
  932|      0|        nsStr[nsStrSize] = 0;
  933|      0|        len += nsStrSize;
  934|      0|    }
  935|       |
  936|    219|    len += 2; /* ?= */
  937|       |
  938|    219|    switch (id->identifierType) {
  939|    219|    case UA_NODEIDTYPE_NUMERIC: {
  ------------------
  |  Branch (939:5): [True: 219, False: 0]
  ------------------
  940|    219|        size_t numIdStrSize = itoaUnsigned(id->identifier.numeric, (char*)numIdStr, 10);
  941|    219|        numIdStr[numIdStrSize] = 0;
  942|    219|        len += numIdStrSize;
  943|    219|        break;
  944|      0|    }
  945|      0|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (945:5): [True: 0, False: 219]
  ------------------
  946|      0|        len += UA_String_escapedSize(id->identifier.string, idEsc);
  947|      0|        break;
  948|      0|    case UA_NODEIDTYPE_GUID:
  ------------------
  |  Branch (948:5): [True: 0, False: 219]
  ------------------
  949|      0|        len += 36;
  950|      0|        break;
  951|      0|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (951:5): [True: 0, False: 219]
  ------------------
  952|      0|        len += 4 * ((id->identifier.byteString.length + 2) / 3);
  953|      0|        break;
  954|      0|    default:
  ------------------
  |  Branch (954:5): [True: 0, False: 219]
  ------------------
  955|      0|        len = 0;
  956|    219|    }
  957|    219|    return len;
  958|    219|}
ua_types.c:printNodeIdBody:
  962|    219|                const UA_NamespaceMapping *nsMapping, UA_Escaping idEsc) {
  963|    219|    size_t len;
  964|       |
  965|       |    /* Encode the namespace */
  966|    219|    if(nsUri.data != NULL) {
  ------------------
  |  Branch (966:8): [True: 0, False: 219]
  ------------------
  967|      0|        memcpy(pos, "nsu=", 4);
  968|      0|        pos += 4;
  969|      0|        pos += UA_String_escapeInsert(pos, nsUri, UA_ESCAPING_PERCENT);
  970|      0|        *pos++ = ';';
  971|    219|    } else if(id->namespaceIndex > 0) {
  ------------------
  |  Branch (971:15): [True: 0, False: 219]
  ------------------
  972|      0|        memcpy(pos, "ns=", 3);
  973|      0|        pos += 3;
  974|      0|        len = strlen((char*)nsStr);
  975|      0|        memcpy(pos, nsStr, len);
  976|      0|        pos += len;
  977|      0|        *pos++ = ';';
  978|      0|    }
  979|       |
  980|       |    /* Encode the identifier */
  981|    219|    switch(id->identifierType) {
  ------------------
  |  Branch (981:12): [True: 219, False: 0]
  ------------------
  982|    219|    case UA_NODEIDTYPE_NUMERIC:
  ------------------
  |  Branch (982:5): [True: 219, False: 0]
  ------------------
  983|    219|        memcpy(pos, "i=", 2);
  984|    219|        pos += 2;
  985|    219|        len = strlen((char*)numIdStr);
  986|    219|        memcpy(pos, numIdStr, len);
  987|    219|        pos += len;
  988|    219|        break;
  989|      0|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (989:5): [True: 0, False: 219]
  ------------------
  990|      0|        memcpy(pos, "s=", 2);
  991|      0|        pos += 2;
  992|      0|        pos += UA_String_escapeInsert(pos, id->identifier.string, idEsc);
  993|      0|        break;
  994|      0|    case UA_NODEIDTYPE_GUID:
  ------------------
  |  Branch (994:5): [True: 0, False: 219]
  ------------------
  995|      0|        memcpy(pos, "g=", 2);
  996|      0|        pos += 2;
  997|      0|        UA_Guid_to_hex(&id->identifier.guid, pos, true);
  998|      0|        pos += 36;
  999|      0|        break;
 1000|      0|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (1000:5): [True: 0, False: 219]
  ------------------
 1001|      0|        memcpy(pos, "b=", 2);
 1002|      0|        pos += 2;
 1003|       |        /* Use base64url encoding for percent-escaping.
 1004|       |         * Replace +/ with -_ and remove the padding. */
 1005|      0|        u8 *bpos = pos;
 1006|      0|        pos += UA_base64_buf(id->identifier.byteString.data,
 1007|      0|                             id->identifier.byteString.length, pos);
 1008|      0|        if(idEsc == UA_ESCAPING_PERCENT ||
  ------------------
  |  Branch (1008:12): [True: 0, False: 0]
  ------------------
 1009|      0|           idEsc == UA_ESCAPING_PERCENT_EXTENDED) {
  ------------------
  |  Branch (1009:12): [True: 0, False: 0]
  ------------------
 1010|      0|            while(pos > bpos && pos[-1] == '=')
  ------------------
  |  Branch (1010:19): [True: 0, False: 0]
  |  Branch (1010:33): [True: 0, False: 0]
  ------------------
 1011|      0|                pos--;
 1012|      0|            for(; bpos < pos; bpos++) {
  ------------------
  |  Branch (1012:19): [True: 0, False: 0]
  ------------------
 1013|      0|                if(*bpos == '+') *bpos = '-';
  ------------------
  |  Branch (1013:20): [True: 0, False: 0]
  ------------------
 1014|      0|                else if(*bpos == '/') *bpos = '_';
  ------------------
  |  Branch (1014:25): [True: 0, False: 0]
  ------------------
 1015|      0|            }
 1016|      0|        }
 1017|      0|        break;
 1018|    219|    }
 1019|    219|    return pos;
 1020|    219|}
ua_types.c:Variant_clear:
 1379|  4.91k|Variant_clear(void *p, const UA_DataType *_) {
 1380|  4.91k|    UA_Variant *v = (UA_Variant *)p;
 1381|       |
 1382|       |    /* The content is "borrowed" */
 1383|  4.91k|    if(v->storageType == UA_VARIANT_DATA_NODELETE)
  ------------------
  |  Branch (1383:8): [True: 0, False: 4.91k]
  ------------------
 1384|      0|        return;
 1385|       |
 1386|       |    /* Delete the value */
 1387|  4.91k|    if(v->type && v->data > UA_EMPTY_ARRAY_SENTINEL) {
  ------------------
  |  |  756|  4.46k|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  |  Branch (1387:8): [True: 4.46k, False: 458]
  |  Branch (1387:19): [True: 4.45k, False: 10]
  ------------------
 1388|  4.45k|        if(v->arrayLength == 0)
  ------------------
  |  Branch (1388:12): [True: 4.43k, False: 16]
  ------------------
 1389|  4.43k|            v->arrayLength = 1;
 1390|  4.45k|        UA_Array_delete(v->data, v->arrayLength, v->type);
 1391|  4.45k|        v->data = NULL;
 1392|  4.45k|    }
 1393|       |
 1394|       |    /* Delete the array dimensions */
 1395|  4.91k|    if((void*)v->arrayDimensions > UA_EMPTY_ARRAY_SENTINEL)
  ------------------
  |  |  756|  4.91k|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  |  Branch (1395:8): [True: 0, False: 4.91k]
  ------------------
 1396|      0|        UA_free(v->arrayDimensions);
  ------------------
  |  |   19|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1397|  4.91k|}
ua_types.c:DataValue_clear:
 1851|     10|DataValue_clear(void *p, const UA_DataType *_) {
 1852|     10|    UA_DataValue *dv = (UA_DataValue *)p;
 1853|       |    Variant_clear(&dv->value, NULL);
 1854|     10|}
ua_types.c:String_copy:
  281|     92|String_copy(const void *src, void *dst, const UA_DataType *_) {
  282|     92|    const UA_String *srcS = (const UA_String*)src;
  283|     92|    UA_String *dstS = (UA_String *)dst;
  284|     92|    UA_StatusCode res =
  285|     92|        UA_Array_copy(srcS->data, srcS->length, (void**)&dstS->data,
  286|     92|                      &UA_TYPES[UA_TYPES_BYTE]);
  ------------------
  |  |   89|     92|#define UA_TYPES_BYTE 2
  ------------------
  287|     92|    if(res == UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|     92|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (287:8): [True: 92, False: 0]
  ------------------
  288|     92|        dstS->length = srcS->length;
  289|     92|    return res;
  290|     92|}
ua_types.c:nopClear:
 2162|    513|static void nopClear(void *p, const UA_DataType *type) { }
ua_types.c:String_clear:
  293|  4.09k|String_clear(void *p, const UA_DataType *_) {
  294|  4.09k|    UA_String *s = (UA_String*)p;
  295|  4.09k|    UA_Array_delete(s->data, s->length, &UA_TYPES[UA_TYPES_BYTE]);
  ------------------
  |  |   89|  4.09k|#define UA_TYPES_BYTE 2
  ------------------
  296|  4.09k|}
ua_types.c:NodeId_clear:
  772|    201|NodeId_clear(void *p, const UA_DataType *_) {
  773|    201|    UA_NodeId *id = (UA_NodeId*)p;
  774|    201|    switch(id->identifierType) {
  775|      0|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (775:5): [True: 0, False: 201]
  ------------------
  776|      0|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (776:5): [True: 0, False: 201]
  ------------------
  777|      0|        String_clear(&id->identifier.string, NULL);
  778|      0|        break;
  779|    201|    default: break;
  ------------------
  |  Branch (779:5): [True: 201, False: 0]
  ------------------
  780|    201|    }
  781|    201|}
ua_types.c:ExpandedNodeId_clear:
 1073|     11|ExpandedNodeId_clear(void *p, const UA_DataType *_) {
 1074|     11|    UA_ExpandedNodeId *id = (UA_ExpandedNodeId*)p;
 1075|     11|    NodeId_clear(&id->nodeId, NULL);
 1076|       |    String_clear(&id->namespaceUri, NULL);
 1077|     11|}
ua_types.c:QualifiedName_clear:
  397|      8|QualifiedName_clear(void *p, const UA_DataType *_) {
  398|      8|    UA_QualifiedName *qn = (UA_QualifiedName*)p;
  399|       |    String_clear(&qn->name, NULL);
  400|      8|}
ua_types.c:LocalizedText_clear:
 1834|     34|LocalizedText_clear(void *p, const UA_DataType *_) {
 1835|     34|    UA_LocalizedText *lt = (UA_LocalizedText *)p;
 1836|     34|    String_clear(&lt->locale, NULL);
 1837|       |    String_clear(&lt->text, NULL);
 1838|     34|}
ua_types.c:ExtensionObject_clear:
 1246|    127|ExtensionObject_clear(void *p, const UA_DataType *_) {
 1247|    127|    UA_ExtensionObject *eo = (UA_ExtensionObject *)p;
 1248|    127|    switch(eo->encoding) {
 1249|     54|    case UA_EXTENSIONOBJECT_ENCODED_NOBODY:
  ------------------
  |  Branch (1249:5): [True: 54, False: 73]
  ------------------
 1250|     54|    case UA_EXTENSIONOBJECT_ENCODED_BYTESTRING:
  ------------------
  |  Branch (1250:5): [True: 0, False: 127]
  ------------------
 1251|    127|    case UA_EXTENSIONOBJECT_ENCODED_XML:
  ------------------
  |  Branch (1251:5): [True: 73, False: 54]
  ------------------
 1252|    127|    case UA_EXTENSIONOBJECT_ENCODED_JSON:
  ------------------
  |  Branch (1252:5): [True: 0, False: 127]
  ------------------
 1253|    127|        NodeId_clear(&eo->content.encoded.typeId, NULL);
 1254|    127|        String_clear(&eo->content.encoded.body, NULL);
 1255|    127|        break;
 1256|      0|    case UA_EXTENSIONOBJECT_DECODED:
  ------------------
  |  Branch (1256:5): [True: 0, False: 127]
  ------------------
 1257|      0|        if(eo->content.decoded.data)
  ------------------
  |  Branch (1257:12): [True: 0, False: 0]
  ------------------
 1258|      0|            UA_delete(eo->content.decoded.data, eo->content.decoded.type);
 1259|      0|        break;
 1260|      0|    default:
  ------------------
  |  Branch (1260:5): [True: 0, False: 127]
  ------------------
 1261|      0|        break;
 1262|    127|    }
 1263|    127|}
ua_types.c:DiagnosticInfo_clear:
 1881|     12|DiagnosticInfo_clear(void *p, const UA_DataType *_) {
 1882|     12|    UA_DiagnosticInfo *di = (UA_DiagnosticInfo *)p;
 1883|       |
 1884|     12|    String_clear(&di->additionalInfo, NULL);
 1885|     12|    if(di->hasInnerDiagnosticInfo && di->innerDiagnosticInfo) {
  ------------------
  |  Branch (1885:8): [True: 0, False: 12]
  |  Branch (1885:38): [True: 0, False: 0]
  ------------------
 1886|      0|        DiagnosticInfo_clear(di->innerDiagnosticInfo, NULL);
 1887|      0|        UA_free(di->innerDiagnosticInfo);
  ------------------
  |  |   19|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1888|      0|    }
 1889|     12|}
ua_types.c:clearStructure:
 2106|    250|clearStructure(void *p, const UA_DataType *type) {
 2107|    250|    uintptr_t ptr = (uintptr_t)p;
 2108|  1.40k|    for(size_t i = 0; i < type->membersSize; ++i) {
  ------------------
  |  Branch (2108:23): [True: 1.15k, False: 250]
  ------------------
 2109|  1.15k|        const UA_DataTypeMember *m = &type->members[i];
 2110|  1.15k|        const UA_DataType *mt = m->memberType;
 2111|  1.15k|        ptr += m->padding;
 2112|  1.15k|        if(!m->isOptional) {
  ------------------
  |  Branch (2112:12): [True: 1.15k, False: 0]
  ------------------
 2113|  1.15k|            if(!m->isArray) {
  ------------------
  |  Branch (2113:16): [True: 1.00k, False: 158]
  ------------------
 2114|  1.00k|                clearJumpTable[mt->typeKind]((void*)ptr, mt);
 2115|  1.00k|                ptr += mt->memSize;
 2116|  1.00k|            } else {
 2117|    158|                size_t length = *(size_t*)ptr;
 2118|    158|                ptr += sizeof(size_t);
 2119|    158|                UA_Array_delete(*(void**)ptr, length, mt);
 2120|    158|                ptr += sizeof(void*);
 2121|    158|            }
 2122|  1.15k|        } else { /* field is optional */
 2123|      0|            if(!m->isArray) {
  ------------------
  |  Branch (2123:16): [True: 0, False: 0]
  ------------------
 2124|       |                /* optional scalar field is contained */
 2125|      0|                if((*(void *const *)ptr != NULL))
  ------------------
  |  Branch (2125:20): [True: 0, False: 0]
  ------------------
 2126|      0|                    UA_Array_delete(*(void **)ptr, 1, mt);
 2127|      0|                ptr += sizeof(void *);
 2128|      0|            } else {
 2129|       |                /* optional array field is contained */
 2130|      0|                if((*(void *const *)(ptr + sizeof(size_t)) != NULL)) {
  ------------------
  |  Branch (2130:20): [True: 0, False: 0]
  ------------------
 2131|      0|                    size_t length = *(size_t *)ptr;
 2132|      0|                    ptr += sizeof(size_t);
 2133|      0|                    UA_Array_delete(*(void **)ptr, length, mt);
 2134|      0|                    ptr += sizeof(void *);
 2135|      0|                } else { /* optional array field not contained */
 2136|      0|                    ptr += sizeof(size_t);
 2137|      0|                    ptr += sizeof(void *);
 2138|      0|                }
 2139|      0|            }
 2140|      0|        }
 2141|  1.15k|    }
 2142|    250|}
ua_types.c:guidOrder:
 2259|     12|guidOrder(const void *p1_, const void *p2_, const UA_DataType *type) {
 2260|     12|    const UA_Guid *p1 = (const UA_Guid*)p1_;
 2261|     12|    const UA_Guid *p2 = (const UA_Guid*)p2_;
 2262|     12|    if(p1->data1 != p2->data1)
  ------------------
  |  Branch (2262:8): [True: 0, False: 12]
  ------------------
 2263|      0|        return (p1->data1 < p2->data1) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2263:16): [True: 0, False: 0]
  ------------------
 2264|     12|    if(p1->data2 != p2->data2)
  ------------------
  |  Branch (2264:8): [True: 0, False: 12]
  ------------------
 2265|      0|        return (p1->data2 < p2->data2) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2265:16): [True: 0, False: 0]
  ------------------
 2266|     12|    if(p1->data3 != p2->data3)
  ------------------
  |  Branch (2266:8): [True: 0, False: 12]
  ------------------
 2267|      0|        return (p1->data3 < p2->data3) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2267:16): [True: 0, False: 0]
  ------------------
 2268|     12|    int cmp = memcmp(p1->data4, p2->data4, 8);
 2269|     12|    if(cmp != 0)
  ------------------
  |  Branch (2269:8): [True: 0, False: 12]
  ------------------
 2270|      0|        return (cmp < 0) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2270:16): [True: 0, False: 0]
  ------------------
 2271|     12|    return UA_ORDER_EQ;
 2272|     12|}
ua_types.c:nodeIdOrder:
 2292|  35.9k|nodeIdOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2293|  35.9k|    const UA_NodeId *p1 = (const UA_NodeId*)p1_;
 2294|  35.9k|    const UA_NodeId *p2 = (const UA_NodeId*)p2_;
 2295|       |    /* Compare namespaceIndex */
 2296|  35.9k|    if(p1->namespaceIndex != p2->namespaceIndex)
  ------------------
  |  Branch (2296:8): [True: 0, False: 35.9k]
  ------------------
 2297|      0|        return (p1->namespaceIndex < p2->namespaceIndex) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2297:16): [True: 0, False: 0]
  ------------------
 2298|       |
 2299|       |    /* Compare identifierType */
 2300|  35.9k|    if(p1->identifierType != p2->identifierType)
  ------------------
  |  Branch (2300:8): [True: 0, False: 35.9k]
  ------------------
 2301|      0|        return (p1->identifierType < p2->identifierType) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2301:16): [True: 0, False: 0]
  ------------------
 2302|       |
 2303|       |    /* Compare the identifier */
 2304|  35.9k|    switch(p1->identifierType) {
 2305|  35.9k|    case UA_NODEIDTYPE_NUMERIC:
  ------------------
  |  Branch (2305:5): [True: 35.9k, False: 0]
  ------------------
 2306|  35.9k|    default:
  ------------------
  |  Branch (2306:5): [True: 0, False: 35.9k]
  ------------------
 2307|  35.9k|        if(p1->identifier.numeric != p2->identifier.numeric)
  ------------------
  |  Branch (2307:12): [True: 35.7k, False: 217]
  ------------------
 2308|  35.7k|            return (p1->identifier.numeric < p2->identifier.numeric) ?
  ------------------
  |  Branch (2308:20): [True: 12.0k, False: 23.6k]
  ------------------
 2309|  23.6k|                UA_ORDER_LESS : UA_ORDER_MORE;
 2310|    217|        return UA_ORDER_EQ;
 2311|      0|    case UA_NODEIDTYPE_GUID:
  ------------------
  |  Branch (2311:5): [True: 0, False: 35.9k]
  ------------------
 2312|      0|        return guidOrder(&p1->identifier.guid, &p2->identifier.guid, NULL);
 2313|      0|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (2313:5): [True: 0, False: 35.9k]
  ------------------
 2314|      0|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (2314:5): [True: 0, False: 35.9k]
  ------------------
 2315|       |        return stringOrder(&p1->identifier.string, &p2->identifier.string, NULL);
 2316|  35.9k|    }
 2317|  35.9k|}
ua_types.c:expandedNodeIdOrder:
 2320|     20|expandedNodeIdOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2321|     20|    const UA_ExpandedNodeId *p1 = (const UA_ExpandedNodeId*)p1_;
 2322|     20|    const UA_ExpandedNodeId *p2 = (const UA_ExpandedNodeId*)p2_;
 2323|     20|    if(p1->serverIndex != p2->serverIndex)
  ------------------
  |  Branch (2323:8): [True: 0, False: 20]
  ------------------
 2324|      0|        return (p1->serverIndex < p2->serverIndex) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2324:16): [True: 0, False: 0]
  ------------------
 2325|     20|    UA_Order o = stringOrder(&p1->namespaceUri, &p2->namespaceUri, NULL);
 2326|     20|    if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2326:8): [True: 0, False: 20]
  ------------------
 2327|      0|        return o;
 2328|     20|    return nodeIdOrder(&p1->nodeId, &p2->nodeId, NULL);
 2329|     20|}
ua_types.c:booleanOrder:
 2217|     70|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2218|     70|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2219|     70|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2220|     70|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2220:12): [True: 0, False: 70]
  ------------------
 2221|     70|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2221:20): [True: 0, False: 0]
  ------------------
 2222|     70|        return UA_ORDER_EQ;                                               \
 2223|     70|    }
ua_types.c:sByteOrder:
 2217|     31|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2218|     31|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2219|     31|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2220|     31|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2220:12): [True: 0, False: 31]
  ------------------
 2221|     31|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2221:20): [True: 0, False: 0]
  ------------------
 2222|     31|        return UA_ORDER_EQ;                                               \
 2223|     31|    }
ua_types.c:byteOrder:
 2217|     44|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2218|     44|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2219|     44|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2220|     44|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2220:12): [True: 0, False: 44]
  ------------------
 2221|     44|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2221:20): [True: 0, False: 0]
  ------------------
 2222|     44|        return UA_ORDER_EQ;                                               \
 2223|     44|    }
ua_types.c:int16Order:
 2217|     65|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2218|     65|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2219|     65|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2220|     65|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2220:12): [True: 0, False: 65]
  ------------------
 2221|     65|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2221:20): [True: 0, False: 0]
  ------------------
 2222|     65|        return UA_ORDER_EQ;                                               \
 2223|     65|    }
ua_types.c:uInt16Order:
 2217|     41|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2218|     41|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2219|     41|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2220|     41|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2220:12): [True: 0, False: 41]
  ------------------
 2221|     41|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2221:20): [True: 0, False: 0]
  ------------------
 2222|     41|        return UA_ORDER_EQ;                                               \
 2223|     41|    }
ua_types.c:int32Order:
 2217|    171|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2218|    171|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2219|    171|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2220|    171|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2220:12): [True: 0, False: 171]
  ------------------
 2221|    171|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2221:20): [True: 0, False: 0]
  ------------------
 2222|    171|        return UA_ORDER_EQ;                                               \
 2223|    171|    }
ua_types.c:uInt32Order:
 2217|    784|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2218|    784|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2219|    784|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2220|    784|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2220:12): [True: 0, False: 784]
  ------------------
 2221|    784|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2221:20): [True: 0, False: 0]
  ------------------
 2222|    784|        return UA_ORDER_EQ;                                               \
 2223|    784|    }
ua_types.c:int64Order:
 2217|    302|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2218|    302|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2219|    302|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2220|    302|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2220:12): [True: 0, False: 302]
  ------------------
 2221|    302|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2221:20): [True: 0, False: 0]
  ------------------
 2222|    302|        return UA_ORDER_EQ;                                               \
 2223|    302|    }
ua_types.c:uInt64Order:
 2217|    101|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2218|    101|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2219|    101|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2220|    101|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2220:12): [True: 0, False: 101]
  ------------------
 2221|    101|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2221:20): [True: 0, False: 0]
  ------------------
 2222|    101|        return UA_ORDER_EQ;                                               \
 2223|    101|    }
ua_types.c:floatOrder:
 2237|     12|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2238|     12|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2239|     12|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2240|     12|        if(*p1 != *p2) {                                                  \
  ------------------
  |  Branch (2240:12): [True: 0, False: 12]
  ------------------
 2241|      0|            /* p1 is NaN */                                         \
 2242|      0|            if(*p1 != *p1) {                                        \
  ------------------
  |  Branch (2242:16): [True: 0, False: 0]
  ------------------
 2243|      0|                if(*p2 != *p2)                                      \
  ------------------
  |  Branch (2243:20): [True: 0, False: 0]
  ------------------
 2244|      0|                    return UA_ORDER_EQ;                             \
 2245|      0|                return UA_ORDER_LESS;                               \
 2246|      0|            }                                                       \
 2247|      0|            /* p2 is NaN */                                         \
 2248|      0|            if(*p2 != *p2)                                          \
  ------------------
  |  Branch (2248:16): [True: 0, False: 0]
  ------------------
 2249|      0|                return UA_ORDER_MORE;                               \
 2250|      0|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;     \
  ------------------
  |  Branch (2250:20): [True: 0, False: 0]
  ------------------
 2251|      0|        }                                                           \
 2252|     12|        return UA_ORDER_EQ;                                         \
 2253|     12|    }
ua_types.c:doubleOrder:
 2237|    733|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2238|    733|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2239|    733|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2240|    733|        if(*p1 != *p2) {                                                  \
  ------------------
  |  Branch (2240:12): [True: 3, False: 730]
  ------------------
 2241|      3|            /* p1 is NaN */                                         \
 2242|      3|            if(*p1 != *p1) {                                        \
  ------------------
  |  Branch (2242:16): [True: 3, False: 0]
  ------------------
 2243|      3|                if(*p2 != *p2)                                      \
  ------------------
  |  Branch (2243:20): [True: 3, False: 0]
  ------------------
 2244|      3|                    return UA_ORDER_EQ;                             \
 2245|      3|                return UA_ORDER_LESS;                               \
 2246|      3|            }                                                       \
 2247|      3|            /* p2 is NaN */                                         \
 2248|      3|            if(*p2 != *p2)                                          \
  ------------------
  |  Branch (2248:16): [True: 0, False: 0]
  ------------------
 2249|      0|                return UA_ORDER_MORE;                               \
 2250|      0|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;     \
  ------------------
  |  Branch (2250:20): [True: 0, False: 0]
  ------------------
 2251|      0|        }                                                           \
 2252|    733|        return UA_ORDER_EQ;                                         \
 2253|    733|    }
ua_types.c:stringOrder:
 2275|  10.2k|stringOrder(const void *p1_, const void *p2_, const UA_DataType *type) {
 2276|  10.2k|    const UA_String *p1 = (const UA_String*)p1_;
 2277|  10.2k|    const UA_String *p2 = (const UA_String*)p2_;
 2278|  10.2k|    if(p1->length != p2->length)
  ------------------
  |  Branch (2278:8): [True: 2.53k, False: 7.71k]
  ------------------
 2279|  2.53k|        return (p1->length < p2->length) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2279:16): [True: 1.61k, False: 918]
  ------------------
 2280|       |    /* For zero-length arrays, every pointer not NULL is considered a
 2281|       |     * UA_EMPTY_ARRAY_SENTINEL. */
 2282|  7.71k|    if(p1->data == p2->data) return UA_ORDER_EQ;
  ------------------
  |  Branch (2282:8): [True: 612, False: 7.10k]
  ------------------
 2283|  7.10k|    if(p1->data == NULL) return UA_ORDER_LESS;
  ------------------
  |  Branch (2283:8): [True: 0, False: 7.10k]
  ------------------
 2284|  7.10k|    if(p2->data == NULL) return UA_ORDER_MORE;
  ------------------
  |  Branch (2284:8): [True: 0, False: 7.10k]
  ------------------
 2285|  7.10k|    int cmp = memcmp((const char*)p1->data, (const char*)p2->data, p1->length);
 2286|  7.10k|    if(cmp != 0)
  ------------------
  |  Branch (2286:8): [True: 2.22k, False: 4.87k]
  ------------------
 2287|  2.22k|        return (cmp < 0) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2287:16): [True: 1.34k, False: 880]
  ------------------
 2288|  4.87k|    return UA_ORDER_EQ;
 2289|  7.10k|}
ua_types.c:qualifiedNameOrder:
 2332|     16|qualifiedNameOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2333|     16|    const UA_QualifiedName *p1 = (const UA_QualifiedName*)p1_;
 2334|     16|    const UA_QualifiedName *p2 = (const UA_QualifiedName*)p2_;
 2335|     16|    if(p1->namespaceIndex != p2->namespaceIndex)
  ------------------
  |  Branch (2335:8): [True: 0, False: 16]
  ------------------
 2336|      0|        return (p1->namespaceIndex < p2->namespaceIndex) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2336:16): [True: 0, False: 0]
  ------------------
 2337|     16|    return stringOrder(&p1->name, &p2->name, NULL);
 2338|     16|}
ua_types.c:localizedTextOrder:
 2341|     68|localizedTextOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2342|     68|    const UA_LocalizedText *p1 = (const UA_LocalizedText*)p1_;
 2343|     68|    const UA_LocalizedText *p2 = (const UA_LocalizedText*)p2_;
 2344|     68|    UA_Order o = stringOrder(&p1->locale, &p2->locale, NULL);
 2345|     68|    if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2345:8): [True: 0, False: 68]
  ------------------
 2346|      0|        return o;
 2347|     68|    return stringOrder(&p1->text, &p2->text, NULL);
 2348|     68|}
ua_types.c:extensionObjectOrder:
 2351|    105|extensionObjectOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2352|    105|    const UA_ExtensionObject *p1 = (const UA_ExtensionObject*)p1_;
 2353|    105|    const UA_ExtensionObject *p2 = (const UA_ExtensionObject*)p2_;
 2354|    105|    UA_ExtensionObjectEncoding enc1 = p1->encoding;
 2355|    105|    UA_ExtensionObjectEncoding enc2 = p2->encoding;
 2356|    105|    if(enc1 == UA_EXTENSIONOBJECT_DECODED_NODELETE)
  ------------------
  |  Branch (2356:8): [True: 0, False: 105]
  ------------------
 2357|      0|        enc1 = UA_EXTENSIONOBJECT_DECODED;
 2358|    105|    if(enc2 == UA_EXTENSIONOBJECT_DECODED_NODELETE)
  ------------------
  |  Branch (2358:8): [True: 0, False: 105]
  ------------------
 2359|      0|        enc2 = UA_EXTENSIONOBJECT_DECODED;
 2360|    105|    if(enc1 != enc2)
  ------------------
  |  Branch (2360:8): [True: 0, False: 105]
  ------------------
 2361|      0|        return (enc1 < enc2) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2361:16): [True: 0, False: 0]
  ------------------
 2362|       |
 2363|    105|    switch(enc1) {
 2364|    105|    case UA_EXTENSIONOBJECT_ENCODED_NOBODY:
  ------------------
  |  Branch (2364:5): [True: 105, False: 0]
  ------------------
 2365|    105|        return UA_ORDER_EQ;
 2366|       |
 2367|      0|    case UA_EXTENSIONOBJECT_ENCODED_BYTESTRING:
  ------------------
  |  Branch (2367:5): [True: 0, False: 105]
  ------------------
 2368|      0|    case UA_EXTENSIONOBJECT_ENCODED_XML:
  ------------------
  |  Branch (2368:5): [True: 0, False: 105]
  ------------------
 2369|      0|    case UA_EXTENSIONOBJECT_ENCODED_JSON: {
  ------------------
  |  Branch (2369:5): [True: 0, False: 105]
  ------------------
 2370|      0|            UA_Order o = nodeIdOrder(&p1->content.encoded.typeId,
 2371|      0|                                     &p2->content.encoded.typeId, NULL);
 2372|      0|            if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2372:16): [True: 0, False: 0]
  ------------------
 2373|      0|                return o;
 2374|      0|            return stringOrder((const UA_String*)&p1->content.encoded.body,
 2375|      0|                               (const UA_String*)&p2->content.encoded.body, NULL);
 2376|      0|        }
 2377|       |
 2378|      0|    case UA_EXTENSIONOBJECT_DECODED:
  ------------------
  |  Branch (2378:5): [True: 0, False: 105]
  ------------------
 2379|      0|    default: {
  ------------------
  |  Branch (2379:5): [True: 0, False: 105]
  ------------------
 2380|      0|            const UA_DataType *type1 = p1->content.decoded.type;
 2381|      0|            const UA_DataType *type2 = p2->content.decoded.type;
 2382|      0|            if(type1 != type2)
  ------------------
  |  Branch (2382:16): [True: 0, False: 0]
  ------------------
 2383|      0|                return ((uintptr_t)type1 < (uintptr_t)type2) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2383:24): [True: 0, False: 0]
  ------------------
 2384|      0|            if(!type1)
  ------------------
  |  Branch (2384:16): [True: 0, False: 0]
  ------------------
 2385|      0|                return UA_ORDER_EQ;
 2386|      0|            return orderJumpTable[type1->typeKind]
 2387|      0|                (p1->content.decoded.data, p2->content.decoded.data, type1);
 2388|      0|        }
 2389|    105|    }
 2390|    105|}
ua_types.c:dataValueOrder:
 2454|     17|dataValueOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2455|     17|    const UA_DataValue *p1 = (const UA_DataValue*)p1_;
 2456|     17|    const UA_DataValue *p2 = (const UA_DataValue*)p2_;
 2457|       |    /* Value */
 2458|     17|    if(p1->hasValue != p2->hasValue)
  ------------------
  |  Branch (2458:8): [True: 0, False: 17]
  ------------------
 2459|      0|        return (!p1->hasValue) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2459:16): [True: 0, False: 0]
  ------------------
 2460|     17|    if(p1->hasValue) {
  ------------------
  |  Branch (2460:8): [True: 0, False: 17]
  ------------------
 2461|      0|        UA_Order o = variantOrder(&p1->value, &p2->value, NULL);
 2462|      0|        if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2462:12): [True: 0, False: 0]
  ------------------
 2463|      0|            return o;
 2464|      0|    }
 2465|       |
 2466|       |    /* Status */
 2467|     17|    if(p1->hasStatus != p2->hasStatus)
  ------------------
  |  Branch (2467:8): [True: 0, False: 17]
  ------------------
 2468|      0|        return (!p1->hasStatus) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2468:16): [True: 0, False: 0]
  ------------------
 2469|     17|    if(p1->hasStatus && p1->status != p2->status)
  ------------------
  |  Branch (2469:8): [True: 0, False: 17]
  |  Branch (2469:25): [True: 0, False: 0]
  ------------------
 2470|      0|        return (p1->status < p2->status) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2470:16): [True: 0, False: 0]
  ------------------
 2471|       |
 2472|       |    /* SourceTimestamp */
 2473|     17|    if(p1->hasSourceTimestamp != p2->hasSourceTimestamp)
  ------------------
  |  Branch (2473:8): [True: 0, False: 17]
  ------------------
 2474|      0|        return (!p1->hasSourceTimestamp) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2474:16): [True: 0, False: 0]
  ------------------
 2475|     17|    if(p1->hasSourceTimestamp && p1->sourceTimestamp != p2->sourceTimestamp)
  ------------------
  |  Branch (2475:8): [True: 0, False: 17]
  |  Branch (2475:34): [True: 0, False: 0]
  ------------------
 2476|      0|        return (p1->sourceTimestamp < p2->sourceTimestamp) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2476:16): [True: 0, False: 0]
  ------------------
 2477|       |
 2478|       |    /* ServerTimestamp */
 2479|     17|    if(p1->hasServerTimestamp != p2->hasServerTimestamp)
  ------------------
  |  Branch (2479:8): [True: 0, False: 17]
  ------------------
 2480|      0|        return (!p1->hasServerTimestamp) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2480:16): [True: 0, False: 0]
  ------------------
 2481|     17|    if(p1->hasServerTimestamp && p1->serverTimestamp != p2->serverTimestamp)
  ------------------
  |  Branch (2481:8): [True: 0, False: 17]
  |  Branch (2481:34): [True: 0, False: 0]
  ------------------
 2482|      0|        return (p1->serverTimestamp < p2->serverTimestamp) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2482:16): [True: 0, False: 0]
  ------------------
 2483|       |
 2484|       |    /* SourcePicoseconds */
 2485|     17|    if(p1->hasSourcePicoseconds != p2->hasSourcePicoseconds)
  ------------------
  |  Branch (2485:8): [True: 0, False: 17]
  ------------------
 2486|      0|        return (!p1->hasSourcePicoseconds) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2486:16): [True: 0, False: 0]
  ------------------
 2487|     17|    if(p1->hasSourcePicoseconds && p1->sourcePicoseconds != p2->sourcePicoseconds)
  ------------------
  |  Branch (2487:8): [True: 0, False: 17]
  |  Branch (2487:36): [True: 0, False: 0]
  ------------------
 2488|      0|        return (p1->sourcePicoseconds < p2->sourcePicoseconds) ?
  ------------------
  |  Branch (2488:16): [True: 0, False: 0]
  ------------------
 2489|      0|            UA_ORDER_LESS : UA_ORDER_MORE;
 2490|       |
 2491|       |    /* ServerPicoseconds */
 2492|     17|    if(p1->hasServerPicoseconds != p2->hasServerPicoseconds)
  ------------------
  |  Branch (2492:8): [True: 0, False: 17]
  ------------------
 2493|      0|        return (!p1->hasServerPicoseconds) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2493:16): [True: 0, False: 0]
  ------------------
 2494|     17|    if(p1->hasServerPicoseconds && p1->serverPicoseconds != p2->serverPicoseconds)
  ------------------
  |  Branch (2494:8): [True: 0, False: 17]
  |  Branch (2494:36): [True: 0, False: 0]
  ------------------
 2495|      0|        return (p1->serverPicoseconds < p2->serverPicoseconds) ?
  ------------------
  |  Branch (2495:16): [True: 0, False: 0]
  ------------------
 2496|      0|            UA_ORDER_LESS : UA_ORDER_MORE;
 2497|       |
 2498|     17|    return UA_ORDER_EQ;
 2499|     17|}
ua_types.c:variantOrder:
 2417|  1.53k|variantOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2418|  1.53k|    const UA_Variant *p1 = (const UA_Variant*)p1_;
 2419|  1.53k|    const UA_Variant *p2 = (const UA_Variant*)p2_;
 2420|  1.53k|    if(p1->type != p2->type)
  ------------------
  |  Branch (2420:8): [True: 0, False: 1.53k]
  ------------------
 2421|      0|        return ((uintptr_t)p1->type < (uintptr_t)p2->type) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2421:16): [True: 0, False: 0]
  ------------------
 2422|       |
 2423|  1.53k|    UA_Order o;
 2424|  1.53k|    if(p1->type != NULL) {
  ------------------
  |  Branch (2424:8): [True: 1.52k, False: 12]
  ------------------
 2425|       |        /* Check if both variants are scalars or arrays */
 2426|  1.52k|        UA_Boolean s1 = UA_Variant_isScalar(p1);
 2427|  1.52k|        UA_Boolean s2 = UA_Variant_isScalar(p2);
 2428|  1.52k|        if(s1 != s2)
  ------------------
  |  Branch (2428:12): [True: 0, False: 1.52k]
  ------------------
 2429|      0|            return s1 ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2429:20): [True: 0, False: 0]
  ------------------
 2430|  1.52k|        if(s1) {
  ------------------
  |  Branch (2430:12): [True: 1.52k, False: 5]
  ------------------
 2431|  1.52k|            o = orderJumpTable[p1->type->typeKind](p1->data, p2->data, p1->type);
 2432|  1.52k|        } else {
 2433|       |            /* Mismatching array length? */
 2434|      5|            if(p1->arrayLength != p2->arrayLength)
  ------------------
  |  Branch (2434:16): [True: 0, False: 5]
  ------------------
 2435|      0|                return (p1->arrayLength < p2->arrayLength) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2435:24): [True: 0, False: 0]
  ------------------
 2436|      5|            o = arrayOrder(p1->data, p1->arrayLength, p2->data, p2->arrayLength, p1->type);
 2437|      5|        }
 2438|  1.52k|        if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2438:12): [True: 0, False: 1.52k]
  ------------------
 2439|      0|            return o;
 2440|  1.52k|    }
 2441|       |
 2442|  1.53k|    if(p1->arrayDimensionsSize != p2->arrayDimensionsSize)
  ------------------
  |  Branch (2442:8): [True: 0, False: 1.53k]
  ------------------
 2443|      0|        return (p1->arrayDimensionsSize < p2->arrayDimensionsSize) ?
  ------------------
  |  Branch (2443:16): [True: 0, False: 0]
  ------------------
 2444|      0|            UA_ORDER_LESS : UA_ORDER_MORE;
 2445|  1.53k|    o = UA_ORDER_EQ;
 2446|  1.53k|    if(p1->arrayDimensionsSize > 0)
  ------------------
  |  Branch (2446:8): [True: 0, False: 1.53k]
  ------------------
 2447|      0|        o = arrayOrder(p1->arrayDimensions, p1->arrayDimensionsSize,
 2448|      0|                       p2->arrayDimensions, p2->arrayDimensionsSize,
 2449|      0|                       &UA_TYPES[UA_TYPES_UINT32]);
  ------------------
  |  |  225|      0|#define UA_TYPES_UINT32 6
  ------------------
 2450|  1.53k|    return o;
 2451|  1.53k|}
ua_types.c:arrayOrder:
 2401|    138|           const UA_DataType *type) {
 2402|    138|    if(p1Length != p2Length)
  ------------------
  |  Branch (2402:8): [True: 0, False: 138]
  ------------------
 2403|      0|        return (p1Length < p2Length) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2403:16): [True: 0, False: 0]
  ------------------
 2404|    138|    uintptr_t u1 = (uintptr_t)p1;
 2405|    138|    uintptr_t u2 = (uintptr_t)p2;
 2406|    138|    for(size_t i = 0; i < p1Length; i++) {
  ------------------
  |  Branch (2406:23): [True: 0, False: 138]
  ------------------
 2407|      0|        UA_Order o = orderJumpTable[type->typeKind]((const void*)u1, (const void*)u2, type);
 2408|      0|        if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2408:12): [True: 0, False: 0]
  ------------------
 2409|      0|            return o;
 2410|      0|        u1 += type->memSize;
 2411|      0|        u2 += type->memSize;
 2412|      0|    }
 2413|    138|    return UA_ORDER_EQ;
 2414|    138|}
ua_types.c:diagnosticInfoOrder:
 2502|     21|diagnosticInfoOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2503|     21|    const UA_DiagnosticInfo *p1 = (const UA_DiagnosticInfo*)p1_;
 2504|     21|    const UA_DiagnosticInfo *p2 = (const UA_DiagnosticInfo*)p2_;
 2505|       |    /* SymbolicId */
 2506|     21|    if(p1->hasSymbolicId != p2->hasSymbolicId)
  ------------------
  |  Branch (2506:8): [True: 0, False: 21]
  ------------------
 2507|      0|        return (!p1->hasSymbolicId) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2507:16): [True: 0, False: 0]
  ------------------
 2508|     21|    if(p1->hasSymbolicId && p1->symbolicId != p2->symbolicId)
  ------------------
  |  Branch (2508:8): [True: 0, False: 21]
  |  Branch (2508:29): [True: 0, False: 0]
  ------------------
 2509|      0|        return (p1->symbolicId < p2->symbolicId) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2509:16): [True: 0, False: 0]
  ------------------
 2510|       |
 2511|       |    /* NamespaceUri */
 2512|     21|    if(p1->hasNamespaceUri != p2->hasNamespaceUri)
  ------------------
  |  Branch (2512:8): [True: 0, False: 21]
  ------------------
 2513|      0|        return (!p1->hasNamespaceUri) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2513:16): [True: 0, False: 0]
  ------------------
 2514|     21|    if(p1->hasNamespaceUri && p1->namespaceUri != p2->namespaceUri)
  ------------------
  |  Branch (2514:8): [True: 0, False: 21]
  |  Branch (2514:31): [True: 0, False: 0]
  ------------------
 2515|      0|        return (p1->namespaceUri < p2->namespaceUri) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2515:16): [True: 0, False: 0]
  ------------------
 2516|       |
 2517|       |    /* LocalizedText */
 2518|     21|    if(p1->hasLocalizedText != p2->hasLocalizedText)
  ------------------
  |  Branch (2518:8): [True: 0, False: 21]
  ------------------
 2519|      0|        return (!p1->hasLocalizedText) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2519:16): [True: 0, False: 0]
  ------------------
 2520|     21|    if(p1->hasLocalizedText && p1->localizedText != p2->localizedText)
  ------------------
  |  Branch (2520:8): [True: 0, False: 21]
  |  Branch (2520:32): [True: 0, False: 0]
  ------------------
 2521|      0|        return (p1->localizedText < p2->localizedText) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2521:16): [True: 0, False: 0]
  ------------------
 2522|       |
 2523|       |    /* Locale */
 2524|     21|    if(p1->hasLocale != p2->hasLocale)
  ------------------
  |  Branch (2524:8): [True: 0, False: 21]
  ------------------
 2525|      0|        return (!p1->hasLocale) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2525:16): [True: 0, False: 0]
  ------------------
 2526|     21|    if(p1->hasLocale && p1->locale != p2->locale)
  ------------------
  |  Branch (2526:8): [True: 0, False: 21]
  |  Branch (2526:25): [True: 0, False: 0]
  ------------------
 2527|      0|        return (p1->locale < p2->locale) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2527:16): [True: 0, False: 0]
  ------------------
 2528|       |
 2529|       |    /* AdditionalInfo */
 2530|     21|    if(p1->hasAdditionalInfo != p2->hasAdditionalInfo)
  ------------------
  |  Branch (2530:8): [True: 0, False: 21]
  ------------------
 2531|      0|        return (!p1->hasAdditionalInfo) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2531:16): [True: 0, False: 0]
  ------------------
 2532|     21|    if(p1->hasAdditionalInfo) {
  ------------------
  |  Branch (2532:8): [True: 0, False: 21]
  ------------------
 2533|      0|        UA_Order o = stringOrder(&p1->additionalInfo, &p2->additionalInfo, NULL);
 2534|      0|        if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2534:12): [True: 0, False: 0]
  ------------------
 2535|      0|            return o;
 2536|      0|    }
 2537|       |
 2538|       |    /* InnerStatusCode */
 2539|     21|    if(p1->hasInnerStatusCode != p2->hasInnerStatusCode)
  ------------------
  |  Branch (2539:8): [True: 0, False: 21]
  ------------------
 2540|      0|        return (!p1->hasInnerStatusCode) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2540:16): [True: 0, False: 0]
  ------------------
 2541|     21|    if(p1->hasInnerStatusCode && p1->innerStatusCode != p2->innerStatusCode)
  ------------------
  |  Branch (2541:8): [True: 0, False: 21]
  |  Branch (2541:34): [True: 0, False: 0]
  ------------------
 2542|      0|        return (p1->innerStatusCode < p2->innerStatusCode) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2542:16): [True: 0, False: 0]
  ------------------
 2543|       |
 2544|       |    /* InnerDiagnosticInfo */
 2545|     21|    if(p1->hasInnerDiagnosticInfo != p2->hasInnerDiagnosticInfo)
  ------------------
  |  Branch (2545:8): [True: 0, False: 21]
  ------------------
 2546|      0|        return (!p1->hasInnerDiagnosticInfo) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2546:16): [True: 0, False: 0]
  ------------------
 2547|     21|    if(p1->innerDiagnosticInfo == p2->innerDiagnosticInfo)
  ------------------
  |  Branch (2547:8): [True: 21, False: 0]
  ------------------
 2548|     21|        return UA_ORDER_EQ;
 2549|      0|    if(!p1->innerDiagnosticInfo || !p2->innerDiagnosticInfo)
  ------------------
  |  Branch (2549:8): [True: 0, False: 0]
  |  Branch (2549:36): [True: 0, False: 0]
  ------------------
 2550|      0|        return (!p1->innerDiagnosticInfo) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2550:16): [True: 0, False: 0]
  ------------------
 2551|      0|    return diagnosticInfoOrder(p1->innerDiagnosticInfo, p2->innerDiagnosticInfo, NULL);
 2552|      0|}
ua_types.c:structureOrder:
 2555|    321|structureOrder(const void *p1, const void *p2, const UA_DataType *type) {
 2556|    321|    uintptr_t u1 = (uintptr_t)p1;
 2557|    321|    uintptr_t u2 = (uintptr_t)p2;
 2558|    321|    UA_Order o = UA_ORDER_EQ;
 2559|  1.57k|    for(size_t i = 0; i < type->membersSize; ++i) {
  ------------------
  |  Branch (2559:23): [True: 1.25k, False: 321]
  ------------------
 2560|  1.25k|        const UA_DataTypeMember *m = &type->members[i];
 2561|  1.25k|        const UA_DataType *mt = m->memberType;
 2562|  1.25k|        u1 += m->padding;
 2563|  1.25k|        u2 += m->padding;
 2564|  1.25k|        if(!m->isOptional) {
  ------------------
  |  Branch (2564:12): [True: 1.25k, False: 0]
  ------------------
 2565|  1.25k|            if(!m->isArray) {
  ------------------
  |  Branch (2565:16): [True: 1.12k, False: 133]
  ------------------
 2566|  1.12k|                o = orderJumpTable[mt->typeKind]((const void *)u1, (const void *)u2, mt);
 2567|  1.12k|                u1 += mt->memSize;
 2568|  1.12k|                u2 += mt->memSize;
 2569|  1.12k|            } else {
 2570|    133|                size_t size1 = *(size_t*)u1;
 2571|    133|                size_t size2 = *(size_t*)u2;
 2572|    133|                u1 += sizeof(size_t);
 2573|    133|                u2 += sizeof(size_t);
 2574|    133|                o = arrayOrder(*(void* const*)u1, size1, *(void* const*)u2, size2, mt);
 2575|    133|                u1 += sizeof(void*);
 2576|    133|                u2 += sizeof(void*);
 2577|    133|            }
 2578|  1.25k|        } else {
 2579|      0|            if(!m->isArray) {
  ------------------
  |  Branch (2579:16): [True: 0, False: 0]
  ------------------
 2580|      0|                const void *pp1 = *(void* const*)u1;
 2581|      0|                const void *pp2 = *(void* const*)u2;
 2582|      0|                if(pp1 == pp2) {
  ------------------
  |  Branch (2582:20): [True: 0, False: 0]
  ------------------
 2583|      0|                    o = UA_ORDER_EQ;
 2584|      0|                } else if(pp1 == NULL) {
  ------------------
  |  Branch (2584:27): [True: 0, False: 0]
  ------------------
 2585|      0|                    o = UA_ORDER_LESS;
 2586|      0|                } else if(pp2 == NULL) {
  ------------------
  |  Branch (2586:27): [True: 0, False: 0]
  ------------------
 2587|      0|                    o = UA_ORDER_MORE;
 2588|      0|                } else {
 2589|      0|                    o = orderJumpTable[mt->typeKind](pp1, pp2, mt);
 2590|      0|                }
 2591|      0|            } else {
 2592|      0|                size_t sa1 = *(size_t*)u1;
 2593|      0|                size_t sa2 = *(size_t*)u2;
 2594|      0|                u1 += sizeof(size_t);
 2595|      0|                u2 += sizeof(size_t);
 2596|      0|                o = arrayOrder(*(void* const*)u1, sa1, *(void* const*)u2, sa2, mt);
 2597|      0|            }
 2598|      0|            u1 += sizeof(void*);
 2599|      0|            u2 += sizeof(void*);
 2600|      0|        }
 2601|       |
 2602|  1.25k|        if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2602:12): [True: 0, False: 1.25k]
  ------------------
 2603|      0|            break;
 2604|  1.25k|    }
 2605|    321|    return o;
 2606|    321|}

xml_tokenize:
   42|  8.80k|             xml_token *tokens, unsigned int max_tokens) {
   43|  8.80k|    xml_result res;
   44|  8.80k|    memset(&res, 0, sizeof(xml_result));
   45|  8.80k|    res.tokens = tokens;
   46|       |
   47|  8.80k|    yxml_t ctx;
   48|  8.80k|    char buf[512];
   49|  8.80k|    yxml_init(&ctx, buf, 512);
   50|       |
   51|  8.80k|    unsigned char top = 0;
   52|  8.80k|    unsigned tokenPos = 0;
   53|  8.80k|    xml_token *stack[32]; /* Max nesting depth is 32 */
   54|  8.80k|    xml_token backup_tokens[32]; /* To be used when the tokens run out */
   55|       |
   56|       |    /* Help clang-analyzer */
   57|       |#ifdef __clang_analyzer__
   58|       |    memset(stack, 0, 32 * sizeof(void*));
   59|       |    memset(backup_tokens, 0, 32 * sizeof(xml_token));
   60|       |#endif
   61|       |
   62|  8.80k|    stack[top] = &backup_tokens[top];
   63|  8.80k|    memset(stack[top], 0, sizeof(xml_token));
   64|       |
   65|  8.80k|    unsigned val_begin = 0;
   66|  8.80k|    unsigned pos = 0;
   67|   137M|    for(; pos < len; pos++) {
  ------------------
  |  Branch (67:11): [True: 137M, False: 7.60k]
  ------------------
   68|       |#ifdef __clang_analyzer__
   69|       |        UA_assert(stack[top] != NULL);
   70|       |#endif
   71|   137M|        yxml_ret_t xml_status = yxml_parse(&ctx, xml[pos]);
   72|   137M|        switch(xml_status) {
   73|      0|        case YXML_EEOF:
  ------------------
  |  Branch (73:9): [True: 0, False: 137M]
  ------------------
   74|    215|        case YXML_EREF:
  ------------------
  |  Branch (74:9): [True: 215, False: 137M]
  ------------------
   75|    311|        case YXML_ECLOSE:
  ------------------
  |  Branch (75:9): [True: 96, False: 137M]
  ------------------
   76|    319|        case YXML_ESTACK:
  ------------------
  |  Branch (76:9): [True: 8, False: 137M]
  ------------------
   77|  1.15k|        case YXML_ESYN:
  ------------------
  |  Branch (77:9): [True: 833, False: 137M]
  ------------------
   78|  1.15k|        default:
  ------------------
  |  Branch (78:9): [True: 0, False: 137M]
  ------------------
   79|  1.15k|            goto errout;
   80|  67.2M|        case YXML_OK:
  ------------------
  |  Branch (80:9): [True: 67.2M, False: 69.9M]
  ------------------
   81|  67.2M|            continue;
   82|  12.8M|        case YXML_ELEMSTART:
  ------------------
  |  Branch (82:9): [True: 12.8M, False: 124M]
  ------------------
   83|  14.8M|        case YXML_ATTRSTART: {
  ------------------
  |  Branch (83:9): [True: 1.98M, False: 135M]
  ------------------
   84|  14.8M|            if(xml_status == YXML_ELEMSTART) {
  ------------------
  |  Branch (84:16): [True: 12.8M, False: 1.98M]
  ------------------
   85|  12.8M|                stack[top]->children++;
   86|  12.8M|                stack[top]->content = UA_STRING_NULL; /* Only the leaf elements have content */
   87|  12.8M|            } else {
   88|  1.98M|                stack[top]->attributes++;
   89|  1.98M|            }
   90|  14.8M|            top++;
   91|  14.8M|            if(top >= 32)
  ------------------
  |  Branch (91:16): [True: 7, False: 14.8M]
  ------------------
   92|      7|                goto errout; /* nesting too deep */
   93|  14.8M|            stack[top] = (tokenPos < max_tokens) ? &tokens[tokenPos] : &backup_tokens[top];
  ------------------
  |  Branch (93:26): [True: 7.43M, False: 7.45M]
  ------------------
   94|  14.8M|            memset(stack[top], 0, sizeof(xml_token));
   95|  14.8M|            stack[top]->type = (xml_status == YXML_ELEMSTART) ? XML_TOKEN_ELEMENT : XML_TOKEN_ATTRIBUTE;
  ------------------
  |  Branch (95:32): [True: 12.8M, False: 1.98M]
  ------------------
   96|  14.8M|            stack[top]->name = backtrackName(xml, pos);
   97|  14.8M|            const char *start = xml + pos;
   98|  14.8M|            if(xml_status == YXML_ELEMSTART) {
  ------------------
  |  Branch (98:16): [True: 12.8M, False: 1.98M]
  ------------------
   99|  39.1M|                while(*start != '<')
  ------------------
  |  Branch (99:23): [True: 26.2M, False: 12.8M]
  ------------------
  100|  26.2M|                    start--;
  101|  12.8M|            }
  102|  14.8M|            stack[top]->start = (unsigned)(start - xml);
  103|  14.8M|            tokenPos++;
  104|  14.8M|            val_begin = 0; /* if the previous non-leaf element started to collect content */
  105|  14.8M|            break;
  106|  14.8M|        }
  107|  37.5M|        case YXML_CONTENT:
  ------------------
  |  Branch (107:9): [True: 37.5M, False: 99.6M]
  ------------------
  108|  39.3M|        case YXML_ATTRVAL:
  ------------------
  |  Branch (108:9): [True: 1.85M, False: 135M]
  ------------------
  109|  39.3M|            if(val_begin == 0)
  ------------------
  |  Branch (109:16): [True: 252k, False: 39.1M]
  ------------------
  110|   252k|                val_begin = pos;
  111|  39.3M|            stack[top]->end = pos;
  112|  39.3M|            break;
  113|  12.8M|        case YXML_ELEMEND:
  ------------------
  |  Branch (113:9): [True: 12.8M, False: 124M]
  ------------------
  114|  14.8M|        case YXML_ATTREND:
  ------------------
  |  Branch (114:9): [True: 1.98M, False: 135M]
  ------------------
  115|  14.8M|            if(top == 0)
  ------------------
  |  Branch (115:16): [True: 0, False: 14.8M]
  ------------------
  116|      0|                goto errout; /* more closes than opens */
  117|  14.8M|            if(val_begin > 0) {
  ------------------
  |  Branch (117:16): [True: 124k, False: 14.7M]
  ------------------
  118|   124k|                stack[top]->content.data = (UA_Byte*)(uintptr_t)xml + val_begin;
  119|   124k|                stack[top]->content.length = stack[top]->end + 1 - val_begin;
  120|   124k|            }
  121|  14.8M|            stack[top]->end = pos;
  122|  14.8M|            if(xml_status == YXML_ELEMEND) {
  ------------------
  |  Branch (122:16): [True: 12.8M, False: 1.98M]
  ------------------
  123|       |                /* Saw "</", looking for the closing ">" */
  124|  12.8M|                while(stack[top]->end < len && xml[stack[top]->end] != '>')
  ------------------
  |  Branch (124:23): [True: 12.8M, False: 40]
  |  Branch (124:48): [True: 1.51k, False: 12.8M]
  ------------------
  125|  1.51k|                    stack[top]->end++;
  126|  12.8M|                stack[top]->end++;
  127|  12.8M|                if(stack[top]->end > len)
  ------------------
  |  Branch (127:20): [True: 40, False: 12.8M]
  ------------------
  128|     40|                    goto errout;
  129|  12.8M|            }
  130|  14.8M|            val_begin = 0;
  131|  14.8M|            top--;
  132|  14.8M|            break;
  133|  3.78k|        case YXML_PISTART:
  ------------------
  |  Branch (133:9): [True: 3.78k, False: 137M]
  ------------------
  134|   796k|        case YXML_PICONTENT:
  ------------------
  |  Branch (134:9): [True: 792k, False: 136M]
  ------------------
  135|   800k|        case YXML_PIEND:
  ------------------
  |  Branch (135:9): [True: 3.64k, False: 137M]
  ------------------
  136|   800k|            continue; /* Ignore processing instructions */
  137|   137M|        }
  138|   137M|    }
  139|       |
  140|       |    /* Check that all elements were closed */
  141|  7.60k|    if(yxml_eof(&ctx) != YXML_OK)
  ------------------
  |  Branch (141:8): [True: 2.07k, False: 5.53k]
  ------------------
  142|  2.07k|        goto errout;
  143|       |
  144|  5.53k|    res.num_tokens = tokenPos;
  145|  5.53k|    if(tokenPos > max_tokens)
  ------------------
  |  Branch (145:8): [True: 556, False: 4.97k]
  ------------------
  146|    556|        res.error = XML_ERROR_OVERFLOW;
  147|  5.53k|    return res;
  148|       |
  149|  3.27k| errout:
  150|  3.27k|    res.error_pos = pos;
  151|  3.27k|    res.error = XML_ERROR_INVALID;
  152|  3.27k|    return res;
  153|  7.60k|}
UA_encodeXml:
  743|  3.05k|             const UA_EncodeXmlOptions *options) {
  744|  3.05k|    if(!src || !type)
  ------------------
  |  Branch (744:8): [True: 0, False: 3.05k]
  |  Branch (744:16): [True: 0, False: 3.05k]
  ------------------
  745|      0|        return UA_STATUSCODE_BADINTERNALERROR;
  ------------------
  |  |   29|      0|#define UA_STATUSCODE_BADINTERNALERROR ((UA_StatusCode) 0x80020000)
  ------------------
  746|       |
  747|       |    /* Allocate buffer */
  748|  3.05k|    UA_Boolean allocated = false;
  749|  3.05k|    status res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  3.05k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  750|  3.05k|    if(outBuf->length == 0) {
  ------------------
  |  Branch (750:8): [True: 0, False: 3.05k]
  ------------------
  751|      0|        size_t len = UA_calcSizeXml(src, type, options);
  752|      0|        res = UA_ByteString_allocBuffer(outBuf, len);
  753|      0|        if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (753:12): [True: 0, False: 0]
  ------------------
  754|      0|            return res;
  755|      0|        allocated = true;
  756|      0|    }
  757|       |
  758|       |    /* Set up the context */
  759|  3.05k|    CtxXml ctx;
  760|  3.05k|    memset(&ctx, 0, sizeof(ctx));
  761|  3.05k|    ctx.pos = outBuf->data;
  762|  3.05k|    ctx.end = &outBuf->data[outBuf->length];
  763|  3.05k|    ctx.depth = 0;
  764|  3.05k|    ctx.calcOnly = false;
  765|  3.05k|    if(options) {
  ------------------
  |  Branch (765:8): [True: 0, False: 3.05k]
  ------------------
  766|      0|        ctx.namespaceMapping = options->namespaceMapping;
  767|      0|        ctx.serverUris = options->serverUris;
  768|      0|        ctx.serverUrisSize = options->serverUrisSize;
  769|      0|    }
  770|       |
  771|       |    /* Encode */
  772|  3.05k|    res = writeXmlElement(&ctx, type->typeName, src, type);
  773|       |
  774|       |    /* Clean up */
  775|  3.05k|    if(res == UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  3.05k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (775:8): [True: 3.05k, False: 0]
  ------------------
  776|  3.05k|        outBuf->length = (size_t)((uintptr_t)ctx.pos - (uintptr_t)outBuf->data);
  777|      0|    else if(allocated)
  ------------------
  |  Branch (777:13): [True: 0, False: 0]
  ------------------
  778|      0|        UA_ByteString_clear(outBuf);
  779|       |
  780|  3.05k|    return res;
  781|  3.05k|}
UA_calcSizeXml:
  789|  1.57k|               const UA_EncodeXmlOptions *options) {
  790|  1.57k|    if(!src || !type)
  ------------------
  |  Branch (790:8): [True: 0, False: 1.57k]
  |  Branch (790:16): [True: 0, False: 1.57k]
  ------------------
  791|      0|        return UA_STATUSCODE_BADINTERNALERROR;
  ------------------
  |  |   29|      0|#define UA_STATUSCODE_BADINTERNALERROR ((UA_StatusCode) 0x80020000)
  ------------------
  792|       |
  793|       |    /* Set up the context */
  794|  1.57k|    CtxXml ctx;
  795|  1.57k|    memset(&ctx, 0, sizeof(ctx));
  796|  1.57k|    ctx.pos = NULL;
  797|  1.57k|    ctx.end = (const UA_Byte*)(uintptr_t)SIZE_MAX;
  798|  1.57k|    ctx.depth = 0;
  799|  1.57k|    if(options) {
  ------------------
  |  Branch (799:8): [True: 0, False: 1.57k]
  ------------------
  800|      0|        ctx.namespaceMapping = options->namespaceMapping;
  801|      0|        ctx.serverUris = options->serverUris;
  802|      0|        ctx.serverUrisSize = options->serverUrisSize;
  803|      0|    }
  804|       |
  805|  1.57k|    ctx.calcOnly = true;
  806|       |
  807|       |    /* Encode */
  808|  1.57k|    status ret = writeXmlElement(&ctx, type->typeName, src, type);
  809|  1.57k|    if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  1.57k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (809:8): [True: 52, False: 1.52k]
  ------------------
  810|     52|        return 0;
  811|  1.52k|    return (size_t)ctx.pos;
  812|  1.57k|}
UA_decodeXml:
 1894|  8.25k|             const UA_DecodeXmlOptions *options) {
 1895|  8.25k|    if(!dst || !src || !type)
  ------------------
  |  Branch (1895:8): [True: 0, False: 8.25k]
  |  Branch (1895:16): [True: 0, False: 8.25k]
  |  Branch (1895:24): [True: 0, False: 8.25k]
  ------------------
 1896|      0|        return UA_STATUSCODE_BADARGUMENTSMISSING;
  ------------------
  |  |  449|      0|#define UA_STATUSCODE_BADARGUMENTSMISSING ((UA_StatusCode) 0x80760000)
  ------------------
 1897|       |
 1898|       |    /* Tokenize. Add a fake wrapper element if options->unwrapped is enabled. */
 1899|  8.25k|    unsigned tokensSize = 63;
 1900|  8.25k|    xml_token tokenbuf[64];
 1901|  8.25k|    xml_token *tokens = tokenbuf;
 1902|       |
 1903|  8.25k|    xml_result res = xml_tokenize((char*)src->data, (unsigned)src->length,
 1904|  8.25k|                                  tokens + 1, tokensSize);
 1905|  8.25k|    if(res.error == XML_ERROR_OVERFLOW) {
  ------------------
  |  Branch (1905:8): [True: 556, False: 7.69k]
  ------------------
 1906|    556|        tokens = (xml_token*)UA_malloc(sizeof(xml_token) * (res.num_tokens + 1));
  ------------------
  |  |   18|    556|#define UA_malloc(size) UA_mallocSingleton(size)
  ------------------
 1907|    556|        if(!tokens)
  ------------------
  |  Branch (1907:12): [True: 0, False: 556]
  ------------------
 1908|      0|            return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 1909|    556|        res = xml_tokenize((char*)src->data, (unsigned)src->length,
 1910|    556|                           tokens + 1, res.num_tokens);
 1911|    556|    }
 1912|       |
 1913|  8.25k|    if(res.error != XML_ERROR_NONE || res.num_tokens == 0) {
  ------------------
  |  Branch (1913:8): [True: 3.27k, False: 4.97k]
  |  Branch (1913:39): [True: 0, False: 4.97k]
  ------------------
 1914|  3.27k|        if(tokens != tokenbuf)
  ------------------
  |  Branch (1914:12): [True: 0, False: 3.27k]
  ------------------
 1915|      0|            UA_free(tokens);
  ------------------
  |  |   19|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1916|  3.27k|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|  3.27k|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1917|  3.27k|    }
 1918|       |
 1919|       |    /* Set up the context */
 1920|  4.97k|    ParseCtxXml ctx;
 1921|  4.97k|    memset(&ctx, 0, sizeof(ParseCtxXml));
 1922|  4.97k|    ctx.xml = (const char*)src->data;
 1923|  4.97k|    ctx.tokens = tokens;
 1924|  4.97k|    ctx.tokensSize = res.num_tokens;
 1925|  4.97k|    if(options) {
  ------------------
  |  Branch (1925:8): [True: 73, False: 4.90k]
  ------------------
 1926|     73|        ctx.customTypes = options->customTypes;
 1927|     73|        ctx.namespaceMapping = options->namespaceMapping;
 1928|     73|        ctx.serverUris = options->serverUris;
 1929|     73|        ctx.serverUrisSize = options->serverUrisSize;
 1930|     73|    }
 1931|       |
 1932|  4.97k|    if(options && options->unwrapped) {
  ------------------
  |  Branch (1932:8): [True: 73, False: 4.90k]
  |  Branch (1932:19): [True: 0, False: 73]
  ------------------
 1933|       |        /* Set up the fake wrapper element */
 1934|      0|        xml_token *tok = tokens;
 1935|      0|        memset(tok, 0, sizeof(xml_token));
 1936|      0|        tok->type = XML_TOKEN_ELEMENT;
 1937|      0|        tok->name = UA_STRING((char*)(uintptr_t)type->typeName);
 1938|      0|        tok->children = 1;
 1939|      0|        tok->start = 0;
 1940|      0|        tok->end = (unsigned)src->length;
 1941|      0|        ctx.tokensSize++;
 1942|  4.97k|    } else {
 1943|  4.97k|        ctx.tokens++; /* Skip the first token */
 1944|  4.97k|    }
 1945|       |
 1946|       |    /* Decode */
 1947|  4.97k|    memset(dst, 0, type->memSize); /* Initialize the value */
 1948|  4.97k|    UA_StatusCode ret = decodeXmlJumpTable[type->typeKind](&ctx, dst, type);
 1949|  4.97k|    if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  4.97k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1949:8): [True: 1.80k, False: 3.17k]
  ------------------
 1950|  1.80k|        UA_clear(dst, type);
 1951|       |
 1952|       |    /* Clean up */
 1953|  4.97k|    if(tokens != tokenbuf)
  ------------------
  |  Branch (1953:8): [True: 556, False: 4.41k]
  ------------------
 1954|    556|        UA_free(tokens);
  ------------------
  |  |   19|    556|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1955|  4.97k|    return ret;
 1956|  8.25k|}
ua_types_encoding_xml.c:backtrackName:
   26|  14.8M|backtrackName(const char *xml, unsigned end) {
   27|  14.8M|    unsigned pos = end;
   28|  60.1M|    for(; pos > 0; pos--) {
  ------------------
  |  Branch (28:11): [True: 60.1M, False: 0]
  ------------------
   29|  60.1M|        unsigned char c = (unsigned char)xml[pos-1];
   30|  60.1M|        if(c >= 'a' && c <= 'z') continue; /* isAlpha */
  ------------------
  |  Branch (30:12): [True: 44.8M, False: 15.2M]
  |  Branch (30:24): [True: 8.81M, False: 36.0M]
  ------------------
   31|  51.3M|        if(c >= 'A' && c <= 'Z') continue; /* isAlpha */
  ------------------
  |  Branch (31:12): [True: 36.4M, False: 14.9M]
  |  Branch (31:24): [True: 344k, False: 36.0M]
  ------------------
   32|  51.0M|        if(c >= '0' && c <= '9') continue; /* isNum */
  ------------------
  |  Branch (32:12): [True: 49.0M, False: 1.99M]
  |  Branch (32:24): [True: 33.5k, False: 48.9M]
  ------------------
   33|  50.9M|        if(c == '_' || c >= 128 || c == '-'|| c == '.') continue;
  ------------------
  |  Branch (33:12): [True: 4.80k, False: 50.9M]
  |  Branch (33:24): [True: 36.0M, False: 14.9M]
  |  Branch (33:36): [True: 20.7k, False: 14.8M]
  |  Branch (33:47): [True: 2.96k, False: 14.8M]
  ------------------
   34|  14.8M|        break;
   35|  50.9M|    }
   36|  14.8M|    UA_String s = {end - pos, (UA_Byte*)(uintptr_t)xml + pos};
   37|  14.8M|    return s;
   38|  14.8M|}
ua_types_encoding_xml.c:Boolean_encodeXml:
  238|      6|ENCODE_XML(Boolean) {
  239|      6|    const UA_Boolean *src = (const UA_Boolean*)src_;
  240|      6|    if(*src == true)
  ------------------
  |  Branch (240:8): [True: 3, False: 3]
  ------------------
  241|      3|        return xmlEncodeWriteChars(ctx, "true", 4);
  242|      3|    return xmlEncodeWriteChars(ctx, "false", 5);
  243|      6|}
ua_types_encoding_xml.c:xmlEncodeWriteChars:
  194|  92.3k|xmlEncodeWriteChars(CtxXml *ctx, const char *c, size_t len) {
  195|  92.3k|    if(ctx->pos + len > ctx->end)
  ------------------
  |  Branch (195:8): [True: 0, False: 92.3k]
  ------------------
  196|      0|        return UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED;
  ------------------
  |  |   47|      0|#define UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED ((UA_StatusCode) 0x80080000)
  ------------------
  197|  92.3k|    if(!ctx->calcOnly && len)
  ------------------
  |  Branch (197:8): [True: 61.3k, False: 31.0k]
  |  Branch (197:26): [True: 61.2k, False: 96]
  ------------------
  198|  61.2k|        memcpy(ctx->pos, c, len);
  199|  92.3k|    ctx->pos += len;
  200|  92.3k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  92.3k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  201|  92.3k|}
ua_types_encoding_xml.c:SByte_encodeXml:
  256|     81|ENCODE_XML(SByte) {
  257|     81|    const UA_SByte *src = (const UA_SByte*)src_;
  258|     81|    char buf[5];
  259|     81|    return encodeSigned(ctx, *src, buf);
  260|     81|}
ua_types_encoding_xml.c:encodeSigned:
  245|  1.25k|static status encodeSigned(CtxXml *ctx, UA_Int64 value, char* buffer) {
  246|  1.25k|    UA_UInt16 digits = itoaSigned(value, buffer);
  247|  1.25k|    return xmlEncodeWriteChars(ctx, buffer, digits);
  248|  1.25k|}
ua_types_encoding_xml.c:Byte_encodeXml:
  263|     36|ENCODE_XML(Byte) {
  264|     36|    const UA_Byte *src = (const UA_Byte*)src_;
  265|     36|    char buf[4];
  266|     36|    return encodeUnsigned(ctx, *src, buf);
  267|     36|}
ua_types_encoding_xml.c:encodeUnsigned:
  250|    606|static status encodeUnsigned(CtxXml *ctx, UA_UInt64 value, char* buffer) {
  251|    606|    UA_UInt16 digits = itoaUnsigned(value, buffer, 10);
  252|    606|    return xmlEncodeWriteChars(ctx, buffer, digits);
  253|    606|}
ua_types_encoding_xml.c:Int16_encodeXml:
  270|    183|ENCODE_XML(Int16) {
  271|    183|    const UA_Int16 *src = (const UA_Int16*)src_;
  272|    183|    char buf[7];
  273|    183|    return encodeSigned(ctx, *src, buf);
  274|    183|}
ua_types_encoding_xml.c:UInt16_encodeXml:
  277|     75|ENCODE_XML(UInt16) {
  278|     75|    const UA_UInt16 *src = (const UA_UInt16*)src_;
  279|     75|    char buf[6];
  280|     75|    return encodeUnsigned(ctx, *src, buf);
  281|     75|}
ua_types_encoding_xml.c:Int32_encodeXml:
  284|    369|ENCODE_XML(Int32) {
  285|    369|    const UA_Int32 *src = (const UA_Int32*)src_;
  286|    369|    char buf[12];
  287|    369|    return encodeSigned(ctx, *src, buf);
  288|    369|}
ua_types_encoding_xml.c:UInt32_encodeXml:
  309|    192|ENCODE_XML(UInt32) {
  310|    192|    const UA_UInt32 *src = (const UA_UInt32*)src_;
  311|    192|    char buf[11];
  312|    192|    return encodeUnsigned(ctx, *src, buf);
  313|    192|}
ua_types_encoding_xml.c:Int64_encodeXml:
  316|    618|ENCODE_XML(Int64) {
  317|    618|    const UA_Int64 *src = (const UA_Int64*)src_;
  318|    618|    char buf[23];
  319|    618|    return encodeSigned(ctx, *src, buf);
  320|    618|}
ua_types_encoding_xml.c:UInt64_encodeXml:
  323|    303|ENCODE_XML(UInt64) {
  324|    303|    const UA_UInt64 *src = (const UA_UInt64*)src_;
  325|    303|    char buf[23];
  326|    303|    return encodeUnsigned(ctx, *src, buf);
  327|    303|}
ua_types_encoding_xml.c:Double_encodeXml:
  346|  1.83k|ENCODE_XML(Double) {
  347|  1.83k|    const UA_Double *src = (const UA_Double*)src_;
  348|  1.83k|    char buffer[32];
  349|  1.83k|    size_t len;
  350|  1.83k|    if(*src != *src)
  ------------------
  |  Branch (350:8): [True: 9, False: 1.83k]
  ------------------
  351|      9|        return xmlEncodeWriteChars(ctx, "NaN", 3);
  352|  1.83k|    if(*src == INFINITY)
  ------------------
  |  Branch (352:8): [True: 9, False: 1.82k]
  ------------------
  353|      9|        return xmlEncodeWriteChars(ctx, "INF", 3);
  354|  1.82k|    if(*src == -INFINITY)
  ------------------
  |  Branch (354:8): [True: 6, False: 1.81k]
  ------------------
  355|      6|        return xmlEncodeWriteChars(ctx, "-INF", 4);
  356|       |
  357|  1.81k|    len = dtoa(*src, buffer);
  358|  1.81k|    return xmlEncodeWriteChars(ctx, buffer, len);
  359|  1.82k|}
ua_types_encoding_xml.c:String_encodeXml:
  362|    372|ENCODE_XML(String) {
  363|    372|    const UA_String *src = (const UA_String*)src_;
  364|    372|    return xmlEncodeWriteChars(ctx, (const char*)src->data, src->length);
  365|    372|}
ua_types_encoding_xml.c:ByteString_encodeXml:
  393|     96|ENCODE_XML(ByteString) {
  394|     96|    const UA_ByteString *src = (const UA_ByteString*)src_;
  395|     96|    if(!src->data)
  ------------------
  |  Branch (395:8): [True: 0, False: 96]
  ------------------
  396|      0|        return xmlEncodeWriteChars(ctx, "null", 4);
  397|       |
  398|     96|    if(src->length == 0)
  ------------------
  |  Branch (398:8): [True: 96, False: 0]
  ------------------
  399|     96|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     96|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  400|       |
  401|      0|    size_t flen = 0;
  402|      0|    unsigned char *ba64 = UA_base64(src->data, src->length, &flen);
  403|       |
  404|       |    /* Not converted, no mem */
  405|      0|    if(!ba64)
  ------------------
  |  Branch (405:8): [True: 0, False: 0]
  ------------------
  406|      0|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
  407|       |
  408|      0|    if(ctx->pos + flen > ctx->end) {
  ------------------
  |  Branch (408:8): [True: 0, False: 0]
  ------------------
  409|      0|        UA_free(ba64);
  ------------------
  |  |   19|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
  410|      0|        return UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED;
  ------------------
  |  |   47|      0|#define UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED ((UA_StatusCode) 0x80080000)
  ------------------
  411|      0|    }
  412|       |
  413|       |    /* Copy flen bytes to output stream. */
  414|      0|    if(!ctx->calcOnly)
  ------------------
  |  Branch (414:8): [True: 0, False: 0]
  ------------------
  415|      0|        memcpy(ctx->pos, ba64, flen);
  416|      0|    ctx->pos += flen;
  417|       |
  418|       |    /* Base64 result no longer needed */
  419|      0|    UA_free(ba64);
  ------------------
  |  |   19|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
  420|       |
  421|      0|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  422|      0|}
ua_types_encoding_xml.c:XmlElement_encodeXml:
  368|    381|ENCODE_XML(XmlElement) {
  369|    381|    const UA_XmlElement *src = (const UA_XmlElement*)src_;
  370|    381|    return xmlEncodeWriteChars(ctx, (const char*)src->data, src->length);
  371|    381|}
ua_types_encoding_xml.c:NodeId_encodeXml:
  425|    219|ENCODE_XML(NodeId) {
  426|    219|    const UA_NodeId *src = (const UA_NodeId*)src_;
  427|    219|    UA_StatusCode ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    219|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  428|    219|    UA_String out = UA_STRING_NULL;
  429|    219|    ret |= UA_NodeId_printEx(src, &out, ctx->namespaceMapping);
  430|    219|    ret |= writeXmlElement(ctx, UA_XML_NODEID_IDENTIFIER,
  ------------------
  |  |  171|    219|#define UA_XML_NODEID_IDENTIFIER "Identifier"
  ------------------
  431|    219|                           &out, &UA_TYPES[UA_TYPES_STRING]);
  ------------------
  |  |  395|    219|#define UA_TYPES_STRING 11
  ------------------
  432|    219|    UA_String_clear(&out);
  433|    219|    return ret;
  434|    219|}
ua_types_encoding_xml.c:ExtensionObject_encodeXml:
  485|    222|ENCODE_XML(ExtensionObject) {
  486|    222|    const UA_ExtensionObject *src = (const UA_ExtensionObject*)src_;
  487|    222|    if(src->encoding == UA_EXTENSIONOBJECT_ENCODED_NOBODY)
  ------------------
  |  Branch (487:8): [True: 3, False: 219]
  ------------------
  488|      3|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      3|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  489|    219|    if(src->encoding == UA_EXTENSIONOBJECT_ENCODED_JSON)
  ------------------
  |  Branch (489:8): [True: 0, False: 219]
  ------------------
  490|      0|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
  491|       |
  492|       |    /* The body of the ExtensionObject contains a single element
  493|       |     * which is either a ByteString or XML encoded Structure:
  494|       |     * https://reference.opcfoundation.org/Core/Part6/v104/docs/5.3.1.16. */
  495|    219|    UA_StatusCode ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    219|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  496|    219|    if(src->encoding == UA_EXTENSIONOBJECT_ENCODED_BYTESTRING ||
  ------------------
  |  Branch (496:8): [True: 0, False: 219]
  ------------------
  497|    219|       src->encoding == UA_EXTENSIONOBJECT_ENCODED_XML) {
  ------------------
  |  Branch (497:8): [True: 0, False: 219]
  ------------------
  498|       |        /* Write the type NodeId */
  499|      0|        ret = writeXmlElement(ctx, UA_XML_EXTENSIONOBJECT_TYPEID,
  ------------------
  |  |  178|      0|#define UA_XML_EXTENSIONOBJECT_TYPEID "TypeId"
  ------------------
  500|      0|                              &src->content.encoded.typeId,
  501|      0|                              &UA_TYPES[UA_TYPES_NODEID]);
  ------------------
  |  |  565|      0|#define UA_TYPES_NODEID 16
  ------------------
  502|       |
  503|       |        /* Write the body */
  504|      0|        ret |= writeXmlElemNameBegin(ctx, UA_XML_EXTENSIONOBJECT_BODY);
  ------------------
  |  |  179|      0|#define UA_XML_EXTENSIONOBJECT_BODY "Body"
  ------------------
  505|      0|        if(src->encoding == UA_EXTENSIONOBJECT_ENCODED_BYTESTRING)
  ------------------
  |  Branch (505:12): [True: 0, False: 0]
  ------------------
  506|      0|           ret |= writeXmlElement(ctx, "ByteString", &src->content.encoded.body,
  507|      0|                                  &UA_TYPES[UA_TYPES_BYTESTRING]);
  ------------------
  |  |  497|      0|#define UA_TYPES_BYTESTRING 14
  ------------------
  508|      0|        else
  509|      0|            ret |= ENCODE_DIRECT_XML(&src->content.encoded.body, String);
  ------------------
  |  |  191|      0|    TYPE##_encodeXml(ctx, (const UA_##TYPE*)SRC, NULL)
  ------------------
  510|      0|        ret |= writeXmlElemNameEnd(ctx, UA_XML_EXTENSIONOBJECT_BODY);
  ------------------
  |  |  179|      0|#define UA_XML_EXTENSIONOBJECT_BODY "Body"
  ------------------
  511|    219|    } else {
  512|       |        /* Write the decoded value */
  513|    219|        const UA_DataType *decoded_type = src->content.decoded.type;
  514|       |
  515|       |        /* Write the type NodeId */
  516|    219|        ret = writeXmlElement(ctx, UA_XML_EXTENSIONOBJECT_TYPEID,
  ------------------
  |  |  178|    219|#define UA_XML_EXTENSIONOBJECT_TYPEID "TypeId"
  ------------------
  517|    219|                              &decoded_type->typeId, &UA_TYPES[UA_TYPES_NODEID]);
  ------------------
  |  |  565|    219|#define UA_TYPES_NODEID 16
  ------------------
  518|       |
  519|       |        /* Write the body */
  520|    219|        ret |= writeXmlElemNameBegin(ctx, UA_XML_EXTENSIONOBJECT_BODY);
  ------------------
  |  |  179|    219|#define UA_XML_EXTENSIONOBJECT_BODY "Body"
  ------------------
  521|    219|        ret |= writeXmlElement(ctx, decoded_type->typeName, src->content.decoded.data, decoded_type);
  522|    219|        ret |= writeXmlElemNameEnd(ctx, UA_XML_EXTENSIONOBJECT_BODY);
  ------------------
  |  |  179|    219|#define UA_XML_EXTENSIONOBJECT_BODY "Body"
  ------------------
  523|    219|    }
  524|       |
  525|    219|    return ret;
  526|    219|}
ua_types_encoding_xml.c:writeXmlElemNameBegin:
  204|  14.6k|writeXmlElemNameBegin(CtxXml *ctx, const char* name) {
  205|  14.6k|    if(ctx->depth >= UA_XML_ENCODING_MAX_RECURSION - 1)
  ------------------
  |  |   15|  14.6k|#define UA_XML_ENCODING_MAX_RECURSION 100
  ------------------
  |  Branch (205:8): [True: 0, False: 14.6k]
  ------------------
  206|      0|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
  207|  14.6k|    status ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  14.6k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  208|  14.6k|    ret |= xmlEncodeWriteChars(ctx, "<", 1);
  209|  14.6k|    ret |= xmlEncodeWriteChars(ctx, name, strlen(name));
  210|  14.6k|    ret |= xmlEncodeWriteChars(ctx, ">", 1);
  211|  14.6k|    ctx->depth++;
  212|  14.6k|    return ret;
  213|  14.6k|}
ua_types_encoding_xml.c:writeXmlElemNameEnd:
  216|  14.6k|writeXmlElemNameEnd(CtxXml *ctx, const char* name) {
  217|  14.6k|    if(ctx->depth == 0)
  ------------------
  |  Branch (217:8): [True: 0, False: 14.6k]
  ------------------
  218|      0|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
  219|  14.6k|    ctx->depth--;
  220|  14.6k|    status ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  14.6k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  221|  14.6k|    ret |= xmlEncodeWriteChars(ctx, "</", 2);
  222|  14.6k|    ret |= xmlEncodeWriteChars(ctx, name, strlen(name));
  223|  14.6k|    ret |= xmlEncodeWriteChars(ctx, ">", 1);
  224|  14.6k|    return ret;
  225|  14.6k|}
ua_types_encoding_xml.c:DataValue_encodeXml:
  648|      3|ENCODE_XML(DataValue) {
  649|      3|    const UA_DataValue *src = (const UA_DataValue*)src_;
  650|      3|    UA_StatusCode ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      3|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  651|      3|    if(src->hasValue)
  ------------------
  |  Branch (651:8): [True: 0, False: 3]
  ------------------
  652|      0|        ret |= Variant_encodeXml(ctx, &src->value, &UA_TYPES[UA_TYPES_VARIANT]);
  ------------------
  |  |  803|      0|#define UA_TYPES_VARIANT 23
  ------------------
  653|      3|    if(src->hasStatus)
  ------------------
  |  Branch (653:8): [True: 0, False: 3]
  ------------------
  654|      0|        ret |= writeXmlElement(ctx, "StatusCode", &src->status,
  655|      0|                               &UA_TYPES[UA_TYPES_STATUSCODE]);
  ------------------
  |  |  633|      0|#define UA_TYPES_STATUSCODE 18
  ------------------
  656|      3|    if(src->hasSourceTimestamp)
  ------------------
  |  Branch (656:8): [True: 0, False: 3]
  ------------------
  657|      0|        ret |= writeXmlElement(ctx, "SourceTimestamp", &src->sourceTimestamp,
  658|      0|                               &UA_TYPES[UA_TYPES_DATETIME]);
  ------------------
  |  |  429|      0|#define UA_TYPES_DATETIME 12
  ------------------
  659|      3|    if(src->hasSourcePicoseconds)
  ------------------
  |  Branch (659:8): [True: 0, False: 3]
  ------------------
  660|      0|        ret |= writeXmlElement(ctx, "SourcePicoseconds", &src->sourcePicoseconds,
  661|      0|                               &UA_TYPES[UA_TYPES_UINT16]);
  ------------------
  |  |  157|      0|#define UA_TYPES_UINT16 4
  ------------------
  662|      3|    if(src->hasServerTimestamp)
  ------------------
  |  Branch (662:8): [True: 0, False: 3]
  ------------------
  663|      0|        ret |= writeXmlElement(ctx, "ServerTimestamp", &src->serverTimestamp,
  664|      0|                               &UA_TYPES[UA_TYPES_DATETIME]);
  ------------------
  |  |  429|      0|#define UA_TYPES_DATETIME 12
  ------------------
  665|      3|    if(src->hasServerPicoseconds)
  ------------------
  |  Branch (665:8): [True: 0, False: 3]
  ------------------
  666|      0|        ret |= writeXmlElement(ctx, "ServerPicoseconds", &src->serverPicoseconds,
  667|      0|                               &UA_TYPES[UA_TYPES_UINT16]);
  ------------------
  |  |  157|      0|#define UA_TYPES_UINT16 4
  ------------------
  668|      3|    return ret;
  669|      3|}
ua_types_encoding_xml.c:Variant_encodeXml:
  615|  4.62k|ENCODE_XML(Variant) {
  616|  4.62k|    const UA_Variant *src = (const UA_Variant*)src_;
  617|  4.62k|    if(!src->type)
  ------------------
  |  Branch (617:8): [True: 52, False: 4.57k]
  ------------------
  618|     52|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|     52|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
  619|       |
  620|       |    /* Set the array type in the encoding mask */
  621|  4.57k|    const bool isArray = src->arrayLength > 0 || src->data <= UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|  9.15k|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  |  Branch (621:26): [True: 0, False: 4.57k]
  |  Branch (621:50): [True: 15, False: 4.56k]
  ------------------
  622|       |
  623|  4.57k|    if(src->arrayDimensionsSize > 1)
  ------------------
  |  Branch (623:8): [True: 0, False: 4.57k]
  ------------------
  624|      0|        return UA_STATUSCODE_BADNOTIMPLEMENTED;
  ------------------
  |  |  239|      0|#define UA_STATUSCODE_BADNOTIMPLEMENTED ((UA_StatusCode) 0x80400000)
  ------------------
  625|       |
  626|  4.57k|    UA_StatusCode ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  4.57k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  627|  4.57k|    ret |= writeXmlElemNameBegin(ctx, UA_XML_VARIANT_VALUE);
  ------------------
  |  |  181|  4.57k|#define UA_XML_VARIANT_VALUE "Value"
  ------------------
  628|  4.57k|    if(!isArray) {
  ------------------
  |  Branch (628:8): [True: 4.56k, False: 15]
  ------------------
  629|  4.56k|        const UA_DataType *srctype = src->type;
  630|  4.56k|        void *ptr = src->data;
  631|  4.56k|        UA_ExtensionObject eo;
  632|  4.56k|        if(srctype->typeKind == UA_DATATYPEKIND_ENUM) {
  ------------------
  |  Branch (632:12): [True: 0, False: 4.56k]
  ------------------
  633|      0|            srctype = &UA_TYPES[UA_TYPES_INT32];
  ------------------
  |  |  191|      0|#define UA_TYPES_INT32 5
  ------------------
  634|  4.56k|        } else if(srctype->typeKind > UA_DATATYPEKIND_DIAGNOSTICINFO) {
  ------------------
  |  Branch (634:19): [True: 219, False: 4.34k]
  ------------------
  635|       |            /* Wrap value in an ExtensionObject */
  636|    219|            UA_ExtensionObject_setValue(&eo, (void*)(uintptr_t)ptr, srctype);
  637|    219|            ptr = &eo;
  638|    219|            srctype = &UA_TYPES[UA_TYPES_EXTENSIONOBJECT];
  ------------------
  |  |  735|    219|#define UA_TYPES_EXTENSIONOBJECT 21
  ------------------
  639|    219|        }
  640|  4.56k|        ret |= writeXmlElement(ctx, srctype->typeName, ptr, srctype);
  641|  4.56k|    } else {
  642|     15|        ret |= Array_encodeXml(ctx, src->data, src->arrayLength, src->type);
  643|     15|    }
  644|  4.57k|    ret |= writeXmlElemNameEnd(ctx, UA_XML_VARIANT_VALUE);
  ------------------
  |  |  181|  4.57k|#define UA_XML_VARIANT_VALUE "Value"
  ------------------
  645|  4.57k|    return ret;
  646|  4.57k|}
ua_types_encoding_xml.c:Array_encodeXml:
  530|     15|                const UA_DataType *type) {
  531|     15|    char arrName[128];
  532|     15|    UA_ExtensionObject eo;
  533|       |
  534|     15|    if(type->typeKind == UA_DATATYPEKIND_ENUM)
  ------------------
  |  Branch (534:8): [True: 0, False: 15]
  ------------------
  535|      0|        type = &UA_TYPES[UA_TYPES_INT32];
  ------------------
  |  |  191|      0|#define UA_TYPES_INT32 5
  ------------------
  536|     15|    UA_Boolean wrapEO = (type->typeKind > UA_DATATYPEKIND_DIAGNOSTICINFO);
  537|     15|    if(wrapEO) {
  ------------------
  |  Branch (537:8): [True: 0, False: 15]
  ------------------
  538|      0|        UA_ExtensionObject_setValue(&eo, (void*)(uintptr_t)ptr, type);
  539|      0|        type = &UA_TYPES[UA_TYPES_EXTENSIONOBJECT];
  ------------------
  |  |  735|      0|#define UA_TYPES_EXTENSIONOBJECT 21
  ------------------
  540|      0|    }
  541|       |
  542|     15|    size_t arrNameLen = strlen("ListOf") + strlen(type->typeName);
  543|     15|    if(arrNameLen >= 128)
  ------------------
  |  Branch (543:8): [True: 0, False: 15]
  ------------------
  544|      0|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
  545|     15|    memcpy(arrName, "ListOf", strlen("ListOf"));
  546|     15|    memcpy(arrName + strlen("ListOf"), type->typeName, strlen(type->typeName));
  547|     15|    arrName[arrNameLen] = '\0';
  548|       |
  549|     15|    uintptr_t uptr = (uintptr_t)ptr;
  550|     15|    status ret = writeXmlElemNameBegin(ctx, arrName);
  551|     15|    for(size_t i = 0; i < length && ret == UA_STATUSCODE_GOOD; ++i) {
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (551:23): [True: 0, False: 15]
  |  Branch (551:37): [True: 0, False: 0]
  ------------------
  552|      0|        if(!wrapEO) {
  ------------------
  |  Branch (552:12): [True: 0, False: 0]
  ------------------
  553|      0|            ret |= writeXmlElement(ctx, type->typeName, (const void*)uptr, type);
  554|      0|        } else {
  555|      0|            eo.content.decoded.data = (void*)uptr;
  556|      0|            ret |= writeXmlElement(ctx, type->typeName, &eo, type);
  557|      0|        }
  558|      0|        uptr += type->memSize;
  559|      0|    }
  560|     15|    ret |= writeXmlElemNameEnd(ctx, arrName);
  561|     15|    return ret;
  562|     15|}
ua_types_encoding_xml.c:DiagnosticInfo_encodeXml:
  671|      3|ENCODE_XML(DiagnosticInfo) {
  672|      3|    const UA_DiagnosticInfo *src = (const UA_DiagnosticInfo*)src_;
  673|      3|    UA_StatusCode ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      3|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  674|      3|    if(src->hasSymbolicId)
  ------------------
  |  Branch (674:8): [True: 0, False: 3]
  ------------------
  675|      0|        ret |= writeXmlElement(ctx, "SymbolicId", &src->symbolicId,
  676|      0|                               &UA_TYPES[UA_TYPES_INT32]);
  ------------------
  |  |  191|      0|#define UA_TYPES_INT32 5
  ------------------
  677|      3|    if(src->hasNamespaceUri)
  ------------------
  |  Branch (677:8): [True: 0, False: 3]
  ------------------
  678|      0|        ret |= writeXmlElement(ctx, "NamespaceUri", &src->namespaceUri,
  679|      0|                               &UA_TYPES[UA_TYPES_INT32]);
  ------------------
  |  |  191|      0|#define UA_TYPES_INT32 5
  ------------------
  680|      3|    if(src->hasLocalizedText)
  ------------------
  |  Branch (680:8): [True: 0, False: 3]
  ------------------
  681|      0|        ret |= writeXmlElement(ctx, "LocalizedText", &src->localizedText,
  682|      0|                               &UA_TYPES[UA_TYPES_INT32]);
  ------------------
  |  |  191|      0|#define UA_TYPES_INT32 5
  ------------------
  683|      3|    if(src->hasLocale)
  ------------------
  |  Branch (683:8): [True: 0, False: 3]
  ------------------
  684|      0|        ret |= writeXmlElement(ctx, "Locale", &src->locale,
  685|      0|                               &UA_TYPES[UA_TYPES_INT32]);
  ------------------
  |  |  191|      0|#define UA_TYPES_INT32 5
  ------------------
  686|      3|    if(src->hasAdditionalInfo)
  ------------------
  |  Branch (686:8): [True: 0, False: 3]
  ------------------
  687|      0|        ret |= writeXmlElement(ctx, "AdditionalInfo", &src->additionalInfo,
  688|      0|                               &UA_TYPES[UA_TYPES_STRING]);
  ------------------
  |  |  395|      0|#define UA_TYPES_STRING 11
  ------------------
  689|      3|    if(src->hasInnerStatusCode)
  ------------------
  |  Branch (689:8): [True: 0, False: 3]
  ------------------
  690|      0|        ret |= writeXmlElement(ctx, "InnerStatusCode", &src->innerStatusCode,
  691|      0|                               &UA_TYPES[UA_TYPES_STATUSCODE]);
  ------------------
  |  |  633|      0|#define UA_TYPES_STATUSCODE 18
  ------------------
  692|      3|    if(src->hasInnerDiagnosticInfo) {
  ------------------
  |  Branch (692:8): [True: 0, False: 3]
  ------------------
  693|      0|        if(!src->innerDiagnosticInfo)
  ------------------
  |  Branch (693:12): [True: 0, False: 0]
  ------------------
  694|      0|            return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
  695|      0|        ret |= writeXmlElement(ctx, "InnerDiagnosticInfo", src->innerDiagnosticInfo,
  696|      0|                               &UA_TYPES[UA_TYPES_DIAGNOSTICINFO]);
  ------------------
  |  |  837|      0|#define UA_TYPES_DIAGNOSTICINFO 24
  ------------------
  697|      0|    }
  698|      3|    return ret;
  699|      3|}
ua_types_encoding_xml.c:encodeXmlStructure:
  572|    219|encodeXmlStructure(CtxXml *ctx, const void *src, const UA_DataType *type) {
  573|    219|    uintptr_t ptr = (uintptr_t)src;
  574|    219|    UA_StatusCode ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    219|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  575|  1.40k|    for(size_t i = 0; i < type->membersSize && ret == UA_STATUSCODE_GOOD; i++) {
  ------------------
  |  |   17|  1.18k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (575:23): [True: 1.18k, False: 219]
  |  Branch (575:48): [True: 1.18k, False: 0]
  ------------------
  576|  1.18k|        const UA_DataTypeMember *m = &type->members[i];
  577|  1.18k|        const UA_DataType *mt = m->memberType;
  578|  1.18k|        ptr += m->padding;
  579|       |
  580|  1.18k|        if(m->isArray) {
  ------------------
  |  Branch (580:12): [True: 183, False: 999]
  ------------------
  581|    183|            size_t length = *(const size_t*)ptr;
  582|    183|            ptr += sizeof(size_t);
  583|    183|            const void *data = *(void* const*)ptr;
  584|    183|            ptr += sizeof(void*);
  585|    183|            if(m->isOptional && !data)
  ------------------
  |  Branch (585:16): [True: 0, False: 183]
  |  Branch (585:33): [True: 0, False: 0]
  ------------------
  586|      0|                continue;
  587|    183|            if(!m->isOptional && length == 0 && !data)
  ------------------
  |  Branch (587:16): [True: 183, False: 0]
  |  Branch (587:34): [True: 183, False: 0]
  |  Branch (587:49): [True: 183, False: 0]
  ------------------
  588|    183|                continue;
  589|      0|            ret |= writeXmlElemNameBegin(ctx, m->memberName);
  590|      0|            uintptr_t elem = (uintptr_t)data;
  591|      0|            for(size_t j = 0; j < length && ret == UA_STATUSCODE_GOOD; j++) {
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (591:31): [True: 0, False: 0]
  |  Branch (591:45): [True: 0, False: 0]
  ------------------
  592|      0|                ret |= writeXmlElement(ctx, mt->typeName, (const void*)elem, mt);
  593|      0|                elem += mt->memSize;
  594|      0|            }
  595|      0|            ret |= writeXmlElemNameEnd(ctx, m->memberName);
  596|      0|            continue;
  597|    183|        }
  598|       |
  599|    999|        const void *value = (const void*)ptr;
  600|    999|        if(m->isOptional) {
  ------------------
  |  Branch (600:12): [True: 0, False: 999]
  ------------------
  601|      0|            value = *(void* const*)ptr;
  602|      0|            ptr += sizeof(void*);
  603|      0|            if(!value)
  ------------------
  |  Branch (603:16): [True: 0, False: 0]
  ------------------
  604|      0|                continue;
  605|    999|        } else {
  606|    999|            ptr += mt->memSize;
  607|    999|            if(isDefaultValue(value, mt))
  ------------------
  |  Branch (607:16): [True: 999, False: 0]
  ------------------
  608|    999|                continue;
  609|    999|        }
  610|      0|        ret |= writeXmlElement(ctx, m->memberName, value, mt);
  611|      0|    }
  612|    219|    return ret;
  613|    219|}
ua_types_encoding_xml.c:isDefaultValue:
  565|    999|isDefaultValue(const void *value, const UA_DataType *type) {
  566|    999|    UA_STACKARRAY(UA_Byte, defaultValue, type->memSize);
  ------------------
  |  |  376|    999|#  define UA_STACKARRAY(TYPE, NAME, SIZE) TYPE NAME[SIZE]
  ------------------
  567|    999|    memset(defaultValue, 0, type->memSize);
  568|    999|    return UA_equal(value, defaultValue, type);
  569|    999|}
ua_types_encoding_xml.c:writeXmlElement:
  229|  9.84k|                const void *value, const UA_DataType *type) {
  230|  9.84k|    status ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  9.84k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  231|  9.84k|    ret |= writeXmlElemNameBegin(ctx, name);
  232|  9.84k|    ret |= encodeXmlJumpTable[type->typeKind](ctx, value, type);
  233|  9.84k|    ret |= writeXmlElemNameEnd(ctx, name);
  234|  9.84k|    return ret;
  235|  9.84k|}
ua_types_encoding_xml.c:Boolean_decodeXml:
  840|    141|DECODE_XML(Boolean) {
  841|    141|    UA_Boolean *dst = (UA_Boolean*)dst_;
  842|    141|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  822|    141|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (822:8): [True: 0, False: 141]
  |  |  ------------------
  |  |  823|    141|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  824|    141|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (824:18): [Folded, False: 141]
  |  |  ------------------
  ------------------
  843|    141|    GET_ELEM_CONTENT;
  ------------------
  |  |  827|    141|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  828|    141|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  829|    141|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (829:17): [Folded, False: 141]
  |  |  ------------------
  ------------------
  844|    141|    skipXmlObject(ctx);
  845|       |
  846|    141|    if(length == 4 &&
  ------------------
  |  Branch (846:8): [True: 27, False: 114]
  ------------------
  847|     27|       data[0] == 't' && data[1] == 'r' &&
  ------------------
  |  Branch (847:8): [True: 26, False: 1]
  |  Branch (847:26): [True: 21, False: 5]
  ------------------
  848|     21|       data[2] == 'u' && data[3] == 'e') {
  ------------------
  |  Branch (848:8): [True: 9, False: 12]
  |  Branch (848:26): [True: 2, False: 7]
  ------------------
  849|      2|        *dst = true;
  850|    139|    } else if(length == 5 &&
  ------------------
  |  Branch (850:15): [True: 37, False: 102]
  ------------------
  851|     37|              data[0] == 'f' && data[1] == 'a' &&
  ------------------
  |  Branch (851:15): [True: 33, False: 4]
  |  Branch (851:33): [True: 25, False: 8]
  ------------------
  852|     25|              data[2] == 'l' && data[3] == 's' &&
  ------------------
  |  Branch (852:15): [True: 15, False: 10]
  |  Branch (852:33): [True: 3, False: 12]
  ------------------
  853|      3|              data[4] == 'e') {
  ------------------
  |  Branch (853:15): [True: 2, False: 1]
  ------------------
  854|      2|        *dst = false;
  855|    137|    } else {
  856|    137|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    137|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  857|    137|    }
  858|       |
  859|      4|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      4|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  860|    141|}
ua_types_encoding_xml.c:skipXmlObject:
  832|  4.58k|skipXmlObject(ParseCtxXml *ctx) {
  833|  4.58k|    size_t end_parent = ctx->tokens[ctx->index].end;
  834|  6.19M|    while(ctx->index < ctx->tokensSize &&
  ------------------
  |  Branch (834:11): [True: 6.18M, False: 4.49k]
  ------------------
  835|  6.18M|          ctx->tokens[ctx->index].end <= end_parent) {
  ------------------
  |  Branch (835:11): [True: 6.18M, False: 89]
  ------------------
  836|  6.18M|        ctx->index++;
  837|  6.18M|    }
  838|  4.58k|}
ua_types_encoding_xml.c:SByte_decodeXml:
  898|    274|DECODE_XML(SByte) {
  899|    274|    UA_SByte *dst = (UA_SByte*)dst_;
  900|    274|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  822|    274|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (822:8): [True: 0, False: 274]
  |  |  ------------------
  |  |  823|    274|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  824|    274|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (824:18): [Folded, False: 274]
  |  |  ------------------
  ------------------
  901|    274|    GET_ELEM_CONTENT;
  ------------------
  |  |  827|    274|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  828|    274|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  829|    274|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (829:17): [Folded, False: 274]
  |  |  ------------------
  ------------------
  902|    274|    skipXmlObject(ctx);
  903|       |
  904|    274|    UA_Int64 out = 0;
  905|    274|    UA_StatusCode s = decodeSigned(data, length, &out);
  906|    274|    if(s != UA_STATUSCODE_GOOD || out < UA_SBYTE_MIN || out > UA_SBYTE_MAX)
  ------------------
  |  |   17|    548|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out < UA_SBYTE_MIN || out > UA_SBYTE_MAX)
  ------------------
  |  |   64|    466|#define UA_SBYTE_MIN (-128)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out < UA_SBYTE_MIN || out > UA_SBYTE_MAX)
  ------------------
  |  |   65|    113|#define UA_SBYTE_MAX 127
  ------------------
  |  Branch (906:8): [True: 82, False: 192]
  |  Branch (906:35): [True: 79, False: 113]
  |  Branch (906:57): [True: 59, False: 54]
  ------------------
  907|    220|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    220|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  908|       |
  909|     54|    *dst = (UA_SByte)out;
  910|     54|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     54|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  911|    274|}
ua_types_encoding_xml.c:decodeSigned:
  863|  1.46k|decodeSigned(const UA_Byte *data, size_t dataSize, UA_Int64 *dst) {
  864|  1.46k|    if(!data || dataSize == 0)
  ------------------
  |  Branch (864:8): [True: 19, False: 1.44k]
  |  Branch (864:17): [True: 0, False: 1.44k]
  ------------------
  865|     19|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     19|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  866|  1.44k|    size_t len = parseInt64((const char*)data, dataSize, dst);
  867|  1.44k|    if(len == 0)
  ------------------
  |  Branch (867:8): [True: 165, False: 1.28k]
  ------------------
  868|    165|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    165|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  869|       |
  870|       |    /* There must only be whitespace between the end of the parsed number and
  871|       |     * the end of the XML section */
  872|  2.26k|    for(size_t i = len; i < dataSize; i++) {
  ------------------
  |  Branch (872:25): [True: 1.08k, False: 1.18k]
  ------------------
  873|  1.08k|        if(data[i] != ' ' && data[i] - '\t' >= 5)
  ------------------
  |  Branch (873:12): [True: 791, False: 295]
  |  Branch (873:30): [True: 100, False: 691]
  ------------------
  874|    100|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    100|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  875|  1.08k|    }
  876|       |
  877|  1.18k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  1.18k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  878|  1.28k|}
ua_types_encoding_xml.c:Byte_decodeXml:
  913|     99|DECODE_XML(Byte) {
  914|     99|    UA_Byte *dst = (UA_Byte*)dst_;
  915|     99|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  822|     99|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (822:8): [True: 0, False: 99]
  |  |  ------------------
  |  |  823|     99|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  824|     99|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (824:18): [Folded, False: 99]
  |  |  ------------------
  ------------------
  916|     99|    GET_ELEM_CONTENT;
  ------------------
  |  |  827|     99|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  828|     99|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  829|     99|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (829:17): [Folded, False: 99]
  |  |  ------------------
  ------------------
  917|     99|    skipXmlObject(ctx);
  918|       |
  919|     99|    UA_UInt64 out = 0;
  920|     99|    UA_StatusCode s = decodeUnsigned(data, length, &out);
  921|     99|    if(s != UA_STATUSCODE_GOOD || out > UA_BYTE_MAX)
  ------------------
  |  |   17|    198|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out > UA_BYTE_MAX)
  ------------------
  |  |   74|     44|#define UA_BYTE_MAX 255
  ------------------
  |  Branch (921:8): [True: 55, False: 44]
  |  Branch (921:35): [True: 20, False: 24]
  ------------------
  922|     75|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     75|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  923|       |
  924|     24|    *dst = (UA_Byte)out;
  925|     24|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     24|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  926|     99|}
ua_types_encoding_xml.c:decodeUnsigned:
  881|    844|decodeUnsigned(const UA_Byte *data, size_t dataSize, UA_UInt64 *dst) {
  882|    844|    if(!data || dataSize == 0)
  ------------------
  |  Branch (882:8): [True: 40, False: 804]
  |  Branch (882:17): [True: 0, False: 804]
  ------------------
  883|     40|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     40|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  884|    804|    size_t len = parseUInt64((const char*)data, dataSize, dst);
  885|    804|    if(len == 0)
  ------------------
  |  Branch (885:8): [True: 83, False: 721]
  ------------------
  886|     83|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     83|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  887|       |
  888|       |    /* There must only be whitespace between the end of the parsed number and
  889|       |     * the end of the XML section */
  890|  2.49k|    for(size_t i = len; i < dataSize; i++) {
  ------------------
  |  Branch (890:25): [True: 1.93k, False: 562]
  ------------------
  891|  1.93k|        if(data[i] != ' ' && data[i] - '\t' >= 5)
  ------------------
  |  Branch (891:12): [True: 1.25k, False: 675]
  |  Branch (891:30): [True: 159, False: 1.09k]
  ------------------
  892|    159|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    159|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  893|  1.93k|    }
  894|       |
  895|    562|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    562|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  896|    721|}
ua_types_encoding_xml.c:Int16_decodeXml:
  928|    291|DECODE_XML(Int16) {
  929|    291|    UA_Int16 *dst = (UA_Int16*)dst_;
  930|    291|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  822|    291|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (822:8): [True: 0, False: 291]
  |  |  ------------------
  |  |  823|    291|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  824|    291|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (824:18): [Folded, False: 291]
  |  |  ------------------
  ------------------
  931|    291|    GET_ELEM_CONTENT;
  ------------------
  |  |  827|    291|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  828|    291|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  829|    291|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (829:17): [Folded, False: 291]
  |  |  ------------------
  ------------------
  932|    291|    skipXmlObject(ctx);
  933|       |
  934|    291|    UA_Int64 out = 0;
  935|    291|    UA_StatusCode s = decodeSigned(data, length, &out);
  936|    291|    if(s != UA_STATUSCODE_GOOD || out < UA_INT16_MIN || out > UA_INT16_MAX)
  ------------------
  |  |   17|    582|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out < UA_INT16_MIN || out > UA_INT16_MAX)
  ------------------
  |  |   82|    519|#define UA_INT16_MIN (-32768)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out < UA_INT16_MIN || out > UA_INT16_MAX)
  ------------------
  |  |   83|    166|#define UA_INT16_MAX 32767
  ------------------
  |  Branch (936:8): [True: 63, False: 228]
  |  Branch (936:35): [True: 62, False: 166]
  |  Branch (936:57): [True: 44, False: 122]
  ------------------
  937|    169|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    169|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  938|       |
  939|    122|    *dst = (UA_Int16)out;
  940|    122|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    122|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  941|    291|}
ua_types_encoding_xml.c:UInt16_decodeXml:
  943|    212|DECODE_XML(UInt16) {
  944|    212|    UA_UInt16 *dst = (UA_UInt16*)dst_;
  945|    212|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  822|    212|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (822:8): [True: 0, False: 212]
  |  |  ------------------
  |  |  823|    212|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  824|    212|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (824:18): [Folded, False: 212]
  |  |  ------------------
  ------------------
  946|    212|    GET_ELEM_CONTENT;
  ------------------
  |  |  827|    212|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  828|    212|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  829|    212|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (829:17): [Folded, False: 212]
  |  |  ------------------
  ------------------
  947|    212|    skipXmlObject(ctx);
  948|       |
  949|    212|    UA_UInt64 out = 0;
  950|    212|    UA_StatusCode s = decodeUnsigned(data, length, &out);
  951|    212|    if(s != UA_STATUSCODE_GOOD || out > UA_UINT16_MAX)
  ------------------
  |  |   17|    424|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out > UA_UINT16_MAX)
  ------------------
  |  |   92|    132|#define UA_UINT16_MAX 65535
  ------------------
  |  Branch (951:8): [True: 80, False: 132]
  |  Branch (951:35): [True: 82, False: 50]
  ------------------
  952|    162|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    162|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  953|       |
  954|     50|    *dst = (UA_UInt16)out;
  955|     50|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     50|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  956|    212|}
ua_types_encoding_xml.c:Int32_decodeXml:
  958|    419|DECODE_XML(Int32) {
  959|    419|    UA_Int32 *dst = (UA_Int32*)dst_;
  960|    419|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  822|    419|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (822:8): [True: 0, False: 419]
  |  |  ------------------
  |  |  823|    419|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  824|    419|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (824:18): [Folded, False: 419]
  |  |  ------------------
  ------------------
  961|    419|    GET_ELEM_CONTENT;
  ------------------
  |  |  827|    419|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  828|    419|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  829|    419|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (829:17): [Folded, False: 419]
  |  |  ------------------
  ------------------
  962|    419|    skipXmlObject(ctx);
  963|       |
  964|    419|    UA_Int64 out = 0;
  965|    419|    UA_StatusCode s = decodeSigned(data, length, &out);
  966|    419|    if(s != UA_STATUSCODE_GOOD || out < UA_INT32_MIN || out > UA_INT32_MAX)
  ------------------
  |  |   17|    838|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out < UA_INT32_MIN || out > UA_INT32_MAX)
  ------------------
  |  |  100|    767|#define UA_INT32_MIN ((int32_t)-2147483648LL)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out < UA_INT32_MIN || out > UA_INT32_MAX)
  ------------------
  |  |  101|    267|#define UA_INT32_MAX 2147483647L
  ------------------
  |  Branch (966:8): [True: 71, False: 348]
  |  Branch (966:35): [True: 81, False: 267]
  |  Branch (966:57): [True: 21, False: 246]
  ------------------
  967|    173|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    173|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  968|       |
  969|    246|    *dst = (UA_Int32)out;
  970|    246|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    246|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  971|    419|}
ua_types_encoding_xml.c:UInt32_decodeXml:
  997|    265|DECODE_XML(UInt32) {
  998|    265|    UA_UInt32 *dst = (UA_UInt32*)dst_;
  999|    265|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  822|    265|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (822:8): [True: 0, False: 265]
  |  |  ------------------
  |  |  823|    265|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  824|    265|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (824:18): [Folded, False: 265]
  |  |  ------------------
  ------------------
 1000|    265|    GET_ELEM_CONTENT;
  ------------------
  |  |  827|    265|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  828|    265|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  829|    265|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (829:17): [Folded, False: 265]
  |  |  ------------------
  ------------------
 1001|    265|    skipXmlObject(ctx);
 1002|       |
 1003|    265|    UA_UInt64 out = 0;
 1004|    265|    UA_StatusCode s = decodeUnsigned(data, length, &out);
 1005|    265|    if(s != UA_STATUSCODE_GOOD || out > UA_UINT32_MAX)
  ------------------
  |  |   17|    530|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out > UA_UINT32_MAX)
  ------------------
  |  |  110|    184|#define UA_UINT32_MAX 4294967295UL
  ------------------
  |  Branch (1005:8): [True: 81, False: 184]
  |  Branch (1005:35): [True: 56, False: 128]
  ------------------
 1006|    137|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    137|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1007|       |
 1008|    128|    *dst = (UA_UInt32)out;
 1009|    128|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    128|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1010|    265|}
ua_types_encoding_xml.c:Int64_decodeXml:
 1012|    480|DECODE_XML(Int64) {
 1013|    480|    UA_Int64 *dst = (UA_Int64*)dst_;
 1014|    480|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  822|    480|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (822:8): [True: 0, False: 480]
  |  |  ------------------
  |  |  823|    480|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  824|    480|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (824:18): [Folded, False: 480]
  |  |  ------------------
  ------------------
 1015|    480|    GET_ELEM_CONTENT;
  ------------------
  |  |  827|    480|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  828|    480|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  829|    480|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (829:17): [Folded, False: 480]
  |  |  ------------------
  ------------------
 1016|    480|    skipXmlObject(ctx);
 1017|       |
 1018|    480|    UA_Int64 out = 0;
 1019|    480|    UA_StatusCode s = decodeSigned(data, length, &out);
 1020|    480|    if(s != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    480|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1020:8): [True: 68, False: 412]
  ------------------
 1021|     68|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     68|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1022|       |
 1023|    412|    *dst = (UA_Int64)out;
 1024|    412|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    412|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1025|    480|}
ua_types_encoding_xml.c:UInt64_decodeXml:
 1027|    268|DECODE_XML(UInt64) {
 1028|    268|    UA_UInt64 *dst = (UA_UInt64*)dst_;
 1029|    268|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  822|    268|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (822:8): [True: 0, False: 268]
  |  |  ------------------
  |  |  823|    268|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  824|    268|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (824:18): [Folded, False: 268]
  |  |  ------------------
  ------------------
 1030|    268|    GET_ELEM_CONTENT;
  ------------------
  |  |  827|    268|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  828|    268|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  829|    268|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (829:17): [Folded, False: 268]
  |  |  ------------------
  ------------------
 1031|    268|    skipXmlObject(ctx);
 1032|       |
 1033|    268|    UA_UInt64 out = 0;
 1034|    268|    UA_StatusCode s = decodeUnsigned(data, length, &out);
 1035|    268|    if(s != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    268|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1035:8): [True: 66, False: 202]
  ------------------
 1036|     66|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     66|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1037|       |
 1038|    202|    *dst = (UA_UInt64)out;
 1039|    202|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    202|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1040|    268|}
ua_types_encoding_xml.c:Float_decodeXml:
 1091|      1|DECODE_XML(Float) {
 1092|      1|    UA_Float *dst = (UA_Float*)dst_;
 1093|      1|    UA_Double v = 0.0;
 1094|       |    UA_StatusCode res = Double_decodeXml(ctx, &v, NULL);
 1095|      1|    *dst = (UA_Float)v;
 1096|      1|    return res;
 1097|      1|}
ua_types_encoding_xml.c:Double_decodeXml:
 1042|  1.32k|DECODE_XML(Double) {
 1043|  1.32k|    UA_Double *dst = (UA_Double*)dst_;
 1044|  1.32k|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  822|  1.32k|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (822:8): [True: 0, False: 1.32k]
  |  |  ------------------
  |  |  823|  1.32k|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  824|  1.32k|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (824:18): [Folded, False: 1.32k]
  |  |  ------------------
  ------------------
 1045|  1.32k|    GET_ELEM_CONTENT;
  ------------------
  |  |  827|  1.32k|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  828|  1.32k|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  829|  1.32k|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (829:17): [Folded, False: 1.32k]
  |  |  ------------------
  ------------------
 1046|  1.32k|    skipXmlObject(ctx);
 1047|       |
 1048|  1.32k|    if(!data || length == 0)
  ------------------
  |  Branch (1048:8): [True: 5, False: 1.31k]
  |  Branch (1048:17): [True: 0, False: 1.31k]
  ------------------
 1049|      5|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      5|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1050|       |
 1051|       |    /* https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/
 1052|       |     * Maximum digit counts for select IEEE floating-point formats: 1074
 1053|       |     * Sanity check. */
 1054|  1.31k|    if(length > 1075)
  ------------------
  |  Branch (1054:8): [True: 19, False: 1.29k]
  ------------------
 1055|     19|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     19|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1056|       |
 1057|  1.29k|    if(length == 3 && memcmp(data, "INF", 3) == 0) {
  ------------------
  |  Branch (1057:8): [True: 109, False: 1.18k]
  |  Branch (1057:23): [True: 4, False: 105]
  ------------------
 1058|      4|        *dst = INFINITY;
 1059|      4|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      4|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1060|      4|    }
 1061|       |
 1062|  1.29k|    if(length == 4 && memcmp(data, "-INF", 4) == 0) {
  ------------------
  |  Branch (1062:8): [True: 63, False: 1.22k]
  |  Branch (1062:23): [True: 3, False: 60]
  ------------------
 1063|      3|        *dst = -INFINITY;
 1064|      3|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      3|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1065|      3|    }
 1066|       |
 1067|  1.28k|    if(length == 3 && memcmp(data, "NaN", 3) == 0) {
  ------------------
  |  Branch (1067:8): [True: 105, False: 1.18k]
  |  Branch (1067:23): [True: 4, False: 101]
  ------------------
 1068|      4|        *dst = NAN;
 1069|      4|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      4|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1070|      4|    }
 1071|       |
 1072|  1.28k|    if(length == 3 && memcmp(data, "-NaN", 3) == 0) {
  ------------------
  |  Branch (1072:8): [True: 101, False: 1.18k]
  |  Branch (1072:23): [True: 1, False: 100]
  ------------------
 1073|      1|        *dst = NAN;
 1074|      1|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      1|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1075|      1|    }
 1076|       |
 1077|  1.28k|    size_t len = parseDouble((const char*)data, length, dst);
 1078|  1.28k|    if(len == 0)
  ------------------
  |  Branch (1078:8): [True: 34, False: 1.25k]
  ------------------
 1079|     34|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     34|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1080|       |
 1081|       |    /* There must only be whitespace between the end of the parsed number and
 1082|       |     * the end of the token */
 1083|  1.47k|    for(size_t i = len; i < length; i++) {
  ------------------
  |  Branch (1083:25): [True: 257, False: 1.21k]
  ------------------
 1084|    257|        if(data[i] != ' ' && data[i] -'\t' >= 5)
  ------------------
  |  Branch (1084:12): [True: 245, False: 12]
  |  Branch (1084:30): [True: 36, False: 209]
  ------------------
 1085|     36|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     36|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1086|    257|    }
 1087|       |
 1088|  1.21k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  1.21k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1089|  1.25k|}
ua_types_encoding_xml.c:String_decodeXml:
 1099|    102|DECODE_XML(String) {
 1100|    102|    UA_String *dst = (UA_String*)dst_;
 1101|    102|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  822|    102|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (822:8): [True: 0, False: 102]
  |  |  ------------------
  |  |  823|    102|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  824|    102|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (824:18): [Folded, False: 102]
  |  |  ------------------
  ------------------
 1102|    102|    GET_ELEM_CONTENT;
  ------------------
  |  |  827|    102|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  828|    102|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  829|    102|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (829:17): [Folded, False: 102]
  |  |  ------------------
  ------------------
 1103|    102|    skipXmlObject(ctx);
 1104|       |
 1105|       |    /* Empty string? */
 1106|    102|    if(length == 0) {
  ------------------
  |  Branch (1106:8): [True: 10, False: 92]
  ------------------
 1107|     10|        dst->data = (UA_Byte*)UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|     10|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
 1108|     10|        dst->length = 0;
 1109|     10|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     10|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1110|     10|    }
 1111|       |
 1112|     92|    UA_String str = {length, (UA_Byte*)(uintptr_t)data};
 1113|     92|    return UA_String_copy(&str, dst);
 1114|    102|}
ua_types_encoding_xml.c:DateTime_decodeXml:
 1116|     43|DECODE_XML(DateTime) {
 1117|     43|    UA_DateTime *dst = (UA_DateTime*)dst_;
 1118|     43|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  822|     43|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (822:8): [True: 0, False: 43]
  |  |  ------------------
  |  |  823|     43|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  824|     43|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (824:18): [Folded, False: 43]
  |  |  ------------------
  ------------------
 1119|     43|    GET_ELEM_CONTENT;
  ------------------
  |  |  827|     43|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  828|     43|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  829|     43|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (829:17): [Folded, False: 43]
  |  |  ------------------
  ------------------
 1120|     43|    skipXmlObject(ctx);
 1121|     43|    UA_String str = {length, (UA_Byte*)(uintptr_t)data};
 1122|     43|    return UA_DateTime_parse(dst, str);
 1123|     43|}
ua_types_encoding_xml.c:Guid_decodeXml:
 1217|      1|DECODE_XML(Guid) {
 1218|      1|    UA_Guid *dst = (UA_Guid*)dst_;
 1219|      1|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  822|      1|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (822:8): [True: 0, False: 1]
  |  |  ------------------
  |  |  823|      1|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  824|      1|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (824:18): [Folded, False: 1]
  |  |  ------------------
  ------------------
 1220|      1|    UA_String str;
 1221|      1|    UA_String_init(&str);
 1222|      1|    XmlDecodeEntry entry = {UA_STRING_STATIC(UA_XML_GUID_STRING), &str,
  ------------------
  |  |  224|      1|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1223|      1|                            NULL, false, &UA_TYPES[UA_TYPES_STRING]};
  ------------------
  |  |  395|      1|#define UA_TYPES_STRING 11
  ------------------
 1224|      1|    status ret = decodeXmlFields(ctx, &entry, 1);
 1225|      1|    ret |= UA_Guid_parse(dst, str);
 1226|      1|    UA_String_clear(&str);
 1227|      1|    return ret;
 1228|      1|}
ua_types_encoding_xml.c:decodeXmlFields:
 1152|    224|decodeXmlFields(ParseCtxXml *ctx, XmlDecodeEntry *entries, size_t entryCount) {
 1153|    224|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  822|    224|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (822:8): [True: 0, False: 224]
  |  |  ------------------
  |  |  823|    224|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  824|    224|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (824:18): [Folded, False: 224]
  |  |  ------------------
  ------------------
 1154|       |
 1155|    224|    if(ctx->depth >= UA_XML_ENCODING_MAX_RECURSION)
  ------------------
  |  |   15|    224|#define UA_XML_ENCODING_MAX_RECURSION 100
  ------------------
  |  Branch (1155:8): [True: 0, False: 224]
  ------------------
 1156|      0|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
 1157|       |
 1158|    224|    size_t childCount = ctx->tokens[ctx->index].children;
 1159|       |
 1160|       |    /* Empty object */
 1161|    224|    if(childCount == 0) {
  ------------------
  |  Branch (1161:8): [True: 151, False: 73]
  ------------------
 1162|    151|        skipXmlObject(ctx);
 1163|    151|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    151|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1164|    151|    }
 1165|       |
 1166|       |    /* Go to first entry element */
 1167|     73|    ctx->depth++;
 1168|     73|    ctx->index += 1 + ctx->tokens[ctx->index].attributes;
 1169|       |
 1170|     73|    status ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     73|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1171|    219|    for(size_t i = 0; i < childCount; i++) {
  ------------------
  |  Branch (1171:23): [True: 146, False: 73]
  ------------------
 1172|    146|        xml_token *elem = &ctx->tokens[ctx->index];
 1173|    146|        XmlDecodeEntry *entry = NULL;
 1174|    146|        for(size_t j = i; j < entryCount + i; j++) {
  ------------------
  |  Branch (1174:27): [True: 146, False: 0]
  ------------------
 1175|       |            /* Search for key, if found outer loop will be one less. Best case
 1176|       |             * if objectCount is in order! */
 1177|    146|            size_t index = j % entryCount;
 1178|    146|            if(!UA_String_equal_ignorecase(&elem->name, &entries[index].name))
  ------------------
  |  Branch (1178:16): [True: 0, False: 146]
  ------------------
 1179|      0|                continue;
 1180|    146|            entry = &entries[index];
 1181|    146|            break;
 1182|    146|        }
 1183|       |
 1184|       |        /* Unknown child element */
 1185|    146|        if(!entry)
  ------------------
  |  Branch (1185:12): [True: 0, False: 146]
  ------------------
 1186|      0|            goto errout;
 1187|       |
 1188|       |        /* An entry that was expected, but shall not be decoded.
 1189|       |         * Jump over it. */
 1190|    146|        if(!entry->fieldPointer || (!entry->function && !entry->type)) {
  ------------------
  |  Branch (1190:12): [True: 0, False: 146]
  |  Branch (1190:37): [True: 73, False: 73]
  |  Branch (1190:57): [True: 0, False: 73]
  ------------------
 1191|      0|            skipXmlObject(ctx);
 1192|      0|            continue;
 1193|      0|        }
 1194|       |
 1195|       |        /* Duplicate child element */
 1196|    146|        if(entry->found)
  ------------------
  |  Branch (1196:12): [True: 0, False: 146]
  ------------------
 1197|      0|            goto errout;
 1198|    146|        entry->found = true;
 1199|       |
 1200|       |        /* Decode */
 1201|    146|        if(entry->function) /* Specialized decoding function */
  ------------------
  |  Branch (1201:12): [True: 73, False: 73]
  ------------------
 1202|     73|            ret = entry->function(ctx, entry->fieldPointer, entry->type);
 1203|     73|        else /* Decode by type-kind */
 1204|     73|            ret = decodeXmlJumpTable[entry->type->typeKind](ctx, entry->fieldPointer, entry->type);
 1205|    146|        if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    146|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1205:12): [True: 0, False: 146]
  ------------------
 1206|      0|            goto cleanup;
 1207|    146|    }
 1208|       |
 1209|     73|cleanup:
 1210|     73|    ctx->depth--;
 1211|     73|    return ret;
 1212|      0|errout:
 1213|      0|    ctx->depth--;
 1214|      0|    return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1215|     73|}
ua_types_encoding_xml.c:ByteString_decodeXml:
 1244|     64|DECODE_XML(ByteString) {
 1245|     64|    UA_ByteString *dst = (UA_ByteString*)dst_;
 1246|     64|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  822|     64|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (822:8): [True: 0, False: 64]
  |  |  ------------------
  |  |  823|     64|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  824|     64|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (824:18): [Folded, False: 64]
  |  |  ------------------
  ------------------
 1247|     64|    GET_ELEM_CONTENT;
  ------------------
  |  |  827|     64|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  828|     64|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  829|     64|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (829:17): [Folded, False: 64]
  |  |  ------------------
  ------------------
 1248|     64|    skipXmlObject(ctx);
 1249|       |
 1250|       |    /* Trim whitespace around the content. The tokenizer can include CDATA
 1251|       |     * delimiters in the content range if whitespace precedes the section. */
 1252|     64|    while(length > 0 && (data[0] == ' ' || data[0] == '\t' ||
  ------------------
  |  Branch (1252:11): [True: 0, False: 64]
  |  Branch (1252:26): [True: 0, False: 0]
  |  Branch (1252:44): [True: 0, False: 0]
  ------------------
 1253|      0|                         data[0] == '\r' || data[0] == '\n')) {
  ------------------
  |  Branch (1253:26): [True: 0, False: 0]
  |  Branch (1253:45): [True: 0, False: 0]
  ------------------
 1254|      0|        data++;
 1255|      0|        length--;
 1256|      0|    }
 1257|     64|    while(length > 0 && (data[length - 1] == ' ' || data[length - 1] == '\t' ||
  ------------------
  |  Branch (1257:11): [True: 0, False: 64]
  |  Branch (1257:26): [True: 0, False: 0]
  |  Branch (1257:53): [True: 0, False: 0]
  ------------------
 1258|      0|                         data[length - 1] == '\r' || data[length - 1] == '\n'))
  ------------------
  |  Branch (1258:26): [True: 0, False: 0]
  |  Branch (1258:54): [True: 0, False: 0]
  ------------------
 1259|      0|        length--;
 1260|       |
 1261|       |    /* Remove an exact CDATA wrapper before compacting the Base64 payload. */
 1262|     64|    if(length >= 12 && memcmp(data, "<![CDATA[", 9) == 0 &&
  ------------------
  |  Branch (1262:8): [True: 0, False: 64]
  |  Branch (1262:24): [True: 0, False: 0]
  ------------------
 1263|      0|       memcmp(&data[length - 3], "]]>", 3) == 0) {
  ------------------
  |  Branch (1263:8): [True: 0, False: 0]
  ------------------
 1264|      0|        data += 9;
 1265|      0|        length -= 12;
 1266|      0|    }
 1267|       |
 1268|       |    /* XML allows insignificant whitespace inside Base64 content. */
 1269|     64|    size_t encodedLength = compactXmlBase64(data, length, NULL);
 1270|       |
 1271|       |    /* Empty bytestring? */
 1272|     64|    if(encodedLength == 0) {
  ------------------
  |  Branch (1272:8): [True: 64, False: 0]
  ------------------
 1273|     64|        dst->data = (UA_Byte*)UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|     64|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
 1274|     64|        dst->length = 0;
 1275|     64|    } else {
 1276|      0|        const unsigned char *encoded = (const unsigned char*)data;
 1277|      0|        unsigned char *compact = NULL;
 1278|      0|        if(encodedLength != length) {
  ------------------
  |  Branch (1278:12): [True: 0, False: 0]
  ------------------
 1279|      0|            compact = (unsigned char*)UA_malloc(encodedLength);
  ------------------
  |  |   18|      0|#define UA_malloc(size) UA_mallocSingleton(size)
  ------------------
 1280|      0|            if(!compact)
  ------------------
  |  Branch (1280:16): [True: 0, False: 0]
  ------------------
 1281|      0|                return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 1282|      0|            compactXmlBase64(data, length, compact);
 1283|      0|            encoded = compact;
 1284|      0|        }
 1285|      0|        size_t flen = 0;
 1286|      0|        unsigned char *unB64 = UA_unbase64(encoded, encodedLength, &flen);
 1287|      0|        UA_free(compact);
  ------------------
  |  |   19|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1288|      0|        if(!unB64)
  ------------------
  |  Branch (1288:12): [True: 0, False: 0]
  ------------------
 1289|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1290|      0|        dst->data = (UA_Byte*)unB64;
 1291|      0|        dst->length = flen;
 1292|      0|    }
 1293|       |
 1294|     64|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     64|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1295|     64|}
ua_types_encoding_xml.c:compactXmlBase64:
 1231|     64|compactXmlBase64(const UA_Byte *data, size_t length, UA_Byte *out) {
 1232|     64|    size_t pos = 0;
 1233|     64|    for(size_t i = 0; i < length; i++) {
  ------------------
  |  Branch (1233:23): [True: 0, False: 64]
  ------------------
 1234|      0|        if(data[i] != ' ' && data[i] != '\t' &&
  ------------------
  |  Branch (1234:12): [True: 0, False: 0]
  |  Branch (1234:30): [True: 0, False: 0]
  ------------------
 1235|      0|           data[i] != '\r' && data[i] != '\n') {
  ------------------
  |  Branch (1235:12): [True: 0, False: 0]
  |  Branch (1235:31): [True: 0, False: 0]
  ------------------
 1236|      0|            if(out)
  ------------------
  |  Branch (1236:16): [True: 0, False: 0]
  ------------------
 1237|      0|                out[pos] = data[i];
 1238|      0|            pos++;
 1239|      0|        }
 1240|      0|    }
 1241|     64|    return pos;
 1242|     64|}
ua_types_encoding_xml.c:XmlElement_decodeXml:
 1297|    254|DECODE_XML(XmlElement) {
 1298|    254|    UA_XmlElement *dst = (UA_XmlElement*)dst_;
 1299|    254|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  822|    254|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (822:8): [True: 0, False: 254]
  |  |  ------------------
  |  |  823|    254|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  824|    254|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (824:18): [Folded, False: 254]
  |  |  ------------------
  ------------------
 1300|    254|    xml_token *token = &ctx->tokens[ctx->index];
 1301|    254|    size_t begin = token->start;
 1302|  3.29M|    while(begin < token->end && ctx->xml[begin] != '>')
  ------------------
  |  Branch (1302:11): [True: 3.29M, False: 0]
  |  Branch (1302:33): [True: 3.29M, False: 254]
  ------------------
 1303|  3.29M|        begin++;
 1304|    254|    if(begin == token->end)
  ------------------
  |  Branch (1304:8): [True: 0, False: 254]
  ------------------
 1305|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1306|    254|    begin++;
 1307|    254|    size_t end = token->end;
 1308|  8.11M|    while(end > begin && ctx->xml[end - 1] != '<')
  ------------------
  |  Branch (1308:11): [True: 8.11M, False: 127]
  |  Branch (1308:26): [True: 8.11M, False: 127]
  ------------------
 1309|  8.11M|        end--;
 1310|    254|    if(end == begin)
  ------------------
  |  Branch (1310:8): [True: 127, False: 127]
  ------------------
 1311|    127|        end = token->end;
 1312|    127|    else
 1313|    127|        end--;
 1314|    254|    UA_StatusCode ret = UA_ByteString_allocBuffer((UA_ByteString*)dst, end - begin);
 1315|    254|    if(ret == UA_STATUSCODE_GOOD && end > begin)
  ------------------
  |  |   17|    508|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1315:8): [True: 254, False: 0]
  |  Branch (1315:37): [True: 168, False: 86]
  ------------------
 1316|    168|        memcpy(dst->data, &ctx->xml[begin], end - begin);
 1317|    254|    skipXmlObject(ctx);
 1318|    254|    return ret;
 1319|    254|}
ua_types_encoding_xml.c:NodeId_decodeXml:
 1321|     74|DECODE_XML(NodeId) {
 1322|     74|    UA_NodeId *dst = (UA_NodeId*)dst_;
 1323|     74|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  822|     74|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (822:8): [True: 0, False: 74]
  |  |  ------------------
  |  |  823|     74|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  824|     74|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (824:18): [Folded, False: 74]
  |  |  ------------------
  ------------------
 1324|     74|    UA_String str;
 1325|     74|    static UA_String identifier = UA_STRING_STATIC(UA_XML_NODEID_IDENTIFIER);
  ------------------
  |  |  224|     74|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1326|     74|    status ret = getChildContent(ctx, identifier, &str);
 1327|     74|    if(ret != UA_STATUSCODE_GOOD) return ret;
  ------------------
  |  |   17|     74|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1327:8): [True: 1, False: 73]
  ------------------
 1328|     73|    skipXmlObject(ctx);
 1329|     73|    return UA_NodeId_parseEx(dst, str, ctx->namespaceMapping);
 1330|     74|}
ua_types_encoding_xml.c:getChildContent:
 1128|     87|getChildContent(ParseCtxXml *ctx, UA_String name, UA_String *out) {
 1129|     87|    size_t oldIndex = ctx->index;
 1130|     87|    size_t children = ctx->tokens[ctx->index].children;
 1131|       |
 1132|       |    /* Skip the attributes and go to the first child */
 1133|     87|    ctx->index += 1 + ctx->tokens[ctx->index].attributes;
 1134|       |
 1135|       |    /* Find the child of the name */
 1136|     87|    UA_StatusCode res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     87|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1137|     87|    for(size_t i = 0; i < children; i++) {
  ------------------
  |  Branch (1137:23): [True: 73, False: 14]
  ------------------
 1138|     73|        if(!UA_String_equal(&name, &ctx->tokens[ctx->index].name)) {
  ------------------
  |  Branch (1138:12): [True: 0, False: 73]
  ------------------
 1139|      0|            skipXmlObject(ctx);
 1140|      0|            continue;
 1141|      0|        }
 1142|     73|        *out = ctx->tokens[ctx->index].content;
 1143|     73|        res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     73|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1144|     73|        break;
 1145|     73|    }
 1146|       |
 1147|     87|    ctx->index = oldIndex;
 1148|     87|    return res;
 1149|     87|}
ua_types_encoding_xml.c:ExpandedNodeId_decodeXml:
 1332|      1|DECODE_XML(ExpandedNodeId) {
 1333|      1|    UA_ExpandedNodeId *dst = (UA_ExpandedNodeId*)dst_;
 1334|      1|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  822|      1|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (822:8): [True: 0, False: 1]
  |  |  ------------------
  |  |  823|      1|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  824|      1|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (824:18): [Folded, False: 1]
  |  |  ------------------
  ------------------
 1335|      1|    UA_String str;
 1336|      1|    static UA_String expidentifier = UA_STRING_STATIC(UA_XML_EXPANDEDNODEID_IDENTIFIER);
  ------------------
  |  |  224|      1|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1337|      1|    status ret = getChildContent(ctx, expidentifier, &str);
 1338|      1|    if(ret != UA_STATUSCODE_GOOD) return ret;
  ------------------
  |  |   17|      1|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1338:8): [True: 1, False: 0]
  ------------------
 1339|      0|    skipXmlObject(ctx);
 1340|      0|    return UA_ExpandedNodeId_parseEx(dst, str, ctx->namespaceMapping,
 1341|      0|                                     ctx->serverUrisSize, ctx->serverUris);
 1342|      1|}
ua_types_encoding_xml.c:StatusCode_decodeXml:
 1344|     12|DECODE_XML(StatusCode) {
 1345|     12|    UA_StatusCode *dst = (UA_StatusCode*)dst_;
 1346|     12|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  822|     12|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (822:8): [True: 0, False: 12]
  |  |  ------------------
  |  |  823|     12|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  824|     12|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (824:18): [Folded, False: 12]
  |  |  ------------------
  ------------------
 1347|     12|    UA_String str;
 1348|     12|    static UA_String statusidentifier = UA_STRING_STATIC(UA_XML_STATUSCODE_CODE);
  ------------------
  |  |  224|     12|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1349|     12|    status ret = getChildContent(ctx, statusidentifier, &str);
 1350|     12|    if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|     12|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1350:8): [True: 12, False: 0]
  ------------------
 1351|     12|        return ret;
 1352|      0|    skipXmlObject(ctx);
 1353|      0|    UA_UInt64 out = 0;
 1354|      0|    ret = decodeUnsigned(str.data, str.length, &out);
 1355|      0|    if(ret != UA_STATUSCODE_GOOD || out > UA_UINT32_MAX)
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  if(ret != UA_STATUSCODE_GOOD || out > UA_UINT32_MAX)
  ------------------
  |  |  110|      0|#define UA_UINT32_MAX 4294967295UL
  ------------------
  |  Branch (1355:8): [True: 0, False: 0]
  |  Branch (1355:37): [True: 0, False: 0]
  ------------------
 1356|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1357|      0|    *dst = (UA_StatusCode)out;
 1358|      0|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1359|      0|}
ua_types_encoding_xml.c:ExtensionObject_decodeXml:
 1483|     75|DECODE_XML(ExtensionObject) {
 1484|     75|    UA_ExtensionObject *dst = (UA_ExtensionObject*)dst_;
 1485|     75|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  822|     75|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (822:8): [True: 0, False: 75]
  |  |  ------------------
  |  |  823|     75|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  824|     75|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (824:18): [Folded, False: 75]
  |  |  ------------------
  ------------------
 1486|     75|    xml_token *tok = &ctx->tokens[ctx->index];
 1487|     75|    if(tok->children == 0)
  ------------------
  |  Branch (1487:8): [True: 2, False: 73]
  ------------------
 1488|      2|        return UA_STATUSCODE_GOOD; /* _NO_BODY */
  ------------------
  |  |   17|      2|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1489|     73|    dst->encoding = UA_EXTENSIONOBJECT_ENCODED_XML; /* default so the typeId gets cleaned up */
 1490|     73|    XmlDecodeEntry entries[2] = {
 1491|     73|        {UA_STRING_STATIC(UA_XML_EXTENSIONOBJECT_TYPEID), &dst->content.encoded.typeId,
  ------------------
  |  |  224|     73|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1492|     73|         NULL, false, &UA_TYPES[UA_TYPES_NODEID]},
  ------------------
  |  |  565|     73|#define UA_TYPES_NODEID 16
  ------------------
 1493|     73|        {UA_STRING_STATIC(UA_XML_EXTENSIONOBJECT_BODY), dst,
  ------------------
  |  |  224|     73|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1494|     73|         decodeExtensionObjectBody, false, NULL},
 1495|     73|    };
 1496|     73|    return decodeXmlFields(ctx, entries, 2);
 1497|     75|}
ua_types_encoding_xml.c:decodeExtensionObjectBody:
 1421|     73|decodeExtensionObjectBody(ParseCtxXml *ctx, void *dst, const UA_DataType *type) {
 1422|     73|    UA_ExtensionObject *eo = (UA_ExtensionObject*)dst;
 1423|       |
 1424|     73|    xml_token *tok = &ctx->tokens[ctx->index];
 1425|     73|    if(tok->children != 1)
  ------------------
  |  Branch (1425:8): [True: 0, False: 73]
  ------------------
 1426|      0|        return UA_STATUSCODE_BADDECODINGERROR; /* Only one child allowed */
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1427|       |
 1428|     73|    if(UA_NodeId_isNull(&eo->content.encoded.typeId))
  ------------------
  |  Branch (1428:8): [True: 0, False: 73]
  ------------------
 1429|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1430|       |
 1431|       |    /* Find the datatype of the body */
 1432|     73|    type = lookupXmlType(ctx, &eo->content.encoded.typeId);
 1433|       |
 1434|       |    /* Allocate decoded content */
 1435|     73|    void *decoded = NULL;
 1436|     73|    if(type) {
  ------------------
  |  Branch (1436:8): [True: 73, False: 0]
  ------------------
 1437|     73|        decoded = UA_new(type);
 1438|     73|        if(!decoded)
  ------------------
  |  Branch (1438:12): [True: 0, False: 73]
  ------------------
 1439|      0|            return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 1440|     73|    }
 1441|       |
 1442|       |    /* Jump to the first child element */
 1443|     73|    ctx->index += 1 + tok->attributes;
 1444|     73|    tok = &ctx->tokens[ctx->index];
 1445|       |
 1446|     73|    UA_StatusCode ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     73|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1447|     73|    UA_String bs = UA_STRING_STATIC(UA_XML_EXTENSIONOBJECT_BYTESTRING);
  ------------------
  |  |  224|     73|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1448|     73|    if(UA_String_equal(&tok->name, &bs)) {
  ------------------
  |  Branch (1448:8): [True: 0, False: 73]
  ------------------
 1449|       |        /* Decode binary ByteString Body */
 1450|      0|        eo->encoding = UA_EXTENSIONOBJECT_ENCODED_BYTESTRING;
 1451|      0|        ret = decodeXmlJumpTable[UA_DATATYPEKIND_BYTESTRING](ctx, &eo->content.encoded.body, NULL);
 1452|      0|        if(!type)
  ------------------
  |  Branch (1452:12): [True: 0, False: 0]
  ------------------
 1453|      0|            return ret;
 1454|      0|        UA_DecodeBinaryOptions opts;
 1455|      0|        memset(&opts, 0, sizeof(UA_DecodeBinaryOptions));
 1456|      0|        ret = UA_decodeBinary(&eo->content.encoded.body, decoded, type, &opts);
 1457|     73|    } else {
 1458|       |        /* Decode XML Body */
 1459|     73|        eo->encoding = UA_EXTENSIONOBJECT_ENCODED_XML;
 1460|     73|        UA_String body = {tok->end - tok->start, (UA_Byte*)(uintptr_t)ctx->xml + tok->start};
 1461|     73|        skipXmlObject(ctx); /* Skip over the body */
 1462|     73|        if(!type)
  ------------------
  |  Branch (1462:12): [True: 0, False: 73]
  ------------------
 1463|      0|            return UA_String_copy(&body, &eo->content.encoded.body);
 1464|     73|        UA_DecodeXmlOptions opts;
 1465|     73|        memset(&opts, 0, sizeof(UA_DecodeXmlOptions));
 1466|     73|        opts.namespaceMapping = ctx->namespaceMapping;
 1467|     73|        opts.serverUris = ctx->serverUris;
 1468|     73|        opts.serverUrisSize = ctx->serverUrisSize;
 1469|     73|        opts.customTypes = ctx->customTypes;
 1470|     73|        ret = UA_decodeXml(&body, decoded, type, &opts);
 1471|     73|    }
 1472|       |
 1473|     73|    if(ret != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|     73|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1473:8): [True: 0, False: 73]
  ------------------
 1474|      0|        UA_free(decoded); /* Return the un-decoded content if decoding fails */
  ------------------
  |  |   19|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1475|      0|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1476|      0|    }
 1477|       |
 1478|     73|    UA_ExtensionObject_clear(eo); /* Also clears the already decoded TypeId */
 1479|     73|    UA_ExtensionObject_setValue(eo, decoded, type);
 1480|     73|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     73|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1481|     73|}
ua_types_encoding_xml.c:lookupXmlType:
 1398|     73|lookupXmlType(ParseCtxXml *ctx, UA_NodeId *typeId) {
 1399|       |    /* Search in the builtin types */
 1400|  17.9k|    for(size_t i = 0; i < UA_TYPES_COUNT; ++i) {
  ------------------
  |  |   17|  17.9k|#define UA_TYPES_COUNT 388
  ------------------
  |  Branch (1400:23): [True: 17.9k, False: 0]
  ------------------
 1401|  17.9k|        if(UA_NodeId_equal(typeId, &UA_TYPES[i].typeId) ||
  ------------------
  |  Branch (1401:12): [True: 73, False: 17.8k]
  ------------------
 1402|  17.8k|           UA_NodeId_equal(typeId, &UA_TYPES[i].xmlEncodingId))
  ------------------
  |  Branch (1402:12): [True: 0, False: 17.8k]
  ------------------
 1403|     73|            return &UA_TYPES[i];
 1404|  17.9k|    }
 1405|       |
 1406|       |    /* Search in the customTypes */
 1407|      0|    const UA_DataTypeArray *customTypes = ctx->customTypes;
 1408|      0|    while(customTypes) {
  ------------------
  |  Branch (1408:11): [True: 0, False: 0]
  ------------------
 1409|      0|        for(size_t i = 0; i < customTypes->typesSize; ++i) {
  ------------------
  |  Branch (1409:27): [True: 0, False: 0]
  ------------------
 1410|      0|            const UA_DataType *type = &customTypes->types[i];
 1411|      0|            if(UA_NodeId_equal(typeId, &type->typeId) ||
  ------------------
  |  Branch (1411:16): [True: 0, False: 0]
  ------------------
 1412|      0|               UA_NodeId_equal(typeId, &type->xmlEncodingId))
  ------------------
  |  Branch (1412:16): [True: 0, False: 0]
  ------------------
 1413|      0|                return type;
 1414|      0|        }
 1415|      0|        customTypes = customTypes->next;
 1416|      0|    }
 1417|      0|    return NULL;
 1418|      0|}
ua_types_encoding_xml.c:DataValue_decodeXml:
 1737|      2|DECODE_XML(DataValue) {
 1738|      2|    UA_DataValue *dst = (UA_DataValue*)dst_;
 1739|      2|    XmlDecodeEntry entries[6] = {
 1740|      2|        {UA_STRING_STATIC("Value"), dst, DataValueValue_decodeXml, false, NULL},
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1741|      2|        {UA_STRING_STATIC("StatusCode"), &dst->status, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1742|      2|         &UA_TYPES[UA_TYPES_STATUSCODE]},
  ------------------
  |  |  633|      2|#define UA_TYPES_STATUSCODE 18
  ------------------
 1743|      2|        {UA_STRING_STATIC("SourceTimestamp"), &dst->sourceTimestamp, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1744|      2|         &UA_TYPES[UA_TYPES_DATETIME]},
  ------------------
  |  |  429|      2|#define UA_TYPES_DATETIME 12
  ------------------
 1745|      2|        {UA_STRING_STATIC("SourcePicoseconds"), &dst->sourcePicoseconds, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1746|      2|         &UA_TYPES[UA_TYPES_UINT16]},
  ------------------
  |  |  157|      2|#define UA_TYPES_UINT16 4
  ------------------
 1747|      2|        {UA_STRING_STATIC("ServerTimestamp"), &dst->serverTimestamp, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1748|      2|         &UA_TYPES[UA_TYPES_DATETIME]},
  ------------------
  |  |  429|      2|#define UA_TYPES_DATETIME 12
  ------------------
 1749|      2|        {UA_STRING_STATIC("ServerPicoseconds"), &dst->serverPicoseconds, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1750|      2|         &UA_TYPES[UA_TYPES_UINT16]}
  ------------------
  |  |  157|      2|#define UA_TYPES_UINT16 4
  ------------------
 1751|      2|    };
 1752|      2|    status ret = decodeXmlFields(ctx, entries, 6);
 1753|      2|    dst->hasValue = entries[0].found;
 1754|      2|    dst->hasStatus = entries[1].found;
 1755|      2|    dst->hasSourceTimestamp = entries[2].found;
 1756|      2|    dst->hasSourcePicoseconds = entries[3].found;
 1757|      2|    dst->hasServerTimestamp = entries[4].found;
 1758|      2|    dst->hasServerPicoseconds = entries[5].found;
 1759|      2|    return ret;
 1760|      2|}
ua_types_encoding_xml.c:decodeXmlVariantValue:
 1653|  4.66k|decodeXmlVariantValue(ParseCtxXml *ctx, UA_Variant *dst) {
 1654|  4.66k|    xml_token *tok = &ctx->tokens[ctx->index];
 1655|  4.66k|    if(tok->children != 1)
  ------------------
  |  Branch (1655:8): [True: 16, False: 4.64k]
  ------------------
 1656|     16|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     16|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1657|       |
 1658|       |    /* Jump to the child of the <Value> token */
 1659|  4.64k|    ctx->depth++;
 1660|  4.64k|    ctx->index += 1 + ctx->tokens[ctx->index].attributes;
 1661|  4.64k|    tok = &ctx->tokens[ctx->index];
 1662|       |
 1663|       |    /* Special case for multi-dimensional arrays */
 1664|  4.64k|    static UA_String matrName = UA_STRING_STATIC("Matrix");
  ------------------
  |  |  224|  4.64k|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1665|  4.64k|    UA_StatusCode ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  4.64k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1666|  4.64k|    if(UA_String_equal(&tok->name, &matrName)) {
  ------------------
  |  Branch (1666:8): [True: 8, False: 4.64k]
  ------------------
 1667|      8|        ret = decodeMatrixVariant(ctx, dst);
 1668|      8|        unwrapVariantExtensionObject(dst, true);
 1669|      8|        ctx->depth--;
 1670|      8|        return ret;
 1671|      8|    }
 1672|       |
 1673|       |    /* Get the Data type / array type */
 1674|  4.64k|    UA_Boolean isArray = false;
 1675|  4.64k|    static char *lo = "ListOf";
 1676|  4.64k|    UA_String typeName = tok->name;
 1677|  4.64k|    if(tok->name.length > strlen(lo) &&
  ------------------
  |  Branch (1677:8): [True: 857, False: 3.78k]
  ------------------
 1678|    857|       strncmp((char*)tok->name.data, lo, strlen(lo)) == 0) {
  ------------------
  |  Branch (1678:8): [True: 27, False: 830]
  ------------------
 1679|     27|        isArray = true;
 1680|     27|        typeName.data += strlen(lo);
 1681|     27|        typeName.length -= strlen(lo);
 1682|     27|    }
 1683|       |
 1684|       |    /* Look up the DataType from the name */
 1685|  4.64k|    dst->type = lookupTypeByName(ctx, typeName);
 1686|  4.64k|    if(!dst->type) {
  ------------------
  |  Branch (1686:8): [True: 179, False: 4.46k]
  ------------------
 1687|    179|        ctx->depth--;
 1688|    179|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    179|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1689|    179|    }
 1690|       |
 1691|       |    /* Decode */
 1692|  4.46k|    if(!isArray) {
  ------------------
  |  Branch (1692:8): [True: 4.43k, False: 26]
  ------------------
 1693|  4.43k|        dst->data = UA_new(dst->type);
 1694|  4.43k|        if(!dst->data) {
  ------------------
  |  Branch (1694:12): [True: 0, False: 4.43k]
  ------------------
 1695|      0|            ctx->depth--;
 1696|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1697|      0|        }
 1698|  4.43k|        ret = decodeXmlJumpTable[dst->type->typeKind](ctx, dst->data, dst->type);
 1699|  4.43k|    } else {
 1700|     26|        ret = Array_decodeXml(ctx, &dst->arrayLength, dst->type);
 1701|     26|    }
 1702|       |
 1703|       |    /* Unwrap ExtensionObject values in the variant */
 1704|  4.46k|    unwrapVariantExtensionObject(dst, isArray);
 1705|       |
 1706|  4.46k|    ctx->depth--;
 1707|  4.46k|    return ret;
 1708|  4.46k|}
ua_types_encoding_xml.c:decodeMatrixVariant:
 1601|      8|decodeMatrixVariant(ParseCtxXml *ctx, UA_Variant *dst) {
 1602|       |    /* The <Matrix> token needs two children: <Dimensions> and <Elements> */
 1603|      8|    xml_token *tok = &ctx->tokens[ctx->index];
 1604|      8|    if(tok->children != 2)
  ------------------
  |  Branch (1604:8): [True: 7, False: 1]
  ------------------
 1605|      7|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      7|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1606|       |
 1607|       |    /* Jump to the child of the <Matrix> token */
 1608|      1|    ctx->index += 1 + ctx->tokens[ctx->index].attributes;
 1609|      1|    tok = &ctx->tokens[ctx->index];
 1610|       |
 1611|      1|    UA_assert(tok->type == XML_TOKEN_ELEMENT);
  ------------------
  |  |  400|      1|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (1611:5): [True: 1, False: 0]
  ------------------
 1612|      1|    static UA_String dimName = UA_STRING_STATIC("Dimensions");
  ------------------
  |  |  224|      1|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1613|      1|    if(!UA_String_equal(&tok->name, &dimName))
  ------------------
  |  Branch (1613:8): [True: 1, False: 0]
  ------------------
 1614|      1|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      1|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1615|       |
 1616|      0|    UA_StatusCode ret =
 1617|      0|        Array_decodeXml(ctx, &dst->arrayDimensionsSize, &UA_TYPES[UA_TYPES_INT32]);
  ------------------
  |  |  191|      0|#define UA_TYPES_INT32 5
  ------------------
 1618|      0|    if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1618:8): [True: 0, False: 0]
  ------------------
 1619|      0|        return ret;
 1620|       |
 1621|      0|    UA_assert(tok->type == XML_TOKEN_ELEMENT);
  ------------------
  |  |  400|      0|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (1621:5): [True: 0, False: 0]
  ------------------
 1622|      0|    static UA_String elemName = UA_STRING_STATIC("Elements");
  ------------------
  |  |  224|      0|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1623|      0|    tok = &ctx->tokens[ctx->index];
 1624|      0|    if(!UA_String_equal(&tok->name, &elemName))
  ------------------
  |  Branch (1624:8): [True: 0, False: 0]
  ------------------
 1625|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1626|       |
 1627|       |    /* Get the type of the first element */
 1628|      0|    size_t oldIndex = ctx->index;
 1629|      0|    ctx->index += 1 + ctx->tokens[ctx->index].attributes;
 1630|      0|    tok = &ctx->tokens[ctx->index];
 1631|      0|    UA_assert(tok->type == XML_TOKEN_ELEMENT);
  ------------------
  |  |  400|      0|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (1631:5): [True: 0, False: 0]
  ------------------
 1632|       |
 1633|      0|    UA_String typeName = tok->name;
 1634|      0|    dst->type = lookupTypeByName(ctx, typeName);
 1635|      0|    if(!dst->type)
  ------------------
  |  Branch (1635:8): [True: 0, False: 0]
  ------------------
 1636|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1637|       |
 1638|       |    /* Decode the array */
 1639|      0|    ctx->index = oldIndex;
 1640|      0|    ret = Array_decodeXml(ctx, &dst->arrayLength, dst->type);
 1641|      0|    if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1641:8): [True: 0, False: 0]
  ------------------
 1642|      0|        return ret;
 1643|       |
 1644|       |    /* Check that the ArrayDimensions match */
 1645|      0|    size_t dimLen = 1;
 1646|      0|    for(size_t i = 0; i < dst->arrayDimensionsSize; i++)
  ------------------
  |  Branch (1646:23): [True: 0, False: 0]
  ------------------
 1647|      0|        dimLen *= dst->arrayDimensions[i];
 1648|       |
 1649|      0|    return (dimLen == dst->arrayLength) ? UA_STATUSCODE_GOOD : UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  return (dimLen == dst->arrayLength) ? UA_STATUSCODE_GOOD : UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  |  Branch (1649:12): [True: 0, False: 0]
  ------------------
 1650|      0|}
ua_types_encoding_xml.c:unwrapVariantExtensionObject:
 1553|  4.46k|unwrapVariantExtensionObject(UA_Variant *dst, UA_Boolean isArray) {
 1554|  4.46k|    if(dst->type != &UA_TYPES[UA_TYPES_EXTENSIONOBJECT])
  ------------------
  |  |  735|  4.46k|#define UA_TYPES_EXTENSIONOBJECT 21
  ------------------
  |  Branch (1554:8): [True: 4.39k, False: 77]
  ------------------
 1555|  4.39k|        return;
 1556|     77|    if(isArray && dst->arrayLength == 0)
  ------------------
  |  Branch (1556:8): [True: 2, False: 75]
  |  Branch (1556:19): [True: 2, False: 0]
  ------------------
 1557|      2|        return;
 1558|       |
 1559|     75|    UA_ExtensionObject *eo = (UA_ExtensionObject*)dst->data;
 1560|     75|    if(eo->encoding != UA_EXTENSIONOBJECT_DECODED)
  ------------------
  |  Branch (1560:8): [True: 2, False: 73]
  ------------------
 1561|      2|        return;
 1562|       |
 1563|     73|    const UA_DataType *type = eo->content.decoded.type;
 1564|       |
 1565|       |    /* Scalar */
 1566|     73|    if(!isArray) {
  ------------------
  |  Branch (1566:8): [True: 73, False: 0]
  ------------------
 1567|     73|        dst->data = eo->content.decoded.data;
 1568|     73|        dst->type = type;
 1569|     73|        UA_free(eo);
  ------------------
  |  |   19|     73|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1570|     73|        return;
 1571|     73|    }
 1572|       |
 1573|       |    /* Array. Check that all members can be unpacked */
 1574|      0|    for(size_t i = 0; i < dst->arrayLength; i++, eo++) {
  ------------------
  |  Branch (1574:23): [True: 0, False: 0]
  ------------------
 1575|      0|        if(eo->encoding != UA_EXTENSIONOBJECT_DECODED)
  ------------------
  |  Branch (1575:12): [True: 0, False: 0]
  ------------------
 1576|      0|            return;
 1577|      0|        if(eo->content.decoded.type != type)
  ------------------
  |  Branch (1577:12): [True: 0, False: 0]
  ------------------
 1578|      0|            return;
 1579|      0|    }
 1580|       |
 1581|       |    /* Allocate the array */
 1582|      0|    void *unpacked = UA_calloc(dst->arrayLength, type->memSize);
  ------------------
  |  |   20|      0|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
 1583|      0|    if(!unpacked)
  ------------------
  |  Branch (1583:8): [True: 0, False: 0]
  ------------------
 1584|      0|        return;
 1585|       |
 1586|       |    /* Unpack the content and set the new array */
 1587|      0|    uintptr_t uptr = (uintptr_t)unpacked;
 1588|      0|    eo = (UA_ExtensionObject*)dst->data;
 1589|      0|    for(size_t i = 0; i < dst->arrayLength; i++, eo++) {
  ------------------
  |  Branch (1589:23): [True: 0, False: 0]
  ------------------
 1590|       |        /* Move the value content */
 1591|      0|        memcpy((void*)uptr, eo->content.decoded.data, type->memSize);
 1592|      0|        UA_free(eo->content.decoded.data); /* Free the old value location */
  ------------------
  |  |   19|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1593|      0|        uptr += type->memSize;
 1594|      0|    }
 1595|      0|    UA_free(dst->data); /* Remove the old array of ExtensionObjects */
  ------------------
  |  |   19|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1596|      0|    dst->data = unpacked;
 1597|      0|    dst->type = type;
 1598|      0|}
ua_types_encoding_xml.c:lookupTypeByName:
 1527|  4.64k|lookupTypeByName(ParseCtxXml *ctx, UA_String typeName) {
 1528|       |    /* Search in the builtin types */
 1529|   131k|    for(size_t i = 0; i < UA_TYPES_COUNT; ++i) {
  ------------------
  |  |   17|   131k|#define UA_TYPES_COUNT 388
  ------------------
  |  Branch (1529:23): [True: 131k, False: 179]
  ------------------
 1530|   131k|        const UA_DataType *type = &UA_TYPES[i];
 1531|   131k|        size_t length = strlen(type->typeName);
 1532|   131k|        if(length == typeName.length &&
  ------------------
  |  Branch (1532:12): [True: 15.3k, False: 116k]
  ------------------
 1533|  15.3k|           strncmp((char*)typeName.data, type->typeName, typeName.length) == 0)
  ------------------
  |  Branch (1533:12): [True: 4.46k, False: 10.8k]
  ------------------
 1534|  4.46k|            return &UA_TYPES[i];
 1535|   131k|    }
 1536|       |
 1537|       |    /* Search in the customTypes */
 1538|    179|    const UA_DataTypeArray *customTypes = ctx->customTypes;
 1539|    179|    while(customTypes) {
  ------------------
  |  Branch (1539:11): [True: 0, False: 179]
  ------------------
 1540|      0|        for(size_t i = 0; i < customTypes->typesSize; ++i) {
  ------------------
  |  Branch (1540:27): [True: 0, False: 0]
  ------------------
 1541|      0|            const UA_DataType *type = &customTypes->types[i];
 1542|      0|            size_t length = strlen(type->typeName);
 1543|      0|            if(length == typeName.length &&
  ------------------
  |  Branch (1543:16): [True: 0, False: 0]
  ------------------
 1544|      0|               strncmp((char*)typeName.data, type->typeName, typeName.length) == 0)
  ------------------
  |  Branch (1544:16): [True: 0, False: 0]
  ------------------
 1545|      0|                return type;
 1546|      0|        }
 1547|      0|        customTypes = customTypes->next;
 1548|      0|    }
 1549|    179|    return NULL;
 1550|    179|}
ua_types_encoding_xml.c:Array_decodeXml:
 1500|     26|Array_decodeXml(ParseCtxXml *ctx, void *dst_, const UA_DataType *type) {
 1501|     26|    size_t *dstSize = (size_t*)dst_;
 1502|       |
 1503|       |    /* Allocate memory */
 1504|     26|    size_t length = ctx->tokens[ctx->index].children;
 1505|     26|    void **dst = (void**)((uintptr_t)dstSize + sizeof(void*));
 1506|     26|    *dst = UA_Array_new(length, type);
 1507|     26|    if(!*dst)
  ------------------
  |  Branch (1507:8): [True: 0, False: 26]
  ------------------
 1508|      0|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 1509|     26|    *dstSize = length;
 1510|       |
 1511|       |    /* Go to first array member. */
 1512|     26|    ctx->index += 1 + ctx->tokens[ctx->index].attributes;
 1513|       |
 1514|       |    /* Decode array members */
 1515|     26|    uintptr_t ptr = (uintptr_t)*dst;
 1516|     26|    for(size_t i = 0; i < length; ++i) {
  ------------------
  |  Branch (1516:23): [True: 16, False: 10]
  ------------------
 1517|     16|        status ret = decodeXmlJumpTable[type->typeKind](ctx, (void*)ptr, type);
 1518|     16|        if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|     16|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1518:12): [True: 16, False: 0]
  ------------------
 1519|     16|            return ret;
 1520|      0|        ptr += type->memSize;
 1521|      0|    }
 1522|       |
 1523|     10|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     10|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1524|     26|}
ua_types_encoding_xml.c:Variant_decodeXml:
 1710|  4.90k|DECODE_XML(Variant) {
 1711|  4.90k|    UA_Variant *dst = (UA_Variant*)dst_;
 1712|  4.90k|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  822|  4.90k|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (822:8): [True: 0, False: 4.90k]
  |  |  ------------------
  |  |  823|  4.90k|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  824|  4.90k|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (824:18): [Folded, False: 4.90k]
  |  |  ------------------
  ------------------
 1713|       |
 1714|  4.90k|    if(ctx->depth >= UA_XML_ENCODING_MAX_RECURSION)
  ------------------
  |  |   15|  4.90k|#define UA_XML_ENCODING_MAX_RECURSION 100
  ------------------
  |  Branch (1714:8): [True: 0, False: 4.90k]
  ------------------
 1715|      0|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
 1716|       |
 1717|  4.90k|    xml_token *tok = &ctx->tokens[ctx->index];
 1718|  4.90k|    if(tok->children == 0)
  ------------------
  |  Branch (1718:8): [True: 52, False: 4.85k]
  ------------------
 1719|     52|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     52|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1720|  4.85k|    if(tok->children != 1 || ctx->index + 2 >= ctx->tokensSize)
  ------------------
  |  Branch (1720:8): [True: 136, False: 4.71k]
  |  Branch (1720:30): [True: 2, False: 4.71k]
  ------------------
 1721|    138|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    138|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1722|       |
 1723|  4.71k|    ctx->index += 1 + ctx->tokens[ctx->index].attributes;
 1724|  4.71k|    tok = &ctx->tokens[ctx->index];
 1725|  4.71k|    static UA_String valName = UA_STRING_STATIC("Value");
  ------------------
  |  |  224|  4.71k|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1726|  4.71k|    if(!UA_String_equal(&tok->name, &valName))
  ------------------
  |  Branch (1726:8): [True: 49, False: 4.66k]
  ------------------
 1727|     49|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     49|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1728|  4.66k|    return decodeXmlVariantValue(ctx, dst);
 1729|  4.71k|}
ua_types_encoding_xml.c:DiagnosticInfo_decodeXml:
 1773|      2|DECODE_XML(DiagnosticInfo) {
 1774|      2|    UA_DiagnosticInfo *dst = (UA_DiagnosticInfo*)dst_;
 1775|      2|    XmlDecodeEntry entries[7] = {
 1776|      2|        {UA_STRING_STATIC("SymbolicId"), &dst->symbolicId, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1777|      2|         &UA_TYPES[UA_TYPES_INT32]},
  ------------------
  |  |  191|      2|#define UA_TYPES_INT32 5
  ------------------
 1778|      2|        {UA_STRING_STATIC("NamespaceUri"), &dst->namespaceUri, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1779|      2|         &UA_TYPES[UA_TYPES_INT32]},
  ------------------
  |  |  191|      2|#define UA_TYPES_INT32 5
  ------------------
 1780|      2|        {UA_STRING_STATIC("LocalizedText"), &dst->localizedText, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1781|      2|         &UA_TYPES[UA_TYPES_INT32]},
  ------------------
  |  |  191|      2|#define UA_TYPES_INT32 5
  ------------------
 1782|      2|        {UA_STRING_STATIC("Locale"), &dst->locale, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1783|      2|         &UA_TYPES[UA_TYPES_INT32]},
  ------------------
  |  |  191|      2|#define UA_TYPES_INT32 5
  ------------------
 1784|      2|        {UA_STRING_STATIC("AdditionalInfo"), &dst->additionalInfo, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1785|      2|         &UA_TYPES[UA_TYPES_STRING]},
  ------------------
  |  |  395|      2|#define UA_TYPES_STRING 11
  ------------------
 1786|      2|        {UA_STRING_STATIC("InnerStatusCode"), &dst->innerStatusCode, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1787|      2|         &UA_TYPES[UA_TYPES_STATUSCODE]},
  ------------------
  |  |  633|      2|#define UA_TYPES_STATUSCODE 18
  ------------------
 1788|      2|        {UA_STRING_STATIC("InnerDiagnosticInfo"), &dst->innerDiagnosticInfo,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1789|      2|         DiagnosticInfoInner_decodeXml, false, NULL}
 1790|      2|    };
 1791|      2|    status ret = decodeXmlFields(ctx, entries, 7);
 1792|      2|    dst->hasSymbolicId = entries[0].found;
 1793|      2|    dst->hasNamespaceUri = entries[1].found;
 1794|      2|    dst->hasLocalizedText = entries[2].found;
 1795|      2|    dst->hasLocale = entries[3].found;
 1796|      2|    dst->hasAdditionalInfo = entries[4].found;
 1797|      2|    dst->hasInnerStatusCode = entries[5].found;
 1798|      2|    dst->hasInnerDiagnosticInfo = entries[6].found;
 1799|      2|    return ret;
 1800|      2|}
ua_types_encoding_xml.c:Enum_decodeXml:
  974|     51|Enum_decodeXml(ParseCtxXml *ctx, void *dst, const UA_DataType *type) {
  975|     51|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  822|     51|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (822:8): [True: 0, False: 51]
  |  |  ------------------
  |  |  823|     51|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  824|     51|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (824:18): [Folded, False: 51]
  |  |  ------------------
  ------------------
  976|     51|    GET_ELEM_CONTENT;
  ------------------
  |  |  827|     51|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  828|     51|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  829|     51|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (829:17): [Folded, False: 51]
  |  |  ------------------
  ------------------
  977|     51|    skipXmlObject(ctx);
  978|       |
  979|    414|    for(size_t i = 0; i < type->membersSize; i++) {
  ------------------
  |  Branch (979:23): [True: 363, False: 51]
  ------------------
  980|    363|        const UA_DataTypeMember *m = &type->members[i];
  981|    363|        size_t nameLength = strlen(m->memberName);
  982|    363|        if(length <= nameLength + 1 || data[nameLength] != '_' ||
  ------------------
  |  Branch (982:12): [True: 363, False: 0]
  |  Branch (982:40): [True: 0, False: 0]
  ------------------
  983|      0|           memcmp(data, m->memberName, nameLength) != 0)
  ------------------
  |  Branch (983:12): [True: 0, False: 0]
  ------------------
  984|    363|            continue;
  985|      0|        UA_Int64 value = 0;
  986|      0|        UA_StatusCode ret = decodeSigned(&data[nameLength + 1],
  987|      0|                                         length - nameLength - 1, &value);
  988|      0|        UA_Int32 expected = (UA_Int32)(uintptr_t)m->memberType;
  989|      0|        if(ret == UA_STATUSCODE_GOOD && value == expected) {
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (989:12): [True: 0, False: 0]
  |  Branch (989:41): [True: 0, False: 0]
  ------------------
  990|      0|            *(UA_Int32*)dst = expected;
  991|      0|            return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  992|      0|        }
  993|      0|    }
  994|     51|    return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     51|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  995|     51|}
ua_types_encoding_xml.c:decodeXmlStructure:
 1805|    146|decodeXmlStructure(ParseCtxXml *ctx, void *dst, const UA_DataType *type) {
 1806|       |    /* Check the recursion limit */
 1807|    146|    if(ctx->depth >= UA_XML_ENCODING_MAX_RECURSION - 1)
  ------------------
  |  |   15|    146|#define UA_XML_ENCODING_MAX_RECURSION 100
  ------------------
  |  Branch (1807:8): [True: 0, False: 146]
  ------------------
 1808|      0|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
 1809|    146|    ctx->depth++;
 1810|       |
 1811|    146|    uintptr_t ptr = (uintptr_t)dst;
 1812|    146|    status ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    146|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1813|    146|    u8 membersSize = type->membersSize;
 1814|    146|    UA_STACKARRAY(XmlDecodeEntry, entries, membersSize);
  ------------------
  |  |  376|    146|#  define UA_STACKARRAY(TYPE, NAME, SIZE) TYPE NAME[SIZE]
  ------------------
 1815|    934|    for(size_t i = 0; i < membersSize; ++i) {
  ------------------
  |  Branch (1815:23): [True: 788, False: 146]
  ------------------
 1816|    788|        const UA_DataTypeMember *m = &type->members[i];
 1817|    788|        const UA_DataType *mt = m->memberType;
 1818|    788|        entries[i].type = mt;
 1819|    788|        entries[i].name = UA_STRING((char*)(uintptr_t)m->memberName);
 1820|    788|        entries[i].found = false;
 1821|    788|        ptr += m->padding;
 1822|    788|        entries[i].fieldPointer = (void*)ptr;
 1823|    788|        if(!m->isArray && !m->isOptional) {
  ------------------
  |  Branch (1823:12): [True: 666, False: 122]
  |  Branch (1823:27): [True: 666, False: 0]
  ------------------
 1824|    666|            entries[i].function = NULL;
 1825|    666|            ptr += mt->memSize;
 1826|    666|        } else if(m->isArray) {
  ------------------
  |  Branch (1826:19): [True: 122, False: 0]
  ------------------
 1827|    122|            entries[i].function = Array_decodeXml;
 1828|    122|            ptr += sizeof(size_t) + sizeof(void*);
 1829|    122|        } else {
 1830|      0|            entries[i].function = Optional_decodeXml;
 1831|      0|            ptr += sizeof(void*);
 1832|      0|        }
 1833|    788|    }
 1834|       |
 1835|    146|    ret = decodeXmlFields(ctx, entries, membersSize);
 1836|       |
 1837|    146|    if(ctx->depth == 0)
  ------------------
  |  Branch (1837:8): [True: 0, False: 146]
  ------------------
 1838|      0|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
 1839|    146|    ctx->depth--;
 1840|    146|    return ret;
 1841|    146|}

UA_Guid_parse:
   86|      1|UA_Guid_parse(UA_Guid *guid, const UA_String str) {
   87|      1|    UA_StatusCode res = parse_guid(guid, str.data, str.data + str.length);
   88|      1|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|      1|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (88:8): [True: 1, False: 0]
  ------------------
   89|      1|        *guid = UA_GUID_NULL;
   90|      1|    return res;
   91|      1|}
UA_NodeId_parseEx:
  323|     73|                  const UA_NamespaceMapping *nsMapping) {
  324|     73|    UA_StatusCode res =
  325|     73|        parse_nodeid(id, str.data, str.data+str.length, UA_ESCAPING_NONE, nsMapping);
  326|     73|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|     73|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (326:8): [True: 0, False: 73]
  ------------------
  327|      0|        UA_NodeId_clear(id);
  328|     73|    return res;
  329|     73|}
ua_types_lex.c:parse_guid:
   50|      1|parse_guid(UA_Guid *guid, const UA_Byte *s, const UA_Byte *e) {
   51|      1|    size_t len = (size_t)(e - s);
   52|      1|    if(len != 36 || s[8] != '-' || s[13] != '-' || s[23] != '-')
  ------------------
  |  Branch (52:8): [True: 1, False: 0]
  |  Branch (52:21): [True: 0, False: 0]
  |  Branch (52:36): [True: 0, False: 0]
  |  Branch (52:52): [True: 0, False: 0]
  ------------------
   53|      1|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      1|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   54|       |
   55|      0|    UA_UInt32 tmp;
   56|      0|    if(UA_readNumberWithBase(s, 8, &tmp, 16) != 8)
  ------------------
  |  Branch (56:8): [True: 0, False: 0]
  ------------------
   57|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   58|      0|    guid->data1 = tmp;
   59|       |
   60|      0|    if(UA_readNumberWithBase(&s[9], 4, &tmp, 16) != 4)
  ------------------
  |  Branch (60:8): [True: 0, False: 0]
  ------------------
   61|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   62|      0|    guid->data2 = (UA_UInt16)tmp;
   63|       |
   64|      0|    if(UA_readNumberWithBase(&s[14], 4, &tmp, 16) != 4)
  ------------------
  |  Branch (64:8): [True: 0, False: 0]
  ------------------
   65|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   66|      0|    guid->data3 = (UA_UInt16)tmp;
   67|       |
   68|      0|    if(UA_readNumberWithBase(&s[19], 2, &tmp, 16) != 2)
  ------------------
  |  Branch (68:8): [True: 0, False: 0]
  ------------------
   69|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   70|      0|    guid->data4[0] = (UA_Byte)tmp;
   71|       |
   72|      0|    if(UA_readNumberWithBase(&s[21], 2, &tmp, 16) != 2)
  ------------------
  |  Branch (72:8): [True: 0, False: 0]
  ------------------
   73|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   74|      0|    guid->data4[1] = (UA_Byte)tmp;
   75|       |
   76|      0|    for(size_t pos = 2, spos = 24; pos < 8; pos++, spos += 2) {
  ------------------
  |  Branch (76:36): [True: 0, False: 0]
  ------------------
   77|      0|        if(UA_readNumberWithBase(&s[spos], 2, &tmp, 16) != 2)
  ------------------
  |  Branch (77:12): [True: 0, False: 0]
  ------------------
   78|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   79|      0|        guid->data4[pos] = (UA_Byte)tmp;
   80|      0|    }
   81|       |
   82|      0|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
   83|      0|}
ua_types_lex.c:parse_nodeid:
  148|     73|             UA_Escaping idEsc, const UA_NamespaceMapping *nsMapping) {
  149|     73|    *id = UA_NODEID_NULL; /* Reset the NodeId */
  150|     73|    LexContext context;
  151|     73|    memset(&context, 0, sizeof(LexContext));
  152|     73|    UA_Byte *begin = (UA_Byte*)(uintptr_t)pos;
  153|     73|    const u8 *ns = NULL, *nsu = NULL, *body = NULL;
  154|       |
  155|       |    
  156|     73|{
  157|     73|	u8 yych;
  158|     73|	yych = YYPEEK();
  ------------------
  |  |   33|     73|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     73|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     73|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 73, False: 0]
  |  |  ------------------
  ------------------
  159|     73|	switch (yych) {
  160|      0|		case 'b':
  ------------------
  |  Branch (160:3): [True: 0, False: 73]
  ------------------
  161|      0|		case 'g':
  ------------------
  |  Branch (161:3): [True: 0, False: 73]
  ------------------
  162|     73|		case 'i':
  ------------------
  |  Branch (162:3): [True: 73, False: 0]
  ------------------
  163|     73|		case 's':
  ------------------
  |  Branch (163:3): [True: 0, False: 73]
  ------------------
  164|     73|			YYSTAGN(context.yyt1);
  ------------------
  |  |   39|     73|#define YYSTAGN(t) t = NULL
  ------------------
  165|     73|			YYSTAGN(context.yyt2);
  ------------------
  |  |   39|     73|#define YYSTAGN(t) t = NULL
  ------------------
  166|     73|			goto yy3;
  167|      0|		case 'n': goto yy4;
  ------------------
  |  Branch (167:3): [True: 0, False: 73]
  ------------------
  168|      0|		default: goto yy1;
  ------------------
  |  Branch (168:3): [True: 0, False: 73]
  ------------------
  169|     73|	}
  170|      0|yy1:
  171|      0|	YYSKIP();
  ------------------
  |  |   35|      0|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  172|      0|yy2:
  173|      0|	{ (void)pos; return UA_STATUSCODE_BADDECODINGERROR; }
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  174|     73|yy3:
  175|     73|	YYSKIP();
  ------------------
  |  |   35|     73|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|     73|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  176|     73|	yych = YYPEEK();
  ------------------
  |  |   33|     73|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     73|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     73|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 73, False: 0]
  |  |  ------------------
  ------------------
  177|     73|	switch (yych) {
  178|     73|		case '=': goto yy5;
  ------------------
  |  Branch (178:3): [True: 73, False: 0]
  ------------------
  179|      0|		default: goto yy2;
  ------------------
  |  Branch (179:3): [True: 0, False: 73]
  ------------------
  180|     73|	}
  181|      0|yy4:
  182|      0|	YYSKIP();
  ------------------
  |  |   35|      0|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  183|      0|	YYBACKUP();
  ------------------
  |  |   36|      0|#define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   32|      0|#define YYMARKER context.marker
  |  |  ------------------
  |  |               #define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  184|      0|	yych = YYPEEK();
  ------------------
  |  |   33|      0|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  185|      0|	switch (yych) {
  186|      0|		case 's': goto yy6;
  ------------------
  |  Branch (186:3): [True: 0, False: 0]
  ------------------
  187|      0|		default: goto yy2;
  ------------------
  |  Branch (187:3): [True: 0, False: 0]
  ------------------
  188|      0|	}
  189|     73|yy5:
  190|     73|	YYSKIP();
  ------------------
  |  |   35|     73|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|     73|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  191|     73|	nsu = context.yyt2;
  192|     73|	ns = context.yyt1;
  193|     73|	YYSTAGP(body);
  ------------------
  |  |   38|     73|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|     73|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  194|     73|	YYSHIFTSTAG(body, -2);
  ------------------
  |  |   40|     73|#define YYSHIFTSTAG(t, shift) t += shift
  ------------------
  195|     73|	{ goto match; }
  196|      0|yy6:
  197|      0|	YYSKIP();
  ------------------
  |  |   35|      0|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  198|      0|	yych = YYPEEK();
  ------------------
  |  |   33|      0|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  199|      0|	switch (yych) {
  200|      0|		case '=': goto yy8;
  ------------------
  |  Branch (200:3): [True: 0, False: 0]
  ------------------
  201|      0|		case 'u': goto yy9;
  ------------------
  |  Branch (201:3): [True: 0, False: 0]
  ------------------
  202|      0|		default: goto yy7;
  ------------------
  |  Branch (202:3): [True: 0, False: 0]
  ------------------
  203|      0|	}
  204|      0|yy7:
  205|      0|	YYRESTORE();
  ------------------
  |  |   37|      0|#define YYRESTORE() YYCURSOR = YYMARKER
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYRESTORE() YYCURSOR = YYMARKER
  |  |  ------------------
  |  |  |  |   32|      0|#define YYMARKER context.marker
  |  |  ------------------
  ------------------
  206|      0|	goto yy2;
  207|      0|yy8:
  208|      0|	YYSKIP();
  ------------------
  |  |   35|      0|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  209|      0|	yych = YYPEEK();
  ------------------
  |  |   33|      0|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  210|      0|	switch (yych) {
  211|      0|		case '0':
  ------------------
  |  Branch (211:3): [True: 0, False: 0]
  ------------------
  212|      0|		case '1':
  ------------------
  |  Branch (212:3): [True: 0, False: 0]
  ------------------
  213|      0|		case '2':
  ------------------
  |  Branch (213:3): [True: 0, False: 0]
  ------------------
  214|      0|		case '3':
  ------------------
  |  Branch (214:3): [True: 0, False: 0]
  ------------------
  215|      0|		case '4':
  ------------------
  |  Branch (215:3): [True: 0, False: 0]
  ------------------
  216|      0|		case '5':
  ------------------
  |  Branch (216:3): [True: 0, False: 0]
  ------------------
  217|      0|		case '6':
  ------------------
  |  Branch (217:3): [True: 0, False: 0]
  ------------------
  218|      0|		case '7':
  ------------------
  |  Branch (218:3): [True: 0, False: 0]
  ------------------
  219|      0|		case '8':
  ------------------
  |  Branch (219:3): [True: 0, False: 0]
  ------------------
  220|      0|		case '9':
  ------------------
  |  Branch (220:3): [True: 0, False: 0]
  ------------------
  221|      0|			YYSTAGP(context.yyt1);
  ------------------
  |  |   38|      0|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  222|      0|			goto yy10;
  223|      0|		default: goto yy7;
  ------------------
  |  Branch (223:3): [True: 0, False: 0]
  ------------------
  224|      0|	}
  225|      0|yy9:
  226|      0|	YYSKIP();
  ------------------
  |  |   35|      0|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  227|      0|	yych = YYPEEK();
  ------------------
  |  |   33|      0|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  228|      0|	switch (yych) {
  229|      0|		case '=': goto yy11;
  ------------------
  |  Branch (229:3): [True: 0, False: 0]
  ------------------
  230|      0|		default: goto yy7;
  ------------------
  |  Branch (230:3): [True: 0, False: 0]
  ------------------
  231|      0|	}
  232|      0|yy10:
  233|      0|	YYSKIP();
  ------------------
  |  |   35|      0|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  234|      0|	yych = YYPEEK();
  ------------------
  |  |   33|      0|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  235|      0|	switch (yych) {
  236|      0|		case '0':
  ------------------
  |  Branch (236:3): [True: 0, False: 0]
  ------------------
  237|      0|		case '1':
  ------------------
  |  Branch (237:3): [True: 0, False: 0]
  ------------------
  238|      0|		case '2':
  ------------------
  |  Branch (238:3): [True: 0, False: 0]
  ------------------
  239|      0|		case '3':
  ------------------
  |  Branch (239:3): [True: 0, False: 0]
  ------------------
  240|      0|		case '4':
  ------------------
  |  Branch (240:3): [True: 0, False: 0]
  ------------------
  241|      0|		case '5':
  ------------------
  |  Branch (241:3): [True: 0, False: 0]
  ------------------
  242|      0|		case '6':
  ------------------
  |  Branch (242:3): [True: 0, False: 0]
  ------------------
  243|      0|		case '7':
  ------------------
  |  Branch (243:3): [True: 0, False: 0]
  ------------------
  244|      0|		case '8':
  ------------------
  |  Branch (244:3): [True: 0, False: 0]
  ------------------
  245|      0|		case '9': goto yy10;
  ------------------
  |  Branch (245:3): [True: 0, False: 0]
  ------------------
  246|      0|		case ';':
  ------------------
  |  Branch (246:3): [True: 0, False: 0]
  ------------------
  247|      0|			YYSTAGN(context.yyt2);
  ------------------
  |  |   39|      0|#define YYSTAGN(t) t = NULL
  ------------------
  248|      0|			goto yy12;
  249|      0|		default: goto yy7;
  ------------------
  |  Branch (249:3): [True: 0, False: 0]
  ------------------
  250|      0|	}
  251|      0|yy11:
  252|      0|	YYSKIP();
  ------------------
  |  |   35|      0|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  253|      0|	yych = YYPEEK();
  ------------------
  |  |   33|      0|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  254|      0|	switch (yych) {
  255|      0|		case 0x00: goto yy7;
  ------------------
  |  Branch (255:3): [True: 0, False: 0]
  ------------------
  256|      0|		case ';':
  ------------------
  |  Branch (256:3): [True: 0, False: 0]
  ------------------
  257|      0|			YYSTAGN(context.yyt1);
  ------------------
  |  |   39|      0|#define YYSTAGN(t) t = NULL
  ------------------
  258|      0|			YYSTAGP(context.yyt2);
  ------------------
  |  |   38|      0|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  259|      0|			goto yy12;
  260|      0|		default:
  ------------------
  |  Branch (260:3): [True: 0, False: 0]
  ------------------
  261|      0|			YYSTAGP(context.yyt2);
  ------------------
  |  |   38|      0|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  262|      0|			goto yy13;
  263|      0|	}
  264|      0|yy12:
  265|      0|	YYSKIP();
  ------------------
  |  |   35|      0|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  266|      0|	yych = YYPEEK();
  ------------------
  |  |   33|      0|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  267|      0|	switch (yych) {
  268|      0|		case 'b':
  ------------------
  |  Branch (268:3): [True: 0, False: 0]
  ------------------
  269|      0|		case 'g':
  ------------------
  |  Branch (269:3): [True: 0, False: 0]
  ------------------
  270|      0|		case 'i':
  ------------------
  |  Branch (270:3): [True: 0, False: 0]
  ------------------
  271|      0|		case 's': goto yy14;
  ------------------
  |  Branch (271:3): [True: 0, False: 0]
  ------------------
  272|      0|		default: goto yy7;
  ------------------
  |  Branch (272:3): [True: 0, False: 0]
  ------------------
  273|      0|	}
  274|      0|yy13:
  275|      0|	YYSKIP();
  ------------------
  |  |   35|      0|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  276|      0|	yych = YYPEEK();
  ------------------
  |  |   33|      0|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  277|      0|	switch (yych) {
  278|      0|		case 0x00: goto yy7;
  ------------------
  |  Branch (278:3): [True: 0, False: 0]
  ------------------
  279|      0|		case ';':
  ------------------
  |  Branch (279:3): [True: 0, False: 0]
  ------------------
  280|      0|			YYSTAGN(context.yyt1);
  ------------------
  |  |   39|      0|#define YYSTAGN(t) t = NULL
  ------------------
  281|      0|			goto yy12;
  282|      0|		default: goto yy13;
  ------------------
  |  Branch (282:3): [True: 0, False: 0]
  ------------------
  283|      0|	}
  284|      0|yy14:
  285|      0|	YYSKIP();
  ------------------
  |  |   35|      0|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  286|      0|	yych = YYPEEK();
  ------------------
  |  |   33|      0|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|      0|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  287|      0|	switch (yych) {
  288|      0|		case '=': goto yy5;
  ------------------
  |  Branch (288:3): [True: 0, False: 0]
  ------------------
  289|      0|		default: goto yy7;
  ------------------
  |  Branch (289:3): [True: 0, False: 0]
  ------------------
  290|      0|	}
  291|      0|}
  292|       |
  293|       |
  294|     73| match:
  295|     73|    if(nsu) {
  ------------------
  |  Branch (295:8): [True: 0, False: 73]
  ------------------
  296|       |        /* NamespaceUri */
  297|      0|        UA_String nsUri = {(size_t)(body - 1 - nsu), (UA_Byte*)(uintptr_t)nsu};
  298|      0|        UA_StatusCode res = escapedUri2Index(nsUri, &id->namespaceIndex, nsMapping);
  299|      0|        if(res != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (299:12): [True: 0, False: 0]
  ------------------
  300|       |            /* Return the entire NodeId string s=... */
  301|      0|            UA_String total = {(size_t)((const UA_Byte*)end - begin), begin};
  302|      0|            id->identifierType = UA_NODEIDTYPE_STRING;
  303|      0|            return UA_String_copy(&total, &id->identifier.string);
  304|      0|        }
  305|     73|    } else if(ns) {
  ------------------
  |  Branch (305:15): [True: 0, False: 73]
  ------------------
  306|       |        /* NamespaceIndex */
  307|      0|        UA_UInt32 tmp;
  308|      0|        size_t len = (size_t)(body - 1 - ns);
  309|      0|        if(UA_readNumber((const UA_Byte*)ns, len, &tmp) != len)
  ------------------
  |  Branch (309:12): [True: 0, False: 0]
  ------------------
  310|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  311|      0|        id->namespaceIndex = (UA_UInt16)tmp;
  312|      0|        if(nsMapping)
  ------------------
  |  Branch (312:12): [True: 0, False: 0]
  ------------------
  313|      0|            id->namespaceIndex =
  314|      0|                UA_NamespaceMapping_remote2Local(nsMapping, id->namespaceIndex);
  315|      0|    }
  316|       |
  317|       |    /* From the current position until the end */
  318|     73|    return parse_nodeid_body(id, body, end, idEsc);
  319|     73|}
ua_types_lex.c:parse_nodeid_body:
  109|     73|parse_nodeid_body(UA_NodeId *id, const u8 *body, const u8 *end, UA_Escaping esc) {
  110|     73|    UA_StatusCode res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     73|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  111|     73|    UA_String str = {(size_t)(end - (body+2)), (UA_Byte*)(uintptr_t)body + 2};
  112|     73|    switch(*body) {
  113|     73|    case 'i':
  ------------------
  |  Branch (113:5): [True: 73, False: 0]
  ------------------
  114|     73|        id->identifierType = UA_NODEIDTYPE_NUMERIC;
  115|     73|        if(UA_readNumber(str.data, str.length, &id->identifier.numeric) != str.length)
  ------------------
  |  Branch (115:12): [True: 0, False: 73]
  ------------------
  116|      0|            res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  117|     73|        break;
  118|      0|    case 's':
  ------------------
  |  Branch (118:5): [True: 0, False: 73]
  ------------------
  119|      0|        id->identifierType = UA_NODEIDTYPE_STRING;
  120|      0|        res |= UA_String_copy(&str, &id->identifier.string);
  121|      0|        res |= UA_String_unescape(&id->identifier.string, false, esc);
  122|      0|        break;
  123|      0|    case 'g':
  ------------------
  |  Branch (123:5): [True: 0, False: 73]
  ------------------
  124|      0|        id->identifierType = UA_NODEIDTYPE_GUID;
  125|      0|        res = parse_guid(&id->identifier.guid, str.data, end);
  126|      0|        break;
  127|      0|    case 'b':
  ------------------
  |  Branch (127:5): [True: 0, False: 73]
  ------------------
  128|       |        /* For percent-escaping, base64url bytestring encoding is used. That
  129|       |         * doesn't need to be escaped here. The and-escaping is not applied to
  130|       |         * the NodeId identifier part. */
  131|      0|        id->identifierType = UA_NODEIDTYPE_BYTESTRING;
  132|      0|        id->identifier.byteString.data =
  133|      0|            UA_unbase64(str.data, str.length, &id->identifier.byteString.length);
  134|      0|        if(!id->identifier.byteString.data) {
  ------------------
  |  Branch (134:12): [True: 0, False: 0]
  ------------------
  135|      0|            UA_assert(id->identifier.byteString.length == 0);
  ------------------
  |  |  400|      0|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (135:13): [True: 0, False: 0]
  ------------------
  136|      0|            res = UA_STATUSCODE_BADDECODINGERROR; /* Returned on error by UA_unbase64 */
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  137|      0|        }
  138|      0|        break;
  139|      0|    default:
  ------------------
  |  Branch (139:5): [True: 0, False: 73]
  ------------------
  140|      0|        res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  141|      0|        break;
  142|     73|    }
  143|     73|    return res;
  144|     73|}

UA_readNumberWithBase:
  111|     73|UA_readNumberWithBase(const UA_Byte *buf, size_t buflen, UA_UInt32 *number, UA_Byte base) {
  112|     73|    UA_assert(buf);
  ------------------
  |  |  400|     73|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (112:5): [True: 73, False: 0]
  ------------------
  113|     73|    UA_assert(number);
  ------------------
  |  |  400|     73|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (113:5): [True: 73, False: 0]
  ------------------
  114|     73|    u32 n = 0;
  115|     73|    size_t progress = 0;
  116|       |    /* read numbers until the end or a non-number character appears */
  117|    335|    while(progress < buflen) {
  ------------------
  |  Branch (117:11): [True: 262, False: 73]
  ------------------
  118|    262|        u8 c = buf[progress];
  119|    262|        if(c >= '0' && c <= '9' && c <= '0' + (base-1))
  ------------------
  |  Branch (119:12): [True: 262, False: 0]
  |  Branch (119:24): [True: 262, False: 0]
  |  Branch (119:36): [True: 262, False: 0]
  ------------------
  120|    262|           n = (n * base) + c - '0';
  121|      0|        else if(base > 9 && c >= 'a' && c <= 'z' && c <= 'a' + (base-11))
  ------------------
  |  Branch (121:17): [True: 0, False: 0]
  |  Branch (121:29): [True: 0, False: 0]
  |  Branch (121:41): [True: 0, False: 0]
  |  Branch (121:53): [True: 0, False: 0]
  ------------------
  122|      0|           n = (n * base) + c-'a' + 10;
  123|      0|        else if(base > 9 && c >= 'A' && c <= 'Z' && c <= 'A' + (base-11))
  ------------------
  |  Branch (123:17): [True: 0, False: 0]
  |  Branch (123:29): [True: 0, False: 0]
  |  Branch (123:41): [True: 0, False: 0]
  |  Branch (123:53): [True: 0, False: 0]
  ------------------
  124|      0|           n = (n * base) + c-'A' + 10;
  125|      0|        else
  126|      0|           break;
  127|    262|        ++progress;
  128|    262|    }
  129|     73|    *number = n;
  130|     73|    return progress;
  131|     73|}
UA_readNumber:
  134|     73|UA_readNumber(const UA_Byte *buf, size_t buflen, UA_UInt32 *number) {
  135|     73|    return UA_readNumberWithBase(buf, buflen, number, 10);
  136|     73|}

LLVMFuzzerTestOneInput:
   13|  6.65k|LLVMFuzzerTestOneInput(uint8_t *data, size_t size) {
   14|  6.65k|    UA_ByteString buf;
   15|  6.65k|    buf.data = (UA_Byte*)data;
   16|  6.65k|    buf.length = size;
   17|       |
   18|  6.65k|    UA_Variant value;
   19|  6.65k|    UA_Variant_init(&value);
   20|       |
   21|  6.65k|    UA_StatusCode retval = UA_decodeXml(&buf, &value, &UA_TYPES[UA_TYPES_VARIANT], NULL);
  ------------------
  |  |  803|  6.65k|#define UA_TYPES_VARIANT 23
  ------------------
   22|  6.65k|    if(retval != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  6.65k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (22:8): [True: 5.07k, False: 1.57k]
  ------------------
   23|  5.07k|        return 0;
   24|       |
   25|       |    /* This can fail for now. For example length limits are not always computed
   26|       |     * 100% identical between encoding and decoding. */
   27|  1.57k|    size_t xmlSize = UA_calcSizeXml(&value, &UA_TYPES[UA_TYPES_VARIANT], NULL);
  ------------------
  |  |  803|  1.57k|#define UA_TYPES_VARIANT 23
  ------------------
   28|  1.57k|    if(xmlSize == 0) {
  ------------------
  |  Branch (28:8): [True: 52, False: 1.52k]
  ------------------
   29|     52|        UA_Variant_clear(&value);
   30|     52|        return 0;
   31|     52|    }
   32|       |
   33|  1.52k|    UA_ByteString buf2 = UA_BYTESTRING_NULL;
   34|  1.52k|    retval = UA_ByteString_allocBuffer(&buf2, xmlSize);
   35|  1.52k|    if(retval != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|  1.52k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (35:8): [True: 0, False: 1.52k]
  ------------------
   36|      0|        UA_Variant_clear(&value);
   37|      0|        return 0;
   38|      0|    }
   39|       |
   40|  1.52k|    retval = UA_encodeXml(&value, &UA_TYPES[UA_TYPES_VARIANT], &buf2, NULL);
  ------------------
  |  |  803|  1.52k|#define UA_TYPES_VARIANT 23
  ------------------
   41|  1.52k|    UA_assert(retval == UA_STATUSCODE_GOOD);
  ------------------
  |  |  400|  1.52k|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (41:5): [True: 1.52k, False: 0]
  ------------------
   42|       |
   43|  1.52k|    UA_Variant value2;
   44|  1.52k|    UA_Variant_init(&value2);
   45|  1.52k|    retval = UA_decodeXml(&buf2, &value2, &UA_TYPES[UA_TYPES_VARIANT], NULL);
  ------------------
  |  |  803|  1.52k|#define UA_TYPES_VARIANT 23
  ------------------
   46|  1.52k|    if(retval == UA_STATUSCODE_BADOUTOFMEMORY) {
  ------------------
  |  |   32|  1.52k|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
  |  Branch (46:8): [True: 0, False: 1.52k]
  ------------------
   47|      0|        UA_Variant_clear(&value);
   48|      0|        UA_ByteString_clear(&buf2);
   49|      0|        return 0;
   50|      0|    }
   51|  1.52k|    UA_assert(retval == UA_STATUSCODE_GOOD);
  ------------------
  |  |  400|  1.52k|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (51:5): [True: 1.52k, False: 0]
  ------------------
   52|       |
   53|  1.52k|    UA_assert(UA_order(&value, &value2, &UA_TYPES[UA_TYPES_VARIANT]) == UA_ORDER_EQ);
  ------------------
  |  |  400|  1.52k|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (53:5): [True: 1.52k, False: 0]
  ------------------
   54|       |
   55|  1.52k|    UA_ByteString buf3 = UA_BYTESTRING_NULL;
   56|  1.52k|    retval = UA_ByteString_allocBuffer(&buf3, xmlSize);
   57|  1.52k|    if(retval != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|  1.52k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (57:8): [True: 0, False: 1.52k]
  ------------------
   58|      0|        UA_Variant_clear(&value);
   59|      0|        UA_Variant_clear(&value2);
   60|      0|        UA_ByteString_clear(&buf2);
   61|      0|        return 0;
   62|      0|    }
   63|       |
   64|  1.52k|    retval = UA_encodeXml(&value2, &UA_TYPES[UA_TYPES_VARIANT], &buf3, NULL);
  ------------------
  |  |  803|  1.52k|#define UA_TYPES_VARIANT 23
  ------------------
   65|  1.52k|    UA_assert(retval == UA_STATUSCODE_GOOD);
  ------------------
  |  |  400|  1.52k|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (65:5): [True: 1.52k, False: 0]
  ------------------
   66|       |
   67|  1.52k|    UA_assert(buf2.length == buf3.length);
  ------------------
  |  |  400|  1.52k|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (67:5): [True: 1.52k, False: 0]
  ------------------
   68|  1.52k|    UA_assert(memcmp(buf2.data, buf3.data, buf2.length) == 0);
  ------------------
  |  |  400|  1.52k|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (68:5): [True: 1.52k, False: 0]
  ------------------
   69|       |
   70|  1.52k|    UA_Variant_clear(&value);
   71|  1.52k|    UA_Variant_clear(&value2);
   72|  1.52k|    UA_ByteString_clear(&buf2);
   73|  1.52k|    UA_ByteString_clear(&buf3);
   74|  1.52k|    return 0;
   75|  1.52k|}

fuzz_xml_decode_encode.cc:_ZL15UA_Variant_initP10UA_Variant:
  244|  8.17k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
fuzz_xml_decode_encode.cc:_ZL16UA_Variant_clearP10UA_Variant:
  244|  3.10k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
fuzz_xml_decode_encode.cc:_ZL19UA_ByteString_clearP9UA_String:
  244|  3.05k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types.c:UA_ByteString_init:
  244|  3.52k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types.c:UA_ExtensionObject_init:
  244|    292|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_xml.c:UA_String_clear:
  244|    220|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_xml.c:UA_String_copy:
  244|     92|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_xml.c:UA_String_init:
  244|      1|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_xml.c:UA_String_equal:
  244|  9.50k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_xml.c:UA_NodeId_equal:
  244|  35.7k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_xml.c:UA_ExtensionObject_clear:
  244|     73|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl

