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

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

parseUInt64:
   30|  2.07k|parseUInt64(const char *str, size_t size, uint64_t *result) {
   31|  2.07k|    size_t i = 0;
   32|  2.07k|    uint64_t n = 0, prev = 0;
   33|       |
   34|       |    /* Hex */
   35|  2.07k|    if(size > 2 && str[0] == '0' && (str[1] | 32) == 'x') {
  ------------------
  |  Branch (35:8): [True: 1.83k, False: 234]
  |  Branch (35:20): [True: 416, False: 1.42k]
  |  Branch (35:37): [True: 207, False: 209]
  ------------------
   36|    207|        i = 2;
   37|  2.82k|        for(; i < size; i++) {
  ------------------
  |  Branch (37:15): [True: 2.67k, False: 155]
  ------------------
   38|  2.67k|            uint8_t c = (uint8_t)str[i] | 32;
   39|  2.67k|            if(c >= '0' && c <= '9')
  ------------------
  |  Branch (39:16): [True: 2.65k, False: 18]
  |  Branch (39:28): [True: 1.24k, False: 1.41k]
  ------------------
   40|  1.24k|                c = (uint8_t)(c - '0');
   41|  1.43k|            else if(c >= 'a' && c <='f')
  ------------------
  |  Branch (41:21): [True: 1.40k, False: 23]
  |  Branch (41:33): [True: 1.38k, False: 22]
  ------------------
   42|  1.38k|                c = (uint8_t)(c - 'a' + 10);
   43|     45|            else if(c >= 'A' && c <='F')
  ------------------
  |  Branch (43:21): [True: 24, False: 21]
  |  Branch (43:33): [True: 0, False: 24]
  ------------------
   44|      0|                c = (uint8_t)(c - 'A' + 10);
   45|     45|            else
   46|     45|                break;
   47|  2.62k|            n = (n << 4) | (c & 0xF);
   48|  2.62k|            if(n < prev) /* Check for overflow */
  ------------------
  |  Branch (48:16): [True: 7, False: 2.62k]
  ------------------
   49|      7|                return 0;
   50|  2.62k|            prev = n;
   51|  2.62k|        }
   52|    200|        *result = n;
   53|    200|        return (i > 2) ? i : 0; /* 2 -> No digit was parsed */
  ------------------
  |  Branch (53:16): [True: 196, False: 4]
  ------------------
   54|    207|    }
   55|       |
   56|       |    /* Decimal */
   57|  22.0k|    for(; i < size; i++) {
  ------------------
  |  Branch (57:11): [True: 20.6k, False: 1.41k]
  ------------------
   58|  20.6k|        if(str[i] < '0' || str[i] > '9')
  ------------------
  |  Branch (58:12): [True: 360, False: 20.2k]
  |  Branch (58:28): [True: 89, False: 20.1k]
  ------------------
   59|    449|            break;
   60|       |        /* Fast multiplication: n*10 == (n*8) + (n*2) */
   61|  20.1k|        n = (n << 3) + (n << 1) + (uint8_t)(str[i] - '0');
   62|  20.1k|        if(n < prev) /* Check for overflow */
  ------------------
  |  Branch (62:12): [True: 2, False: 20.1k]
  ------------------
   63|      2|            return 0;
   64|  20.1k|        prev = n;
   65|  20.1k|    }
   66|  1.86k|    *result = n;
   67|  1.86k|    return i;
   68|  1.86k|}
parseInt64:
   71|  1.42k|parseInt64(const char *str, size_t size, int64_t *result) {
   72|       |    /* Negative value? */
   73|  1.42k|    size_t i = 0;
   74|  1.42k|    bool neg = false;
   75|  1.42k|    if(*str == '-' || *str == '+') {
  ------------------
  |  Branch (75:8): [True: 599, False: 829]
  |  Branch (75:23): [True: 8, False: 821]
  ------------------
   76|    607|        neg = (*str == '-');
   77|    607|        i++;
   78|    607|    }
   79|       |
   80|       |    /* Parse as unsigned */
   81|  1.42k|    uint64_t n = 0;
   82|  1.42k|    size_t len = parseUInt64(&str[i], size - i, &n);
   83|  1.42k|    if(len == 0)
  ------------------
  |  Branch (83:8): [True: 87, False: 1.34k]
  ------------------
   84|     87|        return 0;
   85|       |
   86|       |    /* Check for overflow, adjust and return */
   87|  1.34k|    if(!neg) {
  ------------------
  |  Branch (87:8): [True: 751, False: 590]
  ------------------
   88|    751|        if(n > 9223372036854775807UL)
  ------------------
  |  Branch (88:12): [True: 61, False: 690]
  ------------------
   89|     61|            return 0;
   90|    690|        *result = (int64_t)n;
   91|    690|    } 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|    590|        if(n > 9223372036854775808UL)
  ------------------
  |  Branch (97:12): [True: 9, False: 581]
  ------------------
   98|      9|            return 0;
   99|    581|        *result = (n == 9223372036854775808UL)
  ------------------
  |  Branch (99:19): [True: 4, False: 577]
  ------------------
  100|    581|            ? (int64_t)(-9223372036854775807LL - 1)
  101|    581|            : -(int64_t)n;
  102|    581|    }
  103|  1.27k|    return len + i;
  104|  1.34k|}
parseDouble:
  106|  1.24k|size_t parseDouble(const char *str, size_t size, double *result) {
  107|  1.24k|    char buf[2000];
  108|  1.24k|    if(size >= 2000)
  ------------------
  |  Branch (108:8): [True: 0, False: 1.24k]
  ------------------
  109|      0|        return 0;
  110|  1.24k|    memcpy(buf, str, size);
  111|  1.24k|    buf[size] = 0;
  112|  1.24k|    errno = 0;
  113|  1.24k|    char *endptr;
  114|  1.24k|    *result = strtod(buf, &endptr);
  115|  1.24k|    if(errno != 0 && errno != ERANGE)
  ------------------
  |  Branch (115:8): [True: 254, False: 988]
  |  Branch (115:22): [True: 0, False: 254]
  ------------------
  116|      0|        return 0;
  117|  1.24k|    return (uintptr_t)endptr - (uintptr_t)buf;
  118|  1.24k|}

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

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

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

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

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

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

fuzz_xml_decode_encode.cc:_ZL15UA_Variant_initP10UA_Variant:
  243|  8.01k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
fuzz_xml_decode_encode.cc:_ZL16UA_Variant_clearP10UA_Variant:
  243|  3.12k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
fuzz_xml_decode_encode.cc:_ZL19UA_ByteString_clearP9UA_String:
  243|  3.07k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types.c:UA_ByteString_init:
  243|  3.59k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types.c:UA_ExtensionObject_init:
  243|    276|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_xml.c:UA_String_clear:
  243|    208|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_xml.c:UA_String_copy:
  243|    110|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_xml.c:UA_String_init:
  243|      1|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_xml.c:UA_String_equal:
  243|  9.16k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_xml.c:UA_NodeId_equal:
  243|  34.0k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_xml.c:UA_ExtensionObject_clear:
  243|     69|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl

