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

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

parseUInt64:
   30|  1.76k|parseUInt64(const char *str, size_t size, uint64_t *result) {
   31|  1.76k|    size_t i = 0;
   32|  1.76k|    uint64_t n = 0, prev = 0;
   33|       |
   34|       |    /* Hex */
   35|  1.76k|    if(size > 2 && str[0] == '0' && (str[1] | 32) == 'x') {
  ------------------
  |  Branch (35:8): [True: 1.50k, False: 259]
  |  Branch (35:20): [True: 366, False: 1.14k]
  |  Branch (35:37): [True: 228, False: 138]
  ------------------
   36|    228|        i = 2;
   37|  3.30k|        for(; i < size; i++) {
  ------------------
  |  Branch (37:15): [True: 3.11k, False: 192]
  ------------------
   38|  3.11k|            uint8_t c = (uint8_t)str[i] | 32;
   39|  3.11k|            if(c >= '0' && c <= '9')
  ------------------
  |  Branch (39:16): [True: 3.10k, False: 13]
  |  Branch (39:28): [True: 973, False: 2.12k]
  ------------------
   40|    973|                c = (uint8_t)(c - '0');
   41|  2.14k|            else if(c >= 'a' && c <='f')
  ------------------
  |  Branch (41:21): [True: 2.12k, False: 15]
  |  Branch (41:33): [True: 2.11k, False: 16]
  ------------------
   42|  2.11k|                c = (uint8_t)(c - 'a' + 10);
   43|     31|            else if(c >= 'A' && c <='F')
  ------------------
  |  Branch (43:21): [True: 18, False: 13]
  |  Branch (43:33): [True: 0, False: 18]
  ------------------
   44|      0|                c = (uint8_t)(c - 'A' + 10);
   45|     31|            else
   46|     31|                break;
   47|  3.08k|            n = (n << 4) | (c & 0xF);
   48|  3.08k|            if(n < prev) /* Check for overflow */
  ------------------
  |  Branch (48:16): [True: 5, False: 3.07k]
  ------------------
   49|      5|                return 0;
   50|  3.07k|            prev = n;
   51|  3.07k|        }
   52|    223|        *result = n;
   53|    223|        return (i > 2) ? i : 0; /* 2 -> No digit was parsed */
  ------------------
  |  Branch (53:16): [True: 217, False: 6]
  ------------------
   54|    228|    }
   55|       |
   56|       |    /* Decimal */
   57|  15.7k|    for(; i < size; i++) {
  ------------------
  |  Branch (57:11): [True: 14.6k, False: 1.08k]
  ------------------
   58|  14.6k|        if(str[i] < '0' || str[i] > '9')
  ------------------
  |  Branch (58:12): [True: 375, False: 14.2k]
  |  Branch (58:28): [True: 73, False: 14.2k]
  ------------------
   59|    448|            break;
   60|       |        /* Fast multiplication: n*10 == (n*8) + (n*2) */
   61|  14.2k|        n = (n << 3) + (n << 1) + (uint8_t)(str[i] - '0');
   62|  14.2k|        if(n < prev) /* Check for overflow */
  ------------------
  |  Branch (62:12): [True: 1, False: 14.2k]
  ------------------
   63|      1|            return 0;
   64|  14.2k|        prev = n;
   65|  14.2k|    }
   66|  1.53k|    *result = n;
   67|  1.53k|    return i;
   68|  1.53k|}
parseInt64:
   71|  1.20k|parseInt64(const char *str, size_t size, int64_t *result) {
   72|       |    /* Negative value? */
   73|  1.20k|    size_t i = 0;
   74|  1.20k|    bool neg = false;
   75|  1.20k|    if(*str == '-' || *str == '+') {
  ------------------
  |  Branch (75:8): [True: 460, False: 743]
  |  Branch (75:23): [True: 8, False: 735]
  ------------------
   76|    468|        neg = (*str == '-');
   77|    468|        i++;
   78|    468|    }
   79|       |
   80|       |    /* Parse as unsigned */
   81|  1.20k|    uint64_t n = 0;
   82|  1.20k|    size_t len = parseUInt64(&str[i], size - i, &n);
   83|  1.20k|    if(len == 0)
  ------------------
  |  Branch (83:8): [True: 83, False: 1.12k]
  ------------------
   84|     83|        return 0;
   85|       |
   86|       |    /* Check for overflow, adjust and return */
   87|  1.12k|    if(!neg) {
  ------------------
  |  Branch (87:8): [True: 666, False: 454]
  ------------------
   88|    666|        if(n > 9223372036854775807UL)
  ------------------
  |  Branch (88:12): [True: 62, False: 604]
  ------------------
   89|     62|            return 0;
   90|    604|        *result = (int64_t)n;
   91|    604|    } 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|    454|        if(n > 9223372036854775808UL)
  ------------------
  |  Branch (97:12): [True: 5, False: 449]
  ------------------
   98|      5|            return 0;
   99|    449|        *result = (n == 9223372036854775808UL)
  ------------------
  |  Branch (99:19): [True: 4, False: 445]
  ------------------
  100|    449|            ? (int64_t)(-9223372036854775807LL - 1)
  101|    449|            : -(int64_t)n;
  102|    449|    }
  103|  1.05k|    return len + i;
  104|  1.12k|}
parseDouble:
  106|  1.10k|size_t parseDouble(const char *str, size_t size, double *result) {
  107|  1.10k|    char buf[2000];
  108|  1.10k|    if(size >= 2000)
  ------------------
  |  Branch (108:8): [True: 0, False: 1.10k]
  ------------------
  109|      0|        return 0;
  110|  1.10k|    memcpy(buf, str, size);
  111|  1.10k|    buf[size] = 0;
  112|  1.10k|    errno = 0;
  113|  1.10k|    char *endptr;
  114|  1.10k|    *result = strtod(buf, &endptr);
  115|  1.10k|    if(errno != 0 && errno != ERANGE)
  ------------------
  |  Branch (115:8): [True: 303, False: 799]
  |  Branch (115:22): [True: 0, False: 303]
  ------------------
  116|      0|        return 0;
  117|  1.10k|    return (uintptr_t)endptr - (uintptr_t)buf;
  118|  1.10k|}

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

UA_STRING:
  223|    764|UA_STRING(char *chars) {
  224|    764|    UA_String s = {0, NULL};
  225|    764|    if(!chars)
  ------------------
  |  Branch (225:8): [True: 0, False: 764]
  ------------------
  226|      0|        return s;
  227|    764|    s.length = strlen(chars);
  228|    764|    s.data = (UA_Byte*)chars;
  229|    764|    return s;
  230|    764|}
UA_String_equal_ignorecase:
  272|    145|UA_String_equal_ignorecase(const UA_String *s1, const UA_String *s2) {
  273|    145|    if(s1->length != s2->length)
  ------------------
  |  Branch (273:8): [True: 0, False: 145]
  ------------------
  274|      0|        return false;
  275|    145|    if(s1->length == 0)
  ------------------
  |  Branch (275:8): [True: 0, False: 145]
  ------------------
  276|      0|        return true;
  277|    145|    if(s2->data == NULL)
  ------------------
  |  Branch (277:8): [True: 0, False: 145]
  ------------------
  278|      0|        return false;
  279|       |
  280|    145|    return casecmp(s1->data, s2->data, s1->length) == 0;
  281|    145|}
UA_DateTime_parse:
  536|     25|UA_DateTime_parse(UA_DateTime *dst, const UA_String str) {
  537|     25|    if(str.length == 0)
  ------------------
  |  Branch (537:8): [True: 25, False: 0]
  ------------------
  538|     25|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     25|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  539|       |
  540|      0|    struct musl_tm dts;
  541|      0|    memset(&dts, 0, sizeof(dts));
  542|       |
  543|       |    /* Parse the year. The ISO standard asks for four digits. But we accept up
  544|       |     * to five with an optional plus or minus in front due to the range of the
  545|       |     * DateTime 64bit integer. But in that case we require the year and the
  546|       |     * month to be separated by a '-'. Otherwise we cannot know where the month
  547|       |     * starts. */
  548|      0|    size_t pos = 0;
  549|      0|    if(str.data[0] == '-' || str.data[0] == '+')
  ------------------
  |  Branch (549:8): [True: 0, False: 0]
  |  Branch (549:30): [True: 0, False: 0]
  ------------------
  550|      0|        pos++;
  551|      0|    UA_Int64 year = 0;
  552|      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]
  |  |  ------------------
  ------------------
  553|      0|    size_t len = parseInt64((char*)&str.data[pos], 5, &year);
  554|      0|    pos += len;
  555|      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]
  |  |  ------------------
  ------------------
  556|      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]
  |  |  ------------------
  ------------------
  557|      0|    if(str.data[0] == '-')
  ------------------
  |  Branch (557:8): [True: 0, False: 0]
  ------------------
  558|      0|        year = -year;
  559|      0|    dts.tm_year = (UA_Int16)year - 1900;
  560|      0|    if(str.data[pos] == '-')
  ------------------
  |  Branch (560:8): [True: 0, False: 0]
  ------------------
  561|      0|        pos++;
  562|       |
  563|       |    /* Parse the month */
  564|      0|    UA_UInt64 month = 0;
  565|      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]
  |  |  ------------------
  ------------------
  566|      0|    len = parseUInt64((char*)&str.data[pos], 2, &month);
  567|      0|    pos += len;
  568|      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]
  |  |  ------------------
  ------------------
  569|      0|    dts.tm_mon = (UA_UInt16)month - 1;
  570|      0|    if(str.data[pos] == '-')
  ------------------
  |  Branch (570:8): [True: 0, False: 0]
  ------------------
  571|      0|        pos++;
  572|       |
  573|       |    /* Parse the day and check the T between date and time */
  574|      0|    UA_UInt64 day = 0;
  575|      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]
  |  |  ------------------
  ------------------
  576|      0|    len = parseUInt64((char*)&str.data[pos], 2, &day);
  577|      0|    pos += len;
  578|      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]
  |  |  ------------------
  ------------------
  579|      0|             return UA_STATUSCODE_BADDECODINGERROR);
  580|      0|    dts.tm_mday = (UA_UInt16)day;
  581|      0|    pos++;
  582|       |
  583|       |    /* Parse the hour */
  584|      0|    UA_UInt64 hour = 0;
  585|      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]
  |  |  ------------------
  ------------------
  586|      0|    len = parseUInt64((char*)&str.data[pos], 2, &hour);
  587|      0|    pos += len;
  588|      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]
  |  |  ------------------
  ------------------
  589|      0|    dts.tm_hour = (UA_UInt16)hour;
  590|      0|    if(str.data[pos] == ':')
  ------------------
  |  Branch (590:8): [True: 0, False: 0]
  ------------------
  591|      0|        pos++;
  592|       |
  593|       |    /* Parse the minute */
  594|      0|    UA_UInt64 min = 0;
  595|      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]
  |  |  ------------------
  ------------------
  596|      0|    len = parseUInt64((char*)&str.data[pos], 2, &min);
  597|      0|    pos += len;
  598|      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]
  |  |  ------------------
  ------------------
  599|      0|    dts.tm_min = (UA_UInt16)min;
  600|      0|    if(str.data[pos] == ':')
  ------------------
  |  Branch (600:8): [True: 0, False: 0]
  ------------------
  601|      0|        pos++;
  602|       |
  603|       |    /* Parse the second */
  604|      0|    UA_UInt64 sec = 0;
  605|      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]
  |  |  ------------------
  ------------------
  606|      0|    len = parseUInt64((char*)&str.data[pos], 2, &sec);
  607|      0|    pos += len;
  608|      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]
  |  |  ------------------
  ------------------
  609|      0|    dts.tm_sec = (UA_UInt16)sec;
  610|       |
  611|       |    /* Compute the seconds since the Unix epoch */
  612|      0|    long long sinceunix = musl_tm_to_secs(&dts);
  613|       |
  614|       |    /* Are we within the range that can be represented? */
  615|      0|    long long sinceunix_min =
  616|      0|        (long long)(UA_INT64_MIN / UA_DATETIME_SEC) -
  ------------------
  |  |  120|      0|#define UA_INT64_MIN ((int64_t)-UA_INT64_MAX-1LL)
  |  |  ------------------
  |  |  |  |  119|      0|#define UA_INT64_MAX (int64_t)9223372036854775807LL
  |  |  ------------------
  ------------------
                      (long long)(UA_INT64_MIN / UA_DATETIME_SEC) -
  ------------------
  |  |  286|      0|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  ------------------
  |  |  |  |  285|      0|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|      0|#define UA_DATETIME_USEC 10LL
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  617|      0|        (long long)(UA_DATETIME_UNIX_EPOCH / UA_DATETIME_SEC) -
  ------------------
  |  |  328|      0|#define UA_DATETIME_UNIX_EPOCH (11644473600LL * UA_DATETIME_SEC)
  |  |  ------------------
  |  |  |  |  286|      0|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|      0|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  284|      0|#define UA_DATETIME_USEC 10LL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      (long long)(UA_DATETIME_UNIX_EPOCH / UA_DATETIME_SEC) -
  ------------------
  |  |  286|      0|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  ------------------
  |  |  |  |  285|      0|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|      0|#define UA_DATETIME_USEC 10LL
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  618|      0|        (long long)1; /* manual correction due to rounding */
  619|      0|    long long sinceunix_max = (long long)
  620|      0|        ((UA_INT64_MAX - UA_DATETIME_UNIX_EPOCH) / UA_DATETIME_SEC);
  ------------------
  |  |  119|      0|#define UA_INT64_MAX (int64_t)9223372036854775807LL
  ------------------
                      ((UA_INT64_MAX - UA_DATETIME_UNIX_EPOCH) / UA_DATETIME_SEC);
  ------------------
  |  |  328|      0|#define UA_DATETIME_UNIX_EPOCH (11644473600LL * UA_DATETIME_SEC)
  |  |  ------------------
  |  |  |  |  286|      0|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|      0|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  284|      0|#define UA_DATETIME_USEC 10LL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      ((UA_INT64_MAX - UA_DATETIME_UNIX_EPOCH) / UA_DATETIME_SEC);
  ------------------
  |  |  286|      0|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  ------------------
  |  |  |  |  285|      0|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|      0|#define UA_DATETIME_USEC 10LL
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  621|      0|    if(sinceunix < sinceunix_min || sinceunix > sinceunix_max)
  ------------------
  |  Branch (621:8): [True: 0, False: 0]
  |  Branch (621:37): [True: 0, False: 0]
  ------------------
  622|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  623|       |
  624|       |    /* Convert to DateTime. Add or subtract one extra second here to prevent
  625|       |     * underflow/overflow. This is reverted once the fractional part has been
  626|       |     * added. */
  627|      0|    sinceunix -= (sinceunix > 0) ? 1 : -1;
  ------------------
  |  Branch (627:18): [True: 0, False: 0]
  ------------------
  628|      0|    UA_DateTime dt = (UA_DateTime)
  629|      0|        (sinceunix + (UA_DATETIME_UNIX_EPOCH / UA_DATETIME_SEC)) * UA_DATETIME_SEC;
  ------------------
  |  |  328|      0|#define UA_DATETIME_UNIX_EPOCH (11644473600LL * UA_DATETIME_SEC)
  |  |  ------------------
  |  |  |  |  286|      0|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|      0|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  284|      0|#define UA_DATETIME_USEC 10LL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      (sinceunix + (UA_DATETIME_UNIX_EPOCH / UA_DATETIME_SEC)) * UA_DATETIME_SEC;
  ------------------
  |  |  286|      0|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  ------------------
  |  |  |  |  285|      0|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|      0|#define UA_DATETIME_USEC 10LL
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
                      (sinceunix + (UA_DATETIME_UNIX_EPOCH / UA_DATETIME_SEC)) * UA_DATETIME_SEC;
  ------------------
  |  |  286|      0|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  ------------------
  |  |  |  |  285|      0|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|      0|#define UA_DATETIME_USEC 10LL
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  630|       |
  631|       |    /* Parse the fraction of the second if defined */
  632|      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]
  |  |  ------------------
  ------------------
  633|      0|    if(str.data[pos] == ',' || str.data[pos] == '.') {
  ------------------
  |  Branch (633:8): [True: 0, False: 0]
  |  Branch (633:32): [True: 0, False: 0]
  ------------------
  634|      0|        pos++;
  635|      0|        double frac = 0.0;
  636|      0|        double denom = 0.1;
  637|      0|        while(pos < str.length && str.data[pos] >= '0' && str.data[pos] <= '9') {
  ------------------
  |  Branch (637:15): [True: 0, False: 0]
  |  Branch (637:35): [True: 0, False: 0]
  |  Branch (637:59): [True: 0, False: 0]
  ------------------
  638|      0|            frac += denom * (str.data[pos] - '0');
  639|      0|            denom *= 0.1;
  640|      0|            pos++;
  641|      0|        }
  642|      0|        frac += 0.00000005; /* Correct rounding when converting to integer */
  643|      0|        dt += (UA_DateTime)(frac * UA_DATETIME_SEC);
  ------------------
  |  |  286|      0|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  ------------------
  |  |  |  |  285|      0|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|      0|#define UA_DATETIME_USEC 10LL
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  644|      0|    }
  645|       |
  646|       |    /* Time zone handling */
  647|      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]
  |  |  ------------------
  ------------------
  648|      0|    if(str.data[pos] == 'Z') {
  ------------------
  |  Branch (648:8): [True: 0, False: 0]
  ------------------
  649|      0|        pos++;
  650|      0|    } else if(str.data[pos] == '+' || str.data[pos] == '-') {
  ------------------
  |  Branch (650:15): [True: 0, False: 0]
  |  Branch (650:39): [True: 0, False: 0]
  ------------------
  651|      0|        UA_UInt64 tzHour = 0, tzMin = 0;
  652|      0|        UA_Int64 offsetSeconds = 0;
  653|      0|        UA_Byte tzSign = str.data[pos++];
  654|       |
  655|      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]
  |  |  ------------------
  ------------------
  656|      0|        len = parseUInt64((char*)&str.data[pos], 2, &tzHour);
  657|      0|        pos += len;
  658|      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]
  |  |  ------------------
  ------------------
  659|       |
  660|      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]
  |  |  ------------------
  ------------------
  661|      0|        if(str.data[pos] == ':')
  ------------------
  |  Branch (661:12): [True: 0, False: 0]
  ------------------
  662|      0|            pos++;
  663|       |
  664|      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]
  |  |  ------------------
  ------------------
  665|      0|        len = parseUInt64((char*)&str.data[pos], 2, &tzMin);
  666|      0|        pos += len;
  667|      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]
  |  |  ------------------
  ------------------
  668|       |
  669|      0|        offsetSeconds = (tzHour * 3600) + (tzMin * 60);
  670|      0|        if(tzSign == '-')
  ------------------
  |  Branch (670:12): [True: 0, False: 0]
  ------------------
  671|      0|            offsetSeconds = -offsetSeconds;
  672|      0|        dt -= (UA_DateTime)(offsetSeconds * UA_DATETIME_SEC);
  ------------------
  |  |  286|      0|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  ------------------
  |  |  |  |  285|      0|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|      0|#define UA_DATETIME_USEC 10LL
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  673|      0|    } else {
  674|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  675|      0|    }
  676|       |
  677|      0| finish:
  678|       |    /* Remove the underflow/overflow protection (see above) */
  679|      0|    if(sinceunix > 0) {
  ------------------
  |  Branch (679:8): [True: 0, False: 0]
  ------------------
  680|      0|        if(dt > UA_INT64_MAX - UA_DATETIME_SEC)
  ------------------
  |  |  119|      0|#define UA_INT64_MAX (int64_t)9223372036854775807LL
  ------------------
                      if(dt > UA_INT64_MAX - UA_DATETIME_SEC)
  ------------------
  |  |  286|      0|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  ------------------
  |  |  |  |  285|      0|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|      0|#define UA_DATETIME_USEC 10LL
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (680:12): [True: 0, False: 0]
  ------------------
  681|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  682|      0|        dt += UA_DATETIME_SEC;
  ------------------
  |  |  286|      0|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  ------------------
  |  |  |  |  285|      0|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|      0|#define UA_DATETIME_USEC 10LL
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  683|      0|    } else {
  684|      0|        if(dt < UA_INT64_MIN + UA_DATETIME_SEC)
  ------------------
  |  |  120|      0|#define UA_INT64_MIN ((int64_t)-UA_INT64_MAX-1LL)
  |  |  ------------------
  |  |  |  |  119|      0|#define UA_INT64_MAX (int64_t)9223372036854775807LL
  |  |  ------------------
  ------------------
                      if(dt < UA_INT64_MIN + UA_DATETIME_SEC)
  ------------------
  |  |  286|      0|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  ------------------
  |  |  |  |  285|      0|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|      0|#define UA_DATETIME_USEC 10LL
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (684:12): [True: 0, False: 0]
  ------------------
  685|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  686|      0|        dt -= UA_DATETIME_SEC;
  ------------------
  |  |  286|      0|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  ------------------
  |  |  |  |  285|      0|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|      0|#define UA_DATETIME_USEC 10LL
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  687|      0|    }
  688|       |
  689|       |    /* We must be at the end of the string */
  690|      0|    if(pos != str.length)
  ------------------
  |  Branch (690:8): [True: 0, False: 0]
  ------------------
  691|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  692|       |
  693|      0|    *dst = dt;
  694|      0|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  695|      0|}
UA_ByteString_allocBuffer:
  762|  3.66k|UA_ByteString_allocBuffer(UA_ByteString *bs, size_t length) {
  763|  3.66k|    UA_ByteString_init(bs);
  764|  3.66k|    if(length == 0) {
  ------------------
  |  Branch (764:8): [True: 62, False: 3.60k]
  ------------------
  765|     62|        bs->data = (u8*)UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|     62|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  766|     62|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     62|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  767|     62|    }
  768|  3.60k|    bs->data = (u8*)UA_calloc(1,length);
  ------------------
  |  |   20|  3.60k|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
  769|  3.60k|    if(UA_UNLIKELY(!bs->data))
  ------------------
  |  |  579|  3.60k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  ------------------
  |  |  |  Branch (579:25): [True: 0, False: 3.60k]
  |  |  ------------------
  ------------------
  770|      0|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
  771|  3.60k|    bs->length = length;
  772|  3.60k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  3.60k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  773|  3.60k|}
UA_NodeId_isNull:
  814|     72|UA_NodeId_isNull(const UA_NodeId *p) {
  815|     72|    if(p->namespaceIndex != 0)
  ------------------
  |  Branch (815:8): [True: 0, False: 72]
  ------------------
  816|      0|        return false;
  817|     72|    switch (p->identifierType) {
  ------------------
  |  Branch (817:13): [True: 72, False: 0]
  ------------------
  818|     72|    case UA_NODEIDTYPE_NUMERIC:
  ------------------
  |  Branch (818:5): [True: 72, False: 0]
  ------------------
  819|     72|        return (p->identifier.numeric == 0);
  820|      0|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (820:5): [True: 0, False: 72]
  ------------------
  821|      0|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (821:5): [True: 0, False: 72]
  ------------------
  822|      0|        return (p->identifier.string.length == 0); /* Null and empty string */
  823|      0|    case UA_NODEIDTYPE_GUID:
  ------------------
  |  Branch (823:5): [True: 0, False: 72]
  ------------------
  824|      0|        return (guidOrder(&p->identifier.guid, &UA_GUID_NULL, NULL) == UA_ORDER_EQ);
  825|     72|    }
  826|      0|    return false;
  827|     72|}
nodeId_printEscape:
 1029|    216|                   const UA_NamespaceMapping *nsMapping, UA_Escaping idEsc) {
 1030|       |    /* Try to map the NamespaceIndex to the Uri */
 1031|    216|    UA_String nsUri = UA_STRING_NULL;
 1032|    216|    if(id->namespaceIndex > 0 && nsMapping)
  ------------------
  |  Branch (1032:8): [True: 0, False: 216]
  |  Branch (1032:34): [True: 0, False: 0]
  ------------------
 1033|      0|        UA_NamespaceMapping_index2Uri(nsMapping, id->namespaceIndex, &nsUri);
 1034|       |
 1035|       |    /* Compute the string length and print numerical identifiers. */
 1036|    216|    u8 nsStr[7];
 1037|    216|    u8 numIdStr[12];
 1038|    216|    size_t idLen = nodeIdSize(id, nsStr, numIdStr, nsUri, idEsc);
 1039|    216|    if(idLen == 0)
  ------------------
  |  Branch (1039:8): [True: 0, False: 216]
  ------------------
 1040|      0|        return UA_STATUSCODE_BADINTERNALERROR;
  ------------------
  |  |   29|      0|#define UA_STATUSCODE_BADINTERNALERROR ((UA_StatusCode) 0x80020000)
  ------------------
 1041|       |
 1042|       |    /* Allocate memory if required */
 1043|    216|    if(output->length == 0) {
  ------------------
  |  Branch (1043:8): [True: 216, False: 0]
  ------------------
 1044|    216|        UA_StatusCode res = UA_ByteString_allocBuffer((UA_ByteString*)output, idLen);
 1045|    216|        if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    216|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1045:12): [True: 0, False: 216]
  ------------------
 1046|      0|            return res;
 1047|    216|    } else {
 1048|      0|        if(output->length < idLen)
  ------------------
  |  Branch (1048:12): [True: 0, False: 0]
  ------------------
 1049|      0|            return UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED;
  ------------------
  |  |   47|      0|#define UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED ((UA_StatusCode) 0x80080000)
  ------------------
 1050|      0|        output->length = idLen;
 1051|      0|    }
 1052|       |
 1053|       |    /* Print the NodeId */
 1054|    216|    u8 *pos = printNodeIdBody(id, nsUri, nsStr, numIdStr, output->data, nsMapping, idEsc);
 1055|    216|    output->length = (size_t)(pos - output->data);
 1056|    216|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    216|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1057|    216|}
UA_NodeId_printEx:
 1061|    216|                  const UA_NamespaceMapping *nsMapping) {
 1062|    216|    return nodeId_printEscape(id, output, nsMapping, UA_ESCAPING_NONE);
 1063|    216|}
UA_ExtensionObject_setValue:
 1306|    288|                            const UA_DataType *type) {
 1307|    288|    UA_ExtensionObject_init(eo);
 1308|    288|    eo->content.decoded.data = p;
 1309|    288|    eo->content.decoded.type = type;
 1310|    288|    eo->encoding = UA_EXTENSIONOBJECT_DECODED;
 1311|    288|}
UA_Variant_isScalar:
 1363|  3.11k|UA_Variant_isScalar(const UA_Variant *v) {
 1364|  3.11k|    return (v->type != NULL && v->arrayLength == 0 &&
  ------------------
  |  Branch (1364:13): [True: 3.11k, False: 0]
  |  Branch (1364:32): [True: 3.11k, False: 0]
  ------------------
 1365|  3.11k|            v->data > UA_EMPTY_ARRAY_SENTINEL);
  ------------------
  |  |  756|  3.11k|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  |  Branch (1365:13): [True: 3.10k, False: 10]
  ------------------
 1366|  3.11k|}
UA_new:
 1928|  4.20k|UA_new(const UA_DataType *type) {
 1929|  4.20k|    void *p = UA_calloc(1, type->memSize);
  ------------------
  |  |   20|  4.20k|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
 1930|  4.20k|    return p;
 1931|  4.20k|}
UA_copy:
 2104|    536|UA_copy(const void *src, void *dst, const UA_DataType *type) {
 2105|    536|    memset(dst, 0, type->memSize); /* init */
 2106|    536|    UA_StatusCode retval = copyJumpTable[type->typeKind](src, dst, type);
 2107|    536|    if(retval != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    536|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2107:8): [True: 0, False: 536]
  ------------------
 2108|      0|        UA_clear(dst, type);
 2109|    536|    return retval;
 2110|    536|}
UA_clear:
 2207|  8.96k|UA_clear(void *p, const UA_DataType *type) {
 2208|  8.96k|    clearJumpTable[type->typeKind](p, type);
 2209|  8.96k|    memset(p, 0, type->memSize); /* init */
 2210|  8.96k|}
UA_order:
 2681|  46.3k|UA_Order UA_order(const void *p1, const void *p2, const UA_DataType *type) {
 2682|  46.3k|    return orderJumpTable[type->typeKind](p1, p2, type);
 2683|  46.3k|}
UA_equal:
 2686|    951|UA_equal(const void *p1, const void *p2, const UA_DataType *type) {
 2687|    951|    return (UA_order(p1, p2, type) == UA_ORDER_EQ);
 2688|    951|}
UA_Array_new:
 2695|     38|UA_Array_new(size_t size, const UA_DataType *type) {
 2696|     38|    if(size > UA_INT32_MAX)
  ------------------
  |  |  101|     38|#define UA_INT32_MAX 2147483647L
  ------------------
  |  Branch (2696:8): [True: 0, False: 38]
  ------------------
 2697|      0|        return NULL;
 2698|     38|    if(size == 0)
  ------------------
  |  Branch (2698:8): [True: 10, False: 28]
  ------------------
 2699|     10|        return UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|     10|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
 2700|     28|    if(size > SIZE_MAX / type->memSize)
  ------------------
  |  Branch (2700:8): [True: 0, False: 28]
  ------------------
 2701|      0|        return NULL;
 2702|     28|    return UA_calloc(size, type->memSize);
  ------------------
  |  |   20|     28|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
 2703|     28|}
UA_Array_copy:
 2707|    536|              void **dst, const UA_DataType *type) {
 2708|    536|    if(size == 0) {
  ------------------
  |  Branch (2708:8): [True: 0, False: 536]
  ------------------
 2709|      0|        if(src == NULL)
  ------------------
  |  Branch (2709:12): [True: 0, False: 0]
  ------------------
 2710|      0|            *dst = NULL;
 2711|      0|        else
 2712|      0|            *dst= UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|      0|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
 2713|      0|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2714|      0|    }
 2715|       |
 2716|       |    /* Check the array consistency -- defensive programming in case the user
 2717|       |     * manually created an inconsistent array */
 2718|    536|    if(UA_UNLIKELY(!type || !src))
  ------------------
  |  |  579|  1.07k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  ------------------
  |  |  |  Branch (579:25): [True: 0, False: 536]
  |  |  |  Branch (579:43): [True: 0, False: 536]
  |  |  |  Branch (579:43): [True: 0, False: 536]
  |  |  ------------------
  ------------------
 2719|      0|        return UA_STATUSCODE_BADINTERNALERROR;
  ------------------
  |  |   29|      0|#define UA_STATUSCODE_BADINTERNALERROR ((UA_StatusCode) 0x80020000)
  ------------------
 2720|       |
 2721|    536|    if(size > SIZE_MAX / type->memSize)
  ------------------
  |  Branch (2721:8): [True: 0, False: 536]
  ------------------
 2722|      0|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 2723|    536|    size_t byteSize = size * type->memSize;
 2724|       |
 2725|       |    /* calloc, so we don't have to check retval in every iteration of copying */
 2726|    536|    *dst = UA_calloc(size, type->memSize);
  ------------------
  |  |   20|    536|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
 2727|    536|    if(!*dst)
  ------------------
  |  Branch (2727:8): [True: 0, False: 536]
  ------------------
 2728|      0|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 2729|       |
 2730|    536|    if(type->pointerFree) {
  ------------------
  |  Branch (2730:8): [True: 536, False: 0]
  ------------------
 2731|    536|        memcpy(*dst, src, byteSize);
 2732|    536|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    536|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2733|    536|    }
 2734|       |
 2735|      0|    uintptr_t ptrs = (uintptr_t)src;
 2736|      0|    uintptr_t ptrd = (uintptr_t)*dst;
 2737|      0|    UA_StatusCode retval = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2738|      0|    for(size_t i = 0; i < size; ++i) {
  ------------------
  |  Branch (2738:23): [True: 0, False: 0]
  ------------------
 2739|      0|        retval |= UA_copy((void*)ptrs, (void*)ptrd, type);
 2740|      0|        ptrs += type->memSize;
 2741|      0|        ptrd += type->memSize;
 2742|      0|    }
 2743|      0|    if(retval != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2743:8): [True: 0, False: 0]
  ------------------
 2744|      0|        UA_Array_delete(*dst, size, type);
 2745|       |        *dst = NULL;
 2746|      0|    }
 2747|      0|    return retval;
 2748|    536|}
UA_Array_delete:
 2850|  8.98k|UA_Array_delete(void *p, size_t size, const UA_DataType *type) {
 2851|  8.98k|    if(!type->pointerFree) {
  ------------------
  |  Branch (2851:8): [True: 1.21k, False: 7.76k]
  ------------------
 2852|  1.21k|        uintptr_t ptr = (uintptr_t)p;
 2853|  2.28k|        for(size_t i = 0; i < size; ++i) {
  ------------------
  |  Branch (2853:27): [True: 1.06k, False: 1.21k]
  ------------------
 2854|  1.06k|            UA_clear((void*)ptr, type);
 2855|  1.06k|            ptr += type->memSize;
 2856|  1.06k|        }
 2857|  1.21k|    }
 2858|  8.98k|    UA_free((void*)((uintptr_t)p & ~(uintptr_t)UA_EMPTY_ARRAY_SENTINEL));
  ------------------
  |  |   19|  8.98k|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 2859|  8.98k|}
ua_types.c:casecmp:
  263|    145|casecmp(const UA_Byte *l, const UA_Byte *r, size_t n) {
  264|    145|    if(!n--) return 0;
  ------------------
  |  Branch (264:8): [True: 0, False: 145]
  ------------------
  265|    734|    for(; *l && *r && n && (*l == *r || lowercase(*l) == lowercase(*r)); l++, r++, n--);
  ------------------
  |  Branch (265:11): [True: 734, False: 0]
  |  Branch (265:17): [True: 734, False: 0]
  |  Branch (265:23): [True: 589, False: 145]
  |  Branch (265:29): [True: 589, False: 0]
  |  Branch (265:41): [True: 0, False: 0]
  ------------------
  266|    145|    return lowercase(*l) - lowercase(*r);
  267|    145|}
ua_types.c:lowercase:
  257|    290|lowercase(UA_Byte c) {
  258|    290|    if(((int)c) - 'A' < 26) return c | 32;
  ------------------
  |  Branch (258:8): [True: 0, False: 290]
  ------------------
  259|    290|    return c;
  260|    290|}
ua_types.c:nodeIdSize:
  928|    216|           UA_Escaping idEsc) {
  929|       |    /* Namespace length */
  930|    216|    size_t len = 0;
  931|    216|    if(nsUri.data != NULL) {
  ------------------
  |  Branch (931:8): [True: 0, False: 216]
  ------------------
  932|      0|        len += 5; /* nsu=; */
  933|      0|        len += UA_String_escapedSize(nsUri, UA_ESCAPING_PERCENT);
  934|    216|    } else if(id->namespaceIndex > 0) {
  ------------------
  |  Branch (934:15): [True: 0, False: 216]
  ------------------
  935|      0|        len += 4; /* ns=; */
  936|      0|        size_t nsStrSize = itoaUnsigned(id->namespaceIndex, (char*)nsStr, 10);
  937|      0|        nsStr[nsStrSize] = 0;
  938|      0|        len += nsStrSize;
  939|      0|    }
  940|       |
  941|    216|    len += 2; /* ?= */
  942|       |
  943|    216|    switch (id->identifierType) {
  944|    216|    case UA_NODEIDTYPE_NUMERIC: {
  ------------------
  |  Branch (944:5): [True: 216, False: 0]
  ------------------
  945|    216|        size_t numIdStrSize = itoaUnsigned(id->identifier.numeric, (char*)numIdStr, 10);
  946|    216|        numIdStr[numIdStrSize] = 0;
  947|    216|        len += numIdStrSize;
  948|    216|        break;
  949|      0|    }
  950|      0|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (950:5): [True: 0, False: 216]
  ------------------
  951|      0|        len += UA_String_escapedSize(id->identifier.string, idEsc);
  952|      0|        break;
  953|      0|    case UA_NODEIDTYPE_GUID:
  ------------------
  |  Branch (953:5): [True: 0, False: 216]
  ------------------
  954|      0|        len += 36;
  955|      0|        break;
  956|      0|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (956:5): [True: 0, False: 216]
  ------------------
  957|      0|        len += 4 * ((id->identifier.byteString.length + 2) / 3);
  958|      0|        break;
  959|      0|    default:
  ------------------
  |  Branch (959:5): [True: 0, False: 216]
  ------------------
  960|      0|        len = 0;
  961|    216|    }
  962|    216|    return len;
  963|    216|}
ua_types.c:printNodeIdBody:
  967|    216|                const UA_NamespaceMapping *nsMapping, UA_Escaping idEsc) {
  968|    216|    size_t len;
  969|       |
  970|       |    /* Encode the namespace */
  971|    216|    if(nsUri.data != NULL) {
  ------------------
  |  Branch (971:8): [True: 0, False: 216]
  ------------------
  972|      0|        memcpy(pos, "nsu=", 4);
  973|      0|        pos += 4;
  974|      0|        pos += UA_String_escapeInsert(pos, nsUri, UA_ESCAPING_PERCENT);
  975|      0|        *pos++ = ';';
  976|    216|    } else if(id->namespaceIndex > 0) {
  ------------------
  |  Branch (976:15): [True: 0, False: 216]
  ------------------
  977|      0|        memcpy(pos, "ns=", 3);
  978|      0|        pos += 3;
  979|      0|        len = strlen((char*)nsStr);
  980|      0|        memcpy(pos, nsStr, len);
  981|      0|        pos += len;
  982|      0|        *pos++ = ';';
  983|      0|    }
  984|       |
  985|       |    /* Encode the identifier */
  986|    216|    switch(id->identifierType) {
  ------------------
  |  Branch (986:12): [True: 216, False: 0]
  ------------------
  987|    216|    case UA_NODEIDTYPE_NUMERIC:
  ------------------
  |  Branch (987:5): [True: 216, False: 0]
  ------------------
  988|    216|        memcpy(pos, "i=", 2);
  989|    216|        pos += 2;
  990|    216|        len = strlen((char*)numIdStr);
  991|    216|        memcpy(pos, numIdStr, len);
  992|    216|        pos += len;
  993|    216|        break;
  994|      0|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (994:5): [True: 0, False: 216]
  ------------------
  995|      0|        memcpy(pos, "s=", 2);
  996|      0|        pos += 2;
  997|      0|        pos += UA_String_escapeInsert(pos, id->identifier.string, idEsc);
  998|      0|        break;
  999|      0|    case UA_NODEIDTYPE_GUID:
  ------------------
  |  Branch (999:5): [True: 0, False: 216]
  ------------------
 1000|      0|        memcpy(pos, "g=", 2);
 1001|      0|        pos += 2;
 1002|      0|        UA_Guid_to_hex(&id->identifier.guid, pos, true);
 1003|      0|        pos += 36;
 1004|      0|        break;
 1005|      0|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (1005:5): [True: 0, False: 216]
  ------------------
 1006|      0|        memcpy(pos, "b=", 2);
 1007|      0|        pos += 2;
 1008|       |        /* Use base64url encoding for percent-escaping.
 1009|       |         * Replace +/ with -_ and remove the padding. */
 1010|      0|        u8 *bpos = pos;
 1011|      0|        pos += UA_base64_buf(id->identifier.byteString.data,
 1012|      0|                             id->identifier.byteString.length, pos);
 1013|      0|        if(idEsc == UA_ESCAPING_PERCENT ||
  ------------------
  |  Branch (1013:12): [True: 0, False: 0]
  ------------------
 1014|      0|           idEsc == UA_ESCAPING_PERCENT_EXTENDED) {
  ------------------
  |  Branch (1014:12): [True: 0, False: 0]
  ------------------
 1015|      0|            while(pos > bpos && pos[-1] == '=')
  ------------------
  |  Branch (1015:19): [True: 0, False: 0]
  |  Branch (1015:33): [True: 0, False: 0]
  ------------------
 1016|      0|                pos--;
 1017|      0|            for(; bpos < pos; bpos++) {
  ------------------
  |  Branch (1017:19): [True: 0, False: 0]
  ------------------
 1018|      0|                if(*bpos == '+') *bpos = '-';
  ------------------
  |  Branch (1018:20): [True: 0, False: 0]
  ------------------
 1019|      0|                else if(*bpos == '/') *bpos = '_';
  ------------------
  |  Branch (1019:25): [True: 0, False: 0]
  ------------------
 1020|      0|            }
 1021|      0|        }
 1022|      0|        break;
 1023|    216|    }
 1024|    216|    return pos;
 1025|    216|}
ua_types.c:Variant_clear:
 1384|  4.50k|Variant_clear(void *p, const UA_DataType *_) {
 1385|  4.50k|    UA_Variant *v = (UA_Variant *)p;
 1386|       |
 1387|       |    /* The content is "borrowed" */
 1388|  4.50k|    if(v->storageType == UA_VARIANT_DATA_NODELETE)
  ------------------
  |  Branch (1388:8): [True: 0, False: 4.50k]
  ------------------
 1389|      0|        return;
 1390|       |
 1391|       |    /* Delete the value */
 1392|  4.50k|    if(v->type && v->data > UA_EMPTY_ARRAY_SENTINEL) {
  ------------------
  |  |  756|  4.17k|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  |  Branch (1392:8): [True: 4.17k, False: 331]
  |  Branch (1392:19): [True: 4.16k, False: 10]
  ------------------
 1393|  4.16k|        if(v->arrayLength == 0)
  ------------------
  |  Branch (1393:12): [True: 4.13k, False: 28]
  ------------------
 1394|  4.13k|            v->arrayLength = 1;
 1395|  4.16k|        UA_Array_delete(v->data, v->arrayLength, v->type);
 1396|  4.16k|        v->data = NULL;
 1397|  4.16k|    }
 1398|       |
 1399|       |    /* Delete the array dimensions */
 1400|  4.50k|    if((void*)v->arrayDimensions > UA_EMPTY_ARRAY_SENTINEL)
  ------------------
  |  |  756|  4.50k|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  |  Branch (1400:8): [True: 0, False: 4.50k]
  ------------------
 1401|      0|        UA_free(v->arrayDimensions);
  ------------------
  |  |   19|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1402|  4.50k|}
ua_types.c:DataValue_clear:
 1858|      8|DataValue_clear(void *p, const UA_DataType *_) {
 1859|      8|    UA_DataValue *dv = (UA_DataValue *)p;
 1860|       |    Variant_clear(&dv->value, NULL);
 1861|      8|}
ua_types.c:String_copy:
  284|    536|String_copy(const void *src, void *dst, const UA_DataType *_) {
  285|    536|    const UA_String *srcS = (const UA_String*)src;
  286|    536|    UA_String *dstS = (UA_String *)dst;
  287|    536|    UA_StatusCode res =
  288|    536|        UA_Array_copy(srcS->data, srcS->length, (void**)&dstS->data,
  289|    536|                      &UA_TYPES[UA_TYPES_BYTE]);
  ------------------
  |  |   96|    536|#define UA_TYPES_BYTE 2
  ------------------
  290|    536|    if(res == UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    536|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (290:8): [True: 536, False: 0]
  ------------------
  291|    536|        dstS->length = srcS->length;
  292|    536|    return res;
  293|    536|}
ua_types.c:nopClear:
 2169|    517|static void nopClear(void *p, const UA_DataType *type) { }
ua_types.c:String_clear:
  296|  4.65k|String_clear(void *p, const UA_DataType *_) {
  297|  4.65k|    UA_String *s = (UA_String*)p;
  298|  4.65k|    UA_Array_delete(s->data, s->length, &UA_TYPES[UA_TYPES_BYTE]);
  ------------------
  |  |   96|  4.65k|#define UA_TYPES_BYTE 2
  ------------------
  299|  4.65k|}
ua_types.c:NodeId_clear:
  777|    188|NodeId_clear(void *p, const UA_DataType *_) {
  778|    188|    UA_NodeId *id = (UA_NodeId*)p;
  779|    188|    switch(id->identifierType) {
  780|      0|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (780:5): [True: 0, False: 188]
  ------------------
  781|      0|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (781:5): [True: 0, False: 188]
  ------------------
  782|      0|        String_clear(&id->identifier.string, NULL);
  783|      0|        break;
  784|    188|    default: break;
  ------------------
  |  Branch (784:5): [True: 188, False: 0]
  ------------------
  785|    188|    }
  786|    188|}
ua_types.c:ExpandedNodeId_clear:
 1078|      9|ExpandedNodeId_clear(void *p, const UA_DataType *_) {
 1079|      9|    UA_ExpandedNodeId *id = (UA_ExpandedNodeId*)p;
 1080|      9|    NodeId_clear(&id->nodeId, NULL);
 1081|       |    String_clear(&id->namespaceUri, NULL);
 1082|      9|}
ua_types.c:QualifiedName_clear:
  402|     10|QualifiedName_clear(void *p, const UA_DataType *_) {
  403|     10|    UA_QualifiedName *qn = (UA_QualifiedName*)p;
  404|       |    String_clear(&qn->name, NULL);
  405|     10|}
ua_types.c:LocalizedText_clear:
 1841|     36|LocalizedText_clear(void *p, const UA_DataType *_) {
 1842|     36|    UA_LocalizedText *lt = (UA_LocalizedText *)p;
 1843|     36|    String_clear(&lt->locale, NULL);
 1844|       |    String_clear(&lt->text, NULL);
 1845|     36|}
ua_types.c:ExtensionObject_clear:
 1251|    124|ExtensionObject_clear(void *p, const UA_DataType *_) {
 1252|    124|    UA_ExtensionObject *eo = (UA_ExtensionObject *)p;
 1253|    124|    switch(eo->encoding) {
 1254|     52|    case UA_EXTENSIONOBJECT_ENCODED_NOBODY:
  ------------------
  |  Branch (1254:5): [True: 52, False: 72]
  ------------------
 1255|     52|    case UA_EXTENSIONOBJECT_ENCODED_BYTESTRING:
  ------------------
  |  Branch (1255:5): [True: 0, False: 124]
  ------------------
 1256|    124|    case UA_EXTENSIONOBJECT_ENCODED_XML:
  ------------------
  |  Branch (1256:5): [True: 72, False: 52]
  ------------------
 1257|    124|    case UA_EXTENSIONOBJECT_ENCODED_JSON:
  ------------------
  |  Branch (1257:5): [True: 0, False: 124]
  ------------------
 1258|    124|        NodeId_clear(&eo->content.encoded.typeId, NULL);
 1259|    124|        String_clear(&eo->content.encoded.body, NULL);
 1260|    124|        break;
 1261|      0|    case UA_EXTENSIONOBJECT_DECODED:
  ------------------
  |  Branch (1261:5): [True: 0, False: 124]
  ------------------
 1262|      0|        if(eo->content.decoded.data)
  ------------------
  |  Branch (1262:12): [True: 0, False: 0]
  ------------------
 1263|      0|            UA_delete(eo->content.decoded.data, eo->content.decoded.type);
 1264|      0|        break;
 1265|      0|    default:
  ------------------
  |  Branch (1265:5): [True: 0, False: 124]
  ------------------
 1266|      0|        break;
 1267|    124|    }
 1268|    124|}
ua_types.c:DiagnosticInfo_clear:
 1888|     12|DiagnosticInfo_clear(void *p, const UA_DataType *_) {
 1889|     12|    UA_DiagnosticInfo *di = (UA_DiagnosticInfo *)p;
 1890|       |
 1891|     12|    String_clear(&di->additionalInfo, NULL);
 1892|     12|    if(di->hasInnerDiagnosticInfo && di->innerDiagnosticInfo) {
  ------------------
  |  Branch (1892:8): [True: 0, False: 12]
  |  Branch (1892:38): [True: 0, False: 0]
  ------------------
 1893|      0|        DiagnosticInfo_clear(di->innerDiagnosticInfo, NULL);
 1894|      0|        UA_free(di->innerDiagnosticInfo);
  ------------------
  |  |   19|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1895|      0|    }
 1896|     12|}
ua_types.c:clearStructure:
 2113|    246|clearStructure(void *p, const UA_DataType *type) {
 2114|    246|    uintptr_t ptr = (uintptr_t)p;
 2115|  1.38k|    for(size_t i = 0; i < type->membersSize; ++i) {
  ------------------
  |  Branch (2115:23): [True: 1.14k, False: 246]
  ------------------
 2116|  1.14k|        const UA_DataTypeMember *m = &type->members[i];
 2117|  1.14k|        const UA_DataType *mt = m->memberType;
 2118|  1.14k|        ptr += m->padding;
 2119|  1.14k|        if(!m->isOptional) {
  ------------------
  |  Branch (2119:12): [True: 1.14k, False: 0]
  ------------------
 2120|  1.14k|            if(!m->isArray) {
  ------------------
  |  Branch (2120:16): [True: 972, False: 168]
  ------------------
 2121|    972|                clearJumpTable[mt->typeKind]((void*)ptr, mt);
 2122|    972|                ptr += mt->memSize;
 2123|    972|            } else {
 2124|    168|                size_t length = *(size_t*)ptr;
 2125|    168|                ptr += sizeof(size_t);
 2126|    168|                UA_Array_delete(*(void**)ptr, length, mt);
 2127|    168|                ptr += sizeof(void*);
 2128|    168|            }
 2129|  1.14k|        } else { /* field is optional */
 2130|      0|            if(!m->isArray) {
  ------------------
  |  Branch (2130:16): [True: 0, False: 0]
  ------------------
 2131|       |                /* optional scalar field is contained */
 2132|      0|                if((*(void *const *)ptr != NULL))
  ------------------
  |  Branch (2132:20): [True: 0, False: 0]
  ------------------
 2133|      0|                    UA_Array_delete(*(void **)ptr, 1, mt);
 2134|      0|                ptr += sizeof(void *);
 2135|      0|            } else {
 2136|       |                /* optional array field is contained */
 2137|      0|                if((*(void *const *)(ptr + sizeof(size_t)) != NULL)) {
  ------------------
  |  Branch (2137:20): [True: 0, False: 0]
  ------------------
 2138|      0|                    size_t length = *(size_t *)ptr;
 2139|      0|                    ptr += sizeof(size_t);
 2140|      0|                    UA_Array_delete(*(void **)ptr, length, mt);
 2141|      0|                    ptr += sizeof(void *);
 2142|      0|                } else { /* optional array field not contained */
 2143|      0|                    ptr += sizeof(size_t);
 2144|      0|                    ptr += sizeof(void *);
 2145|      0|                }
 2146|      0|            }
 2147|      0|        }
 2148|  1.14k|    }
 2149|    246|}
ua_types.c:guidOrder:
 2266|     12|guidOrder(const void *p1_, const void *p2_, const UA_DataType *type) {
 2267|     12|    const UA_Guid *p1 = (const UA_Guid*)p1_;
 2268|     12|    const UA_Guid *p2 = (const UA_Guid*)p2_;
 2269|     12|    if(p1->data1 != p2->data1)
  ------------------
  |  Branch (2269:8): [True: 0, False: 12]
  ------------------
 2270|      0|        return (p1->data1 < p2->data1) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2270:16): [True: 0, False: 0]
  ------------------
 2271|     12|    if(p1->data2 != p2->data2)
  ------------------
  |  Branch (2271:8): [True: 0, False: 12]
  ------------------
 2272|      0|        return (p1->data2 < p2->data2) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2272:16): [True: 0, False: 0]
  ------------------
 2273|     12|    if(p1->data3 != p2->data3)
  ------------------
  |  Branch (2273:8): [True: 0, False: 12]
  ------------------
 2274|      0|        return (p1->data3 < p2->data3) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2274:16): [True: 0, False: 0]
  ------------------
 2275|     12|    int cmp = memcmp(p1->data4, p2->data4, 8);
 2276|     12|    if(cmp != 0)
  ------------------
  |  Branch (2276:8): [True: 0, False: 12]
  ------------------
 2277|      0|        return (cmp < 0) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2277:16): [True: 0, False: 0]
  ------------------
 2278|     12|    return UA_ORDER_EQ;
 2279|     12|}
ua_types.c:nodeIdOrder:
 2299|  35.2k|nodeIdOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2300|  35.2k|    const UA_NodeId *p1 = (const UA_NodeId*)p1_;
 2301|  35.2k|    const UA_NodeId *p2 = (const UA_NodeId*)p2_;
 2302|       |    /* Compare namespaceIndex */
 2303|  35.2k|    if(p1->namespaceIndex != p2->namespaceIndex)
  ------------------
  |  Branch (2303:8): [True: 0, False: 35.2k]
  ------------------
 2304|      0|        return (p1->namespaceIndex < p2->namespaceIndex) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2304:16): [True: 0, False: 0]
  ------------------
 2305|       |
 2306|       |    /* Compare identifierType */
 2307|  35.2k|    if(p1->identifierType != p2->identifierType)
  ------------------
  |  Branch (2307:8): [True: 0, False: 35.2k]
  ------------------
 2308|      0|        return (p1->identifierType < p2->identifierType) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2308:16): [True: 0, False: 0]
  ------------------
 2309|       |
 2310|       |    /* Compare the identifier */
 2311|  35.2k|    switch(p1->identifierType) {
 2312|  35.2k|    case UA_NODEIDTYPE_NUMERIC:
  ------------------
  |  Branch (2312:5): [True: 35.2k, False: 0]
  ------------------
 2313|  35.2k|    default:
  ------------------
  |  Branch (2313:5): [True: 0, False: 35.2k]
  ------------------
 2314|  35.2k|        if(p1->identifier.numeric != p2->identifier.numeric)
  ------------------
  |  Branch (2314:12): [True: 35.0k, False: 196]
  ------------------
 2315|  35.0k|            return (p1->identifier.numeric < p2->identifier.numeric) ?
  ------------------
  |  Branch (2315:20): [True: 11.3k, False: 23.7k]
  ------------------
 2316|  23.7k|                UA_ORDER_LESS : UA_ORDER_MORE;
 2317|    196|        return UA_ORDER_EQ;
 2318|      0|    case UA_NODEIDTYPE_GUID:
  ------------------
  |  Branch (2318:5): [True: 0, False: 35.2k]
  ------------------
 2319|      0|        return guidOrder(&p1->identifier.guid, &p2->identifier.guid, NULL);
 2320|      0|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (2320:5): [True: 0, False: 35.2k]
  ------------------
 2321|      0|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (2321:5): [True: 0, False: 35.2k]
  ------------------
 2322|       |        return stringOrder(&p1->identifier.string, &p2->identifier.string, NULL);
 2323|  35.2k|    }
 2324|  35.2k|}
ua_types.c:expandedNodeIdOrder:
 2327|     16|expandedNodeIdOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2328|     16|    const UA_ExpandedNodeId *p1 = (const UA_ExpandedNodeId*)p1_;
 2329|     16|    const UA_ExpandedNodeId *p2 = (const UA_ExpandedNodeId*)p2_;
 2330|     16|    if(p1->serverIndex != p2->serverIndex)
  ------------------
  |  Branch (2330:8): [True: 0, False: 16]
  ------------------
 2331|      0|        return (p1->serverIndex < p2->serverIndex) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2331:16): [True: 0, False: 0]
  ------------------
 2332|     16|    UA_Order o = stringOrder(&p1->namespaceUri, &p2->namespaceUri, NULL);
 2333|     16|    if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2333:8): [True: 0, False: 16]
  ------------------
 2334|      0|        return o;
 2335|     16|    return nodeIdOrder(&p1->nodeId, &p2->nodeId, NULL);
 2336|     16|}
ua_types.c:booleanOrder:
 2224|     54|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2225|     54|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2226|     54|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2227|     54|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2227:12): [True: 0, False: 54]
  ------------------
 2228|     54|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2228:20): [True: 0, False: 0]
  ------------------
 2229|     54|        return UA_ORDER_EQ;                                               \
 2230|     54|    }
ua_types.c:sByteOrder:
 2224|     26|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2225|     26|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2226|     26|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2227|     26|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2227:12): [True: 0, False: 26]
  ------------------
 2228|     26|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2228:20): [True: 0, False: 0]
  ------------------
 2229|     26|        return UA_ORDER_EQ;                                               \
 2230|     26|    }
ua_types.c:byteOrder:
 2224|     42|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2225|     42|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2226|     42|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2227|     42|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2227:12): [True: 0, False: 42]
  ------------------
 2228|     42|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2228:20): [True: 0, False: 0]
  ------------------
 2229|     42|        return UA_ORDER_EQ;                                               \
 2230|     42|    }
ua_types.c:int16Order:
 2224|     56|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2225|     56|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2226|     56|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2227|     56|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2227:12): [True: 0, False: 56]
  ------------------
 2228|     56|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2228:20): [True: 0, False: 0]
  ------------------
 2229|     56|        return UA_ORDER_EQ;                                               \
 2230|     56|    }
ua_types.c:uInt16Order:
 2224|     35|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2225|     35|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2226|     35|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2227|     35|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2227:12): [True: 0, False: 35]
  ------------------
 2228|     35|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2228:20): [True: 0, False: 0]
  ------------------
 2229|     35|        return UA_ORDER_EQ;                                               \
 2230|     35|    }
ua_types.c:int32Order:
 2224|    142|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2225|    142|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2226|    142|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2227|    142|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2227:12): [True: 0, False: 142]
  ------------------
 2228|    142|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2228:20): [True: 0, False: 0]
  ------------------
 2229|    142|        return UA_ORDER_EQ;                                               \
 2230|    142|    }
ua_types.c:uInt32Order:
 2224|    800|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2225|    800|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2226|    800|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2227|    800|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2227:12): [True: 0, False: 800]
  ------------------
 2228|    800|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2228:20): [True: 0, False: 0]
  ------------------
 2229|    800|        return UA_ORDER_EQ;                                               \
 2230|    800|    }
ua_types.c:int64Order:
 2224|    311|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2225|    311|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2226|    311|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2227|    311|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2227:12): [True: 0, False: 311]
  ------------------
 2228|    311|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2228:20): [True: 0, False: 0]
  ------------------
 2229|    311|        return UA_ORDER_EQ;                                               \
 2230|    311|    }
ua_types.c:uInt64Order:
 2224|     19|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2225|     19|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2226|     19|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2227|     19|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2227:12): [True: 0, False: 19]
  ------------------
 2228|     19|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2228:20): [True: 0, False: 0]
  ------------------
 2229|     19|        return UA_ORDER_EQ;                                               \
 2230|     19|    }
ua_types.c:floatOrder:
 2244|     12|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2245|     12|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2246|     12|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2247|     12|        if(*p1 != *p2) {                                                  \
  ------------------
  |  Branch (2247:12): [True: 0, False: 12]
  ------------------
 2248|      0|            /* p1 is NaN */                                         \
 2249|      0|            if(*p1 != *p1) {                                        \
  ------------------
  |  Branch (2249:16): [True: 0, False: 0]
  ------------------
 2250|      0|                if(*p2 != *p2)                                      \
  ------------------
  |  Branch (2250:20): [True: 0, False: 0]
  ------------------
 2251|      0|                    return UA_ORDER_EQ;                             \
 2252|      0|                return UA_ORDER_LESS;                               \
 2253|      0|            }                                                       \
 2254|      0|            /* p2 is NaN */                                         \
 2255|      0|            if(*p2 != *p2)                                          \
  ------------------
  |  Branch (2255:16): [True: 0, False: 0]
  ------------------
 2256|      0|                return UA_ORDER_MORE;                               \
 2257|      0|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;     \
  ------------------
  |  Branch (2257:20): [True: 0, False: 0]
  ------------------
 2258|      0|        }                                                           \
 2259|     12|        return UA_ORDER_EQ;                                         \
 2260|     12|    }
ua_types.c:doubleOrder:
 2244|    649|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2245|    649|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2246|    649|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2247|    649|        if(*p1 != *p2) {                                                  \
  ------------------
  |  Branch (2247:12): [True: 3, False: 646]
  ------------------
 2248|      3|            /* p1 is NaN */                                         \
 2249|      3|            if(*p1 != *p1) {                                        \
  ------------------
  |  Branch (2249:16): [True: 3, False: 0]
  ------------------
 2250|      3|                if(*p2 != *p2)                                      \
  ------------------
  |  Branch (2250:20): [True: 3, False: 0]
  ------------------
 2251|      3|                    return UA_ORDER_EQ;                             \
 2252|      3|                return UA_ORDER_LESS;                               \
 2253|      3|            }                                                       \
 2254|      3|            /* p2 is NaN */                                         \
 2255|      3|            if(*p2 != *p2)                                          \
  ------------------
  |  Branch (2255:16): [True: 0, False: 0]
  ------------------
 2256|      0|                return UA_ORDER_MORE;                               \
 2257|      0|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;     \
  ------------------
  |  Branch (2257:20): [True: 0, False: 0]
  ------------------
 2258|      0|        }                                                           \
 2259|    649|        return UA_ORDER_EQ;                                         \
 2260|    649|    }
ua_types.c:stringOrder:
 2282|  9.67k|stringOrder(const void *p1_, const void *p2_, const UA_DataType *type) {
 2283|  9.67k|    const UA_String *p1 = (const UA_String*)p1_;
 2284|  9.67k|    const UA_String *p2 = (const UA_String*)p2_;
 2285|  9.67k|    if(p1->length != p2->length)
  ------------------
  |  Branch (2285:8): [True: 2.24k, False: 7.42k]
  ------------------
 2286|  2.24k|        return (p1->length < p2->length) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2286:16): [True: 1.47k, False: 764]
  ------------------
 2287|       |    /* For zero-length arrays, every pointer not NULL is considered a
 2288|       |     * UA_EMPTY_ARRAY_SENTINEL. */
 2289|  7.42k|    if(p1->data == p2->data) return UA_ORDER_EQ;
  ------------------
  |  Branch (2289:8): [True: 561, False: 6.86k]
  ------------------
 2290|  6.86k|    if(p1->data == NULL) return UA_ORDER_LESS;
  ------------------
  |  Branch (2290:8): [True: 0, False: 6.86k]
  ------------------
 2291|  6.86k|    if(p2->data == NULL) return UA_ORDER_MORE;
  ------------------
  |  Branch (2291:8): [True: 0, False: 6.86k]
  ------------------
 2292|  6.86k|    int cmp = memcmp((const char*)p1->data, (const char*)p2->data, p1->length);
 2293|  6.86k|    if(cmp != 0)
  ------------------
  |  Branch (2293:8): [True: 2.13k, False: 4.73k]
  ------------------
 2294|  2.13k|        return (cmp < 0) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2294:16): [True: 1.16k, False: 972]
  ------------------
 2295|  4.73k|    return UA_ORDER_EQ;
 2296|  6.86k|}
ua_types.c:qualifiedNameOrder:
 2339|     17|qualifiedNameOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2340|     17|    const UA_QualifiedName *p1 = (const UA_QualifiedName*)p1_;
 2341|     17|    const UA_QualifiedName *p2 = (const UA_QualifiedName*)p2_;
 2342|     17|    if(p1->namespaceIndex != p2->namespaceIndex)
  ------------------
  |  Branch (2342:8): [True: 0, False: 17]
  ------------------
 2343|      0|        return (p1->namespaceIndex < p2->namespaceIndex) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2343:16): [True: 0, False: 0]
  ------------------
 2344|     17|    return stringOrder(&p1->name, &p2->name, NULL);
 2345|     17|}
ua_types.c:localizedTextOrder:
 2348|     69|localizedTextOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2349|     69|    const UA_LocalizedText *p1 = (const UA_LocalizedText*)p1_;
 2350|     69|    const UA_LocalizedText *p2 = (const UA_LocalizedText*)p2_;
 2351|     69|    UA_Order o = stringOrder(&p1->locale, &p2->locale, NULL);
 2352|     69|    if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2352:8): [True: 0, False: 69]
  ------------------
 2353|      0|        return o;
 2354|     69|    return stringOrder(&p1->text, &p2->text, NULL);
 2355|     69|}
ua_types.c:extensionObjectOrder:
 2358|    101|extensionObjectOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2359|    101|    const UA_ExtensionObject *p1 = (const UA_ExtensionObject*)p1_;
 2360|    101|    const UA_ExtensionObject *p2 = (const UA_ExtensionObject*)p2_;
 2361|    101|    UA_ExtensionObjectEncoding enc1 = p1->encoding;
 2362|    101|    UA_ExtensionObjectEncoding enc2 = p2->encoding;
 2363|    101|    if(enc1 == UA_EXTENSIONOBJECT_DECODED_NODELETE)
  ------------------
  |  Branch (2363:8): [True: 0, False: 101]
  ------------------
 2364|      0|        enc1 = UA_EXTENSIONOBJECT_DECODED;
 2365|    101|    if(enc2 == UA_EXTENSIONOBJECT_DECODED_NODELETE)
  ------------------
  |  Branch (2365:8): [True: 0, False: 101]
  ------------------
 2366|      0|        enc2 = UA_EXTENSIONOBJECT_DECODED;
 2367|    101|    if(enc1 != enc2)
  ------------------
  |  Branch (2367:8): [True: 0, False: 101]
  ------------------
 2368|      0|        return (enc1 < enc2) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2368:16): [True: 0, False: 0]
  ------------------
 2369|       |
 2370|    101|    switch(enc1) {
 2371|    101|    case UA_EXTENSIONOBJECT_ENCODED_NOBODY:
  ------------------
  |  Branch (2371:5): [True: 101, False: 0]
  ------------------
 2372|    101|        return UA_ORDER_EQ;
 2373|       |
 2374|      0|    case UA_EXTENSIONOBJECT_ENCODED_BYTESTRING:
  ------------------
  |  Branch (2374:5): [True: 0, False: 101]
  ------------------
 2375|      0|    case UA_EXTENSIONOBJECT_ENCODED_XML:
  ------------------
  |  Branch (2375:5): [True: 0, False: 101]
  ------------------
 2376|      0|    case UA_EXTENSIONOBJECT_ENCODED_JSON: {
  ------------------
  |  Branch (2376:5): [True: 0, False: 101]
  ------------------
 2377|      0|            UA_Order o = nodeIdOrder(&p1->content.encoded.typeId,
 2378|      0|                                     &p2->content.encoded.typeId, NULL);
 2379|      0|            if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2379:16): [True: 0, False: 0]
  ------------------
 2380|      0|                return o;
 2381|      0|            return stringOrder((const UA_String*)&p1->content.encoded.body,
 2382|      0|                               (const UA_String*)&p2->content.encoded.body, NULL);
 2383|      0|        }
 2384|       |
 2385|      0|    case UA_EXTENSIONOBJECT_DECODED:
  ------------------
  |  Branch (2385:5): [True: 0, False: 101]
  ------------------
 2386|      0|    default: {
  ------------------
  |  Branch (2386:5): [True: 0, False: 101]
  ------------------
 2387|      0|            const UA_DataType *type1 = p1->content.decoded.type;
 2388|      0|            const UA_DataType *type2 = p2->content.decoded.type;
 2389|      0|            if(type1 != type2)
  ------------------
  |  Branch (2389:16): [True: 0, False: 0]
  ------------------
 2390|      0|                return ((uintptr_t)type1 < (uintptr_t)type2) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2390:24): [True: 0, False: 0]
  ------------------
 2391|      0|            if(!type1)
  ------------------
  |  Branch (2391:16): [True: 0, False: 0]
  ------------------
 2392|      0|                return UA_ORDER_EQ;
 2393|      0|            return orderJumpTable[type1->typeKind]
 2394|      0|                (p1->content.decoded.data, p2->content.decoded.data, type1);
 2395|      0|        }
 2396|    101|    }
 2397|    101|}
ua_types.c:dataValueOrder:
 2461|     13|dataValueOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2462|     13|    const UA_DataValue *p1 = (const UA_DataValue*)p1_;
 2463|     13|    const UA_DataValue *p2 = (const UA_DataValue*)p2_;
 2464|       |    /* Value */
 2465|     13|    if(p1->hasValue != p2->hasValue)
  ------------------
  |  Branch (2465:8): [True: 0, False: 13]
  ------------------
 2466|      0|        return (!p1->hasValue) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2466:16): [True: 0, False: 0]
  ------------------
 2467|     13|    if(p1->hasValue) {
  ------------------
  |  Branch (2467:8): [True: 0, False: 13]
  ------------------
 2468|      0|        UA_Order o = variantOrder(&p1->value, &p2->value, NULL);
 2469|      0|        if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2469:12): [True: 0, False: 0]
  ------------------
 2470|      0|            return o;
 2471|      0|    }
 2472|       |
 2473|       |    /* Status */
 2474|     13|    if(p1->hasStatus != p2->hasStatus)
  ------------------
  |  Branch (2474:8): [True: 0, False: 13]
  ------------------
 2475|      0|        return (!p1->hasStatus) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2475:16): [True: 0, False: 0]
  ------------------
 2476|     13|    if(p1->hasStatus && p1->status != p2->status)
  ------------------
  |  Branch (2476:8): [True: 0, False: 13]
  |  Branch (2476:25): [True: 0, False: 0]
  ------------------
 2477|      0|        return (p1->status < p2->status) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2477:16): [True: 0, False: 0]
  ------------------
 2478|       |
 2479|       |    /* SourceTimestamp */
 2480|     13|    if(p1->hasSourceTimestamp != p2->hasSourceTimestamp)
  ------------------
  |  Branch (2480:8): [True: 0, False: 13]
  ------------------
 2481|      0|        return (!p1->hasSourceTimestamp) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2481:16): [True: 0, False: 0]
  ------------------
 2482|     13|    if(p1->hasSourceTimestamp && p1->sourceTimestamp != p2->sourceTimestamp)
  ------------------
  |  Branch (2482:8): [True: 0, False: 13]
  |  Branch (2482:34): [True: 0, False: 0]
  ------------------
 2483|      0|        return (p1->sourceTimestamp < p2->sourceTimestamp) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2483:16): [True: 0, False: 0]
  ------------------
 2484|       |
 2485|       |    /* ServerTimestamp */
 2486|     13|    if(p1->hasServerTimestamp != p2->hasServerTimestamp)
  ------------------
  |  Branch (2486:8): [True: 0, False: 13]
  ------------------
 2487|      0|        return (!p1->hasServerTimestamp) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2487:16): [True: 0, False: 0]
  ------------------
 2488|     13|    if(p1->hasServerTimestamp && p1->serverTimestamp != p2->serverTimestamp)
  ------------------
  |  Branch (2488:8): [True: 0, False: 13]
  |  Branch (2488:34): [True: 0, False: 0]
  ------------------
 2489|      0|        return (p1->serverTimestamp < p2->serverTimestamp) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2489:16): [True: 0, False: 0]
  ------------------
 2490|       |
 2491|       |    /* SourcePicoseconds */
 2492|     13|    if(p1->hasSourcePicoseconds != p2->hasSourcePicoseconds)
  ------------------
  |  Branch (2492:8): [True: 0, False: 13]
  ------------------
 2493|      0|        return (!p1->hasSourcePicoseconds) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2493:16): [True: 0, False: 0]
  ------------------
 2494|     13|    if(p1->hasSourcePicoseconds && p1->sourcePicoseconds != p2->sourcePicoseconds)
  ------------------
  |  Branch (2494:8): [True: 0, False: 13]
  |  Branch (2494:36): [True: 0, False: 0]
  ------------------
 2495|      0|        return (p1->sourcePicoseconds < p2->sourcePicoseconds) ?
  ------------------
  |  Branch (2495:16): [True: 0, False: 0]
  ------------------
 2496|      0|            UA_ORDER_LESS : UA_ORDER_MORE;
 2497|       |
 2498|       |    /* ServerPicoseconds */
 2499|     13|    if(p1->hasServerPicoseconds != p2->hasServerPicoseconds)
  ------------------
  |  Branch (2499:8): [True: 0, False: 13]
  ------------------
 2500|      0|        return (!p1->hasServerPicoseconds) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2500:16): [True: 0, False: 0]
  ------------------
 2501|     13|    if(p1->hasServerPicoseconds && p1->serverPicoseconds != p2->serverPicoseconds)
  ------------------
  |  Branch (2501:8): [True: 0, False: 13]
  |  Branch (2501:36): [True: 0, False: 0]
  ------------------
 2502|      0|        return (p1->serverPicoseconds < p2->serverPicoseconds) ?
  ------------------
  |  Branch (2502:16): [True: 0, False: 0]
  ------------------
 2503|      0|            UA_ORDER_LESS : UA_ORDER_MORE;
 2504|       |
 2505|     13|    return UA_ORDER_EQ;
 2506|     13|}
ua_types.c:variantOrder:
 2424|  1.56k|variantOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2425|  1.56k|    const UA_Variant *p1 = (const UA_Variant*)p1_;
 2426|  1.56k|    const UA_Variant *p2 = (const UA_Variant*)p2_;
 2427|  1.56k|    if(p1->type != p2->type)
  ------------------
  |  Branch (2427:8): [True: 0, False: 1.56k]
  ------------------
 2428|      0|        return ((uintptr_t)p1->type < (uintptr_t)p2->type) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2428:16): [True: 0, False: 0]
  ------------------
 2429|       |
 2430|  1.56k|    UA_Order o;
 2431|  1.56k|    if(p1->type != NULL) {
  ------------------
  |  Branch (2431:8): [True: 1.55k, False: 8]
  ------------------
 2432|       |        /* Check if both variants are scalars or arrays */
 2433|  1.55k|        UA_Boolean s1 = UA_Variant_isScalar(p1);
 2434|  1.55k|        UA_Boolean s2 = UA_Variant_isScalar(p2);
 2435|  1.55k|        if(s1 != s2)
  ------------------
  |  Branch (2435:12): [True: 0, False: 1.55k]
  ------------------
 2436|      0|            return s1 ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2436:20): [True: 0, False: 0]
  ------------------
 2437|  1.55k|        if(s1) {
  ------------------
  |  Branch (2437:12): [True: 1.55k, False: 5]
  ------------------
 2438|  1.55k|            o = orderJumpTable[p1->type->typeKind](p1->data, p2->data, p1->type);
 2439|  1.55k|        } else {
 2440|       |            /* Mismatching array length? */
 2441|      5|            if(p1->arrayLength != p2->arrayLength)
  ------------------
  |  Branch (2441:16): [True: 0, False: 5]
  ------------------
 2442|      0|                return (p1->arrayLength < p2->arrayLength) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2442:24): [True: 0, False: 0]
  ------------------
 2443|      5|            o = arrayOrder(p1->data, p1->arrayLength, p2->data, p2->arrayLength, p1->type);
 2444|      5|        }
 2445|  1.55k|        if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2445:12): [True: 0, False: 1.55k]
  ------------------
 2446|      0|            return o;
 2447|  1.55k|    }
 2448|       |
 2449|  1.56k|    if(p1->arrayDimensionsSize != p2->arrayDimensionsSize)
  ------------------
  |  Branch (2449:8): [True: 0, False: 1.56k]
  ------------------
 2450|      0|        return (p1->arrayDimensionsSize < p2->arrayDimensionsSize) ?
  ------------------
  |  Branch (2450:16): [True: 0, False: 0]
  ------------------
 2451|      0|            UA_ORDER_LESS : UA_ORDER_MORE;
 2452|  1.56k|    o = UA_ORDER_EQ;
 2453|  1.56k|    if(p1->arrayDimensionsSize > 0)
  ------------------
  |  Branch (2453:8): [True: 0, False: 1.56k]
  ------------------
 2454|      0|        o = arrayOrder(p1->arrayDimensions, p1->arrayDimensionsSize,
 2455|      0|                       p2->arrayDimensions, p2->arrayDimensionsSize,
 2456|      0|                       &UA_TYPES[UA_TYPES_UINT32]);
  ------------------
  |  |  232|      0|#define UA_TYPES_UINT32 6
  ------------------
 2457|  1.56k|    return o;
 2458|  1.56k|}
ua_types.c:arrayOrder:
 2408|    146|           const UA_DataType *type) {
 2409|    146|    if(p1Length != p2Length)
  ------------------
  |  Branch (2409:8): [True: 0, False: 146]
  ------------------
 2410|      0|        return (p1Length < p2Length) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2410:16): [True: 0, False: 0]
  ------------------
 2411|    146|    uintptr_t u1 = (uintptr_t)p1;
 2412|    146|    uintptr_t u2 = (uintptr_t)p2;
 2413|    146|    for(size_t i = 0; i < p1Length; i++) {
  ------------------
  |  Branch (2413:23): [True: 0, False: 146]
  ------------------
 2414|      0|        UA_Order o = orderJumpTable[type->typeKind]((const void*)u1, (const void*)u2, type);
 2415|      0|        if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2415:12): [True: 0, False: 0]
  ------------------
 2416|      0|            return o;
 2417|      0|        u1 += type->memSize;
 2418|      0|        u2 += type->memSize;
 2419|      0|    }
 2420|    146|    return UA_ORDER_EQ;
 2421|    146|}
ua_types.c:diagnosticInfoOrder:
 2509|     21|diagnosticInfoOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2510|     21|    const UA_DiagnosticInfo *p1 = (const UA_DiagnosticInfo*)p1_;
 2511|     21|    const UA_DiagnosticInfo *p2 = (const UA_DiagnosticInfo*)p2_;
 2512|       |    /* SymbolicId */
 2513|     21|    if(p1->hasSymbolicId != p2->hasSymbolicId)
  ------------------
  |  Branch (2513:8): [True: 0, False: 21]
  ------------------
 2514|      0|        return (!p1->hasSymbolicId) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2514:16): [True: 0, False: 0]
  ------------------
 2515|     21|    if(p1->hasSymbolicId && p1->symbolicId != p2->symbolicId)
  ------------------
  |  Branch (2515:8): [True: 0, False: 21]
  |  Branch (2515:29): [True: 0, False: 0]
  ------------------
 2516|      0|        return (p1->symbolicId < p2->symbolicId) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2516:16): [True: 0, False: 0]
  ------------------
 2517|       |
 2518|       |    /* NamespaceUri */
 2519|     21|    if(p1->hasNamespaceUri != p2->hasNamespaceUri)
  ------------------
  |  Branch (2519:8): [True: 0, False: 21]
  ------------------
 2520|      0|        return (!p1->hasNamespaceUri) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2520:16): [True: 0, False: 0]
  ------------------
 2521|     21|    if(p1->hasNamespaceUri && p1->namespaceUri != p2->namespaceUri)
  ------------------
  |  Branch (2521:8): [True: 0, False: 21]
  |  Branch (2521:31): [True: 0, False: 0]
  ------------------
 2522|      0|        return (p1->namespaceUri < p2->namespaceUri) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2522:16): [True: 0, False: 0]
  ------------------
 2523|       |
 2524|       |    /* LocalizedText */
 2525|     21|    if(p1->hasLocalizedText != p2->hasLocalizedText)
  ------------------
  |  Branch (2525:8): [True: 0, False: 21]
  ------------------
 2526|      0|        return (!p1->hasLocalizedText) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2526:16): [True: 0, False: 0]
  ------------------
 2527|     21|    if(p1->hasLocalizedText && p1->localizedText != p2->localizedText)
  ------------------
  |  Branch (2527:8): [True: 0, False: 21]
  |  Branch (2527:32): [True: 0, False: 0]
  ------------------
 2528|      0|        return (p1->localizedText < p2->localizedText) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2528:16): [True: 0, False: 0]
  ------------------
 2529|       |
 2530|       |    /* Locale */
 2531|     21|    if(p1->hasLocale != p2->hasLocale)
  ------------------
  |  Branch (2531:8): [True: 0, False: 21]
  ------------------
 2532|      0|        return (!p1->hasLocale) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2532:16): [True: 0, False: 0]
  ------------------
 2533|     21|    if(p1->hasLocale && p1->locale != p2->locale)
  ------------------
  |  Branch (2533:8): [True: 0, False: 21]
  |  Branch (2533:25): [True: 0, False: 0]
  ------------------
 2534|      0|        return (p1->locale < p2->locale) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2534:16): [True: 0, False: 0]
  ------------------
 2535|       |
 2536|       |    /* AdditionalInfo */
 2537|     21|    if(p1->hasAdditionalInfo != p2->hasAdditionalInfo)
  ------------------
  |  Branch (2537:8): [True: 0, False: 21]
  ------------------
 2538|      0|        return (!p1->hasAdditionalInfo) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2538:16): [True: 0, False: 0]
  ------------------
 2539|     21|    if(p1->hasAdditionalInfo) {
  ------------------
  |  Branch (2539:8): [True: 0, False: 21]
  ------------------
 2540|      0|        UA_Order o = stringOrder(&p1->additionalInfo, &p2->additionalInfo, NULL);
 2541|      0|        if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2541:12): [True: 0, False: 0]
  ------------------
 2542|      0|            return o;
 2543|      0|    }
 2544|       |
 2545|       |    /* InnerStatusCode */
 2546|     21|    if(p1->hasInnerStatusCode != p2->hasInnerStatusCode)
  ------------------
  |  Branch (2546:8): [True: 0, False: 21]
  ------------------
 2547|      0|        return (!p1->hasInnerStatusCode) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2547:16): [True: 0, False: 0]
  ------------------
 2548|     21|    if(p1->hasInnerStatusCode && p1->innerStatusCode != p2->innerStatusCode)
  ------------------
  |  Branch (2548:8): [True: 0, False: 21]
  |  Branch (2548:34): [True: 0, False: 0]
  ------------------
 2549|      0|        return (p1->innerStatusCode < p2->innerStatusCode) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2549:16): [True: 0, False: 0]
  ------------------
 2550|       |
 2551|       |    /* InnerDiagnosticInfo */
 2552|     21|    if(p1->hasInnerDiagnosticInfo != p2->hasInnerDiagnosticInfo)
  ------------------
  |  Branch (2552:8): [True: 0, False: 21]
  ------------------
 2553|      0|        return (!p1->hasInnerDiagnosticInfo) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2553:16): [True: 0, False: 0]
  ------------------
 2554|     21|    if(p1->innerDiagnosticInfo == p2->innerDiagnosticInfo)
  ------------------
  |  Branch (2554:8): [True: 21, False: 0]
  ------------------
 2555|     21|        return UA_ORDER_EQ;
 2556|      0|    if(!p1->innerDiagnosticInfo || !p2->innerDiagnosticInfo)
  ------------------
  |  Branch (2556:8): [True: 0, False: 0]
  |  Branch (2556:36): [True: 0, False: 0]
  ------------------
 2557|      0|        return (!p1->innerDiagnosticInfo) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2557:16): [True: 0, False: 0]
  ------------------
 2558|      0|    return diagnosticInfoOrder(p1->innerDiagnosticInfo, p2->innerDiagnosticInfo, NULL);
 2559|      0|}
ua_types.c:structureOrder:
 2562|    316|structureOrder(const void *p1, const void *p2, const UA_DataType *type) {
 2563|    316|    uintptr_t u1 = (uintptr_t)p1;
 2564|    316|    uintptr_t u2 = (uintptr_t)p2;
 2565|    316|    UA_Order o = UA_ORDER_EQ;
 2566|  1.57k|    for(size_t i = 0; i < type->membersSize; ++i) {
  ------------------
  |  Branch (2566:23): [True: 1.25k, False: 316]
  ------------------
 2567|  1.25k|        const UA_DataTypeMember *m = &type->members[i];
 2568|  1.25k|        const UA_DataType *mt = m->memberType;
 2569|  1.25k|        u1 += m->padding;
 2570|  1.25k|        u2 += m->padding;
 2571|  1.25k|        if(!m->isOptional) {
  ------------------
  |  Branch (2571:12): [True: 1.25k, False: 0]
  ------------------
 2572|  1.25k|            if(!m->isArray) {
  ------------------
  |  Branch (2572:16): [True: 1.11k, False: 141]
  ------------------
 2573|  1.11k|                o = orderJumpTable[mt->typeKind]((const void *)u1, (const void *)u2, mt);
 2574|  1.11k|                u1 += mt->memSize;
 2575|  1.11k|                u2 += mt->memSize;
 2576|  1.11k|            } else {
 2577|    141|                size_t size1 = *(size_t*)u1;
 2578|    141|                size_t size2 = *(size_t*)u2;
 2579|    141|                u1 += sizeof(size_t);
 2580|    141|                u2 += sizeof(size_t);
 2581|    141|                o = arrayOrder(*(void* const*)u1, size1, *(void* const*)u2, size2, mt);
 2582|    141|                u1 += sizeof(void*);
 2583|    141|                u2 += sizeof(void*);
 2584|    141|            }
 2585|  1.25k|        } else {
 2586|      0|            if(!m->isArray) {
  ------------------
  |  Branch (2586:16): [True: 0, False: 0]
  ------------------
 2587|      0|                const void *pp1 = *(void* const*)u1;
 2588|      0|                const void *pp2 = *(void* const*)u2;
 2589|      0|                if(pp1 == pp2) {
  ------------------
  |  Branch (2589:20): [True: 0, False: 0]
  ------------------
 2590|      0|                    o = UA_ORDER_EQ;
 2591|      0|                } else if(pp1 == NULL) {
  ------------------
  |  Branch (2591:27): [True: 0, False: 0]
  ------------------
 2592|      0|                    o = UA_ORDER_LESS;
 2593|      0|                } else if(pp2 == NULL) {
  ------------------
  |  Branch (2593:27): [True: 0, False: 0]
  ------------------
 2594|      0|                    o = UA_ORDER_MORE;
 2595|      0|                } else {
 2596|      0|                    o = orderJumpTable[mt->typeKind](pp1, pp2, mt);
 2597|      0|                }
 2598|      0|            } else {
 2599|      0|                size_t sa1 = *(size_t*)u1;
 2600|      0|                size_t sa2 = *(size_t*)u2;
 2601|      0|                u1 += sizeof(size_t);
 2602|      0|                u2 += sizeof(size_t);
 2603|      0|                o = arrayOrder(*(void* const*)u1, sa1, *(void* const*)u2, sa2, mt);
 2604|      0|            }
 2605|      0|            u1 += sizeof(void*);
 2606|      0|            u2 += sizeof(void*);
 2607|      0|        }
 2608|       |
 2609|  1.25k|        if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2609:12): [True: 0, False: 1.25k]
  ------------------
 2610|      0|            break;
 2611|  1.25k|    }
 2612|    316|    return o;
 2613|    316|}

xml_tokenize:
   44|  8.21k|             xml_token *tokens, unsigned int max_tokens) {
   45|  8.21k|    xml_result res;
   46|  8.21k|    memset(&res, 0, sizeof(xml_result));
   47|  8.21k|    res.tokens = tokens;
   48|       |
   49|  8.21k|    yxml_t ctx;
   50|  8.21k|    char buf[512];
   51|  8.21k|    yxml_init(&ctx, buf, 512);
   52|       |
   53|  8.21k|    unsigned char top = 0;
   54|  8.21k|    unsigned tokenPos = 0;
   55|  8.21k|    xml_token *stack[32]; /* Max nesting depth is 32 */
   56|  8.21k|    xml_token backup_tokens[32]; /* To be used when the tokens run out */
   57|       |
   58|       |    /* Help clang-analyzer */
   59|       |#ifdef __clang_analyzer__
   60|       |    memset(stack, 0, 32 * sizeof(void*));
   61|       |    memset(backup_tokens, 0, 32 * sizeof(xml_token));
   62|       |#endif
   63|       |
   64|  8.21k|    stack[top] = &backup_tokens[top];
   65|  8.21k|    memset(stack[top], 0, sizeof(xml_token));
   66|       |
   67|  8.21k|    unsigned val_begin = 0;
   68|  8.21k|    unsigned pos = 0;
   69|   166M|    for(; pos < len; pos++) {
  ------------------
  |  Branch (69:11): [True: 166M, False: 7.04k]
  ------------------
   70|       |#ifdef __clang_analyzer__
   71|       |        UA_assert(stack[top] != NULL);
   72|       |#endif
   73|   166M|        yxml_ret_t xml_status = yxml_parse(&ctx, xml[pos]);
   74|   166M|        switch(xml_status) {
   75|      0|        case YXML_EEOF:
  ------------------
  |  Branch (75:9): [True: 0, False: 166M]
  ------------------
   76|    212|        case YXML_EREF:
  ------------------
  |  Branch (76:9): [True: 212, False: 166M]
  ------------------
   77|    311|        case YXML_ECLOSE:
  ------------------
  |  Branch (77:9): [True: 99, False: 166M]
  ------------------
   78|    321|        case YXML_ESTACK:
  ------------------
  |  Branch (78:9): [True: 10, False: 166M]
  ------------------
   79|  1.12k|        case YXML_ESYN:
  ------------------
  |  Branch (79:9): [True: 804, False: 166M]
  ------------------
   80|  1.12k|        default:
  ------------------
  |  Branch (80:9): [True: 0, False: 166M]
  ------------------
   81|  1.12k|            goto errout;
   82|  68.7M|        case YXML_OK:
  ------------------
  |  Branch (82:9): [True: 68.7M, False: 97.8M]
  ------------------
   83|  68.7M|            continue;
   84|  10.1M|        case YXML_ELEMSTART:
  ------------------
  |  Branch (84:9): [True: 10.1M, False: 156M]
  ------------------
   85|  11.3M|        case YXML_ATTRSTART: {
  ------------------
  |  Branch (85:9): [True: 1.22M, False: 165M]
  ------------------
   86|  11.3M|            if(xml_status == YXML_ELEMSTART) {
  ------------------
  |  Branch (86:16): [True: 10.1M, False: 1.22M]
  ------------------
   87|  10.1M|                stack[top]->children++;
   88|  10.1M|                stack[top]->content = UA_STRING_NULL; /* Only the leaf elements have content */
   89|  10.1M|            } else {
   90|  1.22M|                stack[top]->attributes++;
   91|  1.22M|            }
   92|  11.3M|            top++;
   93|  11.3M|            if(top >= 32)
  ------------------
  |  Branch (93:16): [True: 6, False: 11.3M]
  ------------------
   94|      6|                goto errout; /* nesting too deep */
   95|  11.3M|            stack[top] = (tokenPos < max_tokens) ? &tokens[tokenPos] : &backup_tokens[top];
  ------------------
  |  Branch (95:26): [True: 5.63M, False: 5.73M]
  ------------------
   96|  11.3M|            memset(stack[top], 0, sizeof(xml_token));
   97|  11.3M|            stack[top]->type = (xml_status == YXML_ELEMSTART) ? XML_TOKEN_ELEMENT : XML_TOKEN_ATTRIBUTE;
  ------------------
  |  Branch (97:32): [True: 10.1M, False: 1.22M]
  ------------------
   98|  11.3M|            stack[top]->name = backtrackName(xml, pos);
   99|  11.3M|            const char *start = xml + pos;
  100|  11.3M|            if(xml_status == YXML_ELEMSTART) {
  ------------------
  |  Branch (100:16): [True: 10.1M, False: 1.22M]
  ------------------
  101|  30.8M|                while(*start != '<')
  ------------------
  |  Branch (101:23): [True: 20.6M, False: 10.1M]
  ------------------
  102|  20.6M|                    start--;
  103|  10.1M|            }
  104|  11.3M|            stack[top]->start = (unsigned)(start - xml);
  105|  11.3M|            tokenPos++;
  106|  11.3M|            val_begin = 0; /* if the previous non-leaf element started to collect content */
  107|  11.3M|            break;
  108|  11.3M|        }
  109|  71.8M|        case YXML_CONTENT:
  ------------------
  |  Branch (109:9): [True: 71.8M, False: 94.6M]
  ------------------
  110|  75.0M|        case YXML_ATTRVAL:
  ------------------
  |  Branch (110:9): [True: 3.17M, False: 163M]
  ------------------
  111|  75.0M|            if(ctx.isReference && xml_status == YXML_CONTENT)
  ------------------
  |  Branch (111:16): [True: 1.72M, False: 73.3M]
  |  Branch (111:35): [True: 1.72M, False: 807]
  ------------------
  112|  1.72M|                stack[top]->contentEscaped = true;
  113|  75.0M|            if(val_begin == 0)
  ------------------
  |  Branch (113:16): [True: 306k, False: 74.7M]
  ------------------
  114|   306k|                val_begin = pos;
  115|  75.0M|            stack[top]->end = pos;
  116|  75.0M|            break;
  117|  10.1M|        case YXML_ELEMEND:
  ------------------
  |  Branch (117:9): [True: 10.1M, False: 156M]
  ------------------
  118|  11.3M|        case YXML_ATTREND:
  ------------------
  |  Branch (118:9): [True: 1.22M, False: 165M]
  ------------------
  119|  11.3M|            if(top == 0)
  ------------------
  |  Branch (119:16): [True: 0, False: 11.3M]
  ------------------
  120|      0|                goto errout; /* more closes than opens */
  121|  11.3M|            if(val_begin > 0) {
  ------------------
  |  Branch (121:16): [True: 185k, False: 11.1M]
  ------------------
  122|   185k|                stack[top]->content.data = (UA_Byte*)(uintptr_t)xml + val_begin;
  123|   185k|                stack[top]->content.length = stack[top]->end + 1 - val_begin;
  124|   185k|            }
  125|  11.3M|            stack[top]->end = pos;
  126|  11.3M|            if(xml_status == YXML_ELEMEND) {
  ------------------
  |  Branch (126:16): [True: 10.1M, False: 1.22M]
  ------------------
  127|       |                /* Saw "</", looking for the closing ">" */
  128|  10.1M|                while(stack[top]->end < len && xml[stack[top]->end] != '>')
  ------------------
  |  Branch (128:23): [True: 10.1M, False: 36]
  |  Branch (128:48): [True: 17.8k, False: 10.1M]
  ------------------
  129|  17.8k|                    stack[top]->end++;
  130|  10.1M|                stack[top]->end++;
  131|  10.1M|                if(stack[top]->end > len)
  ------------------
  |  Branch (131:20): [True: 36, False: 10.1M]
  ------------------
  132|     36|                    goto errout;
  133|  10.1M|            }
  134|  11.3M|            val_begin = 0;
  135|  11.3M|            top--;
  136|  11.3M|            break;
  137|  3.73k|        case YXML_PISTART:
  ------------------
  |  Branch (137:9): [True: 3.73k, False: 166M]
  ------------------
  138|  7.15k|        case YXML_PICONTENT:
  ------------------
  |  Branch (138:9): [True: 3.42k, False: 166M]
  ------------------
  139|  10.7k|        case YXML_PIEND:
  ------------------
  |  Branch (139:9): [True: 3.58k, False: 166M]
  ------------------
  140|  10.7k|            continue; /* Ignore processing instructions */
  141|   166M|        }
  142|   166M|    }
  143|       |
  144|       |    /* Check that all elements were closed */
  145|  7.04k|    if(yxml_eof(&ctx) != YXML_OK)
  ------------------
  |  Branch (145:8): [True: 2.02k, False: 5.02k]
  ------------------
  146|  2.02k|        goto errout;
  147|       |
  148|  5.02k|    res.num_tokens = tokenPos;
  149|  5.02k|    if(tokenPos > max_tokens)
  ------------------
  |  Branch (149:8): [True: 462, False: 4.56k]
  ------------------
  150|    462|        res.error = XML_ERROR_OVERFLOW;
  151|  5.02k|    return res;
  152|       |
  153|  3.19k| errout:
  154|  3.19k|    res.error_pos = pos;
  155|  3.19k|    res.error = XML_ERROR_INVALID;
  156|  3.19k|    return res;
  157|  7.04k|}
UA_encodeXml:
  862|  3.11k|             const UA_EncodeXmlOptions *options) {
  863|  3.11k|    if(!src || !type)
  ------------------
  |  Branch (863:8): [True: 0, False: 3.11k]
  |  Branch (863:16): [True: 0, False: 3.11k]
  ------------------
  864|      0|        return UA_STATUSCODE_BADINTERNALERROR;
  ------------------
  |  |   29|      0|#define UA_STATUSCODE_BADINTERNALERROR ((UA_StatusCode) 0x80020000)
  ------------------
  865|       |
  866|       |    /* Allocate buffer */
  867|  3.11k|    UA_Boolean allocated = false;
  868|  3.11k|    status res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  3.11k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  869|  3.11k|    if(outBuf->length == 0) {
  ------------------
  |  Branch (869:8): [True: 0, False: 3.11k]
  ------------------
  870|      0|        size_t len = UA_calcSizeXml(src, type, options);
  871|      0|        res = UA_ByteString_allocBuffer(outBuf, len);
  872|      0|        if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (872:12): [True: 0, False: 0]
  ------------------
  873|      0|            return res;
  874|      0|        allocated = true;
  875|      0|    }
  876|       |
  877|       |    /* Set up the context */
  878|  3.11k|    CtxXml ctx;
  879|  3.11k|    memset(&ctx, 0, sizeof(ctx));
  880|  3.11k|    ctx.pos = outBuf->data;
  881|  3.11k|    ctx.end = &outBuf->data[outBuf->length];
  882|  3.11k|    ctx.depth = 0;
  883|  3.11k|    ctx.calcOnly = false;
  884|  3.11k|    if(options) {
  ------------------
  |  Branch (884:8): [True: 0, False: 3.11k]
  ------------------
  885|      0|        ctx.namespaceMapping = options->namespaceMapping;
  886|      0|        ctx.serverUris = options->serverUris;
  887|      0|        ctx.serverUrisSize = options->serverUrisSize;
  888|      0|    }
  889|       |
  890|       |    /* Encode */
  891|  3.11k|    res = writeXmlElement(&ctx, type->typeName, src, type);
  892|       |
  893|       |    /* Clean up */
  894|  3.11k|    if(res == UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  3.11k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (894:8): [True: 3.11k, False: 0]
  ------------------
  895|  3.11k|        outBuf->length = (size_t)((uintptr_t)ctx.pos - (uintptr_t)outBuf->data);
  896|      0|    else if(allocated)
  ------------------
  |  Branch (896:13): [True: 0, False: 0]
  ------------------
  897|      0|        UA_ByteString_clear(outBuf);
  898|       |
  899|  3.11k|    return res;
  900|  3.11k|}
UA_calcSizeXml:
  908|  1.61k|               const UA_EncodeXmlOptions *options) {
  909|  1.61k|    if(!src || !type)
  ------------------
  |  Branch (909:8): [True: 0, False: 1.61k]
  |  Branch (909:16): [True: 0, False: 1.61k]
  ------------------
  910|      0|        return UA_STATUSCODE_BADINTERNALERROR;
  ------------------
  |  |   29|      0|#define UA_STATUSCODE_BADINTERNALERROR ((UA_StatusCode) 0x80020000)
  ------------------
  911|       |
  912|       |    /* Set up the context */
  913|  1.61k|    CtxXml ctx;
  914|  1.61k|    memset(&ctx, 0, sizeof(ctx));
  915|  1.61k|    ctx.pos = NULL;
  916|  1.61k|    ctx.end = (const UA_Byte*)(uintptr_t)SIZE_MAX;
  917|  1.61k|    ctx.depth = 0;
  918|  1.61k|    if(options) {
  ------------------
  |  Branch (918:8): [True: 0, False: 1.61k]
  ------------------
  919|      0|        ctx.namespaceMapping = options->namespaceMapping;
  920|      0|        ctx.serverUris = options->serverUris;
  921|      0|        ctx.serverUrisSize = options->serverUrisSize;
  922|      0|    }
  923|       |
  924|  1.61k|    ctx.calcOnly = true;
  925|       |
  926|       |    /* Encode */
  927|  1.61k|    status ret = writeXmlElement(&ctx, type->typeName, src, type);
  928|  1.61k|    if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  1.61k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (928:8): [True: 51, False: 1.55k]
  ------------------
  929|     51|        return 0;
  930|  1.55k|    return (size_t)ctx.pos;
  931|  1.61k|}
UA_decodeXml:
 2078|  7.75k|             const UA_DecodeXmlOptions *options) {
 2079|  7.75k|    if(!dst || !src || !type)
  ------------------
  |  Branch (2079:8): [True: 0, False: 7.75k]
  |  Branch (2079:16): [True: 0, False: 7.75k]
  |  Branch (2079:24): [True: 0, False: 7.75k]
  ------------------
 2080|      0|        return UA_STATUSCODE_BADARGUMENTSMISSING;
  ------------------
  |  |  449|      0|#define UA_STATUSCODE_BADARGUMENTSMISSING ((UA_StatusCode) 0x80760000)
  ------------------
 2081|  7.75k|    if(src->length > UINT_MAX)
  ------------------
  |  Branch (2081:8): [True: 0, False: 7.75k]
  ------------------
 2082|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2083|       |
 2084|       |    /* Tokenize. Add a fake wrapper element if options->unwrapped is enabled. */
 2085|  7.75k|    unsigned tokensSize = 63;
 2086|  7.75k|    xml_token tokenbuf[64];
 2087|  7.75k|    xml_token *tokens = tokenbuf;
 2088|       |
 2089|  7.75k|    xml_result res = xml_tokenize((char*)src->data, (unsigned)src->length,
 2090|  7.75k|                                  tokens + 1, tokensSize);
 2091|  7.75k|    if(res.error == XML_ERROR_OVERFLOW) {
  ------------------
  |  Branch (2091:8): [True: 462, False: 7.29k]
  ------------------
 2092|    462|        if(res.num_tokens == UINT_MAX)
  ------------------
  |  Branch (2092:12): [True: 0, False: 462]
  ------------------
 2093|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2094|    462|        size_t requiredTokens = (size_t)res.num_tokens + 1;
 2095|    462|        if(requiredTokens > SIZE_MAX / sizeof(xml_token))
  ------------------
  |  Branch (2095:12): [True: 0, False: 462]
  ------------------
 2096|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2097|    462|        tokens = (xml_token*)UA_malloc(sizeof(xml_token) * requiredTokens);
  ------------------
  |  |   18|    462|#define UA_malloc(size) UA_mallocSingleton(size)
  ------------------
 2098|    462|        if(!tokens)
  ------------------
  |  Branch (2098:12): [True: 0, False: 462]
  ------------------
 2099|      0|            return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 2100|    462|        res = xml_tokenize((char*)src->data, (unsigned)src->length,
 2101|    462|                           tokens + 1, res.num_tokens);
 2102|    462|    }
 2103|       |
 2104|  7.75k|    if(res.error != XML_ERROR_NONE || res.num_tokens == 0) {
  ------------------
  |  Branch (2104:8): [True: 3.19k, False: 4.56k]
  |  Branch (2104:39): [True: 0, False: 4.56k]
  ------------------
 2105|  3.19k|        if(tokens != tokenbuf)
  ------------------
  |  Branch (2105:12): [True: 0, False: 3.19k]
  ------------------
 2106|      0|            UA_free(tokens);
  ------------------
  |  |   19|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 2107|  3.19k|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|  3.19k|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2108|  3.19k|    }
 2109|       |
 2110|       |    /* Set up the context */
 2111|  4.56k|    ParseCtxXml ctx;
 2112|  4.56k|    memset(&ctx, 0, sizeof(ParseCtxXml));
 2113|  4.56k|    ctx.xml = (const char*)src->data;
 2114|  4.56k|    ctx.tokens = tokens;
 2115|  4.56k|    ctx.tokensSize = res.num_tokens;
 2116|  4.56k|    if(options) {
  ------------------
  |  Branch (2116:8): [True: 72, False: 4.48k]
  ------------------
 2117|     72|        ctx.customTypes = options->customTypes;
 2118|     72|        ctx.namespaceMapping = options->namespaceMapping;
 2119|     72|        ctx.serverUris = options->serverUris;
 2120|     72|        ctx.serverUrisSize = options->serverUrisSize;
 2121|     72|    }
 2122|       |
 2123|  4.56k|    if(options && options->unwrapped) {
  ------------------
  |  Branch (2123:8): [True: 72, False: 4.48k]
  |  Branch (2123:19): [True: 0, False: 72]
  ------------------
 2124|       |        /* Set up the fake wrapper element */
 2125|      0|        xml_token *tok = tokens;
 2126|      0|        memset(tok, 0, sizeof(xml_token));
 2127|      0|        tok->type = XML_TOKEN_ELEMENT;
 2128|      0|        tok->name = UA_STRING((char*)(uintptr_t)type->typeName);
 2129|      0|        tok->children = 1;
 2130|      0|        tok->start = 0;
 2131|      0|        tok->end = (unsigned)src->length;
 2132|      0|        ctx.tokensSize++;
 2133|  4.56k|    } else {
 2134|  4.56k|        ctx.tokens++; /* Skip the first token */
 2135|  4.56k|    }
 2136|       |
 2137|       |    /* Decode */
 2138|  4.56k|    memset(dst, 0, type->memSize); /* Initialize the value */
 2139|  4.56k|    UA_StatusCode ret = decodeXmlJumpTable[type->typeKind](&ctx, dst, type);
 2140|  4.56k|    if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  4.56k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2140:8): [True: 1.31k, False: 3.24k]
  ------------------
 2141|  1.31k|        UA_clear(dst, type);
 2142|       |
 2143|       |    /* Clean up */
 2144|  4.56k|    if(tokens != tokenbuf)
  ------------------
  |  Branch (2144:8): [True: 462, False: 4.09k]
  ------------------
 2145|    462|        UA_free(tokens);
  ------------------
  |  |   19|    462|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 2146|  4.56k|    return ret;
 2147|  7.75k|}
ua_types_encoding_xml.c:backtrackName:
   28|  11.3M|backtrackName(const char *xml, unsigned end) {
   29|  11.3M|    unsigned pos = end;
   30|  52.6M|    for(; pos > 0; pos--) {
  ------------------
  |  Branch (30:11): [True: 52.6M, False: 0]
  ------------------
   31|  52.6M|        unsigned char c = (unsigned char)xml[pos-1];
   32|  52.6M|        if(c >= 'a' && c <= 'z') continue; /* isAlpha */
  ------------------
  |  Branch (32:12): [True: 40.8M, False: 11.7M]
  |  Branch (32:24): [True: 11.4M, False: 29.4M]
  ------------------
   33|  41.1M|        if(c >= 'A' && c <= 'Z') continue; /* isAlpha */
  ------------------
  |  Branch (33:12): [True: 29.7M, False: 11.4M]
  |  Branch (33:24): [True: 284k, False: 29.4M]
  ------------------
   34|  40.9M|        if(c >= '0' && c <= '9') continue; /* isNum */
  ------------------
  |  Branch (34:12): [True: 39.6M, False: 1.21M]
  |  Branch (34:24): [True: 71.0k, False: 39.6M]
  ------------------
   35|  40.8M|        if(c == '_' || c >= 128 || c == '-'|| c == '.') continue;
  ------------------
  |  Branch (35:12): [True: 3.97k, False: 40.8M]
  |  Branch (35:24): [True: 29.4M, False: 11.3M]
  |  Branch (35:36): [True: 15.3k, False: 11.3M]
  |  Branch (35:47): [True: 1.91k, False: 11.3M]
  ------------------
   36|  11.3M|        break;
   37|  40.8M|    }
   38|  11.3M|    UA_String s = {end - pos, (UA_Byte*)(uintptr_t)xml + pos};
   39|  11.3M|    return s;
   40|  11.3M|}
ua_types_encoding_xml.c:Boolean_encodeXml:
  346|      6|ENCODE_XML(Boolean) {
  347|      6|    const UA_Boolean *src = (const UA_Boolean*)src_;
  348|      6|    if(*src == true)
  ------------------
  |  Branch (348:8): [True: 3, False: 3]
  ------------------
  349|      3|        return xmlEncodeWriteChars(ctx, "true", 4);
  350|      3|    return xmlEncodeWriteChars(ctx, "false", 5);
  351|      6|}
ua_types_encoding_xml.c:xmlEncodeWriteChars:
  267|  10.4M|xmlEncodeWriteChars(CtxXml *ctx, const char *c, size_t len) {
  268|  10.4M|    if(ctx->calcOnly) {
  ------------------
  |  Branch (268:8): [True: 3.48M, False: 6.96M]
  ------------------
  269|  3.48M|        uintptr_t pos = (uintptr_t)ctx->pos;
  270|  3.48M|        if(len > UINTPTR_MAX - pos)
  ------------------
  |  Branch (270:12): [True: 0, False: 3.48M]
  ------------------
  271|      0|            return UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED;
  ------------------
  |  |   47|      0|#define UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED ((UA_StatusCode) 0x80080000)
  ------------------
  272|  3.48M|        ctx->pos = (uint8_t*)(pos + len);
  273|  3.48M|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  3.48M|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  274|  3.48M|    }
  275|  6.96M|    if(len > (size_t)(ctx->end - ctx->pos))
  ------------------
  |  Branch (275:8): [True: 0, False: 6.96M]
  ------------------
  276|      0|        return UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED;
  ------------------
  |  |   47|      0|#define UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED ((UA_StatusCode) 0x80080000)
  ------------------
  277|  6.96M|    if(len)
  ------------------
  |  Branch (277:8): [True: 5.27M, False: 1.69M]
  ------------------
  278|  5.27M|        memcpy(ctx->pos, c, len);
  279|  6.96M|    ctx->pos += len;
  280|  6.96M|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  6.96M|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  281|  6.96M|}
ua_types_encoding_xml.c:SByte_encodeXml:
  364|     66|ENCODE_XML(SByte) {
  365|     66|    const UA_SByte *src = (const UA_SByte*)src_;
  366|     66|    char buf[5];
  367|     66|    return encodeSigned(ctx, *src, buf);
  368|     66|}
ua_types_encoding_xml.c:encodeSigned:
  353|  1.12k|static status encodeSigned(CtxXml *ctx, UA_Int64 value, char* buffer) {
  354|  1.12k|    UA_UInt16 digits = itoaSigned(value, buffer);
  355|  1.12k|    return xmlEncodeWriteChars(ctx, buffer, digits);
  356|  1.12k|}
ua_types_encoding_xml.c:Byte_encodeXml:
  371|     54|ENCODE_XML(Byte) {
  372|     54|    const UA_Byte *src = (const UA_Byte*)src_;
  373|     54|    char buf[4];
  374|     54|    return encodeUnsigned(ctx, *src, buf);
  375|     54|}
ua_types_encoding_xml.c:encodeUnsigned:
  358|    327|static status encodeUnsigned(CtxXml *ctx, UA_UInt64 value, char* buffer) {
  359|    327|    UA_UInt16 digits = itoaUnsigned(value, buffer, 10);
  360|    327|    return xmlEncodeWriteChars(ctx, buffer, digits);
  361|    327|}
ua_types_encoding_xml.c:Int16_encodeXml:
  378|    156|ENCODE_XML(Int16) {
  379|    156|    const UA_Int16 *src = (const UA_Int16*)src_;
  380|    156|    char buf[7];
  381|    156|    return encodeSigned(ctx, *src, buf);
  382|    156|}
ua_types_encoding_xml.c:UInt16_encodeXml:
  385|     60|ENCODE_XML(UInt16) {
  386|     60|    const UA_UInt16 *src = (const UA_UInt16*)src_;
  387|     60|    char buf[6];
  388|     60|    return encodeUnsigned(ctx, *src, buf);
  389|     60|}
ua_types_encoding_xml.c:Int32_encodeXml:
  392|    294|ENCODE_XML(Int32) {
  393|    294|    const UA_Int32 *src = (const UA_Int32*)src_;
  394|    294|    char buf[12];
  395|    294|    return encodeSigned(ctx, *src, buf);
  396|    294|}
ua_types_encoding_xml.c:UInt32_encodeXml:
  417|    156|ENCODE_XML(UInt32) {
  418|    156|    const UA_UInt32 *src = (const UA_UInt32*)src_;
  419|    156|    char buf[11];
  420|    156|    return encodeUnsigned(ctx, *src, buf);
  421|    156|}
ua_types_encoding_xml.c:Int64_encodeXml:
  424|    609|ENCODE_XML(Int64) {
  425|    609|    const UA_Int64 *src = (const UA_Int64*)src_;
  426|    609|    char buf[23];
  427|    609|    return encodeSigned(ctx, *src, buf);
  428|    609|}
ua_types_encoding_xml.c:UInt64_encodeXml:
  431|     57|ENCODE_XML(UInt64) {
  432|     57|    const UA_UInt64 *src = (const UA_UInt64*)src_;
  433|     57|    char buf[23];
  434|     57|    return encodeUnsigned(ctx, *src, buf);
  435|     57|}
ua_types_encoding_xml.c:Double_encodeXml:
  454|  1.58k|ENCODE_XML(Double) {
  455|  1.58k|    const UA_Double *src = (const UA_Double*)src_;
  456|  1.58k|    char buffer[32];
  457|  1.58k|    size_t len;
  458|  1.58k|    if(*src != *src)
  ------------------
  |  Branch (458:8): [True: 9, False: 1.57k]
  ------------------
  459|      9|        return xmlEncodeWriteChars(ctx, "NaN", 3);
  460|  1.57k|    if(*src == INFINITY)
  ------------------
  |  Branch (460:8): [True: 9, False: 1.56k]
  ------------------
  461|      9|        return xmlEncodeWriteChars(ctx, "INF", 3);
  462|  1.56k|    if(*src == -INFINITY)
  ------------------
  |  Branch (462:8): [True: 6, False: 1.56k]
  ------------------
  463|      6|        return xmlEncodeWriteChars(ctx, "-INF", 4);
  464|       |
  465|  1.56k|    len = dtoa(*src, buffer);
  466|  1.56k|    return xmlEncodeWriteChars(ctx, buffer, len);
  467|  1.56k|}
ua_types_encoding_xml.c:String_encodeXml:
  470|  1.04k|ENCODE_XML(String) {
  471|  1.04k|    const UA_String *src = (const UA_String*)src_;
  472|  1.04k|    return xmlEncodeWriteEscapedChars(ctx, (const char*)src->data, src->length);
  473|  1.04k|}
ua_types_encoding_xml.c:xmlEncodeWriteEscapedChars:
  288|  1.04k|xmlEncodeWriteEscapedChars(CtxXml *ctx, const char *c, size_t len) {
  289|  1.04k|    if(len == 0)
  ------------------
  |  Branch (289:8): [True: 21, False: 1.02k]
  ------------------
  290|     21|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     21|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  291|  1.02k|    status ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  1.02k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  292|  1.02k|    size_t start = 0;
  293|  51.0M|    for(size_t i = 0; i < len; i++) {
  ------------------
  |  Branch (293:23): [True: 51.0M, False: 1.02k]
  ------------------
  294|  51.0M|        const char *entity;
  295|  51.0M|        size_t entityLen;
  296|  51.0M|        switch(c[i]) {
  297|    117|        case '&':  entity = "&amp;";  entityLen = 5; break;
  ------------------
  |  Branch (297:9): [True: 117, False: 51.0M]
  ------------------
  298|    531|        case '<':  entity = "&lt;";   entityLen = 4; break;
  ------------------
  |  Branch (298:9): [True: 531, False: 51.0M]
  ------------------
  299|  96.0k|        case '>':  entity = "&gt;";   entityLen = 4; break;
  ------------------
  |  Branch (299:9): [True: 96.0k, False: 50.9M]
  ------------------
  300|  4.31M|        case '"':  entity = "&quot;"; entityLen = 6; break;
  ------------------
  |  Branch (300:9): [True: 4.31M, False: 46.7M]
  ------------------
  301|   762k|        case '\'': entity = "&apos;"; entityLen = 6; break;
  ------------------
  |  Branch (301:9): [True: 762k, False: 50.2M]
  ------------------
  302|  45.8M|        default: continue;
  ------------------
  |  Branch (302:9): [True: 45.8M, False: 5.17M]
  ------------------
  303|  51.0M|        }
  304|  5.17M|        ret |= xmlEncodeWriteChars(ctx, &c[start], i - start);
  305|  5.17M|        ret |= xmlEncodeWriteChars(ctx, entity, entityLen);
  306|  5.17M|        start = i + 1;
  307|  5.17M|    }
  308|  1.02k|    return ret | xmlEncodeWriteChars(ctx, &c[start], len - start);
  309|  1.02k|}
ua_types_encoding_xml.c:ByteString_encodeXml:
  501|     72|ENCODE_XML(ByteString) {
  502|     72|    const UA_ByteString *src = (const UA_ByteString*)src_;
  503|     72|    if(!src->data)
  ------------------
  |  Branch (503:8): [True: 0, False: 72]
  ------------------
  504|      0|        return xmlEncodeWriteChars(ctx, "null", 4);
  505|       |
  506|     72|    if(src->length == 0)
  ------------------
  |  Branch (506:8): [True: 72, False: 0]
  ------------------
  507|     72|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     72|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  508|       |
  509|      0|    size_t flen = 0;
  510|      0|    unsigned char *ba64 = UA_base64(src->data, src->length, &flen);
  511|       |
  512|       |    /* Not converted, no mem */
  513|      0|    if(!ba64)
  ------------------
  |  Branch (513:8): [True: 0, False: 0]
  ------------------
  514|      0|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
  515|       |
  516|      0|    if(ctx->pos + flen > ctx->end) {
  ------------------
  |  Branch (516:8): [True: 0, False: 0]
  ------------------
  517|      0|        UA_free(ba64);
  ------------------
  |  |   19|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
  518|      0|        return UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED;
  ------------------
  |  |   47|      0|#define UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED ((UA_StatusCode) 0x80080000)
  ------------------
  519|      0|    }
  520|       |
  521|       |    /* Copy flen bytes to output stream. */
  522|      0|    if(!ctx->calcOnly)
  ------------------
  |  Branch (522:8): [True: 0, False: 0]
  ------------------
  523|      0|        memcpy(ctx->pos, ba64, flen);
  524|      0|    ctx->pos += flen;
  525|       |
  526|       |    /* Base64 result no longer needed */
  527|      0|    UA_free(ba64);
  ------------------
  |  |   19|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
  528|       |
  529|      0|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  530|      0|}
ua_types_encoding_xml.c:XmlElement_encodeXml:
  476|    492|ENCODE_XML(XmlElement) {
  477|    492|    const UA_XmlElement *src = (const UA_XmlElement*)src_;
  478|    492|    return xmlEncodeWriteChars(ctx, (const char*)src->data, src->length);
  479|    492|}
ua_types_encoding_xml.c:NodeId_encodeXml:
  533|    216|ENCODE_XML(NodeId) {
  534|    216|    const UA_NodeId *src = (const UA_NodeId*)src_;
  535|    216|    UA_StatusCode ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    216|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  536|    216|    UA_String out = UA_STRING_NULL;
  537|    216|    ret |= UA_NodeId_printEx(src, &out, ctx->namespaceMapping);
  538|    216|    ret |= writeXmlElement(ctx, UA_XML_NODEID_IDENTIFIER,
  ------------------
  |  |  244|    216|#define UA_XML_NODEID_IDENTIFIER "Identifier"
  ------------------
  539|    216|                           &out, &UA_TYPES[UA_TYPES_STRING]);
  ------------------
  |  |  402|    216|#define UA_TYPES_STRING 11
  ------------------
  540|    216|    UA_String_clear(&out);
  541|    216|    return ret;
  542|    216|}
ua_types_encoding_xml.c:QualifiedName_encodeXml:
  567|      3|ENCODE_XML(QualifiedName) {
  568|      3|    const UA_QualifiedName *src = (const UA_QualifiedName*)src_;
  569|       |    /* Map the NamespaceIndex */
  570|      3|    UA_UInt16 index = src->namespaceIndex;
  571|      3|    if(ctx->namespaceMapping)
  ------------------
  |  Branch (571:8): [True: 0, False: 3]
  ------------------
  572|      0|        index = UA_NamespaceMapping_local2Remote(ctx->namespaceMapping, index);
  573|       |
  574|       |    /* Write out the elements. Same rule as in encodeXmlStructure: an absent
  575|       |     * (NULL) String is skipped so it does not come back as an empty String
  576|       |     * on decoding. An empty-but-present String is still written. */
  577|      3|    UA_StatusCode ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      3|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  578|      3|    ret |= writeXmlElement(ctx, UA_XML_QUALIFIEDNAME_NAMESPACEINDEX,
  ------------------
  |  |  247|      3|#define UA_XML_QUALIFIEDNAME_NAMESPACEINDEX "NamespaceIndex"
  ------------------
  579|      3|                           &index, &UA_TYPES[UA_TYPES_UINT16]);
  ------------------
  |  |  164|      3|#define UA_TYPES_UINT16 4
  ------------------
  580|      3|    if(src->name.data)
  ------------------
  |  Branch (580:8): [True: 0, False: 3]
  ------------------
  581|      0|        ret |= writeXmlElement(ctx, UA_XML_QUALIFIEDNAME_NAME,
  ------------------
  |  |  248|      0|#define UA_XML_QUALIFIEDNAME_NAME "Name"
  ------------------
  582|      0|                               &src->name, &UA_TYPES[UA_TYPES_STRING]);
  ------------------
  |  |  402|      0|#define UA_TYPES_STRING 11
  ------------------
  583|      3|    return ret;
  584|      3|}
ua_types_encoding_xml.c:LocalizedText_encodeXml:
  587|      3|ENCODE_XML(LocalizedText) {
  588|      3|    const UA_LocalizedText *src = (const UA_LocalizedText*)src_;
  589|       |    /* Same rule as in encodeXmlStructure: an absent (NULL) String is skipped
  590|       |     * so it does not come back as an empty String on decoding. An
  591|       |     * empty-but-present String is still written. */
  592|      3|    UA_StatusCode ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      3|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  593|      3|    if(src->locale.data)
  ------------------
  |  Branch (593:8): [True: 0, False: 3]
  ------------------
  594|      0|        ret |= writeXmlElement(ctx, UA_XML_LOCALIZEDTEXT_LOCALE,
  ------------------
  |  |  249|      0|#define UA_XML_LOCALIZEDTEXT_LOCALE "Locale"
  ------------------
  595|      0|                               &src->locale, &UA_TYPES[UA_TYPES_STRING]);
  ------------------
  |  |  402|      0|#define UA_TYPES_STRING 11
  ------------------
  596|      3|    if(src->text.data)
  ------------------
  |  Branch (596:8): [True: 0, False: 3]
  ------------------
  597|      0|        ret |= writeXmlElement(ctx, UA_XML_LOCALIZEDTEXT_TEXT,
  ------------------
  |  |  250|      0|#define UA_XML_LOCALIZEDTEXT_TEXT "Text"
  ------------------
  598|      0|                               &src->text, &UA_TYPES[UA_TYPES_STRING]);
  ------------------
  |  |  402|      0|#define UA_TYPES_STRING 11
  ------------------
  599|      3|    return ret;
  600|      3|}
ua_types_encoding_xml.c:ExtensionObject_encodeXml:
  603|    219|ENCODE_XML(ExtensionObject) {
  604|    219|    const UA_ExtensionObject *src = (const UA_ExtensionObject*)src_;
  605|    219|    if(src->encoding == UA_EXTENSIONOBJECT_ENCODED_NOBODY)
  ------------------
  |  Branch (605:8): [True: 3, False: 216]
  ------------------
  606|      3|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      3|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  607|    216|    if(src->encoding == UA_EXTENSIONOBJECT_ENCODED_JSON)
  ------------------
  |  Branch (607:8): [True: 0, False: 216]
  ------------------
  608|      0|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
  609|       |
  610|       |    /* The body of the ExtensionObject contains a single element
  611|       |     * which is either a ByteString or XML encoded Structure:
  612|       |     * https://reference.opcfoundation.org/Core/Part6/v104/docs/5.3.1.16. */
  613|    216|    UA_StatusCode ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    216|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  614|    216|    if(src->encoding == UA_EXTENSIONOBJECT_ENCODED_BYTESTRING ||
  ------------------
  |  Branch (614:8): [True: 0, False: 216]
  ------------------
  615|    216|       src->encoding == UA_EXTENSIONOBJECT_ENCODED_XML) {
  ------------------
  |  Branch (615:8): [True: 0, False: 216]
  ------------------
  616|       |        /* Write the type NodeId */
  617|      0|        ret = writeXmlElement(ctx, UA_XML_EXTENSIONOBJECT_TYPEID,
  ------------------
  |  |  251|      0|#define UA_XML_EXTENSIONOBJECT_TYPEID "TypeId"
  ------------------
  618|      0|                              &src->content.encoded.typeId,
  619|      0|                              &UA_TYPES[UA_TYPES_NODEID]);
  ------------------
  |  |  572|      0|#define UA_TYPES_NODEID 16
  ------------------
  620|       |
  621|       |        /* Write the body */
  622|      0|        ret |= writeXmlElemNameBegin(ctx, UA_XML_EXTENSIONOBJECT_BODY);
  ------------------
  |  |  252|      0|#define UA_XML_EXTENSIONOBJECT_BODY "Body"
  ------------------
  623|      0|        if(src->encoding == UA_EXTENSIONOBJECT_ENCODED_BYTESTRING)
  ------------------
  |  Branch (623:12): [True: 0, False: 0]
  ------------------
  624|      0|           ret |= writeXmlElement(ctx, "ByteString", &src->content.encoded.body,
  625|      0|                                  &UA_TYPES[UA_TYPES_BYTESTRING]);
  ------------------
  |  |  504|      0|#define UA_TYPES_BYTESTRING 14
  ------------------
  626|      0|        else
  627|       |            /* An XML encoded body is markup already, it goes out as it is */
  628|      0|            ret |= ENCODE_DIRECT_XML(&src->content.encoded.body, XmlElement);
  ------------------
  |  |  264|      0|    TYPE##_encodeXml(ctx, (const UA_##TYPE*)SRC, NULL)
  ------------------
  629|      0|        ret |= writeXmlElemNameEnd(ctx, UA_XML_EXTENSIONOBJECT_BODY);
  ------------------
  |  |  252|      0|#define UA_XML_EXTENSIONOBJECT_BODY "Body"
  ------------------
  630|    216|    } else {
  631|       |        /* Write the decoded value */
  632|    216|        const UA_DataType *decoded_type = src->content.decoded.type;
  633|       |
  634|       |        /* Write the type NodeId */
  635|    216|        ret = writeXmlElement(ctx, UA_XML_EXTENSIONOBJECT_TYPEID,
  ------------------
  |  |  251|    216|#define UA_XML_EXTENSIONOBJECT_TYPEID "TypeId"
  ------------------
  636|    216|                              &decoded_type->typeId, &UA_TYPES[UA_TYPES_NODEID]);
  ------------------
  |  |  572|    216|#define UA_TYPES_NODEID 16
  ------------------
  637|       |
  638|       |        /* Write the body */
  639|    216|        ret |= writeXmlElemNameBegin(ctx, UA_XML_EXTENSIONOBJECT_BODY);
  ------------------
  |  |  252|    216|#define UA_XML_EXTENSIONOBJECT_BODY "Body"
  ------------------
  640|    216|        ret |= writeXmlElement(ctx, decoded_type->typeName, src->content.decoded.data, decoded_type);
  641|    216|        ret |= writeXmlElemNameEnd(ctx, UA_XML_EXTENSIONOBJECT_BODY);
  ------------------
  |  |  252|    216|#define UA_XML_EXTENSIONOBJECT_BODY "Body"
  ------------------
  642|    216|    }
  643|       |
  644|    216|    return ret;
  645|    216|}
ua_types_encoding_xml.c:writeXmlElemNameBegin:
  312|  14.9k|writeXmlElemNameBegin(CtxXml *ctx, const char* name) {
  313|  14.9k|    if(ctx->depth >= UA_XML_ENCODING_MAX_RECURSION - 1)
  ------------------
  |  |   15|  14.9k|#define UA_XML_ENCODING_MAX_RECURSION 100
  ------------------
  |  Branch (313:8): [True: 0, False: 14.9k]
  ------------------
  314|      0|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
  315|  14.9k|    status ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  14.9k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  316|  14.9k|    ret |= xmlEncodeWriteChars(ctx, "<", 1);
  317|  14.9k|    ret |= xmlEncodeWriteChars(ctx, name, strlen(name));
  318|  14.9k|    ret |= xmlEncodeWriteChars(ctx, ">", 1);
  319|  14.9k|    ctx->depth++;
  320|  14.9k|    return ret;
  321|  14.9k|}
ua_types_encoding_xml.c:writeXmlElemNameEnd:
  324|  14.9k|writeXmlElemNameEnd(CtxXml *ctx, const char* name) {
  325|  14.9k|    if(ctx->depth == 0)
  ------------------
  |  Branch (325:8): [True: 0, False: 14.9k]
  ------------------
  326|      0|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
  327|  14.9k|    ctx->depth--;
  328|  14.9k|    status ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  14.9k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  329|  14.9k|    ret |= xmlEncodeWriteChars(ctx, "</", 2);
  330|  14.9k|    ret |= xmlEncodeWriteChars(ctx, name, strlen(name));
  331|  14.9k|    ret |= xmlEncodeWriteChars(ctx, ">", 1);
  332|  14.9k|    return ret;
  333|  14.9k|}
ua_types_encoding_xml.c:DataValue_encodeXml:
  767|      3|ENCODE_XML(DataValue) {
  768|      3|    const UA_DataValue *src = (const UA_DataValue*)src_;
  769|      3|    UA_StatusCode ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      3|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  770|      3|    if(src->hasValue)
  ------------------
  |  Branch (770:8): [True: 0, False: 3]
  ------------------
  771|      0|        ret |= Variant_encodeXml(ctx, &src->value, &UA_TYPES[UA_TYPES_VARIANT]);
  ------------------
  |  |  810|      0|#define UA_TYPES_VARIANT 23
  ------------------
  772|      3|    if(src->hasStatus)
  ------------------
  |  Branch (772:8): [True: 0, False: 3]
  ------------------
  773|      0|        ret |= writeXmlElement(ctx, "StatusCode", &src->status,
  774|      0|                               &UA_TYPES[UA_TYPES_STATUSCODE]);
  ------------------
  |  |  640|      0|#define UA_TYPES_STATUSCODE 18
  ------------------
  775|      3|    if(src->hasSourceTimestamp)
  ------------------
  |  Branch (775:8): [True: 0, False: 3]
  ------------------
  776|      0|        ret |= writeXmlElement(ctx, "SourceTimestamp", &src->sourceTimestamp,
  777|      0|                               &UA_TYPES[UA_TYPES_DATETIME]);
  ------------------
  |  |  436|      0|#define UA_TYPES_DATETIME 12
  ------------------
  778|      3|    if(src->hasSourcePicoseconds)
  ------------------
  |  Branch (778:8): [True: 0, False: 3]
  ------------------
  779|      0|        ret |= writeXmlElement(ctx, "SourcePicoseconds", &src->sourcePicoseconds,
  780|      0|                               &UA_TYPES[UA_TYPES_UINT16]);
  ------------------
  |  |  164|      0|#define UA_TYPES_UINT16 4
  ------------------
  781|      3|    if(src->hasServerTimestamp)
  ------------------
  |  Branch (781:8): [True: 0, False: 3]
  ------------------
  782|      0|        ret |= writeXmlElement(ctx, "ServerTimestamp", &src->serverTimestamp,
  783|      0|                               &UA_TYPES[UA_TYPES_DATETIME]);
  ------------------
  |  |  436|      0|#define UA_TYPES_DATETIME 12
  ------------------
  784|      3|    if(src->hasServerPicoseconds)
  ------------------
  |  Branch (784:8): [True: 0, False: 3]
  ------------------
  785|      0|        ret |= writeXmlElement(ctx, "ServerPicoseconds", &src->serverPicoseconds,
  786|      0|                               &UA_TYPES[UA_TYPES_UINT16]);
  ------------------
  |  |  164|      0|#define UA_TYPES_UINT16 4
  ------------------
  787|      3|    return ret;
  788|      3|}
ua_types_encoding_xml.c:Variant_encodeXml:
  734|  4.72k|ENCODE_XML(Variant) {
  735|  4.72k|    const UA_Variant *src = (const UA_Variant*)src_;
  736|  4.72k|    if(!src->type)
  ------------------
  |  Branch (736:8): [True: 51, False: 4.67k]
  ------------------
  737|     51|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|     51|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
  738|       |
  739|       |    /* Set the array type in the encoding mask */
  740|  4.67k|    const bool isArray = src->arrayLength > 0 || src->data <= UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|  9.35k|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  |  Branch (740:26): [True: 0, False: 4.67k]
  |  Branch (740:50): [True: 15, False: 4.66k]
  ------------------
  741|       |
  742|  4.67k|    if(src->arrayDimensionsSize > 1)
  ------------------
  |  Branch (742:8): [True: 0, False: 4.67k]
  ------------------
  743|      0|        return UA_STATUSCODE_BADNOTIMPLEMENTED;
  ------------------
  |  |  239|      0|#define UA_STATUSCODE_BADNOTIMPLEMENTED ((UA_StatusCode) 0x80400000)
  ------------------
  744|       |
  745|  4.67k|    UA_StatusCode ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  4.67k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  746|  4.67k|    ret |= writeXmlElemNameBegin(ctx, UA_XML_VARIANT_VALUE);
  ------------------
  |  |  254|  4.67k|#define UA_XML_VARIANT_VALUE "Value"
  ------------------
  747|  4.67k|    if(!isArray) {
  ------------------
  |  Branch (747:8): [True: 4.66k, False: 15]
  ------------------
  748|  4.66k|        const UA_DataType *srctype = src->type;
  749|  4.66k|        void *ptr = src->data;
  750|  4.66k|        UA_ExtensionObject eo;
  751|  4.66k|        if(srctype->typeKind == UA_DATATYPEKIND_ENUM) {
  ------------------
  |  Branch (751:12): [True: 0, False: 4.66k]
  ------------------
  752|      0|            srctype = &UA_TYPES[UA_TYPES_INT32];
  ------------------
  |  |  198|      0|#define UA_TYPES_INT32 5
  ------------------
  753|  4.66k|        } else if(srctype->typeKind > UA_DATATYPEKIND_DIAGNOSTICINFO) {
  ------------------
  |  Branch (753:19): [True: 216, False: 4.44k]
  ------------------
  754|       |            /* Wrap value in an ExtensionObject */
  755|    216|            UA_ExtensionObject_setValue(&eo, (void*)(uintptr_t)ptr, srctype);
  756|    216|            ptr = &eo;
  757|    216|            srctype = &UA_TYPES[UA_TYPES_EXTENSIONOBJECT];
  ------------------
  |  |  742|    216|#define UA_TYPES_EXTENSIONOBJECT 21
  ------------------
  758|    216|        }
  759|  4.66k|        ret |= writeXmlElement(ctx, srctype->typeName, ptr, srctype);
  760|  4.66k|    } else {
  761|     15|        ret |= Array_encodeXml(ctx, src->data, src->arrayLength, src->type);
  762|     15|    }
  763|  4.67k|    ret |= writeXmlElemNameEnd(ctx, UA_XML_VARIANT_VALUE);
  ------------------
  |  |  254|  4.67k|#define UA_XML_VARIANT_VALUE "Value"
  ------------------
  764|  4.67k|    return ret;
  765|  4.67k|}
ua_types_encoding_xml.c:Array_encodeXml:
  649|     15|                const UA_DataType *type) {
  650|     15|    char arrName[128];
  651|     15|    UA_ExtensionObject eo;
  652|       |
  653|     15|    if(type->typeKind == UA_DATATYPEKIND_ENUM)
  ------------------
  |  Branch (653:8): [True: 0, False: 15]
  ------------------
  654|      0|        type = &UA_TYPES[UA_TYPES_INT32];
  ------------------
  |  |  198|      0|#define UA_TYPES_INT32 5
  ------------------
  655|     15|    UA_Boolean wrapEO = (type->typeKind > UA_DATATYPEKIND_DIAGNOSTICINFO);
  656|     15|    if(wrapEO) {
  ------------------
  |  Branch (656:8): [True: 0, False: 15]
  ------------------
  657|      0|        UA_ExtensionObject_setValue(&eo, (void*)(uintptr_t)ptr, type);
  658|      0|        type = &UA_TYPES[UA_TYPES_EXTENSIONOBJECT];
  ------------------
  |  |  742|      0|#define UA_TYPES_EXTENSIONOBJECT 21
  ------------------
  659|      0|    }
  660|       |
  661|     15|    size_t arrNameLen = strlen("ListOf") + strlen(type->typeName);
  662|     15|    if(arrNameLen >= 128)
  ------------------
  |  Branch (662:8): [True: 0, False: 15]
  ------------------
  663|      0|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
  664|     15|    memcpy(arrName, "ListOf", strlen("ListOf"));
  665|     15|    memcpy(arrName + strlen("ListOf"), type->typeName, strlen(type->typeName));
  666|     15|    arrName[arrNameLen] = '\0';
  667|       |
  668|     15|    uintptr_t uptr = (uintptr_t)ptr;
  669|     15|    status ret = writeXmlElemNameBegin(ctx, arrName);
  670|     15|    for(size_t i = 0; i < length && ret == UA_STATUSCODE_GOOD; ++i) {
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (670:23): [True: 0, False: 15]
  |  Branch (670:37): [True: 0, False: 0]
  ------------------
  671|      0|        if(!wrapEO) {
  ------------------
  |  Branch (671:12): [True: 0, False: 0]
  ------------------
  672|      0|            ret |= writeXmlElement(ctx, type->typeName, (const void*)uptr, type);
  673|      0|        } else {
  674|      0|            eo.content.decoded.data = (void*)uptr;
  675|      0|            ret |= writeXmlElement(ctx, type->typeName, &eo, type);
  676|      0|        }
  677|      0|        uptr += type->memSize;
  678|      0|    }
  679|     15|    ret |= writeXmlElemNameEnd(ctx, arrName);
  680|     15|    return ret;
  681|     15|}
ua_types_encoding_xml.c:DiagnosticInfo_encodeXml:
  790|      3|ENCODE_XML(DiagnosticInfo) {
  791|      3|    const UA_DiagnosticInfo *src = (const UA_DiagnosticInfo*)src_;
  792|      3|    UA_StatusCode ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      3|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  793|      3|    if(src->hasSymbolicId)
  ------------------
  |  Branch (793:8): [True: 0, False: 3]
  ------------------
  794|      0|        ret |= writeXmlElement(ctx, "SymbolicId", &src->symbolicId,
  795|      0|                               &UA_TYPES[UA_TYPES_INT32]);
  ------------------
  |  |  198|      0|#define UA_TYPES_INT32 5
  ------------------
  796|      3|    if(src->hasNamespaceUri)
  ------------------
  |  Branch (796:8): [True: 0, False: 3]
  ------------------
  797|      0|        ret |= writeXmlElement(ctx, "NamespaceUri", &src->namespaceUri,
  798|      0|                               &UA_TYPES[UA_TYPES_INT32]);
  ------------------
  |  |  198|      0|#define UA_TYPES_INT32 5
  ------------------
  799|      3|    if(src->hasLocalizedText)
  ------------------
  |  Branch (799:8): [True: 0, False: 3]
  ------------------
  800|      0|        ret |= writeXmlElement(ctx, "LocalizedText", &src->localizedText,
  801|      0|                               &UA_TYPES[UA_TYPES_INT32]);
  ------------------
  |  |  198|      0|#define UA_TYPES_INT32 5
  ------------------
  802|      3|    if(src->hasLocale)
  ------------------
  |  Branch (802:8): [True: 0, False: 3]
  ------------------
  803|      0|        ret |= writeXmlElement(ctx, "Locale", &src->locale,
  804|      0|                               &UA_TYPES[UA_TYPES_INT32]);
  ------------------
  |  |  198|      0|#define UA_TYPES_INT32 5
  ------------------
  805|      3|    if(src->hasAdditionalInfo)
  ------------------
  |  Branch (805:8): [True: 0, False: 3]
  ------------------
  806|      0|        ret |= writeXmlElement(ctx, "AdditionalInfo", &src->additionalInfo,
  807|      0|                               &UA_TYPES[UA_TYPES_STRING]);
  ------------------
  |  |  402|      0|#define UA_TYPES_STRING 11
  ------------------
  808|      3|    if(src->hasInnerStatusCode)
  ------------------
  |  Branch (808:8): [True: 0, False: 3]
  ------------------
  809|      0|        ret |= writeXmlElement(ctx, "InnerStatusCode", &src->innerStatusCode,
  810|      0|                               &UA_TYPES[UA_TYPES_STATUSCODE]);
  ------------------
  |  |  640|      0|#define UA_TYPES_STATUSCODE 18
  ------------------
  811|      3|    if(src->hasInnerDiagnosticInfo) {
  ------------------
  |  Branch (811:8): [True: 0, False: 3]
  ------------------
  812|      0|        if(!src->innerDiagnosticInfo)
  ------------------
  |  Branch (812:12): [True: 0, False: 0]
  ------------------
  813|      0|            return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
  814|      0|        ret |= writeXmlElement(ctx, "InnerDiagnosticInfo", src->innerDiagnosticInfo,
  815|      0|                               &UA_TYPES[UA_TYPES_DIAGNOSTICINFO]);
  ------------------
  |  |  844|      0|#define UA_TYPES_DIAGNOSTICINFO 24
  ------------------
  816|      0|    }
  817|      3|    return ret;
  818|      3|}
ua_types_encoding_xml.c:encodeXmlStructure:
  691|    216|encodeXmlStructure(CtxXml *ctx, const void *src, const UA_DataType *type) {
  692|    216|    uintptr_t ptr = (uintptr_t)src;
  693|    216|    UA_StatusCode ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    216|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  694|  1.36k|    for(size_t i = 0; i < type->membersSize && ret == UA_STATUSCODE_GOOD; i++) {
  ------------------
  |  |   17|  1.14k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (694:23): [True: 1.14k, False: 216]
  |  Branch (694:48): [True: 1.14k, False: 0]
  ------------------
  695|  1.14k|        const UA_DataTypeMember *m = &type->members[i];
  696|  1.14k|        const UA_DataType *mt = m->memberType;
  697|  1.14k|        ptr += m->padding;
  698|       |
  699|  1.14k|        if(m->isArray) {
  ------------------
  |  Branch (699:12): [True: 195, False: 951]
  ------------------
  700|    195|            size_t length = *(const size_t*)ptr;
  701|    195|            ptr += sizeof(size_t);
  702|    195|            const void *data = *(void* const*)ptr;
  703|    195|            ptr += sizeof(void*);
  704|    195|            if(m->isOptional && !data)
  ------------------
  |  Branch (704:16): [True: 0, False: 195]
  |  Branch (704:33): [True: 0, False: 0]
  ------------------
  705|      0|                continue;
  706|    195|            if(!m->isOptional && length == 0 && !data)
  ------------------
  |  Branch (706:16): [True: 195, False: 0]
  |  Branch (706:34): [True: 195, False: 0]
  |  Branch (706:49): [True: 195, False: 0]
  ------------------
  707|    195|                continue;
  708|      0|            ret |= writeXmlElemNameBegin(ctx, m->memberName);
  709|      0|            uintptr_t elem = (uintptr_t)data;
  710|      0|            for(size_t j = 0; j < length && ret == UA_STATUSCODE_GOOD; j++) {
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (710:31): [True: 0, False: 0]
  |  Branch (710:45): [True: 0, False: 0]
  ------------------
  711|      0|                ret |= writeXmlElement(ctx, mt->typeName, (const void*)elem, mt);
  712|      0|                elem += mt->memSize;
  713|      0|            }
  714|      0|            ret |= writeXmlElemNameEnd(ctx, m->memberName);
  715|      0|            continue;
  716|    195|        }
  717|       |
  718|    951|        const void *value = (const void*)ptr;
  719|    951|        if(m->isOptional) {
  ------------------
  |  Branch (719:12): [True: 0, False: 951]
  ------------------
  720|      0|            value = *(void* const*)ptr;
  721|      0|            ptr += sizeof(void*);
  722|      0|            if(!value)
  ------------------
  |  Branch (722:16): [True: 0, False: 0]
  ------------------
  723|      0|                continue;
  724|    951|        } else {
  725|    951|            ptr += mt->memSize;
  726|    951|            if(isDefaultValue(value, mt))
  ------------------
  |  Branch (726:16): [True: 951, False: 0]
  ------------------
  727|    951|                continue;
  728|    951|        }
  729|      0|        ret |= writeXmlElement(ctx, m->memberName, value, mt);
  730|      0|    }
  731|    216|    return ret;
  732|    216|}
ua_types_encoding_xml.c:isDefaultValue:
  684|    951|isDefaultValue(const void *value, const UA_DataType *type) {
  685|    951|    UA_STACKARRAY(UA_Byte, defaultValue, type->memSize);
  ------------------
  |  |  375|    951|#  define UA_STACKARRAY(TYPE, NAME, SIZE) TYPE NAME[SIZE]
  ------------------
  686|    951|    memset(defaultValue, 0, type->memSize);
  687|    951|    return UA_equal(value, defaultValue, type);
  688|    951|}
ua_types_encoding_xml.c:writeXmlElement:
  337|  10.0k|                const void *value, const UA_DataType *type) {
  338|  10.0k|    status ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  10.0k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  339|  10.0k|    ret |= writeXmlElemNameBegin(ctx, name);
  340|  10.0k|    ret |= encodeXmlJumpTable[type->typeKind](ctx, value, type);
  341|  10.0k|    ret |= writeXmlElemNameEnd(ctx, name);
  342|  10.0k|    return ret;
  343|  10.0k|}
ua_types_encoding_xml.c:Boolean_decodeXml:
  959|     61|DECODE_XML(Boolean) {
  960|     61|    UA_Boolean *dst = (UA_Boolean*)dst_;
  961|     61|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  941|     61|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (941:8): [True: 0, False: 61]
  |  |  ------------------
  |  |  942|     61|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  943|     61|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (943:18): [Folded, False: 61]
  |  |  ------------------
  ------------------
  962|     61|    GET_ELEM_CONTENT;
  ------------------
  |  |  946|     61|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  947|     61|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  948|     61|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (948:17): [Folded, False: 61]
  |  |  ------------------
  ------------------
  963|     61|    skipXmlObject(ctx);
  964|       |
  965|     61|    if(length == 4 &&
  ------------------
  |  Branch (965:8): [True: 8, False: 53]
  ------------------
  966|      8|       data[0] == 't' && data[1] == 'r' &&
  ------------------
  |  Branch (966:8): [True: 7, False: 1]
  |  Branch (966:26): [True: 5, False: 2]
  ------------------
  967|      5|       data[2] == 'u' && data[3] == 'e') {
  ------------------
  |  Branch (967:8): [True: 3, False: 2]
  |  Branch (967:26): [True: 2, False: 1]
  ------------------
  968|      2|        *dst = true;
  969|     59|    } else if(length == 5 &&
  ------------------
  |  Branch (969:15): [True: 9, False: 50]
  ------------------
  970|      9|              data[0] == 'f' && data[1] == 'a' &&
  ------------------
  |  Branch (970:15): [True: 6, False: 3]
  |  Branch (970:33): [True: 5, False: 1]
  ------------------
  971|      5|              data[2] == 'l' && data[3] == 's' &&
  ------------------
  |  Branch (971:15): [True: 4, False: 1]
  |  Branch (971:33): [True: 3, False: 1]
  ------------------
  972|      3|              data[4] == 'e') {
  ------------------
  |  Branch (972:15): [True: 2, False: 1]
  ------------------
  973|      2|        *dst = false;
  974|     57|    } else {
  975|     57|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     57|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  976|     57|    }
  977|       |
  978|      4|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      4|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  979|     61|}
ua_types_encoding_xml.c:skipXmlObject:
  951|  4.29k|skipXmlObject(ParseCtxXml *ctx) {
  952|  4.29k|    size_t end_parent = ctx->tokens[ctx->index].end;
  953|  4.77M|    while(ctx->index < ctx->tokensSize &&
  ------------------
  |  Branch (953:11): [True: 4.77M, False: 4.19k]
  ------------------
  954|  4.77M|          ctx->tokens[ctx->index].end <= end_parent) {
  ------------------
  |  Branch (954:11): [True: 4.77M, False: 98]
  ------------------
  955|  4.77M|        ctx->index++;
  956|  4.77M|    }
  957|  4.29k|}
ua_types_encoding_xml.c:SByte_decodeXml:
 1017|    202|DECODE_XML(SByte) {
 1018|    202|    UA_SByte *dst = (UA_SByte*)dst_;
 1019|    202|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  941|    202|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (941:8): [True: 0, False: 202]
  |  |  ------------------
  |  |  942|    202|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  943|    202|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (943:18): [Folded, False: 202]
  |  |  ------------------
  ------------------
 1020|    202|    GET_ELEM_CONTENT;
  ------------------
  |  |  946|    202|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  947|    202|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  948|    202|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (948:17): [Folded, False: 202]
  |  |  ------------------
  ------------------
 1021|    202|    skipXmlObject(ctx);
 1022|       |
 1023|    202|    UA_Int64 out = 0;
 1024|    202|    UA_StatusCode s = decodeSigned(data, length, &out);
 1025|    202|    if(s != UA_STATUSCODE_GOOD || out < UA_SBYTE_MIN || out > UA_SBYTE_MAX)
  ------------------
  |  |   17|    404|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out < UA_SBYTE_MIN || out > UA_SBYTE_MAX)
  ------------------
  |  |   64|    328|#define UA_SBYTE_MIN (-128)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out < UA_SBYTE_MIN || out > UA_SBYTE_MAX)
  ------------------
  |  |   65|    106|#define UA_SBYTE_MAX 127
  ------------------
  |  Branch (1025:8): [True: 76, False: 126]
  |  Branch (1025:35): [True: 20, False: 106]
  |  Branch (1025:57): [True: 62, False: 44]
  ------------------
 1026|    158|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    158|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1027|       |
 1028|     44|    *dst = (UA_SByte)out;
 1029|     44|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     44|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1030|    202|}
ua_types_encoding_xml.c:decodeSigned:
  982|  1.24k|decodeSigned(const UA_Byte *data, size_t dataSize, UA_Int64 *dst) {
  983|  1.24k|    if(!data || dataSize == 0)
  ------------------
  |  Branch (983:8): [True: 45, False: 1.20k]
  |  Branch (983:17): [True: 0, False: 1.20k]
  ------------------
  984|     45|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     45|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  985|  1.20k|    size_t len = parseInt64((const char*)data, dataSize, dst);
  986|  1.20k|    if(len == 0)
  ------------------
  |  Branch (986:8): [True: 150, False: 1.05k]
  ------------------
  987|    150|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    150|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  988|       |
  989|       |    /* There must only be whitespace between the end of the parsed number and
  990|       |     * the end of the XML section */
  991|  3.65k|    for(size_t i = len; i < dataSize; i++) {
  ------------------
  |  Branch (991:25): [True: 2.69k, False: 964]
  ------------------
  992|  2.69k|        if(data[i] != ' ' && data[i] - '\t' >= 5)
  ------------------
  |  Branch (992:12): [True: 1.71k, False: 976]
  |  Branch (992:30): [True: 89, False: 1.62k]
  ------------------
  993|     89|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     89|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  994|  2.69k|    }
  995|       |
  996|    964|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    964|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  997|  1.05k|}
ua_types_encoding_xml.c:Byte_decodeXml:
 1032|    207|DECODE_XML(Byte) {
 1033|    207|    UA_Byte *dst = (UA_Byte*)dst_;
 1034|    207|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  941|    207|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (941:8): [True: 0, False: 207]
  |  |  ------------------
  |  |  942|    207|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  943|    207|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (943:18): [Folded, False: 207]
  |  |  ------------------
  ------------------
 1035|    207|    GET_ELEM_CONTENT;
  ------------------
  |  |  946|    207|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  947|    207|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  948|    207|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (948:17): [Folded, False: 207]
  |  |  ------------------
  ------------------
 1036|    207|    skipXmlObject(ctx);
 1037|       |
 1038|    207|    UA_UInt64 out = 0;
 1039|    207|    UA_StatusCode s = decodeUnsigned(data, length, &out);
 1040|    207|    if(s != UA_STATUSCODE_GOOD || out > UA_BYTE_MAX)
  ------------------
  |  |   17|    414|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out > UA_BYTE_MAX)
  ------------------
  |  |   74|    147|#define UA_BYTE_MAX 255
  ------------------
  |  Branch (1040:8): [True: 60, False: 147]
  |  Branch (1040:35): [True: 111, False: 36]
  ------------------
 1041|    171|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    171|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1042|       |
 1043|     36|    *dst = (UA_Byte)out;
 1044|     36|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     36|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1045|    207|}
ua_types_encoding_xml.c:decodeUnsigned:
 1000|    595|decodeUnsigned(const UA_Byte *data, size_t dataSize, UA_UInt64 *dst) {
 1001|    595|    if(!data || dataSize == 0)
  ------------------
  |  Branch (1001:8): [True: 32, False: 563]
  |  Branch (1001:17): [True: 0, False: 563]
  ------------------
 1002|     32|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     32|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1003|    563|    size_t len = parseUInt64((const char*)data, dataSize, dst);
 1004|    563|    if(len == 0)
  ------------------
  |  Branch (1004:8): [True: 62, False: 501]
  ------------------
 1005|     62|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     62|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1006|       |
 1007|       |    /* There must only be whitespace between the end of the parsed number and
 1008|       |     * the end of the XML section */
 1009|  1.81k|    for(size_t i = len; i < dataSize; i++) {
  ------------------
  |  Branch (1009:25): [True: 1.42k, False: 389]
  ------------------
 1010|  1.42k|        if(data[i] != ' ' && data[i] - '\t' >= 5)
  ------------------
  |  Branch (1010:12): [True: 902, False: 521]
  |  Branch (1010:30): [True: 112, False: 790]
  ------------------
 1011|    112|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    112|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1012|  1.42k|    }
 1013|       |
 1014|    389|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    389|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1015|    501|}
ua_types_encoding_xml.c:Int16_decodeXml:
 1047|    223|DECODE_XML(Int16) {
 1048|    223|    UA_Int16 *dst = (UA_Int16*)dst_;
 1049|    223|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  941|    223|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (941:8): [True: 0, False: 223]
  |  |  ------------------
  |  |  942|    223|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  943|    223|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (943:18): [Folded, False: 223]
  |  |  ------------------
  ------------------
 1050|    223|    GET_ELEM_CONTENT;
  ------------------
  |  |  946|    223|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  947|    223|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  948|    223|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (948:17): [Folded, False: 223]
  |  |  ------------------
  ------------------
 1051|    223|    skipXmlObject(ctx);
 1052|       |
 1053|    223|    UA_Int64 out = 0;
 1054|    223|    UA_StatusCode s = decodeSigned(data, length, &out);
 1055|    223|    if(s != UA_STATUSCODE_GOOD || out < UA_INT16_MIN || out > UA_INT16_MAX)
  ------------------
  |  |   17|    446|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out < UA_INT16_MIN || out > UA_INT16_MAX)
  ------------------
  |  |   82|    399|#define UA_INT16_MIN (-32768)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out < UA_INT16_MIN || out > UA_INT16_MAX)
  ------------------
  |  |   83|    144|#define UA_INT16_MAX 32767
  ------------------
  |  Branch (1055:8): [True: 47, False: 176]
  |  Branch (1055:35): [True: 32, False: 144]
  |  Branch (1055:57): [True: 40, False: 104]
  ------------------
 1056|    119|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    119|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1057|       |
 1058|    104|    *dst = (UA_Int16)out;
 1059|    104|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    104|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1060|    223|}
ua_types_encoding_xml.c:UInt16_decodeXml:
 1062|    154|DECODE_XML(UInt16) {
 1063|    154|    UA_UInt16 *dst = (UA_UInt16*)dst_;
 1064|    154|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  941|    154|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (941:8): [True: 0, False: 154]
  |  |  ------------------
  |  |  942|    154|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  943|    154|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (943:18): [Folded, False: 154]
  |  |  ------------------
  ------------------
 1065|    154|    GET_ELEM_CONTENT;
  ------------------
  |  |  946|    154|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  947|    154|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  948|    154|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (948:17): [Folded, False: 154]
  |  |  ------------------
  ------------------
 1066|    154|    skipXmlObject(ctx);
 1067|       |
 1068|    154|    UA_UInt64 out = 0;
 1069|    154|    UA_StatusCode s = decodeUnsigned(data, length, &out);
 1070|    154|    if(s != UA_STATUSCODE_GOOD || out > UA_UINT16_MAX)
  ------------------
  |  |   17|    308|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out > UA_UINT16_MAX)
  ------------------
  |  |   92|     98|#define UA_UINT16_MAX 65535
  ------------------
  |  Branch (1070:8): [True: 56, False: 98]
  |  Branch (1070:35): [True: 59, False: 39]
  ------------------
 1071|    115|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    115|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1072|       |
 1073|     39|    *dst = (UA_UInt16)out;
 1074|     39|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     39|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1075|    154|}
ua_types_encoding_xml.c:Int32_decodeXml:
 1077|    320|DECODE_XML(Int32) {
 1078|    320|    UA_Int32 *dst = (UA_Int32*)dst_;
 1079|    320|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  941|    320|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (941:8): [True: 0, False: 320]
  |  |  ------------------
  |  |  942|    320|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  943|    320|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (943:18): [Folded, False: 320]
  |  |  ------------------
  ------------------
 1080|    320|    GET_ELEM_CONTENT;
  ------------------
  |  |  946|    320|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  947|    320|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  948|    320|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (948:17): [Folded, False: 320]
  |  |  ------------------
  ------------------
 1081|    320|    skipXmlObject(ctx);
 1082|       |
 1083|    320|    UA_Int64 out = 0;
 1084|    320|    UA_StatusCode s = decodeSigned(data, length, &out);
 1085|    320|    if(s != UA_STATUSCODE_GOOD || out < UA_INT32_MIN || out > UA_INT32_MAX)
  ------------------
  |  |   17|    640|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out < UA_INT32_MIN || out > UA_INT32_MAX)
  ------------------
  |  |  100|    576|#define UA_INT32_MIN ((int32_t)-2147483648LL)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out < UA_INT32_MIN || out > UA_INT32_MAX)
  ------------------
  |  |  101|    202|#define UA_INT32_MAX 2147483647L
  ------------------
  |  Branch (1085:8): [True: 64, False: 256]
  |  Branch (1085:35): [True: 54, False: 202]
  |  Branch (1085:57): [True: 6, False: 196]
  ------------------
 1086|    124|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    124|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1087|       |
 1088|    196|    *dst = (UA_Int32)out;
 1089|    196|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    196|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1090|    320|}
ua_types_encoding_xml.c:UInt32_decodeXml:
 1125|    151|DECODE_XML(UInt32) {
 1126|    151|    UA_UInt32 *dst = (UA_UInt32*)dst_;
 1127|    151|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  941|    151|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (941:8): [True: 0, False: 151]
  |  |  ------------------
  |  |  942|    151|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  943|    151|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (943:18): [Folded, False: 151]
  |  |  ------------------
  ------------------
 1128|    151|    GET_ELEM_CONTENT;
  ------------------
  |  |  946|    151|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  947|    151|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  948|    151|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (948:17): [Folded, False: 151]
  |  |  ------------------
  ------------------
 1129|    151|    skipXmlObject(ctx);
 1130|       |
 1131|    151|    UA_UInt64 out = 0;
 1132|    151|    UA_StatusCode s = decodeUnsigned(data, length, &out);
 1133|    151|    if(s != UA_STATUSCODE_GOOD || out > UA_UINT32_MAX)
  ------------------
  |  |   17|    302|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out > UA_UINT32_MAX)
  ------------------
  |  |  110|    106|#define UA_UINT32_MAX 4294967295UL
  ------------------
  |  Branch (1133:8): [True: 45, False: 106]
  |  Branch (1133:35): [True: 2, False: 104]
  ------------------
 1134|     47|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     47|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1135|       |
 1136|    104|    *dst = (UA_UInt32)out;
 1137|    104|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    104|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1138|    151|}
ua_types_encoding_xml.c:Int64_decodeXml:
 1140|    480|DECODE_XML(Int64) {
 1141|    480|    UA_Int64 *dst = (UA_Int64*)dst_;
 1142|    480|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  941|    480|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (941:8): [True: 0, False: 480]
  |  |  ------------------
  |  |  942|    480|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  943|    480|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (943:18): [Folded, False: 480]
  |  |  ------------------
  ------------------
 1143|    480|    GET_ELEM_CONTENT;
  ------------------
  |  |  946|    480|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  947|    480|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  948|    480|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (948:17): [Folded, False: 480]
  |  |  ------------------
  ------------------
 1144|    480|    skipXmlObject(ctx);
 1145|       |
 1146|    480|    UA_Int64 out = 0;
 1147|    480|    UA_StatusCode s = decodeSigned(data, length, &out);
 1148|    480|    if(s != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    480|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1148:8): [True: 74, False: 406]
  ------------------
 1149|     74|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     74|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1150|       |
 1151|    406|    *dst = (UA_Int64)out;
 1152|    406|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    406|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1153|    480|}
ua_types_encoding_xml.c:UInt64_decodeXml:
 1155|     83|DECODE_XML(UInt64) {
 1156|     83|    UA_UInt64 *dst = (UA_UInt64*)dst_;
 1157|     83|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  941|     83|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (941:8): [True: 0, False: 83]
  |  |  ------------------
  |  |  942|     83|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  943|     83|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (943:18): [Folded, False: 83]
  |  |  ------------------
  ------------------
 1158|     83|    GET_ELEM_CONTENT;
  ------------------
  |  |  946|     83|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  947|     83|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  948|     83|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (948:17): [Folded, False: 83]
  |  |  ------------------
  ------------------
 1159|     83|    skipXmlObject(ctx);
 1160|       |
 1161|     83|    UA_UInt64 out = 0;
 1162|     83|    UA_StatusCode s = decodeUnsigned(data, length, &out);
 1163|     83|    if(s != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|     83|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1163:8): [True: 45, False: 38]
  ------------------
 1164|     45|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     45|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1165|       |
 1166|     38|    *dst = (UA_UInt64)out;
 1167|     38|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     38|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1168|     83|}
ua_types_encoding_xml.c:Float_decodeXml:
 1219|      1|DECODE_XML(Float) {
 1220|      1|    UA_Float *dst = (UA_Float*)dst_;
 1221|      1|    UA_Double v = 0.0;
 1222|       |    UA_StatusCode res = Double_decodeXml(ctx, &v, NULL);
 1223|      1|    *dst = (UA_Float)v;
 1224|      1|    return res;
 1225|      1|}
ua_types_encoding_xml.c:Double_decodeXml:
 1170|  1.13k|DECODE_XML(Double) {
 1171|  1.13k|    UA_Double *dst = (UA_Double*)dst_;
 1172|  1.13k|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  941|  1.13k|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (941:8): [True: 0, False: 1.13k]
  |  |  ------------------
  |  |  942|  1.13k|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  943|  1.13k|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (943:18): [Folded, False: 1.13k]
  |  |  ------------------
  ------------------
 1173|  1.13k|    GET_ELEM_CONTENT;
  ------------------
  |  |  946|  1.13k|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  947|  1.13k|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  948|  1.13k|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (948:17): [Folded, False: 1.13k]
  |  |  ------------------
  ------------------
 1174|  1.13k|    skipXmlObject(ctx);
 1175|       |
 1176|  1.13k|    if(!data || length == 0)
  ------------------
  |  Branch (1176:8): [True: 4, False: 1.13k]
  |  Branch (1176:17): [True: 0, False: 1.13k]
  ------------------
 1177|      4|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      4|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1178|       |
 1179|       |    /* https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/
 1180|       |     * Maximum digit counts for select IEEE floating-point formats: 1074
 1181|       |     * Sanity check. */
 1182|  1.13k|    if(length > 1075)
  ------------------
  |  Branch (1182:8): [True: 21, False: 1.11k]
  ------------------
 1183|     21|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     21|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1184|       |
 1185|  1.11k|    if(length == 3 && memcmp(data, "INF", 3) == 0) {
  ------------------
  |  Branch (1185:8): [True: 80, False: 1.03k]
  |  Branch (1185:23): [True: 4, False: 76]
  ------------------
 1186|      4|        *dst = INFINITY;
 1187|      4|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      4|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1188|      4|    }
 1189|       |
 1190|  1.11k|    if(length == 4 && memcmp(data, "-INF", 4) == 0) {
  ------------------
  |  Branch (1190:8): [True: 49, False: 1.06k]
  |  Branch (1190:23): [True: 3, False: 46]
  ------------------
 1191|      3|        *dst = -INFINITY;
 1192|      3|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      3|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1193|      3|    }
 1194|       |
 1195|  1.10k|    if(length == 3 && memcmp(data, "NaN", 3) == 0) {
  ------------------
  |  Branch (1195:8): [True: 76, False: 1.03k]
  |  Branch (1195:23): [True: 4, False: 72]
  ------------------
 1196|      4|        *dst = NAN;
 1197|      4|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      4|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1198|      4|    }
 1199|       |
 1200|  1.10k|    if(length == 3 && memcmp(data, "-NaN", 3) == 0) {
  ------------------
  |  Branch (1200:8): [True: 72, False: 1.03k]
  |  Branch (1200:23): [True: 1, False: 71]
  ------------------
 1201|      1|        *dst = NAN;
 1202|      1|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      1|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1203|      1|    }
 1204|       |
 1205|  1.10k|    size_t len = parseDouble((const char*)data, length, dst);
 1206|  1.10k|    if(len == 0)
  ------------------
  |  Branch (1206:8): [True: 25, False: 1.07k]
  ------------------
 1207|     25|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     25|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1208|       |
 1209|       |    /* There must only be whitespace between the end of the parsed number and
 1210|       |     * the end of the token */
 1211|  1.29k|    for(size_t i = len; i < length; i++) {
  ------------------
  |  Branch (1211:25): [True: 246, False: 1.04k]
  ------------------
 1212|    246|        if(data[i] != ' ' && data[i] -'\t' >= 5)
  ------------------
  |  Branch (1212:12): [True: 108, False: 138]
  |  Branch (1212:30): [True: 31, False: 77]
  ------------------
 1213|     31|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     31|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1214|    246|    }
 1215|       |
 1216|  1.04k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  1.04k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1217|  1.07k|}
ua_types_encoding_xml.c:String_decodeXml:
 1227|    550|DECODE_XML(String) {
 1228|    550|    UA_String *dst = (UA_String*)dst_;
 1229|    550|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  941|    550|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (941:8): [True: 0, False: 550]
  |  |  ------------------
  |  |  942|    550|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  943|    550|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (943:18): [Folded, False: 550]
  |  |  ------------------
  ------------------
 1230|    550|    const xml_token *token = &ctx->tokens[ctx->index];
 1231|    550|    GET_ELEM_CONTENT;
  ------------------
  |  |  946|    550|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  947|    550|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  948|    550|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (948:17): [Folded, False: 550]
  |  |  ------------------
  ------------------
 1232|    550|    skipXmlObject(ctx);
 1233|       |
 1234|       |    /* Empty string? */
 1235|    550|    if(length == 0) {
  ------------------
  |  Branch (1235:8): [True: 14, False: 536]
  ------------------
 1236|     14|        dst->data = (UA_Byte*)UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|     14|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
 1237|     14|        dst->length = 0;
 1238|     14|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     14|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1239|     14|    }
 1240|       |
 1241|    536|    UA_String str = {length, (UA_Byte*)(uintptr_t)data};
 1242|    536|    status ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    536|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1243|    536|    if(token->contentEscaped)
  ------------------
  |  Branch (1243:8): [True: 369, False: 167]
  ------------------
 1244|    369|        ret = getTokenContent(ctx->xml, token, &str);
 1245|    536|    if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    536|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1245:8): [True: 0, False: 536]
  ------------------
 1246|      0|        return ret;
 1247|       |
 1248|    536|    ret = UA_String_copy(&str, dst);
 1249|    536|    if(ret != UA_STATUSCODE_GOOD || !token->contentEscaped)
  ------------------
  |  |   17|  1.07k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1249:8): [True: 0, False: 536]
  |  Branch (1249:37): [True: 167, False: 369]
  ------------------
 1250|    167|        return ret;
 1251|       |
 1252|    369|    ret = decodeTokenContentInPlace(dst);
 1253|    369|    if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    369|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1253:8): [True: 0, False: 369]
  ------------------
 1254|      0|        UA_String_clear(dst);
 1255|    369|    return ret;
 1256|    536|}
ua_types_encoding_xml.c:getTokenContent:
  161|    369|getTokenContent(const char *xml, const xml_token *token, UA_String *content) {
  162|    369|    size_t begin = token->start;
  163|    369|    char quote = 0;
  164|  10.7k|    for(; begin < token->end; begin++) {
  ------------------
  |  Branch (164:11): [True: 10.7k, False: 0]
  ------------------
  165|  10.7k|        char c = xml[begin];
  166|  10.7k|        if(quote) {
  ------------------
  |  Branch (166:12): [True: 1.69k, False: 9.08k]
  ------------------
  167|  1.69k|            if(c == quote)
  ------------------
  |  Branch (167:16): [True: 473, False: 1.21k]
  ------------------
  168|    473|                quote = 0;
  169|  9.08k|        } else if(c == '\'' || c == '"') {
  ------------------
  |  Branch (169:19): [True: 228, False: 8.85k]
  |  Branch (169:32): [True: 245, False: 8.61k]
  ------------------
  170|    473|            quote = c;
  171|  8.61k|        } else if(c == '>') {
  ------------------
  |  Branch (171:19): [True: 369, False: 8.24k]
  ------------------
  172|    369|            begin++;
  173|    369|            break;
  174|    369|        }
  175|  10.7k|    }
  176|    369|    if(begin >= token->end)
  ------------------
  |  Branch (176:8): [True: 0, False: 369]
  ------------------
  177|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  178|       |
  179|    369|    size_t end = token->end;
  180|  3.47k|    while(end > begin && xml[end - 1] != '<')
  ------------------
  |  Branch (180:11): [True: 3.47k, False: 0]
  |  Branch (180:26): [True: 3.10k, False: 369]
  ------------------
  181|  3.10k|        end--;
  182|    369|    if(end <= begin)
  ------------------
  |  Branch (182:8): [True: 0, False: 369]
  ------------------
  183|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  184|    369|    end--;
  185|       |
  186|    369|    content->data = (UA_Byte*)(uintptr_t)&xml[begin];
  187|    369|    content->length = end - begin;
  188|    369|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    369|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  189|    369|}
ua_types_encoding_xml.c:decodeTokenContentInPlace:
  195|    369|decodeTokenContentInPlace(UA_String *content) {
  196|    369|    yxml_t parser;
  197|    369|    char parserStack[512];
  198|    369|    yxml_init_content(&parser, parserStack, sizeof(parserStack));
  199|    369|    unsigned depth = 0;
  200|    369|    size_t outPos = 0;
  201|       |
  202|  43.0M|    for(size_t pos = 0; pos < content->length; pos++) {
  ------------------
  |  Branch (202:25): [True: 43.0M, False: 369]
  ------------------
  203|  43.0M|        yxml_ret_t event = yxml_parse(&parser, content->data[pos]);
  204|  43.0M|        if(event < YXML_OK)
  ------------------
  |  Branch (204:12): [True: 0, False: 43.0M]
  ------------------
  205|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  206|  43.0M|        if(event == YXML_ELEMSTART) {
  ------------------
  |  Branch (206:12): [True: 137k, False: 42.8M]
  ------------------
  207|   137k|            depth++;
  208|  42.8M|        } else if(event == YXML_ELEMEND) {
  ------------------
  |  Branch (208:19): [True: 137k, False: 42.7M]
  ------------------
  209|   137k|            if(depth == 0)
  ------------------
  |  Branch (209:16): [True: 0, False: 137k]
  ------------------
  210|      0|                return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  211|   137k|            depth--;
  212|  42.7M|        } else if(event == YXML_CONTENT && depth == 0) {
  ------------------
  |  Branch (212:19): [True: 33.8M, False: 8.87M]
  |  Branch (212:44): [True: 33.8M, False: 36.7k]
  ------------------
  213|  33.8M|            size_t eventLength = strlen(parser.data);
  214|  33.8M|            if(outPos > content->length ||
  ------------------
  |  Branch (214:16): [True: 0, False: 33.8M]
  ------------------
  215|  33.8M|               eventLength > content->length - outPos)
  ------------------
  |  Branch (215:16): [True: 0, False: 33.8M]
  ------------------
  216|      0|                return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  217|  33.8M|            memcpy(&content->data[outPos], parser.data, eventLength);
  218|  33.8M|            outPos += eventLength;
  219|  33.8M|        }
  220|  43.0M|    }
  221|       |
  222|    369|    if(depth != 0 || yxml_eof(&parser) != YXML_OK)
  ------------------
  |  Branch (222:8): [True: 0, False: 369]
  |  Branch (222:22): [True: 0, False: 369]
  ------------------
  223|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  224|    369|    content->length = outPos;
  225|    369|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    369|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  226|    369|}
ua_types_encoding_xml.c:DateTime_decodeXml:
 1258|     25|DECODE_XML(DateTime) {
 1259|     25|    UA_DateTime *dst = (UA_DateTime*)dst_;
 1260|     25|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  941|     25|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (941:8): [True: 0, False: 25]
  |  |  ------------------
  |  |  942|     25|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  943|     25|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (943:18): [Folded, False: 25]
  |  |  ------------------
  ------------------
 1261|     25|    GET_ELEM_CONTENT;
  ------------------
  |  |  946|     25|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  947|     25|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  948|     25|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (948:17): [Folded, False: 25]
  |  |  ------------------
  ------------------
 1262|     25|    skipXmlObject(ctx);
 1263|     25|    UA_String str = {length, (UA_Byte*)(uintptr_t)data};
 1264|     25|    return UA_DateTime_parse(dst, str);
 1265|     25|}
ua_types_encoding_xml.c:Guid_decodeXml:
 1359|      1|DECODE_XML(Guid) {
 1360|      1|    UA_Guid *dst = (UA_Guid*)dst_;
 1361|      1|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  941|      1|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (941:8): [True: 0, False: 1]
  |  |  ------------------
  |  |  942|      1|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  943|      1|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (943:18): [Folded, False: 1]
  |  |  ------------------
  ------------------
 1362|      1|    UA_String str;
 1363|      1|    UA_String_init(&str);
 1364|      1|    XmlDecodeEntry entry = {UA_STRING_STATIC(UA_XML_GUID_STRING), &str,
  ------------------
  |  |  224|      1|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1365|      1|                            NULL, false, &UA_TYPES[UA_TYPES_STRING]};
  ------------------
  |  |  402|      1|#define UA_TYPES_STRING 11
  ------------------
 1366|      1|    status ret = decodeXmlFields(ctx, &entry, 1);
 1367|      1|    ret |= UA_Guid_parse(dst, str);
 1368|      1|    UA_String_clear(&str);
 1369|      1|    return ret;
 1370|      1|}
ua_types_encoding_xml.c:decodeXmlFields:
 1294|    225|decodeXmlFields(ParseCtxXml *ctx, XmlDecodeEntry *entries, size_t entryCount) {
 1295|    225|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  941|    225|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (941:8): [True: 0, False: 225]
  |  |  ------------------
  |  |  942|    225|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  943|    225|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (943:18): [Folded, False: 225]
  |  |  ------------------
  ------------------
 1296|       |
 1297|    225|    if(ctx->depth >= UA_XML_ENCODING_MAX_RECURSION)
  ------------------
  |  |   15|    225|#define UA_XML_ENCODING_MAX_RECURSION 100
  ------------------
  |  Branch (1297:8): [True: 0, False: 225]
  ------------------
 1298|      0|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
 1299|       |
 1300|    225|    size_t childCount = ctx->tokens[ctx->index].children;
 1301|       |
 1302|       |    /* Empty object */
 1303|    225|    if(childCount == 0) {
  ------------------
  |  Branch (1303:8): [True: 152, False: 73]
  ------------------
 1304|    152|        skipXmlObject(ctx);
 1305|    152|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    152|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1306|    152|    }
 1307|       |
 1308|       |    /* Go to first entry element */
 1309|     73|    ctx->depth++;
 1310|     73|    ctx->index += 1 + ctx->tokens[ctx->index].attributes;
 1311|       |
 1312|     73|    status ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     73|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1313|    218|    for(size_t i = 0; i < childCount; i++) {
  ------------------
  |  Branch (1313:23): [True: 145, False: 73]
  ------------------
 1314|    145|        xml_token *elem = &ctx->tokens[ctx->index];
 1315|    145|        XmlDecodeEntry *entry = NULL;
 1316|    145|        for(size_t j = i; j < entryCount + i; j++) {
  ------------------
  |  Branch (1316:27): [True: 145, False: 0]
  ------------------
 1317|       |            /* Search for key, if found outer loop will be one less. Best case
 1318|       |             * if objectCount is in order! */
 1319|    145|            size_t index = j % entryCount;
 1320|    145|            if(!UA_String_equal_ignorecase(&elem->name, &entries[index].name))
  ------------------
  |  Branch (1320:16): [True: 0, False: 145]
  ------------------
 1321|      0|                continue;
 1322|    145|            entry = &entries[index];
 1323|    145|            break;
 1324|    145|        }
 1325|       |
 1326|       |        /* Unknown child element */
 1327|    145|        if(!entry)
  ------------------
  |  Branch (1327:12): [True: 0, False: 145]
  ------------------
 1328|      0|            goto errout;
 1329|       |
 1330|       |        /* An entry that was expected, but shall not be decoded.
 1331|       |         * Jump over it. */
 1332|    145|        if(!entry->fieldPointer || (!entry->function && !entry->type)) {
  ------------------
  |  Branch (1332:12): [True: 0, False: 145]
  |  Branch (1332:37): [True: 73, False: 72]
  |  Branch (1332:57): [True: 0, False: 73]
  ------------------
 1333|      0|            skipXmlObject(ctx);
 1334|      0|            continue;
 1335|      0|        }
 1336|       |
 1337|       |        /* Duplicate child element */
 1338|    145|        if(entry->found)
  ------------------
  |  Branch (1338:12): [True: 0, False: 145]
  ------------------
 1339|      0|            goto errout;
 1340|    145|        entry->found = true;
 1341|       |
 1342|       |        /* Decode */
 1343|    145|        if(entry->function) /* Specialized decoding function */
  ------------------
  |  Branch (1343:12): [True: 72, False: 73]
  ------------------
 1344|     72|            ret = entry->function(ctx, entry->fieldPointer, entry->type);
 1345|     73|        else /* Decode by type-kind */
 1346|     73|            ret = decodeXmlJumpTable[entry->type->typeKind](ctx, entry->fieldPointer, entry->type);
 1347|    145|        if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    145|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1347:12): [True: 0, False: 145]
  ------------------
 1348|      0|            goto cleanup;
 1349|    145|    }
 1350|       |
 1351|     73|cleanup:
 1352|     73|    ctx->depth--;
 1353|     73|    return ret;
 1354|      0|errout:
 1355|      0|    ctx->depth--;
 1356|      0|    return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1357|     73|}
ua_types_encoding_xml.c:ByteString_decodeXml:
 1386|     48|DECODE_XML(ByteString) {
 1387|     48|    UA_ByteString *dst = (UA_ByteString*)dst_;
 1388|     48|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  941|     48|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (941:8): [True: 0, False: 48]
  |  |  ------------------
  |  |  942|     48|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  943|     48|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (943:18): [Folded, False: 48]
  |  |  ------------------
  ------------------
 1389|     48|    GET_ELEM_CONTENT;
  ------------------
  |  |  946|     48|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  947|     48|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  948|     48|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (948:17): [Folded, False: 48]
  |  |  ------------------
  ------------------
 1390|     48|    skipXmlObject(ctx);
 1391|       |
 1392|       |    /* Trim whitespace around the content. The tokenizer can include CDATA
 1393|       |     * delimiters in the content range if whitespace precedes the section. */
 1394|     48|    while(length > 0 && (data[0] == ' ' || data[0] == '\t' ||
  ------------------
  |  Branch (1394:11): [True: 0, False: 48]
  |  Branch (1394:26): [True: 0, False: 0]
  |  Branch (1394:44): [True: 0, False: 0]
  ------------------
 1395|      0|                         data[0] == '\r' || data[0] == '\n')) {
  ------------------
  |  Branch (1395:26): [True: 0, False: 0]
  |  Branch (1395:45): [True: 0, False: 0]
  ------------------
 1396|      0|        data++;
 1397|      0|        length--;
 1398|      0|    }
 1399|     48|    while(length > 0 && (data[length - 1] == ' ' || data[length - 1] == '\t' ||
  ------------------
  |  Branch (1399:11): [True: 0, False: 48]
  |  Branch (1399:26): [True: 0, False: 0]
  |  Branch (1399:53): [True: 0, False: 0]
  ------------------
 1400|      0|                         data[length - 1] == '\r' || data[length - 1] == '\n'))
  ------------------
  |  Branch (1400:26): [True: 0, False: 0]
  |  Branch (1400:54): [True: 0, False: 0]
  ------------------
 1401|      0|        length--;
 1402|       |
 1403|       |    /* Remove an exact CDATA wrapper before compacting the Base64 payload. */
 1404|     48|    if(length >= 12 && memcmp(data, "<![CDATA[", 9) == 0 &&
  ------------------
  |  Branch (1404:8): [True: 0, False: 48]
  |  Branch (1404:24): [True: 0, False: 0]
  ------------------
 1405|      0|       memcmp(&data[length - 3], "]]>", 3) == 0) {
  ------------------
  |  Branch (1405:8): [True: 0, False: 0]
  ------------------
 1406|      0|        data += 9;
 1407|      0|        length -= 12;
 1408|      0|    }
 1409|       |
 1410|       |    /* XML allows insignificant whitespace inside Base64 content. */
 1411|     48|    size_t encodedLength = compactXmlBase64(data, length, NULL);
 1412|       |
 1413|       |    /* Empty bytestring? */
 1414|     48|    if(encodedLength == 0) {
  ------------------
  |  Branch (1414:8): [True: 48, False: 0]
  ------------------
 1415|     48|        dst->data = (UA_Byte*)UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|     48|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
 1416|     48|        dst->length = 0;
 1417|     48|    } else {
 1418|      0|        const unsigned char *encoded = (const unsigned char*)data;
 1419|      0|        unsigned char *compact = NULL;
 1420|      0|        if(encodedLength != length) {
  ------------------
  |  Branch (1420:12): [True: 0, False: 0]
  ------------------
 1421|      0|            compact = (unsigned char*)UA_malloc(encodedLength);
  ------------------
  |  |   18|      0|#define UA_malloc(size) UA_mallocSingleton(size)
  ------------------
 1422|      0|            if(!compact)
  ------------------
  |  Branch (1422:16): [True: 0, False: 0]
  ------------------
 1423|      0|                return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 1424|      0|            compactXmlBase64(data, length, compact);
 1425|      0|            encoded = compact;
 1426|      0|        }
 1427|      0|        size_t flen = 0;
 1428|      0|        unsigned char *unB64 = UA_unbase64(encoded, encodedLength, &flen);
 1429|      0|        UA_free(compact);
  ------------------
  |  |   19|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1430|      0|        if(!unB64)
  ------------------
  |  Branch (1430:12): [True: 0, False: 0]
  ------------------
 1431|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1432|      0|        dst->data = (UA_Byte*)unB64;
 1433|      0|        dst->length = flen;
 1434|      0|    }
 1435|       |
 1436|     48|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     48|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1437|     48|}
ua_types_encoding_xml.c:compactXmlBase64:
 1373|     48|compactXmlBase64(const UA_Byte *data, size_t length, UA_Byte *out) {
 1374|     48|    size_t pos = 0;
 1375|     48|    for(size_t i = 0; i < length; i++) {
  ------------------
  |  Branch (1375:23): [True: 0, False: 48]
  ------------------
 1376|      0|        if(data[i] != ' ' && data[i] != '\t' &&
  ------------------
  |  Branch (1376:12): [True: 0, False: 0]
  |  Branch (1376:30): [True: 0, False: 0]
  ------------------
 1377|      0|           data[i] != '\r' && data[i] != '\n') {
  ------------------
  |  Branch (1377:12): [True: 0, False: 0]
  |  Branch (1377:31): [True: 0, False: 0]
  ------------------
 1378|      0|            if(out)
  ------------------
  |  Branch (1378:16): [True: 0, False: 0]
  ------------------
 1379|      0|                out[pos] = data[i];
 1380|      0|            pos++;
 1381|      0|        }
 1382|      0|    }
 1383|     48|    return pos;
 1384|     48|}
ua_types_encoding_xml.c:XmlElement_decodeXml:
 1439|    328|DECODE_XML(XmlElement) {
 1440|    328|    UA_XmlElement *dst = (UA_XmlElement*)dst_;
 1441|    328|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  941|    328|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (941:8): [True: 0, False: 328]
  |  |  ------------------
  |  |  942|    328|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  943|    328|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (943:18): [Folded, False: 328]
  |  |  ------------------
  ------------------
 1442|    328|    xml_token *token = &ctx->tokens[ctx->index];
 1443|    328|    size_t begin = token->start;
 1444|  1.30M|    while(begin < token->end && ctx->xml[begin] != '>')
  ------------------
  |  Branch (1444:11): [True: 1.30M, False: 0]
  |  Branch (1444:33): [True: 1.30M, False: 328]
  ------------------
 1445|  1.30M|        begin++;
 1446|    328|    if(begin == token->end)
  ------------------
  |  Branch (1446:8): [True: 0, False: 328]
  ------------------
 1447|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1448|    328|    begin++;
 1449|    328|    size_t end = token->end;
 1450|  14.4M|    while(end > begin && ctx->xml[end - 1] != '<')
  ------------------
  |  Branch (1450:11): [True: 14.4M, False: 164]
  |  Branch (1450:26): [True: 14.4M, False: 164]
  ------------------
 1451|  14.4M|        end--;
 1452|    328|    if(end == begin)
  ------------------
  |  Branch (1452:8): [True: 164, False: 164]
  ------------------
 1453|    164|        end = token->end;
 1454|    164|    else
 1455|    164|        end--;
 1456|    328|    UA_StatusCode ret = UA_ByteString_allocBuffer((UA_ByteString*)dst, end - begin);
 1457|    328|    if(ret == UA_STATUSCODE_GOOD && end > begin)
  ------------------
  |  |   17|    656|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1457:8): [True: 328, False: 0]
  |  Branch (1457:37): [True: 266, False: 62]
  ------------------
 1458|    266|        memcpy(dst->data, &ctx->xml[begin], end - begin);
 1459|    328|    skipXmlObject(ctx);
 1460|    328|    return ret;
 1461|    328|}
ua_types_encoding_xml.c:NodeId_decodeXml:
 1463|     73|DECODE_XML(NodeId) {
 1464|     73|    UA_NodeId *dst = (UA_NodeId*)dst_;
 1465|     73|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  941|     73|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (941:8): [True: 0, False: 73]
  |  |  ------------------
  |  |  942|     73|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  943|     73|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (943:18): [Folded, False: 73]
  |  |  ------------------
  ------------------
 1466|     73|    UA_String str;
 1467|     73|    static UA_String identifier = UA_STRING_STATIC(UA_XML_NODEID_IDENTIFIER);
  ------------------
  |  |  224|     73|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1468|     73|    status ret = getChildContent(ctx, identifier, &str);
 1469|     73|    if(ret != UA_STATUSCODE_GOOD) return ret;
  ------------------
  |  |   17|     73|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1469:8): [True: 1, False: 72]
  ------------------
 1470|     72|    skipXmlObject(ctx);
 1471|     72|    return UA_NodeId_parseEx(dst, str, ctx->namespaceMapping);
 1472|     73|}
ua_types_encoding_xml.c:getChildContent:
 1270|     83|getChildContent(ParseCtxXml *ctx, UA_String name, UA_String *out) {
 1271|     83|    size_t oldIndex = ctx->index;
 1272|     83|    size_t children = ctx->tokens[ctx->index].children;
 1273|       |
 1274|       |    /* Skip the attributes and go to the first child */
 1275|     83|    ctx->index += 1 + ctx->tokens[ctx->index].attributes;
 1276|       |
 1277|       |    /* Find the child of the name */
 1278|     83|    UA_StatusCode res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     83|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1279|     83|    for(size_t i = 0; i < children; i++) {
  ------------------
  |  Branch (1279:23): [True: 72, False: 11]
  ------------------
 1280|     72|        if(!UA_String_equal(&name, &ctx->tokens[ctx->index].name)) {
  ------------------
  |  Branch (1280:12): [True: 0, False: 72]
  ------------------
 1281|      0|            skipXmlObject(ctx);
 1282|      0|            continue;
 1283|      0|        }
 1284|     72|        *out = ctx->tokens[ctx->index].content;
 1285|     72|        res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     72|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1286|     72|        break;
 1287|     72|    }
 1288|       |
 1289|     83|    ctx->index = oldIndex;
 1290|     83|    return res;
 1291|     83|}
ua_types_encoding_xml.c:ExpandedNodeId_decodeXml:
 1474|      1|DECODE_XML(ExpandedNodeId) {
 1475|      1|    UA_ExpandedNodeId *dst = (UA_ExpandedNodeId*)dst_;
 1476|      1|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  941|      1|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (941:8): [True: 0, False: 1]
  |  |  ------------------
  |  |  942|      1|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  943|      1|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (943:18): [Folded, False: 1]
  |  |  ------------------
  ------------------
 1477|      1|    UA_String str;
 1478|      1|    static UA_String expidentifier = UA_STRING_STATIC(UA_XML_EXPANDEDNODEID_IDENTIFIER);
  ------------------
  |  |  224|      1|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1479|      1|    status ret = getChildContent(ctx, expidentifier, &str);
 1480|      1|    if(ret != UA_STATUSCODE_GOOD) return ret;
  ------------------
  |  |   17|      1|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1480:8): [True: 1, False: 0]
  ------------------
 1481|      0|    skipXmlObject(ctx);
 1482|      0|    return UA_ExpandedNodeId_parseEx(dst, str, ctx->namespaceMapping,
 1483|      0|                                     ctx->serverUrisSize, ctx->serverUris);
 1484|      1|}
ua_types_encoding_xml.c:StatusCode_decodeXml:
 1486|      9|DECODE_XML(StatusCode) {
 1487|      9|    UA_StatusCode *dst = (UA_StatusCode*)dst_;
 1488|      9|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  941|      9|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (941:8): [True: 0, False: 9]
  |  |  ------------------
  |  |  942|      9|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  943|      9|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (943:18): [Folded, False: 9]
  |  |  ------------------
  ------------------
 1489|      9|    UA_String str;
 1490|      9|    static UA_String statusidentifier = UA_STRING_STATIC(UA_XML_STATUSCODE_CODE);
  ------------------
  |  |  224|      9|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1491|      9|    status ret = getChildContent(ctx, statusidentifier, &str);
 1492|      9|    if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|      9|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1492:8): [True: 9, False: 0]
  ------------------
 1493|      9|        return ret;
 1494|      0|    skipXmlObject(ctx);
 1495|      0|    UA_UInt64 out = 0;
 1496|      0|    ret = decodeUnsigned(str.data, str.length, &out);
 1497|      0|    if(ret != UA_STATUSCODE_GOOD || out > UA_UINT32_MAX)
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  if(ret != UA_STATUSCODE_GOOD || out > UA_UINT32_MAX)
  ------------------
  |  |  110|      0|#define UA_UINT32_MAX 4294967295UL
  ------------------
  |  Branch (1497:8): [True: 0, False: 0]
  |  Branch (1497:37): [True: 0, False: 0]
  ------------------
 1498|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1499|      0|    *dst = (UA_StatusCode)out;
 1500|      0|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1501|      0|}
ua_types_encoding_xml.c:QualifiedName_decodeXml:
 1503|      2|DECODE_XML(QualifiedName) {
 1504|      2|    UA_QualifiedName *dst = (UA_QualifiedName*)dst_;
 1505|      2|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  941|      2|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (941:8): [True: 0, False: 2]
  |  |  ------------------
  |  |  942|      2|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  943|      2|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (943:18): [Folded, False: 2]
  |  |  ------------------
  ------------------
 1506|       |
 1507|       |    /* Decode the elements */
 1508|      2|    XmlDecodeEntry entries[2] = {
 1509|      2|        {UA_STRING_STATIC(UA_XML_QUALIFIEDNAME_NAMESPACEINDEX), &dst->namespaceIndex,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1510|      2|         NULL, false, &UA_TYPES[UA_TYPES_UINT16]},
  ------------------
  |  |  164|      2|#define UA_TYPES_UINT16 4
  ------------------
 1511|      2|        {UA_STRING_STATIC(UA_XML_QUALIFIEDNAME_NAME), &dst->name,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1512|      2|         NULL, false, &UA_TYPES[UA_TYPES_STRING]}
  ------------------
  |  |  402|      2|#define UA_TYPES_STRING 11
  ------------------
 1513|      2|    };
 1514|      2|    UA_StatusCode res = decodeXmlFields(ctx, entries, 2);
 1515|       |
 1516|       |    /* Map the NamespaceIndex */
 1517|      2|    if(ctx->namespaceMapping)
  ------------------
  |  Branch (1517:8): [True: 0, False: 2]
  ------------------
 1518|      0|        dst->namespaceIndex =
 1519|      0|            UA_NamespaceMapping_remote2Local(ctx->namespaceMapping, dst->namespaceIndex);
 1520|       |
 1521|      2|    return res;
 1522|      2|}
ua_types_encoding_xml.c:LocalizedText_decodeXml:
 1524|      2|DECODE_XML(LocalizedText) {
 1525|      2|    UA_LocalizedText *dst = (UA_LocalizedText*)dst_;
 1526|      2|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  941|      2|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (941:8): [True: 0, False: 2]
  |  |  ------------------
  |  |  942|      2|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  943|      2|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (943:18): [Folded, False: 2]
  |  |  ------------------
  ------------------
 1527|       |
 1528|      2|    XmlDecodeEntry entries[2] = {
 1529|      2|        {UA_STRING_STATIC(UA_XML_LOCALIZEDTEXT_LOCALE), &dst->locale,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1530|      2|         NULL, false, &UA_TYPES[UA_TYPES_STRING]},
  ------------------
  |  |  402|      2|#define UA_TYPES_STRING 11
  ------------------
 1531|      2|        {UA_STRING_STATIC(UA_XML_LOCALIZEDTEXT_TEXT), &dst->text,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1532|      2|         NULL, false, &UA_TYPES[UA_TYPES_STRING]}
  ------------------
  |  |  402|      2|#define UA_TYPES_STRING 11
  ------------------
 1533|      2|    };
 1534|       |
 1535|      2|    return decodeXmlFields(ctx, entries, 2);
 1536|      2|}
ua_types_encoding_xml.c:ExtensionObject_decodeXml:
 1625|     74|DECODE_XML(ExtensionObject) {
 1626|     74|    UA_ExtensionObject *dst = (UA_ExtensionObject*)dst_;
 1627|     74|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  941|     74|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (941:8): [True: 0, False: 74]
  |  |  ------------------
  |  |  942|     74|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  943|     74|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (943:18): [Folded, False: 74]
  |  |  ------------------
  ------------------
 1628|     74|    xml_token *tok = &ctx->tokens[ctx->index];
 1629|     74|    if(tok->children == 0)
  ------------------
  |  Branch (1629:8): [True: 2, False: 72]
  ------------------
 1630|      2|        return UA_STATUSCODE_GOOD; /* _NO_BODY */
  ------------------
  |  |   17|      2|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1631|     72|    dst->encoding = UA_EXTENSIONOBJECT_ENCODED_XML; /* default so the typeId gets cleaned up */
 1632|     72|    XmlDecodeEntry entries[2] = {
 1633|     72|        {UA_STRING_STATIC(UA_XML_EXTENSIONOBJECT_TYPEID), &dst->content.encoded.typeId,
  ------------------
  |  |  224|     72|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1634|     72|         NULL, false, &UA_TYPES[UA_TYPES_NODEID]},
  ------------------
  |  |  572|     72|#define UA_TYPES_NODEID 16
  ------------------
 1635|     72|        {UA_STRING_STATIC(UA_XML_EXTENSIONOBJECT_BODY), dst,
  ------------------
  |  |  224|     72|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1636|     72|         decodeExtensionObjectBody, false, NULL},
 1637|     72|    };
 1638|     72|    return decodeXmlFields(ctx, entries, 2);
 1639|     74|}
ua_types_encoding_xml.c:decodeExtensionObjectBody:
 1563|     72|decodeExtensionObjectBody(ParseCtxXml *ctx, void *dst, const UA_DataType *type) {
 1564|     72|    UA_ExtensionObject *eo = (UA_ExtensionObject*)dst;
 1565|       |
 1566|     72|    xml_token *tok = &ctx->tokens[ctx->index];
 1567|     72|    if(tok->children != 1)
  ------------------
  |  Branch (1567:8): [True: 0, False: 72]
  ------------------
 1568|      0|        return UA_STATUSCODE_BADDECODINGERROR; /* Only one child allowed */
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1569|       |
 1570|     72|    if(UA_NodeId_isNull(&eo->content.encoded.typeId))
  ------------------
  |  Branch (1570:8): [True: 0, False: 72]
  ------------------
 1571|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1572|       |
 1573|       |    /* Find the datatype of the body */
 1574|     72|    type = lookupXmlType(ctx, &eo->content.encoded.typeId);
 1575|       |
 1576|       |    /* Allocate decoded content */
 1577|     72|    void *decoded = NULL;
 1578|     72|    if(type) {
  ------------------
  |  Branch (1578:8): [True: 72, False: 0]
  ------------------
 1579|     72|        decoded = UA_new(type);
 1580|     72|        if(!decoded)
  ------------------
  |  Branch (1580:12): [True: 0, False: 72]
  ------------------
 1581|      0|            return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 1582|     72|    }
 1583|       |
 1584|       |    /* Jump to the first child element */
 1585|     72|    ctx->index += 1 + tok->attributes;
 1586|     72|    tok = &ctx->tokens[ctx->index];
 1587|       |
 1588|     72|    UA_StatusCode ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     72|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1589|     72|    UA_String bs = UA_STRING_STATIC(UA_XML_EXTENSIONOBJECT_BYTESTRING);
  ------------------
  |  |  224|     72|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1590|     72|    if(UA_String_equal(&tok->name, &bs)) {
  ------------------
  |  Branch (1590:8): [True: 0, False: 72]
  ------------------
 1591|       |        /* Decode binary ByteString Body */
 1592|      0|        eo->encoding = UA_EXTENSIONOBJECT_ENCODED_BYTESTRING;
 1593|      0|        ret = decodeXmlJumpTable[UA_DATATYPEKIND_BYTESTRING](ctx, &eo->content.encoded.body, NULL);
 1594|      0|        if(!type)
  ------------------
  |  Branch (1594:12): [True: 0, False: 0]
  ------------------
 1595|      0|            return ret;
 1596|      0|        UA_DecodeBinaryOptions opts;
 1597|      0|        memset(&opts, 0, sizeof(UA_DecodeBinaryOptions));
 1598|      0|        ret = UA_decodeBinary(&eo->content.encoded.body, decoded, type, &opts);
 1599|     72|    } else {
 1600|       |        /* Decode XML Body */
 1601|     72|        eo->encoding = UA_EXTENSIONOBJECT_ENCODED_XML;
 1602|     72|        UA_String body = {tok->end - tok->start, (UA_Byte*)(uintptr_t)ctx->xml + tok->start};
 1603|     72|        skipXmlObject(ctx); /* Skip over the body */
 1604|     72|        if(!type)
  ------------------
  |  Branch (1604:12): [True: 0, False: 72]
  ------------------
 1605|      0|            return UA_String_copy(&body, &eo->content.encoded.body);
 1606|     72|        UA_DecodeXmlOptions opts;
 1607|     72|        memset(&opts, 0, sizeof(UA_DecodeXmlOptions));
 1608|     72|        opts.namespaceMapping = ctx->namespaceMapping;
 1609|     72|        opts.serverUris = ctx->serverUris;
 1610|     72|        opts.serverUrisSize = ctx->serverUrisSize;
 1611|     72|        opts.customTypes = ctx->customTypes;
 1612|     72|        ret = UA_decodeXml(&body, decoded, type, &opts);
 1613|     72|    }
 1614|       |
 1615|     72|    if(ret != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|     72|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1615:8): [True: 0, False: 72]
  ------------------
 1616|      0|        UA_free(decoded); /* Return the un-decoded content if decoding fails */
  ------------------
  |  |   19|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1617|      0|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1618|      0|    }
 1619|       |
 1620|     72|    UA_ExtensionObject_clear(eo); /* Also clears the already decoded TypeId */
 1621|     72|    UA_ExtensionObject_setValue(eo, decoded, type);
 1622|     72|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     72|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1623|     72|}
ua_types_encoding_xml.c:lookupXmlType:
 1540|     72|lookupXmlType(ParseCtxXml *ctx, UA_NodeId *typeId) {
 1541|       |    /* Search in the builtin types */
 1542|  17.5k|    for(size_t i = 0; i < UA_TYPES_COUNT; ++i) {
  ------------------
  |  |   17|  17.5k|#define UA_TYPES_COUNT 388
  ------------------
  |  Branch (1542:23): [True: 17.5k, False: 0]
  ------------------
 1543|  17.5k|        if(UA_NodeId_equal(typeId, &UA_TYPES[i].typeId) ||
  ------------------
  |  Branch (1543:12): [True: 72, False: 17.5k]
  ------------------
 1544|  17.5k|           UA_NodeId_equal(typeId, &UA_TYPES[i].xmlEncodingId))
  ------------------
  |  Branch (1544:12): [True: 0, False: 17.5k]
  ------------------
 1545|     72|            return &UA_TYPES[i];
 1546|  17.5k|    }
 1547|       |
 1548|       |    /* Search in the customTypes */
 1549|      0|    const UA_DataTypeArray *customTypes = ctx->customTypes;
 1550|      0|    while(customTypes) {
  ------------------
  |  Branch (1550:11): [True: 0, False: 0]
  ------------------
 1551|      0|        for(size_t i = 0; i < customTypes->typesSize; ++i) {
  ------------------
  |  Branch (1551:27): [True: 0, False: 0]
  ------------------
 1552|      0|            const UA_DataType *type = &customTypes->types[i];
 1553|      0|            if(UA_NodeId_equal(typeId, &type->typeId) ||
  ------------------
  |  Branch (1553:16): [True: 0, False: 0]
  ------------------
 1554|      0|               UA_NodeId_equal(typeId, &type->xmlEncodingId))
  ------------------
  |  Branch (1554:16): [True: 0, False: 0]
  ------------------
 1555|      0|                return type;
 1556|      0|        }
 1557|      0|        customTypes = customTypes->next;
 1558|      0|    }
 1559|      0|    return NULL;
 1560|      0|}
ua_types_encoding_xml.c:DataValue_decodeXml:
 1883|      2|DECODE_XML(DataValue) {
 1884|      2|    UA_DataValue *dst = (UA_DataValue*)dst_;
 1885|      2|    XmlDecodeEntry entries[6] = {
 1886|      2|        {UA_STRING_STATIC("Value"), dst, DataValueValue_decodeXml, false, NULL},
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1887|      2|        {UA_STRING_STATIC("StatusCode"), &dst->status, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1888|      2|         &UA_TYPES[UA_TYPES_STATUSCODE]},
  ------------------
  |  |  640|      2|#define UA_TYPES_STATUSCODE 18
  ------------------
 1889|      2|        {UA_STRING_STATIC("SourceTimestamp"), &dst->sourceTimestamp, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1890|      2|         &UA_TYPES[UA_TYPES_DATETIME]},
  ------------------
  |  |  436|      2|#define UA_TYPES_DATETIME 12
  ------------------
 1891|      2|        {UA_STRING_STATIC("SourcePicoseconds"), &dst->sourcePicoseconds, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1892|      2|         &UA_TYPES[UA_TYPES_UINT16]},
  ------------------
  |  |  164|      2|#define UA_TYPES_UINT16 4
  ------------------
 1893|      2|        {UA_STRING_STATIC("ServerTimestamp"), &dst->serverTimestamp, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1894|      2|         &UA_TYPES[UA_TYPES_DATETIME]},
  ------------------
  |  |  436|      2|#define UA_TYPES_DATETIME 12
  ------------------
 1895|      2|        {UA_STRING_STATIC("ServerPicoseconds"), &dst->serverPicoseconds, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1896|      2|         &UA_TYPES[UA_TYPES_UINT16]}
  ------------------
  |  |  164|      2|#define UA_TYPES_UINT16 4
  ------------------
 1897|      2|    };
 1898|      2|    status ret = decodeXmlFields(ctx, entries, 6);
 1899|      2|    dst->hasValue = entries[0].found;
 1900|      2|    dst->hasStatus = entries[1].found;
 1901|      2|    dst->hasSourceTimestamp = entries[2].found;
 1902|      2|    dst->hasSourcePicoseconds = entries[3].found;
 1903|      2|    dst->hasServerTimestamp = entries[4].found;
 1904|      2|    dst->hasServerPicoseconds = entries[5].found;
 1905|      2|    return ret;
 1906|      2|}
ua_types_encoding_xml.c:decodeXmlVariantValue:
 1799|  4.26k|decodeXmlVariantValue(ParseCtxXml *ctx, UA_Variant *dst) {
 1800|  4.26k|    xml_token *tok = &ctx->tokens[ctx->index];
 1801|  4.26k|    if(tok->children != 1)
  ------------------
  |  Branch (1801:8): [True: 3, False: 4.25k]
  ------------------
 1802|      3|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      3|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1803|       |
 1804|       |    /* Jump to the child of the <Value> token */
 1805|  4.25k|    ctx->depth++;
 1806|  4.25k|    ctx->index += 1 + ctx->tokens[ctx->index].attributes;
 1807|  4.25k|    tok = &ctx->tokens[ctx->index];
 1808|       |
 1809|       |    /* Special case for multi-dimensional arrays */
 1810|  4.25k|    static UA_String matrName = UA_STRING_STATIC("Matrix");
  ------------------
  |  |  224|  4.25k|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1811|  4.25k|    UA_StatusCode ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  4.25k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1812|  4.25k|    if(UA_String_equal(&tok->name, &matrName)) {
  ------------------
  |  Branch (1812:8): [True: 2, False: 4.25k]
  ------------------
 1813|      2|        ret = decodeMatrixVariant(ctx, dst);
 1814|      2|        unwrapVariantExtensionObject(dst, true);
 1815|      2|        ctx->depth--;
 1816|      2|        return ret;
 1817|      2|    }
 1818|       |
 1819|       |    /* Get the Data type / array type */
 1820|  4.25k|    UA_Boolean isArray = false;
 1821|  4.25k|    static char *lo = "ListOf";
 1822|  4.25k|    UA_String typeName = tok->name;
 1823|  4.25k|    if(tok->name.length > strlen(lo) &&
  ------------------
  |  Branch (1823:8): [True: 698, False: 3.55k]
  ------------------
 1824|    698|       strncmp((char*)tok->name.data, lo, strlen(lo)) == 0) {
  ------------------
  |  Branch (1824:8): [True: 39, False: 659]
  ------------------
 1825|     39|        isArray = true;
 1826|     39|        typeName.data += strlen(lo);
 1827|     39|        typeName.length -= strlen(lo);
 1828|     39|    }
 1829|       |
 1830|       |    /* Look up the DataType from the name */
 1831|  4.25k|    dst->type = lookupTypeByName(ctx, typeName);
 1832|  4.25k|    if(!dst->type) {
  ------------------
  |  Branch (1832:8): [True: 85, False: 4.17k]
  ------------------
 1833|     85|        ctx->depth--;
 1834|     85|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     85|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1835|     85|    }
 1836|       |
 1837|       |    /* Decode */
 1838|  4.17k|    if(!isArray) {
  ------------------
  |  Branch (1838:8): [True: 4.13k, False: 38]
  ------------------
 1839|  4.13k|        dst->data = UA_new(dst->type);
 1840|  4.13k|        if(!dst->data) {
  ------------------
  |  Branch (1840:12): [True: 0, False: 4.13k]
  ------------------
 1841|      0|            ctx->depth--;
 1842|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1843|      0|        }
 1844|  4.13k|        ret = decodeXmlJumpTable[dst->type->typeKind](ctx, dst->data, dst->type);
 1845|  4.13k|    } else {
 1846|     38|        ret = Array_decodeXml(ctx, &dst->arrayLength, dst->type);
 1847|     38|    }
 1848|       |
 1849|       |    /* Unwrap ExtensionObject values in the variant */
 1850|  4.17k|    unwrapVariantExtensionObject(dst, isArray);
 1851|       |
 1852|  4.17k|    ctx->depth--;
 1853|  4.17k|    return ret;
 1854|  4.17k|}
ua_types_encoding_xml.c:decodeMatrixVariant:
 1743|      2|decodeMatrixVariant(ParseCtxXml *ctx, UA_Variant *dst) {
 1744|       |    /* The <Matrix> token needs two children: <Dimensions> and <Elements> */
 1745|      2|    xml_token *tok = &ctx->tokens[ctx->index];
 1746|      2|    if(tok->children != 2)
  ------------------
  |  Branch (1746:8): [True: 1, False: 1]
  ------------------
 1747|      1|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      1|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1748|       |
 1749|       |    /* Jump to the child of the <Matrix> token */
 1750|      1|    ctx->index += 1 + ctx->tokens[ctx->index].attributes;
 1751|      1|    tok = &ctx->tokens[ctx->index];
 1752|       |
 1753|      1|    UA_assert(tok->type == XML_TOKEN_ELEMENT);
  ------------------
  |  |  399|      1|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (1753:5): [True: 1, False: 0]
  ------------------
 1754|      1|    static UA_String dimName = UA_STRING_STATIC("Dimensions");
  ------------------
  |  |  224|      1|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1755|      1|    if(!UA_String_equal(&tok->name, &dimName))
  ------------------
  |  Branch (1755:8): [True: 1, False: 0]
  ------------------
 1756|      1|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      1|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1757|       |
 1758|      0|    UA_StatusCode ret =
 1759|      0|        Array_decodeXml(ctx, &dst->arrayDimensionsSize, &UA_TYPES[UA_TYPES_INT32]);
  ------------------
  |  |  198|      0|#define UA_TYPES_INT32 5
  ------------------
 1760|      0|    if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1760:8): [True: 0, False: 0]
  ------------------
 1761|      0|        return ret;
 1762|       |
 1763|      0|    UA_assert(tok->type == XML_TOKEN_ELEMENT);
  ------------------
  |  |  399|      0|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (1763:5): [True: 0, False: 0]
  ------------------
 1764|      0|    static UA_String elemName = UA_STRING_STATIC("Elements");
  ------------------
  |  |  224|      0|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1765|      0|    tok = &ctx->tokens[ctx->index];
 1766|      0|    if(!UA_String_equal(&tok->name, &elemName))
  ------------------
  |  Branch (1766:8): [True: 0, False: 0]
  ------------------
 1767|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1768|       |
 1769|       |    /* Get the type of the first element */
 1770|      0|    size_t oldIndex = ctx->index;
 1771|      0|    ctx->index += 1 + ctx->tokens[ctx->index].attributes;
 1772|      0|    tok = &ctx->tokens[ctx->index];
 1773|      0|    UA_assert(tok->type == XML_TOKEN_ELEMENT);
  ------------------
  |  |  399|      0|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (1773:5): [True: 0, False: 0]
  ------------------
 1774|       |
 1775|      0|    UA_String typeName = tok->name;
 1776|      0|    dst->type = lookupTypeByName(ctx, typeName);
 1777|      0|    if(!dst->type)
  ------------------
  |  Branch (1777:8): [True: 0, False: 0]
  ------------------
 1778|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1779|       |
 1780|       |    /* Decode the array */
 1781|      0|    ctx->index = oldIndex;
 1782|      0|    ret = Array_decodeXml(ctx, &dst->arrayLength, dst->type);
 1783|      0|    if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1783:8): [True: 0, False: 0]
  ------------------
 1784|      0|        return ret;
 1785|       |
 1786|       |    /* Check that the ArrayDimensions match */
 1787|      0|    size_t dimLen = 1;
 1788|      0|    for(size_t i = 0; i < dst->arrayDimensionsSize; i++) {
  ------------------
  |  Branch (1788:23): [True: 0, False: 0]
  ------------------
 1789|      0|        if(dst->arrayDimensions[i] != 0 &&
  ------------------
  |  Branch (1789:12): [True: 0, False: 0]
  ------------------
 1790|      0|           dimLen > SIZE_MAX / dst->arrayDimensions[i])
  ------------------
  |  Branch (1790:12): [True: 0, False: 0]
  ------------------
 1791|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1792|      0|        dimLen *= dst->arrayDimensions[i];
 1793|      0|    }
 1794|       |
 1795|      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 (1795:12): [True: 0, False: 0]
  ------------------
 1796|      0|}
ua_types_encoding_xml.c:unwrapVariantExtensionObject:
 1695|  4.17k|unwrapVariantExtensionObject(UA_Variant *dst, UA_Boolean isArray) {
 1696|  4.17k|    if(dst->type != &UA_TYPES[UA_TYPES_EXTENSIONOBJECT])
  ------------------
  |  |  742|  4.17k|#define UA_TYPES_EXTENSIONOBJECT 21
  ------------------
  |  Branch (1696:8): [True: 4.09k, False: 76]
  ------------------
 1697|  4.09k|        return;
 1698|     76|    if(isArray && dst->arrayLength == 0)
  ------------------
  |  Branch (1698:8): [True: 2, False: 74]
  |  Branch (1698:19): [True: 2, False: 0]
  ------------------
 1699|      2|        return;
 1700|       |
 1701|     74|    UA_ExtensionObject *eo = (UA_ExtensionObject*)dst->data;
 1702|     74|    if(eo->encoding != UA_EXTENSIONOBJECT_DECODED)
  ------------------
  |  Branch (1702:8): [True: 2, False: 72]
  ------------------
 1703|      2|        return;
 1704|       |
 1705|     72|    const UA_DataType *type = eo->content.decoded.type;
 1706|       |
 1707|       |    /* Scalar */
 1708|     72|    if(!isArray) {
  ------------------
  |  Branch (1708:8): [True: 72, False: 0]
  ------------------
 1709|     72|        dst->data = eo->content.decoded.data;
 1710|     72|        dst->type = type;
 1711|     72|        UA_free(eo);
  ------------------
  |  |   19|     72|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1712|     72|        return;
 1713|     72|    }
 1714|       |
 1715|       |    /* Array. Check that all members can be unpacked */
 1716|      0|    for(size_t i = 0; i < dst->arrayLength; i++, eo++) {
  ------------------
  |  Branch (1716:23): [True: 0, False: 0]
  ------------------
 1717|      0|        if(eo->encoding != UA_EXTENSIONOBJECT_DECODED)
  ------------------
  |  Branch (1717:12): [True: 0, False: 0]
  ------------------
 1718|      0|            return;
 1719|      0|        if(eo->content.decoded.type != type)
  ------------------
  |  Branch (1719:12): [True: 0, False: 0]
  ------------------
 1720|      0|            return;
 1721|      0|    }
 1722|       |
 1723|       |    /* Allocate the array */
 1724|      0|    void *unpacked = UA_Array_new(dst->arrayLength, type);
 1725|      0|    if(!unpacked)
  ------------------
  |  Branch (1725:8): [True: 0, False: 0]
  ------------------
 1726|      0|        return;
 1727|       |
 1728|       |    /* Unpack the content and set the new array */
 1729|      0|    uintptr_t uptr = (uintptr_t)unpacked;
 1730|      0|    eo = (UA_ExtensionObject*)dst->data;
 1731|      0|    for(size_t i = 0; i < dst->arrayLength; i++, eo++) {
  ------------------
  |  Branch (1731:23): [True: 0, False: 0]
  ------------------
 1732|       |        /* Move the value content */
 1733|      0|        memcpy((void*)uptr, eo->content.decoded.data, type->memSize);
 1734|      0|        UA_free(eo->content.decoded.data); /* Free the old value location */
  ------------------
  |  |   19|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1735|      0|        uptr += type->memSize;
 1736|      0|    }
 1737|      0|    UA_free(dst->data); /* Remove the old array of ExtensionObjects */
  ------------------
  |  |   19|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1738|      0|    dst->data = unpacked;
 1739|      0|    dst->type = type;
 1740|      0|}
ua_types_encoding_xml.c:lookupTypeByName:
 1669|  4.25k|lookupTypeByName(ParseCtxXml *ctx, UA_String typeName) {
 1670|       |    /* Search in the builtin types */
 1671|  92.5k|    for(size_t i = 0; i < UA_TYPES_COUNT; ++i) {
  ------------------
  |  |   17|  92.5k|#define UA_TYPES_COUNT 388
  ------------------
  |  Branch (1671:23): [True: 92.4k, False: 85]
  ------------------
 1672|  92.4k|        const UA_DataType *type = &UA_TYPES[i];
 1673|  92.4k|        size_t length = strlen(type->typeName);
 1674|  92.4k|        if(length == typeName.length &&
  ------------------
  |  Branch (1674:12): [True: 14.3k, False: 78.1k]
  ------------------
 1675|  14.3k|           strncmp((char*)typeName.data, type->typeName, typeName.length) == 0)
  ------------------
  |  Branch (1675:12): [True: 4.17k, False: 10.1k]
  ------------------
 1676|  4.17k|            return &UA_TYPES[i];
 1677|  92.4k|    }
 1678|       |
 1679|       |    /* Search in the customTypes */
 1680|     85|    const UA_DataTypeArray *customTypes = ctx->customTypes;
 1681|     85|    while(customTypes) {
  ------------------
  |  Branch (1681:11): [True: 0, False: 85]
  ------------------
 1682|      0|        for(size_t i = 0; i < customTypes->typesSize; ++i) {
  ------------------
  |  Branch (1682:27): [True: 0, False: 0]
  ------------------
 1683|      0|            const UA_DataType *type = &customTypes->types[i];
 1684|      0|            size_t length = strlen(type->typeName);
 1685|      0|            if(length == typeName.length &&
  ------------------
  |  Branch (1685:16): [True: 0, False: 0]
  ------------------
 1686|      0|               strncmp((char*)typeName.data, type->typeName, typeName.length) == 0)
  ------------------
  |  Branch (1686:16): [True: 0, False: 0]
  ------------------
 1687|      0|                return type;
 1688|      0|        }
 1689|      0|        customTypes = customTypes->next;
 1690|      0|    }
 1691|     85|    return NULL;
 1692|     85|}
ua_types_encoding_xml.c:Array_decodeXml:
 1642|     38|Array_decodeXml(ParseCtxXml *ctx, void *dst_, const UA_DataType *type) {
 1643|     38|    size_t *dstSize = (size_t*)dst_;
 1644|       |
 1645|       |    /* Allocate memory */
 1646|     38|    size_t length = ctx->tokens[ctx->index].children;
 1647|     38|    void **dst = (void**)((uintptr_t)dstSize + sizeof(void*));
 1648|     38|    *dst = UA_Array_new(length, type);
 1649|     38|    if(!*dst)
  ------------------
  |  Branch (1649:8): [True: 0, False: 38]
  ------------------
 1650|      0|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 1651|     38|    *dstSize = length;
 1652|       |
 1653|       |    /* Go to first array member. */
 1654|     38|    ctx->index += 1 + ctx->tokens[ctx->index].attributes;
 1655|       |
 1656|       |    /* Decode array members */
 1657|     38|    uintptr_t ptr = (uintptr_t)*dst;
 1658|     38|    for(size_t i = 0; i < length; ++i) {
  ------------------
  |  Branch (1658:23): [True: 28, False: 10]
  ------------------
 1659|     28|        status ret = decodeXmlJumpTable[type->typeKind](ctx, (void*)ptr, type);
 1660|     28|        if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|     28|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1660:12): [True: 28, False: 0]
  ------------------
 1661|     28|            return ret;
 1662|      0|        ptr += type->memSize;
 1663|      0|    }
 1664|       |
 1665|     10|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     10|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1666|     38|}
ua_types_encoding_xml.c:Variant_decodeXml:
 1856|  4.48k|DECODE_XML(Variant) {
 1857|  4.48k|    UA_Variant *dst = (UA_Variant*)dst_;
 1858|  4.48k|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  941|  4.48k|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (941:8): [True: 0, False: 4.48k]
  |  |  ------------------
  |  |  942|  4.48k|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  943|  4.48k|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (943:18): [Folded, False: 4.48k]
  |  |  ------------------
  ------------------
 1859|       |
 1860|  4.48k|    if(ctx->depth >= UA_XML_ENCODING_MAX_RECURSION)
  ------------------
  |  |   15|  4.48k|#define UA_XML_ENCODING_MAX_RECURSION 100
  ------------------
  |  Branch (1860:8): [True: 0, False: 4.48k]
  ------------------
 1861|      0|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
 1862|       |
 1863|  4.48k|    xml_token *tok = &ctx->tokens[ctx->index];
 1864|  4.48k|    if(tok->children == 0)
  ------------------
  |  Branch (1864:8): [True: 51, False: 4.43k]
  ------------------
 1865|     51|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     51|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1866|  4.43k|    if(tok->children != 1 || ctx->index + 2 >= ctx->tokensSize)
  ------------------
  |  Branch (1866:8): [True: 128, False: 4.31k]
  |  Branch (1866:30): [True: 2, False: 4.30k]
  ------------------
 1867|    130|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    130|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1868|       |
 1869|  4.30k|    ctx->index += 1 + ctx->tokens[ctx->index].attributes;
 1870|  4.30k|    tok = &ctx->tokens[ctx->index];
 1871|  4.30k|    static UA_String valName = UA_STRING_STATIC("Value");
  ------------------
  |  |  224|  4.30k|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1872|  4.30k|    if(!UA_String_equal(&tok->name, &valName))
  ------------------
  |  Branch (1872:8): [True: 48, False: 4.26k]
  ------------------
 1873|     48|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     48|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1874|  4.26k|    return decodeXmlVariantValue(ctx, dst);
 1875|  4.30k|}
ua_types_encoding_xml.c:DiagnosticInfo_decodeXml:
 1919|      2|DECODE_XML(DiagnosticInfo) {
 1920|      2|    UA_DiagnosticInfo *dst = (UA_DiagnosticInfo*)dst_;
 1921|      2|    XmlDecodeEntry entries[7] = {
 1922|      2|        {UA_STRING_STATIC("SymbolicId"), &dst->symbolicId, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1923|      2|         &UA_TYPES[UA_TYPES_INT32]},
  ------------------
  |  |  198|      2|#define UA_TYPES_INT32 5
  ------------------
 1924|      2|        {UA_STRING_STATIC("NamespaceUri"), &dst->namespaceUri, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1925|      2|         &UA_TYPES[UA_TYPES_INT32]},
  ------------------
  |  |  198|      2|#define UA_TYPES_INT32 5
  ------------------
 1926|      2|        {UA_STRING_STATIC("LocalizedText"), &dst->localizedText, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1927|      2|         &UA_TYPES[UA_TYPES_INT32]},
  ------------------
  |  |  198|      2|#define UA_TYPES_INT32 5
  ------------------
 1928|      2|        {UA_STRING_STATIC("Locale"), &dst->locale, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1929|      2|         &UA_TYPES[UA_TYPES_INT32]},
  ------------------
  |  |  198|      2|#define UA_TYPES_INT32 5
  ------------------
 1930|      2|        {UA_STRING_STATIC("AdditionalInfo"), &dst->additionalInfo, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1931|      2|         &UA_TYPES[UA_TYPES_STRING]},
  ------------------
  |  |  402|      2|#define UA_TYPES_STRING 11
  ------------------
 1932|      2|        {UA_STRING_STATIC("InnerStatusCode"), &dst->innerStatusCode, NULL, false,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1933|      2|         &UA_TYPES[UA_TYPES_STATUSCODE]},
  ------------------
  |  |  640|      2|#define UA_TYPES_STATUSCODE 18
  ------------------
 1934|      2|        {UA_STRING_STATIC("InnerDiagnosticInfo"), &dst->innerDiagnosticInfo,
  ------------------
  |  |  224|      2|#define UA_STRING_STATIC(CHARS) {sizeof(CHARS)-1, (UA_Byte*)CHARS}
  ------------------
 1935|      2|         DiagnosticInfoInner_decodeXml, false, NULL}
 1936|      2|    };
 1937|      2|    status ret = decodeXmlFields(ctx, entries, 7);
 1938|      2|    dst->hasSymbolicId = entries[0].found;
 1939|      2|    dst->hasNamespaceUri = entries[1].found;
 1940|      2|    dst->hasLocalizedText = entries[2].found;
 1941|      2|    dst->hasLocale = entries[3].found;
 1942|      2|    dst->hasAdditionalInfo = entries[4].found;
 1943|      2|    dst->hasInnerStatusCode = entries[5].found;
 1944|      2|    dst->hasInnerDiagnosticInfo = entries[6].found;
 1945|      2|    return ret;
 1946|      2|}
ua_types_encoding_xml.c:Enum_decodeXml:
 1093|     23|Enum_decodeXml(ParseCtxXml *ctx, void *dst, const UA_DataType *type) {
 1094|     23|    CHECK_DATA_BOUNDS;
  ------------------
  |  |  941|     23|    if(ctx->index >= ctx->tokensSize)               \
  |  |  ------------------
  |  |  |  Branch (941:8): [True: 0, False: 23]
  |  |  ------------------
  |  |  942|     23|        return UA_STATUSCODE_BADDECODINGERROR;      \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  |  943|     23|    do { } while(0)
  |  |  ------------------
  |  |  |  Branch (943:18): [Folded, False: 23]
  |  |  ------------------
  ------------------
 1095|     23|    GET_ELEM_CONTENT;
  ------------------
  |  |  946|     23|    const UA_Byte *data = ctx->tokens[ctx->index].content.data;    \
  |  |  947|     23|    size_t length = ctx->tokens[ctx->index].content.length;        \
  |  |  948|     23|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (948:17): [Folded, False: 23]
  |  |  ------------------
  ------------------
 1096|     23|    skipXmlObject(ctx);
 1097|       |
 1098|    175|    for(size_t i = 0; i < type->membersSize; i++) {
  ------------------
  |  Branch (1098:23): [True: 152, False: 23]
  ------------------
 1099|    152|        const UA_DataTypeMember *m = &type->members[i];
 1100|    152|        size_t nameLength = strlen(m->memberName);
 1101|    152|        if(length <= nameLength + 1 || data[nameLength] != '_' ||
  ------------------
  |  Branch (1101:12): [True: 152, False: 0]
  |  Branch (1101:40): [True: 0, False: 0]
  ------------------
 1102|      0|           memcmp(data, m->memberName, nameLength) != 0)
  ------------------
  |  Branch (1102:12): [True: 0, False: 0]
  ------------------
 1103|    152|            continue;
 1104|      0|        UA_Int64 value = 0;
 1105|      0|        UA_StatusCode ret = decodeSigned(&data[nameLength + 1],
 1106|      0|                                         length - nameLength - 1, &value);
 1107|      0|        UA_Int32 expected = (UA_Int32)(uintptr_t)m->memberType;
 1108|      0|        if(ret == UA_STATUSCODE_GOOD && value == expected) {
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1108:12): [True: 0, False: 0]
  |  Branch (1108:41): [True: 0, False: 0]
  ------------------
 1109|      0|            *(UA_Int32*)dst = expected;
 1110|      0|            return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1111|      0|        }
 1112|      0|    }
 1113|       |
 1114|       |    /* Be lenient with XML produced by implementations that encode enum values
 1115|       |     * as bare integers instead of the schema-defined "Name_Value" form. */
 1116|     23|    UA_Int64 value = 0;
 1117|     23|    UA_StatusCode ret = decodeSigned(data, length, &value);
 1118|     23|    if(ret == UA_STATUSCODE_GOOD && value >= UA_INT32_MIN && value <= UA_INT32_MAX) {
  ------------------
  |  |   17|     46|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  if(ret == UA_STATUSCODE_GOOD && value >= UA_INT32_MIN && value <= UA_INT32_MAX) {
  ------------------
  |  |  100|     23|#define UA_INT32_MIN ((int32_t)-2147483648LL)
  ------------------
                  if(ret == UA_STATUSCODE_GOOD && value >= UA_INT32_MIN && value <= UA_INT32_MAX) {
  ------------------
  |  |  101|      0|#define UA_INT32_MAX 2147483647L
  ------------------
  |  Branch (1118:8): [True: 0, False: 23]
  |  Branch (1118:37): [True: 0, False: 0]
  |  Branch (1118:62): [True: 0, False: 0]
  ------------------
 1119|      0|        *(UA_Int32*)dst = (UA_Int32)value;
 1120|      0|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1121|      0|    }
 1122|     23|    return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     23|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1123|     23|}
ua_types_encoding_xml.c:decodeXmlStructure:
 1951|    144|decodeXmlStructure(ParseCtxXml *ctx, void *dst, const UA_DataType *type) {
 1952|       |    /* Check the recursion limit */
 1953|    144|    if(ctx->depth >= UA_XML_ENCODING_MAX_RECURSION - 1)
  ------------------
  |  |   15|    144|#define UA_XML_ENCODING_MAX_RECURSION 100
  ------------------
  |  Branch (1953:8): [True: 0, False: 144]
  ------------------
 1954|      0|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
 1955|    144|    ctx->depth++;
 1956|       |
 1957|    144|    uintptr_t ptr = (uintptr_t)dst;
 1958|    144|    status ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    144|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1959|    144|    size_t membersSize = type->membersSize;
 1960|    144|    UA_STACKARRAY(XmlDecodeEntry, entries, membersSize);
  ------------------
  |  |  375|    144|#  define UA_STACKARRAY(TYPE, NAME, SIZE) TYPE NAME[SIZE]
  ------------------
 1961|    908|    for(size_t i = 0; i < membersSize; ++i) {
  ------------------
  |  Branch (1961:23): [True: 764, False: 144]
  ------------------
 1962|    764|        const UA_DataTypeMember *m = &type->members[i];
 1963|    764|        const UA_DataType *mt = m->memberType;
 1964|    764|        entries[i].type = mt;
 1965|    764|        entries[i].name = UA_STRING((char*)(uintptr_t)m->memberName);
 1966|    764|        entries[i].found = false;
 1967|    764|        ptr += m->padding;
 1968|    764|        entries[i].fieldPointer = (void*)ptr;
 1969|    764|        if(!m->isArray && !m->isOptional) {
  ------------------
  |  Branch (1969:12): [True: 634, False: 130]
  |  Branch (1969:27): [True: 634, False: 0]
  ------------------
 1970|    634|            entries[i].function = NULL;
 1971|    634|            ptr += mt->memSize;
 1972|    634|        } else if(m->isArray) {
  ------------------
  |  Branch (1972:19): [True: 130, False: 0]
  ------------------
 1973|    130|            entries[i].function = Array_decodeXml;
 1974|    130|            ptr += sizeof(size_t) + sizeof(void*);
 1975|    130|        } else {
 1976|      0|            entries[i].function = Optional_decodeXml;
 1977|      0|            ptr += sizeof(void*);
 1978|      0|        }
 1979|    764|    }
 1980|       |
 1981|    144|    ret = decodeXmlFields(ctx, entries, membersSize);
 1982|       |
 1983|    144|    if(ctx->depth == 0)
  ------------------
  |  Branch (1983:8): [True: 0, False: 144]
  ------------------
 1984|      0|        return UA_STATUSCODE_BADENCODINGERROR;
  ------------------
  |  |   41|      0|#define UA_STATUSCODE_BADENCODINGERROR ((UA_StatusCode) 0x80060000)
  ------------------
 1985|    144|    ctx->depth--;
 1986|    144|    return ret;
 1987|    144|}

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

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

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

fuzz_xml_decode_encode.cc:_ZL15UA_Variant_initP10UA_Variant:
  243|  7.68k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
fuzz_xml_decode_encode.cc:_ZL16UA_Variant_clearP10UA_Variant:
  243|  3.16k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
fuzz_xml_decode_encode.cc:_ZL19UA_ByteString_clearP9UA_String:
  243|  3.11k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types.c:UA_ByteString_init:
  243|  3.66k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types.c:UA_ExtensionObject_init:
  243|    288|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_xml.c:UA_String_clear:
  243|    217|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_xml.c:UA_String_copy:
  243|    536|# 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|  8.71k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_xml.c:UA_NodeId_equal:
  243|  35.1k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_xml.c:UA_ExtensionObject_clear:
  243|     72|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl

