dtoa:
  336|  1.58k|unsigned dtoa(double d, char* buffer) {
  337|  1.58k|    uint64_t bits = 0;
  338|  1.58k|    memcpy(&bits, &d, sizeof(double));
  339|       |
  340|  1.58k|    uint64_t mantissa = bits & ((1ull << mantissa_bits) - 1);
  ------------------
  |  |   33|  1.58k|#define mantissa_bits 52
  ------------------
  341|  1.58k|    uint32_t exponent = (uint32_t)
  342|  1.58k|        ((bits >> mantissa_bits) & ((1u << exponent_bits) - 1));
  ------------------
  |  |   33|  1.58k|#define mantissa_bits 52
  ------------------
                      ((bits >> mantissa_bits) & ((1u << exponent_bits) - 1));
  ------------------
  |  |   34|  1.58k|#define exponent_bits 11
  ------------------
  343|       |
  344|  1.58k|    if(exponent == 0 && mantissa == 0) {
  ------------------
  |  Branch (344:8): [True: 567, False: 1.02k]
  |  Branch (344:25): [True: 42, False: 525]
  ------------------
  345|     42|        memcpy(buffer, "0.0", 3);
  346|     42|        return 3;
  347|     42|    }
  348|       |
  349|  1.58k|    bool sign = ((bits >> (mantissa_bits + exponent_bits)) & 1) != 0;
  ------------------
  |  |   33|  1.54k|#define mantissa_bits 52
  ------------------
                  bool sign = ((bits >> (mantissa_bits + exponent_bits)) & 1) != 0;
  ------------------
  |  |   34|  1.54k|#define exponent_bits 11
  ------------------
  350|  1.54k|    unsigned pos = 0;
  351|  1.54k|    if(sign) {
  ------------------
  |  Branch (351:8): [True: 63, False: 1.48k]
  ------------------
  352|     63|        buffer[0] = '-';
  353|     63|        pos++;
  354|     63|    }
  355|       |
  356|  1.54k|    if(exponent == ((1u << exponent_bits) - 1u)) {
  ------------------
  |  |   34|  1.54k|#define exponent_bits 11
  ------------------
  |  Branch (356:8): [True: 0, False: 1.54k]
  ------------------
  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.54k|    int K = 0;
  367|  1.54k|    char digits[18];
  368|  1.54k|    memset(digits, 0, 18);
  369|  1.54k|    unsigned ndigits = grisu2(bits, digits, &K);
  370|  1.54k|    return pos + emit_digits(digits, ndigits, &buffer[pos], K, sign);
  371|  1.54k|}
dtoa.c:grisu2:
  255|  1.54k|static unsigned grisu2(uint64_t bits, char* digits, int* K) {
  256|  1.54k|    Fp w = build_fp(bits);
  257|  1.54k|    Fp lower, upper;
  258|  1.54k|    get_normalized_boundaries(&w, &lower, &upper);
  259|  1.54k|    normalize(&w);
  260|  1.54k|    int k;
  261|  1.54k|    Fp cp = find_cachedpow10(upper.exp, &k);
  262|  1.54k|    w     = multiply(&w,     &cp);
  263|  1.54k|    upper = multiply(&upper, &cp);
  264|  1.54k|    lower = multiply(&lower, &cp);
  265|  1.54k|    lower.frac++;
  266|  1.54k|    upper.frac--;
  267|  1.54k|    *K = -k;
  268|  1.54k|    return generate_digits(&w, &upper, &lower, digits, K);
  269|  1.54k|}
dtoa.c:build_fp:
  132|  1.54k|static Fp build_fp(uint64_t bits) {
  133|  1.54k|    Fp fp;
  134|  1.54k|    fp.frac = bits & fracmask;
  ------------------
  |  |   35|  1.54k|#define fracmask  0x000FFFFFFFFFFFFFU
  ------------------
  135|  1.54k|    fp.exp = (bits & expmask) >> 52;
  ------------------
  |  |   36|  1.54k|#define expmask   0x7FF0000000000000U
  ------------------
  136|  1.54k|    if(fp.exp) {
  ------------------
  |  Branch (136:8): [True: 1.02k, False: 525]
  ------------------
  137|  1.02k|        fp.frac += hiddenbit;
  ------------------
  |  |   37|  1.02k|#define hiddenbit 0x0010000000000000U
  ------------------
  138|  1.02k|        fp.exp -= expbias;
  ------------------
  |  |   39|  1.02k|#define expbias   (1023 + 52)
  ------------------
  139|  1.02k|    } else {
  140|    525|        fp.exp = -expbias + 1;
  ------------------
  |  |   39|    525|#define expbias   (1023 + 52)
  ------------------
  141|    525|    }
  142|  1.54k|    return fp;
  143|  1.54k|}
dtoa.c:get_normalized_boundaries:
  155|  1.54k|static void get_normalized_boundaries(Fp* fp, Fp* lower, Fp* upper) {
  156|  1.54k|    upper->frac = (fp->frac << 1) + 1;
  157|  1.54k|    upper->exp  = fp->exp - 1;
  158|  15.0k|    while ((upper->frac & (hiddenbit << 1)) == 0) {
  ------------------
  |  |   37|  15.0k|#define hiddenbit 0x0010000000000000U
  ------------------
  |  Branch (158:12): [True: 13.5k, False: 1.54k]
  ------------------
  159|  13.5k|        upper->frac <<= 1;
  160|  13.5k|        upper->exp--;
  161|  13.5k|    }
  162|       |
  163|  1.54k|    int u_shift = 64 - 52 - 2;
  164|  1.54k|    upper->frac <<= u_shift;
  165|  1.54k|    upper->exp = upper->exp - u_shift;
  166|       |
  167|  1.54k|    int l_shift = fp->frac == hiddenbit ? 2 : 1;
  ------------------
  |  |   37|  1.54k|#define hiddenbit 0x0010000000000000U
  ------------------
  |  Branch (167:19): [True: 51, False: 1.49k]
  ------------------
  168|  1.54k|    lower->frac = (fp->frac << l_shift) - 1;
  169|  1.54k|    lower->exp = fp->exp - l_shift;
  170|  1.54k|    lower->frac <<= lower->exp - upper->exp;
  171|  1.54k|    lower->exp = upper->exp;
  172|  1.54k|}
dtoa.c:normalize:
  145|  1.54k|static void normalize(Fp* fp) {
  146|  15.0k|    while((fp->frac & hiddenbit) == 0) {
  ------------------
  |  |   37|  15.0k|#define hiddenbit 0x0010000000000000U
  ------------------
  |  Branch (146:11): [True: 13.5k, False: 1.54k]
  ------------------
  147|  13.5k|        fp->frac <<= 1;
  148|  13.5k|        fp->exp--;
  149|  13.5k|    }
  150|  1.54k|    int shift = 64 - 52 - 1;
  151|  1.54k|    fp->frac <<= shift;
  152|  1.54k|    fp->exp -= shift;
  153|  1.54k|}
dtoa.c:find_cachedpow10:
  113|  1.54k|find_cachedpow10(int exp, int* k) {
  114|  1.54k|    const double one_log_ten = 0.30102999566398114;
  115|  1.54k|    int approx = (int)(-(exp + npowers) * one_log_ten);
  ------------------
  |  |   54|  1.54k|#define npowers     87
  ------------------
  116|  1.54k|    int idx = (approx - firstpower) / steppowers;
  ------------------
  |  |   56|  1.54k|#define firstpower -348 /* 10 ^ -348 */
  ------------------
                  int idx = (approx - firstpower) / steppowers;
  ------------------
  |  |   55|  1.54k|#define steppowers  8
  ------------------
  117|  4.46k|    while(1) {
  ------------------
  |  Branch (117:11): [True: 4.46k, Folded]
  ------------------
  118|  4.46k|        int current = exp + powers_ten[idx].exp + 64;
  119|  4.46k|        if(current < expmin) {
  ------------------
  |  |   58|  4.46k|#define expmin     -60
  ------------------
  |  Branch (119:12): [True: 2.91k, False: 1.54k]
  ------------------
  120|  2.91k|            idx++;
  121|  2.91k|            continue;
  122|  2.91k|        }
  123|  1.54k|        if(current > expmax) {
  ------------------
  |  |   57|  1.54k|#define expmax     -32
  ------------------
  |  Branch (123:12): [True: 0, False: 1.54k]
  ------------------
  124|      0|            idx--;
  125|      0|            continue;
  126|      0|        }
  127|  1.54k|        *k = (firstpower + idx * steppowers);
  ------------------
  |  |   56|  1.54k|#define firstpower -348 /* 10 ^ -348 */
  ------------------
                      *k = (firstpower + idx * steppowers);
  ------------------
  |  |   55|  1.54k|#define steppowers  8
  ------------------
  128|  1.54k|        return powers_ten[idx];
  129|  1.54k|    }
  130|  1.54k|}
dtoa.c:multiply:
  174|  4.63k|static Fp multiply(Fp* a, Fp* b) {
  175|  4.63k|    const uint64_t lomask = 0x00000000FFFFFFFF;
  176|  4.63k|    uint64_t ah_bl = (a->frac >> 32)    * (b->frac & lomask);
  177|  4.63k|    uint64_t al_bh = (a->frac & lomask) * (b->frac >> 32);
  178|  4.63k|    uint64_t al_bl = (a->frac & lomask) * (b->frac & lomask);
  179|  4.63k|    uint64_t ah_bh = (a->frac >> 32)    * (b->frac >> 32);
  180|  4.63k|    uint64_t tmp = (ah_bl & lomask) + (al_bh & lomask) + (al_bl >> 32); 
  181|       |    /* round up */
  182|  4.63k|    tmp += 1U << 31;
  183|  4.63k|    Fp fp;
  184|  4.63k|    fp.frac = ah_bh + (ah_bl >> 32) + (al_bh >> 32) + (tmp >> 32);
  185|  4.63k|    fp.exp = a->exp + b->exp + 64;
  186|  4.63k|    return fp;
  187|  4.63k|}
dtoa.c:generate_digits:
  198|  1.54k|static unsigned generate_digits(Fp* fp, Fp* upper, Fp* lower, char* digits, int* K) {
  199|  1.54k|    uint64_t wfrac = upper->frac - fp->frac;
  200|  1.54k|    uint64_t delta = upper->frac - lower->frac;
  201|       |
  202|  1.54k|    Fp one;
  203|  1.54k|    one.frac = 1ULL << -upper->exp;
  204|  1.54k|    one.exp  = upper->exp;
  205|       |
  206|  1.54k|    uint64_t part1 = upper->frac >> -one.exp;
  207|  1.54k|    uint64_t part2 = upper->frac & (one.frac - 1);
  208|       |
  209|  1.54k|    unsigned idx = 0;
  210|  1.54k|    int kappa = 10;
  211|  1.54k|    uint64_t* divp;
  212|       |
  213|       |    /* 1000000000 */
  214|  14.1k|    for(divp = tens + 10; kappa > 0; divp++) {
  ------------------
  |  Branch (214:27): [True: 13.3k, False: 798]
  ------------------
  215|  13.3k|        uint64_t div = *divp;
  216|  13.3k|        uint64_t digit = part1 / div;
  217|  13.3k|        if(digit || idx) {
  ------------------
  |  Branch (217:12): [True: 5.19k, False: 8.20k]
  |  Branch (217:21): [True: 1.00k, False: 7.20k]
  ------------------
  218|  6.19k|            digits[idx++] = (char)(digit + '0');
  219|  6.19k|        }
  220|       |
  221|  13.3k|        part1 -= digit * div;
  222|  13.3k|        kappa--;
  223|       |
  224|  13.3k|        uint64_t tmp = (part1 <<-one.exp) + part2;
  225|  13.3k|        if(tmp <= delta) {
  ------------------
  |  Branch (225:12): [True: 747, False: 12.6k]
  ------------------
  226|    747|            *K += kappa;
  227|    747|            round_digit(digits, idx, delta, tmp, div << -one.exp, wfrac);
  228|    747|            return idx;
  229|    747|        }
  230|  13.3k|    }
  231|       |
  232|       |    /* 10 */
  233|    798|    uint64_t* unit = tens + 18;
  234|  7.29k|    while(true) {
  ------------------
  |  Branch (234:11): [True: 7.29k, Folded]
  ------------------
  235|  7.29k|        part2 *= 10;
  236|  7.29k|        delta *= 10;
  237|  7.29k|        kappa--;
  238|       |
  239|  7.29k|        uint64_t digit = part2 >> -one.exp;
  240|  7.29k|        if(digit || idx) {
  ------------------
  |  Branch (240:12): [True: 5.55k, False: 1.73k]
  |  Branch (240:21): [True: 1.73k, False: 0]
  ------------------
  241|  7.29k|            digits[idx++] = (char)(digit + '0');
  242|  7.29k|        }
  243|       |
  244|  7.29k|        part2 &= one.frac - 1;
  245|  7.29k|        if(part2 < delta) {
  ------------------
  |  Branch (245:12): [True: 798, False: 6.49k]
  ------------------
  246|    798|            *K += kappa;
  247|    798|            round_digit(digits, idx, delta, part2, one.frac, wfrac * *unit);
  248|    798|            break;
  249|    798|        }
  250|  6.49k|        unit--;
  251|  6.49k|    }
  252|    798|    return idx;
  253|  1.54k|}
dtoa.c:round_digit:
  190|  1.54k|                        uint64_t rem, uint64_t kappa, uint64_t frac) {
  191|  2.62k|    while(rem < frac && delta - rem >= kappa &&
  ------------------
  |  Branch (191:11): [True: 1.64k, False: 978]
  |  Branch (191:25): [True: 1.32k, False: 327]
  ------------------
  192|  1.32k|          (rem + kappa < frac || frac - rem > rem + kappa - frac)) {
  ------------------
  |  Branch (192:12): [True: 636, False: 684]
  |  Branch (192:34): [True: 444, False: 240]
  ------------------
  193|  1.08k|        digits[ndigits - 1]--;
  194|  1.08k|        rem += kappa;
  195|  1.08k|    }
  196|  1.54k|}
dtoa.c:emit_digits:
  272|  1.54k|emit_digits(char* digits, unsigned ndigits, char* dest, int K, bool neg) {
  273|  1.54k|    int exp = absv(K + (int)ndigits - 1);
  ------------------
  |  |   41|  1.54k|#define absv(n) ((n) < 0 ? -(n) : (n))
  |  |  ------------------
  |  |  |  Branch (41:18): [True: 966, False: 579]
  |  |  ------------------
  ------------------
  274|       |
  275|       |    /* write plain integer */
  276|  1.54k|    if(K >= 0 && (exp < (int)ndigits + 7)) {
  ------------------
  |  Branch (276:8): [True: 420, False: 1.12k]
  |  Branch (276:18): [True: 294, False: 126]
  ------------------
  277|    294|        memcpy(dest, digits, ndigits);
  278|    294|        memset(dest + ndigits, '0', (unsigned)K);
  279|    294|        memcpy(dest + ndigits + (unsigned)K, ".0", 2); /* always append .0 for naked integers */
  280|    294|        return (unsigned)(ndigits + (unsigned)K + 2);
  281|    294|    }
  282|       |
  283|       |    /* write decimal w/o scientific notation */
  284|  1.25k|    if(K < 0 && (K > -7 || exp < 4)) {
  ------------------
  |  Branch (284:8): [True: 1.12k, False: 126]
  |  Branch (284:18): [True: 156, False: 969]
  |  Branch (284:28): [True: 246, False: 723]
  ------------------
  285|    402|        int offset = (int)ndigits - absv(K);
  ------------------
  |  |   41|    402|#define absv(n) ((n) < 0 ? -(n) : (n))
  |  |  ------------------
  |  |  |  Branch (41:18): [True: 402, False: 0]
  |  |  ------------------
  ------------------
  286|    402|        if(offset <= 0) {
  ------------------
  |  Branch (286:12): [True: 279, False: 123]
  ------------------
  287|       |            /* fp < 1.0 -> write leading zero */
  288|    279|            offset = -offset;
  289|    279|            dest[0] = '0';
  290|    279|            dest[1] = '.';
  291|    279|            memset(dest + 2, '0', (size_t)offset);
  292|    279|            memcpy(dest + offset + 2, digits, ndigits);
  293|    279|            return ndigits + 2 + (unsigned)offset;
  294|    279|        } else {
  295|       |            /* fp > 1.0 */
  296|    123|            memcpy(dest, digits, (size_t)offset);
  297|    123|            dest[offset] = '.';
  298|    123|            memcpy(dest + offset + 1, digits + offset, ndigits - (unsigned)offset);
  299|    123|            return ndigits + 1;
  300|    123|        }
  301|    402|    }
  302|       |
  303|       |    /* write decimal w/ scientific notation */
  304|    849|    ndigits = minv(ndigits, (unsigned)(18 - neg));
  ------------------
  |  |   42|    849|#define minv(a, b) ((a) < (b) ? (a) : (b))
  |  |  ------------------
  |  |  |  Branch (42:21): [True: 840, False: 9]
  |  |  ------------------
  ------------------
  305|    849|    unsigned idx = 0;
  306|    849|    dest[idx++] = digits[0];
  307|    849|    if(ndigits > 1) {
  ------------------
  |  Branch (307:8): [True: 684, False: 165]
  ------------------
  308|    684|        dest[idx++] = '.';
  309|    684|        memcpy(dest + idx, digits + 1, ndigits - 1);
  310|    684|        idx += ndigits - 1;
  311|    684|    }
  312|       |
  313|    849|    dest[idx++] = 'e';
  314|       |
  315|    849|    char sign = K + (int)ndigits - 1 < 0 ? '-' : '+';
  ------------------
  |  Branch (315:17): [True: 687, False: 162]
  ------------------
  316|    849|    dest[idx++] = sign;
  317|       |
  318|    849|    int cent = 0;
  319|    849|    if(exp > 99) {
  ------------------
  |  Branch (319:8): [True: 615, False: 234]
  ------------------
  320|    615|        cent = exp / 100;
  321|    615|        dest[idx++] = (char)(cent + '0');
  322|    615|        exp -= cent * 100;
  323|    615|    }
  324|    849|    if(exp > 9) {
  ------------------
  |  Branch (324:8): [True: 594, False: 255]
  ------------------
  325|    594|        int dec = exp / 10;
  326|    594|        dest[idx++] = (char)(dec + '0');
  327|    594|        exp -= dec * 10;
  328|       |
  329|    594|    } else if(cent) {
  ------------------
  |  Branch (329:15): [True: 129, False: 126]
  ------------------
  330|    129|        dest[idx++] = '0';
  331|    129|    }
  332|    849|    dest[idx++] = (char)(exp % 10 + '0');
  333|    849|    return idx;
  334|  1.25k|}

itoaUnsigned:
   42|    525|UA_UInt16 itoaUnsigned(UA_UInt64 value, char* buffer, UA_Byte base) {
   43|       |    /* consider absolute value of number */
   44|    525|    UA_UInt64 n = value;
   45|       |
   46|    525|    UA_UInt16 i = 0;
   47|  2.75k|    while (n) {
  ------------------
  |  Branch (47:12): [True: 2.22k, False: 525]
  ------------------
   48|  2.22k|        UA_UInt64 r = n % base;
   49|       |
   50|  2.22k|        if (r >= 10)
  ------------------
  |  Branch (50:13): [True: 0, False: 2.22k]
  ------------------
   51|      0|            buffer[i++] = (char)(65 + (r - 10));
   52|  2.22k|        else
   53|  2.22k|            buffer[i++] = (char)(48 + r);
   54|       |
   55|  2.22k|        n = n / base;
   56|  2.22k|    }
   57|       |    /* if number is 0 */
   58|    525|    if (i == 0)
  ------------------
  |  Branch (58:9): [True: 30, False: 495]
  ------------------
   59|     30|        buffer[i++] = '0';
   60|       |
   61|    525|    buffer[i] = '\0'; /* null terminate string */
   62|    525|    i--;
   63|       |    /* reverse the string */
   64|    525|    reverse(buffer, 0, i);
   65|    525|    i++;
   66|    525|    return i;
   67|    525|}
itoaSigned:
   70|  1.09k|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.09k|    UA_UInt64 n;
   74|  1.09k|    if(value == UA_INT64_MIN) {
  ------------------
  |  |  120|  1.09k|#define UA_INT64_MIN ((int64_t)-UA_INT64_MAX-1LL)
  |  |  ------------------
  |  |  |  |  119|  1.09k|#define UA_INT64_MAX (int64_t)9223372036854775807LL
  |  |  ------------------
  ------------------
  |  Branch (74:8): [True: 3, False: 1.08k]
  ------------------
   75|      3|        n = (UA_UInt64)UA_INT64_MAX + 1;
  ------------------
  |  |  119|      3|#define UA_INT64_MAX (int64_t)9223372036854775807LL
  ------------------
   76|  1.08k|    } else {
   77|  1.08k|        n = (UA_UInt64)value;
   78|  1.08k|        if(value < 0){
  ------------------
  |  Branch (78:12): [True: 498, False: 591]
  ------------------
   79|    498|            n = (UA_UInt64)-value;
   80|    498|        }
   81|  1.08k|    }
   82|       |
   83|  1.09k|    UA_UInt16 i = 0;
   84|  12.0k|    while(n) {
  ------------------
  |  Branch (84:11): [True: 10.9k, False: 1.09k]
  ------------------
   85|  10.9k|        UA_UInt64 r = n % 10;
   86|  10.9k|        buffer[i++] = (char)('0' + r);
   87|  10.9k|        n = n / 10;
   88|  10.9k|    }
   89|       |
   90|  1.09k|    if(i == 0)
  ------------------
  |  Branch (90:8): [True: 48, False: 1.04k]
  ------------------
   91|     48|        buffer[i++] = '0'; /* if number is 0 */
   92|  1.09k|    if(value < 0)
  ------------------
  |  Branch (92:8): [True: 501, False: 591]
  ------------------
   93|    501|        buffer[i++] = '-';
   94|  1.09k|    buffer[i] = '\0'; /* null terminate string */
   95|  1.09k|    i--;
   96|  1.09k|    reverse(buffer, 0, i); /* reverse the string and return it */
   97|  1.09k|    i++;
   98|  1.09k|    return i;
   99|  1.09k|}
itoa.c:reverse:
   34|  1.61k|static char* reverse(char *buffer, UA_UInt16 i, UA_UInt16 j) {
   35|  8.01k|    while (i < j)
  ------------------
  |  Branch (35:12): [True: 6.39k, False: 1.61k]
  ------------------
   36|  6.39k|        swap(&buffer[i++], &buffer[j--]);
   37|       |
   38|  1.61k|    return buffer;
   39|  1.61k|}
itoa.c:swap:
   27|  6.39k|static void swap(char *x, char *y) {
   28|  6.39k|    char t = *x;
   29|  6.39k|    *x = *y;
   30|  6.39k|    *y = t;
   31|  6.39k|}

parseUInt64:
   30|  1.74k|parseUInt64(const char *str, size_t size, uint64_t *result) {
   31|  1.74k|    size_t i = 0;
   32|  1.74k|    uint64_t n = 0, prev = 0;
   33|       |
   34|       |    /* Hex */
   35|  1.74k|    if(size > 2 && str[0] == '0' && (str[1] | 32) == 'x') {
  ------------------
  |  Branch (35:8): [True: 1.50k, False: 234]
  |  Branch (35:20): [True: 410, False: 1.09k]
  |  Branch (35:37): [True: 229, False: 181]
  ------------------
   36|    229|        i = 2;
   37|  3.20k|        for(; i < size; i++) {
  ------------------
  |  Branch (37:15): [True: 3.02k, False: 183]
  ------------------
   38|  3.02k|            uint8_t c = (uint8_t)str[i] | 32;
   39|  3.02k|            if(c >= '0' && c <= '9')
  ------------------
  |  Branch (39:16): [True: 3.01k, False: 12]
  |  Branch (39:28): [True: 990, False: 2.02k]
  ------------------
   40|    990|                c = (uint8_t)(c - '0');
   41|  2.03k|            else if(c >= 'a' && c <='f')
  ------------------
  |  Branch (41:21): [True: 2.02k, False: 15]
  |  Branch (41:33): [True: 1.99k, False: 26]
  ------------------
   42|  1.99k|                c = (uint8_t)(c - 'a' + 10);
   43|     41|            else if(c >= 'A' && c <='F')
  ------------------
  |  Branch (43:21): [True: 28, False: 13]
  |  Branch (43:33): [True: 0, False: 28]
  ------------------
   44|      0|                c = (uint8_t)(c - 'A' + 10);
   45|     41|            else
   46|     41|                break;
   47|  2.98k|            n = (n << 4) | (c & 0xF);
   48|  2.98k|            if(n < prev) /* Check for overflow */
  ------------------
  |  Branch (48:16): [True: 5, False: 2.98k]
  ------------------
   49|      5|                return 0;
   50|  2.98k|            prev = n;
   51|  2.98k|        }
   52|    224|        *result = n;
   53|    224|        return (i > 2) ? i : 0; /* 2 -> No digit was parsed */
  ------------------
  |  Branch (53:16): [True: 219, False: 5]
  ------------------
   54|    229|    }
   55|       |
   56|       |    /* Decimal */
   57|  16.1k|    for(; i < size; i++) {
  ------------------
  |  Branch (57:11): [True: 15.0k, False: 1.08k]
  ------------------
   58|  15.0k|        if(str[i] < '0' || str[i] > '9')
  ------------------
  |  Branch (58:12): [True: 359, False: 14.6k]
  |  Branch (58:28): [True: 63, False: 14.6k]
  ------------------
   59|    422|            break;
   60|       |        /* Fast multiplication: n*10 == (n*8) + (n*2) */
   61|  14.6k|        n = (n << 3) + (n << 1) + (uint8_t)(str[i] - '0');
   62|  14.6k|        if(n < prev) /* Check for overflow */
  ------------------
  |  Branch (62:12): [True: 1, False: 14.6k]
  ------------------
   63|      1|            return 0;
   64|  14.6k|        prev = n;
   65|  14.6k|    }
   66|  1.51k|    *result = n;
   67|  1.51k|    return i;
   68|  1.51k|}
parseInt64:
   71|  1.22k|parseInt64(const char *str, size_t size, int64_t *result) {
   72|       |    /* Negative value? */
   73|  1.22k|    size_t i = 0;
   74|  1.22k|    bool neg = false;
   75|  1.22k|    if(*str == '-' || *str == '+') {
  ------------------
  |  Branch (75:8): [True: 500, False: 720]
  |  Branch (75:23): [True: 5, False: 715]
  ------------------
   76|    505|        neg = (*str == '-');
   77|    505|        i++;
   78|    505|    }
   79|       |
   80|       |    /* Parse as unsigned */
   81|  1.22k|    uint64_t n = 0;
   82|  1.22k|    size_t len = parseUInt64(&str[i], size - i, &n);
   83|  1.22k|    if(len == 0)
  ------------------
  |  Branch (83:8): [True: 72, False: 1.14k]
  ------------------
   84|     72|        return 0;
   85|       |
   86|       |    /* Check for overflow, adjust and return */
   87|  1.14k|    if(!neg) {
  ------------------
  |  Branch (87:8): [True: 655, False: 493]
  ------------------
   88|    655|        if(n > 9223372036854775807UL)
  ------------------
  |  Branch (88:12): [True: 61, False: 594]
  ------------------
   89|     61|            return 0;
   90|    594|        *result = (int64_t)n;
   91|    594|    } 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|    493|        if(n > 9223372036854775808UL)
  ------------------
  |  Branch (97:12): [True: 5, False: 488]
  ------------------
   98|      5|            return 0;
   99|    488|        *result = (n == 9223372036854775808UL)
  ------------------
  |  Branch (99:19): [True: 4, False: 484]
  ------------------
  100|    488|            ? (int64_t)(-9223372036854775807LL - 1)
  101|    488|            : -(int64_t)n;
  102|    488|    }
  103|  1.08k|    return len + i;
  104|  1.14k|}
parseDouble:
  106|  1.10k|size_t parseDouble(const char *str, size_t size, double *result) {
  107|  1.10k|    char buf[2000];
  108|  1.10k|    if(size >= 2000)
  ------------------
  |  Branch (108:8): [True: 0, False: 1.10k]
  ------------------
  109|      0|        return 0;
  110|  1.10k|    memcpy(buf, str, size);
  111|  1.10k|    buf[size] = 0;
  112|  1.10k|    errno = 0;
  113|  1.10k|    char *endptr;
  114|  1.10k|    *result = strtod(buf, &endptr);
  115|  1.10k|    if(errno != 0 && errno != ERANGE)
  ------------------
  |  Branch (115:8): [True: 310, False: 790]
  |  Branch (115:22): [True: 0, False: 310]
  ------------------
  116|      0|        return 0;
  117|  1.10k|    return (uintptr_t)endptr - (uintptr_t)buf;
  118|  1.10k|}

yxml_init:
  302|  8.66k|void yxml_init(yxml_t *x, void *stack, size_t stacksize) {
  303|  8.66k|	memset(x, 0, sizeof(*x));
  304|  8.66k|	x->line = 1;
  305|  8.66k|	x->stack = (unsigned char*)stack;
  306|  8.66k|	x->stacksize = stacksize;
  307|  8.66k|	*x->stack = 0;
  308|  8.66k|	x->elem = x->pi = x->attr = (char *)x->stack;
  309|  8.66k|	x->state = YXMLS_init;
  310|  8.66k|}
yxml_init_content:
  312|    343|void yxml_init_content(yxml_t *x, void *stack, size_t stacksize) {
  313|    343|	yxml_init(x, stack, stacksize);
  314|       |	x->contentmode = true;
  315|    343|	x->state = YXMLS_misc2;
  316|    343|}
yxml_parse:
  318|   183M|yxml_ret_t yxml_parse(yxml_t *x, int _ch) {
  319|   183M|	x->isReference = false;
  320|       |
  321|       |	/* Ensure that characters are in the range of 0..255 rather than -126..125.
  322|       |	 * All character comparisons are done with positive integers. */
  323|   183M|	unsigned ch = (unsigned)(_ch+256) & 0xff;
  324|   183M|	if(!ch)
  ------------------
  |  Branch (324:5): [True: 5, False: 183M]
  ------------------
  325|      5|		return YXML_ESYN;
  326|   183M|	x->total++;
  327|       |
  328|       |	/* End-of-Line normalization, "\rX", "\r\n" and "\n" are recognized and
  329|       |	 * normalized to a single '\n' as per XML 1.0 section 2.11. XML 1.1 adds
  330|       |	 * some non-ASCII character sequences to this list, but we can only handle
  331|       |	 * ASCII here without making assumptions about the input encoding. */
  332|   183M|	if(x->ignore == ch) {
  ------------------
  |  Branch (332:5): [True: 20.1k, False: 183M]
  ------------------
  333|  20.1k|		x->ignore = 0;
  334|  20.1k|		return YXML_OK;
  335|  20.1k|	}
  336|   183M|	x->ignore = (ch == 0xd) * 0xa;
  337|   183M|	if(ch == 0xa || ch == 0xd) {
  ------------------
  |  Branch (337:5): [True: 1.47M, False: 181M]
  |  Branch (337:18): [True: 3.32M, False: 178M]
  ------------------
  338|  4.80M|		ch = 0xa;
  339|  4.80M|		x->line++;
  340|  4.80M|		x->byte = 0;
  341|  4.80M|	}
  342|   183M|	x->byte++;
  343|       |
  344|   183M|	switch((yxml_state_t)x->state) {
  ------------------
  |  Branch (344:9): [True: 183M, False: 0]
  ------------------
  345|  11.8k|	case YXMLS_string:
  ------------------
  |  Branch (345:2): [True: 11.8k, False: 183M]
  ------------------
  346|  11.8k|		if(ch == *x->string) {
  ------------------
  |  Branch (346:6): [True: 11.8k, False: 10]
  ------------------
  347|  11.8k|			x->string++;
  348|  11.8k|			if(!*x->string)
  ------------------
  |  Branch (348:7): [True: 2.23k, False: 9.65k]
  ------------------
  349|  2.23k|				x->state = x->nextstate;
  350|  11.8k|			return YXML_OK;
  351|  11.8k|		}
  352|     10|		break;
  353|  34.6M|	case YXMLS_attr0:
  ------------------
  |  Branch (353:2): [True: 34.6M, False: 148M]
  ------------------
  354|  34.6M|		if(yxml_isName(ch))
  ------------------
  |  |  107|  34.6M|#define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  |  106|  69.3M|#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_' || c >= 128)
  |  |  |  |  ------------------
  |  |  |  |  |  |  102|  69.3M|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (102:25): [True: 11.5M, False: 23.1M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:49): [True: 27.2k, False: 23.1M]
  |  |  |  |  |  Branch (106:61): [True: 2.17k, False: 23.1M]
  |  |  |  |  |  Branch (106:73): [True: 21.8M, False: 1.33M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  |  103|  36.0M|#define yxml_isNum(c) (c-'0' < 10)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:23): [True: 96.4k, False: 1.23M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (107:65): [True: 14.6k, False: 1.22M]
  |  |  |  Branch (107:77): [True: 1.68k, False: 1.21M]
  |  |  ------------------
  ------------------
  355|  33.4M|			return yxml_attrname(x, ch);
  356|  1.21M|		if(yxml_isSP(ch)) {
  ------------------
  |  |  101|  1.21M|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 896k, False: 322k]
  |  |  |  Branch (101:36): [True: 205, False: 322k]
  |  |  |  Branch (101:49): [True: 404, False: 322k]
  |  |  ------------------
  ------------------
  357|   897k|			x->state = YXMLS_attr1;
  358|   897k|			return yxml_attrnameend(x, ch);
  359|   897k|		}
  360|   322k|		if(ch == (unsigned char)'=') {
  ------------------
  |  Branch (360:6): [True: 322k, False: 24]
  ------------------
  361|   322k|			x->state = YXMLS_attr2;
  362|   322k|			return yxml_attrnameend(x, ch);
  363|   322k|		}
  364|     24|		break;
  365|   897k|	case YXMLS_attr1:
  ------------------
  |  Branch (365:2): [True: 897k, False: 182M]
  ------------------
  366|   897k|		if(yxml_isSP(ch))
  ------------------
  |  |  101|   897k|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 211, False: 897k]
  |  |  |  Branch (101:36): [True: 194, False: 897k]
  |  |  |  Branch (101:49): [True: 197, False: 896k]
  |  |  ------------------
  ------------------
  367|    602|			return YXML_OK;
  368|   896k|		if(ch == (unsigned char)'=') {
  ------------------
  |  Branch (368:6): [True: 896k, False: 13]
  ------------------
  369|   896k|			x->state = YXMLS_attr2;
  370|   896k|			return YXML_OK;
  371|   896k|		}
  372|     13|		break;
  373|  1.21M|	case YXMLS_attr2:
  ------------------
  |  Branch (373:2): [True: 1.21M, False: 181M]
  ------------------
  374|  1.21M|		if(yxml_isSP(ch))
  ------------------
  |  |  101|  1.21M|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 198, False: 1.21M]
  |  |  |  Branch (101:36): [True: 194, False: 1.21M]
  |  |  |  Branch (101:49): [True: 195, False: 1.21M]
  |  |  ------------------
  ------------------
  375|    587|			return YXML_OK;
  376|  1.21M|		if(ch == (unsigned char)'\'' || ch == (unsigned char)'"') {
  ------------------
  |  Branch (376:6): [True: 317k, False: 901k]
  |  Branch (376:35): [True: 901k, False: 17]
  ------------------
  377|  1.21M|			x->state = YXMLS_attr3;
  378|  1.21M|			x->quote = ch;
  379|  1.21M|			return YXML_OK;
  380|  1.21M|		}
  381|     17|		break;
  382|  4.62M|	case YXMLS_attr3:
  ------------------
  |  Branch (382:2): [True: 4.62M, False: 178M]
  ------------------
  383|  4.62M|		if(yxml_isAttValue(ch))
  ------------------
  |  |  109|  4.62M|#define yxml_isAttValue(c) (yxml_isChar(c) && c != x->quote && c != '<' && c != '&')
  |  |  ------------------
  |  |  |  |   99|  9.25M|#define yxml_isChar(c) 1
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (99:24): [True: 4.62M, Folded]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (109:47): [True: 3.40M, False: 1.21M]
  |  |  |  Branch (109:64): [True: 3.40M, False: 1]
  |  |  |  Branch (109:76): [True: 3.40M, False: 873]
  |  |  ------------------
  ------------------
  384|  3.40M|			return yxml_dataattr(x, ch);
  385|  1.21M|		if(ch == (unsigned char)'&') {
  ------------------
  |  Branch (385:6): [True: 873, False: 1.21M]
  ------------------
  386|    873|			x->state = YXMLS_attr4;
  387|    873|			return yxml_refstart(x, ch);
  388|    873|		}
  389|  1.21M|		if(x->quote == ch) {
  ------------------
  |  Branch (389:6): [True: 1.21M, False: 1]
  ------------------
  390|  1.21M|			x->state = YXMLS_elem2;
  391|  1.21M|			return yxml_attrvalend(x, ch);
  392|  1.21M|		}
  393|      1|		break;
  394|  3.19k|	case YXMLS_attr4:
  ------------------
  |  Branch (394:2): [True: 3.19k, False: 183M]
  ------------------
  395|  3.19k|		if(yxml_isRef(ch))
  ------------------
  |  |  113|  3.19k|#define yxml_isRef(c) (yxml_isNum(c) || yxml_isAlpha(c) || c == '#')
  |  |  ------------------
  |  |  |  |  103|  6.39k|#define yxml_isNum(c) (c-'0' < 10)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:23): [True: 935, False: 2.26k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define yxml_isRef(c) (yxml_isNum(c) || yxml_isAlpha(c) || c == '#')
  |  |  ------------------
  |  |  |  |  102|  5.45k|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:25): [True: 726, False: 1.53k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (113:60): [True: 701, False: 834]
  |  |  ------------------
  ------------------
  396|  2.36k|			return yxml_ref(x, ch);
  397|    834|		if(ch == (unsigned char)'\x3b') {
  ------------------
  |  Branch (397:6): [True: 817, False: 17]
  ------------------
  398|    817|			x->state = YXMLS_attr3;
  399|    817|			return yxml_refattrval(x, ch);
  400|    817|		}
  401|     17|		break;
  402|  1.35k|	case YXMLS_cd0:
  ------------------
  |  Branch (402:2): [True: 1.35k, False: 183M]
  ------------------
  403|  1.35k|		if(ch == (unsigned char)']') {
  ------------------
  |  Branch (403:6): [True: 724, False: 631]
  ------------------
  404|    724|			x->state = YXMLS_cd1;
  405|    724|			return YXML_OK;
  406|    724|		}
  407|    631|		if(yxml_isChar(ch))
  ------------------
  |  |   99|    631|#define yxml_isChar(c) 1
  |  |  ------------------
  |  |  |  Branch (99:24): [True: 631, Folded]
  |  |  ------------------
  ------------------
  408|    631|			return yxml_datacontent(x, ch);
  409|      0|		break;
  410|    717|	case YXMLS_cd1:
  ------------------
  |  Branch (410:2): [True: 717, False: 183M]
  ------------------
  411|    717|		if(ch == (unsigned char)']') {
  ------------------
  |  Branch (411:6): [True: 478, False: 239]
  ------------------
  412|    478|			x->state = YXMLS_cd2;
  413|    478|			return YXML_OK;
  414|    478|		}
  415|    239|		if(yxml_isChar(ch)) {
  ------------------
  |  |   99|    239|#define yxml_isChar(c) 1
  |  |  ------------------
  |  |  |  Branch (99:24): [True: 239, Folded]
  |  |  ------------------
  ------------------
  416|    239|			x->state = YXMLS_cd0;
  417|    239|			return yxml_datacd1(x, ch);
  418|    239|		}
  419|      0|		break;
  420|    686|	case YXMLS_cd2:
  ------------------
  |  Branch (420:2): [True: 686, False: 183M]
  ------------------
  421|    686|		if(ch == (unsigned char)']')
  ------------------
  |  Branch (421:6): [True: 222, False: 464]
  ------------------
  422|    222|			return yxml_datacontent(x, ch);
  423|    464|		if(ch == (unsigned char)'>') {
  ------------------
  |  Branch (423:6): [True: 231, False: 233]
  ------------------
  424|    231|			x->state = YXMLS_misc2;
  425|    231|			return YXML_OK;
  426|    231|		}
  427|    233|		if(yxml_isChar(ch)) {
  ------------------
  |  |   99|    233|#define yxml_isChar(c) 1
  |  |  ------------------
  |  |  |  Branch (99:24): [True: 233, Folded]
  |  |  ------------------
  ------------------
  428|    233|			x->state = YXMLS_cd0;
  429|    233|			return yxml_datacd2(x, ch);
  430|    233|		}
  431|      0|		break;
  432|    217|	case YXMLS_comment0:
  ------------------
  |  Branch (432:2): [True: 217, False: 183M]
  ------------------
  433|    217|		if(ch == (unsigned char)'-') {
  ------------------
  |  Branch (433:6): [True: 207, False: 10]
  ------------------
  434|    207|			x->state = YXMLS_comment1;
  435|    207|			return YXML_OK;
  436|    207|		}
  437|     10|		break;
  438|  4.39k|	case YXMLS_comment1:
  ------------------
  |  Branch (438:2): [True: 4.39k, False: 183M]
  ------------------
  439|  4.39k|		if(ch == (unsigned char)'-') {
  ------------------
  |  Branch (439:6): [True: 4.38k, False: 9]
  ------------------
  440|  4.38k|			x->state = YXMLS_comment2;
  441|  4.38k|			return YXML_OK;
  442|  4.38k|		}
  443|      9|		break;
  444|  6.51k|	case YXMLS_comment2:
  ------------------
  |  Branch (444:2): [True: 6.51k, False: 183M]
  ------------------
  445|  6.51k|		if(ch == (unsigned char)'-') {
  ------------------
  |  Branch (445:6): [True: 4.75k, False: 1.76k]
  ------------------
  446|  4.75k|			x->state = YXMLS_comment3;
  447|  4.75k|			return YXML_OK;
  448|  4.75k|		}
  449|  1.76k|		if(yxml_isChar(ch))
  ------------------
  |  |   99|  1.76k|#define yxml_isChar(c) 1
  |  |  ------------------
  |  |  |  Branch (99:24): [True: 1.76k, Folded]
  |  |  ------------------
  ------------------
  450|  1.76k|			return YXML_OK;
  451|      0|		break;
  452|  4.74k|	case YXMLS_comment3:
  ------------------
  |  Branch (452:2): [True: 4.74k, False: 183M]
  ------------------
  453|  4.74k|		if(ch == (unsigned char)'-') {
  ------------------
  |  Branch (453:6): [True: 4.34k, False: 399]
  ------------------
  454|  4.34k|			x->state = YXMLS_comment4;
  455|  4.34k|			return YXML_OK;
  456|  4.34k|		}
  457|    399|		if(yxml_isChar(ch)) {
  ------------------
  |  |   99|    399|#define yxml_isChar(c) 1
  |  |  ------------------
  |  |  |  Branch (99:24): [True: 399, Folded]
  |  |  ------------------
  ------------------
  458|    399|			x->state = YXMLS_comment2;
  459|    399|			return YXML_OK;
  460|    399|		}
  461|      0|		break;
  462|  4.33k|	case YXMLS_comment4:
  ------------------
  |  Branch (462:2): [True: 4.33k, False: 183M]
  ------------------
  463|  4.33k|		if(ch == (unsigned char)'>') {
  ------------------
  |  Branch (463:6): [True: 4.33k, False: 4]
  ------------------
  464|  4.33k|			x->state = x->nextstate;
  465|  4.33k|			return YXML_OK;
  466|  4.33k|		}
  467|      4|		break;
  468|  1.96k|	case YXMLS_dt0:
  ------------------
  |  Branch (468:2): [True: 1.96k, False: 183M]
  ------------------
  469|  1.96k|		if(ch == (unsigned char)'>') {
  ------------------
  |  Branch (469:6): [True: 345, False: 1.62k]
  ------------------
  470|    345|			x->state = YXMLS_misc1;
  471|    345|			return YXML_OK;
  472|    345|		}
  473|  1.62k|		if(ch == (unsigned char)'\'' || ch == (unsigned char)'"') {
  ------------------
  |  Branch (473:6): [True: 262, False: 1.36k]
  |  Branch (473:35): [True: 330, False: 1.03k]
  ------------------
  474|    592|			x->state = YXMLS_dt1;
  475|    592|			x->quote = ch;
  476|    592|			x->nextstate = YXMLS_dt0;
  477|    592|			return YXML_OK;
  478|    592|		}
  479|  1.03k|		if(ch == (unsigned char)'<') {
  ------------------
  |  Branch (479:6): [True: 806, False: 226]
  ------------------
  480|    806|			x->state = YXMLS_dt2;
  481|    806|			return YXML_OK;
  482|    806|		}
  483|    226|		if(yxml_isChar(ch))
  ------------------
  |  |   99|    226|#define yxml_isChar(c) 1
  |  |  ------------------
  |  |  |  Branch (99:24): [True: 226, Folded]
  |  |  ------------------
  ------------------
  484|    226|			return YXML_OK;
  485|      0|		break;
  486|  1.13k|	case YXMLS_dt1:
  ------------------
  |  Branch (486:2): [True: 1.13k, False: 183M]
  ------------------
  487|  1.13k|		if(x->quote == ch) {
  ------------------
  |  Branch (487:6): [True: 938, False: 196]
  ------------------
  488|    938|			x->state = x->nextstate;
  489|    938|			return YXML_OK;
  490|    938|		}
  491|    196|		if(yxml_isChar(ch))
  ------------------
  |  |   99|    196|#define yxml_isChar(c) 1
  |  |  ------------------
  |  |  |  Branch (99:24): [True: 196, Folded]
  |  |  ------------------
  ------------------
  492|    196|			return YXML_OK;
  493|      0|		break;
  494|    799|	case YXMLS_dt2:
  ------------------
  |  Branch (494:2): [True: 799, False: 183M]
  ------------------
  495|    799|		if(ch == (unsigned char)'?') {
  ------------------
  |  Branch (495:6): [True: 194, False: 605]
  ------------------
  496|    194|			x->state = YXMLS_pi0;
  497|    194|			x->nextstate = YXMLS_dt0;
  498|    194|			return YXML_OK;
  499|    194|		}
  500|    605|		if(ch == (unsigned char)'!') {
  ------------------
  |  Branch (500:6): [True: 590, False: 15]
  ------------------
  501|    590|			x->state = YXMLS_dt3;
  502|    590|			return YXML_OK;
  503|    590|		}
  504|     15|		break;
  505|    584|	case YXMLS_dt3:
  ------------------
  |  Branch (505:2): [True: 584, False: 183M]
  ------------------
  506|    584|		if(ch == (unsigned char)'-') {
  ------------------
  |  Branch (506:6): [True: 194, False: 390]
  ------------------
  507|    194|			x->state = YXMLS_comment1;
  508|    194|			x->nextstate = YXMLS_dt0;
  509|    194|			return YXML_OK;
  510|    194|		}
  511|    390|		if(yxml_isChar(ch)) {
  ------------------
  |  |   99|    390|#define yxml_isChar(c) 1
  |  |  ------------------
  |  |  |  Branch (99:24): [True: 390, Folded]
  |  |  ------------------
  ------------------
  512|    390|			x->state = YXMLS_dt4;
  513|    390|			return YXML_OK;
  514|    390|		}
  515|      0|		break;
  516|    938|	case YXMLS_dt4:
  ------------------
  |  Branch (516:2): [True: 938, False: 183M]
  ------------------
  517|    938|		if(ch == (unsigned char)'\'' || ch == (unsigned char)'"') {
  ------------------
  |  Branch (517:6): [True: 194, False: 744]
  |  Branch (517:35): [True: 195, False: 549]
  ------------------
  518|    389|			x->state = YXMLS_dt1;
  519|    389|			x->quote = ch;
  520|    389|			x->nextstate = YXMLS_dt4;
  521|    389|			return YXML_OK;
  522|    389|		}
  523|    549|		if(ch == (unsigned char)'>') {
  ------------------
  |  Branch (523:6): [True: 343, False: 206]
  ------------------
  524|    343|			x->state = YXMLS_dt0;
  525|    343|			return YXML_OK;
  526|    343|		}
  527|    206|		if(yxml_isChar(ch))
  ------------------
  |  |   99|    206|#define yxml_isChar(c) 1
  |  |  ------------------
  |  |  |  Branch (99:24): [True: 206, Folded]
  |  |  ------------------
  ------------------
  528|    206|			return YXML_OK;
  529|      0|		break;
  530|  9.03M|	case YXMLS_elem0:
  ------------------
  |  Branch (530:2): [True: 9.03M, False: 174M]
  ------------------
  531|  9.03M|		if(yxml_isName(ch))
  ------------------
  |  |  107|  9.03M|#define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  |  106|  18.0M|#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_' || c >= 128)
  |  |  |  |  ------------------
  |  |  |  |  |  |  102|  18.0M|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (102:25): [True: 201k, False: 8.83M]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:49): [True: 797, False: 8.83M]
  |  |  |  |  |  Branch (106:61): [True: 977, False: 8.83M]
  |  |  |  |  |  Branch (106:73): [True: 110k, False: 8.72M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  |  103|  17.7M|#define yxml_isNum(c) (c-'0' < 10)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:23): [True: 11.3k, False: 8.70M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (107:65): [True: 736, False: 8.70M]
  |  |  |  Branch (107:77): [True: 604, False: 8.70M]
  |  |  ------------------
  ------------------
  532|   326k|			return yxml_elemname(x, ch);
  533|  8.70M|		if(yxml_isSP(ch)) {
  ------------------
  |  |  101|  8.70M|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 808, False: 8.70M]
  |  |  |  Branch (101:36): [True: 389, False: 8.70M]
  |  |  |  Branch (101:49): [True: 1.34k, False: 8.70M]
  |  |  ------------------
  ------------------
  534|  2.53k|			x->state = YXMLS_elem1;
  535|  2.53k|			return yxml_elemnameend(x, ch);
  536|  2.53k|		}
  537|  8.70M|		if(ch == (unsigned char)'/') {
  ------------------
  |  Branch (537:6): [True: 8.68M, False: 25.6k]
  ------------------
  538|  8.68M|			x->state = YXMLS_elem3;
  539|  8.68M|			return yxml_elemnameend(x, ch);
  540|  8.68M|		}
  541|  25.6k|		if(ch == (unsigned char)'>') {
  ------------------
  |  Branch (541:6): [True: 25.6k, False: 24]
  ------------------
  542|  25.6k|			x->state = YXMLS_misc2;
  543|  25.6k|			return yxml_elemnameend(x, ch);
  544|  25.6k|		}
  545|     24|		break;
  546|  1.99M|	case YXMLS_elem1:
  ------------------
  |  Branch (546:2): [True: 1.99M, False: 181M]
  ------------------
  547|  1.99M|		if(yxml_isSP(ch))
  ------------------
  |  |  101|  1.99M|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 691k, False: 1.29M]
  |  |  |  Branch (101:36): [True: 615, False: 1.29M]
  |  |  |  Branch (101:49): [True: 77.3k, False: 1.22M]
  |  |  ------------------
  ------------------
  548|   769k|			return YXML_OK;
  549|  1.22M|		if(ch == (unsigned char)'/') {
  ------------------
  |  Branch (549:6): [True: 965, False: 1.21M]
  ------------------
  550|    965|			x->state = YXMLS_elem3;
  551|    965|			return YXML_OK;
  552|    965|		}
  553|  1.21M|		if(ch == (unsigned char)'>') {
  ------------------
  |  Branch (553:6): [True: 434, False: 1.21M]
  ------------------
  554|    434|			x->state = YXMLS_misc2;
  555|    434|			return YXML_OK;
  556|    434|		}
  557|  1.21M|		if(yxml_isNameStart(ch)) {
  ------------------
  |  |  106|  1.21M|#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_' || c >= 128)
  |  |  ------------------
  |  |  |  |  102|  2.43M|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:25): [True: 460k, False: 759k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (106:49): [True: 560, False: 758k]
  |  |  |  Branch (106:61): [True: 822, False: 758k]
  |  |  |  Branch (106:73): [True: 758k, False: 24]
  |  |  ------------------
  ------------------
  558|  1.21M|			x->state = YXMLS_attr0;
  559|  1.21M|			return yxml_attrstart(x, ch);
  560|  1.21M|		}
  561|     24|		break;
  562|  1.21M|	case YXMLS_elem2:
  ------------------
  |  Branch (562:2): [True: 1.21M, False: 181M]
  ------------------
  563|  1.21M|		if(yxml_isSP(ch)) {
  ------------------
  |  |  101|  1.21M|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 318k, False: 900k]
  |  |  |  Branch (101:36): [True: 634, False: 900k]
  |  |  |  Branch (101:49): [True: 899k, False: 603]
  |  |  ------------------
  ------------------
  564|  1.21M|			x->state = YXMLS_elem1;
  565|  1.21M|			return YXML_OK;
  566|  1.21M|		}
  567|    603|		if(ch == (unsigned char)'/') {
  ------------------
  |  Branch (567:6): [True: 368, False: 235]
  ------------------
  568|    368|			x->state = YXMLS_elem3;
  569|    368|			return YXML_OK;
  570|    368|		}
  571|    235|		if(ch == (unsigned char)'>') {
  ------------------
  |  Branch (571:6): [True: 216, False: 19]
  ------------------
  572|    216|			x->state = YXMLS_misc2;
  573|    216|			return YXML_OK;
  574|    216|		}
  575|     19|		break;
  576|  8.68M|	case YXMLS_elem3:
  ------------------
  |  Branch (576:2): [True: 8.68M, False: 174M]
  ------------------
  577|  8.68M|		if(ch == (unsigned char)'>') {
  ------------------
  |  Branch (577:6): [True: 8.68M, False: 9]
  ------------------
  578|  8.68M|			x->state = YXMLS_misc2;
  579|  8.68M|			return yxml_selfclose(x, ch);
  580|  8.68M|		}
  581|      9|		break;
  582|    788|	case YXMLS_enc0:
  ------------------
  |  Branch (582:2): [True: 788, False: 183M]
  ------------------
  583|    788|		if(yxml_isSP(ch))
  ------------------
  |  |  101|    788|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 195, False: 593]
  |  |  |  Branch (101:36): [True: 196, False: 397]
  |  |  |  Branch (101:49): [True: 195, False: 202]
  |  |  ------------------
  ------------------
  584|    586|			return YXML_OK;
  585|    202|		if(ch == (unsigned char)'=') {
  ------------------
  |  Branch (585:6): [True: 183, False: 19]
  ------------------
  586|    183|			x->state = YXMLS_enc1;
  587|    183|			return YXML_OK;
  588|    183|		}
  589|     19|		break;
  590|    743|	case YXMLS_enc1:
  ------------------
  |  Branch (590:2): [True: 743, False: 183M]
  ------------------
  591|    743|		if(yxml_isSP(ch))
  ------------------
  |  |  101|    743|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 194, False: 549]
  |  |  |  Branch (101:36): [True: 196, False: 353]
  |  |  |  Branch (101:49): [True: 195, False: 158]
  |  |  ------------------
  ------------------
  592|    585|			return YXML_OK;
  593|    158|		if(ch == (unsigned char)'\'' || ch == (unsigned char)'"') {
  ------------------
  |  Branch (593:6): [True: 60, False: 98]
  |  Branch (593:35): [True: 84, False: 14]
  ------------------
  594|    144|			x->state = YXMLS_enc2;
  595|    144|			x->quote = ch;
  596|    144|			return YXML_OK;
  597|    144|		}
  598|     14|		break;
  599|    142|	case YXMLS_enc2:
  ------------------
  |  Branch (599:2): [True: 142, False: 183M]
  ------------------
  600|    142|		if(yxml_isAlpha(ch)) {
  ------------------
  |  |  102|    142|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  ------------------
  |  |  |  Branch (102:25): [True: 136, False: 6]
  |  |  ------------------
  ------------------
  601|    136|			x->state = YXMLS_enc3;
  602|    136|			return YXML_OK;
  603|    136|		}
  604|      6|		break;
  605|  1.09k|	case YXMLS_enc3:
  ------------------
  |  Branch (605:2): [True: 1.09k, False: 183M]
  ------------------
  606|  1.09k|		if(yxml_isEncName(ch))
  ------------------
  |  |  105|  1.09k|#define yxml_isEncName(c) (yxml_isAlpha(c) || yxml_isNum(c) || c == '.' || c == '_' || c == '-')
  |  |  ------------------
  |  |  |  |  102|  2.19k|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:25): [True: 201, False: 898]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define yxml_isEncName(c) (yxml_isAlpha(c) || yxml_isNum(c) || c == '.' || c == '_' || c == '-')
  |  |  ------------------
  |  |  |  |  103|  1.99k|#define yxml_isNum(c) (c-'0' < 10)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:23): [True: 202, False: 696]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (105:64): [True: 195, False: 501]
  |  |  |  Branch (105:76): [True: 210, False: 291]
  |  |  |  Branch (105:88): [True: 196, False: 95]
  |  |  ------------------
  ------------------
  607|  1.00k|			return YXML_OK;
  608|     95|		if(x->quote == ch) {
  ------------------
  |  Branch (608:6): [True: 82, False: 13]
  ------------------
  609|     82|			x->state = YXMLS_xmldecl6;
  610|     82|			return YXML_OK;
  611|     82|		}
  612|     13|		break;
  613|  24.4k|	case YXMLS_etag0:
  ------------------
  |  Branch (613:2): [True: 24.4k, False: 183M]
  ------------------
  614|  24.4k|		if(yxml_isNameStart(ch)) {
  ------------------
  |  |  106|  24.4k|#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_' || c >= 128)
  |  |  ------------------
  |  |  |  |  102|  48.9k|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:25): [True: 12.8k, False: 11.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (106:49): [True: 297, False: 11.2k]
  |  |  |  Branch (106:61): [True: 355, False: 10.9k]
  |  |  |  Branch (106:73): [True: 10.9k, False: 15]
  |  |  ------------------
  ------------------
  615|  24.4k|			x->state = YXMLS_etag1;
  616|  24.4k|			return yxml_elemclose(x, ch);
  617|  24.4k|		}
  618|     15|		break;
  619|  86.0k|	case YXMLS_etag1:
  ------------------
  |  Branch (619:2): [True: 86.0k, False: 183M]
  ------------------
  620|  86.0k|		if(yxml_isName(ch))
  ------------------
  |  |  107|  86.0k|#define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  |  106|   172k|#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_' || c >= 128)
  |  |  |  |  ------------------
  |  |  |  |  |  |  102|   172k|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (102:25): [True: 55.9k, False: 30.1k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:49): [True: 205, False: 29.9k]
  |  |  |  |  |  Branch (106:61): [True: 309, False: 29.6k]
  |  |  |  |  |  Branch (106:73): [True: 336, False: 29.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  |  103|   115k|#define yxml_isNum(c) (c-'0' < 10)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:23): [True: 4.46k, False: 24.8k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (107:65): [True: 331, False: 24.5k]
  |  |  |  Branch (107:77): [True: 194, False: 24.3k]
  |  |  ------------------
  ------------------
  621|  61.7k|			return yxml_elemclose(x, ch);
  622|  24.3k|		if(yxml_isSP(ch)) {
  ------------------
  |  |  101|  24.3k|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 257, False: 24.0k]
  |  |  |  Branch (101:36): [True: 359, False: 23.7k]
  |  |  |  Branch (101:49): [True: 249, False: 23.4k]
  |  |  ------------------
  ------------------
  623|    865|			x->state = YXMLS_etag2;
  624|    865|			return yxml_elemcloseend(x, ch);
  625|    865|		}
  626|  23.4k|		if(ch == (unsigned char)'>') {
  ------------------
  |  Branch (626:6): [True: 23.4k, False: 20]
  ------------------
  627|  23.4k|			x->state = YXMLS_misc2;
  628|  23.4k|			return yxml_elemcloseend(x, ch);
  629|  23.4k|		}
  630|     20|		break;
  631|  3.67k|	case YXMLS_etag2:
  ------------------
  |  Branch (631:2): [True: 3.67k, False: 183M]
  ------------------
  632|  3.67k|		if(yxml_isSP(ch))
  ------------------
  |  |  101|  3.67k|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 200, False: 3.47k]
  |  |  |  Branch (101:36): [True: 2.24k, False: 1.23k]
  |  |  |  Branch (101:49): [True: 469, False: 765]
  |  |  ------------------
  ------------------
  633|  2.90k|			return YXML_OK;
  634|    765|		if(ch == (unsigned char)'>') {
  ------------------
  |  Branch (634:6): [True: 748, False: 17]
  ------------------
  635|    748|			x->state = YXMLS_misc2;
  636|    748|			return YXML_OK;
  637|    748|		}
  638|     17|		break;
  639|  8.31k|	case YXMLS_init:
  ------------------
  |  Branch (639:2): [True: 8.31k, False: 183M]
  ------------------
  640|  8.31k|		if(ch == (unsigned char)'\xef') {
  ------------------
  |  Branch (640:6): [True: 16, False: 8.30k]
  ------------------
  641|     16|			x->state = YXMLS_string;
  642|     16|			x->nextstate = YXMLS_misc0;
  643|     16|			x->string = (unsigned char *)"\xbb\xbf";
  644|     16|			return YXML_OK;
  645|     16|		}
  646|  8.30k|		if(yxml_isSP(ch)) {
  ------------------
  |  |  101|  8.30k|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 27, False: 8.27k]
  |  |  |  Branch (101:36): [True: 24, False: 8.25k]
  |  |  |  Branch (101:49): [True: 74, False: 8.17k]
  |  |  ------------------
  ------------------
  647|    125|			x->state = YXMLS_misc0;
  648|    125|			return YXML_OK;
  649|    125|		}
  650|  8.17k|		if(ch == (unsigned char)'<') {
  ------------------
  |  Branch (650:6): [True: 8.14k, False: 27]
  ------------------
  651|  8.14k|			x->state = YXMLS_le0;
  652|  8.14k|			return YXML_OK;
  653|  8.14k|		}
  654|     27|		break;
  655|  8.20k|	case YXMLS_le0:
  ------------------
  |  Branch (655:2): [True: 8.20k, False: 183M]
  ------------------
  656|  8.20k|		if(ch == (unsigned char)'!') {
  ------------------
  |  Branch (656:6): [True: 274, False: 7.93k]
  ------------------
  657|    274|			x->state = YXMLS_lee1;
  658|    274|			return YXML_OK;
  659|    274|		}
  660|  7.93k|		if(ch == (unsigned char)'?') {
  ------------------
  |  Branch (660:6): [True: 1.23k, False: 6.70k]
  ------------------
  661|  1.23k|			x->state = YXMLS_leq0;
  662|  1.23k|			return YXML_OK;
  663|  1.23k|		}
  664|  6.70k|		if(yxml_isNameStart(ch)) {
  ------------------
  |  |  106|  6.70k|#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_' || c >= 128)
  |  |  ------------------
  |  |  |  |  102|  13.4k|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:25): [True: 2.22k, False: 4.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (106:49): [True: 101, False: 4.37k]
  |  |  |  Branch (106:61): [True: 75, False: 4.30k]
  |  |  |  Branch (106:73): [True: 4.28k, False: 21]
  |  |  ------------------
  ------------------
  665|  6.68k|			x->state = YXMLS_elem0;
  666|  6.68k|			return yxml_elemstart(x, ch);
  667|  6.68k|		}
  668|     21|		break;
  669|  2.40k|	case YXMLS_le1:
  ------------------
  |  Branch (669:2): [True: 2.40k, False: 183M]
  ------------------
  670|  2.40k|		if(ch == (unsigned char)'!') {
  ------------------
  |  Branch (670:6): [True: 764, False: 1.64k]
  ------------------
  671|    764|			x->state = YXMLS_lee1;
  672|    764|			return YXML_OK;
  673|    764|		}
  674|  1.64k|		if(ch == (unsigned char)'?') {
  ------------------
  |  Branch (674:6): [True: 1.45k, False: 186]
  ------------------
  675|  1.45k|			x->state = YXMLS_pi0;
  676|  1.45k|			x->nextstate = YXMLS_misc1;
  677|  1.45k|			return YXML_OK;
  678|  1.45k|		}
  679|    186|		if(yxml_isNameStart(ch)) {
  ------------------
  |  |  106|    186|#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_' || c >= 128)
  |  |  ------------------
  |  |  |  |  102|    372|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:25): [True: 12, False: 174]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (106:49): [True: 3, False: 171]
  |  |  |  Branch (106:61): [True: 33, False: 138]
  |  |  |  Branch (106:73): [True: 125, False: 13]
  |  |  ------------------
  ------------------
  680|    173|			x->state = YXMLS_elem0;
  681|    173|			return yxml_elemstart(x, ch);
  682|    173|		}
  683|     13|		break;
  684|  8.73M|	case YXMLS_le2:
  ------------------
  |  Branch (684:2): [True: 8.73M, False: 174M]
  ------------------
  685|  8.73M|		if(ch == (unsigned char)'!') {
  ------------------
  |  Branch (685:6): [True: 3.83k, False: 8.72M]
  ------------------
  686|  3.83k|			x->state = YXMLS_lee2;
  687|  3.83k|			return YXML_OK;
  688|  3.83k|		}
  689|  8.72M|		if(ch == (unsigned char)'?') {
  ------------------
  |  Branch (689:6): [True: 1.47k, False: 8.72M]
  ------------------
  690|  1.47k|			x->state = YXMLS_pi0;
  691|  1.47k|			x->nextstate = YXMLS_misc2;
  692|  1.47k|			return YXML_OK;
  693|  1.47k|		}
  694|  8.72M|		if(ch == (unsigned char)'/') {
  ------------------
  |  Branch (694:6): [True: 24.4k, False: 8.70M]
  ------------------
  695|  24.4k|			x->state = YXMLS_etag0;
  696|  24.4k|			return YXML_OK;
  697|  24.4k|		}
  698|  8.70M|		if(yxml_isNameStart(ch)) {
  ------------------
  |  |  106|  8.70M|#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_' || c >= 128)
  |  |  ------------------
  |  |  |  |  102|  17.4M|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:25): [True: 30.9k, False: 8.67M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (106:49): [True: 718, False: 8.67M]
  |  |  |  Branch (106:61): [True: 756, False: 8.66M]
  |  |  |  Branch (106:73): [True: 8.66M, False: 20]
  |  |  ------------------
  ------------------
  699|  8.70M|			x->state = YXMLS_elem0;
  700|  8.70M|			return yxml_elemstart(x, ch);
  701|  8.70M|		}
  702|     20|		break;
  703|    619|	case YXMLS_le3:
  ------------------
  |  Branch (703:2): [True: 619, False: 183M]
  ------------------
  704|    619|		if(ch == (unsigned char)'!') {
  ------------------
  |  Branch (704:6): [True: 222, False: 397]
  ------------------
  705|    222|			x->state = YXMLS_comment0;
  706|    222|			x->nextstate = YXMLS_misc3;
  707|    222|			return YXML_OK;
  708|    222|		}
  709|    397|		if(ch == (unsigned char)'?') {
  ------------------
  |  Branch (709:6): [True: 388, False: 9]
  ------------------
  710|    388|			x->state = YXMLS_pi0;
  711|    388|			x->nextstate = YXMLS_misc3;
  712|    388|			return YXML_OK;
  713|    388|		}
  714|      9|		break;
  715|  1.03k|	case YXMLS_lee1:
  ------------------
  |  Branch (715:2): [True: 1.03k, False: 183M]
  ------------------
  716|  1.03k|		if(ch == (unsigned char)'-') {
  ------------------
  |  Branch (716:6): [True: 507, False: 523]
  ------------------
  717|    507|			x->state = YXMLS_comment1;
  718|    507|			x->nextstate = YXMLS_misc1;
  719|    507|			return YXML_OK;
  720|    507|		}
  721|    523|		if(ch == (unsigned char)'D') {
  ------------------
  |  Branch (721:6): [True: 514, False: 9]
  ------------------
  722|    514|			x->state = YXMLS_string;
  723|    514|			x->nextstate = YXMLS_dt0;
  724|    514|			x->string = (unsigned char *)"OCTYPE";
  725|    514|			return YXML_OK;
  726|    514|		}
  727|      9|		break;
  728|  3.82k|	case YXMLS_lee2:
  ------------------
  |  Branch (728:2): [True: 3.82k, False: 183M]
  ------------------
  729|  3.82k|		if(ch == (unsigned char)'-') {
  ------------------
  |  Branch (729:6): [True: 3.51k, False: 308]
  ------------------
  730|  3.51k|			x->state = YXMLS_comment1;
  731|  3.51k|			x->nextstate = YXMLS_misc2;
  732|  3.51k|			return YXML_OK;
  733|  3.51k|		}
  734|    308|		if(ch == (unsigned char)'[') {
  ------------------
  |  Branch (734:6): [True: 295, False: 13]
  ------------------
  735|    295|			x->state = YXMLS_string;
  736|    295|			x->nextstate = YXMLS_cd0;
  737|    295|			x->string = (unsigned char *)"CDATA[";
  738|    295|			return YXML_OK;
  739|    295|		}
  740|     13|		break;
  741|  1.23k|	case YXMLS_leq0:
  ------------------
  |  Branch (741:2): [True: 1.23k, False: 183M]
  ------------------
  742|  1.23k|		if(ch == (unsigned char)'x') {
  ------------------
  |  Branch (742:6): [True: 915, False: 315]
  ------------------
  743|    915|			x->state = YXMLS_xmldecl0;
  744|    915|			x->nextstate = YXMLS_misc1;
  745|    915|			return yxml_pistart(x, ch);
  746|    915|		}
  747|    315|		if(yxml_isNameStart(ch)) {
  ------------------
  |  |  106|    315|#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_' || c >= 128)
  |  |  ------------------
  |  |  |  |  102|    630|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:25): [True: 151, False: 164]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (106:49): [True: 24, False: 140]
  |  |  |  Branch (106:61): [True: 18, False: 122]
  |  |  |  Branch (106:73): [True: 110, False: 12]
  |  |  ------------------
  ------------------
  748|    303|			x->state = YXMLS_pi1;
  749|    303|			x->nextstate = YXMLS_misc1;
  750|    303|			return yxml_pistart(x, ch);
  751|    303|		}
  752|     12|		break;
  753|  1.21k|	case YXMLS_misc0:
  ------------------
  |  Branch (753:2): [True: 1.21k, False: 183M]
  ------------------
  754|  1.21k|		if(yxml_isSP(ch))
  ------------------
  |  |  101|  1.21k|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 194, False: 1.02k]
  |  |  |  Branch (101:36): [True: 196, False: 829]
  |  |  |  Branch (101:49): [True: 747, False: 82]
  |  |  ------------------
  ------------------
  755|  1.13k|			return YXML_OK;
  756|     82|		if(ch == (unsigned char)'<') {
  ------------------
  |  Branch (756:6): [True: 62, False: 20]
  ------------------
  757|     62|			x->state = YXMLS_le0;
  758|     62|			return YXML_OK;
  759|     62|		}
  760|     20|		break;
  761|  3.02k|	case YXMLS_misc1:
  ------------------
  |  Branch (761:2): [True: 3.02k, False: 183M]
  ------------------
  762|  3.02k|		if(yxml_isSP(ch))
  ------------------
  |  |  101|  3.02k|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 194, False: 2.82k]
  |  |  |  Branch (101:36): [True: 194, False: 2.63k]
  |  |  |  Branch (101:49): [True: 204, False: 2.43k]
  |  |  ------------------
  ------------------
  763|    592|			return YXML_OK;
  764|  2.43k|		if(ch == (unsigned char)'<') {
  ------------------
  |  Branch (764:6): [True: 2.41k, False: 18]
  ------------------
  765|  2.41k|			x->state = YXMLS_le1;
  766|  2.41k|			return YXML_OK;
  767|  2.41k|		}
  768|     18|		break;
  769|  95.8M|	case YXMLS_misc2:
  ------------------
  |  Branch (769:2): [True: 95.8M, False: 87.2M]
  ------------------
  770|  95.8M|		if(ch == (unsigned char)'<') {
  ------------------
  |  Branch (770:6): [True: 8.73M, False: 87.1M]
  ------------------
  771|  8.73M|			x->state = YXMLS_le2;
  772|  8.73M|			return YXML_OK;
  773|  8.73M|		}
  774|  87.1M|		if(ch == (unsigned char)'&') {
  ------------------
  |  Branch (774:6): [True: 3.20M, False: 83.9M]
  ------------------
  775|  3.20M|			x->state = YXMLS_misc2a;
  776|  3.20M|			return yxml_refstart(x, ch);
  777|  3.20M|		}
  778|  83.9M|		if(yxml_isChar(ch))
  ------------------
  |  |   99|  83.9M|#define yxml_isChar(c) 1
  |  |  ------------------
  |  |  |  Branch (99:24): [True: 83.9M, Folded]
  |  |  ------------------
  ------------------
  779|  83.9M|			return yxml_datacontent(x, ch);
  780|      0|		break;
  781|  15.8M|	case YXMLS_misc2a:
  ------------------
  |  Branch (781:2): [True: 15.8M, False: 167M]
  ------------------
  782|  15.8M|		if(yxml_isRef(ch))
  ------------------
  |  |  113|  15.8M|#define yxml_isRef(c) (yxml_isNum(c) || yxml_isAlpha(c) || c == '#')
  |  |  ------------------
  |  |  |  |  103|  31.7M|#define yxml_isNum(c) (c-'0' < 10)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:23): [True: 5.54k, False: 15.8M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define yxml_isRef(c) (yxml_isNum(c) || yxml_isAlpha(c) || c == '#')
  |  |  ------------------
  |  |  |  |  102|  31.7M|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:25): [True: 12.6M, False: 3.21M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (113:60): [True: 3.74k, False: 3.20M]
  |  |  ------------------
  ------------------
  783|  12.6M|			return yxml_ref(x, ch);
  784|  3.20M|		if(ch == (unsigned char)'\x3b') {
  ------------------
  |  Branch (784:6): [True: 3.20M, False: 15]
  ------------------
  785|  3.20M|			x->state = YXMLS_misc2;
  786|  3.20M|			return yxml_refcontent(x, ch);
  787|  3.20M|		}
  788|     15|		break;
  789|  1.22k|	case YXMLS_misc3:
  ------------------
  |  Branch (789:2): [True: 1.22k, False: 183M]
  ------------------
  790|  1.22k|		if(yxml_isSP(ch))
  ------------------
  |  |  101|  1.22k|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 194, False: 1.03k]
  |  |  |  Branch (101:36): [True: 194, False: 840]
  |  |  |  Branch (101:49): [True: 196, False: 644]
  |  |  ------------------
  ------------------
  791|    584|			return YXML_OK;
  792|    644|		if(ch == (unsigned char)'<') {
  ------------------
  |  Branch (792:6): [True: 625, False: 19]
  ------------------
  793|    625|			x->state = YXMLS_le3;
  794|    625|			return YXML_OK;
  795|    625|		}
  796|     19|		break;
  797|  3.47k|	case YXMLS_pi0:
  ------------------
  |  Branch (797:2): [True: 3.47k, False: 183M]
  ------------------
  798|  3.47k|		if(yxml_isNameStart(ch)) {
  ------------------
  |  |  106|  3.47k|#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_' || c >= 128)
  |  |  ------------------
  |  |  |  |  102|  6.95k|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (102:25): [True: 1.86k, False: 1.60k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (106:49): [True: 659, False: 950]
  |  |  |  Branch (106:61): [True: 413, False: 537]
  |  |  |  Branch (106:73): [True: 521, False: 16]
  |  |  ------------------
  ------------------
  799|  3.46k|			x->state = YXMLS_pi1;
  800|  3.46k|			return yxml_pistart(x, ch);
  801|  3.46k|		}
  802|     16|		break;
  803|  8.43k|	case YXMLS_pi1:
  ------------------
  |  Branch (803:2): [True: 8.43k, False: 183M]
  ------------------
  804|  8.43k|		if(yxml_isName(ch))
  ------------------
  |  |  107|  8.43k|#define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  |  106|  16.8k|#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_' || c >= 128)
  |  |  |  |  ------------------
  |  |  |  |  |  |  102|  16.8k|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (102:25): [True: 2.59k, False: 5.83k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:49): [True: 198, False: 5.63k]
  |  |  |  |  |  Branch (106:61): [True: 202, False: 5.43k]
  |  |  |  |  |  Branch (106:73): [True: 936, False: 4.49k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  |  103|  12.9k|#define yxml_isNum(c) (c-'0' < 10)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:23): [True: 297, False: 4.20k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (107:65): [True: 200, False: 4.00k]
  |  |  |  Branch (107:77): [True: 206, False: 3.79k]
  |  |  ------------------
  ------------------
  805|  4.63k|			return yxml_piname(x, ch);
  806|  3.79k|		if(ch == (unsigned char)'?') {
  ------------------
  |  Branch (806:6): [True: 2.45k, False: 1.34k]
  ------------------
  807|  2.45k|			x->state = YXMLS_pi4;
  808|  2.45k|			return yxml_pinameend(x, ch);
  809|  2.45k|		}
  810|  1.34k|		if(yxml_isSP(ch)) {
  ------------------
  |  |  101|  1.34k|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 449, False: 896]
  |  |  |  Branch (101:36): [True: 293, False: 603]
  |  |  |  Branch (101:49): [True: 579, False: 24]
  |  |  ------------------
  ------------------
  811|  1.32k|			x->state = YXMLS_pi2;
  812|  1.32k|			return yxml_pinameend(x, ch);
  813|  1.32k|		}
  814|     24|		break;
  815|  1.93k|	case YXMLS_pi2:
  ------------------
  |  Branch (815:2): [True: 1.93k, False: 183M]
  ------------------
  816|  1.93k|		if(ch == (unsigned char)'?') {
  ------------------
  |  Branch (816:6): [True: 1.64k, False: 284]
  ------------------
  817|  1.64k|			x->state = YXMLS_pi3;
  818|  1.64k|			return YXML_OK;
  819|  1.64k|		}
  820|    284|		if(yxml_isChar(ch))
  ------------------
  |  |   99|    284|#define yxml_isChar(c) 1
  |  |  ------------------
  |  |  |  Branch (99:24): [True: 284, Folded]
  |  |  ------------------
  ------------------
  821|    284|			return yxml_datapi1(x, ch);
  822|      0|		break;
  823|  1.63k|	case YXMLS_pi3:
  ------------------
  |  Branch (823:2): [True: 1.63k, False: 183M]
  ------------------
  824|  1.63k|		if(ch == (unsigned char)'>') {
  ------------------
  |  Branch (824:6): [True: 1.24k, False: 389]
  ------------------
  825|  1.24k|			x->state = x->nextstate;
  826|  1.24k|			return yxml_pivalend(x, ch);
  827|  1.24k|		}
  828|    389|		if(yxml_isChar(ch)) {
  ------------------
  |  |   99|    389|#define yxml_isChar(c) 1
  |  |  ------------------
  |  |  |  Branch (99:24): [True: 389, Folded]
  |  |  ------------------
  ------------------
  829|    389|			x->state = YXMLS_pi2;
  830|    389|			return yxml_datapi2(x, ch);
  831|    389|		}
  832|      0|		break;
  833|  2.42k|	case YXMLS_pi4:
  ------------------
  |  Branch (833:2): [True: 2.42k, False: 183M]
  ------------------
  834|  2.42k|		if(ch == (unsigned char)'>') {
  ------------------
  |  Branch (834:6): [True: 2.41k, False: 8]
  ------------------
  835|  2.41k|			x->state = x->nextstate;
  836|  2.41k|			return yxml_pivalend(x, ch);
  837|  2.41k|		}
  838|      8|		break;
  839|    717|	case YXMLS_std0:
  ------------------
  |  Branch (839:2): [True: 717, False: 183M]
  ------------------
  840|    717|		if(yxml_isSP(ch))
  ------------------
  |  |  101|    717|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 205, False: 512]
  |  |  |  Branch (101:36): [True: 196, False: 316]
  |  |  |  Branch (101:49): [True: 200, False: 116]
  |  |  ------------------
  ------------------
  841|    601|			return YXML_OK;
  842|    116|		if(ch == (unsigned char)'=') {
  ------------------
  |  Branch (842:6): [True: 101, False: 15]
  ------------------
  843|    101|			x->state = YXMLS_std1;
  844|    101|			return YXML_OK;
  845|    101|		}
  846|     15|		break;
  847|    663|	case YXMLS_std1:
  ------------------
  |  Branch (847:2): [True: 663, False: 183M]
  ------------------
  848|    663|		if(yxml_isSP(ch))
  ------------------
  |  |  101|    663|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 196, False: 467]
  |  |  |  Branch (101:36): [True: 194, False: 273]
  |  |  |  Branch (101:49): [True: 197, False: 76]
  |  |  ------------------
  ------------------
  849|    587|			return YXML_OK;
  850|     76|		if(ch == (unsigned char)'\'' || ch == (unsigned char)'"') {
  ------------------
  |  Branch (850:6): [True: 20, False: 56]
  |  Branch (850:35): [True: 48, False: 8]
  ------------------
  851|     68|			x->state = YXMLS_std2;
  852|     68|			x->quote = ch;
  853|     68|			return YXML_OK;
  854|     68|		}
  855|      8|		break;
  856|     66|	case YXMLS_std2:
  ------------------
  |  Branch (856:2): [True: 66, False: 183M]
  ------------------
  857|     66|		if(ch == (unsigned char)'y') {
  ------------------
  |  Branch (857:6): [True: 3, False: 63]
  ------------------
  858|      3|			x->state = YXMLS_string;
  859|      3|			x->nextstate = YXMLS_std3;
  860|      3|			x->string = (unsigned char *)"es";
  861|      3|			return YXML_OK;
  862|      3|		}
  863|     63|		if(ch == (unsigned char)'n') {
  ------------------
  |  Branch (863:6): [True: 54, False: 9]
  ------------------
  864|     54|			x->state = YXMLS_string;
  865|     54|			x->nextstate = YXMLS_std3;
  866|     54|			x->string = (unsigned char *)"o";
  867|     54|			return YXML_OK;
  868|     54|		}
  869|      9|		break;
  870|     54|	case YXMLS_std3:
  ------------------
  |  Branch (870:2): [True: 54, False: 183M]
  ------------------
  871|     54|		if(x->quote == ch) {
  ------------------
  |  Branch (871:6): [True: 52, False: 2]
  ------------------
  872|     52|			x->state = YXMLS_xmldecl8;
  873|     52|			return YXML_OK;
  874|     52|		}
  875|      2|		break;
  876|  1.10k|	case YXMLS_ver0:
  ------------------
  |  Branch (876:2): [True: 1.10k, False: 183M]
  ------------------
  877|  1.10k|		if(yxml_isSP(ch))
  ------------------
  |  |  101|  1.10k|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 194, False: 913]
  |  |  |  Branch (101:36): [True: 194, False: 719]
  |  |  |  Branch (101:49): [True: 194, False: 525]
  |  |  ------------------
  ------------------
  878|    582|			return YXML_OK;
  879|    525|		if(ch == (unsigned char)'=') {
  ------------------
  |  Branch (879:6): [True: 511, False: 14]
  ------------------
  880|    511|			x->state = YXMLS_ver1;
  881|    511|			return YXML_OK;
  882|    511|		}
  883|     14|		break;
  884|  1.07k|	case YXMLS_ver1:
  ------------------
  |  Branch (884:2): [True: 1.07k, False: 183M]
  ------------------
  885|  1.07k|		if(yxml_isSP(ch))
  ------------------
  |  |  101|  1.07k|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 196, False: 874]
  |  |  |  Branch (101:36): [True: 194, False: 680]
  |  |  |  Branch (101:49): [True: 194, False: 486]
  |  |  ------------------
  ------------------
  886|    584|			return YXML_OK;
  887|    486|		if(ch == (unsigned char)'\'' || ch == (unsigned char)'"') {
  ------------------
  |  Branch (887:6): [True: 4, False: 482]
  |  Branch (887:35): [True: 465, False: 17]
  ------------------
  888|    469|			x->state = YXMLS_string;
  889|    469|			x->quote = ch;
  890|    469|			x->nextstate = YXMLS_ver2;
  891|    469|			x->string = (unsigned char *)"1.";
  892|    469|			return YXML_OK;
  893|    469|		}
  894|     17|		break;
  895|    466|	case YXMLS_ver2:
  ------------------
  |  Branch (895:2): [True: 466, False: 183M]
  ------------------
  896|    466|		if(yxml_isNum(ch)) {
  ------------------
  |  |  103|    466|#define yxml_isNum(c) (c-'0' < 10)
  |  |  ------------------
  |  |  |  Branch (103:23): [True: 459, False: 7]
  |  |  ------------------
  ------------------
  897|    459|			x->state = YXMLS_ver3;
  898|    459|			return YXML_OK;
  899|    459|		}
  900|      7|		break;
  901|    644|	case YXMLS_ver3:
  ------------------
  |  Branch (901:2): [True: 644, False: 183M]
  ------------------
  902|    644|		if(yxml_isNum(ch))
  ------------------
  |  |  103|    644|#define yxml_isNum(c) (c-'0' < 10)
  |  |  ------------------
  |  |  |  Branch (103:23): [True: 194, False: 450]
  |  |  ------------------
  ------------------
  903|    194|			return YXML_OK;
  904|    450|		if(x->quote == ch) {
  ------------------
  |  Branch (904:6): [True: 440, False: 10]
  ------------------
  905|    440|			x->state = YXMLS_xmldecl4;
  906|    440|			return YXML_OK;
  907|    440|		}
  908|     10|		break;
  909|    914|	case YXMLS_xmldecl0:
  ------------------
  |  Branch (909:2): [True: 914, False: 183M]
  ------------------
  910|    914|		if(ch == (unsigned char)'m') {
  ------------------
  |  Branch (910:6): [True: 786, False: 128]
  ------------------
  911|    786|			x->state = YXMLS_xmldecl1;
  912|    786|			return yxml_piname(x, ch);
  913|    786|		}
  914|    128|		if(yxml_isName(ch)) {
  ------------------
  |  |  107|    128|#define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  |  106|    256|#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_' || c >= 128)
  |  |  |  |  ------------------
  |  |  |  |  |  |  102|    256|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (102:25): [True: 29, False: 99]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:49): [True: 4, False: 95]
  |  |  |  |  |  Branch (106:61): [True: 3, False: 92]
  |  |  |  |  |  Branch (106:73): [True: 12, False: 80]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  |  103|    208|#define yxml_isNum(c) (c-'0' < 10)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:23): [True: 10, False: 70]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (107:65): [True: 3, False: 67]
  |  |  |  Branch (107:77): [True: 3, False: 64]
  |  |  ------------------
  ------------------
  915|     64|			x->state = YXMLS_pi1;
  916|     64|			return yxml_piname(x, ch);
  917|     64|		}
  918|     64|		if(ch == (unsigned char)'?') {
  ------------------
  |  Branch (918:6): [True: 18, False: 46]
  ------------------
  919|     18|			x->state = YXMLS_pi4;
  920|     18|			return yxml_pinameend(x, ch);
  921|     18|		}
  922|     46|		if(yxml_isSP(ch)) {
  ------------------
  |  |  101|     46|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 8, False: 38]
  |  |  |  Branch (101:36): [True: 4, False: 34]
  |  |  |  Branch (101:49): [True: 9, False: 25]
  |  |  ------------------
  ------------------
  923|     21|			x->state = YXMLS_pi2;
  924|     21|			return yxml_pinameend(x, ch);
  925|     21|		}
  926|     25|		break;
  927|    785|	case YXMLS_xmldecl1:
  ------------------
  |  Branch (927:2): [True: 785, False: 183M]
  ------------------
  928|    785|		if(ch == (unsigned char)'l') {
  ------------------
  |  Branch (928:6): [True: 696, False: 89]
  ------------------
  929|    696|			x->state = YXMLS_xmldecl2;
  930|    696|			return yxml_piname(x, ch);
  931|    696|		}
  932|     89|		if(yxml_isName(ch)) {
  ------------------
  |  |  107|     89|#define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  |  106|    178|#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_' || c >= 128)
  |  |  |  |  ------------------
  |  |  |  |  |  |  102|    178|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (102:25): [True: 18, False: 71]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:49): [True: 4, False: 67]
  |  |  |  |  |  Branch (106:61): [True: 3, False: 64]
  |  |  |  |  |  Branch (106:73): [True: 15, False: 49]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  |  103|    138|#define yxml_isNum(c) (c-'0' < 10)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:23): [True: 7, False: 42]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (107:65): [True: 3, False: 39]
  |  |  |  Branch (107:77): [True: 3, False: 36]
  |  |  ------------------
  ------------------
  933|     53|			x->state = YXMLS_pi1;
  934|     53|			return yxml_piname(x, ch);
  935|     53|		}
  936|     36|		if(ch == (unsigned char)'?') {
  ------------------
  |  Branch (936:6): [True: 3, False: 33]
  ------------------
  937|      3|			x->state = YXMLS_pi4;
  938|      3|			return yxml_pinameend(x, ch);
  939|      3|		}
  940|     33|		if(yxml_isSP(ch)) {
  ------------------
  |  |  101|     33|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 3, False: 30]
  |  |  |  Branch (101:36): [True: 4, False: 26]
  |  |  |  Branch (101:49): [True: 4, False: 22]
  |  |  ------------------
  ------------------
  941|     11|			x->state = YXMLS_pi2;
  942|     11|			return yxml_pinameend(x, ch);
  943|     11|		}
  944|     22|		break;
  945|    695|	case YXMLS_xmldecl2:
  ------------------
  |  Branch (945:2): [True: 695, False: 183M]
  ------------------
  946|    695|		if(yxml_isSP(ch)) {
  ------------------
  |  |  101|    695|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 570, False: 125]
  |  |  |  Branch (101:36): [True: 11, False: 114]
  |  |  |  Branch (101:49): [True: 12, False: 102]
  |  |  ------------------
  ------------------
  947|    593|			x->state = YXMLS_xmldecl3;
  948|    593|			return yxml_piabort(x, ch);
  949|    593|		}
  950|    102|		if(yxml_isName(ch)) {
  ------------------
  |  |  107|    102|#define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  |  106|    204|#define yxml_isNameStart(c) (yxml_isAlpha(c) || c == ':' || c == '_' || c >= 128)
  |  |  |  |  ------------------
  |  |  |  |  |  |  102|    204|#define yxml_isAlpha(c) ((c|32)-'a' < 26)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (102:25): [True: 14, False: 88]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (106:49): [True: 3, False: 85]
  |  |  |  |  |  Branch (106:61): [True: 3, False: 82]
  |  |  |  |  |  Branch (106:73): [True: 56, False: 26]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |               #define yxml_isName(c) (yxml_isNameStart(c) || yxml_isNum(c) || c == '-' || c == '.')
  |  |  ------------------
  |  |  |  |  103|    128|#define yxml_isNum(c) (c-'0' < 10)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:23): [True: 5, False: 21]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (107:65): [True: 5, False: 16]
  |  |  |  Branch (107:77): [True: 3, False: 13]
  |  |  ------------------
  ------------------
  951|     89|			x->state = YXMLS_pi1;
  952|     89|			return yxml_piname(x, ch);
  953|     89|		}
  954|     13|		break;
  955|  1.14k|	case YXMLS_xmldecl3:
  ------------------
  |  Branch (955:2): [True: 1.14k, False: 183M]
  ------------------
  956|  1.14k|		if(yxml_isSP(ch))
  ------------------
  |  |  101|  1.14k|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 195, False: 954]
  |  |  |  Branch (101:36): [True: 194, False: 760]
  |  |  |  Branch (101:49): [True: 194, False: 566]
  |  |  ------------------
  ------------------
  957|    583|			return YXML_OK;
  958|    566|		if(ch == (unsigned char)'v') {
  ------------------
  |  Branch (958:6): [True: 550, False: 16]
  ------------------
  959|    550|			x->state = YXMLS_string;
  960|    550|			x->nextstate = YXMLS_ver0;
  961|    550|			x->string = (unsigned char *)"ersion";
  962|    550|			return YXML_OK;
  963|    550|		}
  964|     16|		break;
  965|    439|	case YXMLS_xmldecl4:
  ------------------
  |  Branch (965:2): [True: 439, False: 183M]
  ------------------
  966|    439|		if(yxml_isSP(ch)) {
  ------------------
  |  |  101|    439|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 356, False: 83]
  |  |  |  Branch (101:36): [True: 11, False: 72]
  |  |  |  Branch (101:49): [True: 50, False: 22]
  |  |  ------------------
  ------------------
  967|    417|			x->state = YXMLS_xmldecl5;
  968|    417|			return YXML_OK;
  969|    417|		}
  970|     22|		if(ch == (unsigned char)'?') {
  ------------------
  |  Branch (970:6): [True: 12, False: 10]
  ------------------
  971|     12|			x->state = YXMLS_xmldecl9;
  972|     12|			return YXML_OK;
  973|     12|		}
  974|     10|		break;
  975|    975|	case YXMLS_xmldecl5:
  ------------------
  |  Branch (975:2): [True: 975, False: 183M]
  ------------------
  976|    975|		if(yxml_isSP(ch))
  ------------------
  |  |  101|    975|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 195, False: 780]
  |  |  |  Branch (101:36): [True: 195, False: 585]
  |  |  |  Branch (101:49): [True: 195, False: 390]
  |  |  ------------------
  ------------------
  977|    585|			return YXML_OK;
  978|    390|		if(ch == (unsigned char)'?') {
  ------------------
  |  Branch (978:6): [True: 7, False: 383]
  ------------------
  979|      7|			x->state = YXMLS_xmldecl9;
  980|      7|			return YXML_OK;
  981|      7|		}
  982|    383|		if(ch == (unsigned char)'e') {
  ------------------
  |  Branch (982:6): [True: 227, False: 156]
  ------------------
  983|    227|			x->state = YXMLS_string;
  984|    227|			x->nextstate = YXMLS_enc0;
  985|    227|			x->string = (unsigned char *)"ncoding";
  986|    227|			return YXML_OK;
  987|    227|		}
  988|    156|		if(ch == (unsigned char)'s') {
  ------------------
  |  Branch (988:6): [True: 137, False: 19]
  ------------------
  989|    137|			x->state = YXMLS_string;
  990|    137|			x->nextstate = YXMLS_std0;
  991|    137|			x->string = (unsigned char *)"tandalone";
  992|    137|			return YXML_OK;
  993|    137|		}
  994|     19|		break;
  995|     81|	case YXMLS_xmldecl6:
  ------------------
  |  Branch (995:2): [True: 81, False: 183M]
  ------------------
  996|     81|		if(yxml_isSP(ch)) {
  ------------------
  |  |  101|     81|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 22, False: 59]
  |  |  |  Branch (101:36): [True: 11, False: 48]
  |  |  |  Branch (101:49): [True: 24, False: 24]
  |  |  ------------------
  ------------------
  997|     57|			x->state = YXMLS_xmldecl7;
  998|     57|			return YXML_OK;
  999|     57|		}
 1000|     24|		if(ch == (unsigned char)'?') {
  ------------------
  |  Branch (1000:6): [True: 5, False: 19]
  ------------------
 1001|      5|			x->state = YXMLS_xmldecl9;
 1002|      5|			return YXML_OK;
 1003|      5|		}
 1004|     19|		break;
 1005|    780|	case YXMLS_xmldecl7:
  ------------------
  |  Branch (1005:2): [True: 780, False: 183M]
  ------------------
 1006|    780|		if(yxml_isSP(ch))
  ------------------
  |  |  101|    780|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 352, False: 428]
  |  |  |  Branch (101:36): [True: 196, False: 232]
  |  |  |  Branch (101:49): [True: 202, False: 30]
  |  |  ------------------
  ------------------
 1007|    750|			return YXML_OK;
 1008|     30|		if(ch == (unsigned char)'?') {
  ------------------
  |  Branch (1008:6): [True: 7, False: 23]
  ------------------
 1009|      7|			x->state = YXMLS_xmldecl9;
 1010|      7|			return YXML_OK;
 1011|      7|		}
 1012|     23|		if(ch == (unsigned char)'s') {
  ------------------
  |  Branch (1012:6): [True: 5, False: 18]
  ------------------
 1013|      5|			x->state = YXMLS_string;
 1014|      5|			x->nextstate = YXMLS_std0;
 1015|      5|			x->string = (unsigned char *)"tandalone";
 1016|      5|			return YXML_OK;
 1017|      5|		}
 1018|     18|		break;
 1019|    641|	case YXMLS_xmldecl8:
  ------------------
  |  Branch (1019:2): [True: 641, False: 183M]
  ------------------
 1020|    641|		if(yxml_isSP(ch))
  ------------------
  |  |  101|    641|#define yxml_isSP(c) (c == 0x20 || c == 0x09 || c == 0x0a)
  |  |  ------------------
  |  |  |  Branch (101:23): [True: 197, False: 444]
  |  |  |  Branch (101:36): [True: 212, False: 232]
  |  |  |  Branch (101:49): [True: 205, False: 27]
  |  |  ------------------
  ------------------
 1021|    614|			return YXML_OK;
 1022|     27|		if(ch == (unsigned char)'?') {
  ------------------
  |  Branch (1022:6): [True: 9, False: 18]
  ------------------
 1023|      9|			x->state = YXMLS_xmldecl9;
 1024|      9|			return YXML_OK;
 1025|      9|		}
 1026|     18|		break;
 1027|     35|	case YXMLS_xmldecl9:
  ------------------
  |  Branch (1027:2): [True: 35, False: 183M]
  ------------------
 1028|     35|		if(ch == (unsigned char)'>') {
  ------------------
  |  Branch (1028:6): [True: 31, False: 4]
  ------------------
 1029|     31|			x->state = YXMLS_misc1;
 1030|     31|			return YXML_OK;
 1031|     31|		}
 1032|      4|		break;
 1033|   183M|	}
 1034|    790|	return YXML_ESYN;
 1035|   183M|}
yxml_eof:
 1037|  7.49k|yxml_ret_t yxml_eof(yxml_t *x) {
 1038|  7.49k|	if(x->state != YXMLS_misc3 &&
  ------------------
  |  Branch (1038:5): [True: 2.36k, False: 5.12k]
  ------------------
 1039|  2.36k|	   !(x->contentmode && x->state == YXMLS_misc2 && x->stacklen == 0))
  ------------------
  |  Branch (1039:7): [True: 343, False: 2.02k]
  |  Branch (1039:25): [True: 343, False: 0]
  |  Branch (1039:52): [True: 343, False: 0]
  ------------------
 1040|  2.02k|		return YXML_EEOF;
 1041|  5.46k|	return YXML_OK;
 1042|  7.49k|}
yxml.c:yxml_attrname:
  243|  33.4M|static inline yxml_ret_t yxml_attrname   (yxml_t *x, unsigned ch) { return yxml_pushstackc(x, ch); }
yxml.c:yxml_pushstackc:
  195|  33.8M|static yxml_ret_t yxml_pushstackc(yxml_t *x, unsigned ch) {
  196|  33.8M|	if(x->stacklen+1 >= x->stacksize)
  ------------------
  |  Branch (196:5): [True: 3, False: 33.8M]
  ------------------
  197|      3|		return YXML_ESTACK;
  198|  33.8M|	x->stack[x->stacklen] = (unsigned char)ch;
  199|  33.8M|	x->stacklen++;
  200|  33.8M|	x->stack[x->stacklen] = 0;
  201|  33.8M|	return YXML_OK;
  202|  33.8M|}
yxml.c:yxml_attrnameend:
  244|  1.21M|static inline yxml_ret_t yxml_attrnameend(yxml_t *x, unsigned ch) { return YXML_ATTRSTART; }
yxml.c:yxml_dataattr:
  177|  3.40M|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|  3.40M|	yxml_setchar(x->data, ch == 0x9 || ch == 0xa ? 0x20 : ch);
  ------------------
  |  Branch (179:24): [True: 677, False: 3.40M]
  |  Branch (179:37): [True: 171k, False: 3.23M]
  ------------------
  180|  3.40M|	x->data[1] = 0;
  181|  3.40M|	return YXML_ATTRVAL;
  182|  3.40M|}
yxml.c:yxml_setchar:
  118|   103M|static inline void yxml_setchar(char *dest, unsigned ch) {
  119|   103M|	*(unsigned char *)dest = (unsigned char)ch;
  120|   103M|}
yxml.c:yxml_refstart:
  255|  3.20M|static inline yxml_ret_t yxml_refstart(yxml_t *x, unsigned ch) {
  256|  3.20M|	memset(x->data, 0, sizeof(x->data));
  257|  3.20M|	x->reflen = 0;
  258|  3.20M|	return YXML_OK;
  259|  3.20M|}
yxml.c:yxml_attrvalend:
  245|  1.21M|static inline yxml_ret_t yxml_attrvalend (yxml_t *x, unsigned ch) { yxml_popstack(x); return YXML_ATTREND; }
yxml.c:yxml_popstack:
  204|  9.92M|static void yxml_popstack(yxml_t *x) {
  205|  9.92M|	do
  206|  53.6M|		x->stacklen--;
  207|  53.6M|	while(x->stack[x->stacklen]);
  ------------------
  |  Branch (207:8): [True: 43.7M, False: 9.92M]
  ------------------
  208|  9.92M|}
yxml.c:yxml_ref:
  261|  12.6M|static yxml_ret_t yxml_ref(yxml_t *x, unsigned ch) {
  262|  12.6M|	if(x->reflen >= sizeof(x->data)-1)
  ------------------
  |  Branch (262:5): [True: 20, False: 12.6M]
  ------------------
  263|     20|		return YXML_EREF;
  264|  12.6M|	yxml_setchar(x->data+x->reflen, ch);
  265|  12.6M|	x->reflen++;
  266|  12.6M|	return YXML_OK;
  267|  12.6M|}
yxml.c:yxml_refattrval:
  300|    817|static inline yxml_ret_t yxml_refattrval(yxml_t *x, unsigned ch) { return yxml_refend(x, YXML_ATTRVAL); }
yxml.c:yxml_refend:
  269|  3.20M|static yxml_ret_t yxml_refend(yxml_t *x, yxml_ret_t ret) {
  270|  3.20M|	unsigned char *r = (unsigned char *)x->data;
  271|  3.20M|	unsigned ch = 0;
  272|  3.20M|	if(*r == '#') {
  ------------------
  |  Branch (272:5): [True: 4.35k, False: 3.20M]
  ------------------
  273|  4.35k|		if(r[1] == 'x')
  ------------------
  |  Branch (273:6): [True: 678, False: 3.67k]
  ------------------
  274|  2.34k|			for(r += 2; yxml_isHex((unsigned)*r); r++)
  ------------------
  |  |  104|  2.34k|#define yxml_isHex(c) (yxml_isNum(c) || (c|32)-'a' < 6)
  |  |  ------------------
  |  |  |  |  103|  4.69k|#define yxml_isNum(c) (c-'0' < 10)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (103:23): [True: 535, False: 1.81k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (104:41): [True: 1.13k, False: 678]
  |  |  ------------------
  ------------------
  275|  1.66k|				ch = (ch<<4) + (*r <= '9' ? *r-'0' : (*r|32)-'a' + 10);
  ------------------
  |  Branch (275:21): [True: 535, False: 1.13k]
  ------------------
  276|  3.67k|		else
  277|  9.46k|			for(r++; yxml_isNum((unsigned)*r); r++)
  ------------------
  |  |  103|  9.46k|#define yxml_isNum(c) (c-'0' < 10)
  |  |  ------------------
  |  |  |  Branch (103:23): [True: 5.78k, False: 3.67k]
  |  |  ------------------
  ------------------
  278|  5.78k|				ch = (ch*10) + (*r-'0');
  279|  4.35k|		if(*r)
  ------------------
  |  Branch (279:6): [True: 11, False: 4.34k]
  ------------------
  280|     11|			ch = 0;
  281|  3.20M|	} else {
  282|  3.20M|		uint64_t i = INTFROM5CHARS(r[0], r[1], r[2], r[3], r[4]);
  ------------------
  |  |  115|  3.20M|#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|  3.20M|		ch =
  284|  3.20M|			i == INTFROM5CHARS('l','t', 0,  0, 0) ? '<' :
  ------------------
  |  |  115|  3.20M|#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: 797, False: 3.20M]
  ------------------
  285|  3.20M|			i == INTFROM5CHARS('g','t', 0,  0, 0) ? '>' :
  ------------------
  |  |  115|  3.20M|#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: 76.2k, False: 3.12M]
  ------------------
  286|  3.20M|			i == INTFROM5CHARS('a','m','p', 0, 0) ? '&' :
  ------------------
  |  |  115|  3.12M|#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: 340, False: 3.12M]
  ------------------
  287|  3.12M|			i == INTFROM5CHARS('a','p','o','s',0) ? '\'':
  ------------------
  |  |  115|  3.12M|#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: 465k, False: 2.66M]
  ------------------
  288|  3.12M|			i == INTFROM5CHARS('q','u','o','t',0) ? '"' : 0;
  ------------------
  |  |  115|  2.66M|#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: 2.66M, False: 154]
  ------------------
  289|  3.20M|	}
  290|       |
  291|       |	/* Codepoints not allowed in the XML 1.1 definition of a Char */
  292|  3.20M|	if(!ch || ch > 0x10FFFF || ch == 0xFFFE || ch == 0xFFFF || (ch-0xDFFF) < 0x7FF)
  ------------------
  |  Branch (292:5): [True: 182, False: 3.20M]
  |  Branch (292:12): [True: 0, False: 3.20M]
  |  Branch (292:29): [True: 1, False: 3.20M]
  |  Branch (292:45): [True: 1, False: 3.20M]
  |  Branch (292:61): [True: 11, False: 3.20M]
  ------------------
  293|    195|		return YXML_EREF;
  294|  3.20M|	yxml_setutf8(x->data, ch);
  295|       |	x->isReference = true;
  296|  3.20M|	return ret;
  297|  3.20M|}
yxml.c:yxml_setutf8:
  124|  3.20M|static void yxml_setutf8(char *dest, unsigned ch) {
  125|  3.20M|	if(ch <= 0x007F)
  ------------------
  |  Branch (125:5): [True: 3.20M, False: 938]
  ------------------
  126|  3.20M|		yxml_setchar(dest++, ch);
  127|    938|	else if(ch <= 0x07FF) {
  ------------------
  |  Branch (127:10): [True: 253, False: 685]
  ------------------
  128|    253|		yxml_setchar(dest++, 0xC0 | (ch>>6));
  129|    253|		yxml_setchar(dest++, 0x80 | (ch & 0x3F));
  130|    685|	} else if(ch <= 0xFFFF) {
  ------------------
  |  Branch (130:12): [True: 310, False: 375]
  ------------------
  131|    310|		yxml_setchar(dest++, 0xE0 | (ch>>12));
  132|    310|		yxml_setchar(dest++, 0x80 | ((ch>>6) & 0x3F));
  133|    310|		yxml_setchar(dest++, 0x80 | (ch & 0x3F));
  134|    375|	} else {
  135|    375|		yxml_setchar(dest++, 0xF0 | (ch>>18));
  136|    375|		yxml_setchar(dest++, 0x80 | ((ch>>12) & 0x3F));
  137|    375|		yxml_setchar(dest++, 0x80 | ((ch>>6) & 0x3F));
  138|    375|		yxml_setchar(dest++, 0x80 | (ch & 0x3F));
  139|    375|	}
  140|  3.20M|	*dest = 0;
  141|  3.20M|}
yxml.c:yxml_datacontent:
  143|  83.9M|static inline yxml_ret_t yxml_datacontent(yxml_t *x, unsigned ch) {
  144|  83.9M|	yxml_setchar(x->data, ch);
  145|  83.9M|	x->data[1] = 0;
  146|  83.9M|	return YXML_CONTENT;
  147|  83.9M|}
yxml.c:yxml_datacd1:
  162|    239|static inline yxml_ret_t yxml_datacd1(yxml_t *x, unsigned ch) {
  163|    239|	x->data[0] = ']';
  164|    239|	yxml_setchar(x->data+1, ch);
  165|    239|	x->data[2] = 0;
  166|    239|	return YXML_CONTENT;
  167|    239|}
yxml.c:yxml_datacd2:
  169|    233|static inline yxml_ret_t yxml_datacd2(yxml_t *x, unsigned ch) {
  170|    233|	x->data[0] = ']';
  171|    233|	x->data[1] = ']';
  172|    233|	yxml_setchar(x->data+2, ch);
  173|    233|	x->data[3] = 0;
  174|    233|	return YXML_CONTENT;
  175|    233|}
yxml.c:yxml_elemname:
  211|   326k|static inline yxml_ret_t yxml_elemname   (yxml_t *x, unsigned ch) { return yxml_pushstackc(x, ch); }
yxml.c:yxml_elemnameend:
  212|  8.70M|static inline yxml_ret_t yxml_elemnameend(yxml_t *x, unsigned ch) { return YXML_ELEMSTART; }
yxml.c:yxml_attrstart:
  242|  1.21M|static inline yxml_ret_t yxml_attrstart  (yxml_t *x, unsigned ch) { return yxml_pushstack(x, &x->attr, ch); }
yxml.c:yxml_pushstack:
  184|  9.93M|static yxml_ret_t yxml_pushstack(yxml_t *x, char **res, unsigned ch) {
  185|  9.93M|	if(x->stacklen+2 >= x->stacksize)
  ------------------
  |  Branch (185:5): [True: 5, False: 9.93M]
  ------------------
  186|      5|		return YXML_ESTACK;
  187|  9.93M|	x->stacklen++;
  188|  9.93M|	*res = (char *)x->stack+x->stacklen;
  189|  9.93M|	x->stack[x->stacklen] = (unsigned char)ch;
  190|  9.93M|	x->stacklen++;
  191|  9.93M|	x->stack[x->stacklen] = 0;
  192|  9.93M|	return YXML_OK;
  193|  9.93M|}
yxml.c:yxml_selfclose:
  216|  8.70M|static yxml_ret_t yxml_selfclose(yxml_t *x, unsigned ch) {
  217|  8.70M|	yxml_popstack(x);
  218|  8.70M|	if(x->stacklen) {
  ------------------
  |  Branch (218:5): [True: 8.69M, False: 11.2k]
  ------------------
  219|  8.69M|		x->elem = (char *)x->stack+x->stacklen-1;
  220|  38.5M|		while(*(x->elem-1))
  ------------------
  |  Branch (220:9): [True: 29.9M, False: 8.69M]
  ------------------
  221|  29.9M|			x->elem--;
  222|  8.69M|		return YXML_ELEMEND;
  223|  8.69M|	}
  224|  11.2k|	x->elem = (char *)x->stack;
  225|  11.2k|	x->state = x->contentmode ? YXMLS_misc2 : YXMLS_misc3;
  ------------------
  |  Branch (225:13): [True: 5.99k, False: 5.21k]
  ------------------
  226|  11.2k|	return YXML_ELEMEND;
  227|  8.70M|}
yxml.c:yxml_elemclose:
  229|  86.2k|static inline yxml_ret_t yxml_elemclose(yxml_t *x, unsigned ch) {
  230|  86.2k|	if(*((unsigned char *)x->elem) != ch)
  ------------------
  |  Branch (230:5): [True: 95, False: 86.1k]
  ------------------
  231|     95|		return YXML_ECLOSE;
  232|  86.1k|	x->elem++;
  233|  86.1k|	return YXML_OK;
  234|  86.2k|}
yxml.c:yxml_elemcloseend:
  236|  24.3k|static inline yxml_ret_t yxml_elemcloseend(yxml_t *x, unsigned ch) {
  237|  24.3k|	if(*x->elem)
  ------------------
  |  Branch (237:5): [True: 2, False: 24.3k]
  ------------------
  238|      2|		return YXML_ECLOSE;
  239|  24.3k|	return yxml_selfclose(x, ch);
  240|  24.3k|}
yxml.c:yxml_elemstart:
  210|  8.70M|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.67k|static inline yxml_ret_t yxml_pistart  (yxml_t *x, unsigned ch) { return yxml_pushstack(x, &x->pi, ch); }
yxml.c:yxml_refcontent:
  299|  3.20M|static inline yxml_ret_t yxml_refcontent(yxml_t *x, unsigned ch) { return yxml_refend(x, YXML_CONTENT); }
yxml.c:yxml_piname:
  248|  6.32k|static inline yxml_ret_t yxml_piname   (yxml_t *x, unsigned ch) { return yxml_pushstackc(x, ch); }
yxml.c:yxml_pinameend:
  250|  3.82k|static inline yxml_ret_t yxml_pinameend(yxml_t *x, unsigned ch) {
  251|  3.82k|	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.85k, False: 1.97k]
  |  Branch (251:33): [True: 934, False: 918]
  |  Branch (251:57): [True: 498, False: 436]
  |  Branch (251:81): [True: 14, False: 484]
  ------------------
  252|  3.82k|}
yxml.c:yxml_datapi1:
  149|    284|static inline yxml_ret_t yxml_datapi1(yxml_t *x, unsigned ch) {
  150|    284|	yxml_setchar(x->data, ch);
  151|    284|	x->data[1] = 0;
  152|    284|	return YXML_PICONTENT;
  153|    284|}
yxml.c:yxml_pivalend:
  253|  3.66k|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|    389|static inline yxml_ret_t yxml_datapi2(yxml_t *x, unsigned ch) {
  156|    389|	x->data[0] = '?';
  157|    389|	yxml_setchar(x->data+1, ch);
  158|    389|	x->data[2] = 0;
  159|    389|	return YXML_PICONTENT;
  160|    389|}
yxml.c:yxml_piabort:
  249|    593|static inline yxml_ret_t yxml_piabort  (yxml_t *x, unsigned ch) { yxml_popstack(x); return YXML_OK; }

UA_STRING:
  242|    838|UA_STRING(char *chars) {
  243|    838|    UA_String s = {0, NULL};
  244|    838|    if(!chars)
  ------------------
  |  Branch (244:8): [True: 0, False: 838]
  ------------------
  245|      0|        return s;
  246|    838|    s.length = strlen(chars);
  247|    838|    s.data = (UA_Byte*)chars;
  248|    838|    return s;
  249|    838|}
UA_String_equal_ignorecase:
  291|    165|UA_String_equal_ignorecase(const UA_String *s1, const UA_String *s2) {
  292|    165|    if(s1->length != s2->length)
  ------------------
  |  Branch (292:8): [True: 0, False: 165]
  ------------------
  293|      0|        return false;
  294|    165|    if(s1->length == 0)
  ------------------
  |  Branch (294:8): [True: 0, False: 165]
  ------------------
  295|      0|        return true;
  296|    165|    if(s2->data == NULL)
  ------------------
  |  Branch (296:8): [True: 0, False: 165]
  ------------------
  297|      0|        return false;
  298|       |
  299|    165|    return casecmp(s1->data, s2->data, s1->length) == 0;
  300|    165|}
UA_DateTime_parse:
  555|     26|UA_DateTime_parse(UA_DateTime *dst, const UA_String str) {
  556|     26|    if(str.length == 0)
  ------------------
  |  Branch (556:8): [True: 26, False: 0]
  ------------------
  557|     26|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     26|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  558|       |
  559|      0|    struct musl_tm dts;
  560|      0|    memset(&dts, 0, sizeof(dts));
  561|       |
  562|       |    /* Parse the year. The ISO standard asks for four digits. But we accept up
  563|       |     * to five with an optional plus or minus in front due to the range of the
  564|       |     * DateTime 64bit integer. But in that case we require the year and the
  565|       |     * month to be separated by a '-'. Otherwise we cannot know where the month
  566|       |     * starts. */
  567|      0|    size_t pos = 0;
  568|      0|    if(str.data[0] == '-' || str.data[0] == '+')
  ------------------
  |  Branch (568:8): [True: 0, False: 0]
  |  Branch (568:30): [True: 0, False: 0]
  ------------------
  569|      0|        pos++;
  570|      0|    UA_Int64 year = 0;
  571|      0|    UA_CHECK(str.length - pos > 5, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  171|      0|    do {                                                                                 \
  |  |  172|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  345|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (345:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  173|      0|            EVAL_ON_ERROR;                                                               \
  |  |  174|      0|        }                                                                                \
  |  |  175|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (175:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  572|      0|    size_t len = parseInt64((char*)&str.data[pos], 5, &year);
  573|      0|    pos += len;
  574|      0|    UA_CHECK(len > 0 && pos < str.length, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  171|      0|    do {                                                                                 \
  |  |  172|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  345|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (345:25): [True: 0, False: 0]
  |  |  |  |  |  Branch (345:43): [True: 0, False: 0]
  |  |  |  |  |  Branch (345:43): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  173|      0|            EVAL_ON_ERROR;                                                               \
  |  |  174|      0|        }                                                                                \
  |  |  175|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (175:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  575|      0|    UA_CHECK(len == 4 || str.data[pos] == '-', return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  171|      0|    do {                                                                                 \
  |  |  172|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  345|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (345:25): [True: 0, False: 0]
  |  |  |  |  |  Branch (345:43): [True: 0, False: 0]
  |  |  |  |  |  Branch (345:43): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  173|      0|            EVAL_ON_ERROR;                                                               \
  |  |  174|      0|        }                                                                                \
  |  |  175|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (175:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  576|      0|    if(str.data[0] == '-')
  ------------------
  |  Branch (576:8): [True: 0, False: 0]
  ------------------
  577|      0|        year = -year;
  578|      0|    dts.tm_year = (UA_Int16)year - 1900;
  579|      0|    if(str.data[pos] == '-')
  ------------------
  |  Branch (579:8): [True: 0, False: 0]
  ------------------
  580|      0|        pos++;
  581|       |
  582|       |    /* Parse the month */
  583|      0|    UA_UInt64 month = 0;
  584|      0|    UA_CHECK(str.length - pos > 2, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  171|      0|    do {                                                                                 \
  |  |  172|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  345|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (345:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  173|      0|            EVAL_ON_ERROR;                                                               \
  |  |  174|      0|        }                                                                                \
  |  |  175|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (175:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  585|      0|    len = parseUInt64((char*)&str.data[pos], 2, &month);
  586|      0|    pos += len;
  587|      0|    UA_CHECK(len == 2, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  171|      0|    do {                                                                                 \
  |  |  172|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  345|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (345:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  173|      0|            EVAL_ON_ERROR;                                                               \
  |  |  174|      0|        }                                                                                \
  |  |  175|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (175:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  588|      0|    dts.tm_mon = (UA_UInt16)month - 1;
  589|      0|    if(str.data[pos] == '-')
  ------------------
  |  Branch (589:8): [True: 0, False: 0]
  ------------------
  590|      0|        pos++;
  591|       |
  592|       |    /* Parse the day and check the T between date and time */
  593|      0|    UA_UInt64 day = 0;
  594|      0|    UA_CHECK(str.length - pos > 2, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  171|      0|    do {                                                                                 \
  |  |  172|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  345|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (345:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  173|      0|            EVAL_ON_ERROR;                                                               \
  |  |  174|      0|        }                                                                                \
  |  |  175|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (175:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  595|      0|    len = parseUInt64((char*)&str.data[pos], 2, &day);
  596|      0|    pos += len;
  597|      0|    UA_CHECK(len == 2 || str.data[pos] != 'T',
  ------------------
  |  |  171|      0|    do {                                                                                 \
  |  |  172|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  345|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (345:25): [True: 0, False: 0]
  |  |  |  |  |  Branch (345:43): [True: 0, False: 0]
  |  |  |  |  |  Branch (345:43): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  173|      0|            EVAL_ON_ERROR;                                                               \
  |  |  174|      0|        }                                                                                \
  |  |  175|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (175:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  598|      0|             return UA_STATUSCODE_BADDECODINGERROR);
  599|      0|    dts.tm_mday = (UA_UInt16)day;
  600|      0|    pos++;
  601|       |
  602|       |    /* Parse the hour */
  603|      0|    UA_UInt64 hour = 0;
  604|      0|    UA_CHECK(str.length - pos > 2, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  171|      0|    do {                                                                                 \
  |  |  172|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  345|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (345:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  173|      0|            EVAL_ON_ERROR;                                                               \
  |  |  174|      0|        }                                                                                \
  |  |  175|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (175:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  605|      0|    len = parseUInt64((char*)&str.data[pos], 2, &hour);
  606|      0|    pos += len;
  607|      0|    UA_CHECK(len == 2, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  171|      0|    do {                                                                                 \
  |  |  172|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  345|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (345:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  173|      0|            EVAL_ON_ERROR;                                                               \
  |  |  174|      0|        }                                                                                \
  |  |  175|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (175:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  608|      0|    dts.tm_hour = (UA_UInt16)hour;
  609|      0|    if(str.data[pos] == ':')
  ------------------
  |  Branch (609:8): [True: 0, False: 0]
  ------------------
  610|      0|        pos++;
  611|       |
  612|       |    /* Parse the minute */
  613|      0|    UA_UInt64 min = 0;
  614|      0|    UA_CHECK(str.length - pos > 2, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  171|      0|    do {                                                                                 \
  |  |  172|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  345|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (345:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  173|      0|            EVAL_ON_ERROR;                                                               \
  |  |  174|      0|        }                                                                                \
  |  |  175|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (175:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  615|      0|    len = parseUInt64((char*)&str.data[pos], 2, &min);
  616|      0|    pos += len;
  617|      0|    UA_CHECK(len == 2, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  171|      0|    do {                                                                                 \
  |  |  172|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  345|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (345:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  173|      0|            EVAL_ON_ERROR;                                                               \
  |  |  174|      0|        }                                                                                \
  |  |  175|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (175:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  618|      0|    dts.tm_min = (UA_UInt16)min;
  619|      0|    if(str.data[pos] == ':')
  ------------------
  |  Branch (619:8): [True: 0, False: 0]
  ------------------
  620|      0|        pos++;
  621|       |
  622|       |    /* Parse the second */
  623|      0|    UA_UInt64 sec = 0;
  624|      0|    UA_CHECK(str.length - pos >= 2, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  171|      0|    do {                                                                                 \
  |  |  172|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  345|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (345:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  173|      0|            EVAL_ON_ERROR;                                                               \
  |  |  174|      0|        }                                                                                \
  |  |  175|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (175:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  625|      0|    len = parseUInt64((char*)&str.data[pos], 2, &sec);
  626|      0|    pos += len;
  627|      0|    UA_CHECK(len == 2, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  171|      0|    do {                                                                                 \
  |  |  172|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  345|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (345:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  173|      0|            EVAL_ON_ERROR;                                                               \
  |  |  174|      0|        }                                                                                \
  |  |  175|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (175:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  628|      0|    dts.tm_sec = (UA_UInt16)sec;
  629|       |
  630|       |    /* Compute the seconds since the Unix epoch */
  631|      0|    long long sinceunix = musl_tm_to_secs(&dts);
  632|       |
  633|       |    /* Are we within the range that can be represented? */
  634|      0|    long long sinceunix_min =
  635|      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
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  636|      0|        (long long)(UA_DATETIME_UNIX_EPOCH / UA_DATETIME_SEC) -
  ------------------
  |  |  329|      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
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  637|      0|        (long long)1; /* manual correction due to rounding */
  638|      0|    long long sinceunix_max = (long long)
  639|      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);
  ------------------
  |  |  329|      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
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  640|      0|    if(sinceunix < sinceunix_min || sinceunix > sinceunix_max)
  ------------------
  |  Branch (640:8): [True: 0, False: 0]
  |  Branch (640:37): [True: 0, False: 0]
  ------------------
  641|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  642|       |
  643|       |    /* Convert to DateTime. Add or subtract one extra second here to prevent
  644|       |     * underflow/overflow. This is reverted once the fractional part has been
  645|       |     * added. Keep the shift in its own variable: reading the sign of sinceunix
  646|       |     * again at the end would look at the already-shifted value, and the shift
  647|       |     * moves 0 to 1 and 1 to 0 -- the two instants whose sign it changes. */
  648|      0|    long long shift = (sinceunix > 0) ? 1 : -1;
  ------------------
  |  Branch (648:23): [True: 0, False: 0]
  ------------------
  649|      0|    sinceunix -= shift;
  650|      0|    UA_DateTime dt = (UA_DateTime)
  651|      0|        (sinceunix + (UA_DATETIME_UNIX_EPOCH / UA_DATETIME_SEC)) * UA_DATETIME_SEC;
  ------------------
  |  |  329|      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
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  652|       |
  653|       |    /* Parse the fraction of the second if defined */
  654|      0|    UA_CHECK(pos < str.length, goto finish);
  ------------------
  |  |  171|      0|    do {                                                                                 \
  |  |  172|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  345|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (345:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  173|      0|            EVAL_ON_ERROR;                                                               \
  |  |  174|      0|        }                                                                                \
  |  |  175|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (175:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  655|      0|    if(str.data[pos] == ',' || str.data[pos] == '.') {
  ------------------
  |  Branch (655:8): [True: 0, False: 0]
  |  Branch (655:32): [True: 0, False: 0]
  ------------------
  656|      0|        pos++;
  657|      0|        double frac = 0.0;
  658|      0|        double denom = 0.1;
  659|      0|        while(pos < str.length && str.data[pos] >= '0' && str.data[pos] <= '9') {
  ------------------
  |  Branch (659:15): [True: 0, False: 0]
  |  Branch (659:35): [True: 0, False: 0]
  |  Branch (659:59): [True: 0, False: 0]
  ------------------
  660|      0|            frac += denom * (str.data[pos] - '0');
  661|      0|            denom *= 0.1;
  662|      0|            pos++;
  663|      0|        }
  664|      0|        frac += 0.00000005; /* Correct rounding when converting to integer */
  665|      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
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  666|      0|    }
  667|       |
  668|       |    /* Time zone handling */
  669|      0|    UA_CHECK(pos < str.length, goto finish);
  ------------------
  |  |  171|      0|    do {                                                                                 \
  |  |  172|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  345|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (345:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  173|      0|            EVAL_ON_ERROR;                                                               \
  |  |  174|      0|        }                                                                                \
  |  |  175|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (175:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  670|      0|    if(str.data[pos] == 'Z') {
  ------------------
  |  Branch (670:8): [True: 0, False: 0]
  ------------------
  671|      0|        pos++;
  672|      0|    } else if(str.data[pos] == '+' || str.data[pos] == '-') {
  ------------------
  |  Branch (672:15): [True: 0, False: 0]
  |  Branch (672:39): [True: 0, False: 0]
  ------------------
  673|      0|        UA_UInt64 tzHour = 0, tzMin = 0;
  674|      0|        UA_Int64 offsetSeconds = 0;
  675|      0|        UA_Byte tzSign = str.data[pos++];
  676|       |
  677|      0|        UA_CHECK(str.length - pos >= 2, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  171|      0|    do {                                                                                 \
  |  |  172|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  345|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (345:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  173|      0|            EVAL_ON_ERROR;                                                               \
  |  |  174|      0|        }                                                                                \
  |  |  175|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (175:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  678|      0|        len = parseUInt64((char*)&str.data[pos], 2, &tzHour);
  679|      0|        pos += len;
  680|      0|        UA_CHECK(len == 2, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  171|      0|    do {                                                                                 \
  |  |  172|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  345|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (345:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  173|      0|            EVAL_ON_ERROR;                                                               \
  |  |  174|      0|        }                                                                                \
  |  |  175|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (175:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  681|       |
  682|      0|        UA_CHECK(str.length > pos, goto finish); /* Allow missing tz minutes */
  ------------------
  |  |  171|      0|    do {                                                                                 \
  |  |  172|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  345|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (345:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  173|      0|            EVAL_ON_ERROR;                                                               \
  |  |  174|      0|        }                                                                                \
  |  |  175|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (175:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  683|      0|        if(str.data[pos] == ':')
  ------------------
  |  Branch (683:12): [True: 0, False: 0]
  ------------------
  684|      0|            pos++;
  685|       |
  686|      0|        UA_CHECK(str.length - pos >= 2, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  171|      0|    do {                                                                                 \
  |  |  172|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  345|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (345:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  173|      0|            EVAL_ON_ERROR;                                                               \
  |  |  174|      0|        }                                                                                \
  |  |  175|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (175:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  687|      0|        len = parseUInt64((char*)&str.data[pos], 2, &tzMin);
  688|      0|        pos += len;
  689|      0|        UA_CHECK(len == 2, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  171|      0|    do {                                                                                 \
  |  |  172|      0|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  345|      0|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (345:25): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  173|      0|            EVAL_ON_ERROR;                                                               \
  |  |  174|      0|        }                                                                                \
  |  |  175|      0|    } while(0)
  |  |  ------------------
  |  |  |  Branch (175:13): [Folded, False: 0]
  |  |  ------------------
  ------------------
  690|       |
  691|      0|        offsetSeconds = (tzHour * 3600) + (tzMin * 60);
  692|      0|        if(tzSign == '-')
  ------------------
  |  Branch (692:12): [True: 0, False: 0]
  ------------------
  693|      0|            offsetSeconds = -offsetSeconds;
  694|      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
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  695|      0|    } else {
  696|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  697|      0|    }
  698|       |
  699|      0| finish:
  700|       |    /* Remove the underflow/overflow protection (see above) */
  701|      0|    if(shift > 0) {
  ------------------
  |  Branch (701:8): [True: 0, False: 0]
  ------------------
  702|      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 (702:12): [True: 0, False: 0]
  ------------------
  703|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  704|      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
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  705|      0|    } else {
  706|      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 (706:12): [True: 0, False: 0]
  ------------------
  707|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  708|      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
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  709|      0|    }
  710|       |
  711|       |    /* We must be at the end of the string */
  712|      0|    if(pos != str.length)
  ------------------
  |  Branch (712:8): [True: 0, False: 0]
  ------------------
  713|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  714|       |
  715|      0|    *dst = dt;
  716|      0|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  717|      0|}
UA_ByteString_allocBuffer:
  784|  3.72k|UA_ByteString_allocBuffer(UA_ByteString *bs, size_t length) {
  785|  3.72k|    UA_ByteString_init(bs);
  786|  3.72k|    if(length == 0) {
  ------------------
  |  Branch (786:8): [True: 78, False: 3.64k]
  ------------------
  787|     78|        bs->data = (u8*)UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  757|     78|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  788|     78|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     78|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  789|     78|    }
  790|  3.64k|    bs->data = (u8*)UA_calloc(1,length);
  ------------------
  |  |   24|  3.64k|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
  791|  3.64k|    if(UA_UNLIKELY(!bs->data))
  ------------------
  |  |  345|  3.64k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  ------------------
  |  |  |  Branch (345:25): [True: 0, False: 3.64k]
  |  |  ------------------
  ------------------
  792|      0|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
  793|  3.64k|    bs->length = length;
  794|  3.64k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  3.64k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  795|  3.64k|}
UA_NodeId_isNull:
  836|     82|UA_NodeId_isNull(const UA_NodeId *p) {
  837|     82|    if(p->namespaceIndex != 0)
  ------------------
  |  Branch (837:8): [True: 0, False: 82]
  ------------------
  838|      0|        return false;
  839|     82|    switch (p->identifierType) {
  ------------------
  |  Branch (839:13): [True: 82, False: 0]
  ------------------
  840|     82|    case UA_NODEIDTYPE_NUMERIC:
  ------------------
  |  Branch (840:5): [True: 82, False: 0]
  ------------------
  841|     82|        return (p->identifier.numeric == 0);
  842|      0|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (842:5): [True: 0, False: 82]
  ------------------
  843|      0|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (843:5): [True: 0, False: 82]
  ------------------
  844|      0|        return (p->identifier.string.length == 0); /* Null and empty string */
  845|      0|    case UA_NODEIDTYPE_GUID:
  ------------------
  |  Branch (845:5): [True: 0, False: 82]
  ------------------
  846|      0|        return (guidOrder(&p->identifier.guid, &UA_GUID_NULL, NULL) == UA_ORDER_EQ);
  847|     82|    }
  848|      0|    return false;
  849|     82|}
nodeId_printEscape:
 1051|    246|                   const UA_NamespaceMapping *nsMapping, UA_Escaping idEsc) {
 1052|       |    /* Try to map the NamespaceIndex to the Uri */
 1053|    246|    UA_String nsUri = UA_STRING_NULL;
 1054|    246|    if(id->namespaceIndex > 0 && nsMapping)
  ------------------
  |  Branch (1054:8): [True: 0, False: 246]
  |  Branch (1054:34): [True: 0, False: 0]
  ------------------
 1055|      0|        UA_NamespaceMapping_index2Uri(nsMapping, id->namespaceIndex, &nsUri);
 1056|       |
 1057|       |    /* Compute the string length and print numerical identifiers. */
 1058|    246|    u8 nsStr[7];
 1059|    246|    u8 numIdStr[12];
 1060|    246|    size_t idLen = nodeIdSize(id, nsStr, numIdStr, nsUri, idEsc);
 1061|    246|    if(idLen == 0)
  ------------------
  |  Branch (1061:8): [True: 0, False: 246]
  ------------------
 1062|      0|        return UA_STATUSCODE_BADINTERNALERROR;
  ------------------
  |  |   29|      0|#define UA_STATUSCODE_BADINTERNALERROR ((UA_StatusCode) 0x80020000)
  ------------------
 1063|       |
 1064|       |    /* Allocate memory if required */
 1065|    246|    if(output->length == 0) {
  ------------------
  |  Branch (1065:8): [True: 246, False: 0]
  ------------------
 1066|    246|        UA_StatusCode res = UA_ByteString_allocBuffer((UA_ByteString*)output, idLen);
 1067|    246|        if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    246|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1067:12): [True: 0, False: 246]
  ------------------
 1068|      0|            return res;
 1069|    246|    } else {
 1070|      0|        if(output->length < idLen)
  ------------------
  |  Branch (1070:12): [True: 0, False: 0]
  ------------------
 1071|      0|            return UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED;
  ------------------
  |  |   47|      0|#define UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED ((UA_StatusCode) 0x80080000)
  ------------------
 1072|      0|        output->length = idLen;
 1073|      0|    }
 1074|       |
 1075|       |    /* Print the NodeId */
 1076|    246|    u8 *pos = printNodeIdBody(id, nsUri, nsStr, numIdStr, output->data, nsMapping, idEsc);
 1077|    246|    output->length = (size_t)(pos - output->data);
 1078|    246|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    246|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1079|    246|}
UA_NodeId_printEx:
 1083|    246|                  const UA_NamespaceMapping *nsMapping) {
 1084|    246|    return nodeId_printEscape(id, output, nsMapping, UA_ESCAPING_NONE);
 1085|    246|}
UA_ExtensionObject_setValue:
 1328|    328|                            const UA_DataType *type) {
 1329|    328|    UA_ExtensionObject_init(eo);
 1330|    328|    eo->content.decoded.data = p;
 1331|    328|    eo->content.decoded.type = type;
 1332|    328|    eo->encoding = UA_EXTENSIONOBJECT_DECODED;
 1333|    328|}
UA_Variant_isScalar:
 1385|  3.10k|UA_Variant_isScalar(const UA_Variant *v) {
 1386|  3.10k|    return (v->type != NULL && v->arrayLength == 0 &&
  ------------------
  |  Branch (1386:13): [True: 3.10k, False: 0]
  |  Branch (1386:32): [True: 3.10k, False: 0]
  ------------------
 1387|  3.10k|            v->data > UA_EMPTY_ARRAY_SENTINEL);
  ------------------
  |  |  757|  3.10k|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  |  Branch (1387:13): [True: 3.09k, False: 10]
  ------------------
 1388|  3.10k|}
UA_new:
 1950|  4.23k|UA_new(const UA_DataType *type) {
 1951|  4.23k|    void *p = UA_calloc(1, type->memSize);
  ------------------
  |  |   24|  4.23k|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
 1952|  4.23k|    return p;
 1953|  4.23k|}
UA_copy:
 2126|    508|UA_copy(const void *src, void *dst, const UA_DataType *type) {
 2127|    508|    memset(dst, 0, type->memSize); /* init */
 2128|    508|    UA_StatusCode retval = copyJumpTable[type->typeKind](src, dst, type);
 2129|    508|    if(retval != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    508|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2129:8): [True: 0, False: 508]
  ------------------
 2130|      0|        UA_clear(dst, type);
 2131|    508|    return retval;
 2132|    508|}
UA_clear:
 2229|  9.11k|UA_clear(void *p, const UA_DataType *type) {
 2230|  9.11k|    clearJumpTable[type->typeKind](p, type);
 2231|  9.11k|    memset(p, 0, type->memSize); /* init */
 2232|  9.11k|}
UA_order:
 2703|  69.7k|UA_Order UA_order(const void *p1, const void *p2, const UA_DataType *type) {
 2704|  69.7k|    return orderJumpTable[type->typeKind](p1, p2, type);
 2705|  69.7k|}
UA_equal:
 2708|  1.04k|UA_equal(const void *p1, const void *p2, const UA_DataType *type) {
 2709|  1.04k|    return (UA_order(p1, p2, type) == UA_ORDER_EQ);
 2710|  1.04k|}
UA_Array_new:
 2717|     29|UA_Array_new(size_t size, const UA_DataType *type) {
 2718|     29|    if(size > UA_INT32_MAX)
  ------------------
  |  |  101|     29|#define UA_INT32_MAX 2147483647L
  ------------------
  |  Branch (2718:8): [True: 0, False: 29]
  ------------------
 2719|      0|        return NULL;
 2720|     29|    if(size == 0)
  ------------------
  |  Branch (2720:8): [True: 10, False: 19]
  ------------------
 2721|     10|        return UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  757|     10|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
 2722|     19|    if(size > SIZE_MAX / type->memSize)
  ------------------
  |  Branch (2722:8): [True: 0, False: 19]
  ------------------
 2723|      0|        return NULL;
 2724|     19|    return UA_calloc(size, type->memSize);
  ------------------
  |  |   24|     19|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
 2725|     19|}
UA_Array_copy:
 2729|    508|              void **dst, const UA_DataType *type) {
 2730|    508|    if(size == 0) {
  ------------------
  |  Branch (2730:8): [True: 0, False: 508]
  ------------------
 2731|      0|        if(src == NULL)
  ------------------
  |  Branch (2731:12): [True: 0, False: 0]
  ------------------
 2732|      0|            *dst = NULL;
 2733|      0|        else
 2734|      0|            *dst= UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  757|      0|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
 2735|      0|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2736|      0|    }
 2737|       |
 2738|       |    /* Check the array consistency -- defensive programming in case the user
 2739|       |     * manually created an inconsistent array */
 2740|    508|    if(UA_UNLIKELY(!type || !src))
  ------------------
  |  |  345|  1.01k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  ------------------
  |  |  |  Branch (345:25): [True: 0, False: 508]
  |  |  |  Branch (345:43): [True: 0, False: 508]
  |  |  |  Branch (345:43): [True: 0, False: 508]
  |  |  ------------------
  ------------------
 2741|      0|        return UA_STATUSCODE_BADINTERNALERROR;
  ------------------
  |  |   29|      0|#define UA_STATUSCODE_BADINTERNALERROR ((UA_StatusCode) 0x80020000)
  ------------------
 2742|       |
 2743|    508|    if(size > SIZE_MAX / type->memSize)
  ------------------
  |  Branch (2743:8): [True: 0, False: 508]
  ------------------
 2744|      0|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 2745|    508|    size_t byteSize = size * type->memSize;
 2746|       |
 2747|       |    /* calloc, so we don't have to check retval in every iteration of copying */
 2748|    508|    *dst = UA_calloc(size, type->memSize);
  ------------------
  |  |   24|    508|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
 2749|    508|    if(!*dst)
  ------------------
  |  Branch (2749:8): [True: 0, False: 508]
  ------------------
 2750|      0|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 2751|       |
 2752|    508|    if(type->pointerFree) {
  ------------------
  |  Branch (2752:8): [True: 508, False: 0]
  ------------------
 2753|    508|        memcpy(*dst, src, byteSize);
 2754|    508|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    508|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2755|    508|    }
 2756|       |
 2757|      0|    uintptr_t ptrs = (uintptr_t)src;
 2758|      0|    uintptr_t ptrd = (uintptr_t)*dst;
 2759|      0|    UA_StatusCode retval = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2760|      0|    for(size_t i = 0; i < size; ++i) {
  ------------------
  |  Branch (2760:23): [True: 0, False: 0]
  ------------------
 2761|      0|        retval |= UA_copy((void*)ptrs, (void*)ptrd, type);
 2762|      0|        ptrs += type->memSize;
 2763|      0|        ptrd += type->memSize;
 2764|      0|    }
 2765|      0|    if(retval != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2765:8): [True: 0, False: 0]
  ------------------
 2766|      0|        UA_Array_delete(*dst, size, type);
 2767|       |        *dst = NULL;
 2768|      0|    }
 2769|      0|    return retval;
 2770|    508|}
UA_Array_delete:
 2872|  9.07k|UA_Array_delete(void *p, size_t size, const UA_DataType *type) {
 2873|  9.07k|    if(!type->pointerFree) {
  ------------------
  |  Branch (2873:8): [True: 1.25k, False: 7.81k]
  ------------------
 2874|  1.25k|        uintptr_t ptr = (uintptr_t)p;
 2875|  2.35k|        for(size_t i = 0; i < size; ++i) {
  ------------------
  |  Branch (2875:27): [True: 1.09k, False: 1.25k]
  ------------------
 2876|  1.09k|            UA_clear((void*)ptr, type);
 2877|  1.09k|            ptr += type->memSize;
 2878|  1.09k|        }
 2879|  1.25k|    }
 2880|  9.07k|    UA_free((void*)((uintptr_t)p & ~(uintptr_t)UA_EMPTY_ARRAY_SENTINEL));
  ------------------
  |  |   23|  9.07k|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 2881|  9.07k|}
ua_types.c:casecmp:
  282|    165|casecmp(const UA_Byte *l, const UA_Byte *r, size_t n) {
  283|    165|    if(!n--) return 0;
  ------------------
  |  Branch (283:8): [True: 0, False: 165]
  ------------------
  284|    834|    for(; *l && *r && n && (*l == *r || lowercase(*l) == lowercase(*r)); l++, r++, n--);
  ------------------
  |  Branch (284:11): [True: 834, False: 0]
  |  Branch (284:17): [True: 834, False: 0]
  |  Branch (284:23): [True: 669, False: 165]
  |  Branch (284:29): [True: 669, False: 0]
  |  Branch (284:41): [True: 0, False: 0]
  ------------------
  285|    165|    return lowercase(*l) - lowercase(*r);
  286|    165|}
ua_types.c:lowercase:
  276|    330|lowercase(UA_Byte c) {
  277|    330|    if(((int)c) - 'A' < 26) return c | 32;
  ------------------
  |  Branch (277:8): [True: 0, False: 330]
  ------------------
  278|    330|    return c;
  279|    330|}
ua_types.c:nodeIdSize:
  950|    246|           UA_Escaping idEsc) {
  951|       |    /* Namespace length */
  952|    246|    size_t len = 0;
  953|    246|    if(nsUri.data != NULL) {
  ------------------
  |  Branch (953:8): [True: 0, False: 246]
  ------------------
  954|      0|        len += 5; /* nsu=; */
  955|      0|        len += UA_String_escapedSize(nsUri, UA_ESCAPING_PERCENT);
  956|    246|    } else if(id->namespaceIndex > 0) {
  ------------------
  |  Branch (956:15): [True: 0, False: 246]
  ------------------
  957|      0|        len += 4; /* ns=; */
  958|      0|        size_t nsStrSize = itoaUnsigned(id->namespaceIndex, (char*)nsStr, 10);
  959|      0|        nsStr[nsStrSize] = 0;
  960|      0|        len += nsStrSize;
  961|      0|    }
  962|       |
  963|    246|    len += 2; /* ?= */
  964|       |
  965|    246|    switch (id->identifierType) {
  966|    246|    case UA_NODEIDTYPE_NUMERIC: {
  ------------------
  |  Branch (966:5): [True: 246, False: 0]
  ------------------
  967|    246|        size_t numIdStrSize = itoaUnsigned(id->identifier.numeric, (char*)numIdStr, 10);
  968|    246|        numIdStr[numIdStrSize] = 0;
  969|    246|        len += numIdStrSize;
  970|    246|        break;
  971|      0|    }
  972|      0|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (972:5): [True: 0, False: 246]
  ------------------
  973|      0|        len += UA_String_escapedSize(id->identifier.string, idEsc);
  974|      0|        break;
  975|      0|    case UA_NODEIDTYPE_GUID:
  ------------------
  |  Branch (975:5): [True: 0, False: 246]
  ------------------
  976|      0|        len += 36;
  977|      0|        break;
  978|      0|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (978:5): [True: 0, False: 246]
  ------------------
  979|      0|        len += 4 * ((id->identifier.byteString.length + 2) / 3);
  980|      0|        break;
  981|      0|    default:
  ------------------
  |  Branch (981:5): [True: 0, False: 246]
  ------------------
  982|      0|        len = 0;
  983|    246|    }
  984|    246|    return len;
  985|    246|}
ua_types.c:printNodeIdBody:
  989|    246|                const UA_NamespaceMapping *nsMapping, UA_Escaping idEsc) {
  990|    246|    size_t len;
  991|       |
  992|       |    /* Encode the namespace */
  993|    246|    if(nsUri.data != NULL) {
  ------------------
  |  Branch (993:8): [True: 0, False: 246]
  ------------------
  994|      0|        memcpy(pos, "nsu=", 4);
  995|      0|        pos += 4;
  996|      0|        pos += UA_String_escapeInsert(pos, nsUri, UA_ESCAPING_PERCENT);
  997|      0|        *pos++ = ';';
  998|    246|    } else if(id->namespaceIndex > 0) {
  ------------------
  |  Branch (998:15): [True: 0, False: 246]
  ------------------
  999|      0|        memcpy(pos, "ns=", 3);
 1000|      0|        pos += 3;
 1001|      0|        len = strlen((char*)nsStr);
 1002|      0|        memcpy(pos, nsStr, len);
 1003|      0|        pos += len;
 1004|      0|        *pos++ = ';';
 1005|      0|    }
 1006|       |
 1007|       |    /* Encode the identifier */
 1008|    246|    switch(id->identifierType) {
  ------------------
  |  Branch (1008:12): [True: 246, False: 0]
  ------------------
 1009|    246|    case UA_NODEIDTYPE_NUMERIC:
  ------------------
  |  Branch (1009:5): [True: 246, False: 0]
  ------------------
 1010|    246|        memcpy(pos, "i=", 2);
 1011|    246|        pos += 2;
 1012|    246|        len = strlen((char*)numIdStr);
 1013|    246|        memcpy(pos, numIdStr, len);
 1014|    246|        pos += len;
 1015|    246|        break;
 1016|      0|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (1016:5): [True: 0, False: 246]
  ------------------
 1017|      0|        memcpy(pos, "s=", 2);
 1018|      0|        pos += 2;
 1019|      0|        pos += UA_String_escapeInsert(pos, id->identifier.string, idEsc);
 1020|      0|        break;
 1021|      0|    case UA_NODEIDTYPE_GUID:
  ------------------
  |  Branch (1021:5): [True: 0, False: 246]
  ------------------
 1022|      0|        memcpy(pos, "g=", 2);
 1023|      0|        pos += 2;
 1024|      0|        UA_Guid_to_hex(&id->identifier.guid, pos, true);
 1025|      0|        pos += 36;
 1026|      0|        break;
 1027|      0|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (1027:5): [True: 0, False: 246]
  ------------------
 1028|      0|        memcpy(pos, "b=", 2);
 1029|      0|        pos += 2;
 1030|       |        /* Use base64url encoding for percent-escaping.
 1031|       |         * Replace +/ with -_ and remove the padding. */
 1032|      0|        u8 *bpos = pos;
 1033|      0|        pos += UA_base64_buf(id->identifier.byteString.data,
 1034|      0|                             id->identifier.byteString.length, pos);
 1035|      0|        if(idEsc == UA_ESCAPING_PERCENT ||
  ------------------
  |  Branch (1035:12): [True: 0, False: 0]
  ------------------
 1036|      0|           idEsc == UA_ESCAPING_PERCENT_EXTENDED) {
  ------------------
  |  Branch (1036:12): [True: 0, False: 0]
  ------------------
 1037|      0|            while(pos > bpos && pos[-1] == '=')
  ------------------
  |  Branch (1037:19): [True: 0, False: 0]
  |  Branch (1037:33): [True: 0, False: 0]
  ------------------
 1038|      0|                pos--;
 1039|      0|            for(; bpos < pos; bpos++) {
  ------------------
  |  Branch (1039:19): [True: 0, False: 0]
  ------------------
 1040|      0|                if(*bpos == '+') *bpos = '-';
  ------------------
  |  Branch (1040:20): [True: 0, False: 0]
  ------------------
 1041|      0|                else if(*bpos == '/') *bpos = '_';
  ------------------
  |  Branch (1041:25): [True: 0, False: 0]
  ------------------
 1042|      0|            }
 1043|      0|        }
 1044|      0|        break;
 1045|    246|    }
 1046|    246|    return pos;
 1047|    246|}
ua_types.c:Variant_clear:
 1406|  4.59k|Variant_clear(void *p, const UA_DataType *_) {
 1407|  4.59k|    UA_Variant *v = (UA_Variant *)p;
 1408|       |
 1409|       |    /* The content is "borrowed" */
 1410|  4.59k|    if(v->storageType == UA_VARIANT_DATA_NODELETE)
  ------------------
  |  Branch (1410:8): [True: 0, False: 4.59k]
  ------------------
 1411|      0|        return;
 1412|       |
 1413|       |    /* Delete the value */
 1414|  4.59k|    if(v->type && v->data > UA_EMPTY_ARRAY_SENTINEL) {
  ------------------
  |  |  757|  4.17k|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  |  Branch (1414:8): [True: 4.17k, False: 417]
  |  Branch (1414:19): [True: 4.16k, False: 10]
  ------------------
 1415|  4.16k|        if(v->arrayLength == 0)
  ------------------
  |  Branch (1415:12): [True: 4.15k, False: 19]
  ------------------
 1416|  4.15k|            v->arrayLength = 1;
 1417|  4.16k|        UA_Array_delete(v->data, v->arrayLength, v->type);
 1418|  4.16k|        v->data = NULL;
 1419|  4.16k|    }
 1420|       |
 1421|       |    /* Delete the array dimensions */
 1422|  4.59k|    if((void*)v->arrayDimensions > UA_EMPTY_ARRAY_SENTINEL)
  ------------------
  |  |  757|  4.59k|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  |  Branch (1422:8): [True: 0, False: 4.59k]
  ------------------
 1423|      0|        UA_free(v->arrayDimensions);
  ------------------
  |  |   23|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1424|  4.59k|}
ua_types.c:DataValue_clear:
 1880|      8|DataValue_clear(void *p, const UA_DataType *_) {
 1881|      8|    UA_DataValue *dv = (UA_DataValue *)p;
 1882|       |    Variant_clear(&dv->value, NULL);
 1883|      8|}
ua_types.c:String_copy:
  303|    508|String_copy(const void *src, void *dst, const UA_DataType *_) {
  304|    508|    const UA_String *srcS = (const UA_String*)src;
  305|    508|    UA_String *dstS = (UA_String *)dst;
  306|    508|    UA_StatusCode res =
  307|    508|        UA_Array_copy(srcS->data, srcS->length, (void**)&dstS->data,
  308|    508|                      &UA_TYPES[UA_TYPES_BYTE]);
  ------------------
  |  |   96|    508|#define UA_TYPES_BYTE 2
  ------------------
  309|    508|    if(res == UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    508|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (309:8): [True: 508, False: 0]
  ------------------
  310|    508|        dstS->length = srcS->length;
  311|    508|    return res;
  312|    508|}
ua_types.c:nopClear:
 2191|    554|static void nopClear(void *p, const UA_DataType *type) { }
ua_types.c:String_clear:
  315|  4.72k|String_clear(void *p, const UA_DataType *_) {
  316|  4.72k|    UA_String *s = (UA_String*)p;
  317|  4.72k|    UA_Array_delete(s->data, s->length, &UA_TYPES[UA_TYPES_BYTE]);
  ------------------
  |  |   96|  4.72k|#define UA_TYPES_BYTE 2
  ------------------
  318|  4.72k|}
ua_types.c:NodeId_clear:
  799|    204|NodeId_clear(void *p, const UA_DataType *_) {
  800|    204|    UA_NodeId *id = (UA_NodeId*)p;
  801|    204|    switch(id->identifierType) {
  802|      0|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (802:5): [True: 0, False: 204]
  ------------------
  803|      0|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (803:5): [True: 0, False: 204]
  ------------------
  804|      0|        String_clear(&id->identifier.string, NULL);
  805|      0|        break;
  806|    204|    default: break;
  ------------------
  |  Branch (806:5): [True: 204, False: 0]
  ------------------
  807|    204|    }
  808|    204|}
ua_types.c:ExpandedNodeId_clear:
 1100|      9|ExpandedNodeId_clear(void *p, const UA_DataType *_) {
 1101|      9|    UA_ExpandedNodeId *id = (UA_ExpandedNodeId*)p;
 1102|      9|    NodeId_clear(&id->nodeId, NULL);
 1103|       |    String_clear(&id->namespaceUri, NULL);
 1104|      9|}
ua_types.c:QualifiedName_clear:
  421|     10|QualifiedName_clear(void *p, const UA_DataType *_) {
  422|     10|    UA_QualifiedName *qn = (UA_QualifiedName*)p;
  423|       |    String_clear(&qn->name, NULL);
  424|     10|}
ua_types.c:LocalizedText_clear:
 1863|     38|LocalizedText_clear(void *p, const UA_DataType *_) {
 1864|     38|    UA_LocalizedText *lt = (UA_LocalizedText *)p;
 1865|     38|    String_clear(&lt->locale, NULL);
 1866|       |    String_clear(&lt->text, NULL);
 1867|     38|}
ua_types.c:ExtensionObject_clear:
 1273|    134|ExtensionObject_clear(void *p, const UA_DataType *_) {
 1274|    134|    UA_ExtensionObject *eo = (UA_ExtensionObject *)p;
 1275|    134|    switch(eo->encoding) {
 1276|     52|    case UA_EXTENSIONOBJECT_ENCODED_NOBODY:
  ------------------
  |  Branch (1276:5): [True: 52, False: 82]
  ------------------
 1277|     52|    case UA_EXTENSIONOBJECT_ENCODED_BYTESTRING:
  ------------------
  |  Branch (1277:5): [True: 0, False: 134]
  ------------------
 1278|    134|    case UA_EXTENSIONOBJECT_ENCODED_XML:
  ------------------
  |  Branch (1278:5): [True: 82, False: 52]
  ------------------
 1279|    134|    case UA_EXTENSIONOBJECT_ENCODED_JSON:
  ------------------
  |  Branch (1279:5): [True: 0, False: 134]
  ------------------
 1280|    134|        NodeId_clear(&eo->content.encoded.typeId, NULL);
 1281|    134|        String_clear(&eo->content.encoded.body, NULL);
 1282|    134|        break;
 1283|      0|    case UA_EXTENSIONOBJECT_DECODED:
  ------------------
  |  Branch (1283:5): [True: 0, False: 134]
  ------------------
 1284|      0|        if(eo->content.decoded.data)
  ------------------
  |  Branch (1284:12): [True: 0, False: 0]
  ------------------
 1285|      0|            UA_delete(eo->content.decoded.data, eo->content.decoded.type);
 1286|      0|        break;
 1287|      0|    default:
  ------------------
  |  Branch (1287:5): [True: 0, False: 134]
  ------------------
 1288|      0|        break;
 1289|    134|    }
 1290|    134|}
ua_types.c:DiagnosticInfo_clear:
 1910|     14|DiagnosticInfo_clear(void *p, const UA_DataType *_) {
 1911|     14|    UA_DiagnosticInfo *di = (UA_DiagnosticInfo *)p;
 1912|       |
 1913|     14|    String_clear(&di->additionalInfo, NULL);
 1914|     14|    if(di->hasInnerDiagnosticInfo && di->innerDiagnosticInfo) {
  ------------------
  |  Branch (1914:8): [True: 0, False: 14]
  |  Branch (1914:38): [True: 0, False: 0]
  ------------------
 1915|      0|        DiagnosticInfo_clear(di->innerDiagnosticInfo, NULL);
 1916|      0|        UA_free(di->innerDiagnosticInfo);
  ------------------
  |  |   23|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1917|      0|    }
 1918|     14|}
ua_types.c:clearStructure:
 2135|    272|clearStructure(void *p, const UA_DataType *type) {
 2136|    272|    uintptr_t ptr = (uintptr_t)p;
 2137|  1.51k|    for(size_t i = 0; i < type->membersSize; ++i) {
  ------------------
  |  Branch (2137:23): [True: 1.24k, False: 272]
  ------------------
 2138|  1.24k|        const UA_DataTypeMember *m = &type->members[i];
 2139|  1.24k|        const UA_DataType *mt = m->memberType;
 2140|  1.24k|        ptr += m->padding;
 2141|  1.24k|        if(!m->isOptional) {
  ------------------
  |  Branch (2141:12): [True: 1.24k, False: 0]
  ------------------
 2142|  1.24k|            if(!m->isArray) {
  ------------------
  |  Branch (2142:16): [True: 1.05k, False: 186]
  ------------------
 2143|  1.05k|                clearJumpTable[mt->typeKind]((void*)ptr, mt);
 2144|  1.05k|                ptr += mt->memSize;
 2145|  1.05k|            } else {
 2146|    186|                size_t length = *(size_t*)ptr;
 2147|    186|                ptr += sizeof(size_t);
 2148|    186|                UA_Array_delete(*(void**)ptr, length, mt);
 2149|    186|                ptr += sizeof(void*);
 2150|    186|            }
 2151|  1.24k|        } else { /* field is optional */
 2152|      0|            if(!m->isArray) {
  ------------------
  |  Branch (2152:16): [True: 0, False: 0]
  ------------------
 2153|       |                /* optional scalar field is contained */
 2154|      0|                if((*(void *const *)ptr != NULL))
  ------------------
  |  Branch (2154:20): [True: 0, False: 0]
  ------------------
 2155|      0|                    UA_Array_delete(*(void **)ptr, 1, mt);
 2156|      0|                ptr += sizeof(void *);
 2157|      0|            } else {
 2158|       |                /* optional array field is contained */
 2159|      0|                if((*(void *const *)(ptr + sizeof(size_t)) != NULL)) {
  ------------------
  |  Branch (2159:20): [True: 0, False: 0]
  ------------------
 2160|      0|                    size_t length = *(size_t *)ptr;
 2161|      0|                    ptr += sizeof(size_t);
 2162|      0|                    UA_Array_delete(*(void **)ptr, length, mt);
 2163|      0|                    ptr += sizeof(void *);
 2164|      0|                } else { /* optional array field not contained */
 2165|      0|                    ptr += sizeof(size_t);
 2166|      0|                    ptr += sizeof(void *);
 2167|      0|                }
 2168|      0|            }
 2169|      0|        }
 2170|  1.24k|    }
 2171|    272|}
ua_types.c:guidOrder:
 2288|     16|guidOrder(const void *p1_, const void *p2_, const UA_DataType *type) {
 2289|     16|    const UA_Guid *p1 = (const UA_Guid*)p1_;
 2290|     16|    const UA_Guid *p2 = (const UA_Guid*)p2_;
 2291|     16|    if(p1->data1 != p2->data1)
  ------------------
  |  Branch (2291:8): [True: 0, False: 16]
  ------------------
 2292|      0|        return (p1->data1 < p2->data1) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2292:16): [True: 0, False: 0]
  ------------------
 2293|     16|    if(p1->data2 != p2->data2)
  ------------------
  |  Branch (2293:8): [True: 0, False: 16]
  ------------------
 2294|      0|        return (p1->data2 < p2->data2) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2294:16): [True: 0, False: 0]
  ------------------
 2295|     16|    if(p1->data3 != p2->data3)
  ------------------
  |  Branch (2295:8): [True: 0, False: 16]
  ------------------
 2296|      0|        return (p1->data3 < p2->data3) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2296:16): [True: 0, False: 0]
  ------------------
 2297|     16|    int cmp = memcmp(p1->data4, p2->data4, 8);
 2298|     16|    if(cmp != 0)
  ------------------
  |  Branch (2298:8): [True: 0, False: 16]
  ------------------
 2299|      0|        return (cmp < 0) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2299:16): [True: 0, False: 0]
  ------------------
 2300|     16|    return UA_ORDER_EQ;
 2301|     16|}
ua_types.c:nodeIdOrder:
 2321|  58.3k|nodeIdOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2322|  58.3k|    const UA_NodeId *p1 = (const UA_NodeId*)p1_;
 2323|  58.3k|    const UA_NodeId *p2 = (const UA_NodeId*)p2_;
 2324|       |    /* Compare namespaceIndex */
 2325|  58.3k|    if(p1->namespaceIndex != p2->namespaceIndex)
  ------------------
  |  Branch (2325:8): [True: 0, False: 58.3k]
  ------------------
 2326|      0|        return (p1->namespaceIndex < p2->namespaceIndex) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2326:16): [True: 0, False: 0]
  ------------------
 2327|       |
 2328|       |    /* Compare identifierType */
 2329|  58.3k|    if(p1->identifierType != p2->identifierType)
  ------------------
  |  Branch (2329:8): [True: 0, False: 58.3k]
  ------------------
 2330|      0|        return (p1->identifierType < p2->identifierType) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2330:16): [True: 0, False: 0]
  ------------------
 2331|       |
 2332|       |    /* Compare the identifier */
 2333|  58.3k|    switch(p1->identifierType) {
 2334|  58.3k|    case UA_NODEIDTYPE_NUMERIC:
  ------------------
  |  Branch (2334:5): [True: 58.3k, False: 0]
  ------------------
 2335|  58.3k|    default:
  ------------------
  |  Branch (2335:5): [True: 0, False: 58.3k]
  ------------------
 2336|  58.3k|        if(p1->identifier.numeric != p2->identifier.numeric)
  ------------------
  |  Branch (2336:12): [True: 58.1k, False: 218]
  ------------------
 2337|  58.1k|            return (p1->identifier.numeric < p2->identifier.numeric) ?
  ------------------
  |  Branch (2337:20): [True: 17.5k, False: 40.5k]
  ------------------
 2338|  40.5k|                UA_ORDER_LESS : UA_ORDER_MORE;
 2339|    218|        return UA_ORDER_EQ;
 2340|      0|    case UA_NODEIDTYPE_GUID:
  ------------------
  |  Branch (2340:5): [True: 0, False: 58.3k]
  ------------------
 2341|      0|        return guidOrder(&p1->identifier.guid, &p2->identifier.guid, NULL);
 2342|      0|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (2342:5): [True: 0, False: 58.3k]
  ------------------
 2343|      0|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (2343:5): [True: 0, False: 58.3k]
  ------------------
 2344|       |        return stringOrder(&p1->identifier.string, &p2->identifier.string, NULL);
 2345|  58.3k|    }
 2346|  58.3k|}
ua_types.c:expandedNodeIdOrder:
 2349|     16|expandedNodeIdOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2350|     16|    const UA_ExpandedNodeId *p1 = (const UA_ExpandedNodeId*)p1_;
 2351|     16|    const UA_ExpandedNodeId *p2 = (const UA_ExpandedNodeId*)p2_;
 2352|     16|    if(p1->serverIndex != p2->serverIndex)
  ------------------
  |  Branch (2352:8): [True: 0, False: 16]
  ------------------
 2353|      0|        return (p1->serverIndex < p2->serverIndex) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2353:16): [True: 0, False: 0]
  ------------------
 2354|     16|    UA_Order o = stringOrder(&p1->namespaceUri, &p2->namespaceUri, NULL);
 2355|     16|    if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2355:8): [True: 0, False: 16]
  ------------------
 2356|      0|        return o;
 2357|     16|    return nodeIdOrder(&p1->nodeId, &p2->nodeId, NULL);
 2358|     16|}
ua_types.c:booleanOrder:
 2246|     50|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2247|     50|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2248|     50|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2249|     50|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2249:12): [True: 0, False: 50]
  ------------------
 2250|     50|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2250:20): [True: 0, False: 0]
  ------------------
 2251|     50|        return UA_ORDER_EQ;                                               \
 2252|     50|    }
ua_types.c:sByteOrder:
 2246|     25|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2247|     25|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2248|     25|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2249|     25|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2249:12): [True: 0, False: 25]
  ------------------
 2250|     25|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2250:20): [True: 0, False: 0]
  ------------------
 2251|     25|        return UA_ORDER_EQ;                                               \
 2252|     25|    }
ua_types.c:byteOrder:
 2246|     45|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2247|     45|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2248|     45|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2249|     45|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2249:12): [True: 0, False: 45]
  ------------------
 2250|     45|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2250:20): [True: 0, False: 0]
  ------------------
 2251|     45|        return UA_ORDER_EQ;                                               \
 2252|     45|    }
ua_types.c:int16Order:
 2246|     56|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2247|     56|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2248|     56|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2249|     56|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2249:12): [True: 0, False: 56]
  ------------------
 2250|     56|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2250:20): [True: 0, False: 0]
  ------------------
 2251|     56|        return UA_ORDER_EQ;                                               \
 2252|     56|    }
ua_types.c:uInt16Order:
 2246|     42|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2247|     42|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2248|     42|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2249|     42|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2249:12): [True: 0, False: 42]
  ------------------
 2250|     42|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2250:20): [True: 0, False: 0]
  ------------------
 2251|     42|        return UA_ORDER_EQ;                                               \
 2252|     42|    }
ua_types.c:int32Order:
 2246|    136|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2247|    136|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2248|    136|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2249|    136|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2249:12): [True: 0, False: 136]
  ------------------
 2250|    136|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2250:20): [True: 0, False: 0]
  ------------------
 2251|    136|        return UA_ORDER_EQ;                                               \
 2252|    136|    }
ua_types.c:uInt32Order:
 2246|    859|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2247|    859|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2248|    859|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2249|    859|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2249:12): [True: 0, False: 859]
  ------------------
 2250|    859|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2250:20): [True: 0, False: 0]
  ------------------
 2251|    859|        return UA_ORDER_EQ;                                               \
 2252|    859|    }
ua_types.c:int64Order:
 2246|    315|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2247|    315|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2248|    315|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2249|    315|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2249:12): [True: 0, False: 315]
  ------------------
 2250|    315|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2250:20): [True: 0, False: 0]
  ------------------
 2251|    315|        return UA_ORDER_EQ;                                               \
 2252|    315|    }
ua_types.c:uInt64Order:
 2246|     18|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2247|     18|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2248|     18|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2249|     18|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2249:12): [True: 0, False: 18]
  ------------------
 2250|     18|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2250:20): [True: 0, False: 0]
  ------------------
 2251|     18|        return UA_ORDER_EQ;                                               \
 2252|     18|    }
ua_types.c:floatOrder:
 2266|     12|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2267|     12|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2268|     12|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2269|     12|        if(*p1 != *p2) {                                                  \
  ------------------
  |  Branch (2269:12): [True: 0, False: 12]
  ------------------
 2270|      0|            /* p1 is NaN */                                         \
 2271|      0|            if(*p1 != *p1) {                                        \
  ------------------
  |  Branch (2271:16): [True: 0, False: 0]
  ------------------
 2272|      0|                if(*p2 != *p2)                                      \
  ------------------
  |  Branch (2272:20): [True: 0, False: 0]
  ------------------
 2273|      0|                    return UA_ORDER_EQ;                             \
 2274|      0|                return UA_ORDER_LESS;                               \
 2275|      0|            }                                                       \
 2276|      0|            /* p2 is NaN */                                         \
 2277|      0|            if(*p2 != *p2)                                          \
  ------------------
  |  Branch (2277:16): [True: 0, False: 0]
  ------------------
 2278|      0|                return UA_ORDER_MORE;                               \
 2279|      0|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;     \
  ------------------
  |  Branch (2279:20): [True: 0, False: 0]
  ------------------
 2280|      0|        }                                                           \
 2281|     12|        return UA_ORDER_EQ;                                         \
 2282|     12|    }
ua_types.c:doubleOrder:
 2266|    677|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2267|    677|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2268|    677|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2269|    677|        if(*p1 != *p2) {                                                  \
  ------------------
  |  Branch (2269:12): [True: 3, False: 674]
  ------------------
 2270|      3|            /* p1 is NaN */                                         \
 2271|      3|            if(*p1 != *p1) {                                        \
  ------------------
  |  Branch (2271:16): [True: 3, False: 0]
  ------------------
 2272|      3|                if(*p2 != *p2)                                      \
  ------------------
  |  Branch (2272:20): [True: 3, False: 0]
  ------------------
 2273|      3|                    return UA_ORDER_EQ;                             \
 2274|      3|                return UA_ORDER_LESS;                               \
 2275|      3|            }                                                       \
 2276|      3|            /* p2 is NaN */                                         \
 2277|      3|            if(*p2 != *p2)                                          \
  ------------------
  |  Branch (2277:16): [True: 0, False: 0]
  ------------------
 2278|      0|                return UA_ORDER_MORE;                               \
 2279|      0|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;     \
  ------------------
  |  Branch (2279:20): [True: 0, False: 0]
  ------------------
 2280|      0|        }                                                           \
 2281|    677|        return UA_ORDER_EQ;                                         \
 2282|    677|    }
ua_types.c:stringOrder:
 2304|  9.92k|stringOrder(const void *p1_, const void *p2_, const UA_DataType *type) {
 2305|  9.92k|    const UA_String *p1 = (const UA_String*)p1_;
 2306|  9.92k|    const UA_String *p2 = (const UA_String*)p2_;
 2307|  9.92k|    if(p1->length != p2->length)
  ------------------
  |  Branch (2307:8): [True: 2.40k, False: 7.52k]
  ------------------
 2308|  2.40k|        return (p1->length < p2->length) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2308:16): [True: 1.48k, False: 913]
  ------------------
 2309|       |    /* For zero-length arrays, every pointer not NULL is considered a
 2310|       |     * UA_EMPTY_ARRAY_SENTINEL. */
 2311|  7.52k|    if(p1->data == p2->data) return UA_ORDER_EQ;
  ------------------
  |  Branch (2311:8): [True: 628, False: 6.90k]
  ------------------
 2312|  6.90k|    if(p1->data == NULL) return UA_ORDER_LESS;
  ------------------
  |  Branch (2312:8): [True: 0, False: 6.90k]
  ------------------
 2313|  6.90k|    if(p2->data == NULL) return UA_ORDER_MORE;
  ------------------
  |  Branch (2313:8): [True: 0, False: 6.90k]
  ------------------
 2314|  6.90k|    int cmp = memcmp((const char*)p1->data, (const char*)p2->data, p1->length);
 2315|  6.90k|    if(cmp != 0)
  ------------------
  |  Branch (2315:8): [True: 2.07k, False: 4.82k]
  ------------------
 2316|  2.07k|        return (cmp < 0) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2316:16): [True: 1.15k, False: 921]
  ------------------
 2317|  4.82k|    return UA_ORDER_EQ;
 2318|  6.90k|}
ua_types.c:qualifiedNameOrder:
 2361|     17|qualifiedNameOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2362|     17|    const UA_QualifiedName *p1 = (const UA_QualifiedName*)p1_;
 2363|     17|    const UA_QualifiedName *p2 = (const UA_QualifiedName*)p2_;
 2364|     17|    if(p1->namespaceIndex != p2->namespaceIndex)
  ------------------
  |  Branch (2364:8): [True: 0, False: 17]
  ------------------
 2365|      0|        return (p1->namespaceIndex < p2->namespaceIndex) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2365:16): [True: 0, False: 0]
  ------------------
 2366|     17|    return stringOrder(&p1->name, &p2->name, NULL);
 2367|     17|}
ua_types.c:localizedTextOrder:
 2370|     73|localizedTextOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2371|     73|    const UA_LocalizedText *p1 = (const UA_LocalizedText*)p1_;
 2372|     73|    const UA_LocalizedText *p2 = (const UA_LocalizedText*)p2_;
 2373|     73|    UA_Order o = stringOrder(&p1->locale, &p2->locale, NULL);
 2374|     73|    if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2374:8): [True: 0, False: 73]
  ------------------
 2375|      0|        return o;
 2376|     73|    return stringOrder(&p1->text, &p2->text, NULL);
 2377|     73|}
ua_types.c:extensionObjectOrder:
 2380|    101|extensionObjectOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2381|    101|    const UA_ExtensionObject *p1 = (const UA_ExtensionObject*)p1_;
 2382|    101|    const UA_ExtensionObject *p2 = (const UA_ExtensionObject*)p2_;
 2383|    101|    UA_ExtensionObjectEncoding enc1 = p1->encoding;
 2384|    101|    UA_ExtensionObjectEncoding enc2 = p2->encoding;
 2385|    101|    if(enc1 == UA_EXTENSIONOBJECT_DECODED_NODELETE)
  ------------------
  |  Branch (2385:8): [True: 0, False: 101]
  ------------------
 2386|      0|        enc1 = UA_EXTENSIONOBJECT_DECODED;
 2387|    101|    if(enc2 == UA_EXTENSIONOBJECT_DECODED_NODELETE)
  ------------------
  |  Branch (2387:8): [True: 0, False: 101]
  ------------------
 2388|      0|        enc2 = UA_EXTENSIONOBJECT_DECODED;
 2389|    101|    if(enc1 != enc2)
  ------------------
  |  Branch (2389:8): [True: 0, False: 101]
  ------------------
 2390|      0|        return (enc1 < enc2) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2390:16): [True: 0, False: 0]
  ------------------
 2391|       |
 2392|    101|    switch(enc1) {
 2393|    101|    case UA_EXTENSIONOBJECT_ENCODED_NOBODY:
  ------------------
  |  Branch (2393:5): [True: 101, False: 0]
  ------------------
 2394|    101|        return UA_ORDER_EQ;
 2395|       |
 2396|      0|    case UA_EXTENSIONOBJECT_ENCODED_BYTESTRING:
  ------------------
  |  Branch (2396:5): [True: 0, False: 101]
  ------------------
 2397|      0|    case UA_EXTENSIONOBJECT_ENCODED_XML:
  ------------------
  |  Branch (2397:5): [True: 0, False: 101]
  ------------------
 2398|      0|    case UA_EXTENSIONOBJECT_ENCODED_JSON: {
  ------------------
  |  Branch (2398:5): [True: 0, False: 101]
  ------------------
 2399|      0|            UA_Order o = nodeIdOrder(&p1->content.encoded.typeId,
 2400|      0|                                     &p2->content.encoded.typeId, NULL);
 2401|      0|            if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2401:16): [True: 0, False: 0]
  ------------------
 2402|      0|                return o;
 2403|      0|            return stringOrder((const UA_String*)&p1->content.encoded.body,
 2404|      0|                               (const UA_String*)&p2->content.encoded.body, NULL);
 2405|      0|        }
 2406|       |
 2407|      0|    case UA_EXTENSIONOBJECT_DECODED:
  ------------------
  |  Branch (2407:5): [True: 0, False: 101]
  ------------------
 2408|      0|    default: {
  ------------------
  |  Branch (2408:5): [True: 0, False: 101]
  ------------------
 2409|      0|            const UA_DataType *type1 = p1->content.decoded.type;
 2410|      0|            const UA_DataType *type2 = p2->content.decoded.type;
 2411|      0|            if(type1 != type2)
  ------------------
  |  Branch (2411:16): [True: 0, False: 0]
  ------------------
 2412|      0|                return ((uintptr_t)type1 < (uintptr_t)type2) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2412:24): [True: 0, False: 0]
  ------------------
 2413|      0|            if(!type1)
  ------------------
  |  Branch (2413:16): [True: 0, False: 0]
  ------------------
 2414|      0|                return UA_ORDER_EQ;
 2415|      0|            return orderJumpTable[type1->typeKind]
 2416|      0|                (p1->content.decoded.data, p2->content.decoded.data, type1);
 2417|      0|        }
 2418|    101|    }
 2419|    101|}
ua_types.c:dataValueOrder:
 2483|     13|dataValueOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2484|     13|    const UA_DataValue *p1 = (const UA_DataValue*)p1_;
 2485|     13|    const UA_DataValue *p2 = (const UA_DataValue*)p2_;
 2486|       |    /* Value */
 2487|     13|    if(p1->hasValue != p2->hasValue)
  ------------------
  |  Branch (2487:8): [True: 0, False: 13]
  ------------------
 2488|      0|        return (!p1->hasValue) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2488:16): [True: 0, False: 0]
  ------------------
 2489|     13|    if(p1->hasValue) {
  ------------------
  |  Branch (2489:8): [True: 0, False: 13]
  ------------------
 2490|      0|        UA_Order o = variantOrder(&p1->value, &p2->value, NULL);
 2491|      0|        if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2491:12): [True: 0, False: 0]
  ------------------
 2492|      0|            return o;
 2493|      0|    }
 2494|       |
 2495|       |    /* Status */
 2496|     13|    if(p1->hasStatus != p2->hasStatus)
  ------------------
  |  Branch (2496:8): [True: 0, False: 13]
  ------------------
 2497|      0|        return (!p1->hasStatus) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2497:16): [True: 0, False: 0]
  ------------------
 2498|     13|    if(p1->hasStatus && p1->status != p2->status)
  ------------------
  |  Branch (2498:8): [True: 0, False: 13]
  |  Branch (2498:25): [True: 0, False: 0]
  ------------------
 2499|      0|        return (p1->status < p2->status) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2499:16): [True: 0, False: 0]
  ------------------
 2500|       |
 2501|       |    /* SourceTimestamp */
 2502|     13|    if(p1->hasSourceTimestamp != p2->hasSourceTimestamp)
  ------------------
  |  Branch (2502:8): [True: 0, False: 13]
  ------------------
 2503|      0|        return (!p1->hasSourceTimestamp) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2503:16): [True: 0, False: 0]
  ------------------
 2504|     13|    if(p1->hasSourceTimestamp && p1->sourceTimestamp != p2->sourceTimestamp)
  ------------------
  |  Branch (2504:8): [True: 0, False: 13]
  |  Branch (2504:34): [True: 0, False: 0]
  ------------------
 2505|      0|        return (p1->sourceTimestamp < p2->sourceTimestamp) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2505:16): [True: 0, False: 0]
  ------------------
 2506|       |
 2507|       |    /* ServerTimestamp */
 2508|     13|    if(p1->hasServerTimestamp != p2->hasServerTimestamp)
  ------------------
  |  Branch (2508:8): [True: 0, False: 13]
  ------------------
 2509|      0|        return (!p1->hasServerTimestamp) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2509:16): [True: 0, False: 0]
  ------------------
 2510|     13|    if(p1->hasServerTimestamp && p1->serverTimestamp != p2->serverTimestamp)
  ------------------
  |  Branch (2510:8): [True: 0, False: 13]
  |  Branch (2510:34): [True: 0, False: 0]
  ------------------
 2511|      0|        return (p1->serverTimestamp < p2->serverTimestamp) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2511:16): [True: 0, False: 0]
  ------------------
 2512|       |
 2513|       |    /* SourcePicoseconds */
 2514|     13|    if(p1->hasSourcePicoseconds != p2->hasSourcePicoseconds)
  ------------------
  |  Branch (2514:8): [True: 0, False: 13]
  ------------------
 2515|      0|        return (!p1->hasSourcePicoseconds) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2515:16): [True: 0, False: 0]
  ------------------
 2516|     13|    if(p1->hasSourcePicoseconds && p1->sourcePicoseconds != p2->sourcePicoseconds)
  ------------------
  |  Branch (2516:8): [True: 0, False: 13]
  |  Branch (2516:36): [True: 0, False: 0]
  ------------------
 2517|      0|        return (p1->sourcePicoseconds < p2->sourcePicoseconds) ?
  ------------------
  |  Branch (2517:16): [True: 0, False: 0]
  ------------------
 2518|      0|            UA_ORDER_LESS : UA_ORDER_MORE;
 2519|       |
 2520|       |    /* ServerPicoseconds */
 2521|     13|    if(p1->hasServerPicoseconds != p2->hasServerPicoseconds)
  ------------------
  |  Branch (2521:8): [True: 0, False: 13]
  ------------------
 2522|      0|        return (!p1->hasServerPicoseconds) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2522:16): [True: 0, False: 0]
  ------------------
 2523|     13|    if(p1->hasServerPicoseconds && p1->serverPicoseconds != p2->serverPicoseconds)
  ------------------
  |  Branch (2523:8): [True: 0, False: 13]
  |  Branch (2523:36): [True: 0, False: 0]
  ------------------
 2524|      0|        return (p1->serverPicoseconds < p2->serverPicoseconds) ?
  ------------------
  |  Branch (2524:16): [True: 0, False: 0]
  ------------------
 2525|      0|            UA_ORDER_LESS : UA_ORDER_MORE;
 2526|       |
 2527|     13|    return UA_ORDER_EQ;
 2528|     13|}
ua_types.c:variantOrder:
 2446|  1.56k|variantOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2447|  1.56k|    const UA_Variant *p1 = (const UA_Variant*)p1_;
 2448|  1.56k|    const UA_Variant *p2 = (const UA_Variant*)p2_;
 2449|  1.56k|    if(p1->type != p2->type)
  ------------------
  |  Branch (2449:8): [True: 0, False: 1.56k]
  ------------------
 2450|      0|        return ((uintptr_t)p1->type < (uintptr_t)p2->type) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2450:16): [True: 0, False: 0]
  ------------------
 2451|       |
 2452|  1.56k|    UA_Order o;
 2453|  1.56k|    if(p1->type != NULL) {
  ------------------
  |  Branch (2453:8): [True: 1.55k, False: 8]
  ------------------
 2454|       |        /* Check if both variants are scalars or arrays */
 2455|  1.55k|        UA_Boolean s1 = UA_Variant_isScalar(p1);
 2456|  1.55k|        UA_Boolean s2 = UA_Variant_isScalar(p2);
 2457|  1.55k|        if(s1 != s2)
  ------------------
  |  Branch (2457:12): [True: 0, False: 1.55k]
  ------------------
 2458|      0|            return s1 ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2458:20): [True: 0, False: 0]
  ------------------
 2459|  1.55k|        if(s1) {
  ------------------
  |  Branch (2459:12): [True: 1.54k, False: 5]
  ------------------
 2460|  1.54k|            o = orderJumpTable[p1->type->typeKind](p1->data, p2->data, p1->type);
 2461|  1.54k|        } else {
 2462|       |            /* Mismatching array length? */
 2463|      5|            if(p1->arrayLength != p2->arrayLength)
  ------------------
  |  Branch (2463:16): [True: 0, False: 5]
  ------------------
 2464|      0|                return (p1->arrayLength < p2->arrayLength) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2464:24): [True: 0, False: 0]
  ------------------
 2465|      5|            o = arrayOrder(p1->data, p1->arrayLength, p2->data, p2->arrayLength, p1->type);
 2466|      5|        }
 2467|  1.55k|        if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2467:12): [True: 0, False: 1.55k]
  ------------------
 2468|      0|            return o;
 2469|  1.55k|    }
 2470|       |
 2471|  1.56k|    if(p1->arrayDimensionsSize != p2->arrayDimensionsSize)
  ------------------
  |  Branch (2471:8): [True: 0, False: 1.56k]
  ------------------
 2472|      0|        return (p1->arrayDimensionsSize < p2->arrayDimensionsSize) ?
  ------------------
  |  Branch (2472:16): [True: 0, False: 0]
  ------------------
 2473|      0|            UA_ORDER_LESS : UA_ORDER_MORE;
 2474|  1.56k|    o = UA_ORDER_EQ;
 2475|  1.56k|    if(p1->arrayDimensionsSize > 0)
  ------------------
  |  Branch (2475:8): [True: 0, False: 1.56k]
  ------------------
 2476|      0|        o = arrayOrder(p1->arrayDimensions, p1->arrayDimensionsSize,
 2477|      0|                       p2->arrayDimensions, p2->arrayDimensionsSize,
 2478|      0|                       &UA_TYPES[UA_TYPES_UINT32]);
  ------------------
  |  |  232|      0|#define UA_TYPES_UINT32 6
  ------------------
 2479|  1.56k|    return o;
 2480|  1.56k|}
ua_types.c:arrayOrder:
 2430|    161|           const UA_DataType *type) {
 2431|    161|    if(p1Length != p2Length)
  ------------------
  |  Branch (2431:8): [True: 0, False: 161]
  ------------------
 2432|      0|        return (p1Length < p2Length) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2432:16): [True: 0, False: 0]
  ------------------
 2433|    161|    uintptr_t u1 = (uintptr_t)p1;
 2434|    161|    uintptr_t u2 = (uintptr_t)p2;
 2435|    161|    for(size_t i = 0; i < p1Length; i++) {
  ------------------
  |  Branch (2435:23): [True: 0, False: 161]
  ------------------
 2436|      0|        UA_Order o = orderJumpTable[type->typeKind]((const void*)u1, (const void*)u2, type);
 2437|      0|        if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2437:12): [True: 0, False: 0]
  ------------------
 2438|      0|            return o;
 2439|      0|        u1 += type->memSize;
 2440|      0|        u2 += type->memSize;
 2441|      0|    }
 2442|    161|    return UA_ORDER_EQ;
 2443|    161|}
ua_types.c:diagnosticInfoOrder:
 2531|     25|diagnosticInfoOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2532|     25|    const UA_DiagnosticInfo *p1 = (const UA_DiagnosticInfo*)p1_;
 2533|     25|    const UA_DiagnosticInfo *p2 = (const UA_DiagnosticInfo*)p2_;
 2534|       |    /* SymbolicId */
 2535|     25|    if(p1->hasSymbolicId != p2->hasSymbolicId)
  ------------------
  |  Branch (2535:8): [True: 0, False: 25]
  ------------------
 2536|      0|        return (!p1->hasSymbolicId) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2536:16): [True: 0, False: 0]
  ------------------
 2537|     25|    if(p1->hasSymbolicId && p1->symbolicId != p2->symbolicId)
  ------------------
  |  Branch (2537:8): [True: 0, False: 25]
  |  Branch (2537:29): [True: 0, False: 0]
  ------------------
 2538|      0|        return (p1->symbolicId < p2->symbolicId) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2538:16): [True: 0, False: 0]
  ------------------
 2539|       |
 2540|       |    /* NamespaceUri */
 2541|     25|    if(p1->hasNamespaceUri != p2->hasNamespaceUri)
  ------------------
  |  Branch (2541:8): [True: 0, False: 25]
  ------------------
 2542|      0|        return (!p1->hasNamespaceUri) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2542:16): [True: 0, False: 0]
  ------------------
 2543|     25|    if(p1->hasNamespaceUri && p1->namespaceUri != p2->namespaceUri)
  ------------------
  |  Branch (2543:8): [True: 0, False: 25]
  |  Branch (2543:31): [True: 0, False: 0]
  ------------------
 2544|      0|        return (p1->namespaceUri < p2->namespaceUri) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2544:16): [True: 0, False: 0]
  ------------------
 2545|       |
 2546|       |    /* LocalizedText */
 2547|     25|    if(p1->hasLocalizedText != p2->hasLocalizedText)
  ------------------
  |  Branch (2547:8): [True: 0, False: 25]
  ------------------
 2548|      0|        return (!p1->hasLocalizedText) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2548:16): [True: 0, False: 0]
  ------------------
 2549|     25|    if(p1->hasLocalizedText && p1->localizedText != p2->localizedText)
  ------------------
  |  Branch (2549:8): [True: 0, False: 25]
  |  Branch (2549:32): [True: 0, False: 0]
  ------------------
 2550|      0|        return (p1->localizedText < p2->localizedText) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2550:16): [True: 0, False: 0]
  ------------------
 2551|       |
 2552|       |    /* Locale */
 2553|     25|    if(p1->hasLocale != p2->hasLocale)
  ------------------
  |  Branch (2553:8): [True: 0, False: 25]
  ------------------
 2554|      0|        return (!p1->hasLocale) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2554:16): [True: 0, False: 0]
  ------------------
 2555|     25|    if(p1->hasLocale && p1->locale != p2->locale)
  ------------------
  |  Branch (2555:8): [True: 0, False: 25]
  |  Branch (2555:25): [True: 0, False: 0]
  ------------------
 2556|      0|        return (p1->locale < p2->locale) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2556:16): [True: 0, False: 0]
  ------------------
 2557|       |
 2558|       |    /* AdditionalInfo */
 2559|     25|    if(p1->hasAdditionalInfo != p2->hasAdditionalInfo)
  ------------------
  |  Branch (2559:8): [True: 0, False: 25]
  ------------------
 2560|      0|        return (!p1->hasAdditionalInfo) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2560:16): [True: 0, False: 0]
  ------------------
 2561|     25|    if(p1->hasAdditionalInfo) {
  ------------------
  |  Branch (2561:8): [True: 0, False: 25]
  ------------------
 2562|      0|        UA_Order o = stringOrder(&p1->additionalInfo, &p2->additionalInfo, NULL);
 2563|      0|        if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2563:12): [True: 0, False: 0]
  ------------------
 2564|      0|            return o;
 2565|      0|    }
 2566|       |
 2567|       |    /* InnerStatusCode */
 2568|     25|    if(p1->hasInnerStatusCode != p2->hasInnerStatusCode)
  ------------------
  |  Branch (2568:8): [True: 0, False: 25]
  ------------------
 2569|      0|        return (!p1->hasInnerStatusCode) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2569:16): [True: 0, False: 0]
  ------------------
 2570|     25|    if(p1->hasInnerStatusCode && p1->innerStatusCode != p2->innerStatusCode)
  ------------------
  |  Branch (2570:8): [True: 0, False: 25]
  |  Branch (2570:34): [True: 0, False: 0]
  ------------------
 2571|      0|        return (p1->innerStatusCode < p2->innerStatusCode) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2571:16): [True: 0, False: 0]
  ------------------
 2572|       |
 2573|       |    /* InnerDiagnosticInfo */
 2574|     25|    if(p1->hasInnerDiagnosticInfo != p2->hasInnerDiagnosticInfo)
  ------------------
  |  Branch (2574:8): [True: 0, False: 25]
  ------------------
 2575|      0|        return (!p1->hasInnerDiagnosticInfo) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2575:16): [True: 0, False: 0]
  ------------------
 2576|     25|    if(p1->innerDiagnosticInfo == p2->innerDiagnosticInfo)
  ------------------
  |  Branch (2576:8): [True: 25, False: 0]
  ------------------
 2577|     25|        return UA_ORDER_EQ;
 2578|      0|    if(!p1->innerDiagnosticInfo || !p2->innerDiagnosticInfo)
  ------------------
  |  Branch (2578:8): [True: 0, False: 0]
  |  Branch (2578:36): [True: 0, False: 0]
  ------------------
 2579|      0|        return (!p1->innerDiagnosticInfo) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2579:16): [True: 0, False: 0]
  ------------------
 2580|      0|    return diagnosticInfoOrder(p1->innerDiagnosticInfo, p2->innerDiagnosticInfo, NULL);
 2581|      0|}
ua_types.c:structureOrder:
 2584|    342|structureOrder(const void *p1, const void *p2, const UA_DataType *type) {
 2585|    342|    uintptr_t u1 = (uintptr_t)p1;
 2586|    342|    uintptr_t u2 = (uintptr_t)p2;
 2587|    342|    UA_Order o = UA_ORDER_EQ;
 2588|  1.72k|    for(size_t i = 0; i < type->membersSize; ++i) {
  ------------------
  |  Branch (2588:23): [True: 1.37k, False: 342]
  ------------------
 2589|  1.37k|        const UA_DataTypeMember *m = &type->members[i];
 2590|  1.37k|        const UA_DataType *mt = m->memberType;
 2591|  1.37k|        u1 += m->padding;
 2592|  1.37k|        u2 += m->padding;
 2593|  1.37k|        if(!m->isOptional) {
  ------------------
  |  Branch (2593:12): [True: 1.37k, False: 0]
  ------------------
 2594|  1.37k|            if(!m->isArray) {
  ------------------
  |  Branch (2594:16): [True: 1.22k, False: 156]
  ------------------
 2595|  1.22k|                o = orderJumpTable[mt->typeKind]((const void *)u1, (const void *)u2, mt);
 2596|  1.22k|                u1 += mt->memSize;
 2597|  1.22k|                u2 += mt->memSize;
 2598|  1.22k|            } else {
 2599|    156|                size_t size1 = *(size_t*)u1;
 2600|    156|                size_t size2 = *(size_t*)u2;
 2601|    156|                u1 += sizeof(size_t);
 2602|    156|                u2 += sizeof(size_t);
 2603|    156|                o = arrayOrder(*(void* const*)u1, size1, *(void* const*)u2, size2, mt);
 2604|    156|                u1 += sizeof(void*);
 2605|    156|                u2 += sizeof(void*);
 2606|    156|            }
 2607|  1.37k|        } else {
 2608|      0|            if(!m->isArray) {
  ------------------
  |  Branch (2608:16): [True: 0, False: 0]
  ------------------
 2609|      0|                const void *pp1 = *(void* const*)u1;
 2610|      0|                const void *pp2 = *(void* const*)u2;
 2611|      0|                if(pp1 == pp2) {
  ------------------
  |  Branch (2611:20): [True: 0, False: 0]
  ------------------
 2612|      0|                    o = UA_ORDER_EQ;
 2613|      0|                } else if(pp1 == NULL) {
  ------------------
  |  Branch (2613:27): [True: 0, False: 0]
  ------------------
 2614|      0|                    o = UA_ORDER_LESS;
 2615|      0|                } else if(pp2 == NULL) {
  ------------------
  |  Branch (2615:27): [True: 0, False: 0]
  ------------------
 2616|      0|                    o = UA_ORDER_MORE;
 2617|      0|                } else {
 2618|      0|                    o = orderJumpTable[mt->typeKind](pp1, pp2, mt);
 2619|      0|                }
 2620|      0|            } else {
 2621|      0|                size_t sa1 = *(size_t*)u1;
 2622|      0|                size_t sa2 = *(size_t*)u2;
 2623|      0|                u1 += sizeof(size_t);
 2624|      0|                u2 += sizeof(size_t);
 2625|      0|                o = arrayOrder(*(void* const*)u1, sa1, *(void* const*)u2, sa2, mt);
 2626|      0|            }
 2627|      0|            u1 += sizeof(void*);
 2628|      0|            u2 += sizeof(void*);
 2629|      0|        }
 2630|       |
 2631|  1.37k|        if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2631:12): [True: 0, False: 1.37k]
  ------------------
 2632|      0|            break;
 2633|  1.37k|    }
 2634|    342|    return o;
 2635|    342|}

xml_tokenize:
   45|  8.31k|             xml_token *tokens, unsigned int max_tokens) {
   46|  8.31k|    xml_result res;
   47|  8.31k|    memset(&res, 0, sizeof(xml_result));
   48|  8.31k|    res.tokens = tokens;
   49|       |
   50|  8.31k|    yxml_t ctx;
   51|  8.31k|    char buf[512];
   52|  8.31k|    yxml_init(&ctx, buf, 512);
   53|       |
   54|  8.31k|    unsigned char top = 0;
   55|  8.31k|    unsigned tokenPos = 0;
   56|  8.31k|    xml_token *stack[32]; /* Max nesting depth is 32 */
   57|  8.31k|    xml_token backup_tokens[32]; /* To be used when the tokens run out */
   58|       |
   59|       |    /* Help clang-analyzer */
   60|       |#ifdef __clang_analyzer__
   61|       |    memset(stack, 0, 32 * sizeof(void*));
   62|       |    memset(backup_tokens, 0, 32 * sizeof(xml_token));
   63|       |#endif
   64|       |
   65|  8.31k|    stack[top] = &backup_tokens[top];
   66|  8.31k|    memset(stack[top], 0, sizeof(xml_token));
   67|       |
   68|  8.31k|    unsigned val_begin = 0;
   69|  8.31k|    unsigned pos = 0;
   70|   147M|    for(; pos < len; pos++) {
  ------------------
  |  Branch (70:11): [True: 147M, False: 7.15k]
  ------------------
   71|       |#ifdef __clang_analyzer__
   72|       |        UA_assert(stack[top] != NULL);
   73|       |#endif
   74|   147M|        yxml_ret_t xml_status = yxml_parse(&ctx, xml[pos]);
   75|   147M|        switch(xml_status) {
   76|      0|        case YXML_EEOF:
  ------------------
  |  Branch (76:9): [True: 0, False: 147M]
  ------------------
   77|    215|        case YXML_EREF:
  ------------------
  |  Branch (77:9): [True: 215, False: 147M]
  ------------------
   78|    312|        case YXML_ECLOSE:
  ------------------
  |  Branch (78:9): [True: 97, False: 147M]
  ------------------
   79|    320|        case YXML_ESTACK:
  ------------------
  |  Branch (79:9): [True: 8, False: 147M]
  ------------------
   80|  1.12k|        case YXML_ESYN:
  ------------------
  |  Branch (80:9): [True: 809, False: 147M]
  ------------------
   81|  1.12k|        default:
  ------------------
  |  Branch (81:9): [True: 0, False: 147M]
  ------------------
   82|  1.12k|            goto errout;
   83|  64.7M|        case YXML_OK:
  ------------------
  |  Branch (83:9): [True: 64.7M, False: 83.0M]
  ------------------
   84|  64.7M|            continue;
   85|  8.70M|        case YXML_ELEMSTART:
  ------------------
  |  Branch (85:9): [True: 8.70M, False: 139M]
  ------------------
   86|  9.92M|        case YXML_ATTRSTART: {
  ------------------
  |  Branch (86:9): [True: 1.21M, False: 146M]
  ------------------
   87|  9.92M|            if(xml_status == YXML_ELEMSTART) {
  ------------------
  |  Branch (87:16): [True: 8.70M, False: 1.21M]
  ------------------
   88|  8.70M|                stack[top]->children++;
   89|  8.70M|                stack[top]->content = UA_STRING_NULL; /* Only the leaf elements have content */
   90|  8.70M|            } else {
   91|  1.21M|                stack[top]->attributes++;
   92|  1.21M|            }
   93|  9.92M|            top++;
   94|  9.92M|            if(top >= 32)
  ------------------
  |  Branch (94:16): [True: 6, False: 9.92M]
  ------------------
   95|      6|                goto errout; /* nesting too deep */
   96|  9.92M|            stack[top] = (tokenPos < max_tokens) ? &tokens[tokenPos] : &backup_tokens[top];
  ------------------
  |  Branch (96:26): [True: 4.91M, False: 5.01M]
  ------------------
   97|  9.92M|            memset(stack[top], 0, sizeof(xml_token));
   98|  9.92M|            stack[top]->type = (xml_status == YXML_ELEMSTART) ? XML_TOKEN_ELEMENT : XML_TOKEN_ATTRIBUTE;
  ------------------
  |  Branch (98:32): [True: 8.70M, False: 1.21M]
  ------------------
   99|  9.92M|            stack[top]->name = backtrackName(xml, pos);
  100|  9.92M|            const char *start = xml + pos;
  101|  9.92M|            if(xml_status == YXML_ELEMSTART) {
  ------------------
  |  Branch (101:16): [True: 8.70M, False: 1.21M]
  ------------------
  102|  26.4M|                while(*start != '<')
  ------------------
  |  Branch (102:23): [True: 17.7M, False: 8.70M]
  ------------------
  103|  17.7M|                    start--;
  104|  8.70M|            }
  105|  9.92M|            stack[top]->start = (unsigned)(start - xml);
  106|  9.92M|            tokenPos++;
  107|  9.92M|            val_begin = 0; /* if the previous non-leaf element started to collect content */
  108|  9.92M|            break;
  109|  9.92M|        }
  110|  59.7M|        case YXML_CONTENT:
  ------------------
  |  Branch (110:9): [True: 59.7M, False: 87.9M]
  ------------------
  111|  63.1M|        case YXML_ATTRVAL:
  ------------------
  |  Branch (111:9): [True: 3.40M, False: 144M]
  ------------------
  112|  63.1M|            if(ctx.isReference && xml_status == YXML_CONTENT)
  ------------------
  |  Branch (112:16): [True: 1.60M, False: 61.5M]
  |  Branch (112:35): [True: 1.60M, False: 807]
  ------------------
  113|  1.60M|                stack[top]->contentEscaped = true;
  114|  63.1M|            if(val_begin == 0)
  ------------------
  |  Branch (114:16): [True: 292k, False: 62.9M]
  ------------------
  115|   292k|                val_begin = pos;
  116|  63.1M|            stack[top]->end = pos;
  117|  63.1M|            break;
  118|  8.69M|        case YXML_ELEMEND:
  ------------------
  |  Branch (118:9): [True: 8.69M, False: 139M]
  ------------------
  119|  9.91M|        case YXML_ATTREND:
  ------------------
  |  Branch (119:9): [True: 1.21M, False: 146M]
  ------------------
  120|  9.91M|            if(top == 0)
  ------------------
  |  Branch (120:16): [True: 0, False: 9.91M]
  ------------------
  121|      0|                goto errout; /* more closes than opens */
  122|  9.91M|            if(val_begin > 0) {
  ------------------
  |  Branch (122:16): [True: 182k, False: 9.73M]
  ------------------
  123|   182k|                stack[top]->content.data = (UA_Byte*)(uintptr_t)xml + val_begin;
  124|   182k|                stack[top]->content.length = stack[top]->end + 1 - val_begin;
  125|   182k|            }
  126|  9.91M|            stack[top]->end = pos;
  127|  9.91M|            if(xml_status == YXML_ELEMEND) {
  ------------------
  |  Branch (127:16): [True: 8.69M, False: 1.21M]
  ------------------
  128|       |                /* Saw "</", looking for the closing ">" */
  129|  8.70M|                while(stack[top]->end < len && xml[stack[top]->end] != '>')
  ------------------
  |  Branch (129:23): [True: 8.70M, False: 34]
  |  Branch (129:48): [True: 3.98k, False: 8.69M]
  ------------------
  130|  3.98k|                    stack[top]->end++;
  131|  8.69M|                stack[top]->end++;
  132|  8.69M|                if(stack[top]->end > len)
  ------------------
  |  Branch (132:20): [True: 34, False: 8.69M]
  ------------------
  133|     34|                    goto errout;
  134|  8.69M|            }
  135|  9.91M|            val_begin = 0;
  136|  9.91M|            top--;
  137|  9.91M|            break;
  138|  3.81k|        case YXML_PISTART:
  ------------------
  |  Branch (138:9): [True: 3.81k, False: 147M]
  ------------------
  139|  4.48k|        case YXML_PICONTENT:
  ------------------
  |  Branch (139:9): [True: 673, False: 147M]
  ------------------
  140|  8.14k|        case YXML_PIEND:
  ------------------
  |  Branch (140:9): [True: 3.66k, False: 147M]
  ------------------
  141|  8.14k|            continue; /* Ignore processing instructions */
  142|   147M|        }
  143|   147M|    }
  144|       |
  145|       |    /* Check that all elements were closed */
  146|  7.15k|    if(yxml_eof(&ctx) != YXML_OK)
  ------------------
  |  Branch (146:8): [True: 2.02k, False: 5.12k]
  ------------------
  147|  2.02k|        goto errout;
  148|       |
  149|  5.12k|    res.num_tokens = tokenPos;
  150|  5.12k|    if(tokenPos > max_tokens)
  ------------------
  |  Branch (150:8): [True: 460, False: 4.66k]
  ------------------
  151|    460|        res.error = XML_ERROR_OVERFLOW;
  152|  5.12k|    return res;
  153|       |
  154|  3.19k| errout:
  155|  3.19k|    res.error_pos = pos;
  156|  3.19k|    res.error = XML_ERROR_INVALID;
  157|  3.19k|    return res;
  158|  7.15k|}
UA_encodeXml:
  904|  3.10k|             const UA_EncodeXmlOptions *options) {
  905|  3.10k|    if(!src || !type)
  ------------------
  |  Branch (905:8): [True: 0, False: 3.10k]
  |  Branch (905:16): [True: 0, False: 3.10k]
  ------------------
  906|      0|        return UA_STATUSCODE_BADINTERNALERROR;
  ------------------
  |  |   29|      0|#define UA_STATUSCODE_BADINTERNALERROR ((UA_StatusCode) 0x80020000)
  ------------------
  907|       |
  908|       |    /* Allocate buffer */
  909|  3.10k|    UA_Boolean allocated = false;
  910|  3.10k|    status res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  3.10k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  911|  3.10k|    if(outBuf->length == 0) {
  ------------------
  |  Branch (911:8): [True: 0, False: 3.10k]
  ------------------
  912|      0|        size_t len = UA_calcSizeXml(src, type, options);
  913|      0|        res = UA_ByteString_allocBuffer(outBuf, len);
  914|      0|        if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (914:12): [True: 0, False: 0]
  ------------------
  915|      0|            return res;
  916|      0|        allocated = true;
  917|      0|    }
  918|       |
  919|       |    /* Set up the context */
  920|  3.10k|    CtxXml ctx;
  921|  3.10k|    memset(&ctx, 0, sizeof(ctx));
  922|  3.10k|    ctx.pos = outBuf->data;
  923|  3.10k|    ctx.end = &outBuf->data[outBuf->length];
  924|  3.10k|    ctx.depth = 0;
  925|  3.10k|    ctx.calcOnly = false;
  926|  3.10k|    if(options) {
  ------------------
  |  Branch (926:8): [True: 0, False: 3.10k]
  ------------------
  927|      0|        ctx.namespaceMapping = options->namespaceMapping;
  928|      0|        ctx.serverUris = options->serverUris;
  929|      0|        ctx.serverUrisSize = options->serverUrisSize;
  930|      0|    }
  931|       |
  932|       |    /* Encode */
  933|  3.10k|    res = writeXmlElement(&ctx, type->typeName, src, type);
  934|       |
  935|       |    /* Clean up */
  936|  3.10k|    if(res == UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  3.10k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (936:8): [True: 3.10k, False: 0]
  ------------------
  937|  3.10k|        outBuf->length = (size_t)((uintptr_t)ctx.pos - (uintptr_t)outBuf->data);
  938|      0|    else if(allocated)
  ------------------
  |  Branch (938:13): [True: 0, False: 0]
  ------------------
  939|      0|        UA_ByteString_clear(outBuf);
  940|       |
  941|  3.10k|    return res;
  942|  3.10k|}
UA_calcSizeXml:
  950|  1.60k|               const UA_EncodeXmlOptions *options) {
  951|  1.60k|    if(!src || !type)
  ------------------
  |  Branch (951:8): [True: 0, False: 1.60k]
  |  Branch (951:16): [True: 0, False: 1.60k]
  ------------------
  952|      0|        return UA_STATUSCODE_BADINTERNALERROR;
  ------------------
  |  |   29|      0|#define UA_STATUSCODE_BADINTERNALERROR ((UA_StatusCode) 0x80020000)
  ------------------
  953|       |
  954|       |    /* Set up the context */
  955|  1.60k|    CtxXml ctx;
  956|  1.60k|    memset(&ctx, 0, sizeof(ctx));
  957|  1.60k|    ctx.pos = NULL;
  958|  1.60k|    ctx.end = (const UA_Byte*)(uintptr_t)SIZE_MAX;
  959|  1.60k|    ctx.depth = 0;
  960|  1.60k|    if(options) {
  ------------------
  |  Branch (960:8): [True: 0, False: 1.60k]
  ------------------
  961|      0|        ctx.namespaceMapping = options->namespaceMapping;
  962|      0|        ctx.serverUris = options->serverUris;
  963|      0|        ctx.serverUrisSize = options->serverUrisSize;
  964|      0|    }
  965|       |
  966|  1.60k|    ctx.calcOnly = true;
  967|       |
  968|       |    /* Encode */
  969|  1.60k|    status ret = writeXmlElement(&ctx, type->typeName, src, type);
  970|  1.60k|    if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  1.60k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (970:8): [True: 49, False: 1.55k]
  ------------------
  971|     49|        return 0;
  972|  1.55k|    return (size_t)ctx.pos;
  973|  1.60k|}
UA_decodeXml:
 2124|  7.85k|             const UA_DecodeXmlOptions *options) {
 2125|  7.85k|    if(!dst || !src || !type)
  ------------------
  |  Branch (2125:8): [True: 0, False: 7.85k]
  |  Branch (2125:16): [True: 0, False: 7.85k]
  |  Branch (2125:24): [True: 0, False: 7.85k]
  ------------------
 2126|      0|        return UA_STATUSCODE_BADARGUMENTSMISSING;
  ------------------
  |  |  449|      0|#define UA_STATUSCODE_BADARGUMENTSMISSING ((UA_StatusCode) 0x80760000)
  ------------------
 2127|  7.85k|    if(src->length > UINT_MAX)
  ------------------
  |  Branch (2127:8): [True: 0, False: 7.85k]
  ------------------
 2128|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2129|       |
 2130|       |    /* Tokenize. Add a fake wrapper element if options->unwrapped is enabled. */
 2131|  7.85k|    unsigned tokensSize = 63;
 2132|  7.85k|    xml_token tokenbuf[64];
 2133|  7.85k|    xml_token *tokens = tokenbuf;
 2134|       |
 2135|  7.85k|    xml_result res = xml_tokenize((char*)src->data, (unsigned)src->length,
 2136|  7.85k|                                  tokens + 1, tokensSize);
 2137|  7.85k|    if(res.error == XML_ERROR_OVERFLOW) {
  ------------------
  |  Branch (2137:8): [True: 460, False: 7.39k]
  ------------------
 2138|    460|        if(res.num_tokens == UINT_MAX)
  ------------------
  |  Branch (2138:12): [True: 0, False: 460]
  ------------------
 2139|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2140|    460|        size_t requiredTokens = (size_t)res.num_tokens + 1;
 2141|    460|        if(requiredTokens > SIZE_MAX / sizeof(xml_token))
  ------------------
  |  Branch (2141:12): [True: 0, False: 460]
  ------------------
 2142|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2143|    460|        tokens = (xml_token*)UA_malloc(sizeof(xml_token) * requiredTokens);
  ------------------
  |  |   22|    460|#define UA_malloc(size) UA_mallocSingleton(size)
  ------------------
 2144|    460|        if(!tokens)
  ------------------
  |  Branch (2144:12): [True: 0, False: 460]
  ------------------
 2145|      0|            return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 2146|    460|        res = xml_tokenize((char*)src->data, (unsigned)src->length,
 2147|    460|                           tokens + 1, res.num_tokens);
 2148|    460|    }
 2149|       |
 2150|  7.85k|    if(res.error != XML_ERROR_NONE || res.num_tokens == 0) {
  ------------------
  |  Branch (2150:8): [True: 3.19k, False: 4.66k]
  |  Branch (2150:39): [True: 0, False: 4.66k]
  ------------------
 2151|  3.19k|        if(tokens != tokenbuf)
  ------------------
  |  Branch (2151:12): [True: 0, False: 3.19k]
  ------------------
 2152|      0|            UA_free(tokens);
  ------------------
  |  |   23|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 2153|  3.19k|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|  3.19k|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2154|  3.19k|    }
 2155|       |
 2156|       |    /* Set up the context */
 2157|  4.66k|    ParseCtxXml ctx;
 2158|  4.66k|    memset(&ctx, 0, sizeof(ParseCtxXml));
 2159|  4.66k|    ctx.xml = (const char*)src->data;
 2160|  4.66k|    ctx.tokens = tokens;
 2161|  4.66k|    ctx.tokensSize = res.num_tokens;
 2162|  4.66k|    if(options) {
  ------------------
  |  Branch (2162:8): [True: 82, False: 4.58k]
  ------------------
 2163|     82|        ctx.customTypes = options->customTypes;
 2164|     82|        ctx.namespaceMapping = options->namespaceMapping;
 2165|     82|        ctx.serverUris = options->serverUris;
 2166|     82|        ctx.serverUrisSize = options->serverUrisSize;
 2167|     82|    }
 2168|       |
 2169|  4.66k|    if(options && options->unwrapped) {
  ------------------
  |  Branch (2169:8): [True: 82, False: 4.58k]
  |  Branch (2169:19): [True: 0, False: 82]
  ------------------
 2170|       |        /* Set up the fake wrapper element */
 2171|      0|        xml_token *tok = tokens;
 2172|      0|        memset(tok, 0, sizeof(xml_token));
 2173|      0|        tok->type = XML_TOKEN_ELEMENT;
 2174|      0|        tok->name = UA_STRING((char*)(uintptr_t)type->typeName);
 2175|      0|        tok->children = 1;
 2176|      0|        tok->start = 0;
 2177|      0|        tok->end = (unsigned)src->length;
 2178|      0|        ctx.tokensSize++;
 2179|  4.66k|    } else {
 2180|  4.66k|        ctx.tokens++; /* Skip the first token */
 2181|  4.66k|    }
 2182|       |
 2183|       |    /* Decode */
 2184|  4.66k|    memset(dst, 0, type->memSize); /* Initialize the value */
 2185|  4.66k|    UA_StatusCode ret = decodeXmlJumpTable[type->typeKind](&ctx, dst, type);
 2186|  4.66k|    if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  4.66k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2186:8): [True: 1.42k, False: 3.23k]
  ------------------
 2187|  1.42k|        UA_clear(dst, type);
 2188|       |
 2189|       |    /* Clean up */
 2190|  4.66k|    if(tokens != tokenbuf)
  ------------------
  |  Branch (2190:8): [True: 460, False: 4.20k]
  ------------------
 2191|    460|        UA_free(tokens);
  ------------------
  |  |   23|    460|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 2192|  4.66k|    return ret;
 2193|  7.85k|}
ua_types_encoding_xml.c:backtrackName:
   29|  9.92M|backtrackName(const char *xml, unsigned end) {
   30|  9.92M|    unsigned pos = end;
   31|  49.3M|    for(; pos > 0; pos--) {
  ------------------
  |  Branch (31:11): [True: 49.3M, False: 0]
  ------------------
   32|  49.3M|        unsigned char c = (unsigned char)xml[pos-1];
   33|  49.3M|        if(c >= 'a' && c <= 'z') continue; /* isAlpha */
  ------------------
  |  Branch (33:12): [True: 39.0M, False: 10.2M]
  |  Branch (33:24): [True: 11.3M, False: 27.7M]
  ------------------
   34|  37.9M|        if(c >= 'A' && c <= 'Z') continue; /* isAlpha */
  ------------------
  |  Branch (34:12): [True: 27.9M, False: 9.98M]
  |  Branch (34:24): [True: 250k, False: 27.7M]
  ------------------
   35|  37.7M|        if(c >= '0' && c <= '9') continue; /* isNum */
  ------------------
  |  Branch (35:12): [True: 36.5M, False: 1.20M]
  |  Branch (35:24): [True: 51.1k, False: 36.4M]
  ------------------
   36|  37.6M|        if(c == '_' || c >= 128 || c == '-'|| c == '.') continue;
  ------------------
  |  Branch (36:12): [True: 4.19k, False: 37.6M]
  |  Branch (36:24): [True: 27.7M, False: 9.93M]
  |  Branch (36:36): [True: 14.9k, False: 9.92M]
  |  Branch (36:47): [True: 1.89k, False: 9.92M]
  ------------------
   37|  9.92M|        break;
   38|  37.6M|    }
   39|  9.92M|    UA_String s = {end - pos, (UA_Byte*)(uintptr_t)xml + pos};
   40|  9.92M|    return s;
   41|  9.92M|}
ua_types_encoding_xml.c:Boolean_encodeXml:
  347|      6|ENCODE_XML(Boolean) {
  348|      6|    const UA_Boolean *src = (const UA_Boolean*)src_;
  349|      6|    if(*src == true)
  ------------------
  |  Branch (349:8): [True: 3, False: 3]
  ------------------
  350|      3|        return xmlEncodeWriteChars(ctx, "true", 4);
  351|      3|    return xmlEncodeWriteChars(ctx, "false", 5);
  352|      6|}
ua_types_encoding_xml.c:xmlEncodeWriteChars:
  268|  9.70M|xmlEncodeWriteChars(CtxXml *ctx, const char *c, size_t len) {
  269|  9.70M|    if(ctx->calcOnly) {
  ------------------
  |  Branch (269:8): [True: 3.23M, False: 6.47M]
  ------------------
  270|  3.23M|        uintptr_t pos = (uintptr_t)ctx->pos;
  271|  3.23M|        if(len > UINTPTR_MAX - pos)
  ------------------
  |  Branch (271:12): [True: 0, False: 3.23M]
  ------------------
  272|      0|            return UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED;
  ------------------
  |  |   47|      0|#define UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED ((UA_StatusCode) 0x80080000)
  ------------------
  273|  3.23M|        ctx->pos = (uint8_t*)(pos + len);
  274|  3.23M|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  3.23M|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  275|  3.23M|    }
  276|  6.47M|    if(len > (size_t)(ctx->end - ctx->pos))
  ------------------
  |  Branch (276:8): [True: 0, False: 6.47M]
  ------------------
  277|      0|        return UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED;
  ------------------
  |  |   47|      0|#define UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED ((UA_StatusCode) 0x80080000)
  ------------------
  278|  6.47M|    if(len)
  ------------------
  |  Branch (278:8): [True: 4.85M, False: 1.61M]
  ------------------
  279|  4.85M|        memcpy(ctx->pos, c, len);
  280|  6.47M|    ctx->pos += len;
  281|  6.47M|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  6.47M|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  282|  6.47M|}
ua_types_encoding_xml.c:SByte_encodeXml:
  365|     63|ENCODE_XML(SByte) {
  366|     63|    const UA_SByte *src = (const UA_SByte*)src_;
  367|     63|    char buf[5];
  368|     63|    return encodeSigned(ctx, *src, buf);
  369|     63|}
ua_types_encoding_xml.c:encodeSigned:
  354|  1.09k|static status encodeSigned(CtxXml *ctx, UA_Int64 value, char* buffer) {
  355|  1.09k|    UA_UInt16 digits = itoaSigned(value, buffer);
  356|  1.09k|    return xmlEncodeWriteChars(ctx, buffer, digits);
  357|  1.09k|}
ua_types_encoding_xml.c:Byte_encodeXml:
  372|     39|ENCODE_XML(Byte) {
  373|     39|    const UA_Byte *src = (const UA_Byte*)src_;
  374|     39|    char buf[4];
  375|     39|    return encodeUnsigned(ctx, *src, buf);
  376|     39|}
ua_types_encoding_xml.c:encodeUnsigned:
  359|    279|static status encodeUnsigned(CtxXml *ctx, UA_UInt64 value, char* buffer) {
  360|    279|    UA_UInt16 digits = itoaUnsigned(value, buffer, 10);
  361|    279|    return xmlEncodeWriteChars(ctx, buffer, digits);
  362|    279|}
ua_types_encoding_xml.c:Int16_encodeXml:
  379|    156|ENCODE_XML(Int16) {
  380|    156|    const UA_Int16 *src = (const UA_Int16*)src_;
  381|    156|    char buf[7];
  382|    156|    return encodeSigned(ctx, *src, buf);
  383|    156|}
ua_types_encoding_xml.c:UInt16_encodeXml:
  386|     57|ENCODE_XML(UInt16) {
  387|     57|    const UA_UInt16 *src = (const UA_UInt16*)src_;
  388|     57|    char buf[6];
  389|     57|    return encodeUnsigned(ctx, *src, buf);
  390|     57|}
ua_types_encoding_xml.c:Int32_encodeXml:
  393|    276|ENCODE_XML(Int32) {
  394|    276|    const UA_Int32 *src = (const UA_Int32*)src_;
  395|    276|    char buf[12];
  396|    276|    return encodeSigned(ctx, *src, buf);
  397|    276|}
ua_types_encoding_xml.c:UInt32_encodeXml:
  418|    129|ENCODE_XML(UInt32) {
  419|    129|    const UA_UInt32 *src = (const UA_UInt32*)src_;
  420|    129|    char buf[11];
  421|    129|    return encodeUnsigned(ctx, *src, buf);
  422|    129|}
ua_types_encoding_xml.c:Int64_encodeXml:
  425|    597|ENCODE_XML(Int64) {
  426|    597|    const UA_Int64 *src = (const UA_Int64*)src_;
  427|    597|    char buf[23];
  428|    597|    return encodeSigned(ctx, *src, buf);
  429|    597|}
ua_types_encoding_xml.c:UInt64_encodeXml:
  432|     54|ENCODE_XML(UInt64) {
  433|     54|    const UA_UInt64 *src = (const UA_UInt64*)src_;
  434|     54|    char buf[23];
  435|     54|    return encodeUnsigned(ctx, *src, buf);
  436|     54|}
ua_types_encoding_xml.c:Double_encodeXml:
  455|  1.61k|ENCODE_XML(Double) {
  456|  1.61k|    const UA_Double *src = (const UA_Double*)src_;
  457|  1.61k|    char buffer[32];
  458|  1.61k|    size_t len;
  459|  1.61k|    if(*src != *src)
  ------------------
  |  Branch (459:8): [True: 9, False: 1.60k]
  ------------------
  460|      9|        return xmlEncodeWriteChars(ctx, "NaN", 3);
  461|  1.60k|    if(*src == INFINITY)
  ------------------
  |  Branch (461:8): [True: 9, False: 1.59k]
  ------------------
  462|      9|        return xmlEncodeWriteChars(ctx, "INF", 3);
  463|  1.59k|    if(*src == -INFINITY)
  ------------------
  |  Branch (463:8): [True: 6, False: 1.58k]
  ------------------
  464|      6|        return xmlEncodeWriteChars(ctx, "-INF", 4);
  465|       |
  466|  1.58k|    len = dtoa(*src, buffer);
  467|  1.58k|    return xmlEncodeWriteChars(ctx, buffer, len);
  468|  1.59k|}
ua_types_encoding_xml.c:String_encodeXml:
  471|  1.02k|ENCODE_XML(String) {
  472|  1.02k|    const UA_String *src = (const UA_String*)src_;
  473|  1.02k|    return xmlEncodeWriteEscapedChars(ctx, (const char*)src->data, src->length);
  474|  1.02k|}
ua_types_encoding_xml.c:xmlEncodeWriteEscapedChars:
  289|  1.02k|xmlEncodeWriteEscapedChars(CtxXml *ctx, const char *c, size_t len) {
  290|  1.02k|    if(len == 0)
  ------------------
  |  Branch (290:8): [True: 18, False: 1.00k]
  ------------------
  291|     18|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     18|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  292|  1.00k|    status ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  1.00k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  293|  1.00k|    size_t start = 0;
  294|  41.2M|    for(size_t i = 0; i < len; i++) {
  ------------------
  |  Branch (294:23): [True: 41.2M, False: 1.00k]
  ------------------
  295|  41.2M|        const char *entity;
  296|  41.2M|        size_t entityLen;
  297|  41.2M|        switch(c[i]) {
  298|    210|        case '&':  entity = "&amp;";  entityLen = 5; break;
  ------------------
  |  Branch (298:9): [True: 210, False: 41.2M]
  ------------------
  299|    861|        case '<':  entity = "&lt;";   entityLen = 4; break;
  ------------------
  |  Branch (299:9): [True: 861, False: 41.2M]
  ------------------
  300|   114k|        case '>':  entity = "&gt;";   entityLen = 4; break;
  ------------------
  |  Branch (300:9): [True: 114k, False: 41.1M]
  ------------------
  301|  3.99M|        case '"':  entity = "&quot;"; entityLen = 6; break;
  ------------------
  |  Branch (301:9): [True: 3.99M, False: 37.2M]
  ------------------
  302|   698k|        case '\'': entity = "&apos;"; entityLen = 6; break;
  ------------------
  |  Branch (302:9): [True: 698k, False: 40.5M]
  ------------------
  303|  36.4M|        default: continue;
  ------------------
  |  Branch (303:9): [True: 36.4M, False: 4.80M]
  ------------------
  304|  41.2M|        }
  305|  4.80M|        ret |= xmlEncodeWriteChars(ctx, &c[start], i - start);
  306|  4.80M|        ret |= xmlEncodeWriteChars(ctx, entity, entityLen);
  307|  4.80M|        start = i + 1;
  308|  4.80M|    }
  309|  1.00k|    return ret | xmlEncodeWriteChars(ctx, &c[start], len - start);
  310|  1.00k|}
ua_types_encoding_xml.c:ByteString_encodeXml:
  502|     72|ENCODE_XML(ByteString) {
  503|     72|    const UA_ByteString *src = (const UA_ByteString*)src_;
  504|     72|    if(!src->data)
  ------------------
  |  Branch (504:8): [True: 0, False: 72]
  ------------------
  505|      0|        return xmlEncodeWriteChars(ctx, "null", 4);
  506|       |
  507|     72|    if(src->length == 0)
  ------------------
  |  Branch (507:8): [True: 72, False: 0]
  ------------------
  508|     72|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     72|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  509|       |
  510|      0|    size_t flen = 0;
  511|      0|    unsigned char *ba64 = UA_base64(src->data, src->length, &flen);
  512|       |
  513|       |    /* Not converted, no mem */
  514|      0|    if(!ba64)
  ------------------
  |  Branch (514:8): [True: 0, False: 0]
  ------------------
  515|      0|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
  516|       |
  517|      0|    if(ctx->pos + flen > ctx->end) {
  ------------------
  |  Branch (517:8): [True: 0, False: 0]
  ------------------
  518|      0|        UA_free(ba64);
  ------------------
  |  |   23|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
  519|      0|        return UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED;
  ------------------
  |  |   47|      0|#define UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED ((UA_StatusCode) 0x80080000)
  ------------------
  520|      0|    }
  521|       |
  522|       |    /* Copy flen bytes to output stream. */
  523|      0|    if(!ctx->calcOnly)
  ------------------
  |  Branch (523:8): [True: 0, False: 0]
  ------------------
  524|      0|        memcpy(ctx->pos, ba64, flen);
  525|      0|    ctx->pos += flen;
  526|       |
  527|       |    /* Base64 result no longer needed */
  528|      0|    UA_free(ba64);
  ------------------
  |  |   23|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
  529|       |
  530|      0|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  531|      0|}
ua_types_encoding_xml.c:XmlElement_encodeXml:
  477|    549|ENCODE_XML(XmlElement) {
  478|    549|    const UA_XmlElement *src = (const UA_XmlElement*)src_;
  479|    549|    return xmlEncodeWriteChars(ctx, (const char*)src->data, src->length);
  480|    549|}
ua_types_encoding_xml.c:NodeId_encodeXml:
  534|    246|ENCODE_XML(NodeId) {
  535|    246|    const UA_NodeId *src = (const UA_NodeId*)src_;
  536|    246|    UA_StatusCode ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    246|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  537|    246|    UA_String out = UA_STRING_NULL;
  538|    246|    ret |= UA_NodeId_printEx(src, &out, ctx->namespaceMapping);
  539|    246|    ret |= writeXmlElement(ctx, UA_XML_NODEID_IDENTIFIER,
  ------------------
  |  |  245|    246|#define UA_XML_NODEID_IDENTIFIER "Identifier"
  ------------------
  540|    246|                           &out, &UA_TYPES[UA_TYPES_STRING]);
  ------------------
  |  |  402|    246|#define UA_TYPES_STRING 11
  ------------------
  541|    246|    UA_String_clear(&out);
  542|    246|    return ret;
  543|    246|}
ua_types_encoding_xml.c:QualifiedName_encodeXml:
  568|      3|ENCODE_XML(QualifiedName) {
  569|      3|    const UA_QualifiedName *src = (const UA_QualifiedName*)src_;
  570|       |    /* Map the NamespaceIndex */
  571|      3|    UA_UInt16 index = src->namespaceIndex;
  572|      3|    if(ctx->namespaceMapping)
  ------------------
  |  Branch (572:8): [True: 0, False: 3]
  ------------------
  573|      0|        index = UA_NamespaceMapping_local2Remote(ctx->namespaceMapping, index);
  574|       |
  575|       |    /* Write out the elements. Same rule as in encodeXmlStructure: an absent
  576|       |     * (NULL) String is skipped so it does not come back as an empty String
  577|       |     * on decoding. An empty-but-present String is still written. */
  578|      3|    UA_StatusCode ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      3|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  579|      3|    ret |= writeXmlElement(ctx, UA_XML_QUALIFIEDNAME_NAMESPACEINDEX,
  ------------------
  |  |  248|      3|#define UA_XML_QUALIFIEDNAME_NAMESPACEINDEX "NamespaceIndex"
  ------------------
  580|      3|                           &index, &UA_TYPES[UA_TYPES_UINT16]);
  ------------------
  |  |  164|      3|#define UA_TYPES_UINT16 4
  ------------------
  581|      3|    if(src->name.data)
  ------------------
  |  Branch (581:8): [True: 0, False: 3]
  ------------------
  582|      0|        ret |= writeXmlElement(ctx, UA_XML_QUALIFIEDNAME_NAME,
  ------------------
  |  |  249|      0|#define UA_XML_QUALIFIEDNAME_NAME "Name"
  ------------------
  583|      0|                               &src->name, &UA_TYPES[UA_TYPES_STRING]);
  ------------------
  |  |  402|      0|#define UA_TYPES_STRING 11
  ------------------
  584|      3|    return ret;
  585|      3|}
ua_types_encoding_xml.c:LocalizedText_encodeXml:
  588|      3|ENCODE_XML(LocalizedText) {
  589|      3|    const UA_LocalizedText *src = (const UA_LocalizedText*)src_;
  590|       |    /* Same rule as in encodeXmlStructure: an absent (NULL) String is skipped
  591|       |     * so it does not come back as an empty String on decoding. An
  592|       |     * empty-but-present String is still written. */
  593|      3|    UA_StatusCode ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      3|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  594|      3|    if(src->locale.data)
  ------------------
  |  Branch (594:8): [True: 0, False: 3]
  ------------------
  595|      0|        ret |= writeXmlElement(ctx, UA_XML_LOCALIZEDTEXT_LOCALE,
  ------------------
  |  |  250|      0|#define UA_XML_LOCALIZEDTEXT_LOCALE "Locale"
  ------------------
  596|      0|                               &src->locale, &UA_TYPES[UA_TYPES_STRING]);
  ------------------
  |  |  402|      0|#define UA_TYPES_STRING 11
  ------------------
  597|      3|    if(src->text.data)
  ------------------
  |  Branch (597:8): [True: 0, False: 3]
  ------------------
  598|      0|        ret |= writeXmlElement(ctx, UA_XML_LOCALIZEDTEXT_TEXT,
  ------------------
  |  |  251|      0|#define UA_XML_LOCALIZEDTEXT_TEXT "Text"
  ------------------
  599|      0|                               &src->text, &UA_TYPES[UA_TYPES_STRING]);
  ------------------
  |  |  402|      0|#define UA_TYPES_STRING 11
  ------------------
  600|      3|    return ret;
  601|      3|}
ua_types_encoding_xml.c:ExtensionObject_encodeXml:
  604|    249|ENCODE_XML(ExtensionObject) {
  605|    249|    const UA_ExtensionObject *src = (const UA_ExtensionObject*)src_;
  606|    249|    if(src->encoding == UA_EXTENSIONOBJECT_ENCODED_NOBODY)
  ------------------
  |  Branch (606:8): [True: 3, False: 246]
  ------------------
  607|      3|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      3|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  608|    246|    if(src->encoding == UA_EXTENSIONOBJECT_ENCODED_JSON)
  ------------------
  |  Branch (608:8): [True: 0, False: 246]
  ------------------
  609|      0|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
  610|       |
  611|       |    /* The body of the ExtensionObject contains a single element
  612|       |     * which is either a ByteString or XML encoded Structure:
  613|       |     * https://reference.opcfoundation.org/Core/Part6/v104/docs/5.3.1.16. */
  614|    246|    UA_StatusCode ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    246|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  615|    246|    if(src->encoding == UA_EXTENSIONOBJECT_ENCODED_BYTESTRING ||
  ------------------
  |  Branch (615:8): [True: 0, False: 246]
  ------------------
  616|    246|       src->encoding == UA_EXTENSIONOBJECT_ENCODED_XML) {
  ------------------
  |  Branch (616:8): [True: 0, False: 246]
  ------------------
  617|       |        /* Write the type NodeId */
  618|      0|        ret = writeXmlElement(ctx, UA_XML_EXTENSIONOBJECT_TYPEID,
  ------------------
  |  |  252|      0|#define UA_XML_EXTENSIONOBJECT_TYPEID "TypeId"
  ------------------
  619|      0|                              &src->content.encoded.typeId,
  620|      0|                              &UA_TYPES[UA_TYPES_NODEID]);
  ------------------
  |  |  572|      0|#define UA_TYPES_NODEID 16
  ------------------
  621|       |
  622|       |        /* Write the body */
  623|      0|        ret |= writeXmlElemNameBegin(ctx, UA_XML_EXTENSIONOBJECT_BODY);
  ------------------
  |  |  253|      0|#define UA_XML_EXTENSIONOBJECT_BODY "Body"
  ------------------
  624|      0|        if(src->encoding == UA_EXTENSIONOBJECT_ENCODED_BYTESTRING)
  ------------------
  |  Branch (624:12): [True: 0, False: 0]
  ------------------
  625|      0|           ret |= writeXmlElement(ctx, "ByteString", &src->content.encoded.body,
  626|      0|                                  &UA_TYPES[UA_TYPES_BYTESTRING]);
  ------------------
  |  |  504|      0|#define UA_TYPES_BYTESTRING 14
  ------------------
  627|      0|        else
  628|       |            /* An XML encoded body is markup already, it goes out as it is */
  629|      0|            ret |= ENCODE_DIRECT_XML(&src->content.encoded.body, XmlElement);
  ------------------
  |  |  265|      0|    TYPE##_encodeXml(ctx, (const UA_##TYPE*)SRC, NULL)
  ------------------
  630|      0|        ret |= writeXmlElemNameEnd(ctx, UA_XML_EXTENSIONOBJECT_BODY);
  ------------------
  |  |  253|      0|#define UA_XML_EXTENSIONOBJECT_BODY "Body"
  ------------------
  631|    246|    } else {
  632|       |        /* Write the decoded value */
  633|    246|        const UA_DataType *decoded_type = src->content.decoded.type;
  634|       |
  635|       |        /* Write the type NodeId */
  636|    246|        ret = writeXmlElement(ctx, UA_XML_EXTENSIONOBJECT_TYPEID,
  ------------------
  |  |  252|    246|#define UA_XML_EXTENSIONOBJECT_TYPEID "TypeId"
  ------------------
  637|    246|                              &decoded_type->typeId, &UA_TYPES[UA_TYPES_NODEID]);
  ------------------
  |  |  572|    246|#define UA_TYPES_NODEID 16
  ------------------
  638|       |
  639|       |        /* Write the body */
  640|    246|        ret |= writeXmlElemNameBegin(ctx, UA_XML_EXTENSIONOBJECT_BODY);
  ------------------
  |  |  253|    246|#define UA_XML_EXTENSIONOBJECT_BODY "Body"
  ------------------
  641|    246|        ret |= writeXmlElement(ctx, decoded_type->typeName, src->content.decoded.data, decoded_type);
  642|    246|        ret |= writeXmlElemNameEnd(ctx, UA_XML_EXTENSIONOBJECT_BODY);
  ------------------
  |  |  253|    246|#define UA_XML_EXTENSIONOBJECT_BODY "Body"
  ------------------
  643|    246|    }
  644|       |
  645|    246|    return ret;
  646|    246|}
ua_types_encoding_xml.c:writeXmlElemNameBegin:
  313|  15.0k|writeXmlElemNameBegin(CtxXml *ctx, const char* name) {
  314|  15.0k|    if(ctx->depth >= UA_XML_ENCODING_MAX_RECURSION - 1)
  ------------------
  |  |  246|  15.0k|#define UA_XML_ENCODING_MAX_RECURSION 100
  ------------------
  |  Branch (314:8): [True: 0, False: 15.0k]
  ------------------
  315|      0|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
  316|  15.0k|    status ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  15.0k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  317|  15.0k|    ret |= xmlEncodeWriteChars(ctx, "<", 1);
  318|  15.0k|    ret |= xmlEncodeWriteChars(ctx, name, strlen(name));
  319|  15.0k|    ret |= xmlEncodeWriteChars(ctx, ">", 1);
  320|  15.0k|    ctx->depth++;
  321|  15.0k|    return ret;
  322|  15.0k|}
ua_types_encoding_xml.c:writeXmlElemNameEnd:
  325|  15.0k|writeXmlElemNameEnd(CtxXml *ctx, const char* name) {
  326|  15.0k|    if(ctx->depth == 0)
  ------------------
  |  Branch (326:8): [True: 0, False: 15.0k]
  ------------------
  327|      0|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
  328|  15.0k|    ctx->depth--;
  329|  15.0k|    status ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  15.0k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  330|  15.0k|    ret |= xmlEncodeWriteChars(ctx, "</", 2);
  331|  15.0k|    ret |= xmlEncodeWriteChars(ctx, name, strlen(name));
  332|  15.0k|    ret |= xmlEncodeWriteChars(ctx, ">", 1);
  333|  15.0k|    return ret;
  334|  15.0k|}
ua_types_encoding_xml.c:DataValue_encodeXml:
  809|      3|ENCODE_XML(DataValue) {
  810|      3|    const UA_DataValue *src = (const UA_DataValue*)src_;
  811|      3|    UA_StatusCode ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      3|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  812|      3|    if(src->hasValue)
  ------------------
  |  Branch (812:8): [True: 0, False: 3]
  ------------------
  813|      0|        ret |= Variant_encodeXml(ctx, &src->value, &UA_TYPES[UA_TYPES_VARIANT]);
  ------------------
  |  |  810|      0|#define UA_TYPES_VARIANT 23
  ------------------
  814|      3|    if(src->hasStatus)
  ------------------
  |  Branch (814:8): [True: 0, False: 3]
  ------------------
  815|      0|        ret |= writeXmlElement(ctx, "StatusCode", &src->status,
  816|      0|                               &UA_TYPES[UA_TYPES_STATUSCODE]);
  ------------------
  |  |  640|      0|#define UA_TYPES_STATUSCODE 18
  ------------------
  817|      3|    if(src->hasSourceTimestamp)
  ------------------
  |  Branch (817:8): [True: 0, False: 3]
  ------------------
  818|      0|        ret |= writeXmlElement(ctx, "SourceTimestamp", &src->sourceTimestamp,
  819|      0|                               &UA_TYPES[UA_TYPES_DATETIME]);
  ------------------
  |  |  436|      0|#define UA_TYPES_DATETIME 12
  ------------------
  820|      3|    if(src->hasSourcePicoseconds)
  ------------------
  |  Branch (820:8): [True: 0, False: 3]
  ------------------
  821|      0|        ret |= writeXmlElement(ctx, "SourcePicoseconds", &src->sourcePicoseconds,
  822|      0|                               &UA_TYPES[UA_TYPES_UINT16]);
  ------------------
  |  |  164|      0|#define UA_TYPES_UINT16 4
  ------------------
  823|      3|    if(src->hasServerTimestamp)
  ------------------
  |  Branch (823:8): [True: 0, False: 3]
  ------------------
  824|      0|        ret |= writeXmlElement(ctx, "ServerTimestamp", &src->serverTimestamp,
  825|      0|                               &UA_TYPES[UA_TYPES_DATETIME]);
  ------------------
  |  |  436|      0|#define UA_TYPES_DATETIME 12
  ------------------
  826|      3|    if(src->hasServerPicoseconds)
  ------------------
  |  Branch (826:8): [True: 0, False: 3]
  ------------------
  827|      0|        ret |= writeXmlElement(ctx, "ServerPicoseconds", &src->serverPicoseconds,
  828|      0|                               &UA_TYPES[UA_TYPES_UINT16]);
  ------------------
  |  |  164|      0|#define UA_TYPES_UINT16 4
  ------------------
  829|      3|    return ret;
  830|      3|}
ua_types_encoding_xml.c:Variant_encodeXml:
  735|  4.71k|ENCODE_XML(Variant) {
  736|  4.71k|    const UA_Variant *src = (const UA_Variant*)src_;
  737|  4.71k|    if(!src->type)
  ------------------
  |  Branch (737:8): [True: 49, False: 4.66k]
  ------------------
  738|     49|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|     49|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
  739|       |
  740|       |    /* Set the array type in the encoding mask */
  741|  4.66k|    const bool isArray = src->arrayLength > 0 || src->data <= UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  757|  9.32k|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  |  Branch (741:26): [True: 0, False: 4.66k]
  |  Branch (741:50): [True: 15, False: 4.64k]
  ------------------
  742|       |
  743|  4.66k|    if(src->arrayDimensionsSize > 1) {
  ------------------
  |  Branch (743:8): [True: 0, False: 4.66k]
  ------------------
  744|      0|        if(!isArray || !src->arrayDimensions || src->arrayLength == 0 || !src->data)
  ------------------
  |  Branch (744:12): [True: 0, False: 0]
  |  Branch (744:24): [True: 0, False: 0]
  |  Branch (744:49): [True: 0, False: 0]
  |  Branch (744:74): [True: 0, False: 0]
  ------------------
  745|      0|            return UA_STATUSCODE_BADNOTSUPPORTED;
  ------------------
  |  |  230|      0|#define UA_STATUSCODE_BADNOTSUPPORTED ((UA_StatusCode) 0x803D0000)
  ------------------
  746|      0|        size_t elements = 1;
  747|      0|        for(size_t i = 0; i < src->arrayDimensionsSize; i++) {
  ------------------
  |  Branch (747:27): [True: 0, False: 0]
  ------------------
  748|      0|            UA_UInt32 dimension = src->arrayDimensions[i];
  749|      0|            if(dimension == 0 || dimension > UA_INT32_MAX || elements > SIZE_MAX / dimension)
  ------------------
  |  |  101|      0|#define UA_INT32_MAX 2147483647L
  ------------------
  |  Branch (749:16): [True: 0, False: 0]
  |  Branch (749:34): [True: 0, False: 0]
  |  Branch (749:62): [True: 0, False: 0]
  ------------------
  750|      0|                return UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED;
  ------------------
  |  |   47|      0|#define UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED ((UA_StatusCode) 0x80080000)
  ------------------
  751|      0|            elements *= dimension;
  752|      0|        }
  753|      0|        if(elements != src->arrayLength)
  ------------------
  |  Branch (753:12): [True: 0, False: 0]
  ------------------
  754|      0|            return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
  755|       |
  756|      0|        status ret = writeXmlElemNameBegin(ctx, UA_XML_VARIANT_VALUE);
  ------------------
  |  |  255|      0|#define UA_XML_VARIANT_VALUE "Value"
  ------------------
  757|      0|        ret |= writeXmlElemNameBegin(ctx, "Matrix");
  758|      0|        ret |= writeXmlElemNameBegin(ctx, "Dimensions");
  759|      0|        for(size_t i = 0; i < src->arrayDimensionsSize && ret == UA_STATUSCODE_GOOD; i++) {
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (759:27): [True: 0, False: 0]
  |  Branch (759:59): [True: 0, False: 0]
  ------------------
  760|      0|            UA_Int32 dimension = (UA_Int32)src->arrayDimensions[i];
  761|      0|            ret |= writeXmlElement(ctx, "Int32", &dimension, &UA_TYPES[UA_TYPES_INT32]);
  ------------------
  |  |  198|      0|#define UA_TYPES_INT32 5
  ------------------
  762|      0|        }
  763|      0|        ret |= writeXmlElemNameEnd(ctx, "Dimensions");
  764|      0|        ret |= writeXmlElemNameBegin(ctx, "Elements");
  765|      0|        const UA_DataType *elementType = src->type;
  766|      0|        const UA_Boolean wrap = elementType->typeKind > UA_DATATYPEKIND_DIAGNOSTICINFO &&
  ------------------
  |  Branch (766:33): [True: 0, False: 0]
  ------------------
  767|      0|                                elementType->typeKind != UA_DATATYPEKIND_ENUM;
  ------------------
  |  Branch (767:33): [True: 0, False: 0]
  ------------------
  768|      0|        if(elementType->typeKind == UA_DATATYPEKIND_ENUM)
  ------------------
  |  Branch (768:12): [True: 0, False: 0]
  ------------------
  769|      0|            elementType = &UA_TYPES[UA_TYPES_INT32];
  ------------------
  |  |  198|      0|#define UA_TYPES_INT32 5
  ------------------
  770|      0|        for(size_t i = 0; i < src->arrayLength && ret == UA_STATUSCODE_GOOD; i++) {
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (770:27): [True: 0, False: 0]
  |  Branch (770:51): [True: 0, False: 0]
  ------------------
  771|      0|            const void *element = (const UA_Byte*)src->data + i * src->type->memSize;
  772|      0|            if(wrap) {
  ------------------
  |  Branch (772:16): [True: 0, False: 0]
  ------------------
  773|      0|                UA_ExtensionObject object;
  774|      0|                UA_ExtensionObject_setValue(&object, (void*)(uintptr_t)element, src->type);
  775|      0|                ret |= writeXmlElement(ctx, "ExtensionObject", &object,
  776|      0|                                       &UA_TYPES[UA_TYPES_EXTENSIONOBJECT]);
  ------------------
  |  |  742|      0|#define UA_TYPES_EXTENSIONOBJECT 21
  ------------------
  777|      0|            } else {
  778|      0|                ret |= writeXmlElement(ctx, elementType->typeName, element, elementType);
  779|      0|            }
  780|      0|        }
  781|      0|        ret |= writeXmlElemNameEnd(ctx, "Elements");
  782|      0|        ret |= writeXmlElemNameEnd(ctx, "Matrix");
  783|      0|        ret |= writeXmlElemNameEnd(ctx, UA_XML_VARIANT_VALUE);
  ------------------
  |  |  255|      0|#define UA_XML_VARIANT_VALUE "Value"
  ------------------
  784|      0|        return ret;
  785|      0|    }
  786|       |
  787|  4.66k|    UA_StatusCode ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  4.66k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  788|  4.66k|    ret |= writeXmlElemNameBegin(ctx, UA_XML_VARIANT_VALUE);
  ------------------
  |  |  255|  4.66k|#define UA_XML_VARIANT_VALUE "Value"
  ------------------
  789|  4.66k|    if(!isArray) {
  ------------------
  |  Branch (789:8): [True: 4.64k, False: 15]
  ------------------
  790|  4.64k|        const UA_DataType *srctype = src->type;
  791|  4.64k|        void *ptr = src->data;
  792|  4.64k|        UA_ExtensionObject eo;
  793|  4.64k|        if(srctype->typeKind == UA_DATATYPEKIND_ENUM) {
  ------------------
  |  Branch (793:12): [True: 0, False: 4.64k]
  ------------------
  794|      0|            srctype = &UA_TYPES[UA_TYPES_INT32];
  ------------------
  |  |  198|      0|#define UA_TYPES_INT32 5
  ------------------
  795|  4.64k|        } else if(srctype->typeKind > UA_DATATYPEKIND_DIAGNOSTICINFO) {
  ------------------
  |  Branch (795:19): [True: 246, False: 4.40k]
  ------------------
  796|       |            /* Wrap value in an ExtensionObject */
  797|    246|            UA_ExtensionObject_setValue(&eo, (void*)(uintptr_t)ptr, srctype);
  798|    246|            ptr = &eo;
  799|    246|            srctype = &UA_TYPES[UA_TYPES_EXTENSIONOBJECT];
  ------------------
  |  |  742|    246|#define UA_TYPES_EXTENSIONOBJECT 21
  ------------------
  800|    246|        }
  801|  4.64k|        ret |= writeXmlElement(ctx, srctype->typeName, ptr, srctype);
  802|  4.64k|    } else {
  803|     15|        ret |= Array_encodeXml(ctx, src->data, src->arrayLength, src->type);
  804|     15|    }
  805|  4.66k|    ret |= writeXmlElemNameEnd(ctx, UA_XML_VARIANT_VALUE);
  ------------------
  |  |  255|  4.66k|#define UA_XML_VARIANT_VALUE "Value"
  ------------------
  806|  4.66k|    return ret;
  807|  4.66k|}
ua_types_encoding_xml.c:Array_encodeXml:
  650|     15|                const UA_DataType *type) {
  651|     15|    char arrName[128];
  652|     15|    UA_ExtensionObject eo;
  653|       |
  654|     15|    if(type->typeKind == UA_DATATYPEKIND_ENUM)
  ------------------
  |  Branch (654:8): [True: 0, False: 15]
  ------------------
  655|      0|        type = &UA_TYPES[UA_TYPES_INT32];
  ------------------
  |  |  198|      0|#define UA_TYPES_INT32 5
  ------------------
  656|     15|    UA_Boolean wrapEO = (type->typeKind > UA_DATATYPEKIND_DIAGNOSTICINFO);
  657|     15|    if(wrapEO) {
  ------------------
  |  Branch (657:8): [True: 0, False: 15]
  ------------------
  658|      0|        UA_ExtensionObject_setValue(&eo, (void*)(uintptr_t)ptr, type);
  659|      0|        type = &UA_TYPES[UA_TYPES_EXTENSIONOBJECT];
  ------------------
  |  |  742|      0|#define UA_TYPES_EXTENSIONOBJECT 21
  ------------------
  660|      0|    }
  661|       |
  662|     15|    size_t arrNameLen = strlen("ListOf") + strlen(type->typeName);
  663|     15|    if(arrNameLen >= 128)
  ------------------
  |  Branch (663:8): [True: 0, False: 15]
  ------------------
  664|      0|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
  665|     15|    memcpy(arrName, "ListOf", strlen("ListOf"));
  666|     15|    memcpy(arrName + strlen("ListOf"), type->typeName, strlen(type->typeName));
  667|     15|    arrName[arrNameLen] = '\0';
  668|       |
  669|     15|    uintptr_t uptr = (uintptr_t)ptr;
  670|     15|    status ret = writeXmlElemNameBegin(ctx, arrName);
  671|     15|    for(size_t i = 0; i < length && ret == UA_STATUSCODE_GOOD; ++i) {
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (671:23): [True: 0, False: 15]
  |  Branch (671:37): [True: 0, False: 0]
  ------------------
  672|      0|        if(!wrapEO) {
  ------------------
  |  Branch (672:12): [True: 0, False: 0]
  ------------------
  673|      0|            ret |= writeXmlElement(ctx, type->typeName, (const void*)uptr, type);
  674|      0|        } else {
  675|      0|            eo.content.decoded.data = (void*)uptr;
  676|      0|            ret |= writeXmlElement(ctx, type->typeName, &eo, type);
  677|      0|        }
  678|      0|        uptr += type->memSize;
  679|      0|    }
  680|     15|    ret |= writeXmlElemNameEnd(ctx, arrName);
  681|     15|    return ret;
  682|     15|}
ua_types_encoding_xml.c:DiagnosticInfo_encodeXml:
  832|      3|ENCODE_XML(DiagnosticInfo) {
  833|      3|    const UA_DiagnosticInfo *src = (const UA_DiagnosticInfo*)src_;
  834|      3|    UA_StatusCode ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      3|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  835|      3|    if(src->hasSymbolicId)
  ------------------
  |  Branch (835:8): [True: 0, False: 3]
  ------------------
  836|      0|        ret |= writeXmlElement(ctx, "SymbolicId", &src->symbolicId,
  837|      0|                               &UA_TYPES[UA_TYPES_INT32]);
  ------------------
  |  |  198|      0|#define UA_TYPES_INT32 5
  ------------------
  838|      3|    if(src->hasNamespaceUri)
  ------------------
  |  Branch (838:8): [True: 0, False: 3]
  ------------------
  839|      0|        ret |= writeXmlElement(ctx, "NamespaceUri", &src->namespaceUri,
  840|      0|                               &UA_TYPES[UA_TYPES_INT32]);
  ------------------
  |  |  198|      0|#define UA_TYPES_INT32 5
  ------------------
  841|      3|    if(src->hasLocalizedText)
  ------------------
  |  Branch (841:8): [True: 0, False: 3]
  ------------------
  842|      0|        ret |= writeXmlElement(ctx, "LocalizedText", &src->localizedText,
  843|      0|                               &UA_TYPES[UA_TYPES_INT32]);
  ------------------
  |  |  198|      0|#define UA_TYPES_INT32 5
  ------------------
  844|      3|    if(src->hasLocale)
  ------------------
  |  Branch (844:8): [True: 0, False: 3]
  ------------------
  845|      0|        ret |= writeXmlElement(ctx, "Locale", &src->locale,
  846|      0|                               &UA_TYPES[UA_TYPES_INT32]);
  ------------------
  |  |  198|      0|#define UA_TYPES_INT32 5
  ------------------
  847|      3|    if(src->hasAdditionalInfo)
  ------------------
  |  Branch (847:8): [True: 0, False: 3]
  ------------------
  848|      0|        ret |= writeXmlElement(ctx, "AdditionalInfo", &src->additionalInfo,
  849|      0|                               &UA_TYPES[UA_TYPES_STRING]);
  ------------------
  |  |  402|      0|#define UA_TYPES_STRING 11
  ------------------
  850|      3|    if(src->hasInnerStatusCode)
  ------------------
  |  Branch (850:8): [True: 0, False: 3]
  ------------------
  851|      0|        ret |= writeXmlElement(ctx, "InnerStatusCode", &src->innerStatusCode,
  852|      0|                               &UA_TYPES[UA_TYPES_STATUSCODE]);
  ------------------
  |  |  640|      0|#define UA_TYPES_STATUSCODE 18
  ------------------
  853|      3|    if(src->hasInnerDiagnosticInfo) {
  ------------------
  |  Branch (853:8): [True: 0, False: 3]
  ------------------
  854|      0|        if(!src->innerDiagnosticInfo)
  ------------------
  |  Branch (854:12): [True: 0, False: 0]
  ------------------
  855|      0|            return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
  856|      0|        ret |= writeXmlElement(ctx, "InnerDiagnosticInfo", src->innerDiagnosticInfo,
  857|      0|                               &UA_TYPES[UA_TYPES_DIAGNOSTICINFO]);
  ------------------
  |  |  844|      0|#define UA_TYPES_DIAGNOSTICINFO 24
  ------------------
  858|      0|    }
  859|      3|    return ret;
  860|      3|}
ua_types_encoding_xml.c:encodeXmlStructure:
  692|    246|encodeXmlStructure(CtxXml *ctx, const void *src, const UA_DataType *type) {
  693|    246|    uintptr_t ptr = (uintptr_t)src;
  694|    246|    UA_StatusCode ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    246|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  695|  1.50k|    for(size_t i = 0; i < type->membersSize && ret == UA_STATUSCODE_GOOD; i++) {
  ------------------
  |  |   17|  1.25k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (695:23): [True: 1.25k, False: 246]
  |  Branch (695:48): [True: 1.25k, False: 0]
  ------------------
  696|  1.25k|        const UA_DataTypeMember *m = &type->members[i];
  697|  1.25k|        const UA_DataType *mt = m->memberType;
  698|  1.25k|        ptr += m->padding;
  699|       |
  700|  1.25k|        if(m->isArray) {
  ------------------
  |  Branch (700:12): [True: 216, False: 1.04k]
  ------------------
  701|    216|            size_t length = *(const size_t*)ptr;
  702|    216|            ptr += sizeof(size_t);
  703|    216|            const void *data = *(void* const*)ptr;
  704|    216|            ptr += sizeof(void*);
  705|    216|            if(m->isOptional && !data)
  ------------------
  |  Branch (705:16): [True: 0, False: 216]
  |  Branch (705:33): [True: 0, False: 0]
  ------------------
  706|      0|                continue;
  707|    216|            if(!m->isOptional && length == 0 && !data)
  ------------------
  |  Branch (707:16): [True: 216, False: 0]
  |  Branch (707:34): [True: 216, False: 0]
  |  Branch (707:49): [True: 216, False: 0]
  ------------------
  708|    216|                continue;
  709|      0|            ret |= writeXmlElemNameBegin(ctx, m->memberName);
  710|      0|            uintptr_t elem = (uintptr_t)data;
  711|      0|            for(size_t j = 0; j < length && ret == UA_STATUSCODE_GOOD; j++) {
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (711:31): [True: 0, False: 0]
  |  Branch (711:45): [True: 0, False: 0]
  ------------------
  712|      0|                ret |= writeXmlElement(ctx, mt->typeName, (const void*)elem, mt);
  713|      0|                elem += mt->memSize;
  714|      0|            }
  715|      0|            ret |= writeXmlElemNameEnd(ctx, m->memberName);
  716|      0|            continue;
  717|    216|        }
  718|       |
  719|  1.04k|        const void *value = (const void*)ptr;
  720|  1.04k|        if(m->isOptional) {
  ------------------
  |  Branch (720:12): [True: 0, False: 1.04k]
  ------------------
  721|      0|            value = *(void* const*)ptr;
  722|      0|            ptr += sizeof(void*);
  723|      0|            if(!value)
  ------------------
  |  Branch (723:16): [True: 0, False: 0]
  ------------------
  724|      0|                continue;
  725|  1.04k|        } else {
  726|  1.04k|            ptr += mt->memSize;
  727|  1.04k|            if(isDefaultValue(value, mt))
  ------------------
  |  Branch (727:16): [True: 1.04k, False: 0]
  ------------------
  728|  1.04k|                continue;
  729|  1.04k|        }
  730|      0|        ret |= writeXmlElement(ctx, m->memberName, value, mt);
  731|      0|    }
  732|    246|    return ret;
  733|    246|}
ua_types_encoding_xml.c:isDefaultValue:
  685|  1.04k|isDefaultValue(const void *value, const UA_DataType *type) {
  686|  1.04k|    UA_STACKARRAY(UA_Byte, defaultValue, type->memSize);
  ------------------
  |  |  225|  1.04k|#  define UA_STACKARRAY(TYPE, NAME, SIZE) TYPE NAME[SIZE]
  ------------------
  687|  1.04k|    memset(defaultValue, 0, type->memSize);
  688|  1.04k|    return UA_equal(value, defaultValue, type);
  689|  1.04k|}
ua_types_encoding_xml.c:writeXmlElement:
  338|  10.1k|                const void *value, const UA_DataType *type) {
  339|  10.1k|    status ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  10.1k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  340|  10.1k|    ret |= writeXmlElemNameBegin(ctx, name);
  341|  10.1k|    ret |= encodeXmlJumpTable[type->typeKind](ctx, value, type);
  342|  10.1k|    ret |= writeXmlElemNameEnd(ctx, name);
  343|  10.1k|    return ret;
  344|  10.1k|}
ua_types_encoding_xml.c:Boolean_decodeXml:
 1001|     62|DECODE_XML(Boolean) {
 1002|     62|    UA_Boolean *dst = (UA_Boolean*)dst_;
 1003|     62|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  983|     62|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (983:8): [True: 0, False: 62]
  |  |  ------------------
  |  |  984|     62|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  985|     62|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (985:18): [Folded, False: 62]
  |  |  ------------------
  ------------------
 1004|     62|    GET_ELEM_CONTENT;
  ------------------
  |  |  988|     62|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  989|     62|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  990|     62|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (990:17): [Folded, False: 62]
  |  |  ------------------
  ------------------
 1005|     62|    skipXmlObject(ctx);
 1006|       |
 1007|     62|    if(length == 4 &&
  ------------------
  |  Branch (1007:8): [True: 6, False: 56]
  ------------------
 1008|      6|       data[0] == 't' && data[1] == 'r' &&
  ------------------
  |  Branch (1008:8): [True: 5, False: 1]
  |  Branch (1008:26): [True: 4, False: 1]
  ------------------
 1009|      4|       data[2] == 'u' && data[3] == 'e') {
  ------------------
  |  Branch (1009:8): [True: 3, False: 1]
  |  Branch (1009:26): [True: 2, False: 1]
  ------------------
 1010|      2|        *dst = true;
 1011|     60|    } else if(length == 5 &&
  ------------------
  |  Branch (1011:15): [True: 11, False: 49]
  ------------------
 1012|     11|              data[0] == 'f' && data[1] == 'a' &&
  ------------------
  |  Branch (1012:15): [True: 6, False: 5]
  |  Branch (1012:33): [True: 5, False: 1]
  ------------------
 1013|      5|              data[2] == 'l' && data[3] == 's' &&
  ------------------
  |  Branch (1013:15): [True: 4, False: 1]
  |  Branch (1013:33): [True: 3, False: 1]
  ------------------
 1014|      3|              data[4] == 'e') {
  ------------------
  |  Branch (1014:15): [True: 2, False: 1]
  ------------------
 1015|      2|        *dst = false;
 1016|     58|    } else {
 1017|     58|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     58|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1018|     58|    }
 1019|       |
 1020|      4|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      4|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1021|     62|}
ua_types_encoding_xml.c:skipXmlObject:
  993|  4.31k|skipXmlObject(ParseCtxXml *ctx) {
  994|  4.31k|    size_t end_parent = ctx->tokens[ctx->index].end;
  995|  4.15M|    while(ctx->index < ctx->tokensSize &&
  ------------------
  |  Branch (995:11): [True: 4.15M, False: 4.21k]
  ------------------
  996|  4.15M|          ctx->tokens[ctx->index].end <= end_parent) {
  ------------------
  |  Branch (996:11): [True: 4.15M, False: 100]
  ------------------
  997|  4.15M|        ctx->index++;
  998|  4.15M|    }
  999|  4.31k|}
ua_types_encoding_xml.c:SByte_decodeXml:
 1059|    206|DECODE_XML(SByte) {
 1060|    206|    UA_SByte *dst = (UA_SByte*)dst_;
 1061|    206|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  983|    206|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (983:8): [True: 0, False: 206]
  |  |  ------------------
  |  |  984|    206|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  985|    206|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (985:18): [Folded, False: 206]
  |  |  ------------------
  ------------------
 1062|    206|    GET_ELEM_CONTENT;
  ------------------
  |  |  988|    206|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  989|    206|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  990|    206|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (990:17): [Folded, False: 206]
  |  |  ------------------
  ------------------
 1063|    206|    skipXmlObject(ctx);
 1064|       |
 1065|    206|    UA_Int64 out = 0;
 1066|    206|    UA_StatusCode s = decodeSigned(data, length, &out);
 1067|    206|    if(s != UA_STATUSCODE_GOOD || out < UA_SBYTE_MIN || out > UA_SBYTE_MAX)
  ------------------
  |  |   17|    412|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out < UA_SBYTE_MIN || out > UA_SBYTE_MAX)
  ------------------
  |  |   64|    329|#define UA_SBYTE_MIN (-128)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out < UA_SBYTE_MIN || out > UA_SBYTE_MAX)
  ------------------
  |  |   65|    103|#define UA_SBYTE_MAX 127
  ------------------
  |  Branch (1067:8): [True: 83, False: 123]
  |  Branch (1067:35): [True: 20, False: 103]
  |  Branch (1067:57): [True: 61, False: 42]
  ------------------
 1068|    164|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    164|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1069|       |
 1070|     42|    *dst = (UA_SByte)out;
 1071|     42|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     42|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1072|    206|}
ua_types_encoding_xml.c:decodeSigned:
 1024|  1.26k|decodeSigned(const UA_Byte *data, size_t dataSize, UA_Int64 *dst) {
 1025|  1.26k|    if(!data || dataSize == 0)
  ------------------
  |  Branch (1025:8): [True: 46, False: 1.22k]
  |  Branch (1025:17): [True: 0, False: 1.22k]
  ------------------
 1026|     46|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     46|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1027|  1.22k|    size_t len = parseInt64((const char*)data, dataSize, dst);
 1028|  1.22k|    if(len == 0)
  ------------------
  |  Branch (1028:8): [True: 138, False: 1.08k]
  ------------------
 1029|    138|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    138|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1030|       |
 1031|       |    /* There must only be whitespace between the end of the parsed number and
 1032|       |     * the end of the XML section */
 1033|  1.95k|    for(size_t i = len; i < dataSize; i++) {
  ------------------
  |  Branch (1033:25): [True: 987, False: 967]
  ------------------
 1034|    987|        if(data[i] != ' ' && data[i] - '\t' >= 5)
  ------------------
  |  Branch (1034:12): [True: 547, False: 440]
  |  Branch (1034:30): [True: 115, False: 432]
  ------------------
 1035|    115|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    115|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1036|    987|    }
 1037|       |
 1038|    967|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    967|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1039|  1.08k|}
ua_types_encoding_xml.c:Byte_decodeXml:
 1074|    199|DECODE_XML(Byte) {
 1075|    199|    UA_Byte *dst = (UA_Byte*)dst_;
 1076|    199|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  983|    199|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (983:8): [True: 0, False: 199]
  |  |  ------------------
  |  |  984|    199|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  985|    199|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (985:18): [Folded, False: 199]
  |  |  ------------------
  ------------------
 1077|    199|    GET_ELEM_CONTENT;
  ------------------
  |  |  988|    199|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  989|    199|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  990|    199|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (990:17): [Folded, False: 199]
  |  |  ------------------
  ------------------
 1078|    199|    skipXmlObject(ctx);
 1079|       |
 1080|    199|    UA_UInt64 out = 0;
 1081|    199|    UA_StatusCode s = decodeUnsigned(data, length, &out);
 1082|    199|    if(s != UA_STATUSCODE_GOOD || out > UA_BYTE_MAX)
  ------------------
  |  |   17|    398|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out > UA_BYTE_MAX)
  ------------------
  |  |   74|    133|#define UA_BYTE_MAX 255
  ------------------
  |  Branch (1082:8): [True: 66, False: 133]
  |  Branch (1082:35): [True: 107, False: 26]
  ------------------
 1083|    173|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    173|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1084|       |
 1085|     26|    *dst = (UA_Byte)out;
 1086|     26|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     26|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1087|    199|}
ua_types_encoding_xml.c:decodeUnsigned:
 1042|    561|decodeUnsigned(const UA_Byte *data, size_t dataSize, UA_UInt64 *dst) {
 1043|    561|    if(!data || dataSize == 0)
  ------------------
  |  Branch (1043:8): [True: 41, False: 520]
  |  Branch (1043:17): [True: 0, False: 520]
  ------------------
 1044|     41|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     41|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1045|    520|    size_t len = parseUInt64((const char*)data, dataSize, dst);
 1046|    520|    if(len == 0)
  ------------------
  |  Branch (1046:8): [True: 64, False: 456]
  ------------------
 1047|     64|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     64|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1048|       |
 1049|       |    /* There must only be whitespace between the end of the parsed number and
 1050|       |     * the end of the XML section */
 1051|  1.56k|    for(size_t i = len; i < dataSize; i++) {
  ------------------
  |  Branch (1051:25): [True: 1.20k, False: 364]
  ------------------
 1052|  1.20k|        if(data[i] != ' ' && data[i] - '\t' >= 5)
  ------------------
  |  Branch (1052:12): [True: 864, False: 339]
  |  Branch (1052:30): [True: 92, False: 772]
  ------------------
 1053|     92|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     92|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1054|  1.20k|    }
 1055|       |
 1056|    364|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    364|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1057|    456|}
ua_types_encoding_xml.c:Int16_decodeXml:
 1089|    246|DECODE_XML(Int16) {
 1090|    246|    UA_Int16 *dst = (UA_Int16*)dst_;
 1091|    246|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  983|    246|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (983:8): [True: 0, False: 246]
  |  |  ------------------
  |  |  984|    246|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  985|    246|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (985:18): [Folded, False: 246]
  |  |  ------------------
  ------------------
 1092|    246|    GET_ELEM_CONTENT;
  ------------------
  |  |  988|    246|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  989|    246|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  990|    246|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (990:17): [Folded, False: 246]
  |  |  ------------------
  ------------------
 1093|    246|    skipXmlObject(ctx);
 1094|       |
 1095|    246|    UA_Int64 out = 0;
 1096|    246|    UA_StatusCode s = decodeSigned(data, length, &out);
 1097|    246|    if(s != UA_STATUSCODE_GOOD || out < UA_INT16_MIN || out > UA_INT16_MAX)
  ------------------
  |  |   17|    492|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out < UA_INT16_MIN || out > UA_INT16_MAX)
  ------------------
  |  |   82|    445|#define UA_INT16_MIN (-32768)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out < UA_INT16_MIN || out > UA_INT16_MAX)
  ------------------
  |  |   83|    141|#define UA_INT16_MAX 32767
  ------------------
  |  Branch (1097:8): [True: 47, False: 199]
  |  Branch (1097:35): [True: 58, False: 141]
  |  Branch (1097:57): [True: 37, False: 104]
  ------------------
 1098|    142|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    142|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1099|       |
 1100|    104|    *dst = (UA_Int16)out;
 1101|    104|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    104|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1102|    246|}
ua_types_encoding_xml.c:UInt16_decodeXml:
 1104|    158|DECODE_XML(UInt16) {
 1105|    158|    UA_UInt16 *dst = (UA_UInt16*)dst_;
 1106|    158|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  983|    158|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (983:8): [True: 0, False: 158]
  |  |  ------------------
  |  |  984|    158|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  985|    158|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (985:18): [Folded, False: 158]
  |  |  ------------------
  ------------------
 1107|    158|    GET_ELEM_CONTENT;
  ------------------
  |  |  988|    158|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  989|    158|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  990|    158|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (990:17): [Folded, False: 158]
  |  |  ------------------
  ------------------
 1108|    158|    skipXmlObject(ctx);
 1109|       |
 1110|    158|    UA_UInt64 out = 0;
 1111|    158|    UA_StatusCode s = decodeUnsigned(data, length, &out);
 1112|    158|    if(s != UA_STATUSCODE_GOOD || out > UA_UINT16_MAX)
  ------------------
  |  |   17|    316|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out > UA_UINT16_MAX)
  ------------------
  |  |   92|    103|#define UA_UINT16_MAX 65535
  ------------------
  |  Branch (1112:8): [True: 55, False: 103]
  |  Branch (1112:35): [True: 66, False: 37]
  ------------------
 1113|    121|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    121|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1114|       |
 1115|     37|    *dst = (UA_UInt16)out;
 1116|     37|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     37|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1117|    158|}
ua_types_encoding_xml.c:Int32_decodeXml:
 1119|    313|DECODE_XML(Int32) {
 1120|    313|    UA_Int32 *dst = (UA_Int32*)dst_;
 1121|    313|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  983|    313|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (983:8): [True: 0, False: 313]
  |  |  ------------------
  |  |  984|    313|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  985|    313|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (985:18): [Folded, False: 313]
  |  |  ------------------
  ------------------
 1122|    313|    GET_ELEM_CONTENT;
  ------------------
  |  |  988|    313|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  989|    313|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  990|    313|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (990:17): [Folded, False: 313]
  |  |  ------------------
  ------------------
 1123|    313|    skipXmlObject(ctx);
 1124|       |
 1125|    313|    UA_Int64 out = 0;
 1126|    313|    UA_StatusCode s = decodeSigned(data, length, &out);
 1127|    313|    if(s != UA_STATUSCODE_GOOD || out < UA_INT32_MIN || out > UA_INT32_MAX)
  ------------------
  |  |   17|    626|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out < UA_INT32_MIN || out > UA_INT32_MAX)
  ------------------
  |  |  100|    560|#define UA_INT32_MIN ((int32_t)-2147483648LL)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out < UA_INT32_MIN || out > UA_INT32_MAX)
  ------------------
  |  |  101|    193|#define UA_INT32_MAX 2147483647L
  ------------------
  |  Branch (1127:8): [True: 66, False: 247]
  |  Branch (1127:35): [True: 54, False: 193]
  |  Branch (1127:57): [True: 9, False: 184]
  ------------------
 1128|    129|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    129|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1129|       |
 1130|    184|    *dst = (UA_Int32)out;
 1131|    184|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    184|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1132|    313|}
ua_types_encoding_xml.c:UInt32_decodeXml:
 1167|    123|DECODE_XML(UInt32) {
 1168|    123|    UA_UInt32 *dst = (UA_UInt32*)dst_;
 1169|    123|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  983|    123|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (983:8): [True: 0, False: 123]
  |  |  ------------------
  |  |  984|    123|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  985|    123|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (985:18): [Folded, False: 123]
  |  |  ------------------
  ------------------
 1170|    123|    GET_ELEM_CONTENT;
  ------------------
  |  |  988|    123|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  989|    123|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  990|    123|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (990:17): [Folded, False: 123]
  |  |  ------------------
  ------------------
 1171|    123|    skipXmlObject(ctx);
 1172|       |
 1173|    123|    UA_UInt64 out = 0;
 1174|    123|    UA_StatusCode s = decodeUnsigned(data, length, &out);
 1175|    123|    if(s != UA_STATUSCODE_GOOD || out > UA_UINT32_MAX)
  ------------------
  |  |   17|    246|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out > UA_UINT32_MAX)
  ------------------
  |  |  110|     92|#define UA_UINT32_MAX 4294967295UL
  ------------------
  |  Branch (1175:8): [True: 31, False: 92]
  |  Branch (1175:35): [True: 6, False: 86]
  ------------------
 1176|     37|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     37|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1177|       |
 1178|     86|    *dst = (UA_UInt32)out;
 1179|     86|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     86|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1180|    123|}
ua_types_encoding_xml.c:Int64_decodeXml:
 1182|    477|DECODE_XML(Int64) {
 1183|    477|    UA_Int64 *dst = (UA_Int64*)dst_;
 1184|    477|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  983|    477|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (983:8): [True: 0, False: 477]
  |  |  ------------------
  |  |  984|    477|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  985|    477|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (985:18): [Folded, False: 477]
  |  |  ------------------
  ------------------
 1185|    477|    GET_ELEM_CONTENT;
  ------------------
  |  |  988|    477|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  989|    477|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  990|    477|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (990:17): [Folded, False: 477]
  |  |  ------------------
  ------------------
 1186|    477|    skipXmlObject(ctx);
 1187|       |
 1188|    477|    UA_Int64 out = 0;
 1189|    477|    UA_StatusCode s = decodeSigned(data, length, &out);
 1190|    477|    if(s != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    477|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1190:8): [True: 79, False: 398]
  ------------------
 1191|     79|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     79|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1192|       |
 1193|    398|    *dst = (UA_Int64)out;
 1194|    398|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    398|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1195|    477|}
ua_types_encoding_xml.c:UInt64_decodeXml:
 1197|     81|DECODE_XML(UInt64) {
 1198|     81|    UA_UInt64 *dst = (UA_UInt64*)dst_;
 1199|     81|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  983|     81|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (983:8): [True: 0, False: 81]
  |  |  ------------------
  |  |  984|     81|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  985|     81|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (985:18): [Folded, False: 81]
  |  |  ------------------
  ------------------
 1200|     81|    GET_ELEM_CONTENT;
  ------------------
  |  |  988|     81|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  989|     81|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  990|     81|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (990:17): [Folded, False: 81]
  |  |  ------------------
  ------------------
 1201|     81|    skipXmlObject(ctx);
 1202|       |
 1203|     81|    UA_UInt64 out = 0;
 1204|     81|    UA_StatusCode s = decodeUnsigned(data, length, &out);
 1205|     81|    if(s != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|     81|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1205:8): [True: 45, False: 36]
  ------------------
 1206|     45|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     45|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1207|       |
 1208|     36|    *dst = (UA_UInt64)out;
 1209|     36|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     36|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1210|     81|}
ua_types_encoding_xml.c:Float_decodeXml:
 1261|      1|DECODE_XML(Float) {
 1262|      1|    UA_Float *dst = (UA_Float*)dst_;
 1263|      1|    UA_Double v = 0.0;
 1264|       |    UA_StatusCode res = Double_decodeXml(ctx, &v, NULL);
 1265|      1|    *dst = (UA_Float)v;
 1266|      1|    return res;
 1267|      1|}
ua_types_encoding_xml.c:Double_decodeXml:
 1212|  1.13k|DECODE_XML(Double) {
 1213|  1.13k|    UA_Double *dst = (UA_Double*)dst_;
 1214|  1.13k|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  983|  1.13k|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (983:8): [True: 0, False: 1.13k]
  |  |  ------------------
  |  |  984|  1.13k|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  985|  1.13k|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (985:18): [Folded, False: 1.13k]
  |  |  ------------------
  ------------------
 1215|  1.13k|    GET_ELEM_CONTENT;
  ------------------
  |  |  988|  1.13k|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  989|  1.13k|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  990|  1.13k|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (990:17): [Folded, False: 1.13k]
  |  |  ------------------
  ------------------
 1216|  1.13k|    skipXmlObject(ctx);
 1217|       |
 1218|  1.13k|    if(!data || length == 0)
  ------------------
  |  Branch (1218:8): [True: 3, False: 1.12k]
  |  Branch (1218:17): [True: 0, False: 1.12k]
  ------------------
 1219|      3|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      3|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1220|       |
 1221|       |    /* https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/
 1222|       |     * Maximum digit counts for select IEEE floating-point formats: 1074
 1223|       |     * Sanity check. */
 1224|  1.12k|    if(length > 1075)
  ------------------
  |  Branch (1224:8): [True: 17, False: 1.11k]
  ------------------
 1225|     17|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     17|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1226|       |
 1227|  1.11k|    if(length == 3 && memcmp(data, "INF", 3) == 0) {
  ------------------
  |  Branch (1227:8): [True: 71, False: 1.04k]
  |  Branch (1227:23): [True: 4, False: 67]
  ------------------
 1228|      4|        *dst = INFINITY;
 1229|      4|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      4|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1230|      4|    }
 1231|       |
 1232|  1.10k|    if(length == 4 && memcmp(data, "-INF", 4) == 0) {
  ------------------
  |  Branch (1232:8): [True: 51, False: 1.05k]
  |  Branch (1232:23): [True: 3, False: 48]
  ------------------
 1233|      3|        *dst = -INFINITY;
 1234|      3|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      3|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1235|      3|    }
 1236|       |
 1237|  1.10k|    if(length == 3 && memcmp(data, "NaN", 3) == 0) {
  ------------------
  |  Branch (1237:8): [True: 67, False: 1.03k]
  |  Branch (1237:23): [True: 4, False: 63]
  ------------------
 1238|      4|        *dst = NAN;
 1239|      4|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      4|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1240|      4|    }
 1241|       |
 1242|  1.10k|    if(length == 3 && memcmp(data, "-NaN", 3) == 0) {
  ------------------
  |  Branch (1242:8): [True: 63, False: 1.03k]
  |  Branch (1242:23): [True: 1, False: 62]
  ------------------
 1243|      1|        *dst = NAN;
 1244|      1|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      1|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1245|      1|    }
 1246|       |
 1247|  1.10k|    size_t len = parseDouble((const char*)data, length, dst);
 1248|  1.10k|    if(len == 0)
  ------------------
  |  Branch (1248:8): [True: 10, False: 1.09k]
  ------------------
 1249|     10|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     10|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1250|       |
 1251|       |    /* There must only be whitespace between the end of the parsed number and
 1252|       |     * the end of the token */
 1253|  1.31k|    for(size_t i = len; i < length; i++) {
  ------------------
  |  Branch (1253:25): [True: 251, False: 1.06k]
  ------------------
 1254|    251|        if(data[i] != ' ' && data[i] -'\t' >= 5)
  ------------------
  |  Branch (1254:12): [True: 102, False: 149]
  |  Branch (1254:30): [True: 28, False: 74]
  ------------------
 1255|     28|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     28|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1256|    251|    }
 1257|       |
 1258|  1.06k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  1.06k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1259|  1.09k|}
ua_types_encoding_xml.c:String_decodeXml:
 1269|    520|DECODE_XML(String) {
 1270|    520|    UA_String *dst = (UA_String*)dst_;
 1271|    520|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  983|    520|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (983:8): [True: 0, False: 520]
  |  |  ------------------
  |  |  984|    520|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  985|    520|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (985:18): [Folded, False: 520]
  |  |  ------------------
  ------------------
 1272|    520|    const xml_token *token = &ctx->tokens[ctx->index];
 1273|    520|    GET_ELEM_CONTENT;
  ------------------
  |  |  988|    520|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  989|    520|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  990|    520|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (990:17): [Folded, False: 520]
  |  |  ------------------
  ------------------
 1274|    520|    skipXmlObject(ctx);
 1275|       |
 1276|       |    /* Empty string? */
 1277|    520|    if(length == 0) {
  ------------------
  |  Branch (1277:8): [True: 12, False: 508]
  ------------------
 1278|     12|        dst->data = (UA_Byte*)UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  757|     12|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
 1279|     12|        dst->length = 0;
 1280|     12|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     12|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1281|     12|    }
 1282|       |
 1283|    508|    UA_String str = {length, (UA_Byte*)(uintptr_t)data};
 1284|    508|    status ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    508|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1285|    508|    if(token->contentEscaped)
  ------------------
  |  Branch (1285:8): [True: 343, False: 165]
  ------------------
 1286|    343|        ret = getTokenContent(ctx->xml, token, &str);
 1287|    508|    if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    508|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1287:8): [True: 0, False: 508]
  ------------------
 1288|      0|        return ret;
 1289|       |
 1290|    508|    ret = UA_String_copy(&str, dst);
 1291|    508|    if(ret != UA_STATUSCODE_GOOD || !token->contentEscaped)
  ------------------
  |  |   17|  1.01k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1291:8): [True: 0, False: 508]
  |  Branch (1291:37): [True: 165, False: 343]
  ------------------
 1292|    165|        return ret;
 1293|       |
 1294|    343|    ret = decodeTokenContentInPlace(dst);
 1295|    343|    if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    343|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1295:8): [True: 0, False: 343]
  ------------------
 1296|      0|        UA_String_clear(dst);
 1297|    343|    return ret;
 1298|    508|}
ua_types_encoding_xml.c:getTokenContent:
  162|    343|getTokenContent(const char *xml, const xml_token *token, UA_String *content) {
  163|    343|    size_t begin = token->start;
  164|    343|    char quote = 0;
  165|  10.4k|    for(; begin < token->end; begin++) {
  ------------------
  |  Branch (165:11): [True: 10.4k, False: 0]
  ------------------
  166|  10.4k|        char c = xml[begin];
  167|  10.4k|        if(quote) {
  ------------------
  |  Branch (167:12): [True: 1.64k, False: 8.85k]
  ------------------
  168|  1.64k|            if(c == quote)
  ------------------
  |  Branch (168:16): [True: 485, False: 1.16k]
  ------------------
  169|    485|                quote = 0;
  170|  8.85k|        } else if(c == '\'' || c == '"') {
  ------------------
  |  Branch (170:19): [True: 228, False: 8.62k]
  |  Branch (170:32): [True: 257, False: 8.36k]
  ------------------
  171|    485|            quote = c;
  172|  8.36k|        } else if(c == '>') {
  ------------------
  |  Branch (172:19): [True: 343, False: 8.02k]
  ------------------
  173|    343|            begin++;
  174|    343|            break;
  175|    343|        }
  176|  10.4k|    }
  177|    343|    if(begin >= token->end)
  ------------------
  |  Branch (177:8): [True: 0, False: 343]
  ------------------
  178|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  179|       |
  180|    343|    size_t end = token->end;
  181|  3.36k|    while(end > begin && xml[end - 1] != '<')
  ------------------
  |  Branch (181:11): [True: 3.36k, False: 0]
  |  Branch (181:26): [True: 3.01k, False: 343]
  ------------------
  182|  3.01k|        end--;
  183|    343|    if(end <= begin)
  ------------------
  |  Branch (183:8): [True: 0, False: 343]
  ------------------
  184|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  185|    343|    end--;
  186|       |
  187|    343|    content->data = (UA_Byte*)(uintptr_t)&xml[begin];
  188|    343|    content->length = end - begin;
  189|    343|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    343|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  190|    343|}
ua_types_encoding_xml.c:decodeTokenContentInPlace:
  196|    343|decodeTokenContentInPlace(UA_String *content) {
  197|    343|    yxml_t parser;
  198|    343|    char parserStack[512];
  199|    343|    yxml_init_content(&parser, parserStack, sizeof(parserStack));
  200|    343|    unsigned depth = 0;
  201|    343|    size_t outPos = 0;
  202|       |
  203|  35.3M|    for(size_t pos = 0; pos < content->length; pos++) {
  ------------------
  |  Branch (203:25): [True: 35.3M, False: 343]
  ------------------
  204|  35.3M|        yxml_ret_t event = yxml_parse(&parser, content->data[pos]);
  205|  35.3M|        if(event < YXML_OK)
  ------------------
  |  Branch (205:12): [True: 0, False: 35.3M]
  ------------------
  206|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  207|  35.3M|        if(event == YXML_ELEMSTART) {
  ------------------
  |  Branch (207:12): [True: 6.81k, False: 35.3M]
  ------------------
  208|  6.81k|            depth++;
  209|  35.3M|        } else if(event == YXML_ELEMEND) {
  ------------------
  |  Branch (209:19): [True: 6.81k, False: 35.3M]
  ------------------
  210|  6.81k|            if(depth == 0)
  ------------------
  |  Branch (210:16): [True: 0, False: 6.81k]
  ------------------
  211|      0|                return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  212|  6.81k|            depth--;
  213|  35.3M|        } else if(event == YXML_CONTENT && depth == 0) {
  ------------------
  |  Branch (213:19): [True: 27.3M, False: 7.98M]
  |  Branch (213:44): [True: 27.3M, False: 40.5k]
  ------------------
  214|  27.3M|            size_t eventLength = strlen(parser.data);
  215|  27.3M|            if(outPos > content->length ||
  ------------------
  |  Branch (215:16): [True: 0, False: 27.3M]
  ------------------
  216|  27.3M|               eventLength > content->length - outPos)
  ------------------
  |  Branch (216:16): [True: 0, False: 27.3M]
  ------------------
  217|      0|                return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  218|  27.3M|            memcpy(&content->data[outPos], parser.data, eventLength);
  219|  27.3M|            outPos += eventLength;
  220|  27.3M|        }
  221|  35.3M|    }
  222|       |
  223|    343|    if(depth != 0 || yxml_eof(&parser) != YXML_OK)
  ------------------
  |  Branch (223:8): [True: 0, False: 343]
  |  Branch (223:22): [True: 0, False: 343]
  ------------------
  224|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  225|    343|    content->length = outPos;
  226|    343|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    343|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  227|    343|}
ua_types_encoding_xml.c:DateTime_decodeXml:
 1300|     26|DECODE_XML(DateTime) {
 1301|     26|    UA_DateTime *dst = (UA_DateTime*)dst_;
 1302|     26|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  983|     26|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (983:8): [True: 0, False: 26]
  |  |  ------------------
  |  |  984|     26|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  985|     26|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (985:18): [Folded, False: 26]
  |  |  ------------------
  ------------------
 1303|     26|    GET_ELEM_CONTENT;
  ------------------
  |  |  988|     26|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  989|     26|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  990|     26|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (990:17): [Folded, False: 26]
  |  |  ------------------
  ------------------
 1304|     26|    skipXmlObject(ctx);
 1305|     26|    UA_String str = {length, (UA_Byte*)(uintptr_t)data};
 1306|     26|    return UA_DateTime_parse(dst, str);
 1307|     26|}
ua_types_encoding_xml.c:Guid_decodeXml:
 1401|      1|DECODE_XML(Guid) {
 1402|      1|    UA_Guid *dst = (UA_Guid*)dst_;
 1403|      1|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  983|      1|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (983:8): [True: 0, False: 1]
  |  |  ------------------
  |  |  984|      1|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  985|      1|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (985:18): [Folded, False: 1]
  |  |  ------------------
  ------------------
 1404|      1|    UA_String str;
 1405|      1|    UA_String_init(&str);
 1406|      1|    XmlDecodeEntry entry = {UA_STRING_STATIC(UA_XML_GUID_STRING), &str,
  ------------------
  |  |  224|      1|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1407|      1|                            NULL, false, &UA_TYPES[UA_TYPES_STRING]};
  ------------------
  |  |  402|      1|#define UA_TYPES_STRING 11
  ------------------
 1408|      1|    status ret = decodeXmlFields(ctx, &entry, 1);
 1409|      1|    ret |= UA_Guid_parse(dst, str);
 1410|      1|    UA_String_clear(&str);
 1411|      1|    return ret;
 1412|      1|}
ua_types_encoding_xml.c:decodeXmlFields:
 1336|    255|decodeXmlFields(ParseCtxXml *ctx, XmlDecodeEntry *entries, size_t entryCount) {
 1337|    255|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  983|    255|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (983:8): [True: 0, False: 255]
  |  |  ------------------
  |  |  984|    255|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  985|    255|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (985:18): [Folded, False: 255]
  |  |  ------------------
  ------------------
 1338|       |
 1339|    255|    if(ctx->depth >= UA_XML_ENCODING_MAX_RECURSION)
  ------------------
  |  |  246|    255|#define UA_XML_ENCODING_MAX_RECURSION 100
  ------------------
  |  Branch (1339:8): [True: 0, False: 255]
  ------------------
 1340|      0|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
 1341|       |
 1342|    255|    size_t childCount = ctx->tokens[ctx->index].children;
 1343|       |
 1344|       |    /* Empty object */
 1345|    255|    if(childCount == 0) {
  ------------------
  |  Branch (1345:8): [True: 172, False: 83]
  ------------------
 1346|    172|        skipXmlObject(ctx);
 1347|    172|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    172|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1348|    172|    }
 1349|       |
 1350|       |    /* Go to first entry element */
 1351|     83|    ctx->depth++;
 1352|     83|    ctx->index += 1 + ctx->tokens[ctx->index].attributes;
 1353|       |
 1354|     83|    status ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     83|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1355|    248|    for(size_t i = 0; i < childCount; i++) {
  ------------------
  |  Branch (1355:23): [True: 165, False: 83]
  ------------------
 1356|    165|        xml_token *elem = &ctx->tokens[ctx->index];
 1357|    165|        XmlDecodeEntry *entry = NULL;
 1358|    165|        for(size_t j = i; j < entryCount + i; j++) {
  ------------------
  |  Branch (1358:27): [True: 165, False: 0]
  ------------------
 1359|       |            /* Search for key, if found outer loop will be one less. Best case
 1360|       |             * if objectCount is in order! */
 1361|    165|            size_t index = j % entryCount;
 1362|    165|            if(!UA_String_equal_ignorecase(&elem->name, &entries[index].name))
  ------------------
  |  Branch (1362:16): [True: 0, False: 165]
  ------------------
 1363|      0|                continue;
 1364|    165|            entry = &entries[index];
 1365|    165|            break;
 1366|    165|        }
 1367|       |
 1368|       |        /* Unknown child element */
 1369|    165|        if(!entry)
  ------------------
  |  Branch (1369:12): [True: 0, False: 165]
  ------------------
 1370|      0|            goto errout;
 1371|       |
 1372|       |        /* An entry that was expected, but shall not be decoded.
 1373|       |         * Jump over it. */
 1374|    165|        if(!entry->fieldPointer || (!entry->function && !entry->type)) {
  ------------------
  |  Branch (1374:12): [True: 0, False: 165]
  |  Branch (1374:37): [True: 83, False: 82]
  |  Branch (1374:57): [True: 0, False: 83]
  ------------------
 1375|      0|            skipXmlObject(ctx);
 1376|      0|            continue;
 1377|      0|        }
 1378|       |
 1379|       |        /* Duplicate child element */
 1380|    165|        if(entry->found)
  ------------------
  |  Branch (1380:12): [True: 0, False: 165]
  ------------------
 1381|      0|            goto errout;
 1382|    165|        entry->found = true;
 1383|       |
 1384|       |        /* Decode */
 1385|    165|        if(entry->function) /* Specialized decoding function */
  ------------------
  |  Branch (1385:12): [True: 82, False: 83]
  ------------------
 1386|     82|            ret = entry->function(ctx, entry->fieldPointer, entry->type);
 1387|     83|        else /* Decode by type-kind */
 1388|     83|            ret = decodeXmlJumpTable[entry->type->typeKind](ctx, entry->fieldPointer, entry->type);
 1389|    165|        if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    165|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1389:12): [True: 0, False: 165]
  ------------------
 1390|      0|            goto cleanup;
 1391|    165|    }
 1392|       |
 1393|     83|cleanup:
 1394|     83|    ctx->depth--;
 1395|     83|    return ret;
 1396|      0|errout:
 1397|      0|    ctx->depth--;
 1398|      0|    return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1399|     83|}
ua_types_encoding_xml.c:ByteString_decodeXml:
 1428|     48|DECODE_XML(ByteString) {
 1429|     48|    UA_ByteString *dst = (UA_ByteString*)dst_;
 1430|     48|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  983|     48|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (983:8): [True: 0, False: 48]
  |  |  ------------------
  |  |  984|     48|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  985|     48|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (985:18): [Folded, False: 48]
  |  |  ------------------
  ------------------
 1431|     48|    GET_ELEM_CONTENT;
  ------------------
  |  |  988|     48|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  989|     48|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  990|     48|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (990:17): [Folded, False: 48]
  |  |  ------------------
  ------------------
 1432|     48|    skipXmlObject(ctx);
 1433|       |
 1434|       |    /* Trim whitespace around the content. The tokenizer can include CDATA
 1435|       |     * delimiters in the content range if whitespace precedes the section. */
 1436|     48|    while(length > 0 && (data[0] == ' ' || data[0] == '\t' ||
  ------------------
  |  Branch (1436:11): [True: 0, False: 48]
  |  Branch (1436:26): [True: 0, False: 0]
  |  Branch (1436:44): [True: 0, False: 0]
  ------------------
 1437|      0|                         data[0] == '\r' || data[0] == '\n')) {
  ------------------
  |  Branch (1437:26): [True: 0, False: 0]
  |  Branch (1437:45): [True: 0, False: 0]
  ------------------
 1438|      0|        data++;
 1439|      0|        length--;
 1440|      0|    }
 1441|     48|    while(length > 0 && (data[length - 1] == ' ' || data[length - 1] == '\t' ||
  ------------------
  |  Branch (1441:11): [True: 0, False: 48]
  |  Branch (1441:26): [True: 0, False: 0]
  |  Branch (1441:53): [True: 0, False: 0]
  ------------------
 1442|      0|                         data[length - 1] == '\r' || data[length - 1] == '\n'))
  ------------------
  |  Branch (1442:26): [True: 0, False: 0]
  |  Branch (1442:54): [True: 0, False: 0]
  ------------------
 1443|      0|        length--;
 1444|       |
 1445|       |    /* Remove an exact CDATA wrapper before compacting the Base64 payload. */
 1446|     48|    if(length >= 12 && memcmp(data, "<![CDATA[", 9) == 0 &&
  ------------------
  |  Branch (1446:8): [True: 0, False: 48]
  |  Branch (1446:24): [True: 0, False: 0]
  ------------------
 1447|      0|       memcmp(&data[length - 3], "]]>", 3) == 0) {
  ------------------
  |  Branch (1447:8): [True: 0, False: 0]
  ------------------
 1448|      0|        data += 9;
 1449|      0|        length -= 12;
 1450|      0|    }
 1451|       |
 1452|       |    /* XML allows insignificant whitespace inside Base64 content. */
 1453|     48|    size_t encodedLength = compactXmlBase64(data, length, NULL);
 1454|       |
 1455|       |    /* Empty bytestring? */
 1456|     48|    if(encodedLength == 0) {
  ------------------
  |  Branch (1456:8): [True: 48, False: 0]
  ------------------
 1457|     48|        dst->data = (UA_Byte*)UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  757|     48|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
 1458|     48|        dst->length = 0;
 1459|     48|    } else {
 1460|      0|        const unsigned char *encoded = (const unsigned char*)data;
 1461|      0|        unsigned char *compact = NULL;
 1462|      0|        if(encodedLength != length) {
  ------------------
  |  Branch (1462:12): [True: 0, False: 0]
  ------------------
 1463|      0|            compact = (unsigned char*)UA_malloc(encodedLength);
  ------------------
  |  |   22|      0|#define UA_malloc(size) UA_mallocSingleton(size)
  ------------------
 1464|      0|            if(!compact)
  ------------------
  |  Branch (1464:16): [True: 0, False: 0]
  ------------------
 1465|      0|                return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 1466|      0|            compactXmlBase64(data, length, compact);
 1467|      0|            encoded = compact;
 1468|      0|        }
 1469|      0|        size_t flen = 0;
 1470|      0|        unsigned char *unB64 = UA_unbase64(encoded, encodedLength, &flen);
 1471|      0|        UA_free(compact);
  ------------------
  |  |   23|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1472|      0|        if(!unB64)
  ------------------
  |  Branch (1472:12): [True: 0, False: 0]
  ------------------
 1473|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1474|      0|        dst->data = (UA_Byte*)unB64;
 1475|      0|        dst->length = flen;
 1476|      0|    }
 1477|       |
 1478|     48|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     48|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1479|     48|}
ua_types_encoding_xml.c:compactXmlBase64:
 1415|     48|compactXmlBase64(const UA_Byte *data, size_t length, UA_Byte *out) {
 1416|     48|    size_t pos = 0;
 1417|     48|    for(size_t i = 0; i < length; i++) {
  ------------------
  |  Branch (1417:23): [True: 0, False: 48]
  ------------------
 1418|      0|        if(data[i] != ' ' && data[i] != '\t' &&
  ------------------
  |  Branch (1418:12): [True: 0, False: 0]
  |  Branch (1418:30): [True: 0, False: 0]
  ------------------
 1419|      0|           data[i] != '\r' && data[i] != '\n') {
  ------------------
  |  Branch (1419:12): [True: 0, False: 0]
  |  Branch (1419:31): [True: 0, False: 0]
  ------------------
 1420|      0|            if(out)
  ------------------
  |  Branch (1420:16): [True: 0, False: 0]
  ------------------
 1421|      0|                out[pos] = data[i];
 1422|      0|            pos++;
 1423|      0|        }
 1424|      0|    }
 1425|     48|    return pos;
 1426|     48|}
ua_types_encoding_xml.c:XmlElement_decodeXml:
 1481|    366|DECODE_XML(XmlElement) {
 1482|    366|    UA_XmlElement *dst = (UA_XmlElement*)dst_;
 1483|    366|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  983|    366|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (983:8): [True: 0, False: 366]
  |  |  ------------------
  |  |  984|    366|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  985|    366|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (985:18): [Folded, False: 366]
  |  |  ------------------
  ------------------
 1484|    366|    xml_token *token = &ctx->tokens[ctx->index];
 1485|    366|    size_t begin = token->start;
 1486|  1.54M|    while(begin < token->end && ctx->xml[begin] != '>')
  ------------------
  |  Branch (1486:11): [True: 1.54M, False: 0]
  |  Branch (1486:33): [True: 1.54M, False: 366]
  ------------------
 1487|  1.54M|        begin++;
 1488|    366|    if(begin == token->end)
  ------------------
  |  Branch (1488:8): [True: 0, False: 366]
  ------------------
 1489|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1490|    366|    begin++;
 1491|    366|    size_t end = token->end;
 1492|  14.6M|    while(end > begin && ctx->xml[end - 1] != '<')
  ------------------
  |  Branch (1492:11): [True: 14.6M, False: 183]
  |  Branch (1492:26): [True: 14.6M, False: 183]
  ------------------
 1493|  14.6M|        end--;
 1494|    366|    if(end == begin)
  ------------------
  |  Branch (1494:8): [True: 183, False: 183]
  ------------------
 1495|    183|        end = token->end;
 1496|    183|    else
 1497|    183|        end--;
 1498|    366|    UA_StatusCode ret = UA_ByteString_allocBuffer((UA_ByteString*)dst, end - begin);
 1499|    366|    if(ret == UA_STATUSCODE_GOOD && end > begin)
  ------------------
  |  |   17|    732|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1499:8): [True: 366, False: 0]
  |  Branch (1499:37): [True: 288, False: 78]
  ------------------
 1500|    288|        memcpy(dst->data, &ctx->xml[begin], end - begin);
 1501|    366|    skipXmlObject(ctx);
 1502|    366|    return ret;
 1503|    366|}
ua_types_encoding_xml.c:NodeId_decodeXml:
 1505|     83|DECODE_XML(NodeId) {
 1506|     83|    UA_NodeId *dst = (UA_NodeId*)dst_;
 1507|     83|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  983|     83|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (983:8): [True: 0, False: 83]
  |  |  ------------------
  |  |  984|     83|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  985|     83|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (985:18): [Folded, False: 83]
  |  |  ------------------
  ------------------
 1508|     83|    UA_String str;
 1509|     83|    static UA_String identifier = UA_STRING_STATIC(UA_XML_NODEID_IDENTIFIER);
  ------------------
  |  |  224|     83|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1510|     83|    status ret = getChildContent(ctx, identifier, &str);
 1511|     83|    if(ret != UA_STATUSCODE_GOOD) return ret;
  ------------------
  |  |   17|     83|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1511:8): [True: 1, False: 82]
  ------------------
 1512|     82|    skipXmlObject(ctx);
 1513|     82|    return UA_NodeId_parseEx(dst, str, ctx->namespaceMapping);
 1514|     83|}
ua_types_encoding_xml.c:getChildContent:
 1312|     95|getChildContent(ParseCtxXml *ctx, UA_String name, UA_String *out) {
 1313|     95|    size_t oldIndex = ctx->index;
 1314|     95|    size_t children = ctx->tokens[ctx->index].children;
 1315|       |
 1316|       |    /* Skip the attributes and go to the first child */
 1317|     95|    ctx->index += 1 + ctx->tokens[ctx->index].attributes;
 1318|       |
 1319|       |    /* Find the child of the name */
 1320|     95|    UA_StatusCode res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     95|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1321|     95|    for(size_t i = 0; i < children; i++) {
  ------------------
  |  Branch (1321:23): [True: 82, False: 13]
  ------------------
 1322|     82|        if(!UA_String_equal(&name, &ctx->tokens[ctx->index].name)) {
  ------------------
  |  Branch (1322:12): [True: 0, False: 82]
  ------------------
 1323|      0|            skipXmlObject(ctx);
 1324|      0|            continue;
 1325|      0|        }
 1326|     82|        *out = ctx->tokens[ctx->index].content;
 1327|     82|        res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     82|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1328|     82|        break;
 1329|     82|    }
 1330|       |
 1331|     95|    ctx->index = oldIndex;
 1332|     95|    return res;
 1333|     95|}
ua_types_encoding_xml.c:ExpandedNodeId_decodeXml:
 1516|      1|DECODE_XML(ExpandedNodeId) {
 1517|      1|    UA_ExpandedNodeId *dst = (UA_ExpandedNodeId*)dst_;
 1518|      1|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  983|      1|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (983:8): [True: 0, False: 1]
  |  |  ------------------
  |  |  984|      1|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  985|      1|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (985:18): [Folded, False: 1]
  |  |  ------------------
  ------------------
 1519|      1|    UA_String str;
 1520|      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}
  ------------------
 1521|      1|    status ret = getChildContent(ctx, expidentifier, &str);
 1522|      1|    if(ret != UA_STATUSCODE_GOOD) return ret;
  ------------------
  |  |   17|      1|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1522:8): [True: 1, False: 0]
  ------------------
 1523|      0|    skipXmlObject(ctx);
 1524|      0|    return UA_ExpandedNodeId_parseEx(dst, str, ctx->namespaceMapping,
 1525|      0|                                     ctx->serverUrisSize, ctx->serverUris);
 1526|      1|}
ua_types_encoding_xml.c:StatusCode_decodeXml:
 1528|     11|DECODE_XML(StatusCode) {
 1529|     11|    UA_StatusCode *dst = (UA_StatusCode*)dst_;
 1530|     11|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  983|     11|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (983:8): [True: 0, False: 11]
  |  |  ------------------
  |  |  984|     11|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  985|     11|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (985:18): [Folded, False: 11]
  |  |  ------------------
  ------------------
 1531|     11|    UA_String str;
 1532|     11|    static UA_String statusidentifier = UA_STRING_STATIC(UA_XML_STATUSCODE_CODE);
  ------------------
  |  |  224|     11|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1533|     11|    status ret = getChildContent(ctx, statusidentifier, &str);
 1534|     11|    if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|     11|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1534:8): [True: 11, False: 0]
  ------------------
 1535|     11|        return ret;
 1536|      0|    skipXmlObject(ctx);
 1537|      0|    UA_UInt64 out = 0;
 1538|      0|    ret = decodeUnsigned(str.data, str.length, &out);
 1539|      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 (1539:8): [True: 0, False: 0]
  |  Branch (1539:37): [True: 0, False: 0]
  ------------------
 1540|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1541|      0|    *dst = (UA_StatusCode)out;
 1542|      0|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1543|      0|}
ua_types_encoding_xml.c:QualifiedName_decodeXml:
 1545|      2|DECODE_XML(QualifiedName) {
 1546|      2|    UA_QualifiedName *dst = (UA_QualifiedName*)dst_;
 1547|      2|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  983|      2|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (983:8): [True: 0, False: 2]
  |  |  ------------------
  |  |  984|      2|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  985|      2|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (985:18): [Folded, False: 2]
  |  |  ------------------
  ------------------
 1548|       |
 1549|       |    /* Decode the elements */
 1550|      2|    XmlDecodeEntry entries[2] = {
 1551|      2|        {UA_STRING_STATIC(UA_XML_QUALIFIEDNAME_NAMESPACEINDEX), &dst->namespaceIndex,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1552|      2|         NULL, false, &UA_TYPES[UA_TYPES_UINT16]},
  ------------------
  |  |  164|      2|#define UA_TYPES_UINT16 4
  ------------------
 1553|      2|        {UA_STRING_STATIC(UA_XML_QUALIFIEDNAME_NAME), &dst->name,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1554|      2|         NULL, false, &UA_TYPES[UA_TYPES_STRING]}
  ------------------
  |  |  402|      2|#define UA_TYPES_STRING 11
  ------------------
 1555|      2|    };
 1556|      2|    UA_StatusCode res = decodeXmlFields(ctx, entries, 2);
 1557|       |
 1558|       |    /* Map the NamespaceIndex */
 1559|      2|    if(ctx->namespaceMapping)
  ------------------
  |  Branch (1559:8): [True: 0, False: 2]
  ------------------
 1560|      0|        dst->namespaceIndex =
 1561|      0|            UA_NamespaceMapping_remote2Local(ctx->namespaceMapping, dst->namespaceIndex);
 1562|       |
 1563|      2|    return res;
 1564|      2|}
ua_types_encoding_xml.c:LocalizedText_decodeXml:
 1566|      2|DECODE_XML(LocalizedText) {
 1567|      2|    UA_LocalizedText *dst = (UA_LocalizedText*)dst_;
 1568|      2|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  983|      2|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (983:8): [True: 0, False: 2]
  |  |  ------------------
  |  |  984|      2|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  985|      2|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (985:18): [Folded, False: 2]
  |  |  ------------------
  ------------------
 1569|       |
 1570|      2|    XmlDecodeEntry entries[2] = {
 1571|      2|        {UA_STRING_STATIC(UA_XML_LOCALIZEDTEXT_LOCALE), &dst->locale,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1572|      2|         NULL, false, &UA_TYPES[UA_TYPES_STRING]},
  ------------------
  |  |  402|      2|#define UA_TYPES_STRING 11
  ------------------
 1573|      2|        {UA_STRING_STATIC(UA_XML_LOCALIZEDTEXT_TEXT), &dst->text,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1574|      2|         NULL, false, &UA_TYPES[UA_TYPES_STRING]}
  ------------------
  |  |  402|      2|#define UA_TYPES_STRING 11
  ------------------
 1575|      2|    };
 1576|       |
 1577|      2|    return decodeXmlFields(ctx, entries, 2);
 1578|      2|}
ua_types_encoding_xml.c:ExtensionObject_decodeXml:
 1671|     84|DECODE_XML(ExtensionObject) {
 1672|     84|    UA_ExtensionObject *dst = (UA_ExtensionObject*)dst_;
 1673|     84|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  983|     84|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (983:8): [True: 0, False: 84]
  |  |  ------------------
  |  |  984|     84|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  985|     84|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (985:18): [Folded, False: 84]
  |  |  ------------------
  ------------------
 1674|     84|    xml_token *tok = &ctx->tokens[ctx->index];
 1675|     84|    if(tok->children == 0)
  ------------------
  |  Branch (1675:8): [True: 2, False: 82]
  ------------------
 1676|      2|        return UA_STATUSCODE_GOOD; /* _NO_BODY */
  ------------------
  |  |   17|      2|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1677|     82|    dst->encoding = UA_EXTENSIONOBJECT_ENCODED_XML; /* default so the typeId gets cleaned up */
 1678|     82|    XmlDecodeEntry entries[2] = {
 1679|     82|        {UA_STRING_STATIC(UA_XML_EXTENSIONOBJECT_TYPEID), &dst->content.encoded.typeId,
  ------------------
  |  |  224|     82|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1680|     82|         NULL, false, &UA_TYPES[UA_TYPES_NODEID]},
  ------------------
  |  |  572|     82|#define UA_TYPES_NODEID 16
  ------------------
 1681|     82|        {UA_STRING_STATIC(UA_XML_EXTENSIONOBJECT_BODY), dst,
  ------------------
  |  |  224|     82|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1682|     82|         decodeExtensionObjectBody, false, NULL},
 1683|     82|    };
 1684|     82|    return decodeXmlFields(ctx, entries, 2);
 1685|     84|}
ua_types_encoding_xml.c:decodeExtensionObjectBody:
 1607|     82|decodeExtensionObjectBody(ParseCtxXml *ctx, void *dst, const UA_DataType *type) {
 1608|     82|    UA_ExtensionObject *eo = (UA_ExtensionObject*)dst;
 1609|       |
 1610|     82|    xml_token *tok = &ctx->tokens[ctx->index];
 1611|     82|    if(tok->children != 1)
  ------------------
  |  Branch (1611:8): [True: 0, False: 82]
  ------------------
 1612|      0|        return UA_STATUSCODE_BADDECODINGERROR; /* Only one child allowed */
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1613|       |
 1614|     82|    if(UA_NodeId_isNull(&eo->content.encoded.typeId))
  ------------------
  |  Branch (1614:8): [True: 0, False: 82]
  ------------------
 1615|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1616|       |
 1617|       |    /* Find the datatype of the body */
 1618|     82|    type = lookupXmlType(ctx, &eo->content.encoded.typeId);
 1619|       |
 1620|       |    /* Allocate decoded content */
 1621|     82|    void *decoded = NULL;
 1622|     82|    if(type) {
  ------------------
  |  Branch (1622:8): [True: 82, False: 0]
  ------------------
 1623|     82|        decoded = UA_new(type);
 1624|     82|        if(!decoded)
  ------------------
  |  Branch (1624:12): [True: 0, False: 82]
  ------------------
 1625|      0|            return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 1626|     82|    }
 1627|       |
 1628|       |    /* Jump to the first child element */
 1629|     82|    ctx->index += 1 + tok->attributes;
 1630|     82|    tok = &ctx->tokens[ctx->index];
 1631|       |
 1632|     82|    UA_StatusCode ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     82|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1633|     82|    UA_String bs = UA_STRING_STATIC(UA_XML_EXTENSIONOBJECT_BYTESTRING);
  ------------------
  |  |  224|     82|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1634|     82|    if(UA_String_equal(&tok->name, &bs)) {
  ------------------
  |  Branch (1634:8): [True: 0, False: 82]
  ------------------
 1635|       |        /* Decode binary ByteString Body */
 1636|      0|        eo->encoding = UA_EXTENSIONOBJECT_ENCODED_BYTESTRING;
 1637|      0|        ret = decodeXmlJumpTable[UA_DATATYPEKIND_BYTESTRING](ctx, &eo->content.encoded.body, NULL);
 1638|      0|        if(!type)
  ------------------
  |  Branch (1638:12): [True: 0, False: 0]
  ------------------
 1639|      0|            return ret;
 1640|      0|        UA_DecodeBinaryOptions opts;
 1641|      0|        memset(&opts, 0, sizeof(UA_DecodeBinaryOptions));
 1642|      0|        opts.namespaceMapping = ctx->namespaceMapping;
 1643|      0|        opts.customTypes = ctx->customTypes;
 1644|      0|        ret = UA_decodeBinary(&eo->content.encoded.body, decoded, type, &opts);
 1645|     82|    } else {
 1646|       |        /* Decode XML Body */
 1647|     82|        eo->encoding = UA_EXTENSIONOBJECT_ENCODED_XML;
 1648|     82|        UA_String body = {tok->end - tok->start, (UA_Byte*)(uintptr_t)ctx->xml + tok->start};
 1649|     82|        skipXmlObject(ctx); /* Skip over the body */
 1650|     82|        if(!type)
  ------------------
  |  Branch (1650:12): [True: 0, False: 82]
  ------------------
 1651|      0|            return UA_String_copy(&body, &eo->content.encoded.body);
 1652|     82|        UA_DecodeXmlOptions opts;
 1653|     82|        memset(&opts, 0, sizeof(UA_DecodeXmlOptions));
 1654|     82|        opts.namespaceMapping = ctx->namespaceMapping;
 1655|     82|        opts.serverUris = ctx->serverUris;
 1656|     82|        opts.serverUrisSize = ctx->serverUrisSize;
 1657|     82|        opts.customTypes = ctx->customTypes;
 1658|     82|        ret = UA_decodeXml(&body, decoded, type, &opts);
 1659|     82|    }
 1660|       |
 1661|     82|    if(ret != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|     82|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1661:8): [True: 0, False: 82]
  ------------------
 1662|      0|        UA_free(decoded); /* Return the un-decoded content if decoding fails */
  ------------------
  |  |   23|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1663|      0|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1664|      0|    }
 1665|       |
 1666|     82|    UA_ExtensionObject_clear(eo); /* Also clears the already decoded TypeId */
 1667|     82|    UA_ExtensionObject_setValue(eo, decoded, type);
 1668|     82|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     82|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1669|     82|}
ua_types_encoding_xml.c:lookupXmlType:
 1582|     82|lookupXmlType(ParseCtxXml *ctx, UA_NodeId *typeId) {
 1583|       |    /* Search in the builtin types */
 1584|  19.4k|    for(size_t i = 0; i < UA_TYPES_COUNT; ++i) {
  ------------------
  |  |   17|  19.4k|#define UA_TYPES_COUNT 388
  ------------------
  |  Branch (1584:23): [True: 19.4k, False: 0]
  ------------------
 1585|  19.4k|        if(UA_NodeId_equal(typeId, &UA_TYPES[i].typeId) ||
  ------------------
  |  Branch (1585:12): [True: 82, False: 19.3k]
  ------------------
 1586|  19.3k|           UA_NodeId_equal(typeId, &UA_TYPES[i].xmlEncodingId) ||
  ------------------
  |  Branch (1586:12): [True: 0, False: 19.3k]
  ------------------
 1587|  19.3k|           UA_NodeId_equal(typeId, &UA_TYPES[i].binaryEncodingId))
  ------------------
  |  Branch (1587:12): [True: 0, False: 19.3k]
  ------------------
 1588|     82|            return &UA_TYPES[i];
 1589|  19.4k|    }
 1590|       |
 1591|       |    /* Search in the customTypes */
 1592|      0|    const UA_DataTypeArray *customTypes = ctx->customTypes;
 1593|      0|    while(customTypes) {
  ------------------
  |  Branch (1593:11): [True: 0, False: 0]
  ------------------
 1594|      0|        for(size_t i = 0; i < customTypes->typesSize; ++i) {
  ------------------
  |  Branch (1594:27): [True: 0, False: 0]
  ------------------
 1595|      0|            const UA_DataType *type = &customTypes->types[i];
 1596|      0|            if(UA_NodeId_equal(typeId, &type->typeId) ||
  ------------------
  |  Branch (1596:16): [True: 0, False: 0]
  ------------------
 1597|      0|               UA_NodeId_equal(typeId, &type->xmlEncodingId) ||
  ------------------
  |  Branch (1597:16): [True: 0, False: 0]
  ------------------
 1598|      0|               UA_NodeId_equal(typeId, &type->binaryEncodingId))
  ------------------
  |  Branch (1598:16): [True: 0, False: 0]
  ------------------
 1599|      0|                return type;
 1600|      0|        }
 1601|      0|        customTypes = customTypes->next;
 1602|      0|    }
 1603|      0|    return NULL;
 1604|      0|}
ua_types_encoding_xml.c:DataValue_decodeXml:
 1929|      2|DECODE_XML(DataValue) {
 1930|      2|    UA_DataValue *dst = (UA_DataValue*)dst_;
 1931|      2|    XmlDecodeEntry entries[6] = {
 1932|      2|        {UA_STRING_STATIC("Value"), dst, DataValueValue_decodeXml, false, NULL},
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1933|      2|        {UA_STRING_STATIC("StatusCode"), &dst->status, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1934|      2|         &UA_TYPES[UA_TYPES_STATUSCODE]},
  ------------------
  |  |  640|      2|#define UA_TYPES_STATUSCODE 18
  ------------------
 1935|      2|        {UA_STRING_STATIC("SourceTimestamp"), &dst->sourceTimestamp, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1936|      2|         &UA_TYPES[UA_TYPES_DATETIME]},
  ------------------
  |  |  436|      2|#define UA_TYPES_DATETIME 12
  ------------------
 1937|      2|        {UA_STRING_STATIC("SourcePicoseconds"), &dst->sourcePicoseconds, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1938|      2|         &UA_TYPES[UA_TYPES_UINT16]},
  ------------------
  |  |  164|      2|#define UA_TYPES_UINT16 4
  ------------------
 1939|      2|        {UA_STRING_STATIC("ServerTimestamp"), &dst->serverTimestamp, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1940|      2|         &UA_TYPES[UA_TYPES_DATETIME]},
  ------------------
  |  |  436|      2|#define UA_TYPES_DATETIME 12
  ------------------
 1941|      2|        {UA_STRING_STATIC("ServerPicoseconds"), &dst->serverPicoseconds, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1942|      2|         &UA_TYPES[UA_TYPES_UINT16]}
  ------------------
  |  |  164|      2|#define UA_TYPES_UINT16 4
  ------------------
 1943|      2|    };
 1944|      2|    status ret = decodeXmlFields(ctx, entries, 6);
 1945|      2|    dst->hasValue = entries[0].found;
 1946|      2|    dst->hasStatus = entries[1].found;
 1947|      2|    dst->hasSourceTimestamp = entries[2].found;
 1948|      2|    dst->hasSourcePicoseconds = entries[3].found;
 1949|      2|    dst->hasServerTimestamp = entries[4].found;
 1950|      2|    dst->hasServerPicoseconds = entries[5].found;
 1951|      2|    return ret;
 1952|      2|}
ua_types_encoding_xml.c:decodeXmlVariantValue:
 1845|  4.34k|decodeXmlVariantValue(ParseCtxXml *ctx, UA_Variant *dst) {
 1846|  4.34k|    xml_token *tok = &ctx->tokens[ctx->index];
 1847|  4.34k|    if(tok->children != 1)
  ------------------
  |  Branch (1847:8): [True: 4, False: 4.34k]
  ------------------
 1848|      4|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      4|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1849|       |
 1850|       |    /* Jump to the child of the <Value> token */
 1851|  4.34k|    ctx->depth++;
 1852|  4.34k|    ctx->index += 1 + ctx->tokens[ctx->index].attributes;
 1853|  4.34k|    tok = &ctx->tokens[ctx->index];
 1854|       |
 1855|       |    /* Special case for multi-dimensional arrays */
 1856|  4.34k|    static UA_String matrName = UA_STRING_STATIC("Matrix");
  ------------------
  |  |  224|  4.34k|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1857|  4.34k|    UA_StatusCode ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  4.34k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1858|  4.34k|    if(UA_String_equal(&tok->name, &matrName)) {
  ------------------
  |  Branch (1858:8): [True: 2, False: 4.33k]
  ------------------
 1859|      2|        ret = decodeMatrixVariant(ctx, dst);
 1860|      2|        unwrapVariantExtensionObject(dst, true);
 1861|      2|        ctx->depth--;
 1862|      2|        return ret;
 1863|      2|    }
 1864|       |
 1865|       |    /* Get the Data type / array type */
 1866|  4.33k|    UA_Boolean isArray = false;
 1867|  4.33k|    static char *lo = "ListOf";
 1868|  4.33k|    UA_String typeName = tok->name;
 1869|  4.33k|    if(tok->name.length > strlen(lo) &&
  ------------------
  |  Branch (1869:8): [True: 835, False: 3.50k]
  ------------------
 1870|    835|       strncmp((char*)tok->name.data, lo, strlen(lo)) == 0) {
  ------------------
  |  Branch (1870:8): [True: 30, False: 805]
  ------------------
 1871|     30|        isArray = true;
 1872|     30|        typeName.data += strlen(lo);
 1873|     30|        typeName.length -= strlen(lo);
 1874|     30|    }
 1875|       |
 1876|       |    /* Look up the DataType from the name */
 1877|  4.33k|    dst->type = lookupTypeByName(ctx, typeName);
 1878|  4.33k|    if(!dst->type) {
  ------------------
  |  Branch (1878:8): [True: 160, False: 4.17k]
  ------------------
 1879|    160|        ctx->depth--;
 1880|    160|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    160|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1881|    160|    }
 1882|       |
 1883|       |    /* Decode */
 1884|  4.17k|    if(!isArray) {
  ------------------
  |  Branch (1884:8): [True: 4.15k, False: 29]
  ------------------
 1885|  4.15k|        dst->data = UA_new(dst->type);
 1886|  4.15k|        if(!dst->data) {
  ------------------
  |  Branch (1886:12): [True: 0, False: 4.15k]
  ------------------
 1887|      0|            ctx->depth--;
 1888|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1889|      0|        }
 1890|  4.15k|        ret = decodeXmlJumpTable[dst->type->typeKind](ctx, dst->data, dst->type);
 1891|  4.15k|    } else {
 1892|     29|        ret = Array_decodeXml(ctx, &dst->arrayLength, dst->type);
 1893|     29|    }
 1894|       |
 1895|       |    /* Unwrap ExtensionObject values in the variant */
 1896|  4.17k|    unwrapVariantExtensionObject(dst, isArray);
 1897|       |
 1898|  4.17k|    ctx->depth--;
 1899|  4.17k|    return ret;
 1900|  4.17k|}
ua_types_encoding_xml.c:decodeMatrixVariant:
 1789|      2|decodeMatrixVariant(ParseCtxXml *ctx, UA_Variant *dst) {
 1790|       |    /* The <Matrix> token needs two children: <Dimensions> and <Elements> */
 1791|      2|    xml_token *tok = &ctx->tokens[ctx->index];
 1792|      2|    if(tok->children != 2)
  ------------------
  |  Branch (1792:8): [True: 1, False: 1]
  ------------------
 1793|      1|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      1|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1794|       |
 1795|       |    /* Jump to the child of the <Matrix> token */
 1796|      1|    ctx->index += 1 + ctx->tokens[ctx->index].attributes;
 1797|      1|    tok = &ctx->tokens[ctx->index];
 1798|       |
 1799|      1|    UA_assert(tok->type == XML_TOKEN_ELEMENT);
  ------------------
  |  |  248|      1|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (1799:5): [True: 1, False: 0]
  ------------------
 1800|      1|    static UA_String dimName = UA_STRING_STATIC("Dimensions");
  ------------------
  |  |  224|      1|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1801|      1|    if(!UA_String_equal(&tok->name, &dimName))
  ------------------
  |  Branch (1801:8): [True: 1, False: 0]
  ------------------
 1802|      1|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      1|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1803|       |
 1804|      0|    UA_StatusCode ret =
 1805|      0|        Array_decodeXml(ctx, &dst->arrayDimensionsSize, &UA_TYPES[UA_TYPES_INT32]);
  ------------------
  |  |  198|      0|#define UA_TYPES_INT32 5
  ------------------
 1806|      0|    if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1806:8): [True: 0, False: 0]
  ------------------
 1807|      0|        return ret;
 1808|       |
 1809|      0|    UA_assert(tok->type == XML_TOKEN_ELEMENT);
  ------------------
  |  |  248|      0|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (1809:5): [True: 0, False: 0]
  ------------------
 1810|      0|    static UA_String elemName = UA_STRING_STATIC("Elements");
  ------------------
  |  |  224|      0|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1811|      0|    tok = &ctx->tokens[ctx->index];
 1812|      0|    if(!UA_String_equal(&tok->name, &elemName) || tok->children == 0)
  ------------------
  |  Branch (1812:8): [True: 0, False: 0]
  |  Branch (1812:51): [True: 0, False: 0]
  ------------------
 1813|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1814|       |
 1815|       |    /* Get the type of the first element */
 1816|      0|    size_t oldIndex = ctx->index;
 1817|      0|    ctx->index += 1 + ctx->tokens[ctx->index].attributes;
 1818|      0|    tok = &ctx->tokens[ctx->index];
 1819|      0|    UA_assert(tok->type == XML_TOKEN_ELEMENT);
  ------------------
  |  |  248|      0|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (1819:5): [True: 0, False: 0]
  ------------------
 1820|       |
 1821|      0|    UA_String typeName = tok->name;
 1822|      0|    dst->type = lookupTypeByName(ctx, typeName);
 1823|      0|    if(!dst->type)
  ------------------
  |  Branch (1823:8): [True: 0, False: 0]
  ------------------
 1824|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1825|       |
 1826|       |    /* Decode the array */
 1827|      0|    ctx->index = oldIndex;
 1828|      0|    ret = Array_decodeXml(ctx, &dst->arrayLength, dst->type);
 1829|      0|    if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1829:8): [True: 0, False: 0]
  ------------------
 1830|      0|        return ret;
 1831|       |
 1832|       |    /* Check that the ArrayDimensions match */
 1833|      0|    size_t dimLen = 1;
 1834|      0|    for(size_t i = 0; i < dst->arrayDimensionsSize; i++) {
  ------------------
  |  Branch (1834:23): [True: 0, False: 0]
  ------------------
 1835|      0|        if(dst->arrayDimensions[i] != 0 &&
  ------------------
  |  Branch (1835:12): [True: 0, False: 0]
  ------------------
 1836|      0|           dimLen > SIZE_MAX / dst->arrayDimensions[i])
  ------------------
  |  Branch (1836:12): [True: 0, False: 0]
  ------------------
 1837|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1838|      0|        dimLen *= dst->arrayDimensions[i];
 1839|      0|    }
 1840|       |
 1841|      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 (1841:12): [True: 0, False: 0]
  ------------------
 1842|      0|}
ua_types_encoding_xml.c:unwrapVariantExtensionObject:
 1741|  4.18k|unwrapVariantExtensionObject(UA_Variant *dst, UA_Boolean isArray) {
 1742|  4.18k|    if(dst->type != &UA_TYPES[UA_TYPES_EXTENSIONOBJECT])
  ------------------
  |  |  742|  4.18k|#define UA_TYPES_EXTENSIONOBJECT 21
  ------------------
  |  Branch (1742:8): [True: 4.09k, False: 86]
  ------------------
 1743|  4.09k|        return;
 1744|     86|    if(isArray && dst->arrayLength == 0)
  ------------------
  |  Branch (1744:8): [True: 2, False: 84]
  |  Branch (1744:19): [True: 2, False: 0]
  ------------------
 1745|      2|        return;
 1746|       |
 1747|     84|    UA_ExtensionObject *eo = (UA_ExtensionObject*)dst->data;
 1748|     84|    if(eo->encoding != UA_EXTENSIONOBJECT_DECODED)
  ------------------
  |  Branch (1748:8): [True: 2, False: 82]
  ------------------
 1749|      2|        return;
 1750|       |
 1751|     82|    const UA_DataType *type = eo->content.decoded.type;
 1752|       |
 1753|       |    /* Scalar */
 1754|     82|    if(!isArray) {
  ------------------
  |  Branch (1754:8): [True: 82, False: 0]
  ------------------
 1755|     82|        dst->data = eo->content.decoded.data;
 1756|     82|        dst->type = type;
 1757|     82|        UA_free(eo);
  ------------------
  |  |   23|     82|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1758|     82|        return;
 1759|     82|    }
 1760|       |
 1761|       |    /* Array. Check that all members can be unpacked */
 1762|      0|    for(size_t i = 0; i < dst->arrayLength; i++, eo++) {
  ------------------
  |  Branch (1762:23): [True: 0, False: 0]
  ------------------
 1763|      0|        if(eo->encoding != UA_EXTENSIONOBJECT_DECODED)
  ------------------
  |  Branch (1763:12): [True: 0, False: 0]
  ------------------
 1764|      0|            return;
 1765|      0|        if(eo->content.decoded.type != type)
  ------------------
  |  Branch (1765:12): [True: 0, False: 0]
  ------------------
 1766|      0|            return;
 1767|      0|    }
 1768|       |
 1769|       |    /* Allocate the array */
 1770|      0|    void *unpacked = UA_Array_new(dst->arrayLength, type);
 1771|      0|    if(!unpacked)
  ------------------
  |  Branch (1771:8): [True: 0, False: 0]
  ------------------
 1772|      0|        return;
 1773|       |
 1774|       |    /* Unpack the content and set the new array */
 1775|      0|    uintptr_t uptr = (uintptr_t)unpacked;
 1776|      0|    eo = (UA_ExtensionObject*)dst->data;
 1777|      0|    for(size_t i = 0; i < dst->arrayLength; i++, eo++) {
  ------------------
  |  Branch (1777:23): [True: 0, False: 0]
  ------------------
 1778|       |        /* Move the value content */
 1779|      0|        memcpy((void*)uptr, eo->content.decoded.data, type->memSize);
 1780|      0|        UA_free(eo->content.decoded.data); /* Free the old value location */
  ------------------
  |  |   23|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1781|      0|        uptr += type->memSize;
 1782|      0|    }
 1783|      0|    UA_free(dst->data); /* Remove the old array of ExtensionObjects */
  ------------------
  |  |   23|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1784|      0|    dst->data = unpacked;
 1785|      0|    dst->type = type;
 1786|      0|}
ua_types_encoding_xml.c:lookupTypeByName:
 1715|  4.33k|lookupTypeByName(ParseCtxXml *ctx, UA_String typeName) {
 1716|       |    /* Search in the builtin types */
 1717|   124k|    for(size_t i = 0; i < UA_TYPES_COUNT; ++i) {
  ------------------
  |  |   17|   124k|#define UA_TYPES_COUNT 388
  ------------------
  |  Branch (1717:23): [True: 123k, False: 160]
  ------------------
 1718|   123k|        const UA_DataType *type = &UA_TYPES[i];
 1719|   123k|        size_t length = strlen(type->typeName);
 1720|   123k|        if(length == typeName.length &&
  ------------------
  |  Branch (1720:12): [True: 15.4k, False: 108k]
  ------------------
 1721|  15.4k|           strncmp((char*)typeName.data, type->typeName, typeName.length) == 0)
  ------------------
  |  Branch (1721:12): [True: 4.17k, False: 11.2k]
  ------------------
 1722|  4.17k|            return &UA_TYPES[i];
 1723|   123k|    }
 1724|       |
 1725|       |    /* Search in the customTypes */
 1726|    160|    const UA_DataTypeArray *customTypes = ctx->customTypes;
 1727|    160|    while(customTypes) {
  ------------------
  |  Branch (1727:11): [True: 0, False: 160]
  ------------------
 1728|      0|        for(size_t i = 0; i < customTypes->typesSize; ++i) {
  ------------------
  |  Branch (1728:27): [True: 0, False: 0]
  ------------------
 1729|      0|            const UA_DataType *type = &customTypes->types[i];
 1730|      0|            size_t length = strlen(type->typeName);
 1731|      0|            if(length == typeName.length &&
  ------------------
  |  Branch (1731:16): [True: 0, False: 0]
  ------------------
 1732|      0|               strncmp((char*)typeName.data, type->typeName, typeName.length) == 0)
  ------------------
  |  Branch (1732:16): [True: 0, False: 0]
  ------------------
 1733|      0|                return type;
 1734|      0|        }
 1735|      0|        customTypes = customTypes->next;
 1736|      0|    }
 1737|    160|    return NULL;
 1738|    160|}
ua_types_encoding_xml.c:Array_decodeXml:
 1688|     29|Array_decodeXml(ParseCtxXml *ctx, void *dst_, const UA_DataType *type) {
 1689|     29|    size_t *dstSize = (size_t*)dst_;
 1690|       |
 1691|       |    /* Allocate memory */
 1692|     29|    size_t length = ctx->tokens[ctx->index].children;
 1693|     29|    void **dst = (void**)((uintptr_t)dstSize + sizeof(void*));
 1694|     29|    *dst = UA_Array_new(length, type);
 1695|     29|    if(!*dst)
  ------------------
  |  Branch (1695:8): [True: 0, False: 29]
  ------------------
 1696|      0|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 1697|     29|    *dstSize = length;
 1698|       |
 1699|       |    /* Go to first array member. */
 1700|     29|    ctx->index += 1 + ctx->tokens[ctx->index].attributes;
 1701|       |
 1702|       |    /* Decode array members */
 1703|     29|    uintptr_t ptr = (uintptr_t)*dst;
 1704|     29|    for(size_t i = 0; i < length; ++i) {
  ------------------
  |  Branch (1704:23): [True: 19, False: 10]
  ------------------
 1705|     19|        status ret = decodeXmlJumpTable[type->typeKind](ctx, (void*)ptr, type);
 1706|     19|        if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|     19|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1706:12): [True: 19, False: 0]
  ------------------
 1707|     19|            return ret;
 1708|      0|        ptr += type->memSize;
 1709|      0|    }
 1710|       |
 1711|     10|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     10|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1712|     29|}
ua_types_encoding_xml.c:Variant_decodeXml:
 1902|  4.58k|DECODE_XML(Variant) {
 1903|  4.58k|    UA_Variant *dst = (UA_Variant*)dst_;
 1904|  4.58k|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  983|  4.58k|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (983:8): [True: 0, False: 4.58k]
  |  |  ------------------
  |  |  984|  4.58k|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  985|  4.58k|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (985:18): [Folded, False: 4.58k]
  |  |  ------------------
  ------------------
 1905|       |
 1906|  4.58k|    if(ctx->depth >= UA_XML_ENCODING_MAX_RECURSION)
  ------------------
  |  |  246|  4.58k|#define UA_XML_ENCODING_MAX_RECURSION 100
  ------------------
  |  Branch (1906:8): [True: 0, False: 4.58k]
  ------------------
 1907|      0|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
 1908|       |
 1909|  4.58k|    xml_token *tok = &ctx->tokens[ctx->index];
 1910|  4.58k|    if(tok->children == 0)
  ------------------
  |  Branch (1910:8): [True: 49, False: 4.53k]
  ------------------
 1911|     49|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     49|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1912|  4.53k|    if(tok->children != 1 || ctx->index + 2 >= ctx->tokensSize)
  ------------------
  |  Branch (1912:8): [True: 135, False: 4.40k]
  |  Branch (1912:30): [True: 3, False: 4.39k]
  ------------------
 1913|    138|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    138|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1914|       |
 1915|  4.39k|    ctx->index += 1 + ctx->tokens[ctx->index].attributes;
 1916|  4.39k|    tok = &ctx->tokens[ctx->index];
 1917|  4.39k|    static UA_String valName = UA_STRING_STATIC("Value");
  ------------------
  |  |  224|  4.39k|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1918|  4.39k|    if(!UA_String_equal(&tok->name, &valName))
  ------------------
  |  Branch (1918:8): [True: 52, False: 4.34k]
  ------------------
 1919|     52|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     52|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1920|  4.34k|    return decodeXmlVariantValue(ctx, dst);
 1921|  4.39k|}
ua_types_encoding_xml.c:DiagnosticInfo_decodeXml:
 1965|      2|DECODE_XML(DiagnosticInfo) {
 1966|      2|    UA_DiagnosticInfo *dst = (UA_DiagnosticInfo*)dst_;
 1967|      2|    XmlDecodeEntry entries[7] = {
 1968|      2|        {UA_STRING_STATIC("SymbolicId"), &dst->symbolicId, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1969|      2|         &UA_TYPES[UA_TYPES_INT32]},
  ------------------
  |  |  198|      2|#define UA_TYPES_INT32 5
  ------------------
 1970|      2|        {UA_STRING_STATIC("NamespaceUri"), &dst->namespaceUri, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1971|      2|         &UA_TYPES[UA_TYPES_INT32]},
  ------------------
  |  |  198|      2|#define UA_TYPES_INT32 5
  ------------------
 1972|      2|        {UA_STRING_STATIC("LocalizedText"), &dst->localizedText, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1973|      2|         &UA_TYPES[UA_TYPES_INT32]},
  ------------------
  |  |  198|      2|#define UA_TYPES_INT32 5
  ------------------
 1974|      2|        {UA_STRING_STATIC("Locale"), &dst->locale, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1975|      2|         &UA_TYPES[UA_TYPES_INT32]},
  ------------------
  |  |  198|      2|#define UA_TYPES_INT32 5
  ------------------
 1976|      2|        {UA_STRING_STATIC("AdditionalInfo"), &dst->additionalInfo, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1977|      2|         &UA_TYPES[UA_TYPES_STRING]},
  ------------------
  |  |  402|      2|#define UA_TYPES_STRING 11
  ------------------
 1978|      2|        {UA_STRING_STATIC("InnerStatusCode"), &dst->innerStatusCode, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1979|      2|         &UA_TYPES[UA_TYPES_STATUSCODE]},
  ------------------
  |  |  640|      2|#define UA_TYPES_STATUSCODE 18
  ------------------
 1980|      2|        {UA_STRING_STATIC("InnerDiagnosticInfo"), &dst->innerDiagnosticInfo,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1981|      2|         DiagnosticInfoInner_decodeXml, false, NULL}
 1982|      2|    };
 1983|      2|    status ret = decodeXmlFields(ctx, entries, 7);
 1984|      2|    dst->hasSymbolicId = entries[0].found;
 1985|      2|    dst->hasNamespaceUri = entries[1].found;
 1986|      2|    dst->hasLocalizedText = entries[2].found;
 1987|      2|    dst->hasLocale = entries[3].found;
 1988|      2|    dst->hasAdditionalInfo = entries[4].found;
 1989|      2|    dst->hasInnerStatusCode = entries[5].found;
 1990|      2|    dst->hasInnerDiagnosticInfo = entries[6].found;
 1991|      2|    return ret;
 1992|      2|}
ua_types_encoding_xml.c:Enum_decodeXml:
 1135|     24|Enum_decodeXml(ParseCtxXml *ctx, void *dst, const UA_DataType *type) {
 1136|     24|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  983|     24|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (983:8): [True: 0, False: 24]
  |  |  ------------------
  |  |  984|     24|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  985|     24|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (985:18): [Folded, False: 24]
  |  |  ------------------
  ------------------
 1137|     24|    GET_ELEM_CONTENT;
  ------------------
  |  |  988|     24|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  989|     24|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  990|     24|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (990:17): [Folded, False: 24]
  |  |  ------------------
  ------------------
 1138|     24|    skipXmlObject(ctx);
 1139|       |
 1140|    179|    for(size_t i = 0; i < type->membersSize; i++) {
  ------------------
  |  Branch (1140:23): [True: 155, False: 24]
  ------------------
 1141|    155|        const UA_DataTypeMember *m = &type->members[i];
 1142|    155|        size_t nameLength = strlen(m->memberName);
 1143|    155|        if(length <= nameLength + 1 || data[nameLength] != '_' ||
  ------------------
  |  Branch (1143:12): [True: 155, False: 0]
  |  Branch (1143:40): [True: 0, False: 0]
  ------------------
 1144|      0|           memcmp(data, m->memberName, nameLength) != 0)
  ------------------
  |  Branch (1144:12): [True: 0, False: 0]
  ------------------
 1145|    155|            continue;
 1146|      0|        UA_Int64 value = 0;
 1147|      0|        UA_StatusCode ret = decodeSigned(&data[nameLength + 1],
 1148|      0|                                         length - nameLength - 1, &value);
 1149|      0|        UA_Int32 expected = (UA_Int32)(uintptr_t)m->memberType;
 1150|      0|        if(ret == UA_STATUSCODE_GOOD && value == expected) {
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1150:12): [True: 0, False: 0]
  |  Branch (1150:41): [True: 0, False: 0]
  ------------------
 1151|      0|            *(UA_Int32*)dst = expected;
 1152|      0|            return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1153|      0|        }
 1154|      0|    }
 1155|       |
 1156|       |    /* Be lenient with XML produced by implementations that encode enum values
 1157|       |     * as bare integers instead of the schema-defined "Name_Value" form. */
 1158|     24|    UA_Int64 value = 0;
 1159|     24|    UA_StatusCode ret = decodeSigned(data, length, &value);
 1160|     24|    if(ret == UA_STATUSCODE_GOOD && value >= UA_INT32_MIN && value <= UA_INT32_MAX) {
  ------------------
  |  |   17|     48|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  if(ret == UA_STATUSCODE_GOOD && value >= UA_INT32_MIN && value <= UA_INT32_MAX) {
  ------------------
  |  |  100|     24|#define UA_INT32_MIN ((int32_t)-2147483648LL)
  ------------------
                  if(ret == UA_STATUSCODE_GOOD && value >= UA_INT32_MIN && value <= UA_INT32_MAX) {
  ------------------
  |  |  101|      0|#define UA_INT32_MAX 2147483647L
  ------------------
  |  Branch (1160:8): [True: 0, False: 24]
  |  Branch (1160:37): [True: 0, False: 0]
  |  Branch (1160:62): [True: 0, False: 0]
  ------------------
 1161|      0|        *(UA_Int32*)dst = (UA_Int32)value;
 1162|      0|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1163|      0|    }
 1164|     24|    return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     24|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1165|     24|}
ua_types_encoding_xml.c:decodeXmlStructure:
 1997|    164|decodeXmlStructure(ParseCtxXml *ctx, void *dst, const UA_DataType *type) {
 1998|       |    /* Check the recursion limit */
 1999|    164|    if(ctx->depth >= UA_XML_ENCODING_MAX_RECURSION - 1)
  ------------------
  |  |  246|    164|#define UA_XML_ENCODING_MAX_RECURSION 100
  ------------------
  |  Branch (1999:8): [True: 0, False: 164]
  ------------------
 2000|      0|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
 2001|    164|    ctx->depth++;
 2002|       |
 2003|    164|    uintptr_t ptr = (uintptr_t)dst;
 2004|    164|    status ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    164|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2005|    164|    size_t membersSize = type->membersSize;
 2006|    164|    UA_STACKARRAY(XmlDecodeEntry, entries, membersSize);
  ------------------
  |  |  225|    164|#  define UA_STACKARRAY(TYPE, NAME, SIZE) TYPE NAME[SIZE]
  ------------------
 2007|  1.00k|    for(size_t i = 0; i < membersSize; ++i) {
  ------------------
  |  Branch (2007:23): [True: 838, False: 164]
  ------------------
 2008|    838|        const UA_DataTypeMember *m = &type->members[i];
 2009|    838|        const UA_DataType *mt = m->memberType;
 2010|    838|        entries[i].type = mt;
 2011|    838|        entries[i].name = UA_STRING((char*)(uintptr_t)m->memberName);
 2012|    838|        entries[i].found = false;
 2013|    838|        ptr += m->padding;
 2014|    838|        entries[i].fieldPointer = (void*)ptr;
 2015|    838|        if(!m->isArray && !m->isOptional) {
  ------------------
  |  Branch (2015:12): [True: 694, False: 144]
  |  Branch (2015:27): [True: 694, False: 0]
  ------------------
 2016|    694|            entries[i].function = NULL;
 2017|    694|            ptr += mt->memSize;
 2018|    694|        } else if(m->isArray) {
  ------------------
  |  Branch (2018:19): [True: 144, False: 0]
  ------------------
 2019|    144|            entries[i].function = Array_decodeXml;
 2020|    144|            ptr += sizeof(size_t) + sizeof(void*);
 2021|    144|        } else {
 2022|      0|            entries[i].function = Optional_decodeXml;
 2023|      0|            ptr += sizeof(void*);
 2024|      0|        }
 2025|    838|    }
 2026|       |
 2027|    164|    ret = decodeXmlFields(ctx, entries, membersSize);
 2028|       |
 2029|    164|    if(ctx->depth == 0)
  ------------------
  |  Branch (2029:8): [True: 0, False: 164]
  ------------------
 2030|      0|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
 2031|    164|    ctx->depth--;
 2032|    164|    return ret;
 2033|    164|}

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|     82|                  const UA_NamespaceMapping *nsMapping) {
  324|     82|    UA_StatusCode res =
  325|     82|        parse_nodeid(id, str.data, str.data+str.length, UA_ESCAPING_NONE, nsMapping);
  326|     82|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|     82|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (326:8): [True: 0, False: 82]
  ------------------
  327|      0|        UA_NodeId_clear(id);
  328|     82|    return res;
  329|     82|}
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|     82|             UA_Escaping idEsc, const UA_NamespaceMapping *nsMapping) {
  149|     82|    *id = UA_NODEID_NULL; /* Reset the NodeId */
  150|     82|    LexContext context;
  151|     82|    memset(&context, 0, sizeof(LexContext));
  152|     82|    UA_Byte *begin = (UA_Byte*)(uintptr_t)pos;
  153|     82|    const u8 *ns = NULL, *nsu = NULL, *body = NULL;
  154|       |
  155|       |    
  156|     82|{
  157|     82|	u8 yych;
  158|     82|	yych = YYPEEK();
  ------------------
  |  |   33|     82|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     82|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     82|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 82, False: 0]
  |  |  ------------------
  ------------------
  159|     82|	switch (yych) {
  160|      0|		case 'b':
  ------------------
  |  Branch (160:3): [True: 0, False: 82]
  ------------------
  161|      0|		case 'g':
  ------------------
  |  Branch (161:3): [True: 0, False: 82]
  ------------------
  162|     82|		case 'i':
  ------------------
  |  Branch (162:3): [True: 82, False: 0]
  ------------------
  163|     82|		case 's':
  ------------------
  |  Branch (163:3): [True: 0, False: 82]
  ------------------
  164|     82|			YYSTAGN(context.yyt1);
  ------------------
  |  |   39|     82|#define YYSTAGN(t) t = NULL
  ------------------
  165|     82|			YYSTAGN(context.yyt2);
  ------------------
  |  |   39|     82|#define YYSTAGN(t) t = NULL
  ------------------
  166|     82|			goto yy3;
  167|      0|		case 'n': goto yy4;
  ------------------
  |  Branch (167:3): [True: 0, False: 82]
  ------------------
  168|      0|		default: goto yy1;
  ------------------
  |  Branch (168:3): [True: 0, False: 82]
  ------------------
  169|     82|	}
  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|     82|yy3:
  175|     82|	YYSKIP();
  ------------------
  |  |   35|     82|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|     82|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  176|     82|	yych = YYPEEK();
  ------------------
  |  |   33|     82|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     82|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     82|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 82, False: 0]
  |  |  ------------------
  ------------------
  177|     82|	switch (yych) {
  178|     82|		case '=': goto yy5;
  ------------------
  |  Branch (178:3): [True: 82, False: 0]
  ------------------
  179|      0|		default: goto yy2;
  ------------------
  |  Branch (179:3): [True: 0, False: 82]
  ------------------
  180|     82|	}
  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|     82|yy5:
  190|     82|	YYSKIP();
  ------------------
  |  |   35|     82|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|     82|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  191|     82|	nsu = context.yyt2;
  192|     82|	ns = context.yyt1;
  193|     82|	YYSTAGP(body);
  ------------------
  |  |   38|     82|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|     82|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  194|     82|	YYSHIFTSTAG(body, -2);
  ------------------
  |  |   40|     82|#define YYSHIFTSTAG(t, shift) t += shift
  ------------------
  195|     82|	{ 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|     82| match:
  295|     82|    if(nsu) {
  ------------------
  |  Branch (295:8): [True: 0, False: 82]
  ------------------
  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|     82|    } else if(ns) {
  ------------------
  |  Branch (305:15): [True: 0, False: 82]
  ------------------
  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|     82|    return parse_nodeid_body(id, body, end, idEsc);
  319|     82|}
ua_types_lex.c:parse_nodeid_body:
  109|     82|parse_nodeid_body(UA_NodeId *id, const u8 *body, const u8 *end, UA_Escaping esc) {
  110|     82|    UA_StatusCode res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     82|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  111|     82|    UA_String str = {(size_t)(end - (body+2)), (UA_Byte*)(uintptr_t)body + 2};
  112|     82|    switch(*body) {
  113|     82|    case 'i':
  ------------------
  |  Branch (113:5): [True: 82, False: 0]
  ------------------
  114|     82|        id->identifierType = UA_NODEIDTYPE_NUMERIC;
  115|     82|        if(UA_readNumber(str.data, str.length, &id->identifier.numeric) != str.length)
  ------------------
  |  Branch (115:12): [True: 0, False: 82]
  ------------------
  116|      0|            res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  117|     82|        break;
  118|      0|    case 's':
  ------------------
  |  Branch (118:5): [True: 0, False: 82]
  ------------------
  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: 82]
  ------------------
  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: 82]
  ------------------
  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);
  ------------------
  |  |  248|      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: 82]
  ------------------
  140|      0|        res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  141|      0|        break;
  142|     82|    }
  143|     82|    return res;
  144|     82|}

UA_readNumberWithBase:
  122|     82|                      UA_UInt32 *number, UA_Byte base) {
  123|     82|    UA_assert(buf);
  ------------------
  |  |  248|     82|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (123:5): [True: 82, False: 0]
  ------------------
  124|     82|    UA_assert(number);
  ------------------
  |  |  248|     82|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (124:5): [True: 82, False: 0]
  ------------------
  125|       |    /* Accumulate in 64 bits. n stays below 2^32 between the digits, so n * base
  126|       |     * + digit cannot overflow for any base up to 36. */
  127|     82|    u64 n = 0;
  128|     82|    size_t progress = 0;
  129|       |    /* read numbers until the end or a non-number character appears */
  130|    371|    while(progress < buflen) {
  ------------------
  |  Branch (130:11): [True: 289, False: 82]
  ------------------
  131|    289|        u8 c = buf[progress];
  132|    289|        u32 digit;
  133|    289|        if(c >= '0' && c <= '9' && c <= '0' + (base-1))
  ------------------
  |  Branch (133:12): [True: 289, False: 0]
  |  Branch (133:24): [True: 289, False: 0]
  |  Branch (133:36): [True: 289, False: 0]
  ------------------
  134|    289|           digit = c - '0';
  135|      0|        else if(base > 9 && c >= 'a' && c <= 'z' && c <= 'a' + (base-11))
  ------------------
  |  Branch (135:17): [True: 0, False: 0]
  |  Branch (135:29): [True: 0, False: 0]
  |  Branch (135:41): [True: 0, False: 0]
  |  Branch (135:53): [True: 0, False: 0]
  ------------------
  136|      0|           digit = c-'a' + 10;
  137|      0|        else if(base > 9 && c >= 'A' && c <= 'Z' && c <= 'A' + (base-11))
  ------------------
  |  Branch (137:17): [True: 0, False: 0]
  |  Branch (137:29): [True: 0, False: 0]
  |  Branch (137:41): [True: 0, False: 0]
  |  Branch (137:53): [True: 0, False: 0]
  ------------------
  138|      0|           digit = c-'A' + 10;
  139|      0|        else
  140|      0|           break;
  141|    289|        n = (n * base) + digit;
  142|       |        /* The number does not fit into 32 bits. Report no valid digits
  143|       |         * instead of returning a wrapped value. */
  144|    289|        if(n > UA_UINT32_MAX)
  ------------------
  |  |  110|    289|#define UA_UINT32_MAX 4294967295UL
  ------------------
  |  Branch (144:12): [True: 0, False: 289]
  ------------------
  145|      0|            return 0;
  146|    289|        ++progress;
  147|    289|    }
  148|     82|    *number = (u32)n;
  149|     82|    return progress;
  150|     82|}
UA_readNumber:
  153|     82|UA_readNumber(const UA_Byte *buf, size_t buflen, UA_UInt32 *number) {
  154|     82|    return UA_readNumberWithBase(buf, buflen, number, 10);
  155|     82|}

LLVMFuzzerTestOneInput:
   13|  6.22k|LLVMFuzzerTestOneInput(uint8_t *data, size_t size) {
   14|  6.22k|    UA_ByteString buf;
   15|  6.22k|    buf.data = (UA_Byte*)data;
   16|  6.22k|    buf.length = size;
   17|       |
   18|  6.22k|    UA_Variant value;
   19|  6.22k|    UA_Variant_init(&value);
   20|       |
   21|  6.22k|    UA_StatusCode retval = UA_decodeXml(&buf, &value, &UA_TYPES[UA_TYPES_VARIANT], NULL);
  ------------------
  |  |  810|  6.22k|#define UA_TYPES_VARIANT 23
  ------------------
   22|  6.22k|    if(retval != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  6.22k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (22:8): [True: 4.62k, False: 1.60k]
  ------------------
   23|  4.62k|        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.60k|    size_t xmlSize = UA_calcSizeXml(&value, &UA_TYPES[UA_TYPES_VARIANT], NULL);
  ------------------
  |  |  810|  1.60k|#define UA_TYPES_VARIANT 23
  ------------------
   28|  1.60k|    if(xmlSize == 0) {
  ------------------
  |  Branch (28:8): [True: 49, False: 1.55k]
  ------------------
   29|     49|        UA_Variant_clear(&value);
   30|     49|        return 0;
   31|     49|    }
   32|       |
   33|  1.55k|    UA_ByteString buf2 = UA_BYTESTRING_NULL;
   34|  1.55k|    retval = UA_ByteString_allocBuffer(&buf2, xmlSize);
   35|  1.55k|    if(retval != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|  1.55k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (35:8): [True: 0, False: 1.55k]
  ------------------
   36|      0|        UA_Variant_clear(&value);
   37|      0|        return 0;
   38|      0|    }
   39|       |
   40|  1.55k|    retval = UA_encodeXml(&value, &UA_TYPES[UA_TYPES_VARIANT], &buf2, NULL);
  ------------------
  |  |  810|  1.55k|#define UA_TYPES_VARIANT 23
  ------------------
   41|  1.55k|    UA_assert(retval == UA_STATUSCODE_GOOD);
  ------------------
  |  |  248|  1.55k|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (41:5): [True: 1.55k, False: 0]
  ------------------
   42|       |
   43|  1.55k|    UA_Variant value2;
   44|  1.55k|    UA_Variant_init(&value2);
   45|  1.55k|    retval = UA_decodeXml(&buf2, &value2, &UA_TYPES[UA_TYPES_VARIANT], NULL);
  ------------------
  |  |  810|  1.55k|#define UA_TYPES_VARIANT 23
  ------------------
   46|  1.55k|    if(retval == UA_STATUSCODE_BADOUTOFMEMORY) {
  ------------------
  |  |   32|  1.55k|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
  |  Branch (46:8): [True: 0, False: 1.55k]
  ------------------
   47|      0|        UA_Variant_clear(&value);
   48|      0|        UA_ByteString_clear(&buf2);
   49|      0|        return 0;
   50|      0|    }
   51|  1.55k|    UA_assert(retval == UA_STATUSCODE_GOOD);
  ------------------
  |  |  248|  1.55k|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (51:5): [True: 1.55k, False: 0]
  ------------------
   52|       |
   53|  1.55k|    UA_assert(UA_order(&value, &value2, &UA_TYPES[UA_TYPES_VARIANT]) == UA_ORDER_EQ);
  ------------------
  |  |  248|  1.55k|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (53:5): [True: 1.55k, False: 0]
  ------------------
   54|       |
   55|  1.55k|    UA_ByteString buf3 = UA_BYTESTRING_NULL;
   56|  1.55k|    retval = UA_ByteString_allocBuffer(&buf3, xmlSize);
   57|  1.55k|    if(retval != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|  1.55k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (57:8): [True: 0, False: 1.55k]
  ------------------
   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.55k|    retval = UA_encodeXml(&value2, &UA_TYPES[UA_TYPES_VARIANT], &buf3, NULL);
  ------------------
  |  |  810|  1.55k|#define UA_TYPES_VARIANT 23
  ------------------
   65|  1.55k|    UA_assert(retval == UA_STATUSCODE_GOOD);
  ------------------
  |  |  248|  1.55k|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (65:5): [True: 1.55k, False: 0]
  ------------------
   66|       |
   67|  1.55k|    UA_assert(buf2.length == buf3.length);
  ------------------
  |  |  248|  1.55k|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (67:5): [True: 1.55k, False: 0]
  ------------------
   68|  1.55k|    UA_assert(memcmp(buf2.data, buf3.data, buf2.length) == 0);
  ------------------
  |  |  248|  1.55k|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (68:5): [True: 1.55k, False: 0]
  ------------------
   69|       |
   70|  1.55k|    UA_Variant_clear(&value);
   71|  1.55k|    UA_Variant_clear(&value2);
   72|  1.55k|    UA_ByteString_clear(&buf2);
   73|  1.55k|    UA_ByteString_clear(&buf3);
   74|  1.55k|    return 0;
   75|  1.55k|}

fuzz_xml_decode_encode.cc:_ZL15UA_Variant_initP10UA_Variant:
  138|  7.77k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
fuzz_xml_decode_encode.cc:_ZL16UA_Variant_clearP10UA_Variant:
  138|  3.15k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
fuzz_xml_decode_encode.cc:_ZL19UA_ByteString_clearP9UA_String:
  138|  3.10k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types.c:UA_ByteString_init:
  138|  3.72k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types.c:UA_ExtensionObject_init:
  138|    328|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_xml.c:UA_String_clear:
  138|    247|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_xml.c:UA_String_copy:
  138|    508|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_xml.c:UA_String_init:
  138|      1|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_xml.c:UA_String_equal:
  138|  8.90k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_xml.c:UA_NodeId_equal:
  138|  58.2k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_xml.c:UA_ExtensionObject_clear:
  138|     82|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl

