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

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

UA_STRING:
  220|  79.3k|UA_STRING(char *chars) {
  221|  79.3k|    UA_String s = {0, NULL};
  222|  79.3k|    if(!chars)
  ------------------
  |  Branch (222:8): [True: 0, False: 79.3k]
  ------------------
  223|      0|        return s;
  224|  79.3k|    s.length = strlen(chars);
  225|  79.3k|    s.data = (UA_Byte*)chars;
  226|  79.3k|    return s;
  227|  79.3k|}
UA_String_append:
  296|  79.8k|UA_String_append(UA_String *s, const UA_String s2) {
  297|  79.8k|    if(s2.length == 0)
  ------------------
  |  Branch (297:8): [True: 22, False: 79.7k]
  ------------------
  298|     22|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|     22|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  299|  79.7k|    UA_Byte *buf = (UA_Byte*)UA_realloc(s->data, s->length + s2.length);
  ------------------
  |  |   21|  79.7k|#define UA_realloc(ptr, size) UA_reallocSingleton(ptr, size)
  ------------------
  300|  79.7k|    if(!buf)
  ------------------
  |  Branch (300:8): [True: 0, False: 79.7k]
  ------------------
  301|      0|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   31|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
  302|  79.7k|    memcpy(buf + s->length, s2.data, s2.length);
  303|  79.7k|    s->data = buf;
  304|  79.7k|    s->length += s2.length;
  305|  79.7k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|  79.7k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  306|  79.7k|}
UA_ByteString_allocBuffer:
  758|    806|UA_ByteString_allocBuffer(UA_ByteString *bs, size_t length) {
  759|    806|    UA_ByteString_init(bs);
  760|    806|    if(length == 0) {
  ------------------
  |  Branch (760:8): [True: 0, False: 806]
  ------------------
  761|      0|        bs->data = (u8*)UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  755|      0|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  762|      0|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  763|      0|    }
  764|    806|    bs->data = (u8*)UA_calloc(1,length);
  ------------------
  |  |   20|    806|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
  765|    806|    if(UA_UNLIKELY(!bs->data))
  ------------------
  |  |  577|    806|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  ------------------
  |  |  |  Branch (577:25): [True: 0, False: 806]
  |  |  ------------------
  ------------------
  766|      0|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   31|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
  767|    806|    bs->length = length;
  768|    806|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|    806|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  769|    806|}
UA_NODEID_NUMERIC:
  828|  74.0k|UA_NODEID_NUMERIC(UA_UInt16 nsIndex, UA_UInt32 identifier) {
  829|  74.0k|    UA_NodeId id;
  830|  74.0k|    memset(&id, 0, sizeof(UA_NodeId));
  831|  74.0k|    id.namespaceIndex = nsIndex;
  832|  74.0k|    id.identifierType = UA_NODEIDTYPE_NUMERIC;
  833|  74.0k|    id.identifier.numeric = identifier;
  834|  74.0k|    return id;
  835|  74.0k|}
nodeId_printEscape:
 1022|  3.73k|                   const UA_NamespaceMapping *nsMapping, UA_Escaping idEsc) {
 1023|       |    /* Try to map the NamespaceIndex to the Uri */
 1024|  3.73k|    UA_String nsUri = UA_STRING_NULL;
 1025|  3.73k|    if(id->namespaceIndex > 0 && nsMapping)
  ------------------
  |  Branch (1025:8): [True: 56, False: 3.68k]
  |  Branch (1025:34): [True: 0, False: 56]
  ------------------
 1026|      0|        UA_NamespaceMapping_index2Uri(nsMapping, id->namespaceIndex, &nsUri);
 1027|       |
 1028|       |    /* Compute the string length and print numerical identifiers. */
 1029|  3.73k|    u8 nsStr[7];
 1030|  3.73k|    u8 numIdStr[12];
 1031|  3.73k|    size_t idLen = nodeIdSize(id, nsStr, numIdStr, nsUri, idEsc);
 1032|  3.73k|    if(idLen == 0)
  ------------------
  |  Branch (1032:8): [True: 0, False: 3.73k]
  ------------------
 1033|      0|        return UA_STATUSCODE_BADINTERNALERROR;
  ------------------
  |  |   28|      0|#define UA_STATUSCODE_BADINTERNALERROR ((UA_StatusCode) 0x80020000)
  ------------------
 1034|       |
 1035|       |    /* Allocate memory if required */
 1036|  3.73k|    if(output->length == 0) {
  ------------------
  |  Branch (1036:8): [True: 806, False: 2.93k]
  ------------------
 1037|    806|        UA_StatusCode res = UA_ByteString_allocBuffer((UA_ByteString*)output, idLen);
 1038|    806|        if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   16|    806|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1038:12): [True: 0, False: 806]
  ------------------
 1039|      0|            return res;
 1040|  2.93k|    } else {
 1041|  2.93k|        if(output->length < idLen)
  ------------------
  |  Branch (1041:12): [True: 806, False: 2.12k]
  ------------------
 1042|    806|            return UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED;
  ------------------
  |  |   46|    806|#define UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED ((UA_StatusCode) 0x80080000)
  ------------------
 1043|  2.12k|        output->length = idLen;
 1044|  2.12k|    }
 1045|       |
 1046|       |    /* Print the NodeId */
 1047|  2.93k|    u8 *pos = printNodeIdBody(id, nsUri, nsStr, numIdStr, output->data, nsMapping, idEsc);
 1048|  2.93k|    output->length = (size_t)(pos - output->data);
 1049|  2.93k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|  2.93k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1050|  3.73k|}
UA_NodeId_printEx:
 1054|  3.60k|                  const UA_NamespaceMapping *nsMapping) {
 1055|  3.60k|    return nodeId_printEscape(id, output, nsMapping, UA_ESCAPING_NONE);
 1056|  3.60k|}
UA_NodeId_print:
 1059|  3.60k|UA_NodeId_print(const UA_NodeId *id, UA_String *output) {
 1060|       |    return UA_NodeId_printEx(id, output, NULL);
 1061|  3.60k|}
UA_copy:
 2059|  81.4k|UA_copy(const void *src, void *dst, const UA_DataType *type) {
 2060|  81.4k|    memset(dst, 0, type->memSize); /* init */
 2061|  81.4k|    UA_StatusCode retval = copyJumpTable[type->typeKind](src, dst, type);
 2062|  81.4k|    if(retval != UA_STATUSCODE_GOOD)
  ------------------
  |  |   16|  81.4k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2062:8): [True: 26, False: 81.4k]
  ------------------
 2063|     26|        UA_clear(dst, type);
 2064|  81.4k|    return retval;
 2065|  81.4k|}
UA_clear:
 2162|  80.0k|UA_clear(void *p, const UA_DataType *type) {
 2163|  80.0k|    clearJumpTable[type->typeKind](p, type);
 2164|  80.0k|    memset(p, 0, type->memSize); /* init */
 2165|  80.0k|}
UA_order:
 2616|  79.3k|UA_Order UA_order(const void *p1, const void *p2, const UA_DataType *type) {
 2617|  79.3k|    return orderJumpTable[type->typeKind](p1, p2, type);
 2618|  79.3k|}
UA_equal:
 2621|    151|UA_equal(const void *p1, const void *p2, const UA_DataType *type) {
 2622|    151|    return (UA_order(p1, p2, type) == UA_ORDER_EQ);
 2623|    151|}
UA_Array_copy:
 2640|  81.4k|              void **dst, const UA_DataType *type) {
 2641|  81.4k|    if(size == 0) {
  ------------------
  |  Branch (2641:8): [True: 76.5k, False: 4.97k]
  ------------------
 2642|  76.5k|        if(src == NULL)
  ------------------
  |  Branch (2642:12): [True: 0, False: 76.5k]
  ------------------
 2643|      0|            *dst = NULL;
 2644|  76.5k|        else
 2645|  76.5k|            *dst= UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  755|  76.5k|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
 2646|  76.5k|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|  76.5k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2647|  76.5k|    }
 2648|       |
 2649|       |    /* Check the array consistency -- defensive programming in case the user
 2650|       |     * manually created an inconsistent array */
 2651|  4.97k|    if(UA_UNLIKELY(!type || !src))
  ------------------
  |  |  577|  9.95k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  ------------------
  |  |  |  Branch (577:25): [True: 0, False: 4.97k]
  |  |  |  Branch (577:43): [True: 0, False: 4.97k]
  |  |  |  Branch (577:43): [True: 0, False: 4.97k]
  |  |  ------------------
  ------------------
 2652|      0|        return UA_STATUSCODE_BADINTERNALERROR;
  ------------------
  |  |   28|      0|#define UA_STATUSCODE_BADINTERNALERROR ((UA_StatusCode) 0x80020000)
  ------------------
 2653|       |
 2654|       |    /* calloc, so we don't have to check retval in every iteration of copying */
 2655|  4.97k|    *dst = UA_calloc(size, type->memSize);
  ------------------
  |  |   20|  4.97k|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
 2656|  4.97k|    if(!*dst)
  ------------------
  |  Branch (2656:8): [True: 26, False: 4.94k]
  ------------------
 2657|     26|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   31|     26|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 2658|       |
 2659|  4.94k|    if(type->pointerFree) {
  ------------------
  |  Branch (2659:8): [True: 4.94k, False: 0]
  ------------------
 2660|  4.94k|        memcpy(*dst, src, type->memSize * size);
 2661|  4.94k|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|  4.94k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2662|  4.94k|    }
 2663|       |
 2664|      0|    uintptr_t ptrs = (uintptr_t)src;
 2665|      0|    uintptr_t ptrd = (uintptr_t)*dst;
 2666|      0|    UA_StatusCode retval = UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2667|      0|    for(size_t i = 0; i < size; ++i) {
  ------------------
  |  Branch (2667:23): [True: 0, False: 0]
  ------------------
 2668|      0|        retval |= UA_copy((void*)ptrs, (void*)ptrd, type);
 2669|      0|        ptrs += type->memSize;
 2670|      0|        ptrd += type->memSize;
 2671|      0|    }
 2672|      0|    if(retval != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   16|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2672:8): [True: 0, False: 0]
  ------------------
 2673|      0|        UA_Array_delete(*dst, size, type);
 2674|       |        *dst = NULL;
 2675|      0|    }
 2676|      0|    return retval;
 2677|  4.94k|}
UA_Array_delete:
 2768|  84.8k|UA_Array_delete(void *p, size_t size, const UA_DataType *type) {
 2769|  84.8k|    if(!type->pointerFree) {
  ------------------
  |  Branch (2769:8): [True: 440, False: 84.4k]
  ------------------
 2770|    440|        uintptr_t ptr = (uintptr_t)p;
 2771|  77.9k|        for(size_t i = 0; i < size; ++i) {
  ------------------
  |  Branch (2771:27): [True: 77.5k, False: 440]
  ------------------
 2772|  77.5k|            UA_clear((void*)ptr, type);
 2773|  77.5k|            ptr += type->memSize;
 2774|  77.5k|        }
 2775|    440|    }
 2776|  84.8k|    UA_free((void*)((uintptr_t)p & ~(uintptr_t)UA_EMPTY_ARRAY_SENTINEL));
  ------------------
  |  |   19|  84.8k|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 2777|  84.8k|}
ua_types.c:nodeIdSize:
  921|  3.73k|           UA_Escaping idEsc) {
  922|       |    /* Namespace length */
  923|  3.73k|    size_t len = 0;
  924|  3.73k|    if(nsUri.data != NULL) {
  ------------------
  |  Branch (924:8): [True: 0, False: 3.73k]
  ------------------
  925|      0|        len += 5; /* nsu=; */
  926|      0|        len += UA_String_escapedSize(nsUri, UA_ESCAPING_PERCENT);
  927|  3.73k|    } else if(id->namespaceIndex > 0) {
  ------------------
  |  Branch (927:15): [True: 56, False: 3.68k]
  ------------------
  928|     56|        len += 4; /* ns=; */
  929|     56|        size_t nsStrSize = itoaUnsigned(id->namespaceIndex, (char*)nsStr, 10);
  930|     56|        nsStr[nsStrSize] = 0;
  931|     56|        len += nsStrSize;
  932|     56|    }
  933|       |
  934|  3.73k|    len += 2; /* ?= */
  935|       |
  936|  3.73k|    switch (id->identifierType) {
  937|     96|    case UA_NODEIDTYPE_NUMERIC: {
  ------------------
  |  Branch (937:5): [True: 96, False: 3.64k]
  ------------------
  938|     96|        size_t numIdStrSize = itoaUnsigned(id->identifier.numeric, (char*)numIdStr, 10);
  939|     96|        numIdStr[numIdStrSize] = 0;
  940|     96|        len += numIdStrSize;
  941|     96|        break;
  942|      0|    }
  943|  3.12k|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (943:5): [True: 3.12k, False: 610]
  ------------------
  944|  3.12k|        len += UA_String_escapedSize(id->identifier.string, idEsc);
  945|  3.12k|        break;
  946|      0|    case UA_NODEIDTYPE_GUID:
  ------------------
  |  Branch (946:5): [True: 0, False: 3.73k]
  ------------------
  947|      0|        len += 36;
  948|      0|        break;
  949|    514|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (949:5): [True: 514, False: 3.22k]
  ------------------
  950|    514|        len += 4 * ((id->identifier.byteString.length + 2) / 3);
  951|    514|        break;
  952|      0|    default:
  ------------------
  |  Branch (952:5): [True: 0, False: 3.73k]
  ------------------
  953|      0|        len = 0;
  954|  3.73k|    }
  955|  3.73k|    return len;
  956|  3.73k|}
ua_types.c:printNodeIdBody:
  960|  2.93k|                const UA_NamespaceMapping *nsMapping, UA_Escaping idEsc) {
  961|  2.93k|    size_t len;
  962|       |
  963|       |    /* Encode the namespace */
  964|  2.93k|    if(nsUri.data != NULL) {
  ------------------
  |  Branch (964:8): [True: 0, False: 2.93k]
  ------------------
  965|      0|        memcpy(pos, "nsu=", 4);
  966|      0|        pos += 4;
  967|      0|        pos += UA_String_escapeInsert(pos, nsUri, UA_ESCAPING_PERCENT);
  968|      0|        *pos++ = ';';
  969|  2.93k|    } else if(id->namespaceIndex > 0) {
  ------------------
  |  Branch (969:15): [True: 56, False: 2.87k]
  ------------------
  970|     56|        memcpy(pos, "ns=", 3);
  971|     56|        pos += 3;
  972|     56|        len = strlen((char*)nsStr);
  973|     56|        memcpy(pos, nsStr, len);
  974|     56|        pos += len;
  975|     56|        *pos++ = ';';
  976|     56|    }
  977|       |
  978|       |    /* Encode the identifier */
  979|  2.93k|    switch(id->identifierType) {
  ------------------
  |  Branch (979:12): [True: 2.93k, False: 0]
  ------------------
  980|     96|    case UA_NODEIDTYPE_NUMERIC:
  ------------------
  |  Branch (980:5): [True: 96, False: 2.83k]
  ------------------
  981|     96|        memcpy(pos, "i=", 2);
  982|     96|        pos += 2;
  983|     96|        len = strlen((char*)numIdStr);
  984|     96|        memcpy(pos, numIdStr, len);
  985|     96|        pos += len;
  986|     96|        break;
  987|  2.32k|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (987:5): [True: 2.32k, False: 610]
  ------------------
  988|  2.32k|        memcpy(pos, "s=", 2);
  989|  2.32k|        pos += 2;
  990|  2.32k|        pos += UA_String_escapeInsert(pos, id->identifier.string, idEsc);
  991|  2.32k|        break;
  992|      0|    case UA_NODEIDTYPE_GUID:
  ------------------
  |  Branch (992:5): [True: 0, False: 2.93k]
  ------------------
  993|      0|        memcpy(pos, "g=", 2);
  994|      0|        pos += 2;
  995|      0|        UA_Guid_to_hex(&id->identifier.guid, pos, true);
  996|      0|        pos += 36;
  997|      0|        break;
  998|    514|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (998:5): [True: 514, False: 2.41k]
  ------------------
  999|    514|        memcpy(pos, "b=", 2);
 1000|    514|        pos += 2;
 1001|       |        /* Use base64url encoding for percent-escaping.
 1002|       |         * Replace +/ with -_ and remove the padding. */
 1003|    514|        u8 *bpos = pos;
 1004|    514|        pos += UA_base64_buf(id->identifier.byteString.data,
 1005|    514|                             id->identifier.byteString.length, pos);
 1006|    514|        if(idEsc == UA_ESCAPING_PERCENT ||
  ------------------
  |  Branch (1006:12): [True: 0, False: 514]
  ------------------
 1007|    514|           idEsc == UA_ESCAPING_PERCENT_EXTENDED) {
  ------------------
  |  Branch (1007:12): [True: 0, False: 514]
  ------------------
 1008|      0|            while(pos > bpos && pos[-1] == '=')
  ------------------
  |  Branch (1008:19): [True: 0, False: 0]
  |  Branch (1008:33): [True: 0, False: 0]
  ------------------
 1009|      0|                pos--;
 1010|      0|            for(; bpos < pos; bpos++) {
  ------------------
  |  Branch (1010:19): [True: 0, False: 0]
  ------------------
 1011|      0|                if(*bpos == '+') *bpos = '-';
  ------------------
  |  Branch (1011:20): [True: 0, False: 0]
  ------------------
 1012|      0|                else if(*bpos == '/') *bpos = '_';
  ------------------
  |  Branch (1012:25): [True: 0, False: 0]
  ------------------
 1013|      0|            }
 1014|      0|        }
 1015|    514|        break;
 1016|  2.93k|    }
 1017|  2.93k|    return pos;
 1018|  2.93k|}
ua_types.c:String_copy:
  281|  81.4k|String_copy(UA_String const *src, UA_String *dst, const UA_DataType *_) {
  282|  81.4k|    UA_StatusCode res =
  283|  81.4k|        UA_Array_copy(src->data, src->length, (void**)&dst->data,
  284|  81.4k|                      &UA_TYPES[UA_TYPES_BYTE]);
  ------------------
  |  |   89|  81.4k|#define UA_TYPES_BYTE 2
  ------------------
  285|  81.4k|    if(res == UA_STATUSCODE_GOOD)
  ------------------
  |  |   16|  81.4k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (285:8): [True: 81.4k, False: 26]
  ------------------
  286|  81.4k|        dst->length = src->length;
  287|  81.4k|    return res;
  288|  81.4k|}
ua_types.c:nopClear:
 2124|   155k|static void nopClear(void *p, const UA_DataType *type) { }
ua_types.c:String_clear:
  291|  84.4k|String_clear(UA_String *s, const UA_DataType *_) {
  292|  84.4k|    UA_Array_delete(s->data, s->length, &UA_TYPES[UA_TYPES_BYTE]);
  ------------------
  |  |   89|  84.4k|#define UA_TYPES_BYTE 2
  ------------------
  293|  84.4k|}
ua_types.c:NodeId_clear:
  773|  77.9k|NodeId_clear(UA_NodeId *p, const UA_DataType *_) {
  774|  77.9k|    switch(p->identifierType) {
  775|  3.26k|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (775:5): [True: 3.26k, False: 74.7k]
  ------------------
  776|  3.91k|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (776:5): [True: 646, False: 77.3k]
  ------------------
  777|  3.91k|        String_clear(&p->identifier.string, NULL);
  778|  3.91k|        break;
  779|  74.0k|    default: break;
  ------------------
  |  Branch (779:5): [True: 74.0k, False: 3.91k]
  ------------------
  780|  77.9k|    }
  781|  77.9k|}
ua_types.c:QualifiedName_clear:
  393|  78.1k|QualifiedName_clear(UA_QualifiedName *p, const UA_DataType *_) {
  394|       |    String_clear(&p->name, NULL);
  395|  78.1k|}
ua_types.c:clearStructure:
 2068|  78.4k|clearStructure(void *p, const UA_DataType *type) {
 2069|  78.4k|    uintptr_t ptr = (uintptr_t)p;
 2070|   391k|    for(size_t i = 0; i < type->membersSize; ++i) {
  ------------------
  |  Branch (2070:23): [True: 312k, False: 78.4k]
  ------------------
 2071|   312k|        const UA_DataTypeMember *m = &type->members[i];
 2072|   312k|        const UA_DataType *mt = m->memberType;
 2073|   312k|        ptr += m->padding;
 2074|   312k|        if(!m->isOptional) {
  ------------------
  |  Branch (2074:12): [True: 312k, False: 0]
  ------------------
 2075|   312k|            if(!m->isArray) {
  ------------------
  |  Branch (2075:16): [True: 312k, False: 440]
  ------------------
 2076|   312k|                clearJumpTable[mt->typeKind]((void*)ptr, mt);
 2077|   312k|                ptr += mt->memSize;
 2078|   312k|            } else {
 2079|    440|                size_t length = *(size_t*)ptr;
 2080|    440|                ptr += sizeof(size_t);
 2081|    440|                UA_Array_delete(*(void**)ptr, length, mt);
 2082|    440|                ptr += sizeof(void*);
 2083|    440|            }
 2084|   312k|        } else { /* field is optional */
 2085|      0|            if(!m->isArray) {
  ------------------
  |  Branch (2085:16): [True: 0, False: 0]
  ------------------
 2086|       |                /* optional scalar field is contained */
 2087|      0|                if((*(void *const *)ptr != NULL))
  ------------------
  |  Branch (2087:20): [True: 0, False: 0]
  ------------------
 2088|      0|                    UA_Array_delete(*(void **)ptr, 1, mt);
 2089|      0|                ptr += sizeof(void *);
 2090|      0|            } else {
 2091|       |                /* optional array field is contained */
 2092|      0|                if((*(void *const *)(ptr + sizeof(size_t)) != NULL)) {
  ------------------
  |  Branch (2092:20): [True: 0, False: 0]
  ------------------
 2093|      0|                    size_t length = *(size_t *)ptr;
 2094|      0|                    ptr += sizeof(size_t);
 2095|      0|                    UA_Array_delete(*(void **)ptr, length, mt);
 2096|      0|                    ptr += sizeof(void *);
 2097|      0|                } else { /* optional array field not contained */
 2098|      0|                    ptr += sizeof(size_t);
 2099|      0|                    ptr += sizeof(void *);
 2100|      0|                }
 2101|      0|            }
 2102|      0|        }
 2103|   312k|    }
 2104|  78.4k|}
ua_types.c:nodeIdOrder:
 2246|   113k|nodeIdOrder(const UA_NodeId *p1, const UA_NodeId *p2, const UA_DataType *_) {
 2247|       |    /* Compare namespaceIndex */
 2248|   113k|    if(p1->namespaceIndex != p2->namespaceIndex)
  ------------------
  |  Branch (2248:8): [True: 56, False: 113k]
  ------------------
 2249|     56|        return (p1->namespaceIndex < p2->namespaceIndex) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2249:16): [True: 56, False: 0]
  ------------------
 2250|       |
 2251|       |    /* Compare identifierType */
 2252|   113k|    if(p1->identifierType != p2->identifierType)
  ------------------
  |  Branch (2252:8): [True: 2.83k, False: 110k]
  ------------------
 2253|  2.83k|        return (p1->identifierType < p2->identifierType) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2253:16): [True: 2.83k, False: 0]
  ------------------
 2254|       |
 2255|       |    /* Compare the identifier */
 2256|   110k|    switch(p1->identifierType) {
 2257|   109k|    case UA_NODEIDTYPE_NUMERIC:
  ------------------
  |  Branch (2257:5): [True: 109k, False: 1.41k]
  ------------------
 2258|   109k|    default:
  ------------------
  |  Branch (2258:5): [True: 0, False: 110k]
  ------------------
 2259|   109k|        if(p1->identifier.numeric != p2->identifier.numeric)
  ------------------
  |  Branch (2259:12): [True: 418, False: 109k]
  ------------------
 2260|    418|            return (p1->identifier.numeric < p2->identifier.numeric) ?
  ------------------
  |  Branch (2260:20): [True: 386, False: 32]
  ------------------
 2261|    386|                UA_ORDER_LESS : UA_ORDER_MORE;
 2262|   109k|        return UA_ORDER_EQ;
 2263|      0|    case UA_NODEIDTYPE_GUID:
  ------------------
  |  Branch (2263:5): [True: 0, False: 110k]
  ------------------
 2264|      0|        return guidOrder(&p1->identifier.guid, &p2->identifier.guid, NULL);
 2265|  1.16k|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (2265:5): [True: 1.16k, False: 109k]
  ------------------
 2266|  1.41k|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (2266:5): [True: 257, False: 110k]
  ------------------
 2267|       |        return stringOrder(&p1->identifier.string, &p2->identifier.string, NULL);
 2268|   110k|    }
 2269|   110k|}
ua_types.c:booleanOrder:
 2179|  75.5k|    NAME(const TYPE *p1, const TYPE *p2, const UA_DataType *type) { \
 2180|  75.5k|        if(*p1 != *p2)                                              \
  ------------------
  |  Branch (2180:12): [True: 0, False: 75.5k]
  ------------------
 2181|  75.5k|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;     \
  ------------------
  |  Branch (2181:20): [True: 0, False: 0]
  ------------------
 2182|  75.5k|        return UA_ORDER_EQ;                                         \
 2183|  75.5k|    }
ua_types.c:uInt32Order:
 2179|    151|    NAME(const TYPE *p1, const TYPE *p2, const UA_DataType *type) { \
 2180|    151|        if(*p1 != *p2)                                              \
  ------------------
  |  Branch (2180:12): [True: 0, False: 151]
  ------------------
 2181|    151|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;     \
  ------------------
  |  Branch (2181:20): [True: 0, False: 0]
  ------------------
 2182|    151|        return UA_ORDER_EQ;                                         \
 2183|    151|    }
ua_types.c:stringOrder:
 2231|  42.8k|stringOrder(const UA_String *p1, const UA_String *p2, const UA_DataType *type) {
 2232|  42.8k|    if(p1->length != p2->length)
  ------------------
  |  Branch (2232:8): [True: 2.59k, False: 40.2k]
  ------------------
 2233|  2.59k|        return (p1->length < p2->length) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2233:16): [True: 1.51k, False: 1.07k]
  ------------------
 2234|       |    /* For zero-length arrays, every pointer not NULL is considered a
 2235|       |     * UA_EMPTY_ARRAY_SENTINEL. */
 2236|  40.2k|    if(p1->data == p2->data) return UA_ORDER_EQ;
  ------------------
  |  Branch (2236:8): [True: 37.9k, False: 2.23k]
  ------------------
 2237|  2.23k|    if(p1->data == NULL) return UA_ORDER_LESS;
  ------------------
  |  Branch (2237:8): [True: 0, False: 2.23k]
  ------------------
 2238|  2.23k|    if(p2->data == NULL) return UA_ORDER_MORE;
  ------------------
  |  Branch (2238:8): [True: 0, False: 2.23k]
  ------------------
 2239|  2.23k|    int cmp = memcmp((const char*)p1->data, (const char*)p2->data, p1->length);
 2240|  2.23k|    if(cmp != 0)
  ------------------
  |  Branch (2240:8): [True: 7, False: 2.23k]
  ------------------
 2241|      7|        return (cmp < 0) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2241:16): [True: 2, False: 5]
  ------------------
 2242|  2.23k|    return UA_ORDER_EQ;
 2243|  2.23k|}
ua_types.c:qualifiedNameOrder:
 2284|  37.7k|                   const UA_DataType *_) {
 2285|  37.7k|    if(p1->namespaceIndex != p2->namespaceIndex)
  ------------------
  |  Branch (2285:8): [True: 0, False: 37.7k]
  ------------------
 2286|      0|        return (p1->namespaceIndex < p2->namespaceIndex) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2286:16): [True: 0, False: 0]
  ------------------
 2287|  37.7k|    return stringOrder(&p1->name, &p2->name, NULL);
 2288|  37.7k|}
ua_types.c:arrayOrder:
 2348|    151|           const UA_DataType *type) {
 2349|    151|    if(p1Length != p2Length)
  ------------------
  |  Branch (2349:8): [True: 0, False: 151]
  ------------------
 2350|      0|        return (p1Length < p2Length) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2350:16): [True: 0, False: 0]
  ------------------
 2351|    151|    uintptr_t u1 = (uintptr_t)p1;
 2352|    151|    uintptr_t u2 = (uintptr_t)p2;
 2353|  37.9k|    for(size_t i = 0; i < p1Length; i++) {
  ------------------
  |  Branch (2353:23): [True: 37.7k, False: 151]
  ------------------
 2354|  37.7k|        UA_Order o = orderJumpTable[type->typeKind]((const void*)u1, (const void*)u2, type);
 2355|  37.7k|        if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2355:12): [True: 0, False: 37.7k]
  ------------------
 2356|      0|            return o;
 2357|  37.7k|        u1 += type->memSize;
 2358|  37.7k|        u2 += type->memSize;
 2359|  37.7k|    }
 2360|    151|    return UA_ORDER_EQ;
 2361|    151|}
ua_types.c:structureOrder:
 2497|  38.0k|structureOrder(const void *p1, const void *p2, const UA_DataType *type) {
 2498|  38.0k|    uintptr_t u1 = (uintptr_t)p1;
 2499|  38.0k|    uintptr_t u2 = (uintptr_t)p2;
 2500|  38.0k|    UA_Order o = UA_ORDER_EQ;
 2501|   190k|    for(size_t i = 0; i < type->membersSize; ++i) {
  ------------------
  |  Branch (2501:23): [True: 151k, False: 38.0k]
  ------------------
 2502|   151k|        const UA_DataTypeMember *m = &type->members[i];
 2503|   151k|        const UA_DataType *mt = m->memberType;
 2504|   151k|        u1 += m->padding;
 2505|   151k|        u2 += m->padding;
 2506|   151k|        if(!m->isOptional) {
  ------------------
  |  Branch (2506:12): [True: 151k, False: 0]
  ------------------
 2507|   151k|            if(!m->isArray) {
  ------------------
  |  Branch (2507:16): [True: 151k, False: 151]
  ------------------
 2508|   151k|                o = orderJumpTable[mt->typeKind]((const void *)u1, (const void *)u2, mt);
 2509|   151k|                u1 += mt->memSize;
 2510|   151k|                u2 += mt->memSize;
 2511|   151k|            } else {
 2512|    151|                size_t size1 = *(size_t*)u1;
 2513|    151|                size_t size2 = *(size_t*)u2;
 2514|    151|                u1 += sizeof(size_t);
 2515|    151|                u2 += sizeof(size_t);
 2516|    151|                o = arrayOrder(*(void* const*)u1, size1, *(void* const*)u2, size2, mt);
 2517|    151|                u1 += sizeof(void*);
 2518|    151|                u2 += sizeof(void*);
 2519|    151|            }
 2520|   151k|        } else {
 2521|      0|            if(!m->isArray) {
  ------------------
  |  Branch (2521:16): [True: 0, False: 0]
  ------------------
 2522|      0|                const void *pp1 = *(void* const*)u1;
 2523|      0|                const void *pp2 = *(void* const*)u2;
 2524|      0|                if(pp1 == pp2) {
  ------------------
  |  Branch (2524:20): [True: 0, False: 0]
  ------------------
 2525|      0|                    o = UA_ORDER_EQ;
 2526|      0|                } else if(pp1 == NULL) {
  ------------------
  |  Branch (2526:27): [True: 0, False: 0]
  ------------------
 2527|      0|                    o = UA_ORDER_LESS;
 2528|      0|                } else if(pp2 == NULL) {
  ------------------
  |  Branch (2528:27): [True: 0, False: 0]
  ------------------
 2529|      0|                    o = UA_ORDER_MORE;
 2530|      0|                } else {
 2531|      0|                    o = orderJumpTable[mt->typeKind](pp1, pp2, mt);
 2532|      0|                }
 2533|      0|            } else {
 2534|      0|                size_t sa1 = *(size_t*)u1;
 2535|      0|                size_t sa2 = *(size_t*)u2;
 2536|      0|                u1 += sizeof(size_t);
 2537|      0|                u2 += sizeof(size_t);
 2538|      0|                o = arrayOrder(*(void* const*)u1, sa1, *(void* const*)u2, sa2, mt);
 2539|      0|            }
 2540|      0|            u1 += sizeof(void*);
 2541|      0|            u2 += sizeof(void*);
 2542|      0|        }
 2543|       |
 2544|   151k|        if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2544:12): [True: 0, False: 151k]
  ------------------
 2545|      0|            break;
 2546|   151k|    }
 2547|  38.0k|    return o;
 2548|  38.0k|}

UA_AttributeOperand_parse:
 1211|    440|UA_AttributeOperand_parse(UA_AttributeOperand *ao, const UA_String str) {
 1212|       |    /* Objects folder is the default */
 1213|    440|    return parseAttributeOperand(ao, str, UA_NS0ID(OBJECTSFOLDER), 0);
  ------------------
  |  |  457|    440|#define UA_NS0ID(ID) UA_NODEID_NUMERIC(0, UA_NS0ID_##ID)
  |  |  ------------------
  |  |  |  |   81|    440|#define UA_NS0ID_OBJECTSFOLDER 85 /* Object */
  |  |  ------------------
  ------------------
 1214|    440|}
ua_types_lex.c:parse_guid:
   48|      9|parse_guid(UA_Guid *guid, const UA_Byte *s, const UA_Byte *e) {
   49|      9|    size_t len = (size_t)(e - s);
   50|      9|    if(len != 36 || s[8] != '-' || s[13] != '-' || s[23] != '-')
  ------------------
  |  Branch (50:8): [True: 9, False: 0]
  |  Branch (50:21): [True: 0, False: 0]
  |  Branch (50:36): [True: 0, False: 0]
  |  Branch (50:52): [True: 0, False: 0]
  ------------------
   51|      9|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   43|      9|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   52|       |
   53|      0|    UA_UInt32 tmp;
   54|      0|    if(UA_readNumberWithBase(s, 8, &tmp, 16) != 8)
  ------------------
  |  Branch (54:8): [True: 0, False: 0]
  ------------------
   55|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   43|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   56|      0|    guid->data1 = tmp;
   57|       |
   58|      0|    if(UA_readNumberWithBase(&s[9], 4, &tmp, 16) != 4)
  ------------------
  |  Branch (58:8): [True: 0, False: 0]
  ------------------
   59|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   43|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   60|      0|    guid->data2 = (UA_UInt16)tmp;
   61|       |
   62|      0|    if(UA_readNumberWithBase(&s[14], 4, &tmp, 16) != 4)
  ------------------
  |  Branch (62:8): [True: 0, False: 0]
  ------------------
   63|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   43|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   64|      0|    guid->data3 = (UA_UInt16)tmp;
   65|       |
   66|      0|    if(UA_readNumberWithBase(&s[19], 2, &tmp, 16) != 2)
  ------------------
  |  Branch (66:8): [True: 0, False: 0]
  ------------------
   67|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   43|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   68|      0|    guid->data4[0] = (UA_Byte)tmp;
   69|       |
   70|      0|    if(UA_readNumberWithBase(&s[21], 2, &tmp, 16) != 2)
  ------------------
  |  Branch (70:8): [True: 0, False: 0]
  ------------------
   71|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   43|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   72|      0|    guid->data4[1] = (UA_Byte)tmp;
   73|       |
   74|      0|    for(size_t pos = 2, spos = 24; pos < 8; pos++, spos += 2) {
  ------------------
  |  Branch (74:36): [True: 0, False: 0]
  ------------------
   75|      0|        if(UA_readNumberWithBase(&s[spos], 2, &tmp, 16) != 2)
  ------------------
  |  Branch (75:12): [True: 0, False: 0]
  ------------------
   76|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   43|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   77|      0|        guid->data4[pos] = (UA_Byte)tmp;
   78|      0|    }
   79|       |
   80|      0|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
   81|      0|}
ua_types_lex.c:parse_nodeid:
  144|  4.73k|             UA_Escaping idEsc, const UA_NamespaceMapping *nsMapping) {
  145|  4.73k|    *id = UA_NODEID_NULL; /* Reset the NodeId */
  146|  4.73k|    LexContext context;
  147|  4.73k|    memset(&context, 0, sizeof(LexContext));
  148|  4.73k|    UA_Byte *begin = (UA_Byte*)(uintptr_t)pos;
  149|  4.73k|    const u8 *ns = NULL, *nsu = NULL, *body = NULL;
  150|       |
  151|       |    
  152|  4.73k|{
  153|  4.73k|	u8 yych;
  154|  4.73k|	yych = YYPEEK();
  ------------------
  |  |   31|  4.73k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|  4.73k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|  4.73k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (31:18): [True: 4.73k, False: 0]
  |  |  ------------------
  ------------------
  155|  4.73k|	switch (yych) {
  156|    668|		case 'b':
  ------------------
  |  Branch (156:3): [True: 668, False: 4.07k]
  ------------------
  157|    677|		case 'g':
  ------------------
  |  Branch (157:3): [True: 9, False: 4.72k]
  ------------------
  158|    817|		case 'i':
  ------------------
  |  Branch (158:3): [True: 140, False: 4.59k]
  ------------------
  159|  3.13k|		case 's':
  ------------------
  |  Branch (159:3): [True: 2.31k, False: 2.42k]
  ------------------
  160|  3.13k|			YYSTAGN(context.yyt1);
  ------------------
  |  |   37|  3.13k|#define YYSTAGN(t) t = NULL
  ------------------
  161|  3.13k|			YYSTAGN(context.yyt2);
  ------------------
  |  |   37|  3.13k|#define YYSTAGN(t) t = NULL
  ------------------
  162|  3.13k|			goto yy3;
  163|  1.02k|		case 'n': goto yy4;
  ------------------
  |  Branch (163:3): [True: 1.02k, False: 3.70k]
  ------------------
  164|    579|		default: goto yy1;
  ------------------
  |  Branch (164:3): [True: 579, False: 4.15k]
  ------------------
  165|  4.73k|	}
  166|    579|yy1:
  167|    579|	YYSKIP();
  ------------------
  |  |   33|    579|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|    579|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  168|    584|yy2:
  169|    584|	{ (void)pos; return UA_STATUSCODE_BADDECODINGERROR; }
  ------------------
  |  |   43|    584|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  170|  3.13k|yy3:
  171|  3.13k|	YYSKIP();
  ------------------
  |  |   33|  3.13k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|  3.13k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  172|  3.13k|	yych = YYPEEK();
  ------------------
  |  |   31|  3.13k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|  3.13k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|  3.13k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (31:18): [True: 3.13k, False: 0]
  |  |  ------------------
  ------------------
  173|  3.13k|	switch (yych) {
  174|  3.12k|		case '=': goto yy5;
  ------------------
  |  Branch (174:3): [True: 3.12k, False: 1]
  ------------------
  175|      1|		default: goto yy2;
  ------------------
  |  Branch (175:3): [True: 1, False: 3.12k]
  ------------------
  176|  3.13k|	}
  177|  1.02k|yy4:
  178|  1.02k|	YYSKIP();
  ------------------
  |  |   33|  1.02k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|  1.02k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  179|  1.02k|	YYBACKUP();
  ------------------
  |  |   34|  1.02k|#define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   30|  1.02k|#define YYMARKER context.marker
  |  |  ------------------
  |  |               #define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   29|  1.02k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  180|  1.02k|	yych = YYPEEK();
  ------------------
  |  |   31|  1.02k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|  1.02k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|  1.02k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (31:18): [True: 1.02k, False: 0]
  |  |  ------------------
  ------------------
  181|  1.02k|	switch (yych) {
  182|  1.02k|		case 's': goto yy6;
  ------------------
  |  Branch (182:3): [True: 1.02k, False: 0]
  ------------------
  183|      0|		default: goto yy2;
  ------------------
  |  Branch (183:3): [True: 0, False: 1.02k]
  ------------------
  184|  1.02k|	}
  185|  4.15k|yy5:
  186|  4.15k|	YYSKIP();
  ------------------
  |  |   33|  4.15k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|  4.15k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  187|  4.15k|	nsu = context.yyt2;
  188|  4.15k|	ns = context.yyt1;
  189|  4.15k|	YYSTAGP(body);
  ------------------
  |  |   36|  4.15k|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   29|  4.15k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  190|  4.15k|	YYSHIFTSTAG(body, -2);
  ------------------
  |  |   38|  4.15k|#define YYSHIFTSTAG(t, shift) t += shift
  ------------------
  191|  4.15k|	{ goto match; }
  192|  1.02k|yy6:
  193|  1.02k|	YYSKIP();
  ------------------
  |  |   33|  1.02k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|  1.02k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  194|  1.02k|	yych = YYPEEK();
  ------------------
  |  |   31|  1.02k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|  1.02k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|  1.02k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (31:18): [True: 1.02k, False: 0]
  |  |  ------------------
  ------------------
  195|  1.02k|	switch (yych) {
  196|    313|		case '=': goto yy8;
  ------------------
  |  Branch (196:3): [True: 313, False: 716]
  ------------------
  197|    716|		case 'u': goto yy9;
  ------------------
  |  Branch (197:3): [True: 716, False: 313]
  ------------------
  198|      0|		default: goto yy7;
  ------------------
  |  Branch (198:3): [True: 0, False: 1.02k]
  ------------------
  199|  1.02k|	}
  200|      4|yy7:
  201|      4|	YYRESTORE();
  ------------------
  |  |   35|      4|#define YYRESTORE() YYCURSOR = YYMARKER
  |  |  ------------------
  |  |  |  |   29|      4|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYRESTORE() YYCURSOR = YYMARKER
  |  |  ------------------
  |  |  |  |   30|      4|#define YYMARKER context.marker
  |  |  ------------------
  ------------------
  202|      4|	goto yy2;
  203|    313|yy8:
  204|    313|	YYSKIP();
  ------------------
  |  |   33|    313|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|    313|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  205|    313|	yych = YYPEEK();
  ------------------
  |  |   31|    313|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|    313|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|    313|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (31:18): [True: 313, False: 0]
  |  |  ------------------
  ------------------
  206|    313|	switch (yych) {
  207|    125|		case '0':
  ------------------
  |  Branch (207:3): [True: 125, False: 188]
  ------------------
  208|    140|		case '1':
  ------------------
  |  Branch (208:3): [True: 15, False: 298]
  ------------------
  209|    266|		case '2':
  ------------------
  |  Branch (209:3): [True: 126, False: 187]
  ------------------
  210|    306|		case '3':
  ------------------
  |  Branch (210:3): [True: 40, False: 273]
  ------------------
  211|    306|		case '4':
  ------------------
  |  Branch (211:3): [True: 0, False: 313]
  ------------------
  212|    307|		case '5':
  ------------------
  |  Branch (212:3): [True: 1, False: 312]
  ------------------
  213|    313|		case '6':
  ------------------
  |  Branch (213:3): [True: 6, False: 307]
  ------------------
  214|    313|		case '7':
  ------------------
  |  Branch (214:3): [True: 0, False: 313]
  ------------------
  215|    313|		case '8':
  ------------------
  |  Branch (215:3): [True: 0, False: 313]
  ------------------
  216|    313|		case '9':
  ------------------
  |  Branch (216:3): [True: 0, False: 313]
  ------------------
  217|    313|			YYSTAGP(context.yyt1);
  ------------------
  |  |   36|    313|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   29|    313|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  218|    313|			goto yy10;
  219|      0|		default: goto yy7;
  ------------------
  |  Branch (219:3): [True: 0, False: 313]
  ------------------
  220|    313|	}
  221|    716|yy9:
  222|    716|	YYSKIP();
  ------------------
  |  |   33|    716|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|    716|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  223|    716|	yych = YYPEEK();
  ------------------
  |  |   31|    716|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|    716|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|    716|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (31:18): [True: 716, False: 0]
  |  |  ------------------
  ------------------
  224|    716|	switch (yych) {
  225|    716|		case '=': goto yy11;
  ------------------
  |  Branch (225:3): [True: 716, False: 0]
  ------------------
  226|      0|		default: goto yy7;
  ------------------
  |  Branch (226:3): [True: 0, False: 716]
  ------------------
  227|    716|	}
  228|    374|yy10:
  229|    374|	YYSKIP();
  ------------------
  |  |   33|    374|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|    374|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  230|    374|	yych = YYPEEK();
  ------------------
  |  |   31|    374|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|    374|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|    374|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (31:18): [True: 374, False: 0]
  |  |  ------------------
  ------------------
  231|    374|	switch (yych) {
  232|      6|		case '0':
  ------------------
  |  Branch (232:3): [True: 6, False: 368]
  ------------------
  233|     13|		case '1':
  ------------------
  |  Branch (233:3): [True: 7, False: 367]
  ------------------
  234|     16|		case '2':
  ------------------
  |  Branch (234:3): [True: 3, False: 371]
  ------------------
  235|     18|		case '3':
  ------------------
  |  Branch (235:3): [True: 2, False: 372]
  ------------------
  236|     18|		case '4':
  ------------------
  |  Branch (236:3): [True: 0, False: 374]
  ------------------
  237|     23|		case '5':
  ------------------
  |  Branch (237:3): [True: 5, False: 369]
  ------------------
  238|     31|		case '6':
  ------------------
  |  Branch (238:3): [True: 8, False: 366]
  ------------------
  239|     45|		case '7':
  ------------------
  |  Branch (239:3): [True: 14, False: 360]
  ------------------
  240|     61|		case '8':
  ------------------
  |  Branch (240:3): [True: 16, False: 358]
  ------------------
  241|     61|		case '9': goto yy10;
  ------------------
  |  Branch (241:3): [True: 0, False: 374]
  ------------------
  242|    313|		case ';':
  ------------------
  |  Branch (242:3): [True: 313, False: 61]
  ------------------
  243|    313|			YYSTAGN(context.yyt2);
  ------------------
  |  |   37|    313|#define YYSTAGN(t) t = NULL
  ------------------
  244|    313|			goto yy12;
  245|      0|		default: goto yy7;
  ------------------
  |  Branch (245:3): [True: 0, False: 374]
  ------------------
  246|    374|	}
  247|    716|yy11:
  248|    716|	YYSKIP();
  ------------------
  |  |   33|    716|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|    716|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  249|    716|	yych = YYPEEK();
  ------------------
  |  |   31|    716|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|    716|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|    716|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (31:18): [True: 716, False: 0]
  |  |  ------------------
  ------------------
  250|    716|	switch (yych) {
  251|      0|		case 0x00: goto yy7;
  ------------------
  |  Branch (251:3): [True: 0, False: 716]
  ------------------
  252|    242|		case ';':
  ------------------
  |  Branch (252:3): [True: 242, False: 474]
  ------------------
  253|    242|			YYSTAGN(context.yyt1);
  ------------------
  |  |   37|    242|#define YYSTAGN(t) t = NULL
  ------------------
  254|    242|			YYSTAGP(context.yyt2);
  ------------------
  |  |   36|    242|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   29|    242|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  255|    242|			goto yy12;
  256|    474|		default:
  ------------------
  |  Branch (256:3): [True: 474, False: 242]
  ------------------
  257|    474|			YYSTAGP(context.yyt2);
  ------------------
  |  |   36|    474|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   29|    474|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  258|    474|			goto yy13;
  259|    716|	}
  260|  1.02k|yy12:
  261|  1.02k|	YYSKIP();
  ------------------
  |  |   33|  1.02k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|  1.02k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  262|  1.02k|	yych = YYPEEK();
  ------------------
  |  |   31|  1.02k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|  1.02k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|  1.02k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (31:18): [True: 1.02k, False: 0]
  |  |  ------------------
  ------------------
  263|  1.02k|	switch (yych) {
  264|    266|		case 'b':
  ------------------
  |  Branch (264:3): [True: 266, False: 763]
  ------------------
  265|    398|		case 'g':
  ------------------
  |  Branch (265:3): [True: 132, False: 897]
  ------------------
  266|    641|		case 'i':
  ------------------
  |  Branch (266:3): [True: 243, False: 786]
  ------------------
  267|  1.02k|		case 's': goto yy14;
  ------------------
  |  Branch (267:3): [True: 385, False: 644]
  ------------------
  268|      3|		default: goto yy7;
  ------------------
  |  Branch (268:3): [True: 3, False: 1.02k]
  ------------------
  269|  1.02k|	}
  270|  7.20k|yy13:
  271|  7.20k|	YYSKIP();
  ------------------
  |  |   33|  7.20k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|  7.20k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  272|  7.20k|	yych = YYPEEK();
  ------------------
  |  |   31|  7.20k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|  7.20k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|  7.20k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (31:18): [True: 7.20k, False: 0]
  |  |  ------------------
  ------------------
  273|  7.20k|	switch (yych) {
  274|      0|		case 0x00: goto yy7;
  ------------------
  |  Branch (274:3): [True: 0, False: 7.20k]
  ------------------
  275|    474|		case ';':
  ------------------
  |  Branch (275:3): [True: 474, False: 6.72k]
  ------------------
  276|    474|			YYSTAGN(context.yyt1);
  ------------------
  |  |   37|    474|#define YYSTAGN(t) t = NULL
  ------------------
  277|    474|			goto yy12;
  278|  6.72k|		default: goto yy13;
  ------------------
  |  Branch (278:3): [True: 6.72k, False: 474]
  ------------------
  279|  7.20k|	}
  280|  1.02k|yy14:
  281|  1.02k|	YYSKIP();
  ------------------
  |  |   33|  1.02k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|  1.02k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  282|  1.02k|	yych = YYPEEK();
  ------------------
  |  |   31|  1.02k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|  1.02k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|  1.02k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (31:18): [True: 1.02k, False: 1]
  |  |  ------------------
  ------------------
  283|  1.02k|	switch (yych) {
  284|  1.02k|		case '=': goto yy5;
  ------------------
  |  Branch (284:3): [True: 1.02k, False: 1]
  ------------------
  285|      1|		default: goto yy7;
  ------------------
  |  Branch (285:3): [True: 1, False: 1.02k]
  ------------------
  286|  1.02k|	}
  287|  1.02k|}
  288|       |
  289|       |
  290|  4.15k| match:
  291|  4.15k|    if(nsu) {
  ------------------
  |  Branch (291:8): [True: 714, False: 3.44k]
  ------------------
  292|       |        /* NamespaceUri */
  293|    714|        UA_String nsUri = {(size_t)(body - 1 - nsu), (UA_Byte*)(uintptr_t)nsu};
  294|    714|        UA_StatusCode res = escapedUri2Index(nsUri, &id->namespaceIndex, nsMapping);
  295|    714|        if(res != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   16|    714|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (295:12): [True: 714, False: 0]
  ------------------
  296|       |            /* Return the entire NodeId string s=... */
  297|    714|            UA_String total = {(size_t)((const UA_Byte*)end - begin), begin};
  298|    714|            id->identifierType = UA_NODEIDTYPE_STRING;
  299|    714|            return UA_String_copy(&total, &id->identifier.string);
  300|    714|        }
  301|  3.44k|    } else if(ns) {
  ------------------
  |  Branch (301:15): [True: 311, False: 3.12k]
  ------------------
  302|       |        /* NamespaceIndex */
  303|    311|        UA_UInt32 tmp;
  304|    311|        size_t len = (size_t)(body - 1 - ns);
  305|    311|        if(UA_readNumber((const UA_Byte*)ns, len, &tmp) != len)
  ------------------
  |  Branch (305:12): [True: 0, False: 311]
  ------------------
  306|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   43|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  307|    311|        id->namespaceIndex = (UA_UInt16)tmp;
  308|    311|        if(nsMapping)
  ------------------
  |  Branch (308:12): [True: 0, False: 311]
  ------------------
  309|      0|            id->namespaceIndex =
  310|      0|                UA_NamespaceMapping_remote2Local(nsMapping, id->namespaceIndex);
  311|    311|    }
  312|       |
  313|       |    /* From the current position until the end */
  314|  3.44k|    return parse_nodeid_body(id, body, end, idEsc);
  315|  4.15k|}
ua_types_lex.c:escapedUri2Index:
   93|    722|                 const UA_NamespaceMapping *nsMapping) {
   94|    722|    if(!nsMapping)
  ------------------
  |  Branch (94:8): [True: 722, False: 0]
  ------------------
   95|    722|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   43|    722|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   96|      0|    UA_String tmp = uri; 
   97|      0|    status res = UA_String_unescape(&uri, true, UA_ESCAPING_PERCENT);
   98|      0|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   16|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (98:8): [True: 0, False: 0]
  ------------------
   99|      0|        return res;
  100|      0|    res = UA_NamespaceMapping_uri2Index(nsMapping, uri, nsIndex);
  101|      0|    if(tmp.data != uri.data)
  ------------------
  |  Branch (101:8): [True: 0, False: 0]
  ------------------
  102|      0|        UA_String_clear(&uri);
  103|      0|    return res;
  104|      0|}
ua_types_lex.c:parse_nodeid_body:
  107|  3.44k|parse_nodeid_body(UA_NodeId *id, const u8 *body, const u8 *end, UA_Escaping esc) {
  108|  3.44k|    UA_StatusCode res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|  3.44k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  109|  3.44k|    UA_String str = {(size_t)(end - (body+2)), (UA_Byte*)(uintptr_t)body + 2};
  110|  3.44k|    switch(*body) {
  111|    196|    case 'i':
  ------------------
  |  Branch (111:5): [True: 196, False: 3.24k]
  ------------------
  112|    196|        id->identifierType = UA_NODEIDTYPE_NUMERIC;
  113|    196|        if(UA_readNumber(str.data, str.length, &id->identifier.numeric) != str.length)
  ------------------
  |  Branch (113:12): [True: 35, False: 161]
  ------------------
  114|     35|            res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   43|     35|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  115|    196|        break;
  116|  2.56k|    case 's':
  ------------------
  |  Branch (116:5): [True: 2.56k, False: 873]
  ------------------
  117|  2.56k|        id->identifierType = UA_NODEIDTYPE_STRING;
  118|  2.56k|        res |= UA_String_copy(&str, &id->identifier.string);
  119|  2.56k|        res |= UA_String_unescape(&id->identifier.string, false, esc);
  120|  2.56k|        break;
  121|      9|    case 'g':
  ------------------
  |  Branch (121:5): [True: 9, False: 3.43k]
  ------------------
  122|      9|        id->identifierType = UA_NODEIDTYPE_GUID;
  123|      9|        res = parse_guid(&id->identifier.guid, str.data, end);
  124|      9|        break;
  125|    668|    case 'b':
  ------------------
  |  Branch (125:5): [True: 668, False: 2.77k]
  ------------------
  126|       |        /* For percent-escaping, base64url bytestring encoding is used. That
  127|       |         * doesn't need to be escaped here. The and-escaping is not applied to
  128|       |         * the NodeId identifier part. */
  129|    668|        id->identifierType = UA_NODEIDTYPE_BYTESTRING;
  130|    668|        id->identifier.byteString.data =
  131|    668|            UA_unbase64(str.data, str.length, &id->identifier.byteString.length);
  132|    668|        if(!id->identifier.byteString.data && str.length > 0)
  ------------------
  |  Branch (132:12): [True: 25, False: 643]
  |  Branch (132:47): [True: 25, False: 0]
  ------------------
  133|     25|            res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   43|     25|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  134|    668|        break;
  135|      0|    default:
  ------------------
  |  Branch (135:5): [True: 0, False: 3.44k]
  ------------------
  136|      0|        res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   43|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  137|      0|        break;
  138|  3.44k|    }
  139|  3.44k|    return res;
  140|  3.44k|}
ua_types_lex.c:parse_qn:
  699|  78.1k|         UA_UInt16 defaultNamespaceIndex) {
  700|  78.1k|    size_t len;
  701|  78.1k|    UA_UInt32 tmp;
  702|  78.1k|    UA_String str;
  703|  78.1k|    UA_StatusCode res;
  704|       |
  705|  78.1k|    LexContext context;
  706|  78.1k|    memset(&context, 0, sizeof(LexContext));
  707|       |
  708|  78.1k|    const u8 *begin = pos;
  709|  78.1k|    UA_QualifiedName_init(qn);
  710|  78.1k|    qn->namespaceIndex = defaultNamespaceIndex;
  711|       |
  712|       |    
  713|  78.1k|{
  714|  78.1k|	u8 yych;
  715|  78.1k|	yych = YYPEEK();
  ------------------
  |  |   31|  78.1k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|  78.1k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|  1.90k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (31:18): [True: 1.90k, False: 76.2k]
  |  |  ------------------
  ------------------
  716|  78.1k|	switch (yych) {
  717|  76.2k|		case 0x00:
  ------------------
  |  Branch (717:3): [True: 76.2k, False: 1.90k]
  ------------------
  718|  76.2k|		case ';': goto yy41;
  ------------------
  |  Branch (718:3): [True: 0, False: 78.1k]
  ------------------
  719|    154|		case '0':
  ------------------
  |  Branch (719:3): [True: 154, False: 78.0k]
  ------------------
  720|    302|		case '1':
  ------------------
  |  Branch (720:3): [True: 148, False: 78.0k]
  ------------------
  721|    355|		case '2':
  ------------------
  |  Branch (721:3): [True: 53, False: 78.1k]
  ------------------
  722|    373|		case '3':
  ------------------
  |  Branch (722:3): [True: 18, False: 78.1k]
  ------------------
  723|    398|		case '4':
  ------------------
  |  Branch (723:3): [True: 25, False: 78.1k]
  ------------------
  724|    398|		case '5':
  ------------------
  |  Branch (724:3): [True: 0, False: 78.1k]
  ------------------
  725|    537|		case '6':
  ------------------
  |  Branch (725:3): [True: 139, False: 78.0k]
  ------------------
  726|    540|		case '7':
  ------------------
  |  Branch (726:3): [True: 3, False: 78.1k]
  ------------------
  727|    672|		case '8':
  ------------------
  |  Branch (727:3): [True: 132, False: 78.0k]
  ------------------
  728|    674|		case '9': goto yy44;
  ------------------
  |  Branch (728:3): [True: 2, False: 78.1k]
  ------------------
  729|  1.22k|		default: goto yy43;
  ------------------
  |  Branch (729:3): [True: 1.22k, False: 76.9k]
  ------------------
  730|  78.1k|	}
  731|  76.2k|yy41:
  732|  76.2k|	YYSKIP();
  ------------------
  |  |   33|  76.2k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|  76.2k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  733|  78.1k|yy42:
  734|  78.1k|	{ pos = begin; goto match_name; }
  735|  1.22k|yy43:
  736|  1.22k|	YYSKIP();
  ------------------
  |  |   33|  1.22k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|  1.22k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  737|  1.22k|	YYBACKUP();
  ------------------
  |  |   34|  1.22k|#define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   30|  1.22k|#define YYMARKER context.marker
  |  |  ------------------
  |  |               #define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   29|  1.22k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  738|  1.22k|	yych = YYPEEK();
  ------------------
  |  |   31|  1.22k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|  1.22k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|  1.09k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (31:18): [True: 1.09k, False: 138]
  |  |  ------------------
  ------------------
  739|  1.22k|	if (yych <= 0x00) goto yy42;
  ------------------
  |  Branch (739:6): [True: 141, False: 1.08k]
  ------------------
  740|  1.08k|	goto yy46;
  741|  1.08k|yy44:
  742|    674|	YYSKIP();
  ------------------
  |  |   33|    674|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|    674|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  743|    674|	YYBACKUP();
  ------------------
  |  |   34|    674|#define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   30|    674|#define YYMARKER context.marker
  |  |  ------------------
  |  |               #define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   29|    674|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  744|    674|	yych = YYPEEK();
  ------------------
  |  |   31|    674|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|    674|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|    490|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (31:18): [True: 490, False: 184]
  |  |  ------------------
  ------------------
  745|    674|	switch (yych) {
  746|      4|		case '0':
  ------------------
  |  Branch (746:3): [True: 4, False: 670]
  ------------------
  747|     15|		case '1':
  ------------------
  |  Branch (747:3): [True: 11, False: 663]
  ------------------
  748|     44|		case '2':
  ------------------
  |  Branch (748:3): [True: 29, False: 645]
  ------------------
  749|     46|		case '3':
  ------------------
  |  Branch (749:3): [True: 2, False: 672]
  ------------------
  750|     57|		case '4':
  ------------------
  |  Branch (750:3): [True: 11, False: 663]
  ------------------
  751|     61|		case '5':
  ------------------
  |  Branch (751:3): [True: 4, False: 670]
  ------------------
  752|     63|		case '6':
  ------------------
  |  Branch (752:3): [True: 2, False: 672]
  ------------------
  753|    141|		case '7':
  ------------------
  |  Branch (753:3): [True: 78, False: 596]
  ------------------
  754|    300|		case '8':
  ------------------
  |  Branch (754:3): [True: 159, False: 515]
  ------------------
  755|    302|		case '9':
  ------------------
  |  Branch (755:3): [True: 2, False: 672]
  ------------------
  756|    304|		case ':': goto yy50;
  ------------------
  |  Branch (756:3): [True: 2, False: 672]
  ------------------
  757|    370|		default: goto yy42;
  ------------------
  |  Branch (757:3): [True: 370, False: 304]
  ------------------
  758|    674|	}
  759|   290k|yy45:
  760|   290k|	YYSKIP();
  ------------------
  |  |   33|   290k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|   290k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  761|   290k|	yych = YYPEEK();
  ------------------
  |  |   31|   290k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|   290k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|   289k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (31:18): [True: 289k, False: 1.01k]
  |  |  ------------------
  ------------------
  762|   291k|yy46:
  763|   291k|	switch (yych) {
  764|  1.08k|		case 0x00: goto yy47;
  ------------------
  |  Branch (764:3): [True: 1.08k, False: 290k]
  ------------------
  765|      8|		case ';': goto yy48;
  ------------------
  |  Branch (765:3): [True: 8, False: 291k]
  ------------------
  766|   290k|		default: goto yy45;
  ------------------
  |  Branch (766:3): [True: 290k, False: 1.08k]
  ------------------
  767|   291k|	}
  768|  1.36k|yy47:
  769|  1.36k|	YYRESTORE();
  ------------------
  |  |   35|  1.36k|#define YYRESTORE() YYCURSOR = YYMARKER
  |  |  ------------------
  |  |  |  |   29|  1.36k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYRESTORE() YYCURSOR = YYMARKER
  |  |  ------------------
  |  |  |  |   30|  1.36k|#define YYMARKER context.marker
  |  |  ------------------
  ------------------
  770|  1.36k|	goto yy42;
  771|      8|yy48:
  772|      8|	YYSKIP();
  ------------------
  |  |   33|      8|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|      8|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  773|      8|	{ goto match_uri; }
  774|   332k|yy49:
  775|   332k|	YYSKIP();
  ------------------
  |  |   33|   332k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|   332k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  776|   332k|	yych = YYPEEK();
  ------------------
  |  |   31|   332k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|   332k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|   332k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (31:18): [True: 332k, False: 119]
  |  |  ------------------
  ------------------
  777|   332k|yy50:
  778|   332k|	switch (yych) {
  779|   306k|		case '0':
  ------------------
  |  Branch (779:3): [True: 306k, False: 25.7k]
  ------------------
  780|   307k|		case '1':
  ------------------
  |  Branch (780:3): [True: 520, False: 332k]
  ------------------
  781|   312k|		case '2':
  ------------------
  |  Branch (781:3): [True: 5.23k, False: 327k]
  ------------------
  782|   318k|		case '3':
  ------------------
  |  Branch (782:3): [True: 5.40k, False: 327k]
  ------------------
  783|   323k|		case '4':
  ------------------
  |  Branch (783:3): [True: 5.57k, False: 327k]
  ------------------
  784|   323k|		case '5':
  ------------------
  |  Branch (784:3): [True: 274, False: 332k]
  ------------------
  785|   324k|		case '6':
  ------------------
  |  Branch (785:3): [True: 411, False: 332k]
  ------------------
  786|   324k|		case '7':
  ------------------
  |  Branch (786:3): [True: 561, False: 332k]
  ------------------
  787|   331k|		case '8':
  ------------------
  |  Branch (787:3): [True: 6.20k, False: 326k]
  ------------------
  788|   332k|		case '9': goto yy49;
  ------------------
  |  Branch (788:3): [True: 1.28k, False: 331k]
  ------------------
  789|     17|		case ':': goto yy51;
  ------------------
  |  Branch (789:3): [True: 17, False: 332k]
  ------------------
  790|    287|		default: goto yy47;
  ------------------
  |  Branch (790:3): [True: 287, False: 332k]
  ------------------
  791|   332k|	}
  792|     17|yy51:
  793|     17|	YYSKIP();
  ------------------
  |  |   33|     17|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|     17|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  794|     17|	{ goto match_index; }
  795|   332k|}
  796|       |
  797|       |
  798|     17| match_index:
  799|     17|    len = (size_t)(pos - 1 - begin);
  800|     17|    if(UA_readNumber((const UA_Byte*)begin, len, &tmp) != len)
  ------------------
  |  Branch (800:8): [True: 0, False: 17]
  ------------------
  801|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   43|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  802|     17|    qn->namespaceIndex = (UA_UInt16)tmp;
  803|     17|    goto match_name;
  804|       |
  805|      8| match_uri:
  806|      8|    str.length = (size_t)(pos - 1 - begin);
  807|      8|    str.data = (UA_Byte*)(uintptr_t)begin;
  808|      8|    res = escapedUri2Index(str, &qn->namespaceIndex, nsMapping);
  809|      8|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   16|      8|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (809:8): [True: 8, False: 0]
  ------------------
  810|      8|        pos = begin; /* Use the entire string for the name */
  811|       |
  812|  78.1k| match_name:
  813|  78.1k|    str.length = (size_t)(end - pos);
  814|  78.1k|    str.data = (UA_Byte*)(uintptr_t)pos;
  815|  78.1k|    res = UA_String_copy(&str, &qn->name);
  816|  78.1k|    if(UA_LIKELY(res == UA_STATUSCODE_GOOD))
  ------------------
  |  |  576|  78.1k|# define UA_LIKELY(x) __builtin_expect((x), 1)
  |  |  ------------------
  |  |  |  Branch (576:23): [True: 78.1k, False: 21]
  |  |  ------------------
  ------------------
  817|  78.1k|        res = UA_String_unescape(&qn->name, false, escName);
  818|  78.1k|    return res;
  819|      8|}
ua_types_lex.c:parse_relativepath:
  970|    424|                   UA_UInt16 defaultNamespaceIndex) {
  971|    424|    UA_RelativePath_init(rp);
  972|    424|    UA_Boolean done = false;
  973|    424|    UA_StatusCode res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|    424|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  974|  77.9k|    do {
  975|  77.9k|        res = parse_relativepathElement(rp, ppos, end, server, esc,
  976|  77.9k|                                        defaultNamespaceIndex, &done);
  977|  77.9k|    } while(!done);
  ------------------
  |  Branch (977:13): [True: 77.5k, False: 424]
  ------------------
  978|    424|    return res;
  979|    424|}
ua_types_lex.c:parse_relativepathElement:
  841|  77.9k|                          UA_UInt16 defaultTargetNamespaceIndex, UA_Boolean *done) {
  842|  77.9k|    const u8 *pos = *ppos;
  843|  77.9k|    if(pos == end) {
  ------------------
  |  Branch (843:8): [True: 280, False: 77.6k]
  ------------------
  844|    280|        *done = true;
  845|    280|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|    280|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  846|    280|    }
  847|       |
  848|       |    /* Create the element on the stack.
  849|       |     * Moved into the rp upon successful parsing. */
  850|  77.6k|    UA_RelativePathElement current;
  851|  77.6k|    UA_RelativePathElement_init(&current);
  852|  77.6k|    current.includeSubtypes = true; /* Follow subtypes by default */
  853|       |
  854|       |    /* Which ReferenceType? */
  855|  77.6k|    const u8 *begin;
  856|  77.6k|    UA_StatusCode res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|  77.6k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  857|  77.6k|    switch(*pos) {
  858|  73.0k|    case '/':
  ------------------
  |  Branch (858:5): [True: 73.0k, False: 4.64k]
  ------------------
  859|  73.0k|        current.referenceTypeId = UA_NODEID_NUMERIC(0, UA_NS0ID_HIERARCHICALREFERENCES);
  ------------------
  |  |   46|  73.0k|#define UA_NS0ID_HIERARCHICALREFERENCES 33 /* ReferenceType */
  ------------------
  860|  73.0k|        goto reftype_target;
  861|      0|    case '.':
  ------------------
  |  Branch (861:5): [True: 0, False: 77.6k]
  ------------------
  862|       |        /* Recognize the dot only for the and-escaping. The dot is not escaped
  863|       |         * for percent-escaping and commonly used as part of the browse-name. */
  864|      0|        if(esc != UA_ESCAPING_AND) {
  ------------------
  |  Branch (864:12): [True: 0, False: 0]
  ------------------
  865|      0|            *done = true;
  866|      0|            goto out;
  867|      0|        }
  868|      0|        current.referenceTypeId = UA_NODEID_NUMERIC(0, UA_NS0ID_AGGREGATES);
  ------------------
  |  |   55|      0|#define UA_NS0ID_AGGREGATES 44 /* ReferenceType */
  ------------------
  869|      0|        goto reftype_target;
  870|  4.58k|    case '<':
  ------------------
  |  Branch (870:5): [True: 4.58k, False: 73.0k]
  ------------------
  871|  4.58k|        break;
  872|     60|    default:
  ------------------
  |  Branch (872:5): [True: 60, False: 77.6k]
  ------------------
  873|     60|        *done = true;
  874|     60|        goto out;
  875|  77.6k|    }
  876|       |
  877|       |    /* ReferenceType with modifiers wrapped in angle brackets */
  878|  4.58k|    begin = ++pos;
  879|  31.9M|    for(; pos < end; pos++) {
  ------------------
  |  Branch (879:11): [True: 31.9M, False: 63]
  ------------------
  880|  31.9M|        if((esc == UA_ESCAPING_AND || esc == UA_ESCAPING_AND_EXTENDED) && *pos == '&') {
  ------------------
  |  Branch (880:13): [True: 0, False: 31.9M]
  |  Branch (880:39): [True: 0, False: 31.9M]
  |  Branch (880:75): [True: 0, False: 0]
  ------------------
  881|      0|            pos++;
  882|      0|            continue;
  883|      0|        }
  884|  31.9M|        if((esc == UA_ESCAPING_PERCENT || esc == UA_ESCAPING_PERCENT_EXTENDED) && *pos == '%') {
  ------------------
  |  Branch (884:13): [True: 0, False: 31.9M]
  |  Branch (884:43): [True: 31.9M, False: 0]
  |  Branch (884:83): [True: 9.51M, False: 22.4M]
  ------------------
  885|  9.51M|            pos += 2;
  886|  9.51M|            continue;
  887|  9.51M|        }
  888|  22.4M|        if(*pos == '>')
  ------------------
  |  Branch (888:12): [True: 4.52k, False: 22.4M]
  ------------------
  889|  4.52k|            break;
  890|  22.4M|    }
  891|  4.58k|    if(pos > end) {
  ------------------
  |  Branch (891:8): [True: 0, False: 4.58k]
  ------------------
  892|      0|        res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   43|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  893|      0|        goto out;
  894|      0|    }
  895|       |
  896|       |    /* Process modifiers */
  897|  5.14k|    for(; begin < pos; begin++) {
  ------------------
  |  Branch (897:11): [True: 5.14k, False: 0]
  ------------------
  898|  5.14k|        if(*begin == '#')
  ------------------
  |  Branch (898:12): [True: 388, False: 4.75k]
  ------------------
  899|    388|            current.includeSubtypes = false;
  900|  4.75k|        else if(*begin == '!')
  ------------------
  |  Branch (900:17): [True: 166, False: 4.58k]
  ------------------
  901|    166|            current.isInverse = true;
  902|  4.58k|        else
  903|  4.58k|            break;
  904|  5.14k|    }
  905|       |
  906|       |    /* Try to parse a NodeId for the ReferenceType (non-standard!) */
  907|  4.58k|    res = parse_nodeid(&current.referenceTypeId, begin, pos, esc, NULL);
  908|  4.58k|    if(res != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   16|  4.58k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (908:8): [True: 648, False: 3.93k]
  ------------------
  909|       |        /* Parse the the ReferenceType from its BrowseName (default) */
  910|    648|        UA_QualifiedName refqn;
  911|    648|        res = parse_qn(&refqn, begin, pos, esc, NULL, defaultTargetNamespaceIndex);
  912|    648|        res |= lookupRefType(server, &refqn, &current.referenceTypeId);
  913|    648|        UA_QualifiedName_clear(&refqn);
  914|    648|        if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   16|    648|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (914:12): [True: 74, False: 574]
  ------------------
  915|     74|            goto out;
  916|    648|    }
  917|       |
  918|  77.5k| reftype_target:
  919|       |    /* Move pos to the end of the TargetName based on the escaping */
  920|  77.5k|    begin = ++pos;
  921|   410k|    while(pos < end && *pos >= '0' && *pos <= '9')
  ------------------
  |  Branch (921:11): [True: 410k, False: 234]
  |  Branch (921:24): [True: 337k, False: 72.7k]
  |  Branch (921:39): [True: 332k, False: 4.50k]
  ------------------
  922|   332k|        pos++;
  923|  77.5k|    if(pos < end && *pos == ':')
  ------------------
  |  Branch (923:8): [True: 77.2k, False: 234]
  |  Branch (923:21): [True: 17, False: 77.2k]
  ------------------
  924|     17|        pos++;
  925|   342k|    for(; pos < end; pos++) {
  ------------------
  |  Branch (925:11): [True: 342k, False: 280]
  ------------------
  926|   342k|        if((esc == UA_ESCAPING_AND || esc == UA_ESCAPING_AND_EXTENDED) && *pos == '&') {
  ------------------
  |  Branch (926:13): [True: 0, False: 342k]
  |  Branch (926:39): [True: 0, False: 342k]
  |  Branch (926:75): [True: 0, False: 0]
  ------------------
  927|      0|            pos++;
  928|      0|            continue;
  929|      0|        }
  930|   342k|        if((esc == UA_ESCAPING_PERCENT || esc == UA_ESCAPING_PERCENT_EXTENDED) && *pos == '%') {
  ------------------
  |  Branch (930:13): [True: 0, False: 342k]
  |  Branch (930:43): [True: 342k, False: 0]
  |  Branch (930:83): [True: 0, False: 342k]
  ------------------
  931|      0|            pos += 2;
  932|      0|            continue;
  933|      0|        }
  934|   342k|        if(esc == UA_ESCAPING_PERCENT || esc == UA_ESCAPING_PERCENT_EXTENDED) {
  ------------------
  |  Branch (934:12): [True: 0, False: 342k]
  |  Branch (934:42): [True: 342k, False: 0]
  ------------------
  935|   342k|            if(isReservedPercentExtended(*pos))
  ------------------
  |  Branch (935:16): [True: 77.2k, False: 265k]
  ------------------
  936|  77.2k|                break;
  937|   342k|        } else {
  938|      0|            if(isReservedAnd(*pos))
  ------------------
  |  Branch (938:16): [True: 0, False: 0]
  ------------------
  939|      0|                break;
  940|      0|        }
  941|   342k|    }
  942|  77.5k|    if(pos > end) {
  ------------------
  |  Branch (942:8): [True: 4, False: 77.5k]
  ------------------
  943|      4|        res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   43|      4|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  944|      4|        goto out;
  945|      4|    }
  946|       |
  947|       |    /* Parse the TargetName */
  948|  77.5k|    res = parse_qn(&current.targetName, begin, pos, esc,
  949|  77.5k|                   NULL, defaultTargetNamespaceIndex);
  950|  77.5k|    if(res != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   16|  77.5k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (950:8): [True: 0, False: 77.5k]
  ------------------
  951|      0|        UA_RelativePathElement_clear(&current);
  952|      0|        goto out;
  953|      0|    }
  954|       |
  955|       |    /* Add current to the rp */
  956|  77.5k|    res |= relativepath_addelem(rp, &current);
  957|  77.5k|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   16|  77.5k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (957:8): [True: 6, False: 77.5k]
  ------------------
  958|      6|        UA_RelativePathElement_clear(&current);
  959|       |
  960|  77.6k| out:
  961|       |    /* Return the status */
  962|  77.6k|    *ppos = pos;
  963|  77.6k|    *done |= (res != UA_STATUSCODE_GOOD);
  ------------------
  |  |   16|  77.6k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  964|  77.6k|    return res;
  965|  77.5k|}
ua_types_lex.c:relativepath_addelem:
  682|  77.5k|relativepath_addelem(UA_RelativePath *rp, UA_RelativePathElement *el) {
  683|       |    /* Allocate memory */
  684|  77.5k|    UA_RelativePathElement *newArray = (UA_RelativePathElement*)
  685|  77.5k|        UA_realloc(rp->elements, sizeof(UA_RelativePathElement) * (rp->elementsSize + 1));
  ------------------
  |  |   21|  77.5k|#define UA_realloc(ptr, size) UA_reallocSingleton(ptr, size)
  ------------------
  686|  77.5k|    if(!newArray)
  ------------------
  |  Branch (686:8): [True: 6, False: 77.5k]
  ------------------
  687|      6|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   31|      6|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
  688|  77.5k|    rp->elements = newArray;
  689|       |
  690|       |    /* Move to the target */
  691|  77.5k|    rp->elements[rp->elementsSize] = *el;
  692|  77.5k|    rp->elementsSize++;
  693|  77.5k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|  77.5k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  694|  77.5k|}
ua_types_lex.c:parseAttributeOperand:
 1013|    440|                      UA_NodeId defaultId, UA_UInt16 defaultNamespaceIndex) {
 1014|       |    /* Initialize and set the default values */
 1015|    440|    UA_AttributeOperand_init(ao);
 1016|    440|    ao->nodeId = defaultId;
 1017|    440|    ao->attributeId = UA_ATTRIBUTEID_VALUE;
 1018|       |
 1019|       |    /* Nothing to parse */
 1020|    440|    if(str.length == 0)
  ------------------
  |  Branch (1020:8): [True: 0, False: 440]
  ------------------
 1021|      0|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1022|       |
 1023|    440|    const u8 *pos = str.data;
 1024|    440|    const u8 *end = pos + str.length;
 1025|    440|    UA_StatusCode res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|    440|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1026|       |
 1027|       |    /* Initial NodeId before the BrowsePath */
 1028|    440|    LexContext context;
 1029|    440|    memset(&context, 0, sizeof(LexContext));
 1030|       |    
 1031|    440|{
 1032|    440|	u8 yych;
 1033|    440|	yych = YYPEEK();
  ------------------
  |  |   31|    440|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|    440|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|    440|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (31:18): [True: 440, False: 0]
  |  |  ------------------
  ------------------
 1034|    440|	switch (yych) {
 1035|      3|		case 'b':
  ------------------
  |  Branch (1035:3): [True: 3, False: 437]
  ------------------
 1036|     12|		case 'g':
  ------------------
  |  Branch (1036:3): [True: 9, False: 431]
  ------------------
 1037|     19|		case 'i':
  ------------------
  |  Branch (1037:3): [True: 7, False: 433]
  ------------------
 1038|     92|		case 's': goto yy55;
  ------------------
  |  Branch (1038:3): [True: 73, False: 367]
  ------------------
 1039|     72|		case 'n': goto yy56;
  ------------------
  |  Branch (1039:3): [True: 72, False: 368]
  ------------------
 1040|    276|		default: goto yy53;
  ------------------
  |  Branch (1040:3): [True: 276, False: 164]
  ------------------
 1041|    440|	}
 1042|    276|yy53:
 1043|    276|	YYSKIP();
  ------------------
  |  |   33|    276|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|    276|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1044|    289|yy54:
 1045|    289|	{ pos = str.data; goto parse_path; }
 1046|     92|yy55:
 1047|     92|	YYSKIP();
  ------------------
  |  |   33|     92|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|     92|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1048|     92|	yych = YYPEEK();
  ------------------
  |  |   31|     92|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|     92|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|     92|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (31:18): [True: 92, False: 0]
  |  |  ------------------
  ------------------
 1049|     92|	switch (yych) {
 1050|     91|		case '=': goto yy57;
  ------------------
  |  Branch (1050:3): [True: 91, False: 1]
  ------------------
 1051|      1|		default: goto yy54;
  ------------------
  |  Branch (1051:3): [True: 1, False: 91]
  ------------------
 1052|     92|	}
 1053|     72|yy56:
 1054|     72|	YYSKIP();
  ------------------
  |  |   33|     72|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|     72|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1055|     72|	YYBACKUP();
  ------------------
  |  |   34|     72|#define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   30|     72|#define YYMARKER context.marker
  |  |  ------------------
  |  |               #define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   29|     72|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1056|     72|	yych = YYPEEK();
  ------------------
  |  |   31|     72|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|     72|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|     72|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (31:18): [True: 72, False: 0]
  |  |  ------------------
  ------------------
 1057|     72|	switch (yych) {
 1058|     71|		case 's': goto yy58;
  ------------------
  |  Branch (1058:3): [True: 71, False: 1]
  ------------------
 1059|      1|		default: goto yy54;
  ------------------
  |  Branch (1059:3): [True: 1, False: 71]
  ------------------
 1060|     72|	}
 1061|    151|yy57:
 1062|    151|	YYSKIP();
  ------------------
  |  |   33|    151|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|    151|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1063|    151|	{
 1064|       |        // Find the end position of the NodeId body and parse
 1065|   458k|        for(; pos < end; pos++) {
  ------------------
  |  Branch (1065:15): [True: 458k, False: 12]
  ------------------
 1066|   458k|            if(*pos == '%') {
  ------------------
  |  Branch (1066:16): [True: 6, False: 458k]
  ------------------
 1067|      6|                pos += 2;
 1068|      6|                continue;
 1069|      6|            }
 1070|   458k|            if(isReservedPercentExtended(*pos))
  ------------------
  |  Branch (1070:16): [True: 139, False: 457k]
  ------------------
 1071|    139|                break;
 1072|   458k|        }
 1073|    151|        if(pos > end) {
  ------------------
  |  Branch (1073:12): [True: 0, False: 151]
  ------------------
 1074|      0|            res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   43|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1075|      0|            goto cleanup;
 1076|      0|        }
 1077|    151|        res = parse_nodeid(&ao->nodeId, str.data, pos, UA_ESCAPING_PERCENT, NULL);
 1078|    151|        if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   16|    151|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1078:12): [True: 16, False: 135]
  ------------------
 1079|     16|            goto cleanup;
 1080|    135|        goto parse_path;
 1081|    151|    }
 1082|    135|yy58:
 1083|     71|	YYSKIP();
  ------------------
  |  |   33|     71|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|     71|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1084|     71|	yych = YYPEEK();
  ------------------
  |  |   31|     71|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|     71|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|     71|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (31:18): [True: 71, False: 0]
  |  |  ------------------
  ------------------
 1085|     71|	switch (yych) {
 1086|     57|		case '=': goto yy60;
  ------------------
  |  Branch (1086:3): [True: 57, False: 14]
  ------------------
 1087|     14|		case 'u': goto yy61;
  ------------------
  |  Branch (1087:3): [True: 14, False: 57]
  ------------------
 1088|      0|		default: goto yy59;
  ------------------
  |  Branch (1088:3): [True: 0, False: 71]
  ------------------
 1089|     71|	}
 1090|     11|yy59:
 1091|     11|	YYRESTORE();
  ------------------
  |  |   35|     11|#define YYRESTORE() YYCURSOR = YYMARKER
  |  |  ------------------
  |  |  |  |   29|     11|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYRESTORE() YYCURSOR = YYMARKER
  |  |  ------------------
  |  |  |  |   30|     11|#define YYMARKER context.marker
  |  |  ------------------
  ------------------
 1092|     11|	goto yy54;
 1093|     57|yy60:
 1094|     57|	YYSKIP();
  ------------------
  |  |   33|     57|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|     57|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1095|     57|	yych = YYPEEK();
  ------------------
  |  |   31|     57|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|     57|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|     57|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (31:18): [True: 57, False: 0]
  |  |  ------------------
  ------------------
 1096|     57|	switch (yych) {
 1097|      0|		case '0':
  ------------------
  |  Branch (1097:3): [True: 0, False: 57]
  ------------------
 1098|      8|		case '1':
  ------------------
  |  Branch (1098:3): [True: 8, False: 49]
  ------------------
 1099|     12|		case '2':
  ------------------
  |  Branch (1099:3): [True: 4, False: 53]
  ------------------
 1100|     50|		case '3':
  ------------------
  |  Branch (1100:3): [True: 38, False: 19]
  ------------------
 1101|     50|		case '4':
  ------------------
  |  Branch (1101:3): [True: 0, False: 57]
  ------------------
 1102|     51|		case '5':
  ------------------
  |  Branch (1102:3): [True: 1, False: 56]
  ------------------
 1103|     57|		case '6':
  ------------------
  |  Branch (1103:3): [True: 6, False: 51]
  ------------------
 1104|     57|		case '7':
  ------------------
  |  Branch (1104:3): [True: 0, False: 57]
  ------------------
 1105|     57|		case '8':
  ------------------
  |  Branch (1105:3): [True: 0, False: 57]
  ------------------
 1106|     57|		case '9': goto yy62;
  ------------------
  |  Branch (1106:3): [True: 0, False: 57]
  ------------------
 1107|      0|		default: goto yy59;
  ------------------
  |  Branch (1107:3): [True: 0, False: 57]
  ------------------
 1108|     57|	}
 1109|     14|yy61:
 1110|     14|	YYSKIP();
  ------------------
  |  |   33|     14|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|     14|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1111|     14|	yych = YYPEEK();
  ------------------
  |  |   31|     14|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|     14|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|     14|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (31:18): [True: 14, False: 0]
  |  |  ------------------
  ------------------
 1112|     14|	switch (yych) {
 1113|      9|		case '=': goto yy63;
  ------------------
  |  Branch (1113:3): [True: 9, False: 5]
  ------------------
 1114|      5|		default: goto yy59;
  ------------------
  |  Branch (1114:3): [True: 5, False: 9]
  ------------------
 1115|     14|	}
 1116|   601k|yy62:
 1117|   601k|	YYSKIP();
  ------------------
  |  |   33|   601k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|   601k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1118|   601k|	yych = YYPEEK();
  ------------------
  |  |   31|   601k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|   601k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|   601k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (31:18): [True: 601k, False: 0]
  |  |  ------------------
  ------------------
 1119|   601k|	switch (yych) {
 1120|   597k|		case '0':
  ------------------
  |  Branch (1120:3): [True: 597k, False: 4.63k]
  ------------------
 1121|   597k|		case '1':
  ------------------
  |  Branch (1121:3): [True: 539, False: 601k]
  ------------------
 1122|   598k|		case '2':
  ------------------
  |  Branch (1122:3): [True: 471, False: 601k]
  ------------------
 1123|   598k|		case '3':
  ------------------
  |  Branch (1123:3): [True: 518, False: 601k]
  ------------------
 1124|   599k|		case '4':
  ------------------
  |  Branch (1124:3): [True: 505, False: 601k]
  ------------------
 1125|   599k|		case '5':
  ------------------
  |  Branch (1125:3): [True: 467, False: 601k]
  ------------------
 1126|   600k|		case '6':
  ------------------
  |  Branch (1126:3): [True: 516, False: 601k]
  ------------------
 1127|   600k|		case '7':
  ------------------
  |  Branch (1127:3): [True: 532, False: 601k]
  ------------------
 1128|   601k|		case '8':
  ------------------
  |  Branch (1128:3): [True: 528, False: 601k]
  ------------------
 1129|   601k|		case '9': goto yy62;
  ------------------
  |  Branch (1129:3): [True: 505, False: 601k]
  ------------------
 1130|     56|		case ';': goto yy64;
  ------------------
  |  Branch (1130:3): [True: 56, False: 601k]
  ------------------
 1131|      1|		default: goto yy59;
  ------------------
  |  Branch (1131:3): [True: 1, False: 601k]
  ------------------
 1132|   601k|	}
 1133|    198|yy63:
 1134|    198|	YYSKIP();
  ------------------
  |  |   33|    198|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|    198|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1135|    198|	yych = YYPEEK();
  ------------------
  |  |   31|    198|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|    198|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|    198|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (31:18): [True: 198, False: 0]
  |  |  ------------------
  ------------------
 1136|    198|	switch (yych) {
 1137|      3|		case 0x00: goto yy59;
  ------------------
  |  Branch (1137:3): [True: 3, False: 195]
  ------------------
 1138|      6|		case ';': goto yy64;
  ------------------
  |  Branch (1138:3): [True: 6, False: 192]
  ------------------
 1139|    189|		default: goto yy63;
  ------------------
  |  Branch (1139:3): [True: 189, False: 9]
  ------------------
 1140|    198|	}
 1141|     62|yy64:
 1142|     62|	YYSKIP();
  ------------------
  |  |   33|     62|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|     62|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1143|     62|	yych = YYPEEK();
  ------------------
  |  |   31|     62|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|     62|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|     62|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (31:18): [True: 62, False: 0]
  |  |  ------------------
  ------------------
 1144|     62|	switch (yych) {
 1145|      3|		case 'b':
  ------------------
  |  Branch (1145:3): [True: 3, False: 59]
  ------------------
 1146|      3|		case 'g':
  ------------------
  |  Branch (1146:3): [True: 0, False: 62]
  ------------------
 1147|     60|		case 'i':
  ------------------
  |  Branch (1147:3): [True: 57, False: 5]
  ------------------
 1148|     60|		case 's': goto yy65;
  ------------------
  |  Branch (1148:3): [True: 0, False: 62]
  ------------------
 1149|      2|		default: goto yy59;
  ------------------
  |  Branch (1149:3): [True: 2, False: 60]
  ------------------
 1150|     62|	}
 1151|     60|yy65:
 1152|     60|	YYSKIP();
  ------------------
  |  |   33|     60|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   29|     60|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1153|     60|	yych = YYPEEK();
  ------------------
  |  |   31|     60|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|     60|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   29|     60|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (31:18): [True: 60, False: 0]
  |  |  ------------------
  ------------------
 1154|     60|	switch (yych) {
 1155|     60|		case '=': goto yy57;
  ------------------
  |  Branch (1155:3): [True: 60, False: 0]
  ------------------
 1156|      0|		default: goto yy59;
  ------------------
  |  Branch (1156:3): [True: 0, False: 60]
  ------------------
 1157|     60|	}
 1158|     60|}
 1159|       |
 1160|       |
 1161|       |    /* Parse the BrowsePath */
 1162|    424| parse_path:
 1163|    424|    res = parse_relativepath(&ao->browsePath, &pos, end, NULL,
 1164|    424|                             UA_ESCAPING_PERCENT_EXTENDED, defaultNamespaceIndex);
 1165|    424|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   16|    424|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1165:8): [True: 84, False: 340]
  ------------------
 1166|     84|        goto cleanup;
 1167|       |
 1168|       |    /* Parse the AttributeId */
 1169|    340|    if(pos < end && *pos == '#') {
  ------------------
  |  Branch (1169:8): [True: 60, False: 280]
  |  Branch (1169:21): [True: 15, False: 45]
  ------------------
 1170|     15|        const u8 *attr_pos = ++pos;
 1171|   293k|        while(pos < end && ((*pos >= 'a' && *pos <= 'z') ||
  ------------------
  |  Branch (1171:15): [True: 293k, False: 10]
  |  Branch (1171:30): [True: 280k, False: 12.1k]
  |  Branch (1171:45): [True: 280k, False: 0]
  ------------------
 1172|   292k|                            (*pos >= 'A' && *pos <= 'Z'))) {
  ------------------
  |  Branch (1172:30): [True: 12.1k, False: 5]
  |  Branch (1172:45): [True: 12.1k, False: 0]
  ------------------
 1173|   292k|            pos++;
 1174|   292k|        }
 1175|     15|        UA_String attrString = {(size_t)(pos - attr_pos), (UA_Byte*)(uintptr_t)attr_pos};
 1176|     15|        ao->attributeId = UA_AttributeId_fromName(attrString);
 1177|     15|        if(ao->attributeId == UA_ATTRIBUTEID_INVALID) {
  ------------------
  |  Branch (1177:12): [True: 15, False: 0]
  ------------------
 1178|     15|            res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   43|     15|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1179|     15|            goto cleanup;
 1180|     15|        }
 1181|     15|    }
 1182|       |
 1183|       |    /* Parse the IndexRange */
 1184|    325|    if(pos < end && *pos == '[') {
  ------------------
  |  Branch (1184:8): [True: 45, False: 280]
  |  Branch (1184:21): [True: 22, False: 23]
  ------------------
 1185|     22|        const u8 *range_pos = ++pos;
 1186|  8.85M|        while(pos < end && *pos != ']') {
  ------------------
  |  Branch (1186:15): [True: 8.85M, False: 0]
  |  Branch (1186:28): [True: 8.85M, False: 22]
  ------------------
 1187|  8.85M|            pos++;
 1188|  8.85M|        }
 1189|     22|        if(pos == end) {
  ------------------
  |  Branch (1189:12): [True: 0, False: 22]
  ------------------
 1190|      0|            res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   43|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1191|      0|            goto cleanup;
 1192|      0|        }
 1193|     22|        UA_String rangeString = {(size_t)(pos - range_pos), (UA_Byte*)(uintptr_t)range_pos};
 1194|     22|        if(rangeString.length > 0)
  ------------------
  |  Branch (1194:12): [True: 22, False: 0]
  ------------------
 1195|     22|            res = UA_String_copy(&rangeString, &ao->indexRange);
 1196|     22|        pos++;
 1197|     22|    }
 1198|       |
 1199|       |    /* Check that we have parsed the entire string */
 1200|    325|    if(pos != end)
  ------------------
  |  Branch (1200:8): [True: 23, False: 302]
  ------------------
 1201|     23|        res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   43|     23|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1202|       |
 1203|       |
 1204|    440| cleanup:
 1205|    440|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   16|    440|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1205:8): [True: 138, False: 302]
  ------------------
 1206|    138|        UA_AttributeOperand_clear(ao);
 1207|    440|    return res;
 1208|    325|}

UA_AttributeId_fromName:
   55|     15|UA_AttributeId_fromName(const UA_String name) {
   56|    435|    for(size_t i = 0; i < 28; i++) {
  ------------------
  |  Branch (56:23): [True: 420, False: 15]
  ------------------
   57|    420|        if(strlen(attributeIdNames[i]) != name.length)
  ------------------
  |  Branch (57:12): [True: 420, False: 0]
  ------------------
   58|    420|            continue;
   59|      0|        for(size_t j = 0; j < name.length; j++) {
  ------------------
  |  Branch (59:27): [True: 0, False: 0]
  ------------------
   60|      0|            if((attributeIdNames[i][j] | 32) != (name.data[j] | 32))
  ------------------
  |  Branch (60:16): [True: 0, False: 0]
  ------------------
   61|      0|                goto next;
   62|      0|        }
   63|      0|        return (UA_AttributeId)i;
   64|      0|    next:
   65|      0|        continue;
   66|      0|    }
   67|     15|    return UA_ATTRIBUTEID_INVALID;
   68|     15|}
UA_readNumberWithBase:
  110|    524|UA_readNumberWithBase(const UA_Byte *buf, size_t buflen, UA_UInt32 *number, UA_Byte base) {
  111|    524|    UA_assert(buf);
  ------------------
  |  |  397|    524|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (111:5): [True: 524, False: 0]
  ------------------
  112|    524|    UA_assert(number);
  ------------------
  |  |  397|    524|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (112:5): [True: 524, False: 0]
  ------------------
  113|    524|    u32 n = 0;
  114|    524|    size_t progress = 0;
  115|       |    /* read numbers until the end or a non-number character appears */
  116|   337k|    while(progress < buflen) {
  ------------------
  |  Branch (116:11): [True: 337k, False: 489]
  ------------------
  117|   337k|        u8 c = buf[progress];
  118|   337k|        if(c >= '0' && c <= '9' && c <= '0' + (base-1))
  ------------------
  |  Branch (118:12): [True: 337k, False: 5]
  |  Branch (118:24): [True: 336k, False: 30]
  |  Branch (118:36): [True: 336k, False: 0]
  ------------------
  119|   336k|           n = (n * base) + c - '0';
  120|     35|        else if(base > 9 && c >= 'a' && c <= 'z' && c <= 'a' + (base-11))
  ------------------
  |  Branch (120:17): [True: 35, False: 0]
  |  Branch (120:29): [True: 30, False: 5]
  |  Branch (120:41): [True: 11, False: 19]
  |  Branch (120:53): [True: 0, False: 11]
  ------------------
  121|      0|           n = (n * base) + c-'a' + 10;
  122|     35|        else if(base > 9 && c >= 'A' && c <= 'Z' && c <= 'A' + (base-11))
  ------------------
  |  Branch (122:17): [True: 35, False: 0]
  |  Branch (122:29): [True: 30, False: 5]
  |  Branch (122:41): [True: 0, False: 30]
  |  Branch (122:53): [True: 0, False: 0]
  ------------------
  123|      0|           n = (n * base) + c-'A' + 10;
  124|     35|        else
  125|     35|           break;
  126|   336k|        ++progress;
  127|   336k|    }
  128|    524|    *number = n;
  129|    524|    return progress;
  130|    524|}
UA_readNumber:
  133|    524|UA_readNumber(const UA_Byte *buf, size_t buflen, UA_UInt32 *number) {
  134|    524|    return UA_readNumberWithBase(buf, buflen, number, 10);
  135|    524|}
lookupRefType:
  722|    648|lookupRefType(UA_Server *server, UA_QualifiedName *qn, UA_NodeId *outRefTypeId) {
  723|       |    /* Check well-known ReferenceTypes first */
  724|    648|    if(qn->namespaceIndex == 0) {
  ------------------
  |  Branch (724:8): [True: 648, False: 0]
  ------------------
  725|  3.24k|        for(size_t i = 0; i < KNOWNREFTYPES; i++) {
  ------------------
  |  |  700|  3.24k|#define KNOWNREFTYPES 17
  ------------------
  |  Branch (725:27): [True: 3.17k, False: 74]
  ------------------
  726|  3.17k|            if(UA_String_equal(&qn->name, &knownRefTypes[i].browseName)) {
  ------------------
  |  Branch (726:16): [True: 574, False: 2.59k]
  ------------------
  727|    574|                *outRefTypeId = UA_NODEID_NUMERIC(0, knownRefTypes[i].identifier);
  728|    574|                return UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|    574|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  729|    574|            }
  730|  3.17k|        }
  731|    648|    }
  732|       |
  733|       |    /* Browse the information model. Return the first results if the browse name
  734|       |     * in the hierarchy is ambiguous. */
  735|     74|    if(server) {
  ------------------
  |  Branch (735:8): [True: 0, False: 74]
  ------------------
  736|      0|        UA_BrowseDescription bd;
  737|      0|        UA_BrowseDescription_init(&bd);
  738|      0|        bd.nodeId = UA_NODEID_NUMERIC(0, UA_NS0ID_REFERENCES);
  ------------------
  |  |   44|      0|#define UA_NS0ID_REFERENCES 31 /* ReferenceType */
  ------------------
  739|      0|        bd.browseDirection = UA_BROWSEDIRECTION_FORWARD;
  740|      0|        bd.referenceTypeId = UA_NODEID_NUMERIC(0, UA_NS0ID_HASSUBTYPE);
  ------------------
  |  |   56|      0|#define UA_NS0ID_HASSUBTYPE 45 /* ReferenceType */
  ------------------
  741|      0|        bd.nodeClassMask = UA_NODECLASS_REFERENCETYPE;
  742|       |
  743|      0|        size_t resultsSize = 0;
  744|      0|        UA_ExpandedNodeId *results = NULL;
  745|      0|        UA_StatusCode res =
  746|      0|            UA_Server_browseRecursive(server, &bd, &resultsSize, &results);
  747|      0|        if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   16|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (747:12): [True: 0, False: 0]
  ------------------
  748|      0|            return res;
  749|      0|        for(size_t i = 0; i < resultsSize; i++) {
  ------------------
  |  Branch (749:27): [True: 0, False: 0]
  ------------------
  750|      0|            UA_QualifiedName bn;
  751|      0|            UA_Server_readBrowseName(server, results[i].nodeId, &bn);
  752|      0|            if(UA_QualifiedName_equal(qn, &bn)) {
  ------------------
  |  Branch (752:16): [True: 0, False: 0]
  ------------------
  753|      0|                UA_QualifiedName_clear(&bn);
  754|      0|                *outRefTypeId = results[i].nodeId;
  755|      0|                UA_NodeId_clear(&results[i].nodeId);
  756|      0|                UA_Array_delete(results, resultsSize, &UA_TYPES[UA_TYPES_NODEID]);
  ------------------
  |  |  565|      0|#define UA_TYPES_NODEID 16
  ------------------
  757|      0|                return UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  758|      0|            }
  759|      0|            UA_QualifiedName_clear(&bn);
  760|      0|        }
  761|       |
  762|      0|        UA_Array_delete(results, resultsSize, &UA_TYPES[UA_TYPES_NODEID]);
  ------------------
  |  |  565|      0|#define UA_TYPES_NODEID 16
  ------------------
  763|      0|    }
  764|       |
  765|     74|    return UA_STATUSCODE_BADNOTFOUND;
  ------------------
  |  |  232|     74|#define UA_STATUSCODE_BADNOTFOUND ((UA_StatusCode) 0x803E0000)
  ------------------
  766|     74|}
getRefTypeBrowseName:
  769|  4.24k|getRefTypeBrowseName(const UA_NodeId *refTypeId, UA_String *outBN) {
  770|       |    /* Canonical name known? */
  771|  4.24k|    if(refTypeId->namespaceIndex == 0 &&
  ------------------
  |  Branch (771:8): [True: 4.24k, False: 0]
  ------------------
  772|  4.24k|       refTypeId->identifierType == UA_NODEIDTYPE_NUMERIC) {
  ------------------
  |  Branch (772:8): [True: 670, False: 3.57k]
  ------------------
  773|  2.67k|        for(size_t i = 0; i < KNOWNREFTYPES; i++) {
  ------------------
  |  |  700|  2.67k|#define KNOWNREFTYPES 17
  ------------------
  |  Branch (773:27): [True: 2.63k, False: 36]
  ------------------
  774|  2.63k|            if(refTypeId->identifier.numeric != knownRefTypes[i].identifier)
  ------------------
  |  Branch (774:16): [True: 2.00k, False: 634]
  ------------------
  775|  2.00k|                continue;
  776|    634|            memcpy(outBN->data, knownRefTypes[i].browseName.data, knownRefTypes[i].browseName.length);
  777|    634|            outBN->length = knownRefTypes[i].browseName.length;
  778|    634|            return UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|    634|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  779|  2.63k|        }
  780|    670|    }
  781|       |
  782|       |    /* Print the NodeId */
  783|  3.60k|    return UA_NodeId_print(refTypeId, outBN);
  784|  4.24k|}
UA_String_unescape:
  798|  80.7k|UA_String_unescape(UA_String *str, UA_Boolean copyEscape, UA_Escaping esc) {
  799|  80.7k|    if(esc == UA_ESCAPING_NONE)
  ------------------
  |  Branch (799:8): [True: 0, False: 80.7k]
  ------------------
  800|      0|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  801|       |
  802|       |    /* Does the string need escaping? */
  803|  80.7k|    UA_String tmp;
  804|  80.7k|    status res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|  80.7k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  805|  80.7k|    u8 *pos = str->data;
  806|  80.7k|    u8 *end = str->data + str->length;
  807|  80.7k|    u8 escape_char = (esc == UA_ESCAPING_PERCENT ||
  ------------------
  |  Branch (807:23): [True: 73, False: 80.6k]
  ------------------
  808|  80.7k|                      esc == UA_ESCAPING_PERCENT_EXTENDED) ? '%' : '&';
  ------------------
  |  Branch (808:23): [True: 80.6k, False: 0]
  ------------------
  809|  11.8M|    for(; pos < end; pos++) {
  ------------------
  |  Branch (809:11): [True: 11.7M, False: 80.0k]
  ------------------
  810|  11.7M|        if(*pos == escape_char)
  ------------------
  |  Branch (810:12): [True: 659, False: 11.7M]
  ------------------
  811|    659|            goto escape;
  812|  11.7M|    }
  813|       |
  814|  80.0k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|  80.0k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  815|       |
  816|    659| escape:
  817|    659|    if(copyEscape) {
  ------------------
  |  Branch (817:8): [True: 0, False: 659]
  ------------------
  818|      0|        res = UA_String_copy(str, &tmp);
  819|      0|        if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   16|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (819:12): [True: 0, False: 0]
  ------------------
  820|      0|            return res;
  821|      0|        pos = tmp.data;
  822|      0|        end = tmp.data + tmp.length;
  823|      0|    }
  824|       |
  825|    659|    u8 byte = 0;
  826|    659|    u8 *writepos = pos;
  827|       |
  828|    659|    res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   43|    659|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  829|    659|    if(esc == UA_ESCAPING_PERCENT ||
  ------------------
  |  Branch (829:8): [True: 1, False: 658]
  ------------------
  830|    659|       esc == UA_ESCAPING_PERCENT_EXTENDED) {
  ------------------
  |  Branch (830:8): [True: 658, False: 0]
  ------------------
  831|       |        /* Percent-Escaping */
  832|  10.6M|        for(; pos < end; pos++) {
  ------------------
  |  Branch (832:15): [True: 10.6M, False: 610]
  ------------------
  833|  10.6M|            if(*pos == '%') {
  ------------------
  |  Branch (833:16): [True: 9.50M, False: 1.09M]
  ------------------
  834|  9.50M|                if(pos + 2 >= end || !isHex(pos[1]) || !isHex(pos[2]))
  ------------------
  |  Branch (834:20): [True: 0, False: 9.50M]
  |  Branch (834:38): [True: 46, False: 9.50M]
  |  Branch (834:56): [True: 3, False: 9.50M]
  ------------------
  835|     49|                    goto out;
  836|  9.50M|                if(pos[1] >= 'a')
  ------------------
  |  Branch (836:20): [True: 330, False: 9.50M]
  ------------------
  837|    330|                    byte = pos[1] - ('a' - 10);
  838|  9.50M|                else if(pos[1] >= 'A')
  ------------------
  |  Branch (838:25): [True: 8, False: 9.50M]
  ------------------
  839|      8|                    byte = pos[1] - ('A' - 10);
  840|  9.50M|                else
  841|  9.50M|                    byte = pos[1] - '0';
  842|  9.50M|                byte <<= 4;
  843|       |
  844|  9.50M|                if(pos[2] >= 'a')
  ------------------
  |  Branch (844:20): [True: 96.9k, False: 9.40M]
  ------------------
  845|  96.9k|                    byte += (u8)(pos[2] - ('a' - 10));
  846|  9.40M|                else if(pos[2] >= 'A')
  ------------------
  |  Branch (846:25): [True: 53, False: 9.40M]
  ------------------
  847|     53|                    byte += (u8)(pos[2] - ('A' - 10));
  848|  9.40M|                else
  849|  9.40M|                    byte += (u8)(pos[2] - '0');
  850|       |
  851|  9.50M|                pos += 2;
  852|  9.50M|                *writepos++ = byte;
  853|  9.50M|                continue;
  854|  9.50M|            }
  855|  1.09M|            *writepos++ = *pos;
  856|  1.09M|        }
  857|    659|    } else {
  858|       |        /* And-Escaping */
  859|      0|        for(; pos < end; pos++) {
  ------------------
  |  Branch (859:15): [True: 0, False: 0]
  ------------------
  860|      0|            if(*pos == '&') {
  ------------------
  |  Branch (860:16): [True: 0, False: 0]
  ------------------
  861|      0|                pos++;
  862|      0|                if(pos == end)
  ------------------
  |  Branch (862:20): [True: 0, False: 0]
  ------------------
  863|      0|                    goto out;
  864|      0|            }
  865|      0|            *writepos++ = *pos;
  866|      0|        }
  867|      0|    }
  868|    610|    res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|    610|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  869|       |
  870|    659| out:
  871|    659|    if(copyEscape) {
  ------------------
  |  Branch (871:8): [True: 0, False: 659]
  ------------------
  872|      0|        tmp.length = (size_t)(writepos - tmp.data);
  873|      0|        if(tmp.length == 0)
  ------------------
  |  Branch (873:12): [True: 0, False: 0]
  ------------------
  874|      0|            UA_String_clear(&tmp);
  875|      0|        if(res == UA_STATUSCODE_GOOD)
  ------------------
  |  |   16|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (875:12): [True: 0, False: 0]
  ------------------
  876|      0|            *str = tmp;
  877|      0|        else
  878|      0|            UA_String_clear(&tmp);
  879|    659|    } else if(res == UA_STATUSCODE_GOOD) {
  ------------------
  |  |   16|    659|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (879:15): [True: 610, False: 49]
  ------------------
  880|    610|        str->length = (size_t)(writepos - str->data);
  881|    610|    }
  882|    659|    return res;
  883|    610|}
UA_String_escapedSize:
  889|  82.1k|UA_String_escapedSize(const UA_String s, UA_Escaping esc) {
  890|       |    /* Find out the overhead from escaping */
  891|  82.1k|    size_t overhead = 0;
  892|  60.7M|    for(size_t j = 0; j < s.length; j++) {
  ------------------
  |  Branch (892:23): [True: 60.6M, False: 82.1k]
  ------------------
  893|  60.6M|        if(esc == UA_ESCAPING_AND_EXTENDED)
  ------------------
  |  Branch (893:12): [True: 0, False: 60.6M]
  ------------------
  894|      0|            overhead += isReservedAndExtended(s.data[j]);
  895|  60.6M|        else if(esc == UA_ESCAPING_AND)
  ------------------
  |  Branch (895:17): [True: 0, False: 60.6M]
  ------------------
  896|      0|            overhead += isReservedAnd(s.data[j]);
  897|  60.6M|        else if(esc == UA_ESCAPING_PERCENT)
  ------------------
  |  Branch (897:17): [True: 0, False: 60.6M]
  ------------------
  898|      0|            overhead += (isReservedPercent(s.data[j]) ? 2 : 0);
  ------------------
  |  Branch (898:26): [True: 0, False: 0]
  ------------------
  899|  60.6M|        else /* if(esc == UA_ESCAPING_PERCENT_EXTENDED) */
  900|  60.6M|            overhead += (isReservedPercentExtended(s.data[j]) ? 2 : 0);
  ------------------
  |  Branch (900:26): [True: 57.0M, False: 3.60M]
  ------------------
  901|  60.6M|    }
  902|       |
  903|  82.1k|    return s.length + overhead;
  904|  82.1k|}
UA_String_escapeInsert:
  907|  81.2k|UA_String_escapeInsert(u8 *pos, const UA_String s2, UA_Escaping esc) {
  908|  81.2k|    u8 *begin = pos;
  909|       |
  910|  81.2k|    if(esc == UA_ESCAPING_NONE) {
  ------------------
  |  Branch (910:8): [True: 2.25k, False: 79.0k]
  ------------------
  911|  20.1M|        for(size_t j = 0; j < s2.length; j++)
  ------------------
  |  Branch (911:27): [True: 20.1M, False: 2.25k]
  ------------------
  912|  20.1M|            *pos++ = s2.data[j];
  913|  79.0k|    } else if(esc == UA_ESCAPING_PERCENT || esc == UA_ESCAPING_PERCENT_EXTENDED) {
  ------------------
  |  Branch (913:15): [True: 0, False: 79.0k]
  |  Branch (913:45): [True: 79.0k, False: 0]
  ------------------
  914|  20.4M|        for(size_t j = 0; j < s2.length; j++) {
  ------------------
  |  Branch (914:27): [True: 20.4M, False: 79.0k]
  ------------------
  915|  20.4M|            UA_Boolean reserved = (esc == UA_ESCAPING_PERCENT_EXTENDED) ?
  ------------------
  |  Branch (915:35): [True: 20.4M, False: 0]
  ------------------
  916|  20.4M|                isReservedPercentExtended(s2.data[j]) : isReservedPercent(s2.data[j]);
  917|  20.4M|            if(UA_LIKELY(!reserved)) {
  ------------------
  |  |  576|  20.4M|# define UA_LIKELY(x) __builtin_expect((x), 1)
  |  |  ------------------
  |  |  |  Branch (576:23): [True: 1.39M, False: 19.0M]
  |  |  ------------------
  ------------------
  918|  1.39M|                *pos++ = s2.data[j];
  919|  19.0M|            } else {
  920|  19.0M|                *pos++ = '%';
  921|  19.0M|                *pos++ = hexchars[s2.data[j] >> 4];
  922|  19.0M|                *pos++ = hexchars[s2.data[j] & 0x0f];
  923|  19.0M|            }
  924|  20.4M|        }
  925|  79.0k|    } else {
  926|      0|        for(size_t j = 0; j < s2.length; j++) {
  ------------------
  |  Branch (926:27): [True: 0, False: 0]
  ------------------
  927|      0|            UA_Boolean reserved = (esc == UA_ESCAPING_AND_EXTENDED) ?
  ------------------
  |  Branch (927:35): [True: 0, False: 0]
  ------------------
  928|      0|                isReservedAndExtended(s2.data[j]) : isReservedAnd(s2.data[j]);
  929|      0|            if(reserved)
  ------------------
  |  Branch (929:16): [True: 0, False: 0]
  ------------------
  930|      0|                *pos++ = '&';
  931|      0|            *pos++ = s2.data[j];
  932|      0|        }
  933|      0|    }
  934|       |
  935|  81.2k|    return (size_t)(pos - begin);
  936|  81.2k|}
UA_String_escapeAppend:
  939|  78.9k|UA_String_escapeAppend(UA_String *s, const UA_String s2, UA_Escaping esc) {
  940|  78.9k|    if(esc == UA_ESCAPING_NONE)
  ------------------
  |  Branch (940:8): [True: 0, False: 78.9k]
  ------------------
  941|      0|        return UA_String_append(s, s2);
  942|       |
  943|       |    /* Allocate memory for the additional escaped string */
  944|  78.9k|    size_t escapedLength = UA_String_escapedSize(s2, esc);
  945|  78.9k|    UA_Byte *buf = (UA_Byte*)
  946|  78.9k|        UA_realloc(s->data, s->length + s2.length + escapedLength);
  ------------------
  |  |   21|  78.9k|#define UA_realloc(ptr, size) UA_reallocSingleton(ptr, size)
  ------------------
  947|  78.9k|    if(!buf)
  ------------------
  |  Branch (947:8): [True: 0, False: 78.9k]
  ------------------
  948|      0|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   31|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
  949|       |
  950|       |    /* Escape and insert at the end */
  951|  78.9k|    s->data = buf;
  952|  78.9k|    UA_String_escapeInsert(s->data + s->length, s2, esc);
  953|  78.9k|    s->length += escapedLength;
  954|  78.9k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|  78.9k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  955|  78.9k|}
UA_AttributeOperand_print:
 1119|    302|                          UA_String *out) {
 1120|    302|    UA_String tmp = UA_STRING_NULL;
 1121|    302|    UA_StatusCode res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|    302|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1122|       |
 1123|       |    /* Print the TypeDefinitionId */
 1124|    302|    if(!UA_NodeId_equal(&objectsFolder, &ao->nodeId)) {
  ------------------
  |  Branch (1124:8): [True: 132, False: 170]
  ------------------
 1125|    132|        UA_Byte nodeIdBuf[512];
 1126|    132|        UA_String nodeIdBufStr = {512, nodeIdBuf};
 1127|    132|        res |= nodeId_printEscape(&ao->nodeId, &nodeIdBufStr,
 1128|    132|                                  NULL, UA_ESCAPING_PERCENT_EXTENDED);
 1129|    132|        res |= UA_String_append(&tmp, nodeIdBufStr);
 1130|    132|    }
 1131|       |
 1132|       |    /* Print the BrowsePath */
 1133|    302|    UA_String rpstr = UA_STRING_NULL;
 1134|    302|    UA_assert(rpstr.data == NULL && rpstr.length == 0); /* pacify clang scan-build */
  ------------------
  |  |  397|    302|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (1134:5): [True: 302, False: 0]
  |  Branch (1134:5): [True: 302, False: 0]
  ------------------
 1135|    302|    res |= printRelativePath(&ao->browsePath, &rpstr, UA_ESCAPING_PERCENT_EXTENDED);
 1136|    302|    res |= UA_String_append(&tmp, rpstr);
 1137|    302|    UA_String_clear(&rpstr);
 1138|       |
 1139|       |    /* Print the attribute name */
 1140|    302|    if(ao->attributeId != UA_ATTRIBUTEID_VALUE) {
  ------------------
  |  Branch (1140:8): [True: 0, False: 302]
  ------------------
 1141|      0|        const char *attrName= UA_AttributeId_name((UA_AttributeId)ao->attributeId);
 1142|      0|        res |= UA_String_append(&tmp, UA_STRING("#"));
 1143|      0|        res |= UA_String_append(&tmp, UA_STRING((char*)(uintptr_t)attrName));
 1144|      0|    }
 1145|       |
 1146|       |    /* Print the IndexRange */
 1147|    302|    if(ao->indexRange.length > 0) {
  ------------------
  |  Branch (1147:8): [True: 22, False: 280]
  ------------------
 1148|     22|        res |= UA_String_append(&tmp, UA_STRING("["));
 1149|     22|        res |= UA_String_append(&tmp, ao->indexRange);
 1150|     22|        res |= UA_String_append(&tmp, UA_STRING("]"));
 1151|     22|    }
 1152|       |
 1153|       |    /* Encoding failed, clean up */
 1154|    302|    if(res != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   16|    302|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1154:8): [True: 0, False: 302]
  ------------------
 1155|      0|        UA_String_clear(&tmp);
 1156|      0|        return res;
 1157|      0|    }
 1158|       |
 1159|    302|    return moveTmpToOut(&tmp, out);
 1160|    302|}
ua_util.c:isHex:
  791|  19.0M|isHex(u8 c) {
  792|  19.0M|    return ((c >= 'a' && c <= 'f') ||
  ------------------
  |  Branch (792:14): [True: 97.3k, False: 18.9M]
  |  Branch (792:26): [True: 97.2k, False: 21]
  ------------------
  793|  18.9M|            (c >= 'A' && c <= 'F') ||
  ------------------
  |  Branch (793:14): [True: 84, False: 18.9M]
  |  Branch (793:26): [True: 62, False: 22]
  ------------------
  794|  18.9M|            (c >= '0' && c <= '9'));
  ------------------
  |  Branch (794:14): [True: 18.9M, False: 27]
  |  Branch (794:26): [True: 18.9M, False: 22]
  ------------------
  795|  19.0M|}
ua_util.c:printRelativePath:
  995|    302|printRelativePath(const UA_RelativePath *rp, UA_String *out, UA_Escaping esc) {
  996|    302|    UA_String tmp = UA_STRING_NULL;
  997|    302|    UA_StatusCode res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|    302|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  998|  75.8k|    for(size_t i = 0; i < rp->elementsSize && res == UA_STATUSCODE_GOOD; i++) {
  ------------------
  |  |   16|  75.5k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (998:23): [True: 75.5k, False: 302]
  |  Branch (998:47): [True: 75.5k, False: 0]
  ------------------
  999|       |        /* Print the reference type */
 1000|  75.5k|        UA_RelativePathElement *elm = &rp->elements[i];
 1001|  75.5k|        if(UA_NodeId_equal(&hierarchicalRefs, &elm->referenceTypeId) &&
  ------------------
  |  Branch (1001:12): [True: 72.3k, False: 3.17k]
  ------------------
 1002|  72.3k|           !elm->isInverse && elm->includeSubtypes) {
  ------------------
  |  Branch (1002:12): [True: 72.2k, False: 128]
  |  Branch (1002:31): [True: 72.1k, False: 128]
  ------------------
 1003|  72.1k|            res |= UA_String_append(&tmp, UA_STRING("/"));
 1004|  72.1k|        } else if(esc == UA_ESCAPING_AND &&
  ------------------
  |  Branch (1004:19): [True: 0, False: 3.43k]
  ------------------
 1005|      0|                  UA_NodeId_equal(&aggregatesRefs, &elm->referenceTypeId) &&
  ------------------
  |  Branch (1005:19): [True: 0, False: 0]
  ------------------
 1006|      0|                  !elm->isInverse && elm->includeSubtypes) {
  ------------------
  |  Branch (1006:19): [True: 0, False: 0]
  |  Branch (1006:38): [True: 0, False: 0]
  ------------------
 1007|      0|            res |= UA_String_append(&tmp, UA_STRING("."));
 1008|  3.43k|        } else {
 1009|  3.43k|            res |= UA_String_append(&tmp, UA_STRING("<"));
 1010|  3.43k|            if(!elm->includeSubtypes)
  ------------------
  |  Branch (1010:16): [True: 128, False: 3.30k]
  ------------------
 1011|    128|                res |= UA_String_append(&tmp, UA_STRING("#"));
 1012|  3.43k|            if(elm->isInverse)
  ------------------
  |  Branch (1012:16): [True: 166, False: 3.26k]
  ------------------
 1013|    166|                res |= UA_String_append(&tmp, UA_STRING("!"));
 1014|  3.43k|            if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   16|  3.43k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1014:16): [True: 0, False: 3.43k]
  ------------------
 1015|      0|                break;
 1016|       |
 1017|  3.43k|            UA_Byte bnBuf[512];
 1018|  3.43k|            UA_String bnBufStr = {512, bnBuf};
 1019|  3.43k|            res = getRefTypeBrowseName(&elm->referenceTypeId, &bnBufStr);
 1020|  3.43k|            if(res != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   16|  3.43k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1020:16): [True: 806, False: 2.62k]
  ------------------
 1021|    806|                UA_String_init(&bnBufStr);
 1022|    806|                res = getRefTypeBrowseName(&elm->referenceTypeId, &bnBufStr);
 1023|    806|                if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   16|    806|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1023:20): [True: 0, False: 806]
  ------------------
 1024|      0|                    break;
 1025|    806|            }
 1026|  3.43k|            res |= UA_String_escapeAppend(&tmp, bnBufStr, esc);
 1027|  3.43k|            res |= UA_String_append(&tmp, UA_STRING(">"));
 1028|  3.43k|            if(bnBufStr.data != bnBuf)
  ------------------
  |  Branch (1028:16): [True: 806, False: 2.62k]
  ------------------
 1029|    806|                UA_String_clear(&bnBufStr);
 1030|  3.43k|        }
 1031|       |
 1032|       |        /* Print the qualified name */
 1033|  75.5k|        UA_QualifiedName *qn = &elm->targetName;
 1034|  75.5k|        if(qn->namespaceIndex > 0) {
  ------------------
  |  Branch (1034:12): [True: 16, False: 75.5k]
  ------------------
 1035|     16|            char nsStr[8]; /* Enough for a uint16 */
 1036|     16|            itoaUnsigned(qn->namespaceIndex, nsStr, 10);
 1037|     16|            res |= UA_String_append(&tmp, UA_STRING(nsStr));
 1038|     16|            res |= UA_String_append(&tmp, UA_STRING(":"));
 1039|     16|        }
 1040|  75.5k|        res |= UA_String_escapeAppend(&tmp, qn->name, esc);
 1041|  75.5k|    }
 1042|       |
 1043|       |    /* Encoding failed, clean up */
 1044|    302|    if(res != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   16|    302|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1044:8): [True: 0, False: 302]
  ------------------
 1045|      0|        UA_String_clear(&tmp);
 1046|      0|        return res;
 1047|      0|    }
 1048|       |
 1049|    302|    return moveTmpToOut(&tmp, out);
 1050|    302|}
ua_util.c:moveTmpToOut:
  958|    604|moveTmpToOut(UA_String *tmp, UA_String *out) {
  959|       |    /* Output has zero length */
  960|    604|    if(tmp->length == 0) {
  ------------------
  |  Branch (960:8): [True: 22, False: 582]
  ------------------
  961|     22|        UA_assert(tmp->data == NULL);
  ------------------
  |  |  397|     22|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (961:9): [True: 22, False: 0]
  ------------------
  962|     22|        if(out->data == NULL)
  ------------------
  |  Branch (962:12): [True: 22, False: 0]
  ------------------
  963|     22|            out->data = (UA_Byte*)UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  755|     22|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  964|     22|        out->length = 0;
  965|     22|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|     22|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  966|     22|    }
  967|       |
  968|       |    /* No output buffer provided, return the tmp buffer */
  969|    582|    if(out->length == 0) {
  ------------------
  |  Branch (969:8): [True: 582, False: 0]
  ------------------
  970|    582|        *out = *tmp;
  971|    582|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|    582|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  972|    582|    }
  973|       |
  974|       |    /* The provided buffer is too short */
  975|      0|    if(out->length < tmp->length) {
  ------------------
  |  Branch (975:8): [True: 0, False: 0]
  ------------------
  976|      0|        UA_String_clear(tmp);
  977|      0|        return UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED;
  ------------------
  |  |   46|      0|#define UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED ((UA_StatusCode) 0x80080000)
  ------------------
  978|      0|    }
  979|       |
  980|       |    /* Copy output to the provided buffer */
  981|      0|    memcpy(out->data, tmp->data, tmp->length);
  982|      0|    out->length = tmp->length;
  983|      0|    UA_String_clear(tmp);
  984|      0|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   16|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  985|      0|}

ua_util.c:isReservedPercent:
   95|  81.0M|isReservedPercent(u8 c) {
   96|  81.0M|    return (c == ';'  || c == '%' || c <= ' ' || c == 127);
  ------------------
  |  Branch (96:13): [True: 9.09k, False: 81.0M]
  |  Branch (96:26): [True: 5.20k, False: 81.0M]
  |  Branch (96:38): [True: 74.5M, False: 6.46M]
  |  Branch (96:50): [True: 240, False: 6.46M]
  ------------------
   97|  81.0M|}
ua_util.c:isReservedPercentExtended:
  100|  81.0M|isReservedPercentExtended(u8 c) {
  101|  81.0M|    return (isReservedPercent(c) || c == ':' || c == '#' || c == '[' || c == ']' ||
  ------------------
  |  Branch (101:13): [True: 74.5M, False: 6.46M]
  |  Branch (101:37): [True: 3.68k, False: 6.45M]
  |  Branch (101:49): [True: 3.01k, False: 6.45M]
  |  Branch (101:61): [True: 1.91k, False: 6.45M]
  |  Branch (101:73): [True: 13.7k, False: 6.43M]
  ------------------
  102|  6.43M|            c == '&' || c == '(' || c == ')' || c == ',' || c == '<' || c == '>' ||
  ------------------
  |  Branch (102:13): [True: 353k, False: 6.08M]
  |  Branch (102:25): [True: 173k, False: 5.91M]
  |  Branch (102:37): [True: 191k, False: 5.72M]
  |  Branch (102:49): [True: 46.4k, False: 5.67M]
  |  Branch (102:61): [True: 12.1k, False: 5.66M]
  |  Branch (102:73): [True: 0, False: 5.66M]
  ------------------
  103|  5.66M|            c == '`' || c == '/' || c == '\\' || c == '"' || c == '\'' );
  ------------------
  |  Branch (103:13): [True: 7.89k, False: 5.65M]
  |  Branch (103:25): [True: 637k, False: 5.01M]
  |  Branch (103:37): [True: 4.10k, False: 5.01M]
  |  Branch (103:50): [True: 6.46k, False: 5.00M]
  |  Branch (103:62): [True: 4.43k, False: 5.00M]
  ------------------
  104|  81.0M|}
ua_types_lex.c:isReservedPercentExtended:
  100|   800k|isReservedPercentExtended(u8 c) {
  101|   800k|    return (isReservedPercent(c) || c == ':' || c == '#' || c == '[' || c == ']' ||
  ------------------
  |  Branch (101:13): [True: 11, False: 800k]
  |  Branch (101:37): [True: 1, False: 800k]
  |  Branch (101:49): [True: 0, False: 800k]
  |  Branch (101:61): [True: 4, False: 800k]
  |  Branch (101:73): [True: 0, False: 800k]
  ------------------
  102|   800k|            c == '&' || c == '(' || c == ')' || c == ',' || c == '<' || c == '>' ||
  ------------------
  |  Branch (102:13): [True: 0, False: 800k]
  |  Branch (102:25): [True: 0, False: 800k]
  |  Branch (102:37): [True: 0, False: 800k]
  |  Branch (102:49): [True: 0, False: 800k]
  |  Branch (102:61): [True: 4.40k, False: 796k]
  |  Branch (102:73): [True: 0, False: 796k]
  ------------------
  103|   796k|            c == '`' || c == '/' || c == '\\' || c == '"' || c == '\'' );
  ------------------
  |  Branch (103:13): [True: 1, False: 796k]
  |  Branch (103:25): [True: 72.9k, False: 723k]
  |  Branch (103:37): [True: 0, False: 723k]
  |  Branch (103:50): [True: 0, False: 723k]
  |  Branch (103:62): [True: 0, False: 723k]
  ------------------
  104|   800k|}
ua_types_lex.c:isReservedPercent:
   95|   800k|isReservedPercent(u8 c) {
   96|   800k|    return (c == ';'  || c == '%' || c <= ' ' || c == 127);
  ------------------
  |  Branch (96:13): [True: 0, False: 800k]
  |  Branch (96:26): [True: 0, False: 800k]
  |  Branch (96:38): [True: 11, False: 800k]
  |  Branch (96:50): [True: 0, False: 800k]
  ------------------
   97|   800k|}

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

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

fuzz_attributeoperand.cc:_ZL24UA_AttributeOperand_initP19UA_AttributeOperand:
  241|    289|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
fuzz_attributeoperand.cc:_ZL15UA_String_equalPK9UA_StringS1_:
  241|    151|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
fuzz_attributeoperand.cc:_ZL15UA_String_clearP9UA_String:
  241|    302|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
fuzz_attributeoperand.cc:_ZL25UA_AttributeOperand_clearP19UA_AttributeOperand:
  241|    302|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types.c:UA_ByteString_init:
  241|    806|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_util.c:UA_String_init:
  241|    806|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_util.c:UA_String_equal:
  241|  3.17k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_util.c:UA_String_clear:
  241|  1.10k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_util.c:UA_NodeId_equal:
  241|  75.8k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_String_copy:
  241|  81.4k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_QualifiedName_clear:
  241|    648|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_RelativePath_init:
  241|    424|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_RelativePathElement_init:
  241|  77.6k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_RelativePathElement_clear:
  241|      6|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_AttributeOperand_init:
  241|    440|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_QualifiedName_init:
  241|  78.1k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_AttributeOperand_clear:
  241|    138|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl

