UA_base64_buf:
   36|    498|UA_base64_buf(const unsigned char *src, size_t len, unsigned char *out) {
   37|    498|    const unsigned char *end = src + len;
   38|    498|    const unsigned char *in = src;
   39|    498|    unsigned char *pos = out;
   40|    500|    while(end - in >= 3) {
  ------------------
  |  Branch (40:11): [True: 2, False: 498]
  ------------------
   41|      2|        *pos++ = base64_table[in[0] >> 2];
   42|      2|        *pos++ = base64_table[((in[0] & 0x03) << 4) | (in[1] >> 4)];
   43|      2|        *pos++ = base64_table[((in[1] & 0x0f) << 2) | (in[2] >> 6)];
   44|      2|        *pos++ = base64_table[in[2] & 0x3f];
   45|      2|        in += 3;
   46|      2|    }
   47|       |
   48|    498|    if(end - in) {
  ------------------
  |  Branch (48:8): [True: 130, False: 368]
  ------------------
   49|    130|        *pos++ = base64_table[in[0] >> 2];
   50|    130|        if(end - in == 1) {
  ------------------
  |  Branch (50:12): [True: 0, False: 130]
  ------------------
   51|      0|            *pos++ = base64_table[(in[0] & 0x03) << 4];
   52|      0|            *pos++ = '=';
   53|    130|        } else {
   54|    130|            *pos++ = base64_table[((in[0] & 0x03) << 4) | (in[1] >> 4)];
   55|    130|            *pos++ = base64_table[(in[1] & 0x0f) << 2];
   56|    130|        }
   57|    130|        *pos++ = '=';
   58|    130|    }
   59|       |
   60|    498|    return (size_t)(pos - out);
   61|    498|}
UA_unbase64:
   75|    529|UA_unbase64(const unsigned char *src, size_t len, size_t *out_len) {
   76|       |    /* Empty base64 results in an empty byte-string */
   77|    529|    if(len == 0) {
  ------------------
  |  Branch (77:8): [True: 368, False: 161]
  ------------------
   78|    368|        *out_len = 0;
   79|    368|        return (unsigned char*)UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|    368|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
   80|    368|    }
   81|       |
   82|       |    /* Allocate the output string. Append four bytes to allow missing padding */
   83|    161|    size_t olen = (len / 4 * 3) + 4;
   84|    161|    unsigned char *out = (unsigned char*)UA_malloc(olen);
  ------------------
  |  |   18|    161|#define UA_malloc(size) UA_mallocSingleton(size)
  ------------------
   85|    161|    if(!out)
  ------------------
  |  Branch (85:8): [True: 21, False: 140]
  ------------------
   86|     21|        return NULL;
   87|       |
   88|       |    /* Iterate over the input */
   89|    140|    size_t pad = 0;
   90|    140|    unsigned char count = 0;
   91|    140|    unsigned char block[4];
   92|    140|    unsigned char *pos = out;
   93|  5.20k|    for(size_t i = 0; i < len; i++) {
  ------------------
  |  Branch (93:23): [True: 5.07k, False: 130]
  ------------------
   94|  5.07k|        if(src[i] & 0x80)
  ------------------
  |  Branch (94:12): [True: 6, False: 5.07k]
  ------------------
   95|      6|            goto error; /* Non-ASCII input */
   96|  5.07k|        unsigned char tmp = dtable[src[i]];
   97|  5.07k|        if(tmp == 0x80)
  ------------------
  |  Branch (97:12): [True: 3, False: 5.06k]
  ------------------
   98|      3|            goto error; /* Not an allowed character */
   99|  5.06k|        if(tmp == 0x7f)
  ------------------
  |  Branch (99:12): [True: 0, False: 5.06k]
  ------------------
  100|      0|            continue; /* Whitespace is ignored to accomodate RFC 2045, used in
  101|       |                       * XML for xs:base64Binary. */
  102|  5.06k|        block[count++] = tmp;
  103|       |
  104|       |        /* Padding */
  105|  5.06k|        if(src[i] == '=') {
  ------------------
  |  Branch (105:12): [True: 131, False: 4.93k]
  ------------------
  106|    131|            if(count < 3) /* Padding can only be the last two bytes of a block */
  ------------------
  |  Branch (106:16): [True: 1, False: 130]
  ------------------
  107|      1|                goto error;
  108|    130|            block[count-1] = 0;
  109|    130|            pad++;
  110|  4.93k|        } else if(pad > 0) {
  ------------------
  |  Branch (110:19): [True: 0, False: 4.93k]
  ------------------
  111|      0|            goto error; /* Padding not terminated correctly */
  112|      0|        }
  113|       |
  114|       |        /* Write three output characters for four characters of input */
  115|  5.06k|        if(count == 4) {
  ------------------
  |  Branch (115:12): [True: 1.26k, False: 3.80k]
  ------------------
  116|  1.26k|            if(pad > 2)
  ------------------
  |  Branch (116:16): [True: 0, False: 1.26k]
  ------------------
  117|      0|                goto error; /* Invalid padding */
  118|  1.26k|            *pos++ = (block[0] << 2) | (block[1] >> 4);
  119|  1.26k|            *pos++ = (block[1] << 4) | (block[2] >> 2);
  120|  1.26k|            *pos++ = (block[2] << 6) | block[3];
  121|  1.26k|            count = 0;
  122|  1.26k|            pos -= pad;
  123|  1.26k|            pad = 0;
  124|  1.26k|        }
  125|  5.06k|    }
  126|       |
  127|       |    /* Input length not a multiple of four */
  128|    130|    if(count > 0)
  ------------------
  |  Branch (128:8): [True: 0, False: 130]
  ------------------
  129|      0|        goto error;
  130|       |
  131|    130|    *out_len = (size_t)(pos - out);
  132|    130|    if(*out_len == 0) {
  ------------------
  |  Branch (132:8): [True: 0, False: 130]
  ------------------
  133|      0|        UA_free(out);
  ------------------
  |  |   19|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
  134|      0|        return (unsigned char*)UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|      0|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  135|      0|    }
  136|    130|    return out;
  137|       |
  138|     10| error:
  139|     10|    UA_free(out);
  ------------------
  |  |   19|     10|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
  140|       |    return NULL;
  141|    130|}

itoaUnsigned:
   42|    240|UA_UInt16 itoaUnsigned(UA_UInt64 value, char* buffer, UA_Byte base) {
   43|       |    /* consider absolute value of number */
   44|    240|    UA_UInt64 n = value;
   45|       |
   46|    240|    UA_UInt16 i = 0;
   47|    830|    while (n) {
  ------------------
  |  Branch (47:12): [True: 590, False: 240]
  ------------------
   48|    590|        UA_UInt64 r = n % base;
   49|       |
   50|    590|        if (r >= 10)
  ------------------
  |  Branch (50:13): [True: 0, False: 590]
  ------------------
   51|      0|            buffer[i++] = (char)(65 + (r - 10));
   52|    590|        else
   53|    590|            buffer[i++] = (char)(48 + r);
   54|       |
   55|    590|        n = n / base;
   56|    590|    }
   57|       |    /* if number is 0 */
   58|    240|    if (i == 0)
  ------------------
  |  Branch (58:9): [True: 76, False: 164]
  ------------------
   59|     76|        buffer[i++] = '0';
   60|       |
   61|    240|    buffer[i] = '\0'; /* null terminate string */
   62|    240|    i--;
   63|       |    /* reverse the string */
   64|    240|    reverse(buffer, 0, i);
   65|    240|    i++;
   66|    240|    return i;
   67|    240|}
itoa.c:reverse:
   34|    240|static char* reverse(char *buffer, UA_UInt16 i, UA_UInt16 j) {
   35|    478|    while (i < j)
  ------------------
  |  Branch (35:12): [True: 238, False: 240]
  ------------------
   36|    238|        swap(&buffer[i++], &buffer[j--]);
   37|       |
   38|    240|    return buffer;
   39|    240|}
itoa.c:swap:
   27|    238|static void swap(char *x, char *y) {
   28|    238|    char t = *x;
   29|    238|    *x = *y;
   30|    238|    *y = t;
   31|    238|}

UA_STRING:
  220|  7.67k|UA_STRING(char *chars) {
  221|  7.67k|    UA_String s = {0, NULL};
  222|  7.67k|    if(!chars)
  ------------------
  |  Branch (222:8): [True: 0, False: 7.67k]
  ------------------
  223|      0|        return s;
  224|  7.67k|    s.length = strlen(chars);
  225|  7.67k|    s.data = (UA_Byte*)chars;
  226|  7.67k|    return s;
  227|  7.67k|}
UA_String_append:
  299|  8.19k|UA_String_append(UA_String *s, const UA_String s2) {
  300|  8.19k|    if(s2.length == 0)
  ------------------
  |  Branch (300:8): [True: 36, False: 8.15k]
  ------------------
  301|     36|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     36|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  302|  8.15k|    UA_Byte *buf = (UA_Byte*)UA_realloc(s->data, s->length + s2.length);
  ------------------
  |  |   21|  8.15k|#define UA_realloc(ptr, size) UA_reallocSingleton(ptr, size)
  ------------------
  303|  8.15k|    if(!buf)
  ------------------
  |  Branch (303:8): [True: 0, False: 8.15k]
  ------------------
  304|      0|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
  305|  8.15k|    memcpy(buf + s->length, s2.data, s2.length);
  306|  8.15k|    s->data = buf;
  307|  8.15k|    s->length += s2.length;
  308|  8.15k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  8.15k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  309|  8.15k|}
UA_ByteString_allocBuffer:
  757|  1.35k|UA_ByteString_allocBuffer(UA_ByteString *bs, size_t length) {
  758|  1.35k|    UA_ByteString_init(bs);
  759|  1.35k|    if(length == 0) {
  ------------------
  |  Branch (759:8): [True: 0, False: 1.35k]
  ------------------
  760|      0|        bs->data = (u8*)UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|      0|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  761|      0|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  762|      0|    }
  763|  1.35k|    bs->data = (u8*)UA_calloc(1,length);
  ------------------
  |  |   20|  1.35k|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
  764|  1.35k|    if(UA_UNLIKELY(!bs->data))
  ------------------
  |  |  580|  1.35k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  ------------------
  |  |  |  Branch (580:25): [True: 0, False: 1.35k]
  |  |  ------------------
  ------------------
  765|      0|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
  766|  1.35k|    bs->length = length;
  767|  1.35k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  1.35k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  768|  1.35k|}
UA_NODEID_NUMERIC:
  830|  1.46k|UA_NODEID_NUMERIC(UA_UInt16 nsIndex, UA_UInt32 identifier) {
  831|  1.46k|    UA_NodeId id;
  832|  1.46k|    memset(&id, 0, sizeof(UA_NodeId));
  833|  1.46k|    id.namespaceIndex = nsIndex;
  834|  1.46k|    id.identifierType = UA_NODEIDTYPE_NUMERIC;
  835|  1.46k|    id.identifier.numeric = identifier;
  836|  1.46k|    return id;
  837|  1.46k|}
nodeId_printEscape:
 1024|  4.42k|                   const UA_NamespaceMapping *nsMapping, UA_Escaping idEsc) {
 1025|       |    /* Try to map the NamespaceIndex to the Uri */
 1026|  4.42k|    UA_String nsUri = UA_STRING_NULL;
 1027|  4.42k|    if(id->namespaceIndex > 0 && nsMapping)
  ------------------
  |  Branch (1027:8): [True: 94, False: 4.32k]
  |  Branch (1027:34): [True: 0, False: 94]
  ------------------
 1028|      0|        UA_NamespaceMapping_index2Uri(nsMapping, id->namespaceIndex, &nsUri);
 1029|       |
 1030|       |    /* Compute the string length and print numerical identifiers. */
 1031|  4.42k|    u8 nsStr[7];
 1032|  4.42k|    u8 numIdStr[12];
 1033|  4.42k|    size_t idLen = nodeIdSize(id, nsStr, numIdStr, nsUri, idEsc);
 1034|  4.42k|    if(idLen == 0)
  ------------------
  |  Branch (1034:8): [True: 0, False: 4.42k]
  ------------------
 1035|      0|        return UA_STATUSCODE_BADINTERNALERROR;
  ------------------
  |  |   29|      0|#define UA_STATUSCODE_BADINTERNALERROR ((UA_StatusCode) 0x80020000)
  ------------------
 1036|       |
 1037|       |    /* Allocate memory if required */
 1038|  4.42k|    if(output->length == 0) {
  ------------------
  |  Branch (1038:8): [True: 1.35k, False: 3.07k]
  ------------------
 1039|  1.35k|        UA_StatusCode res = UA_ByteString_allocBuffer((UA_ByteString*)output, idLen);
 1040|  1.35k|        if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  1.35k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1040:12): [True: 0, False: 1.35k]
  ------------------
 1041|      0|            return res;
 1042|  3.07k|    } else {
 1043|  3.07k|        if(output->length < idLen)
  ------------------
  |  Branch (1043:12): [True: 1.35k, False: 1.71k]
  ------------------
 1044|  1.35k|            return UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED;
  ------------------
  |  |   47|  1.35k|#define UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED ((UA_StatusCode) 0x80080000)
  ------------------
 1045|  1.71k|        output->length = idLen;
 1046|  1.71k|    }
 1047|       |
 1048|       |    /* Print the NodeId */
 1049|  3.07k|    u8 *pos = printNodeIdBody(id, nsUri, nsStr, numIdStr, output->data, nsMapping, idEsc);
 1050|  3.07k|    output->length = (size_t)(pos - output->data);
 1051|  3.07k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  3.07k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1052|  4.42k|}
UA_NodeId_printEx:
 1056|  4.26k|                  const UA_NamespaceMapping *nsMapping) {
 1057|  4.26k|    return nodeId_printEscape(id, output, nsMapping, UA_ESCAPING_NONE);
 1058|  4.26k|}
UA_NodeId_print:
 1061|  4.26k|UA_NodeId_print(const UA_NodeId *id, UA_String *output) {
 1062|       |    return UA_NodeId_printEx(id, output, NULL);
 1063|  4.26k|}
UA_copy:
 2097|  9.07k|UA_copy(const void *src, void *dst, const UA_DataType *type) {
 2098|  9.07k|    memset(dst, 0, type->memSize); /* init */
 2099|  9.07k|    UA_StatusCode retval = copyJumpTable[type->typeKind](src, dst, type);
 2100|  9.07k|    if(retval != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  9.07k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2100:8): [True: 34, False: 9.03k]
  ------------------
 2101|     34|        UA_clear(dst, type);
 2102|  9.07k|    return retval;
 2103|  9.07k|}
UA_clear:
 2200|  8.13k|UA_clear(void *p, const UA_DataType *type) {
 2201|  8.13k|    clearJumpTable[type->typeKind](p, type);
 2202|  8.13k|    memset(p, 0, type->memSize); /* init */
 2203|  8.13k|}
UA_order:
 2674|  7.43k|UA_Order UA_order(const void *p1, const void *p2, const UA_DataType *type) {
 2675|  7.43k|    return orderJumpTable[type->typeKind](p1, p2, type);
 2676|  7.43k|}
UA_equal:
 2679|    156|UA_equal(const void *p1, const void *p2, const UA_DataType *type) {
 2680|    156|    return (UA_order(p1, p2, type) == UA_ORDER_EQ);
 2681|    156|}
UA_Array_copy:
 2698|  9.07k|              void **dst, const UA_DataType *type) {
 2699|  9.07k|    if(size == 0) {
  ------------------
  |  Branch (2699:8): [True: 4.05k, False: 5.01k]
  ------------------
 2700|  4.05k|        if(src == NULL)
  ------------------
  |  Branch (2700:12): [True: 0, False: 4.05k]
  ------------------
 2701|      0|            *dst = NULL;
 2702|  4.05k|        else
 2703|  4.05k|            *dst= UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|  4.05k|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
 2704|  4.05k|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  4.05k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2705|  4.05k|    }
 2706|       |
 2707|       |    /* Check the array consistency -- defensive programming in case the user
 2708|       |     * manually created an inconsistent array */
 2709|  5.01k|    if(UA_UNLIKELY(!type || !src))
  ------------------
  |  |  580|  10.0k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  ------------------
  |  |  |  Branch (580:25): [True: 0, False: 5.01k]
  |  |  |  Branch (580:43): [True: 0, False: 5.01k]
  |  |  |  Branch (580:43): [True: 0, False: 5.01k]
  |  |  ------------------
  ------------------
 2710|      0|        return UA_STATUSCODE_BADINTERNALERROR;
  ------------------
  |  |   29|      0|#define UA_STATUSCODE_BADINTERNALERROR ((UA_StatusCode) 0x80020000)
  ------------------
 2711|       |
 2712|       |    /* calloc, so we don't have to check retval in every iteration of copying */
 2713|  5.01k|    *dst = UA_calloc(size, type->memSize);
  ------------------
  |  |   20|  5.01k|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
 2714|  5.01k|    if(!*dst)
  ------------------
  |  Branch (2714:8): [True: 34, False: 4.98k]
  ------------------
 2715|     34|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|     34|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 2716|       |
 2717|  4.98k|    if(type->pointerFree) {
  ------------------
  |  Branch (2717:8): [True: 4.98k, False: 0]
  ------------------
 2718|  4.98k|        memcpy(*dst, src, type->memSize * size);
 2719|  4.98k|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  4.98k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2720|  4.98k|    }
 2721|       |
 2722|      0|    uintptr_t ptrs = (uintptr_t)src;
 2723|      0|    uintptr_t ptrd = (uintptr_t)*dst;
 2724|      0|    UA_StatusCode retval = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2725|      0|    for(size_t i = 0; i < size; ++i) {
  ------------------
  |  Branch (2725:23): [True: 0, False: 0]
  ------------------
 2726|      0|        retval |= UA_copy((void*)ptrs, (void*)ptrd, type);
 2727|      0|        ptrs += type->memSize;
 2728|      0|        ptrd += type->memSize;
 2729|      0|    }
 2730|      0|    if(retval != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2730:8): [True: 0, False: 0]
  ------------------
 2731|      0|        UA_Array_delete(*dst, size, type);
 2732|       |        *dst = NULL;
 2733|      0|    }
 2734|      0|    return retval;
 2735|  4.98k|}
UA_Array_delete:
 2826|  12.9k|UA_Array_delete(void *p, size_t size, const UA_DataType *type) {
 2827|  12.9k|    if(!type->pointerFree) {
  ------------------
  |  Branch (2827:8): [True: 428, False: 12.4k]
  ------------------
 2828|    428|        uintptr_t ptr = (uintptr_t)p;
 2829|  5.37k|        for(size_t i = 0; i < size; ++i) {
  ------------------
  |  Branch (2829:27): [True: 4.94k, False: 428]
  ------------------
 2830|  4.94k|            UA_clear((void*)ptr, type);
 2831|  4.94k|            ptr += type->memSize;
 2832|  4.94k|        }
 2833|    428|    }
 2834|  12.9k|    UA_free((void*)((uintptr_t)p & ~(uintptr_t)UA_EMPTY_ARRAY_SENTINEL));
  ------------------
  |  |   19|  12.9k|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 2835|  12.9k|}
ua_types.c:nodeIdSize:
  923|  4.42k|           UA_Escaping idEsc) {
  924|       |    /* Namespace length */
  925|  4.42k|    size_t len = 0;
  926|  4.42k|    if(nsUri.data != NULL) {
  ------------------
  |  Branch (926:8): [True: 0, False: 4.42k]
  ------------------
  927|      0|        len += 5; /* nsu=; */
  928|      0|        len += UA_String_escapedSize(nsUri, UA_ESCAPING_PERCENT);
  929|  4.42k|    } else if(id->namespaceIndex > 0) {
  ------------------
  |  Branch (929:15): [True: 94, False: 4.32k]
  ------------------
  930|     94|        len += 4; /* ns=; */
  931|     94|        size_t nsStrSize = itoaUnsigned(id->namespaceIndex, (char*)nsStr, 10);
  932|     94|        nsStr[nsStrSize] = 0;
  933|     94|        len += nsStrSize;
  934|     94|    }
  935|       |
  936|  4.42k|    len += 2; /* ?= */
  937|       |
  938|  4.42k|    switch (id->identifierType) {
  939|    130|    case UA_NODEIDTYPE_NUMERIC: {
  ------------------
  |  Branch (939:5): [True: 130, False: 4.29k]
  ------------------
  940|    130|        size_t numIdStrSize = itoaUnsigned(id->identifier.numeric, (char*)numIdStr, 10);
  941|    130|        numIdStr[numIdStrSize] = 0;
  942|    130|        len += numIdStrSize;
  943|    130|        break;
  944|      0|    }
  945|  3.79k|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (945:5): [True: 3.79k, False: 628]
  ------------------
  946|  3.79k|        len += UA_String_escapedSize(id->identifier.string, idEsc);
  947|  3.79k|        break;
  948|      0|    case UA_NODEIDTYPE_GUID:
  ------------------
  |  Branch (948:5): [True: 0, False: 4.42k]
  ------------------
  949|      0|        len += 36;
  950|      0|        break;
  951|    498|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (951:5): [True: 498, False: 3.92k]
  ------------------
  952|    498|        len += 4 * ((id->identifier.byteString.length + 2) / 3);
  953|    498|        break;
  954|      0|    default:
  ------------------
  |  Branch (954:5): [True: 0, False: 4.42k]
  ------------------
  955|      0|        len = 0;
  956|  4.42k|    }
  957|  4.42k|    return len;
  958|  4.42k|}
ua_types.c:printNodeIdBody:
  962|  3.07k|                const UA_NamespaceMapping *nsMapping, UA_Escaping idEsc) {
  963|  3.07k|    size_t len;
  964|       |
  965|       |    /* Encode the namespace */
  966|  3.07k|    if(nsUri.data != NULL) {
  ------------------
  |  Branch (966:8): [True: 0, False: 3.07k]
  ------------------
  967|      0|        memcpy(pos, "nsu=", 4);
  968|      0|        pos += 4;
  969|      0|        pos += UA_String_escapeInsert(pos, nsUri, UA_ESCAPING_PERCENT);
  970|      0|        *pos++ = ';';
  971|  3.07k|    } else if(id->namespaceIndex > 0) {
  ------------------
  |  Branch (971:15): [True: 94, False: 2.97k]
  ------------------
  972|     94|        memcpy(pos, "ns=", 3);
  973|     94|        pos += 3;
  974|     94|        len = strlen((char*)nsStr);
  975|     94|        memcpy(pos, nsStr, len);
  976|     94|        pos += len;
  977|     94|        *pos++ = ';';
  978|     94|    }
  979|       |
  980|       |    /* Encode the identifier */
  981|  3.07k|    switch(id->identifierType) {
  ------------------
  |  Branch (981:12): [True: 3.07k, False: 0]
  ------------------
  982|    130|    case UA_NODEIDTYPE_NUMERIC:
  ------------------
  |  Branch (982:5): [True: 130, False: 2.94k]
  ------------------
  983|    130|        memcpy(pos, "i=", 2);
  984|    130|        pos += 2;
  985|    130|        len = strlen((char*)numIdStr);
  986|    130|        memcpy(pos, numIdStr, len);
  987|    130|        pos += len;
  988|    130|        break;
  989|  2.44k|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (989:5): [True: 2.44k, False: 628]
  ------------------
  990|  2.44k|        memcpy(pos, "s=", 2);
  991|  2.44k|        pos += 2;
  992|  2.44k|        pos += UA_String_escapeInsert(pos, id->identifier.string, idEsc);
  993|  2.44k|        break;
  994|      0|    case UA_NODEIDTYPE_GUID:
  ------------------
  |  Branch (994:5): [True: 0, False: 3.07k]
  ------------------
  995|      0|        memcpy(pos, "g=", 2);
  996|      0|        pos += 2;
  997|      0|        UA_Guid_to_hex(&id->identifier.guid, pos, true);
  998|      0|        pos += 36;
  999|      0|        break;
 1000|    498|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (1000:5): [True: 498, False: 2.57k]
  ------------------
 1001|    498|        memcpy(pos, "b=", 2);
 1002|    498|        pos += 2;
 1003|       |        /* Use base64url encoding for percent-escaping.
 1004|       |         * Replace +/ with -_ and remove the padding. */
 1005|    498|        u8 *bpos = pos;
 1006|    498|        pos += UA_base64_buf(id->identifier.byteString.data,
 1007|    498|                             id->identifier.byteString.length, pos);
 1008|    498|        if(idEsc == UA_ESCAPING_PERCENT ||
  ------------------
  |  Branch (1008:12): [True: 0, False: 498]
  ------------------
 1009|    498|           idEsc == UA_ESCAPING_PERCENT_EXTENDED) {
  ------------------
  |  Branch (1009:12): [True: 0, False: 498]
  ------------------
 1010|      0|            while(pos > bpos && pos[-1] == '=')
  ------------------
  |  Branch (1010:19): [True: 0, False: 0]
  |  Branch (1010:33): [True: 0, False: 0]
  ------------------
 1011|      0|                pos--;
 1012|      0|            for(; bpos < pos; bpos++) {
  ------------------
  |  Branch (1012:19): [True: 0, False: 0]
  ------------------
 1013|      0|                if(*bpos == '+') *bpos = '-';
  ------------------
  |  Branch (1013:20): [True: 0, False: 0]
  ------------------
 1014|      0|                else if(*bpos == '/') *bpos = '_';
  ------------------
  |  Branch (1014:25): [True: 0, False: 0]
  ------------------
 1015|      0|            }
 1016|      0|        }
 1017|    498|        break;
 1018|  3.07k|    }
 1019|  3.07k|    return pos;
 1020|  3.07k|}
ua_types.c:String_copy:
  281|  9.07k|String_copy(const void *src, void *dst, const UA_DataType *_) {
  282|  9.07k|    const UA_String *srcS = (const UA_String*)src;
  283|  9.07k|    UA_String *dstS = (UA_String *)dst;
  284|  9.07k|    UA_StatusCode res =
  285|  9.07k|        UA_Array_copy(srcS->data, srcS->length, (void**)&dstS->data,
  286|  9.07k|                      &UA_TYPES[UA_TYPES_BYTE]);
  ------------------
  |  |   89|  9.07k|#define UA_TYPES_BYTE 2
  ------------------
  287|  9.07k|    if(res == UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  9.07k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (287:8): [True: 9.03k, False: 34]
  ------------------
  288|  9.03k|        dstS->length = srcS->length;
  289|  9.07k|    return res;
  290|  9.07k|}
ua_types.c:nopClear:
 2162|  10.4k|static void nopClear(void *p, const UA_DataType *type) { }
ua_types.c:String_clear:
  293|  12.4k|String_clear(void *p, const UA_DataType *_) {
  294|  12.4k|    UA_String *s = (UA_String*)p;
  295|  12.4k|    UA_Array_delete(s->data, s->length, &UA_TYPES[UA_TYPES_BYTE]);
  ------------------
  |  |   89|  12.4k|#define UA_TYPES_BYTE 2
  ------------------
  296|  12.4k|}
ua_types.c:NodeId_clear:
  772|  5.44k|NodeId_clear(void *p, const UA_DataType *_) {
  773|  5.44k|    UA_NodeId *id = (UA_NodeId*)p;
  774|  5.44k|    switch(id->identifierType) {
  775|  3.39k|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (775:5): [True: 3.39k, False: 2.04k]
  ------------------
  776|  3.92k|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (776:5): [True: 529, False: 4.91k]
  ------------------
  777|  3.92k|        String_clear(&id->identifier.string, NULL);
  778|  3.92k|        break;
  779|  1.51k|    default: break;
  ------------------
  |  Branch (779:5): [True: 1.51k, False: 3.92k]
  ------------------
  780|  5.44k|    }
  781|  5.44k|}
ua_types.c:QualifiedName_clear:
  397|  5.69k|QualifiedName_clear(void *p, const UA_DataType *_) {
  398|  5.69k|    UA_QualifiedName *qn = (UA_QualifiedName*)p;
  399|       |    String_clear(&qn->name, NULL);
  400|  5.69k|}
ua_types.c:clearStructure:
 2106|  5.87k|clearStructure(void *p, const UA_DataType *type) {
 2107|  5.87k|    uintptr_t ptr = (uintptr_t)p;
 2108|  28.4k|    for(size_t i = 0; i < type->membersSize; ++i) {
  ------------------
  |  Branch (2108:23): [True: 22.6k, False: 5.87k]
  ------------------
 2109|  22.6k|        const UA_DataTypeMember *m = &type->members[i];
 2110|  22.6k|        const UA_DataType *mt = m->memberType;
 2111|  22.6k|        ptr += m->padding;
 2112|  22.6k|        if(!m->isOptional) {
  ------------------
  |  Branch (2112:12): [True: 22.6k, False: 0]
  ------------------
 2113|  22.6k|            if(!m->isArray) {
  ------------------
  |  Branch (2113:16): [True: 22.2k, False: 428]
  ------------------
 2114|  22.2k|                clearJumpTable[mt->typeKind]((void*)ptr, mt);
 2115|  22.2k|                ptr += mt->memSize;
 2116|  22.2k|            } else {
 2117|    428|                size_t length = *(size_t*)ptr;
 2118|    428|                ptr += sizeof(size_t);
 2119|    428|                UA_Array_delete(*(void**)ptr, length, mt);
 2120|    428|                ptr += sizeof(void*);
 2121|    428|            }
 2122|  22.6k|        } else { /* field is optional */
 2123|      0|            if(!m->isArray) {
  ------------------
  |  Branch (2123:16): [True: 0, False: 0]
  ------------------
 2124|       |                /* optional scalar field is contained */
 2125|      0|                if((*(void *const *)ptr != NULL))
  ------------------
  |  Branch (2125:20): [True: 0, False: 0]
  ------------------
 2126|      0|                    UA_Array_delete(*(void **)ptr, 1, mt);
 2127|      0|                ptr += sizeof(void *);
 2128|      0|            } else {
 2129|       |                /* optional array field is contained */
 2130|      0|                if((*(void *const *)(ptr + sizeof(size_t)) != NULL)) {
  ------------------
  |  Branch (2130:20): [True: 0, False: 0]
  ------------------
 2131|      0|                    size_t length = *(size_t *)ptr;
 2132|      0|                    ptr += sizeof(size_t);
 2133|      0|                    UA_Array_delete(*(void **)ptr, length, mt);
 2134|      0|                    ptr += sizeof(void *);
 2135|      0|                } else { /* optional array field not contained */
 2136|      0|                    ptr += sizeof(size_t);
 2137|      0|                    ptr += sizeof(void *);
 2138|      0|                }
 2139|      0|            }
 2140|      0|        }
 2141|  22.6k|    }
 2142|  5.87k|}
ua_types.c:nodeIdOrder:
 2292|  6.02k|nodeIdOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2293|  6.02k|    const UA_NodeId *p1 = (const UA_NodeId*)p1_;
 2294|  6.02k|    const UA_NodeId *p2 = (const UA_NodeId*)p2_;
 2295|       |    /* Compare namespaceIndex */
 2296|  6.02k|    if(p1->namespaceIndex != p2->namespaceIndex)
  ------------------
  |  Branch (2296:8): [True: 94, False: 5.93k]
  ------------------
 2297|     94|        return (p1->namespaceIndex < p2->namespaceIndex) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2297:16): [True: 94, False: 0]
  ------------------
 2298|       |
 2299|       |    /* Compare identifierType */
 2300|  5.93k|    if(p1->identifierType != p2->identifierType)
  ------------------
  |  Branch (2300:8): [True: 2.94k, False: 2.99k]
  ------------------
 2301|  2.94k|        return (p1->identifierType < p2->identifierType) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2301:16): [True: 2.94k, False: 0]
  ------------------
 2302|       |
 2303|       |    /* Compare the identifier */
 2304|  2.99k|    switch(p1->identifierType) {
 2305|  1.52k|    case UA_NODEIDTYPE_NUMERIC:
  ------------------
  |  Branch (2305:5): [True: 1.52k, False: 1.47k]
  ------------------
 2306|  1.52k|    default:
  ------------------
  |  Branch (2306:5): [True: 0, False: 2.99k]
  ------------------
 2307|  1.52k|        if(p1->identifier.numeric != p2->identifier.numeric)
  ------------------
  |  Branch (2307:12): [True: 414, False: 1.10k]
  ------------------
 2308|    414|            return (p1->identifier.numeric < p2->identifier.numeric) ?
  ------------------
  |  Branch (2308:20): [True: 384, False: 30]
  ------------------
 2309|    384|                UA_ORDER_LESS : UA_ORDER_MORE;
 2310|  1.10k|        return UA_ORDER_EQ;
 2311|      0|    case UA_NODEIDTYPE_GUID:
  ------------------
  |  Branch (2311:5): [True: 0, False: 2.99k]
  ------------------
 2312|      0|        return guidOrder(&p1->identifier.guid, &p2->identifier.guid, NULL);
 2313|  1.22k|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (2313:5): [True: 1.22k, False: 1.76k]
  ------------------
 2314|  1.47k|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (2314:5): [True: 249, False: 2.74k]
  ------------------
 2315|       |        return stringOrder(&p1->identifier.string, &p2->identifier.string, NULL);
 2316|  2.99k|    }
 2317|  2.99k|}
ua_types.c:booleanOrder:
 2217|  3.70k|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2218|  3.70k|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2219|  3.70k|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2220|  3.70k|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2220:12): [True: 0, False: 3.70k]
  ------------------
 2221|  3.70k|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2221:20): [True: 0, False: 0]
  ------------------
 2222|  3.70k|        return UA_ORDER_EQ;                                               \
 2223|  3.70k|    }
ua_types.c:uInt32Order:
 2217|    156|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2218|    156|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2219|    156|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2220|    156|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2220:12): [True: 0, False: 156]
  ------------------
 2221|    156|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2221:20): [True: 0, False: 0]
  ------------------
 2222|    156|        return UA_ORDER_EQ;                                               \
 2223|    156|    }
ua_types.c:stringOrder:
 2275|  6.89k|stringOrder(const void *p1_, const void *p2_, const UA_DataType *type) {
 2276|  6.89k|    const UA_String *p1 = (const UA_String*)p1_;
 2277|  6.89k|    const UA_String *p2 = (const UA_String*)p2_;
 2278|  6.89k|    if(p1->length != p2->length)
  ------------------
  |  Branch (2278:8): [True: 2.48k, False: 4.41k]
  ------------------
 2279|  2.48k|        return (p1->length < p2->length) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2279:16): [True: 1.63k, False: 841]
  ------------------
 2280|       |    /* For zero-length arrays, every pointer not NULL is considered a
 2281|       |     * UA_EMPTY_ARRAY_SENTINEL. */
 2282|  4.41k|    if(p1->data == p2->data) return UA_ORDER_EQ;
  ------------------
  |  Branch (2282:8): [True: 2.10k, False: 2.31k]
  ------------------
 2283|  2.31k|    if(p1->data == NULL) return UA_ORDER_LESS;
  ------------------
  |  Branch (2283:8): [True: 0, False: 2.31k]
  ------------------
 2284|  2.31k|    if(p2->data == NULL) return UA_ORDER_MORE;
  ------------------
  |  Branch (2284:8): [True: 0, False: 2.31k]
  ------------------
 2285|  2.31k|    int cmp = memcmp((const char*)p1->data, (const char*)p2->data, p1->length);
 2286|  2.31k|    if(cmp != 0)
  ------------------
  |  Branch (2286:8): [True: 9, False: 2.30k]
  ------------------
 2287|      9|        return (cmp < 0) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2287:16): [True: 4, False: 5]
  ------------------
 2288|  2.30k|    return UA_ORDER_EQ;
 2289|  2.31k|}
ua_types.c:qualifiedNameOrder:
 2332|  1.85k|qualifiedNameOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2333|  1.85k|    const UA_QualifiedName *p1 = (const UA_QualifiedName*)p1_;
 2334|  1.85k|    const UA_QualifiedName *p2 = (const UA_QualifiedName*)p2_;
 2335|  1.85k|    if(p1->namespaceIndex != p2->namespaceIndex)
  ------------------
  |  Branch (2335:8): [True: 0, False: 1.85k]
  ------------------
 2336|      0|        return (p1->namespaceIndex < p2->namespaceIndex) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2336:16): [True: 0, False: 0]
  ------------------
 2337|  1.85k|    return stringOrder(&p1->name, &p2->name, NULL);
 2338|  1.85k|}
ua_types.c:arrayOrder:
 2401|    156|           const UA_DataType *type) {
 2402|    156|    if(p1Length != p2Length)
  ------------------
  |  Branch (2402:8): [True: 0, False: 156]
  ------------------
 2403|      0|        return (p1Length < p2Length) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2403:16): [True: 0, False: 0]
  ------------------
 2404|    156|    uintptr_t u1 = (uintptr_t)p1;
 2405|    156|    uintptr_t u2 = (uintptr_t)p2;
 2406|  2.00k|    for(size_t i = 0; i < p1Length; i++) {
  ------------------
  |  Branch (2406:23): [True: 1.85k, False: 156]
  ------------------
 2407|  1.85k|        UA_Order o = orderJumpTable[type->typeKind]((const void*)u1, (const void*)u2, type);
 2408|  1.85k|        if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2408:12): [True: 0, False: 1.85k]
  ------------------
 2409|      0|            return o;
 2410|  1.85k|        u1 += type->memSize;
 2411|  1.85k|        u2 += type->memSize;
 2412|  1.85k|    }
 2413|    156|    return UA_ORDER_EQ;
 2414|    156|}
ua_types.c:structureOrder:
 2555|  2.16k|structureOrder(const void *p1, const void *p2, const UA_DataType *type) {
 2556|  2.16k|    uintptr_t u1 = (uintptr_t)p1;
 2557|  2.16k|    uintptr_t u2 = (uintptr_t)p2;
 2558|  2.16k|    UA_Order o = UA_ORDER_EQ;
 2559|  10.5k|    for(size_t i = 0; i < type->membersSize; ++i) {
  ------------------
  |  Branch (2559:23): [True: 8.34k, False: 2.16k]
  ------------------
 2560|  8.34k|        const UA_DataTypeMember *m = &type->members[i];
 2561|  8.34k|        const UA_DataType *mt = m->memberType;
 2562|  8.34k|        u1 += m->padding;
 2563|  8.34k|        u2 += m->padding;
 2564|  8.34k|        if(!m->isOptional) {
  ------------------
  |  Branch (2564:12): [True: 8.34k, False: 0]
  ------------------
 2565|  8.34k|            if(!m->isArray) {
  ------------------
  |  Branch (2565:16): [True: 8.18k, False: 156]
  ------------------
 2566|  8.18k|                o = orderJumpTable[mt->typeKind]((const void *)u1, (const void *)u2, mt);
 2567|  8.18k|                u1 += mt->memSize;
 2568|  8.18k|                u2 += mt->memSize;
 2569|  8.18k|            } else {
 2570|    156|                size_t size1 = *(size_t*)u1;
 2571|    156|                size_t size2 = *(size_t*)u2;
 2572|    156|                u1 += sizeof(size_t);
 2573|    156|                u2 += sizeof(size_t);
 2574|    156|                o = arrayOrder(*(void* const*)u1, size1, *(void* const*)u2, size2, mt);
 2575|    156|                u1 += sizeof(void*);
 2576|    156|                u2 += sizeof(void*);
 2577|    156|            }
 2578|  8.34k|        } else {
 2579|      0|            if(!m->isArray) {
  ------------------
  |  Branch (2579:16): [True: 0, False: 0]
  ------------------
 2580|      0|                const void *pp1 = *(void* const*)u1;
 2581|      0|                const void *pp2 = *(void* const*)u2;
 2582|      0|                if(pp1 == pp2) {
  ------------------
  |  Branch (2582:20): [True: 0, False: 0]
  ------------------
 2583|      0|                    o = UA_ORDER_EQ;
 2584|      0|                } else if(pp1 == NULL) {
  ------------------
  |  Branch (2584:27): [True: 0, False: 0]
  ------------------
 2585|      0|                    o = UA_ORDER_LESS;
 2586|      0|                } else if(pp2 == NULL) {
  ------------------
  |  Branch (2586:27): [True: 0, False: 0]
  ------------------
 2587|      0|                    o = UA_ORDER_MORE;
 2588|      0|                } else {
 2589|      0|                    o = orderJumpTable[mt->typeKind](pp1, pp2, mt);
 2590|      0|                }
 2591|      0|            } else {
 2592|      0|                size_t sa1 = *(size_t*)u1;
 2593|      0|                size_t sa2 = *(size_t*)u2;
 2594|      0|                u1 += sizeof(size_t);
 2595|      0|                u2 += sizeof(size_t);
 2596|      0|                o = arrayOrder(*(void* const*)u1, sa1, *(void* const*)u2, sa2, mt);
 2597|      0|            }
 2598|      0|            u1 += sizeof(void*);
 2599|      0|            u2 += sizeof(void*);
 2600|      0|        }
 2601|       |
 2602|  8.34k|        if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2602:12): [True: 0, False: 8.34k]
  ------------------
 2603|      0|            break;
 2604|  8.34k|    }
 2605|  2.16k|    return o;
 2606|  2.16k|}

UA_AttributeOperand_parse:
 1220|    428|UA_AttributeOperand_parse(UA_AttributeOperand *ao, const UA_String str) {
 1221|       |    /* Objects folder is the default */
 1222|    428|    return parseAttributeOperand(ao, str, UA_NS0ID(OBJECTSFOLDER), 0);
  ------------------
  |  |  458|    428|#define UA_NS0ID(ID) UA_NODEID_NUMERIC(0, UA_NS0ID_##ID)
  |  |  ------------------
  |  |  |  |   81|    428|#define UA_NS0ID_OBJECTSFOLDER 85 /* Object */
  |  |  ------------------
  ------------------
 1223|    428|}
ua_types_lex.c:parse_guid:
   50|      9|parse_guid(UA_Guid *guid, const UA_Byte *s, const UA_Byte *e) {
   51|      9|    size_t len = (size_t)(e - s);
   52|      9|    if(len != 36 || s[8] != '-' || s[13] != '-' || s[23] != '-')
  ------------------
  |  Branch (52:8): [True: 9, False: 0]
  |  Branch (52:21): [True: 0, False: 0]
  |  Branch (52:36): [True: 0, False: 0]
  |  Branch (52:52): [True: 0, False: 0]
  ------------------
   53|      9|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      9|#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|  4.77k|             UA_Escaping idEsc, const UA_NamespaceMapping *nsMapping) {
  149|  4.77k|    *id = UA_NODEID_NULL; /* Reset the NodeId */
  150|  4.77k|    LexContext context;
  151|  4.77k|    memset(&context, 0, sizeof(LexContext));
  152|  4.77k|    UA_Byte *begin = (UA_Byte*)(uintptr_t)pos;
  153|  4.77k|    const u8 *ns = NULL, *nsu = NULL, *body = NULL;
  154|       |
  155|       |    
  156|  4.77k|{
  157|  4.77k|	u8 yych;
  158|  4.77k|	yych = YYPEEK();
  ------------------
  |  |   33|  4.77k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  4.77k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  4.77k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 4.77k, False: 0]
  |  |  ------------------
  ------------------
  159|  4.77k|	switch (yych) {
  160|    529|		case 'b':
  ------------------
  |  Branch (160:3): [True: 529, False: 4.24k]
  ------------------
  161|    538|		case 'g':
  ------------------
  |  Branch (161:3): [True: 9, False: 4.76k]
  ------------------
  162|    659|		case 'i':
  ------------------
  |  Branch (162:3): [True: 121, False: 4.65k]
  ------------------
  163|  3.07k|		case 's':
  ------------------
  |  Branch (163:3): [True: 2.41k, False: 2.36k]
  ------------------
  164|  3.07k|			YYSTAGN(context.yyt1);
  ------------------
  |  |   39|  3.07k|#define YYSTAGN(t) t = NULL
  ------------------
  165|  3.07k|			YYSTAGN(context.yyt2);
  ------------------
  |  |   39|  3.07k|#define YYSTAGN(t) t = NULL
  ------------------
  166|  3.07k|			goto yy3;
  167|  1.08k|		case 'n': goto yy4;
  ------------------
  |  Branch (167:3): [True: 1.08k, False: 3.69k]
  ------------------
  168|    626|		default: goto yy1;
  ------------------
  |  Branch (168:3): [True: 626, False: 4.15k]
  ------------------
  169|  4.77k|	}
  170|    626|yy1:
  171|    626|	YYSKIP();
  ------------------
  |  |   35|    626|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    626|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  172|    630|yy2:
  173|    630|	{ (void)pos; return UA_STATUSCODE_BADDECODINGERROR; }
  ------------------
  |  |   44|    630|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  174|  3.07k|yy3:
  175|  3.07k|	YYSKIP();
  ------------------
  |  |   35|  3.07k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  3.07k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  176|  3.07k|	yych = YYPEEK();
  ------------------
  |  |   33|  3.07k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  3.07k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  3.07k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 3.07k, False: 0]
  |  |  ------------------
  ------------------
  177|  3.07k|	switch (yych) {
  178|  3.07k|		case '=': goto yy5;
  ------------------
  |  Branch (178:3): [True: 3.07k, False: 0]
  ------------------
  179|      0|		default: goto yy2;
  ------------------
  |  Branch (179:3): [True: 0, False: 3.07k]
  ------------------
  180|  3.07k|	}
  181|  1.08k|yy4:
  182|  1.08k|	YYSKIP();
  ------------------
  |  |   35|  1.08k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.08k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  183|  1.08k|	YYBACKUP();
  ------------------
  |  |   36|  1.08k|#define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   32|  1.08k|#define YYMARKER context.marker
  |  |  ------------------
  |  |               #define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|  1.08k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  184|  1.08k|	yych = YYPEEK();
  ------------------
  |  |   33|  1.08k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.08k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.08k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.08k, False: 0]
  |  |  ------------------
  ------------------
  185|  1.08k|	switch (yych) {
  186|  1.08k|		case 's': goto yy6;
  ------------------
  |  Branch (186:3): [True: 1.08k, False: 0]
  ------------------
  187|      0|		default: goto yy2;
  ------------------
  |  Branch (187:3): [True: 0, False: 1.08k]
  ------------------
  188|  1.08k|	}
  189|  4.14k|yy5:
  190|  4.14k|	YYSKIP();
  ------------------
  |  |   35|  4.14k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  4.14k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  191|  4.14k|	nsu = context.yyt2;
  192|  4.14k|	ns = context.yyt1;
  193|  4.14k|	YYSTAGP(body);
  ------------------
  |  |   38|  4.14k|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|  4.14k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  194|  4.14k|	YYSHIFTSTAG(body, -2);
  ------------------
  |  |   40|  4.14k|#define YYSHIFTSTAG(t, shift) t += shift
  ------------------
  195|  4.14k|	{ goto match; }
  196|  1.08k|yy6:
  197|  1.08k|	YYSKIP();
  ------------------
  |  |   35|  1.08k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.08k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  198|  1.08k|	yych = YYPEEK();
  ------------------
  |  |   33|  1.08k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.08k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.08k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.08k, False: 0]
  |  |  ------------------
  ------------------
  199|  1.08k|	switch (yych) {
  200|    351|		case '=': goto yy8;
  ------------------
  |  Branch (200:3): [True: 351, False: 731]
  ------------------
  201|    731|		case 'u': goto yy9;
  ------------------
  |  Branch (201:3): [True: 731, False: 351]
  ------------------
  202|      0|		default: goto yy7;
  ------------------
  |  Branch (202:3): [True: 0, False: 1.08k]
  ------------------
  203|  1.08k|	}
  204|      4|yy7:
  205|      4|	YYRESTORE();
  ------------------
  |  |   37|      4|#define YYRESTORE() YYCURSOR = YYMARKER
  |  |  ------------------
  |  |  |  |   31|      4|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYRESTORE() YYCURSOR = YYMARKER
  |  |  ------------------
  |  |  |  |   32|      4|#define YYMARKER context.marker
  |  |  ------------------
  ------------------
  206|      4|	goto yy2;
  207|    351|yy8:
  208|    351|	YYSKIP();
  ------------------
  |  |   35|    351|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    351|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  209|    351|	yych = YYPEEK();
  ------------------
  |  |   33|    351|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    351|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    351|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 351, False: 0]
  |  |  ------------------
  ------------------
  210|    351|	switch (yych) {
  211|    125|		case '0':
  ------------------
  |  Branch (211:3): [True: 125, False: 226]
  ------------------
  212|    133|		case '1':
  ------------------
  |  Branch (212:3): [True: 8, False: 343]
  ------------------
  213|    268|		case '2':
  ------------------
  |  Branch (213:3): [True: 135, False: 216]
  ------------------
  214|    350|		case '3':
  ------------------
  |  Branch (214:3): [True: 82, False: 269]
  ------------------
  215|    350|		case '4':
  ------------------
  |  Branch (215:3): [True: 0, False: 351]
  ------------------
  216|    350|		case '5':
  ------------------
  |  Branch (216:3): [True: 0, False: 351]
  ------------------
  217|    351|		case '6':
  ------------------
  |  Branch (217:3): [True: 1, False: 350]
  ------------------
  218|    351|		case '7':
  ------------------
  |  Branch (218:3): [True: 0, False: 351]
  ------------------
  219|    351|		case '8':
  ------------------
  |  Branch (219:3): [True: 0, False: 351]
  ------------------
  220|    351|		case '9':
  ------------------
  |  Branch (220:3): [True: 0, False: 351]
  ------------------
  221|    351|			YYSTAGP(context.yyt1);
  ------------------
  |  |   38|    351|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|    351|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  222|    351|			goto yy10;
  223|      0|		default: goto yy7;
  ------------------
  |  Branch (223:3): [True: 0, False: 351]
  ------------------
  224|    351|	}
  225|    731|yy9:
  226|    731|	YYSKIP();
  ------------------
  |  |   35|    731|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    731|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  227|    731|	yych = YYPEEK();
  ------------------
  |  |   33|    731|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    731|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    731|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 731, False: 0]
  |  |  ------------------
  ------------------
  228|    731|	switch (yych) {
  229|    731|		case '=': goto yy11;
  ------------------
  |  Branch (229:3): [True: 731, False: 0]
  ------------------
  230|      0|		default: goto yy7;
  ------------------
  |  Branch (230:3): [True: 0, False: 731]
  ------------------
  231|    731|	}
  232|    387|yy10:
  233|    387|	YYSKIP();
  ------------------
  |  |   35|    387|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    387|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  234|    387|	yych = YYPEEK();
  ------------------
  |  |   33|    387|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    387|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    387|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 387, False: 0]
  |  |  ------------------
  ------------------
  235|    387|	switch (yych) {
  236|      0|		case '0':
  ------------------
  |  Branch (236:3): [True: 0, False: 387]
  ------------------
  237|      0|		case '1':
  ------------------
  |  Branch (237:3): [True: 0, False: 387]
  ------------------
  238|      2|		case '2':
  ------------------
  |  Branch (238:3): [True: 2, False: 385]
  ------------------
  239|      2|		case '3':
  ------------------
  |  Branch (239:3): [True: 0, False: 387]
  ------------------
  240|      2|		case '4':
  ------------------
  |  Branch (240:3): [True: 0, False: 387]
  ------------------
  241|     16|		case '5':
  ------------------
  |  Branch (241:3): [True: 14, False: 373]
  ------------------
  242|     18|		case '6':
  ------------------
  |  Branch (242:3): [True: 2, False: 385]
  ------------------
  243|     36|		case '7':
  ------------------
  |  Branch (243:3): [True: 18, False: 369]
  ------------------
  244|     36|		case '8':
  ------------------
  |  Branch (244:3): [True: 0, False: 387]
  ------------------
  245|     36|		case '9': goto yy10;
  ------------------
  |  Branch (245:3): [True: 0, False: 387]
  ------------------
  246|    351|		case ';':
  ------------------
  |  Branch (246:3): [True: 351, False: 36]
  ------------------
  247|    351|			YYSTAGN(context.yyt2);
  ------------------
  |  |   39|    351|#define YYSTAGN(t) t = NULL
  ------------------
  248|    351|			goto yy12;
  249|      0|		default: goto yy7;
  ------------------
  |  Branch (249:3): [True: 0, False: 387]
  ------------------
  250|    387|	}
  251|    731|yy11:
  252|    731|	YYSKIP();
  ------------------
  |  |   35|    731|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    731|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  253|    731|	yych = YYPEEK();
  ------------------
  |  |   33|    731|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    731|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    731|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 731, False: 0]
  |  |  ------------------
  ------------------
  254|    731|	switch (yych) {
  255|      0|		case 0x00: goto yy7;
  ------------------
  |  Branch (255:3): [True: 0, False: 731]
  ------------------
  256|    242|		case ';':
  ------------------
  |  Branch (256:3): [True: 242, False: 489]
  ------------------
  257|    242|			YYSTAGN(context.yyt1);
  ------------------
  |  |   39|    242|#define YYSTAGN(t) t = NULL
  ------------------
  258|    242|			YYSTAGP(context.yyt2);
  ------------------
  |  |   38|    242|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|    242|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  259|    242|			goto yy12;
  260|    489|		default:
  ------------------
  |  Branch (260:3): [True: 489, False: 242]
  ------------------
  261|    489|			YYSTAGP(context.yyt2);
  ------------------
  |  |   38|    489|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|    489|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  262|    489|			goto yy13;
  263|    731|	}
  264|  1.08k|yy12:
  265|  1.08k|	YYSKIP();
  ------------------
  |  |   35|  1.08k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.08k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  266|  1.08k|	yych = YYPEEK();
  ------------------
  |  |   33|  1.08k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.08k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.08k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.08k, False: 0]
  |  |  ------------------
  ------------------
  267|  1.08k|	switch (yych) {
  268|    265|		case 'b':
  ------------------
  |  Branch (268:3): [True: 265, False: 817]
  ------------------
  269|    393|		case 'g':
  ------------------
  |  Branch (269:3): [True: 128, False: 954]
  ------------------
  270|    694|		case 'i':
  ------------------
  |  Branch (270:3): [True: 301, False: 781]
  ------------------
  271|  1.07k|		case 's': goto yy14;
  ------------------
  |  Branch (271:3): [True: 385, False: 697]
  ------------------
  272|      3|		default: goto yy7;
  ------------------
  |  Branch (272:3): [True: 3, False: 1.07k]
  ------------------
  273|  1.08k|	}
  274|  7.31k|yy13:
  275|  7.31k|	YYSKIP();
  ------------------
  |  |   35|  7.31k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  7.31k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  276|  7.31k|	yych = YYPEEK();
  ------------------
  |  |   33|  7.31k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  7.31k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  7.31k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 7.31k, False: 0]
  |  |  ------------------
  ------------------
  277|  7.31k|	switch (yych) {
  278|      0|		case 0x00: goto yy7;
  ------------------
  |  Branch (278:3): [True: 0, False: 7.31k]
  ------------------
  279|    489|		case ';':
  ------------------
  |  Branch (279:3): [True: 489, False: 6.82k]
  ------------------
  280|    489|			YYSTAGN(context.yyt1);
  ------------------
  |  |   39|    489|#define YYSTAGN(t) t = NULL
  ------------------
  281|    489|			goto yy12;
  282|  6.82k|		default: goto yy13;
  ------------------
  |  Branch (282:3): [True: 6.82k, False: 489]
  ------------------
  283|  7.31k|	}
  284|  1.07k|yy14:
  285|  1.07k|	YYSKIP();
  ------------------
  |  |   35|  1.07k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.07k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  286|  1.07k|	yych = YYPEEK();
  ------------------
  |  |   33|  1.07k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.07k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.07k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.07k, False: 1]
  |  |  ------------------
  ------------------
  287|  1.07k|	switch (yych) {
  288|  1.07k|		case '=': goto yy5;
  ------------------
  |  Branch (288:3): [True: 1.07k, False: 1]
  ------------------
  289|      1|		default: goto yy7;
  ------------------
  |  Branch (289:3): [True: 1, False: 1.07k]
  ------------------
  290|  1.07k|	}
  291|  1.07k|}
  292|       |
  293|       |
  294|  4.14k| match:
  295|  4.14k|    if(nsu) {
  ------------------
  |  Branch (295:8): [True: 729, False: 3.41k]
  ------------------
  296|       |        /* NamespaceUri */
  297|    729|        UA_String nsUri = {(size_t)(body - 1 - nsu), (UA_Byte*)(uintptr_t)nsu};
  298|    729|        UA_StatusCode res = escapedUri2Index(nsUri, &id->namespaceIndex, nsMapping);
  299|    729|        if(res != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|    729|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (299:12): [True: 729, False: 0]
  ------------------
  300|       |            /* Return the entire NodeId string s=... */
  301|    729|            UA_String total = {(size_t)((const UA_Byte*)end - begin), begin};
  302|    729|            id->identifierType = UA_NODEIDTYPE_STRING;
  303|    729|            return UA_String_copy(&total, &id->identifier.string);
  304|    729|        }
  305|  3.41k|    } else if(ns) {
  ------------------
  |  Branch (305:15): [True: 349, False: 3.07k]
  ------------------
  306|       |        /* NamespaceIndex */
  307|    349|        UA_UInt32 tmp;
  308|    349|        size_t len = (size_t)(body - 1 - ns);
  309|    349|        if(UA_readNumber((const UA_Byte*)ns, len, &tmp) != len)
  ------------------
  |  Branch (309:12): [True: 0, False: 349]
  ------------------
  310|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  311|    349|        id->namespaceIndex = (UA_UInt16)tmp;
  312|    349|        if(nsMapping)
  ------------------
  |  Branch (312:12): [True: 0, False: 349]
  ------------------
  313|      0|            id->namespaceIndex =
  314|      0|                UA_NamespaceMapping_remote2Local(nsMapping, id->namespaceIndex);
  315|    349|    }
  316|       |
  317|       |    /* From the current position until the end */
  318|  3.41k|    return parse_nodeid_body(id, body, end, idEsc);
  319|  4.14k|}
ua_types_lex.c:escapedUri2Index:
   95|    738|                 const UA_NamespaceMapping *nsMapping) {
   96|    738|    if(!nsMapping)
  ------------------
  |  Branch (96:8): [True: 738, False: 0]
  ------------------
   97|    738|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    738|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   98|      0|    UA_String tmp = uri; 
   99|      0|    status res = UA_String_unescape(&uri, true, UA_ESCAPING_PERCENT);
  100|      0|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (100:8): [True: 0, False: 0]
  ------------------
  101|      0|        return res;
  102|      0|    res = UA_NamespaceMapping_uri2Index(nsMapping, uri, nsIndex);
  103|      0|    if(tmp.data != uri.data)
  ------------------
  |  Branch (103:8): [True: 0, False: 0]
  ------------------
  104|      0|        UA_String_clear(&uri);
  105|      0|    return res;
  106|      0|}
ua_types_lex.c:parse_nodeid_body:
  109|  3.41k|parse_nodeid_body(UA_NodeId *id, const u8 *body, const u8 *end, UA_Escaping esc) {
  110|  3.41k|    UA_StatusCode res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  3.41k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  111|  3.41k|    UA_String str = {(size_t)(end - (body+2)), (UA_Byte*)(uintptr_t)body + 2};
  112|  3.41k|    switch(*body) {
  113|    215|    case 'i':
  ------------------
  |  Branch (113:5): [True: 215, False: 3.20k]
  ------------------
  114|    215|        id->identifierType = UA_NODEIDTYPE_NUMERIC;
  115|    215|        if(UA_readNumber(str.data, str.length, &id->identifier.numeric) != str.length)
  ------------------
  |  Branch (115:12): [True: 18, False: 197]
  ------------------
  116|     18|            res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     18|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  117|    215|        break;
  118|  2.66k|    case 's':
  ------------------
  |  Branch (118:5): [True: 2.66k, False: 753]
  ------------------
  119|  2.66k|        id->identifierType = UA_NODEIDTYPE_STRING;
  120|  2.66k|        res |= UA_String_copy(&str, &id->identifier.string);
  121|  2.66k|        res |= UA_String_unescape(&id->identifier.string, false, esc);
  122|  2.66k|        break;
  123|      9|    case 'g':
  ------------------
  |  Branch (123:5): [True: 9, False: 3.41k]
  ------------------
  124|      9|        id->identifierType = UA_NODEIDTYPE_GUID;
  125|      9|        res = parse_guid(&id->identifier.guid, str.data, end);
  126|      9|        break;
  127|    529|    case 'b':
  ------------------
  |  Branch (127:5): [True: 529, False: 2.89k]
  ------------------
  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|    529|        id->identifierType = UA_NODEIDTYPE_BYTESTRING;
  132|    529|        id->identifier.byteString.data =
  133|    529|            UA_unbase64(str.data, str.length, &id->identifier.byteString.length);
  134|    529|        if(!id->identifier.byteString.data) {
  ------------------
  |  Branch (134:12): [True: 31, False: 498]
  ------------------
  135|     31|            UA_assert(id->identifier.byteString.length == 0);
  ------------------
  |  |  400|     31|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (135:13): [True: 31, False: 0]
  ------------------
  136|     31|            res = UA_STATUSCODE_BADDECODINGERROR; /* Returned on error by UA_unbase64 */
  ------------------
  |  |   44|     31|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  137|     31|        }
  138|    529|        break;
  139|    529|    default:
  ------------------
  |  Branch (139:5): [True: 0, False: 3.41k]
  ------------------
  140|      0|        res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  141|      0|        break;
  142|  3.41k|    }
  143|  3.41k|    return res;
  144|  3.41k|}
ua_types_lex.c:parse_qn:
  707|  5.62k|         UA_UInt16 defaultNamespaceIndex) {
  708|  5.62k|    size_t len;
  709|  5.62k|    UA_UInt32 tmp;
  710|  5.62k|    UA_String str;
  711|  5.62k|    UA_StatusCode res;
  712|       |
  713|  5.62k|    LexContext context;
  714|  5.62k|    memset(&context, 0, sizeof(LexContext));
  715|       |
  716|  5.62k|    const u8 *begin = pos;
  717|  5.62k|    UA_QualifiedName_init(qn);
  718|  5.62k|    qn->namespaceIndex = defaultNamespaceIndex;
  719|       |
  720|       |    
  721|  5.62k|{
  722|  5.62k|	u8 yych;
  723|  5.62k|	yych = YYPEEK();
  ------------------
  |  |   33|  5.62k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  5.62k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.74k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.74k, False: 3.88k]
  |  |  ------------------
  ------------------
  724|  5.62k|	switch (yych) {
  725|  3.88k|		case 0x00:
  ------------------
  |  Branch (725:3): [True: 3.88k, False: 1.74k]
  ------------------
  726|  3.88k|		case ';': goto yy41;
  ------------------
  |  Branch (726:3): [True: 0, False: 5.62k]
  ------------------
  727|    144|		case '0':
  ------------------
  |  Branch (727:3): [True: 144, False: 5.48k]
  ------------------
  728|    267|		case '1':
  ------------------
  |  Branch (728:3): [True: 123, False: 5.50k]
  ------------------
  729|    362|		case '2':
  ------------------
  |  Branch (729:3): [True: 95, False: 5.53k]
  ------------------
  730|    392|		case '3':
  ------------------
  |  Branch (730:3): [True: 30, False: 5.59k]
  ------------------
  731|    420|		case '4':
  ------------------
  |  Branch (731:3): [True: 28, False: 5.60k]
  ------------------
  732|    421|		case '5':
  ------------------
  |  Branch (732:3): [True: 1, False: 5.62k]
  ------------------
  733|    558|		case '6':
  ------------------
  |  Branch (733:3): [True: 137, False: 5.49k]
  ------------------
  734|    568|		case '7':
  ------------------
  |  Branch (734:3): [True: 10, False: 5.61k]
  ------------------
  735|    570|		case '8':
  ------------------
  |  Branch (735:3): [True: 2, False: 5.62k]
  ------------------
  736|    575|		case '9': goto yy44;
  ------------------
  |  Branch (736:3): [True: 5, False: 5.62k]
  ------------------
  737|  1.17k|		default: goto yy43;
  ------------------
  |  Branch (737:3): [True: 1.17k, False: 4.45k]
  ------------------
  738|  5.62k|	}
  739|  3.88k|yy41:
  740|  3.88k|	YYSKIP();
  ------------------
  |  |   35|  3.88k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  3.88k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  741|  5.60k|yy42:
  742|  5.60k|	{ pos = begin; goto match_name; }
  743|  1.17k|yy43:
  744|  1.17k|	YYSKIP();
  ------------------
  |  |   35|  1.17k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.17k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  745|  1.17k|	YYBACKUP();
  ------------------
  |  |   36|  1.17k|#define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   32|  1.17k|#define YYMARKER context.marker
  |  |  ------------------
  |  |               #define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|  1.17k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  746|  1.17k|	yych = YYPEEK();
  ------------------
  |  |   33|  1.17k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.17k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.13k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.13k, False: 42]
  |  |  ------------------
  ------------------
  747|  1.17k|	if (yych <= 0x00) goto yy42;
  ------------------
  |  Branch (747:6): [True: 43, False: 1.12k]
  ------------------
  748|  1.12k|	goto yy46;
  749|  1.12k|yy44:
  750|    575|	YYSKIP();
  ------------------
  |  |   35|    575|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    575|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  751|    575|	YYBACKUP();
  ------------------
  |  |   36|    575|#define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   32|    575|#define YYMARKER context.marker
  |  |  ------------------
  |  |               #define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|    575|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  752|    575|	yych = YYPEEK();
  ------------------
  |  |   33|    575|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    575|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    411|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 411, False: 164]
  |  |  ------------------
  ------------------
  753|    575|	switch (yych) {
  754|      1|		case '0':
  ------------------
  |  Branch (754:3): [True: 1, False: 574]
  ------------------
  755|     22|		case '1':
  ------------------
  |  Branch (755:3): [True: 21, False: 554]
  ------------------
  756|     77|		case '2':
  ------------------
  |  Branch (756:3): [True: 55, False: 520]
  ------------------
  757|     78|		case '3':
  ------------------
  |  Branch (757:3): [True: 1, False: 574]
  ------------------
  758|     80|		case '4':
  ------------------
  |  Branch (758:3): [True: 2, False: 573]
  ------------------
  759|     82|		case '5':
  ------------------
  |  Branch (759:3): [True: 2, False: 573]
  ------------------
  760|     88|		case '6':
  ------------------
  |  Branch (760:3): [True: 6, False: 569]
  ------------------
  761|    196|		case '7':
  ------------------
  |  Branch (761:3): [True: 108, False: 467]
  ------------------
  762|    228|		case '8':
  ------------------
  |  Branch (762:3): [True: 32, False: 543]
  ------------------
  763|    240|		case '9':
  ------------------
  |  Branch (763:3): [True: 12, False: 563]
  ------------------
  764|    243|		case ':': goto yy50;
  ------------------
  |  Branch (764:3): [True: 3, False: 572]
  ------------------
  765|    332|		default: goto yy42;
  ------------------
  |  Branch (765:3): [True: 332, False: 243]
  ------------------
  766|    575|	}
  767|  19.3k|yy45:
  768|  19.3k|	YYSKIP();
  ------------------
  |  |   35|  19.3k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  19.3k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  769|  19.3k|	yych = YYPEEK();
  ------------------
  |  |   33|  19.3k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  19.3k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  18.2k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 18.2k, False: 1.06k]
  |  |  ------------------
  ------------------
  770|  20.4k|yy46:
  771|  20.4k|	switch (yych) {
  772|  1.12k|		case 0x00: goto yy47;
  ------------------
  |  Branch (772:3): [True: 1.12k, False: 19.3k]
  ------------------
  773|      9|		case ';': goto yy48;
  ------------------
  |  Branch (773:3): [True: 9, False: 20.4k]
  ------------------
  774|  19.3k|		default: goto yy45;
  ------------------
  |  Branch (774:3): [True: 19.3k, False: 1.12k]
  ------------------
  775|  20.4k|	}
  776|  1.34k|yy47:
  777|  1.34k|	YYRESTORE();
  ------------------
  |  |   37|  1.34k|#define YYRESTORE() YYCURSOR = YYMARKER
  |  |  ------------------
  |  |  |  |   31|  1.34k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYRESTORE() YYCURSOR = YYMARKER
  |  |  ------------------
  |  |  |  |   32|  1.34k|#define YYMARKER context.marker
  |  |  ------------------
  ------------------
  778|  1.34k|	goto yy42;
  779|      9|yy48:
  780|      9|	YYSKIP();
  ------------------
  |  |   35|      9|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|      9|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  781|      9|	{ goto match_uri; }
  782|  1.20M|yy49:
  783|  1.20M|	YYSKIP();
  ------------------
  |  |   35|  1.20M|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.20M|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  784|  1.20M|	yych = YYPEEK();
  ------------------
  |  |   33|  1.20M|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.20M|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.20M|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.20M, False: 170]
  |  |  ------------------
  ------------------
  785|  1.20M|yy50:
  786|  1.20M|	switch (yych) {
  787|  1.17M|		case '0':
  ------------------
  |  Branch (787:3): [True: 1.17M, False: 24.8k]
  ------------------
  788|  1.17M|		case '1':
  ------------------
  |  Branch (788:3): [True: 361, False: 1.20M]
  ------------------
  789|  1.18M|		case '2':
  ------------------
  |  Branch (789:3): [True: 5.22k, False: 1.19M]
  ------------------
  790|  1.19M|		case '3':
  ------------------
  |  Branch (790:3): [True: 5.34k, False: 1.19M]
  ------------------
  791|  1.19M|		case '4':
  ------------------
  |  Branch (791:3): [True: 5.43k, False: 1.19M]
  ------------------
  792|  1.19M|		case '5':
  ------------------
  |  Branch (792:3): [True: 184, False: 1.20M]
  ------------------
  793|  1.19M|		case '6':
  ------------------
  |  Branch (793:3): [True: 367, False: 1.20M]
  ------------------
  794|  1.19M|		case '7':
  ------------------
  |  Branch (794:3): [True: 499, False: 1.20M]
  ------------------
  795|  1.20M|		case '8':
  ------------------
  |  Branch (795:3): [True: 5.80k, False: 1.19M]
  ------------------
  796|  1.20M|		case '9': goto yy49;
  ------------------
  |  Branch (796:3): [True: 1.41k, False: 1.20M]
  ------------------
  797|     17|		case ':': goto yy51;
  ------------------
  |  Branch (797:3): [True: 17, False: 1.20M]
  ------------------
  798|    226|		default: goto yy47;
  ------------------
  |  Branch (798:3): [True: 226, False: 1.20M]
  ------------------
  799|  1.20M|	}
  800|     17|yy51:
  801|     17|	YYSKIP();
  ------------------
  |  |   35|     17|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|     17|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  802|     17|	{ goto match_index; }
  803|  1.20M|}
  804|       |
  805|       |
  806|     17| match_index:
  807|     17|    len = (size_t)(pos - 1 - begin);
  808|     17|    if(UA_readNumber((const UA_Byte*)begin, len, &tmp) != len)
  ------------------
  |  Branch (808:8): [True: 0, False: 17]
  ------------------
  809|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  810|     17|    qn->namespaceIndex = (UA_UInt16)tmp;
  811|     17|    goto match_name;
  812|       |
  813|      9| match_uri:
  814|      9|    str.length = (size_t)(pos - 1 - begin);
  815|      9|    str.data = (UA_Byte*)(uintptr_t)begin;
  816|      9|    res = escapedUri2Index(str, &qn->namespaceIndex, nsMapping);
  817|      9|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|      9|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (817:8): [True: 9, False: 0]
  ------------------
  818|      9|        pos = begin; /* Use the entire string for the name */
  819|       |
  820|  5.62k| match_name:
  821|  5.62k|    str.length = (size_t)(end - pos);
  822|  5.62k|    str.data = (UA_Byte*)(uintptr_t)pos;
  823|  5.62k|    res = UA_String_copy(&str, &qn->name);
  824|  5.62k|    if(UA_LIKELY(res == UA_STATUSCODE_GOOD))
  ------------------
  |  |  579|  5.62k|# define UA_LIKELY(x) __builtin_expect((x), 1)
  |  |  ------------------
  |  |  |  Branch (579:23): [True: 5.60k, False: 28]
  |  |  ------------------
  ------------------
  825|  5.60k|        res = UA_String_unescape(&qn->name, false, escName);
  826|  5.62k|    return res;
  827|      9|}
ua_types_lex.c:parse_relativepath:
  979|    414|                   UA_UInt16 defaultNamespaceIndex) {
  980|    414|    UA_RelativePath_init(rp);
  981|    414|    UA_Boolean done = false;
  982|    414|    UA_StatusCode res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    414|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  983|  5.35k|    do {
  984|  5.35k|        res = parse_relativepathElement(rp, ppos, end, server, esc,
  985|  5.35k|                                        defaultNamespaceIndex, &done);
  986|  5.35k|    } while(!done);
  ------------------
  |  Branch (986:13): [True: 4.94k, False: 414]
  ------------------
  987|    414|    return res;
  988|    414|}
ua_types_lex.c:parse_relativepathElement:
  849|  5.35k|                          UA_UInt16 defaultTargetNamespaceIndex, UA_Boolean *done) {
  850|  5.35k|    const u8 *pos = *ppos;
  851|  5.35k|    if(pos == end) {
  ------------------
  |  Branch (851:8): [True: 268, False: 5.09k]
  ------------------
  852|    268|        *done = true;
  853|    268|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    268|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  854|    268|    }
  855|       |
  856|       |    /* Create the element on the stack.
  857|       |     * Moved into the rp upon successful parsing. */
  858|  5.09k|    UA_RelativePathElement current;
  859|  5.09k|    UA_RelativePathElement_init(&current);
  860|  5.09k|    current.includeSubtypes = true; /* Follow subtypes by default */
  861|       |
  862|       |    /* Which ReferenceType? */
  863|  5.09k|    const u8 *begin;
  864|  5.09k|    UA_StatusCode res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  5.09k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  865|  5.09k|    switch(*pos) {
  866|    418|    case '/':
  ------------------
  |  Branch (866:5): [True: 418, False: 4.67k]
  ------------------
  867|    418|        current.referenceTypeId = UA_NODEID_NUMERIC(0, UA_NS0ID_HIERARCHICALREFERENCES);
  ------------------
  |  |   46|    418|#define UA_NS0ID_HIERARCHICALREFERENCES 33 /* ReferenceType */
  ------------------
  868|    418|        goto reftype_target;
  869|      0|    case '.':
  ------------------
  |  Branch (869:5): [True: 0, False: 5.09k]
  ------------------
  870|       |        /* Recognize the dot only for the and-escaping. The dot is not escaped
  871|       |         * for percent-escaping and commonly used as part of the browse-name. */
  872|      0|        if(esc != UA_ESCAPING_AND) {
  ------------------
  |  Branch (872:12): [True: 0, False: 0]
  ------------------
  873|      0|            *done = true;
  874|      0|            goto out;
  875|      0|        }
  876|      0|        current.referenceTypeId = UA_NODEID_NUMERIC(0, UA_NS0ID_AGGREGATES);
  ------------------
  |  |   55|      0|#define UA_NS0ID_AGGREGATES 44 /* ReferenceType */
  ------------------
  877|      0|        goto reftype_target;
  878|  4.59k|    case '<':
  ------------------
  |  Branch (878:5): [True: 4.59k, False: 493]
  ------------------
  879|  4.59k|        break;
  880|     75|    default:
  ------------------
  |  Branch (880:5): [True: 75, False: 5.01k]
  ------------------
  881|     75|        *done = true;
  882|     75|        goto out;
  883|  5.09k|    }
  884|       |
  885|       |    /* ReferenceType with modifiers wrapped in angle brackets */
  886|  4.59k|    begin = ++pos;
  887|  30.3M|    for(; pos < end; pos++) {
  ------------------
  |  Branch (887:11): [True: 30.3M, False: 57]
  ------------------
  888|  30.3M|        if((esc == UA_ESCAPING_AND || esc == UA_ESCAPING_AND_EXTENDED) && *pos == '&') {
  ------------------
  |  Branch (888:13): [True: 0, False: 30.3M]
  |  Branch (888:39): [True: 0, False: 30.3M]
  |  Branch (888:75): [True: 0, False: 0]
  ------------------
  889|      0|            pos++;
  890|      0|            continue;
  891|      0|        }
  892|  30.3M|        if((esc == UA_ESCAPING_PERCENT || esc == UA_ESCAPING_PERCENT_EXTENDED) && *pos == '%') {
  ------------------
  |  Branch (892:13): [True: 0, False: 30.3M]
  |  Branch (892:43): [True: 30.3M, False: 0]
  |  Branch (892:83): [True: 9.85M, False: 20.5M]
  ------------------
  893|  9.85M|            pos += 2;
  894|  9.85M|            continue;
  895|  9.85M|        }
  896|  20.5M|        if(*pos == '>')
  ------------------
  |  Branch (896:12): [True: 4.54k, False: 20.5M]
  ------------------
  897|  4.54k|            break;
  898|  20.5M|    }
  899|  4.59k|    if(pos > end) {
  ------------------
  |  Branch (899:8): [True: 0, False: 4.59k]
  ------------------
  900|      0|        res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  901|      0|        goto out;
  902|      0|    }
  903|       |
  904|       |    /* Process modifiers */
  905|  5.35k|    for(; begin < pos; begin++) {
  ------------------
  |  Branch (905:11): [True: 5.35k, False: 0]
  ------------------
  906|  5.35k|        if(*begin == '#')
  ------------------
  |  Branch (906:12): [True: 596, False: 4.76k]
  ------------------
  907|    596|            current.includeSubtypes = false;
  908|  4.76k|        else if(*begin == '!')
  ------------------
  |  Branch (908:17): [True: 166, False: 4.59k]
  ------------------
  909|    166|            current.isInverse = true;
  910|  4.59k|        else
  911|  4.59k|            break;
  912|  5.35k|    }
  913|       |
  914|       |    /* Try to parse a NodeId for the ReferenceType (non-standard!) */
  915|  4.59k|    res = parse_nodeid(&current.referenceTypeId, begin, pos, esc, NULL);
  916|  4.59k|    if(res != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|  4.59k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (916:8): [True: 682, False: 3.91k]
  ------------------
  917|       |        /* Parse the the ReferenceType from its BrowseName (default) */
  918|    682|        UA_QualifiedName refqn;
  919|    682|        res = parse_qn(&refqn, begin, pos, esc, NULL, defaultTargetNamespaceIndex);
  920|    682|        res |= lookupRefType(server, &refqn, &current.referenceTypeId);
  921|    682|        UA_QualifiedName_clear(&refqn);
  922|    682|        if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    682|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (922:12): [True: 65, False: 617]
  ------------------
  923|     65|            goto out;
  924|    682|    }
  925|       |
  926|  4.95k| reftype_target:
  927|       |    /* Move pos to the end of the TargetName based on the escaping */
  928|  4.95k|    begin = ++pos;
  929|  1.20M|    while(pos < end && *pos >= '0' && *pos <= '9')
  ------------------
  |  Branch (929:11): [True: 1.20M, False: 220]
  |  Branch (929:24): [True: 1.20M, False: 336]
  |  Branch (929:39): [True: 1.20M, False: 4.39k]
  ------------------
  930|  1.20M|        pos++;
  931|  4.95k|    if(pos < end && *pos == ':')
  ------------------
  |  Branch (931:8): [True: 4.73k, False: 220]
  |  Branch (931:21): [True: 17, False: 4.71k]
  ------------------
  932|     17|        pos++;
  933|  7.93k|    for(; pos < end; pos++) {
  ------------------
  |  Branch (933:11): [True: 7.66k, False: 271]
  ------------------
  934|  7.66k|        if((esc == UA_ESCAPING_AND || esc == UA_ESCAPING_AND_EXTENDED) && *pos == '&') {
  ------------------
  |  Branch (934:13): [True: 0, False: 7.66k]
  |  Branch (934:39): [True: 0, False: 7.66k]
  |  Branch (934:75): [True: 0, False: 0]
  ------------------
  935|      0|            pos++;
  936|      0|            continue;
  937|      0|        }
  938|  7.66k|        if((esc == UA_ESCAPING_PERCENT || esc == UA_ESCAPING_PERCENT_EXTENDED) && *pos == '%') {
  ------------------
  |  Branch (938:13): [True: 0, False: 7.66k]
  |  Branch (938:43): [True: 7.66k, False: 0]
  |  Branch (938:83): [True: 1, False: 7.66k]
  ------------------
  939|      1|            pos += 2;
  940|      1|            continue;
  941|      1|        }
  942|  7.66k|        if(esc == UA_ESCAPING_PERCENT || esc == UA_ESCAPING_PERCENT_EXTENDED) {
  ------------------
  |  Branch (942:12): [True: 0, False: 7.66k]
  |  Branch (942:42): [True: 7.66k, False: 0]
  ------------------
  943|  7.66k|            if(isReservedPercentExtended(*pos))
  ------------------
  |  Branch (943:16): [True: 4.67k, False: 2.98k]
  ------------------
  944|  4.67k|                break;
  945|  7.66k|        } else {
  946|      0|            if(isReservedAnd(*pos))
  ------------------
  |  Branch (946:16): [True: 0, False: 0]
  ------------------
  947|      0|                break;
  948|      0|        }
  949|  7.66k|    }
  950|  4.95k|    if(pos > end) {
  ------------------
  |  Branch (950:8): [True: 3, False: 4.94k]
  ------------------
  951|      3|        res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      3|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  952|      3|        goto out;
  953|      3|    }
  954|       |
  955|       |    /* Parse the TargetName */
  956|  4.94k|    res = parse_qn(&current.targetName, begin, pos, esc,
  957|  4.94k|                   NULL, defaultTargetNamespaceIndex);
  958|  4.94k|    if(res != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|  4.94k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (958:8): [True: 0, False: 4.94k]
  ------------------
  959|      0|        UA_RelativePathElement_clear(&current);
  960|      0|        goto out;
  961|      0|    }
  962|       |
  963|       |    /* Add current to the rp */
  964|  4.94k|    res |= relativepath_addelem(rp, &current);
  965|       |
  966|  5.09k| out:
  967|  5.09k|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  5.09k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (967:8): [True: 71, False: 5.01k]
  ------------------
  968|     71|        UA_RelativePathElement_clear(&current);
  969|       |
  970|       |    /* Return the status */
  971|  5.09k|    *ppos = pos;
  972|  5.09k|    *done |= (res != UA_STATUSCODE_GOOD);
  ------------------
  |  |   17|  5.09k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  973|  5.09k|    return res;
  974|  4.94k|}
ua_types_lex.c:relativepath_addelem:
  686|  4.94k|relativepath_addelem(UA_RelativePath *rp, UA_RelativePathElement *el) {
  687|       |    /* Check for unrealistic path lengths */
  688|  4.94k|    if(rp->elementsSize >= UA_MAXPATHLENGTH)
  ------------------
  |  |   29|  4.94k|#define UA_MAXPATHLENGTH 128 /* Maximum relative path depth */
  ------------------
  |  Branch (688:8): [True: 3, False: 4.94k]
  ------------------
  689|      3|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      3|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  690|       |
  691|       |    /* Allocate memory */
  692|  4.94k|    UA_RelativePathElement *newArray = (UA_RelativePathElement*)
  693|  4.94k|        UA_realloc(rp->elements, sizeof(UA_RelativePathElement) * (rp->elementsSize + 1));
  ------------------
  |  |   21|  4.94k|#define UA_realloc(ptr, size) UA_reallocSingleton(ptr, size)
  ------------------
  694|  4.94k|    if(!newArray)
  ------------------
  |  Branch (694:8): [True: 0, False: 4.94k]
  ------------------
  695|      0|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
  696|  4.94k|    rp->elements = newArray;
  697|       |
  698|       |    /* Move to the target */
  699|  4.94k|    rp->elements[rp->elementsSize] = *el;
  700|  4.94k|    rp->elementsSize++;
  701|  4.94k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  4.94k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  702|  4.94k|}
ua_types_lex.c:parseAttributeOperand:
 1022|    428|                      UA_NodeId defaultId, UA_UInt16 defaultNamespaceIndex) {
 1023|       |    /* Initialize and set the default values */
 1024|    428|    UA_AttributeOperand_init(ao);
 1025|    428|    ao->nodeId = defaultId;
 1026|    428|    ao->attributeId = UA_ATTRIBUTEID_VALUE;
 1027|       |
 1028|       |    /* Nothing to parse */
 1029|    428|    if(str.length == 0)
  ------------------
  |  Branch (1029:8): [True: 0, False: 428]
  ------------------
 1030|      0|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1031|       |
 1032|    428|    const u8 *pos = str.data;
 1033|    428|    const u8 *end = pos + str.length;
 1034|    428|    UA_StatusCode res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    428|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1035|       |
 1036|       |    /* Initial NodeId before the BrowsePath */
 1037|    428|    LexContext context;
 1038|    428|    memset(&context, 0, sizeof(LexContext));
 1039|       |    
 1040|    428|{
 1041|    428|	u8 yych;
 1042|    428|	yych = YYPEEK();
  ------------------
  |  |   33|    428|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    428|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    428|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 428, False: 0]
  |  |  ------------------
  ------------------
 1043|    428|	switch (yych) {
 1044|      3|		case 'b':
  ------------------
  |  Branch (1044:3): [True: 3, False: 425]
  ------------------
 1045|     11|		case 'g':
  ------------------
  |  Branch (1045:3): [True: 8, False: 420]
  ------------------
 1046|     16|		case 'i':
  ------------------
  |  Branch (1046:3): [True: 5, False: 423]
  ------------------
 1047|     86|		case 's': goto yy55;
  ------------------
  |  Branch (1047:3): [True: 70, False: 358]
  ------------------
 1048|    107|		case 'n': goto yy56;
  ------------------
  |  Branch (1048:3): [True: 107, False: 321]
  ------------------
 1049|    235|		default: goto yy53;
  ------------------
  |  Branch (1049:3): [True: 235, False: 193]
  ------------------
 1050|    428|	}
 1051|    235|yy53:
 1052|    235|	YYSKIP();
  ------------------
  |  |   35|    235|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    235|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1053|    247|yy54:
 1054|    247|	{ pos = str.data; goto parse_path; }
 1055|     86|yy55:
 1056|     86|	YYSKIP();
  ------------------
  |  |   35|     86|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|     86|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1057|     86|	yych = YYPEEK();
  ------------------
  |  |   33|     86|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     86|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     86|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 86, False: 0]
  |  |  ------------------
  ------------------
 1058|     86|	switch (yych) {
 1059|     85|		case '=': goto yy57;
  ------------------
  |  Branch (1059:3): [True: 85, False: 1]
  ------------------
 1060|      1|		default: goto yy54;
  ------------------
  |  Branch (1060:3): [True: 1, False: 85]
  ------------------
 1061|     86|	}
 1062|    107|yy56:
 1063|    107|	YYSKIP();
  ------------------
  |  |   35|    107|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    107|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1064|    107|	YYBACKUP();
  ------------------
  |  |   36|    107|#define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   32|    107|#define YYMARKER context.marker
  |  |  ------------------
  |  |               #define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|    107|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1065|    107|	yych = YYPEEK();
  ------------------
  |  |   33|    107|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    107|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    107|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 107, False: 0]
  |  |  ------------------
  ------------------
 1066|    107|	switch (yych) {
 1067|    106|		case 's': goto yy58;
  ------------------
  |  Branch (1067:3): [True: 106, False: 1]
  ------------------
 1068|      1|		default: goto yy54;
  ------------------
  |  Branch (1068:3): [True: 1, False: 106]
  ------------------
 1069|    107|	}
 1070|    181|yy57:
 1071|    181|	YYSKIP();
  ------------------
  |  |   35|    181|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    181|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1072|    181|	{
 1073|       |        // Find the end position of the NodeId body and parse
 1074|   413k|        for(; pos < end; pos++) {
  ------------------
  |  Branch (1074:15): [True: 413k, False: 6]
  ------------------
 1075|   413k|            if(*pos == '%') {
  ------------------
  |  Branch (1075:16): [True: 2, False: 413k]
  ------------------
 1076|      2|                pos += 2;
 1077|      2|                continue;
 1078|      2|            }
 1079|   413k|            if(isReservedPercentExtended(*pos))
  ------------------
  |  Branch (1079:16): [True: 175, False: 413k]
  ------------------
 1080|    175|                break;
 1081|   413k|        }
 1082|    181|        if(pos > end) {
  ------------------
  |  Branch (1082:12): [True: 0, False: 181]
  ------------------
 1083|      0|            res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1084|      0|            goto cleanup;
 1085|      0|        }
 1086|    181|        res = parse_nodeid(&ao->nodeId, str.data, pos, UA_ESCAPING_PERCENT, NULL);
 1087|    181|        if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    181|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1087:12): [True: 14, False: 167]
  ------------------
 1088|     14|            goto cleanup;
 1089|    167|        goto parse_path;
 1090|    181|    }
 1091|    167|yy58:
 1092|    106|	YYSKIP();
  ------------------
  |  |   35|    106|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    106|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1093|    106|	yych = YYPEEK();
  ------------------
  |  |   33|    106|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    106|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    106|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 106, False: 0]
  |  |  ------------------
  ------------------
 1094|    106|	switch (yych) {
 1095|     94|		case '=': goto yy60;
  ------------------
  |  Branch (1095:3): [True: 94, False: 12]
  ------------------
 1096|     12|		case 'u': goto yy61;
  ------------------
  |  Branch (1096:3): [True: 12, False: 94]
  ------------------
 1097|      0|		default: goto yy59;
  ------------------
  |  Branch (1097:3): [True: 0, False: 106]
  ------------------
 1098|    106|	}
 1099|     10|yy59:
 1100|     10|	YYRESTORE();
  ------------------
  |  |   37|     10|#define YYRESTORE() YYCURSOR = YYMARKER
  |  |  ------------------
  |  |  |  |   31|     10|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYRESTORE() YYCURSOR = YYMARKER
  |  |  ------------------
  |  |  |  |   32|     10|#define YYMARKER context.marker
  |  |  ------------------
  ------------------
 1101|     10|	goto yy54;
 1102|     94|yy60:
 1103|     94|	YYSKIP();
  ------------------
  |  |   35|     94|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|     94|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1104|     94|	yych = YYPEEK();
  ------------------
  |  |   33|     94|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     94|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     94|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 94, False: 0]
  |  |  ------------------
  ------------------
 1105|     94|	switch (yych) {
 1106|      0|		case '0':
  ------------------
  |  Branch (1106:3): [True: 0, False: 94]
  ------------------
 1107|      0|		case '1':
  ------------------
  |  Branch (1107:3): [True: 0, False: 94]
  ------------------
 1108|     14|		case '2':
  ------------------
  |  Branch (1108:3): [True: 14, False: 80]
  ------------------
 1109|     94|		case '3':
  ------------------
  |  Branch (1109:3): [True: 80, False: 14]
  ------------------
 1110|     94|		case '4':
  ------------------
  |  Branch (1110:3): [True: 0, False: 94]
  ------------------
 1111|     94|		case '5':
  ------------------
  |  Branch (1111:3): [True: 0, False: 94]
  ------------------
 1112|     94|		case '6':
  ------------------
  |  Branch (1112:3): [True: 0, False: 94]
  ------------------
 1113|     94|		case '7':
  ------------------
  |  Branch (1113:3): [True: 0, False: 94]
  ------------------
 1114|     94|		case '8':
  ------------------
  |  Branch (1114:3): [True: 0, False: 94]
  ------------------
 1115|     94|		case '9': goto yy62;
  ------------------
  |  Branch (1115:3): [True: 0, False: 94]
  ------------------
 1116|      0|		default: goto yy59;
  ------------------
  |  Branch (1116:3): [True: 0, False: 94]
  ------------------
 1117|     94|	}
 1118|     12|yy61:
 1119|     12|	YYSKIP();
  ------------------
  |  |   35|     12|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|     12|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1120|     12|	yych = YYPEEK();
  ------------------
  |  |   33|     12|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     12|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     12|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 12, False: 0]
  |  |  ------------------
  ------------------
 1121|     12|	switch (yych) {
 1122|      8|		case '=': goto yy63;
  ------------------
  |  Branch (1122:3): [True: 8, False: 4]
  ------------------
 1123|      4|		default: goto yy59;
  ------------------
  |  Branch (1123:3): [True: 4, False: 8]
  ------------------
 1124|     12|	}
 1125|    122|yy62:
 1126|    122|	YYSKIP();
  ------------------
  |  |   35|    122|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    122|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1127|    122|	yych = YYPEEK();
  ------------------
  |  |   33|    122|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    122|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    122|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 122, False: 0]
  |  |  ------------------
  ------------------
 1128|    122|	switch (yych) {
 1129|      0|		case '0':
  ------------------
  |  Branch (1129:3): [True: 0, False: 122]
  ------------------
 1130|      0|		case '1':
  ------------------
  |  Branch (1130:3): [True: 0, False: 122]
  ------------------
 1131|      0|		case '2':
  ------------------
  |  Branch (1131:3): [True: 0, False: 122]
  ------------------
 1132|      0|		case '3':
  ------------------
  |  Branch (1132:3): [True: 0, False: 122]
  ------------------
 1133|      0|		case '4':
  ------------------
  |  Branch (1133:3): [True: 0, False: 122]
  ------------------
 1134|     14|		case '5':
  ------------------
  |  Branch (1134:3): [True: 14, False: 108]
  ------------------
 1135|     14|		case '6':
  ------------------
  |  Branch (1135:3): [True: 0, False: 122]
  ------------------
 1136|     28|		case '7':
  ------------------
  |  Branch (1136:3): [True: 14, False: 108]
  ------------------
 1137|     28|		case '8':
  ------------------
  |  Branch (1137:3): [True: 0, False: 122]
  ------------------
 1138|     28|		case '9': goto yy62;
  ------------------
  |  Branch (1138:3): [True: 0, False: 122]
  ------------------
 1139|     94|		case ';': goto yy64;
  ------------------
  |  Branch (1139:3): [True: 94, False: 28]
  ------------------
 1140|      0|		default: goto yy59;
  ------------------
  |  Branch (1140:3): [True: 0, False: 122]
  ------------------
 1141|    122|	}
 1142|    415|yy63:
 1143|    415|	YYSKIP();
  ------------------
  |  |   35|    415|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    415|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1144|    415|	yych = YYPEEK();
  ------------------
  |  |   33|    415|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    415|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    415|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 415, False: 0]
  |  |  ------------------
  ------------------
 1145|    415|	switch (yych) {
 1146|      4|		case 0x00: goto yy59;
  ------------------
  |  Branch (1146:3): [True: 4, False: 411]
  ------------------
 1147|      4|		case ';': goto yy64;
  ------------------
  |  Branch (1147:3): [True: 4, False: 411]
  ------------------
 1148|    407|		default: goto yy63;
  ------------------
  |  Branch (1148:3): [True: 407, False: 8]
  ------------------
 1149|    415|	}
 1150|     98|yy64:
 1151|     98|	YYSKIP();
  ------------------
  |  |   35|     98|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|     98|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1152|     98|	yych = YYPEEK();
  ------------------
  |  |   33|     98|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     98|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     98|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 98, False: 0]
  |  |  ------------------
  ------------------
 1153|     98|	switch (yych) {
 1154|      2|		case 'b':
  ------------------
  |  Branch (1154:3): [True: 2, False: 96]
  ------------------
 1155|      2|		case 'g':
  ------------------
  |  Branch (1155:3): [True: 0, False: 98]
  ------------------
 1156|     96|		case 'i':
  ------------------
  |  Branch (1156:3): [True: 94, False: 4]
  ------------------
 1157|     96|		case 's': goto yy65;
  ------------------
  |  Branch (1157:3): [True: 0, False: 98]
  ------------------
 1158|      2|		default: goto yy59;
  ------------------
  |  Branch (1158:3): [True: 2, False: 96]
  ------------------
 1159|     98|	}
 1160|     96|yy65:
 1161|     96|	YYSKIP();
  ------------------
  |  |   35|     96|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|     96|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1162|     96|	yych = YYPEEK();
  ------------------
  |  |   33|     96|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     96|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     96|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 96, False: 0]
  |  |  ------------------
  ------------------
 1163|     96|	switch (yych) {
 1164|     96|		case '=': goto yy57;
  ------------------
  |  Branch (1164:3): [True: 96, False: 0]
  ------------------
 1165|      0|		default: goto yy59;
  ------------------
  |  Branch (1165:3): [True: 0, False: 96]
  ------------------
 1166|     96|	}
 1167|     96|}
 1168|       |
 1169|       |
 1170|       |    /* Parse the BrowsePath */
 1171|    414| parse_path:
 1172|    414|    res = parse_relativepath(&ao->browsePath, &pos, end, NULL,
 1173|    414|                             UA_ESCAPING_PERCENT_EXTENDED, defaultNamespaceIndex);
 1174|    414|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    414|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1174:8): [True: 71, False: 343]
  ------------------
 1175|     71|        goto cleanup;
 1176|       |
 1177|       |    /* Parse the AttributeId */
 1178|    343|    if(pos < end && *pos == '#') {
  ------------------
  |  Branch (1178:8): [True: 75, False: 268]
  |  Branch (1178:21): [True: 9, False: 66]
  ------------------
 1179|      9|        const u8 *attr_pos = ++pos;
 1180|   135k|        while(pos < end && ((*pos >= 'a' && *pos <= 'z') ||
  ------------------
  |  Branch (1180:15): [True: 135k, False: 4]
  |  Branch (1180:30): [True: 127k, False: 8.11k]
  |  Branch (1180:45): [True: 127k, False: 1]
  ------------------
 1181|   135k|                            (*pos >= 'A' && *pos <= 'Z'))) {
  ------------------
  |  Branch (1181:30): [True: 8.11k, False: 4]
  |  Branch (1181:45): [True: 8.11k, False: 1]
  ------------------
 1182|   135k|            pos++;
 1183|   135k|        }
 1184|      9|        UA_String attrString = {(size_t)(pos - attr_pos), (UA_Byte*)(uintptr_t)attr_pos};
 1185|      9|        ao->attributeId = UA_AttributeId_fromName(attrString);
 1186|      9|        if(ao->attributeId == UA_ATTRIBUTEID_INVALID) {
  ------------------
  |  Branch (1186:12): [True: 9, False: 0]
  ------------------
 1187|      9|            res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      9|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1188|      9|            goto cleanup;
 1189|      9|        }
 1190|      9|    }
 1191|       |
 1192|       |    /* Parse the IndexRange */
 1193|    334|    if(pos < end && *pos == '[') {
  ------------------
  |  Branch (1193:8): [True: 66, False: 268]
  |  Branch (1193:21): [True: 47, False: 19]
  ------------------
 1194|     47|        const u8 *range_pos = ++pos;
 1195|  10.8M|        while(pos < end && *pos != ']') {
  ------------------
  |  Branch (1195:15): [True: 10.8M, False: 0]
  |  Branch (1195:28): [True: 10.8M, False: 47]
  ------------------
 1196|  10.8M|            pos++;
 1197|  10.8M|        }
 1198|     47|        if(pos == end) {
  ------------------
  |  Branch (1198:12): [True: 0, False: 47]
  ------------------
 1199|      0|            res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1200|      0|            goto cleanup;
 1201|      0|        }
 1202|     47|        UA_String rangeString = {(size_t)(pos - range_pos), (UA_Byte*)(uintptr_t)range_pos};
 1203|     47|        if(rangeString.length > 0)
  ------------------
  |  Branch (1203:12): [True: 47, False: 0]
  ------------------
 1204|     47|            res = UA_String_copy(&rangeString, &ao->indexRange);
 1205|     47|        pos++;
 1206|     47|    }
 1207|       |
 1208|       |    /* Check that we have parsed the entire string */
 1209|    334|    if(pos != end)
  ------------------
  |  Branch (1209:8): [True: 22, False: 312]
  ------------------
 1210|     22|        res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     22|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1211|       |
 1212|       |
 1213|    428| cleanup:
 1214|    428|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    428|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1214:8): [True: 116, False: 312]
  ------------------
 1215|    116|        UA_AttributeOperand_clear(ao);
 1216|    428|    return res;
 1217|    334|}

UA_AttributeId_fromName:
   56|      9|UA_AttributeId_fromName(const UA_String name) {
   57|    261|    for(size_t i = 0; i < 28; i++) {
  ------------------
  |  Branch (57:23): [True: 252, False: 9]
  ------------------
   58|    252|        if(strlen(attributeIdNames[i]) != name.length)
  ------------------
  |  Branch (58:12): [True: 252, False: 0]
  ------------------
   59|    252|            continue;
   60|      0|        for(size_t j = 0; j < name.length; j++) {
  ------------------
  |  Branch (60:27): [True: 0, False: 0]
  ------------------
   61|      0|            if((attributeIdNames[i][j] | 32) != (name.data[j] | 32))
  ------------------
  |  Branch (61:16): [True: 0, False: 0]
  ------------------
   62|      0|                goto next;
   63|      0|        }
   64|      0|        return (UA_AttributeId)i;
   65|      0|    next:
   66|      0|        continue;
   67|      0|    }
   68|      9|    return UA_ATTRIBUTEID_INVALID;
   69|      9|}
UA_readNumberWithBase:
  111|    581|UA_readNumberWithBase(const UA_Byte *buf, size_t buflen, UA_UInt32 *number, UA_Byte base) {
  112|    581|    UA_assert(buf);
  ------------------
  |  |  400|    581|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (112:5): [True: 581, False: 0]
  ------------------
  113|    581|    UA_assert(number);
  ------------------
  |  |  400|    581|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (113:5): [True: 581, False: 0]
  ------------------
  114|    581|    u32 n = 0;
  115|    581|    size_t progress = 0;
  116|       |    /* read numbers until the end or a non-number character appears */
  117|  1.20M|    while(progress < buflen) {
  ------------------
  |  Branch (117:11): [True: 1.20M, False: 563]
  ------------------
  118|  1.20M|        u8 c = buf[progress];
  119|  1.20M|        if(c >= '0' && c <= '9' && c <= '0' + (base-1))
  ------------------
  |  Branch (119:12): [True: 1.20M, False: 4]
  |  Branch (119:24): [True: 1.20M, False: 14]
  |  Branch (119:36): [True: 1.20M, False: 0]
  ------------------
  120|  1.20M|           n = (n * base) + c - '0';
  121|     18|        else if(base > 9 && c >= 'a' && c <= 'z' && c <= 'a' + (base-11))
  ------------------
  |  Branch (121:17): [True: 18, False: 0]
  |  Branch (121:29): [True: 14, False: 4]
  |  Branch (121:41): [True: 4, False: 10]
  |  Branch (121:53): [True: 0, False: 4]
  ------------------
  122|      0|           n = (n * base) + c-'a' + 10;
  123|     18|        else if(base > 9 && c >= 'A' && c <= 'Z' && c <= 'A' + (base-11))
  ------------------
  |  Branch (123:17): [True: 18, False: 0]
  |  Branch (123:29): [True: 14, False: 4]
  |  Branch (123:41): [True: 0, False: 14]
  |  Branch (123:53): [True: 0, False: 0]
  ------------------
  124|      0|           n = (n * base) + c-'A' + 10;
  125|     18|        else
  126|     18|           break;
  127|  1.20M|        ++progress;
  128|  1.20M|    }
  129|    581|    *number = n;
  130|    581|    return progress;
  131|    581|}
UA_readNumber:
  134|    581|UA_readNumber(const UA_Byte *buf, size_t buflen, UA_UInt32 *number) {
  135|    581|    return UA_readNumberWithBase(buf, buflen, number, 10);
  136|    581|}
lookupRefType:
  727|    682|lookupRefType(UA_Server *server, UA_QualifiedName *qn, UA_NodeId *outRefTypeId) {
  728|       |    /* Check well-known ReferenceTypes first */
  729|    682|    if(qn->namespaceIndex == 0) {
  ------------------
  |  Branch (729:8): [True: 682, False: 0]
  ------------------
  730|  3.17k|        for(size_t i = 0; i < KNOWNREFTYPES; i++) {
  ------------------
  |  |  705|  3.17k|#define KNOWNREFTYPES 17
  ------------------
  |  Branch (730:27): [True: 3.10k, False: 65]
  ------------------
  731|  3.10k|            if(UA_String_equal(&qn->name, &knownRefTypes[i].browseName)) {
  ------------------
  |  Branch (731:16): [True: 617, False: 2.48k]
  ------------------
  732|    617|                *outRefTypeId = UA_NODEID_NUMERIC(0, knownRefTypes[i].identifier);
  733|    617|                return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    617|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  734|    617|            }
  735|  3.10k|        }
  736|    682|    }
  737|       |
  738|       |    /* Browse the information model. Return the first results if the browse name
  739|       |     * in the hierarchy is ambiguous. */
  740|     65|    if(server) {
  ------------------
  |  Branch (740:8): [True: 0, False: 65]
  ------------------
  741|      0|        UA_BrowseDescription bd;
  742|      0|        UA_BrowseDescription_init(&bd);
  743|      0|        bd.nodeId = UA_NODEID_NUMERIC(0, UA_NS0ID_REFERENCES);
  ------------------
  |  |   44|      0|#define UA_NS0ID_REFERENCES 31 /* ReferenceType */
  ------------------
  744|      0|        bd.browseDirection = UA_BROWSEDIRECTION_FORWARD;
  745|      0|        bd.referenceTypeId = UA_NODEID_NUMERIC(0, UA_NS0ID_HASSUBTYPE);
  ------------------
  |  |   56|      0|#define UA_NS0ID_HASSUBTYPE 45 /* ReferenceType */
  ------------------
  746|      0|        bd.nodeClassMask = UA_NODECLASS_REFERENCETYPE;
  747|       |
  748|      0|        size_t resultsSize = 0;
  749|      0|        UA_ExpandedNodeId *results = NULL;
  750|      0|        UA_StatusCode res =
  751|      0|            UA_Server_browseRecursive(server, &bd, &resultsSize, &results);
  752|      0|        if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (752:12): [True: 0, False: 0]
  ------------------
  753|      0|            return res;
  754|      0|        for(size_t i = 0; i < resultsSize; i++) {
  ------------------
  |  Branch (754:27): [True: 0, False: 0]
  ------------------
  755|      0|            UA_QualifiedName bn;
  756|      0|            UA_Server_readBrowseName(server, results[i].nodeId, &bn);
  757|      0|            if(UA_QualifiedName_equal(qn, &bn)) {
  ------------------
  |  Branch (757:16): [True: 0, False: 0]
  ------------------
  758|      0|                UA_QualifiedName_clear(&bn);
  759|      0|                *outRefTypeId = results[i].nodeId;
  760|      0|                UA_NodeId_clear(&results[i].nodeId);
  761|      0|                UA_Array_delete(results, resultsSize, &UA_TYPES[UA_TYPES_NODEID]);
  ------------------
  |  |  565|      0|#define UA_TYPES_NODEID 16
  ------------------
  762|      0|                return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  763|      0|            }
  764|      0|            UA_QualifiedName_clear(&bn);
  765|      0|        }
  766|       |
  767|      0|        UA_Array_delete(results, resultsSize, &UA_TYPES[UA_TYPES_NODEID]);
  ------------------
  |  |  565|      0|#define UA_TYPES_NODEID 16
  ------------------
  768|      0|    }
  769|       |
  770|     65|    return UA_STATUSCODE_BADNOTFOUND;
  ------------------
  |  |  233|     65|#define UA_STATUSCODE_BADNOTFOUND ((UA_StatusCode) 0x803E0000)
  ------------------
  771|     65|}
getRefTypeBrowseName:
  774|  4.90k|getRefTypeBrowseName(const UA_NodeId *refTypeId, UA_String *outBN) {
  775|       |    /* Canonical name known? */
  776|  4.90k|    if(refTypeId->namespaceIndex == 0 &&
  ------------------
  |  Branch (776:8): [True: 4.90k, False: 0]
  ------------------
  777|  4.90k|       refTypeId->identifierType == UA_NODEIDTYPE_NUMERIC) {
  ------------------
  |  Branch (777:8): [True: 676, False: 4.22k]
  ------------------
  778|  2.68k|        for(size_t i = 0; i < KNOWNREFTYPES; i++) {
  ------------------
  |  |  705|  2.68k|#define KNOWNREFTYPES 17
  ------------------
  |  Branch (778:27): [True: 2.64k, False: 36]
  ------------------
  779|  2.64k|            if(refTypeId->identifier.numeric != knownRefTypes[i].identifier)
  ------------------
  |  Branch (779:16): [True: 2.00k, False: 640]
  ------------------
  780|  2.00k|                continue;
  781|    640|            memcpy(outBN->data, knownRefTypes[i].browseName.data, knownRefTypes[i].browseName.length);
  782|    640|            outBN->length = knownRefTypes[i].browseName.length;
  783|    640|            return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    640|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  784|  2.64k|        }
  785|    676|    }
  786|       |
  787|       |    /* Print the NodeId */
  788|  4.26k|    return UA_NodeId_print(refTypeId, outBN);
  789|  4.90k|}
UA_String_unescape:
  803|  8.26k|UA_String_unescape(UA_String *str, UA_Boolean copyEscape, UA_Escaping esc) {
  804|  8.26k|    if(esc == UA_ESCAPING_NONE)
  ------------------
  |  Branch (804:8): [True: 0, False: 8.26k]
  ------------------
  805|      0|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  806|       |
  807|       |    /* Does the string need escaping? */
  808|  8.26k|    UA_String tmp;
  809|  8.26k|    status res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  8.26k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  810|  8.26k|    u8 *pos = str->data;
  811|  8.26k|    u8 *end = str->data + str->length;
  812|  8.26k|    u8 escape_char = (esc == UA_ESCAPING_PERCENT ||
  ------------------
  |  Branch (812:23): [True: 70, False: 8.19k]
  ------------------
  813|  8.26k|                      esc == UA_ESCAPING_PERCENT_EXTENDED) ? '%' : '&';
  ------------------
  |  Branch (813:23): [True: 8.19k, False: 0]
  ------------------
  814|  5.82M|    for(; pos < end; pos++) {
  ------------------
  |  Branch (814:11): [True: 5.81M, False: 7.33k]
  ------------------
  815|  5.81M|        if(*pos == escape_char)
  ------------------
  |  Branch (815:12): [True: 928, False: 5.81M]
  ------------------
  816|    928|            goto escape;
  817|  5.81M|    }
  818|       |
  819|  7.33k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  7.33k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  820|       |
  821|    928| escape:
  822|    928|    if(copyEscape) {
  ------------------
  |  Branch (822:8): [True: 0, False: 928]
  ------------------
  823|      0|        res = UA_String_copy(str, &tmp);
  824|      0|        if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (824:12): [True: 0, False: 0]
  ------------------
  825|      0|            return res;
  826|      0|        pos = tmp.data;
  827|      0|        end = tmp.data + tmp.length;
  828|      0|    }
  829|       |
  830|    928|    u8 byte = 0;
  831|    928|    u8 *writepos = pos;
  832|       |
  833|    928|    res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    928|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  834|    928|    if(esc == UA_ESCAPING_PERCENT ||
  ------------------
  |  Branch (834:8): [True: 0, False: 928]
  ------------------
  835|    928|       esc == UA_ESCAPING_PERCENT_EXTENDED) {
  ------------------
  |  Branch (835:8): [True: 928, False: 0]
  ------------------
  836|       |        /* Percent-Escaping */
  837|  11.4M|        for(; pos < end; pos++) {
  ------------------
  |  Branch (837:15): [True: 11.4M, False: 901]
  ------------------
  838|  11.4M|            if(*pos == '%') {
  ------------------
  |  Branch (838:16): [True: 9.84M, False: 1.64M]
  ------------------
  839|  9.84M|                if(pos + 2 >= end || !isHex(pos[1]) || !isHex(pos[2]))
  ------------------
  |  Branch (839:20): [True: 0, False: 9.84M]
  |  Branch (839:38): [True: 25, False: 9.84M]
  |  Branch (839:56): [True: 2, False: 9.84M]
  ------------------
  840|     27|                    goto out;
  841|  9.84M|                if(pos[1] >= 'a')
  ------------------
  |  Branch (841:20): [True: 326, False: 9.84M]
  ------------------
  842|    326|                    byte = pos[1] - ('a' - 10);
  843|  9.84M|                else if(pos[1] >= 'A')
  ------------------
  |  Branch (843:25): [True: 7, False: 9.84M]
  ------------------
  844|      7|                    byte = pos[1] - ('A' - 10);
  845|  9.84M|                else
  846|  9.84M|                    byte = pos[1] - '0';
  847|  9.84M|                byte <<= 4;
  848|       |
  849|  9.84M|                if(pos[2] >= 'a')
  ------------------
  |  Branch (849:20): [True: 5.13M, False: 4.71M]
  ------------------
  850|  5.13M|                    byte += (u8)(pos[2] - ('a' - 10));
  851|  4.71M|                else if(pos[2] >= 'A')
  ------------------
  |  Branch (851:25): [True: 57, False: 4.71M]
  ------------------
  852|     57|                    byte += (u8)(pos[2] - ('A' - 10));
  853|  4.71M|                else
  854|  4.71M|                    byte += (u8)(pos[2] - '0');
  855|       |
  856|  9.84M|                pos += 2;
  857|  9.84M|                *writepos++ = byte;
  858|  9.84M|                continue;
  859|  9.84M|            }
  860|  1.64M|            *writepos++ = *pos;
  861|  1.64M|        }
  862|    928|    } else {
  863|       |        /* And-Escaping */
  864|      0|        for(; pos < end; pos++) {
  ------------------
  |  Branch (864:15): [True: 0, False: 0]
  ------------------
  865|      0|            if(*pos == '&') {
  ------------------
  |  Branch (865:16): [True: 0, False: 0]
  ------------------
  866|      0|                pos++;
  867|      0|                if(pos == end)
  ------------------
  |  Branch (867:20): [True: 0, False: 0]
  ------------------
  868|      0|                    goto out;
  869|      0|            }
  870|      0|            *writepos++ = *pos;
  871|      0|        }
  872|      0|    }
  873|    901|    res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    901|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  874|       |
  875|    928| out:
  876|    928|    if(copyEscape) {
  ------------------
  |  Branch (876:8): [True: 0, False: 928]
  ------------------
  877|      0|        tmp.length = (size_t)(writepos - tmp.data);
  878|      0|        if(tmp.length == 0)
  ------------------
  |  Branch (878:12): [True: 0, False: 0]
  ------------------
  879|      0|            UA_String_clear(&tmp);
  880|      0|        if(res == UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (880:12): [True: 0, False: 0]
  ------------------
  881|      0|            *str = tmp;
  882|      0|        else
  883|      0|            UA_String_clear(&tmp);
  884|    928|    } else if(res == UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|    928|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (884:15): [True: 901, False: 27]
  ------------------
  885|    901|        str->length = (size_t)(writepos - str->data);
  886|    901|    }
  887|    928|    return res;
  888|    901|}
UA_String_escapedSize:
  894|  11.0k|UA_String_escapedSize(const UA_String s, UA_Escaping esc) {
  895|       |    /* Find out the overhead from escaping */
  896|  11.0k|    size_t overhead = 0;
  897|  63.4M|    for(size_t j = 0; j < s.length; j++) {
  ------------------
  |  Branch (897:23): [True: 63.3M, False: 11.0k]
  ------------------
  898|  63.3M|        if(esc == UA_ESCAPING_AND_EXTENDED)
  ------------------
  |  Branch (898:12): [True: 0, False: 63.3M]
  ------------------
  899|      0|            overhead += isReservedAndExtended(s.data[j]);
  900|  63.3M|        else if(esc == UA_ESCAPING_AND)
  ------------------
  |  Branch (900:17): [True: 0, False: 63.3M]
  ------------------
  901|      0|            overhead += isReservedAnd(s.data[j]);
  902|  63.3M|        else if(esc == UA_ESCAPING_PERCENT)
  ------------------
  |  Branch (902:17): [True: 0, False: 63.3M]
  ------------------
  903|      0|            overhead += (isReservedPercent(s.data[j]) ? 2 : 0);
  ------------------
  |  Branch (903:26): [True: 0, False: 0]
  ------------------
  904|  63.3M|        else /* if(esc == UA_ESCAPING_PERCENT_EXTENDED) */
  905|  63.3M|            overhead += (isReservedPercentExtended(s.data[j]) ? 2 : 0);
  ------------------
  |  Branch (905:26): [True: 59.0M, False: 4.32M]
  ------------------
  906|  63.3M|    }
  907|       |
  908|  11.0k|    return s.length + overhead;
  909|  11.0k|}
UA_String_escapeInsert:
  912|  9.69k|UA_String_escapeInsert(u8 *pos, const UA_String s2, UA_Escaping esc) {
  913|  9.69k|    u8 *begin = pos;
  914|       |
  915|  9.69k|    if(esc == UA_ESCAPING_NONE) {
  ------------------
  |  Branch (915:8): [True: 2.37k, False: 7.32k]
  ------------------
  916|  21.1M|        for(size_t j = 0; j < s2.length; j++)
  ------------------
  |  Branch (916:27): [True: 21.1M, False: 2.37k]
  ------------------
  917|  21.1M|            *pos++ = s2.data[j];
  918|  7.32k|    } else if(esc == UA_ESCAPING_PERCENT || esc == UA_ESCAPING_PERCENT_EXTENDED) {
  ------------------
  |  Branch (918:15): [True: 0, False: 7.32k]
  |  Branch (918:45): [True: 7.32k, False: 0]
  ------------------
  919|  21.1M|        for(size_t j = 0; j < s2.length; j++) {
  ------------------
  |  Branch (919:27): [True: 21.1M, False: 7.32k]
  ------------------
  920|  21.1M|            UA_Boolean reserved = (esc == UA_ESCAPING_PERCENT_EXTENDED) ?
  ------------------
  |  Branch (920:35): [True: 21.1M, False: 0]
  ------------------
  921|  21.1M|                isReservedPercentExtended(s2.data[j]) : isReservedPercent(s2.data[j]);
  922|  21.1M|            if(UA_LIKELY(!reserved)) {
  ------------------
  |  |  579|  21.1M|# define UA_LIKELY(x) __builtin_expect((x), 1)
  |  |  ------------------
  |  |  |  Branch (579:23): [True: 1.45M, False: 19.6M]
  |  |  ------------------
  ------------------
  923|  1.45M|                *pos++ = s2.data[j];
  924|  19.6M|            } else {
  925|  19.6M|                *pos++ = '%';
  926|  19.6M|                *pos++ = hexchars[s2.data[j] >> 4];
  927|  19.6M|                *pos++ = hexchars[s2.data[j] & 0x0f];
  928|  19.6M|            }
  929|  21.1M|        }
  930|  7.32k|    } else {
  931|      0|        for(size_t j = 0; j < s2.length; j++) {
  ------------------
  |  Branch (931:27): [True: 0, False: 0]
  ------------------
  932|      0|            UA_Boolean reserved = (esc == UA_ESCAPING_AND_EXTENDED) ?
  ------------------
  |  Branch (932:35): [True: 0, False: 0]
  ------------------
  933|      0|                isReservedAndExtended(s2.data[j]) : isReservedAnd(s2.data[j]);
  934|      0|            if(reserved)
  ------------------
  |  Branch (934:16): [True: 0, False: 0]
  ------------------
  935|      0|                *pos++ = '&';
  936|      0|            *pos++ = s2.data[j];
  937|      0|        }
  938|      0|    }
  939|       |
  940|  9.69k|    return (size_t)(pos - begin);
  941|  9.69k|}
UA_String_escapeAppend:
  944|  7.25k|UA_String_escapeAppend(UA_String *s, const UA_String s2, UA_Escaping esc) {
  945|  7.25k|    if(esc == UA_ESCAPING_NONE)
  ------------------
  |  Branch (945:8): [True: 0, False: 7.25k]
  ------------------
  946|      0|        return UA_String_append(s, s2);
  947|       |
  948|       |    /* Allocate memory for the additional escaped string */
  949|  7.25k|    size_t escapedLength = UA_String_escapedSize(s2, esc);
  950|  7.25k|    UA_Byte *buf = (UA_Byte*)
  951|  7.25k|        UA_realloc(s->data, s->length + s2.length + escapedLength);
  ------------------
  |  |   21|  7.25k|#define UA_realloc(ptr, size) UA_reallocSingleton(ptr, size)
  ------------------
  952|  7.25k|    if(!buf)
  ------------------
  |  Branch (952:8): [True: 0, False: 7.25k]
  ------------------
  953|      0|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
  954|       |
  955|       |    /* Escape and insert at the end */
  956|  7.25k|    s->data = buf;
  957|  7.25k|    UA_String_escapeInsert(s->data + s->length, s2, esc);
  958|  7.25k|    s->length += escapedLength;
  959|  7.25k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  7.25k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  960|  7.25k|}
UA_AttributeOperand_print:
 1124|    312|                          UA_String *out) {
 1125|    312|    UA_String tmp = UA_STRING_NULL;
 1126|    312|    UA_StatusCode res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    312|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1127|       |
 1128|       |    /* Print the TypeDefinitionId */
 1129|    312|    if(!UA_NodeId_equal(&objectsFolder, &ao->nodeId)) {
  ------------------
  |  Branch (1129:8): [True: 162, False: 150]
  ------------------
 1130|    162|        UA_Byte nodeIdBuf[512];
 1131|    162|        UA_String nodeIdBufStr = {512, nodeIdBuf};
 1132|    162|        res |= nodeId_printEscape(&ao->nodeId, &nodeIdBufStr,
 1133|    162|                                  NULL, UA_ESCAPING_PERCENT_EXTENDED);
 1134|    162|        res |= UA_String_append(&tmp, nodeIdBufStr);
 1135|    162|    }
 1136|       |
 1137|       |    /* Print the BrowsePath */
 1138|    312|    UA_String rpstr = UA_STRING_NULL;
 1139|    312|    UA_assert(rpstr.data == NULL && rpstr.length == 0); /* pacify clang scan-build */
  ------------------
  |  |  400|    312|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (1139:5): [True: 312, False: 0]
  |  Branch (1139:5): [True: 312, False: 0]
  ------------------
 1140|    312|    res |= printRelativePath(&ao->browsePath, &rpstr, UA_ESCAPING_PERCENT_EXTENDED);
 1141|    312|    res |= UA_String_append(&tmp, rpstr);
 1142|    312|    UA_String_clear(&rpstr);
 1143|       |
 1144|       |    /* Print the attribute name */
 1145|    312|    if(ao->attributeId != UA_ATTRIBUTEID_VALUE) {
  ------------------
  |  Branch (1145:8): [True: 0, False: 312]
  ------------------
 1146|      0|        const char *attrName= UA_AttributeId_name((UA_AttributeId)ao->attributeId);
 1147|      0|        res |= UA_String_append(&tmp, UA_STRING("#"));
 1148|      0|        res |= UA_String_append(&tmp, UA_STRING((char*)(uintptr_t)attrName));
 1149|      0|    }
 1150|       |
 1151|       |    /* Print the IndexRange */
 1152|    312|    if(ao->indexRange.length > 0) {
  ------------------
  |  Branch (1152:8): [True: 44, False: 268]
  ------------------
 1153|     44|        res |= UA_String_append(&tmp, UA_STRING("["));
 1154|     44|        res |= UA_String_append(&tmp, ao->indexRange);
 1155|     44|        res |= UA_String_append(&tmp, UA_STRING("]"));
 1156|     44|    }
 1157|       |
 1158|       |    /* Encoding failed, clean up */
 1159|    312|    if(res != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|    312|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1159:8): [True: 0, False: 312]
  ------------------
 1160|      0|        UA_String_clear(&tmp);
 1161|      0|        return res;
 1162|      0|    }
 1163|       |
 1164|    312|    return moveTmpToOut(&tmp, out);
 1165|    312|}
ua_util.c:isHex:
  796|  19.6M|isHex(u8 c) {
  797|  19.6M|    return ((c >= 'a' && c <= 'f') ||
  ------------------
  |  Branch (797:14): [True: 5.13M, False: 14.5M]
  |  Branch (797:26): [True: 5.13M, False: 12]
  ------------------
  798|  14.5M|            (c >= 'A' && c <= 'F') ||
  ------------------
  |  Branch (798:14): [True: 77, False: 14.5M]
  |  Branch (798:26): [True: 64, False: 13]
  ------------------
  799|  14.5M|            (c >= '0' && c <= '9'));
  ------------------
  |  Branch (799:14): [True: 14.5M, False: 14]
  |  Branch (799:26): [True: 14.5M, False: 13]
  ------------------
  800|  19.6M|}
ua_util.c:printRelativePath:
 1000|    312|printRelativePath(const UA_RelativePath *rp, UA_String *out, UA_Escaping esc) {
 1001|    312|    UA_String tmp = UA_STRING_NULL;
 1002|    312|    UA_StatusCode res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    312|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1003|  4.01k|    for(size_t i = 0; i < rp->elementsSize && res == UA_STATUSCODE_GOOD; i++) {
  ------------------
  |  |   17|  3.70k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1003:23): [True: 3.70k, False: 312]
  |  Branch (1003:47): [True: 3.70k, False: 0]
  ------------------
 1004|       |        /* Print the reference type */
 1005|  3.70k|        UA_RelativePathElement *elm = &rp->elements[i];
 1006|  3.70k|        if(UA_NodeId_equal(&hierarchicalRefs, &elm->referenceTypeId) &&
  ------------------
  |  Branch (1006:12): [True: 418, False: 3.28k]
  ------------------
 1007|    418|           !elm->isInverse && elm->includeSubtypes) {
  ------------------
  |  Branch (1007:12): [True: 290, False: 128]
  |  Branch (1007:31): [True: 156, False: 134]
  ------------------
 1008|    156|            res |= UA_String_append(&tmp, UA_STRING("/"));
 1009|  3.54k|        } else if(esc == UA_ESCAPING_AND &&
  ------------------
  |  Branch (1009:19): [True: 0, False: 3.54k]
  ------------------
 1010|      0|                  UA_NodeId_equal(&aggregatesRefs, &elm->referenceTypeId) &&
  ------------------
  |  Branch (1010:19): [True: 0, False: 0]
  ------------------
 1011|      0|                  !elm->isInverse && elm->includeSubtypes) {
  ------------------
  |  Branch (1011:19): [True: 0, False: 0]
  |  Branch (1011:38): [True: 0, False: 0]
  ------------------
 1012|      0|            res |= UA_String_append(&tmp, UA_STRING("."));
 1013|  3.54k|        } else {
 1014|  3.54k|            res |= UA_String_append(&tmp, UA_STRING("<"));
 1015|  3.54k|            if(!elm->includeSubtypes)
  ------------------
  |  Branch (1015:16): [True: 134, False: 3.41k]
  ------------------
 1016|    134|                res |= UA_String_append(&tmp, UA_STRING("#"));
 1017|  3.54k|            if(elm->isInverse)
  ------------------
  |  Branch (1017:16): [True: 166, False: 3.38k]
  ------------------
 1018|    166|                res |= UA_String_append(&tmp, UA_STRING("!"));
 1019|  3.54k|            if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  3.54k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1019:16): [True: 0, False: 3.54k]
  ------------------
 1020|      0|                break;
 1021|       |
 1022|  3.54k|            UA_Byte bnBuf[512];
 1023|  3.54k|            UA_String bnBufStr = {512, bnBuf};
 1024|  3.54k|            res = getRefTypeBrowseName(&elm->referenceTypeId, &bnBufStr);
 1025|  3.54k|            if(res != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|  3.54k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1025:16): [True: 1.35k, False: 2.19k]
  ------------------
 1026|  1.35k|                UA_String_init(&bnBufStr);
 1027|  1.35k|                res = getRefTypeBrowseName(&elm->referenceTypeId, &bnBufStr);
 1028|  1.35k|                if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  1.35k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1028:20): [True: 0, False: 1.35k]
  ------------------
 1029|      0|                    break;
 1030|  1.35k|            }
 1031|  3.54k|            res |= UA_String_escapeAppend(&tmp, bnBufStr, esc);
 1032|  3.54k|            res |= UA_String_append(&tmp, UA_STRING(">"));
 1033|  3.54k|            if(bnBufStr.data != bnBuf)
  ------------------
  |  Branch (1033:16): [True: 1.35k, False: 2.19k]
  ------------------
 1034|  1.35k|                UA_String_clear(&bnBufStr);
 1035|  3.54k|        }
 1036|       |
 1037|       |        /* Print the qualified name */
 1038|  3.70k|        UA_QualifiedName *qn = &elm->targetName;
 1039|  3.70k|        if(qn->namespaceIndex > 0) {
  ------------------
  |  Branch (1039:12): [True: 16, False: 3.68k]
  ------------------
 1040|     16|            char nsStr[8]; /* Enough for a uint16 */
 1041|     16|            itoaUnsigned(qn->namespaceIndex, nsStr, 10);
 1042|     16|            res |= UA_String_append(&tmp, UA_STRING(nsStr));
 1043|     16|            res |= UA_String_append(&tmp, UA_STRING(":"));
 1044|     16|        }
 1045|  3.70k|        res |= UA_String_escapeAppend(&tmp, qn->name, esc);
 1046|  3.70k|    }
 1047|       |
 1048|       |    /* Encoding failed, clean up */
 1049|    312|    if(res != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|    312|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1049:8): [True: 0, False: 312]
  ------------------
 1050|      0|        UA_String_clear(&tmp);
 1051|      0|        return res;
 1052|      0|    }
 1053|       |
 1054|    312|    return moveTmpToOut(&tmp, out);
 1055|    312|}
ua_util.c:moveTmpToOut:
  963|    624|moveTmpToOut(UA_String *tmp, UA_String *out) {
  964|       |    /* Output has zero length */
  965|    624|    if(tmp->length == 0) {
  ------------------
  |  Branch (965:8): [True: 36, False: 588]
  ------------------
  966|     36|        UA_assert(tmp->data == NULL);
  ------------------
  |  |  400|     36|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (966:9): [True: 36, False: 0]
  ------------------
  967|     36|        if(out->data == NULL)
  ------------------
  |  Branch (967:12): [True: 36, False: 0]
  ------------------
  968|     36|            out->data = (UA_Byte*)UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|     36|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  969|     36|        out->length = 0;
  970|     36|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     36|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  971|     36|    }
  972|       |
  973|       |    /* No output buffer provided, return the tmp buffer */
  974|    588|    if(out->length == 0) {
  ------------------
  |  Branch (974:8): [True: 588, False: 0]
  ------------------
  975|    588|        *out = *tmp;
  976|    588|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    588|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  977|    588|    }
  978|       |
  979|       |    /* The provided buffer is too short */
  980|      0|    if(out->length < tmp->length) {
  ------------------
  |  Branch (980:8): [True: 0, False: 0]
  ------------------
  981|      0|        UA_String_clear(tmp);
  982|      0|        return UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED;
  ------------------
  |  |   47|      0|#define UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED ((UA_StatusCode) 0x80080000)
  ------------------
  983|      0|    }
  984|       |
  985|       |    /* Copy output to the provided buffer */
  986|      0|    memcpy(out->data, tmp->data, tmp->length);
  987|      0|    out->length = tmp->length;
  988|      0|    UA_String_clear(tmp);
  989|      0|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  990|      0|}

ua_util.c:isReservedPercent:
   95|  84.5M|isReservedPercent(u8 c) {
   96|  84.5M|    return (c == ';'  || c == '%' || c <= ' ' || c == 127);
  ------------------
  |  Branch (96:13): [True: 22.5k, False: 84.5M]
  |  Branch (96:26): [True: 5.64k, False: 84.5M]
  |  Branch (96:38): [True: 36.4M, False: 48.0M]
  |  Branch (96:50): [True: 312, False: 48.0M]
  ------------------
   97|  84.5M|}
ua_util.c:isReservedPercentExtended:
  100|  84.5M|isReservedPercentExtended(u8 c) {
  101|  84.5M|    return (isReservedPercent(c) || c == ':' || c == '#' || c == '[' || c == ']' ||
  ------------------
  |  Branch (101:13): [True: 36.4M, False: 48.0M]
  |  Branch (101:37): [True: 2.79k, False: 48.0M]
  |  Branch (101:49): [True: 4.84k, False: 48.0M]
  |  Branch (101:61): [True: 40.8M, False: 7.20M]
  |  Branch (101:73): [True: 23.9k, False: 7.17M]
  ------------------
  102|  7.17M|            c == '&' || c == '(' || c == ')' || c == ',' || c == '<' || c == '>' ||
  ------------------
  |  Branch (102:13): [True: 898k, False: 6.28M]
  |  Branch (102:25): [True: 173k, False: 6.10M]
  |  Branch (102:37): [True: 182k, False: 5.92M]
  |  Branch (102:49): [True: 48.0k, False: 5.87M]
  |  Branch (102:61): [True: 22.7k, False: 5.85M]
  |  Branch (102:73): [True: 0, False: 5.85M]
  ------------------
  103|  5.85M|            c == '`' || c == '/' || c == '\\' || c == '"' || c == '\'' );
  ------------------
  |  Branch (103:13): [True: 14.2k, False: 5.83M]
  |  Branch (103:25): [True: 36.9k, False: 5.80M]
  |  Branch (103:37): [True: 2.77k, False: 5.80M]
  |  Branch (103:50): [True: 14.3k, False: 5.78M]
  |  Branch (103:62): [True: 3.84k, False: 5.78M]
  ------------------
  104|  84.5M|}
ua_types_lex.c:isReservedPercentExtended:
  100|   421k|isReservedPercentExtended(u8 c) {
  101|   421k|    return (isReservedPercent(c) || c == ':' || c == '#' || c == '[' || c == ']' ||
  ------------------
  |  Branch (101:13): [True: 9, False: 421k]
  |  Branch (101:37): [True: 0, False: 421k]
  |  Branch (101:49): [True: 0, False: 421k]
  |  Branch (101:61): [True: 15, False: 421k]
  |  Branch (101:73): [True: 0, False: 421k]
  ------------------
  102|   421k|            c == '&' || c == '(' || c == ')' || c == ',' || c == '<' || c == '>' ||
  ------------------
  |  Branch (102:13): [True: 0, False: 421k]
  |  Branch (102:25): [True: 0, False: 421k]
  |  Branch (102:37): [True: 0, False: 421k]
  |  Branch (102:49): [True: 0, False: 421k]
  |  Branch (102:61): [True: 4.43k, False: 416k]
  |  Branch (102:73): [True: 0, False: 416k]
  ------------------
  103|   416k|            c == '`' || c == '/' || c == '\\' || c == '"' || c == '\'' );
  ------------------
  |  Branch (103:13): [True: 0, False: 416k]
  |  Branch (103:25): [True: 396, False: 416k]
  |  Branch (103:37): [True: 0, False: 416k]
  |  Branch (103:50): [True: 0, False: 416k]
  |  Branch (103:62): [True: 0, False: 416k]
  ------------------
  104|   421k|}
ua_types_lex.c:isReservedPercent:
   95|   421k|isReservedPercent(u8 c) {
   96|   421k|    return (c == ';'  || c == '%' || c <= ' ' || c == 127);
  ------------------
  |  Branch (96:13): [True: 0, False: 421k]
  |  Branch (96:26): [True: 0, False: 421k]
  |  Branch (96:38): [True: 9, False: 421k]
  |  Branch (96:50): [True: 0, False: 421k]
  ------------------
   97|   421k|}

UA_memoryManager_setLimitFromLast4Bytes:
  161|    272|int UA_memoryManager_setLimitFromLast4Bytes(const uint8_t *data, size_t size) {
  162|    272|    UA_mallocSingleton = UA_memoryManager_malloc;
  163|    272|    UA_freeSingleton = UA_memoryManager_free;
  164|    272|    UA_callocSingleton = UA_memoryManager_calloc;
  165|    272|    UA_reallocSingleton = UA_memoryManager_realloc;
  166|    272|    if(size <4)
  ------------------
  |  Branch (166:8): [True: 0, False: 272]
  ------------------
  167|      0|        return 0;
  168|       |    // just cast the last 4 bytes to uint32
  169|    272|    uint32_t limit;
  170|    272|    memcpy(&limit, &data[size-4], sizeof(uint32_t));
  171|    272|    memoryLimit = limit;
  172|    272|    return 1;
  173|    272|}
custom_memory_manager.c:UA_memoryManager_malloc:
  114|    161|static void *UA_memoryManager_malloc(size_t size) {
  115|    161|    if(totalMemorySize + size > memoryLimit)
  ------------------
  |  Branch (115:8): [True: 21, False: 140]
  ------------------
  116|     21|        return NULL;
  117|    140|    void *addr = malloc(size);
  118|    140|    if(!addr)
  ------------------
  |  Branch (118:8): [True: 0, False: 140]
  ------------------
  119|      0|        return NULL;
  120|    140|    addToMap(size, addr);
  121|    140|    return addr;
  122|    140|}
custom_memory_manager.c:addToMap:
   52|  26.8k|static int addToMap(size_t size, void *addr) {
   53|  26.8k|    struct UA_mm_entry *newEntry = (struct UA_mm_entry*)malloc(sizeof(struct UA_mm_entry));
   54|  26.8k|    if(!newEntry) {
  ------------------
  |  Branch (54:8): [True: 0, False: 26.8k]
  ------------------
   55|       |        //printf("MemoryManager: Could not allocate memory");
   56|      0|        return 0;
   57|      0|    }
   58|  26.8k|    newEntry->size = size;
   59|  26.8k|    newEntry->address = addr;
   60|  26.8k|    newEntry->next = NULL;
   61|  26.8k|    pthread_mutex_lock(&mutex);
   62|  26.8k|    newEntry->prev = address_map_last;
   63|  26.8k|    if(address_map_last)
  ------------------
  |  Branch (63:8): [True: 26.3k, False: 451]
  ------------------
   64|  26.3k|        address_map_last->next = newEntry;
   65|  26.8k|    address_map_last = newEntry;
   66|  26.8k|    totalMemorySize += size;
   67|  26.8k|    if(address_map_first == NULL)
  ------------------
  |  Branch (67:8): [True: 451, False: 26.3k]
  ------------------
   68|    451|        address_map_first = newEntry;
   69|  26.8k|    pthread_mutex_unlock(&mutex);
   70|       |    //printf("Total size (malloc): %lld And new address: %p Entry %p\n", totalMemorySize, addr, (void*)newEntry);
   71|       |
   72|  26.8k|    return 1;
   73|  26.8k|}
custom_memory_manager.c:UA_memoryManager_free:
  146|  12.9k|static void UA_memoryManager_free(void* ptr) {
  147|  12.9k|    removeFromMap(ptr);
  148|  12.9k|    free(ptr);
  149|  12.9k|}
custom_memory_manager.c:removeFromMap:
   82|  33.2k|static int removeFromMap(void *addr) {
   83|  33.2k|    if(addr == NULL)
  ------------------
  |  Branch (83:8): [True: 6.45k, False: 26.8k]
  ------------------
   84|  6.45k|        return 1;
   85|       |
   86|  26.8k|    pthread_mutex_lock(&mutex);
   87|       |
   88|  26.8k|    struct UA_mm_entry *e = address_map_last;
   89|       |
   90|   414k|    while (e) {
  ------------------
  |  Branch (90:12): [True: 414k, False: 0]
  ------------------
   91|   414k|        if(e->address == addr) {
  ------------------
  |  Branch (91:12): [True: 26.8k, False: 387k]
  ------------------
   92|  26.8k|            if(e == address_map_first)
  ------------------
  |  Branch (92:16): [True: 5.02k, False: 21.7k]
  ------------------
   93|  5.02k|                address_map_first = e->next;
   94|  26.8k|            if(e == address_map_last)
  ------------------
  |  Branch (94:16): [True: 15.4k, False: 11.3k]
  ------------------
   95|  15.4k|                address_map_last = e->prev;
   96|  26.8k|            if(e->prev)
  ------------------
  |  Branch (96:16): [True: 21.7k, False: 5.02k]
  ------------------
   97|  21.7k|                e->prev->next = e->next;
   98|  26.8k|            if(e->next)
  ------------------
  |  Branch (98:16): [True: 11.3k, False: 15.4k]
  ------------------
   99|  11.3k|                e->next->prev = e->prev;
  100|  26.8k|            totalMemorySize -= e->size;
  101|       |
  102|       |            //printf("Total size (free): %lld after addr %p and deleting %p\n", totalMemorySize, addr, (void*)e);
  103|  26.8k|            free(e);
  104|  26.8k|            pthread_mutex_unlock(&mutex);
  105|  26.8k|            return 1;
  106|  26.8k|        }
  107|   387k|        e = e->prev;
  108|   387k|    }
  109|      0|    pthread_mutex_unlock(&mutex);
  110|       |    //printf("MemoryManager: Entry with address %p not found", addr);
  111|      0|    return 0;
  112|  26.8k|}
custom_memory_manager.c:UA_memoryManager_calloc:
  124|  6.36k|static void *UA_memoryManager_calloc(size_t num, size_t size) {
  125|  6.36k|    if(totalMemorySize + (size * num) > memoryLimit)
  ------------------
  |  Branch (125:8): [True: 34, False: 6.33k]
  ------------------
  126|     34|        return NULL;
  127|  6.33k|    void *addr = calloc(num, size);
  128|  6.33k|    if(!addr)
  ------------------
  |  Branch (128:8): [True: 0, False: 6.33k]
  ------------------
  129|      0|        return NULL;
  130|  6.33k|    addToMap(size*num, addr);
  131|  6.33k|    return addr;
  132|  6.33k|}
custom_memory_manager.c:UA_memoryManager_realloc:
  134|  20.3k|static void *UA_memoryManager_realloc(void *ptr, size_t new_size) {
  135|  20.3k|    removeFromMap(ptr);
  136|  20.3k|    if(totalMemorySize + new_size > memoryLimit)
  ------------------
  |  Branch (136:8): [True: 0, False: 20.3k]
  ------------------
  137|      0|        return NULL;
  138|  20.3k|    void *addr = realloc(ptr, new_size);
  139|  20.3k|    if(!addr)
  ------------------
  |  Branch (139:8): [True: 0, False: 20.3k]
  ------------------
  140|      0|        return NULL;
  141|  20.3k|    addToMap(new_size, addr);
  142|  20.3k|    return addr;
  143|       |
  144|  20.3k|}

LLVMFuzzerTestOneInput:
   18|    272|extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
   19|    272|    if(size <= 6)
  ------------------
  |  Branch (19:8): [True: 0, False: 272]
  ------------------
   20|      0|        return 0;
   21|       |
   22|       |    // set the available memory
   23|    272|    if(!UA_memoryManager_setLimitFromLast4Bytes(data, size))
  ------------------
  |  Branch (23:8): [True: 0, False: 272]
  ------------------
   24|      0|        return 0;
   25|       |
   26|    272|    data += 4;
   27|    272|    size -= 4;
   28|       |
   29|    272|    const UA_String input = {size, (UA_Byte *) (void *) data};
   30|    272|    UA_String out = UA_STRING_NULL;
   31|    272|    UA_String out2 = UA_STRING_NULL;
   32|       |
   33|    272|    UA_AttributeOperand ao;
   34|    272|    UA_AttributeOperand ao2;
   35|    272|    UA_AttributeOperand_init(&ao2);
   36|    272|    UA_StatusCode ret = UA_AttributeOperand_parse(&ao, input);
   37|    272|    if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    272|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (37:8): [True: 116, False: 156]
  ------------------
   38|    116|        return 0;
   39|       |
   40|    156|    ret = UA_AttributeOperand_print(&ao, &out);
   41|    156|    if(ret == UA_STATUSCODE_BADOUTOFMEMORY)
  ------------------
  |  |   32|    156|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
  |  Branch (41:8): [True: 0, False: 156]
  ------------------
   42|      0|        goto cleanup;
   43|    156|    UA_assert(ret == UA_STATUSCODE_GOOD);
  ------------------
  |  |  400|    156|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (43:5): [True: 156, False: 0]
  ------------------
   44|       |
   45|    156|    ret = UA_AttributeOperand_parse(&ao2, out);
   46|    156|    if(ret == UA_STATUSCODE_BADOUTOFMEMORY)
  ------------------
  |  |   32|    156|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
  |  Branch (46:8): [True: 0, False: 156]
  ------------------
   47|      0|        goto cleanup;
   48|    156|    UA_assert(ret == UA_STATUSCODE_GOOD);
  ------------------
  |  |  400|    156|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (48:5): [True: 156, False: 0]
  ------------------
   49|       |
   50|    156|    ret = UA_AttributeOperand_print(&ao2, &out2);
   51|    156|    if(ret == UA_STATUSCODE_BADOUTOFMEMORY)
  ------------------
  |  |   32|    156|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
  |  Branch (51:8): [True: 0, False: 156]
  ------------------
   52|      0|        goto cleanup;
   53|    156|    UA_assert(ret == UA_STATUSCODE_GOOD);
  ------------------
  |  |  400|    156|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (53:5): [True: 156, False: 0]
  ------------------
   54|       |
   55|    156|    UA_assert(UA_String_equal(&out, &out2));
  ------------------
  |  |  400|    156|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (55:5): [True: 156, False: 0]
  ------------------
   56|    156|    UA_assert(UA_equal(&ao, &ao2, &UA_TYPES[UA_TYPES_ATTRIBUTEOPERAND]));
  ------------------
  |  |  400|    156|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (56:5): [True: 156, False: 0]
  ------------------
   57|       |
   58|    156| cleanup:
   59|    156|    UA_String_clear(&out);
   60|    156|    UA_String_clear(&out2);
   61|    156|    UA_AttributeOperand_clear(&ao);
   62|    156|    UA_AttributeOperand_clear(&ao2);
   63|    156|    return 0;
   64|    156|}

fuzz_attributeoperand.cc:_ZL24UA_AttributeOperand_initP19UA_AttributeOperand:
  244|    272|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
fuzz_attributeoperand.cc:_ZL15UA_String_equalPK9UA_StringS1_:
  244|    156|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
fuzz_attributeoperand.cc:_ZL15UA_String_clearP9UA_String:
  244|    312|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
fuzz_attributeoperand.cc:_ZL25UA_AttributeOperand_clearP19UA_AttributeOperand:
  244|    312|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types.c:UA_ByteString_init:
  244|  1.35k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_util.c:UA_String_init:
  244|  1.35k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_util.c:UA_String_equal:
  244|  3.10k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_util.c:UA_String_clear:
  244|  1.66k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_util.c:UA_NodeId_equal:
  244|  4.01k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_String_copy:
  244|  9.07k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_QualifiedName_clear:
  244|    682|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_RelativePath_init:
  244|    414|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_RelativePathElement_init:
  244|  5.09k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_RelativePathElement_clear:
  244|     71|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_AttributeOperand_init:
  244|    428|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_QualifiedName_init:
  244|  5.62k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_AttributeOperand_clear:
  244|    116|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl

