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

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

UA_STRING:
  223|  8.52k|UA_STRING(char *chars) {
  224|  8.52k|    UA_String s = {0, NULL};
  225|  8.52k|    if(!chars)
  ------------------
  |  Branch (225:8): [True: 0, False: 8.52k]
  ------------------
  226|      0|        return s;
  227|  8.52k|    s.length = strlen(chars);
  228|  8.52k|    s.data = (UA_Byte*)chars;
  229|  8.52k|    return s;
  230|  8.52k|}
UA_String_append:
  302|  8.96k|UA_String_append(UA_String *s, const UA_String s2) {
  303|  8.96k|    if(s2.length == 0)
  ------------------
  |  Branch (303:8): [True: 34, False: 8.93k]
  ------------------
  304|     34|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     34|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  305|  8.93k|    UA_Byte *buf = (UA_Byte*)
  306|  8.93k|        UA_realloc((void*)((uintptr_t)s->data & ~(uintptr_t)UA_EMPTY_ARRAY_SENTINEL),
  ------------------
  |  |   21|  8.93k|#define UA_realloc(ptr, size) UA_reallocSingleton(ptr, size)
  ------------------
  307|  8.93k|                   s->length + s2.length);
  308|  8.93k|    if(!buf)
  ------------------
  |  Branch (308:8): [True: 0, False: 8.93k]
  ------------------
  309|      0|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
  310|  8.93k|    memcpy(buf + s->length, s2.data, s2.length);
  311|  8.93k|    s->data = buf;
  312|  8.93k|    s->length += s2.length;
  313|  8.93k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  8.93k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  314|  8.93k|}
UA_ByteString_allocBuffer:
  762|  1.28k|UA_ByteString_allocBuffer(UA_ByteString *bs, size_t length) {
  763|  1.28k|    UA_ByteString_init(bs);
  764|  1.28k|    if(length == 0) {
  ------------------
  |  Branch (764:8): [True: 0, False: 1.28k]
  ------------------
  765|      0|        bs->data = (u8*)UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|      0|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  766|      0|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  767|      0|    }
  768|  1.28k|    bs->data = (u8*)UA_calloc(1,length);
  ------------------
  |  |   20|  1.28k|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
  769|  1.28k|    if(UA_UNLIKELY(!bs->data))
  ------------------
  |  |  579|  1.28k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  ------------------
  |  |  |  Branch (579:25): [True: 0, False: 1.28k]
  |  |  ------------------
  ------------------
  770|      0|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
  771|  1.28k|    bs->length = length;
  772|  1.28k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  1.28k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  773|  1.28k|}
UA_NODEID_NUMERIC:
  835|  1.39k|UA_NODEID_NUMERIC(UA_UInt16 nsIndex, UA_UInt32 identifier) {
  836|  1.39k|    UA_NodeId id;
  837|  1.39k|    memset(&id, 0, sizeof(UA_NodeId));
  838|  1.39k|    id.namespaceIndex = nsIndex;
  839|  1.39k|    id.identifierType = UA_NODEIDTYPE_NUMERIC;
  840|  1.39k|    id.identifier.numeric = identifier;
  841|  1.39k|    return id;
  842|  1.39k|}
nodeId_printEscape:
 1029|  4.76k|                   const UA_NamespaceMapping *nsMapping, UA_Escaping idEsc) {
 1030|       |    /* Try to map the NamespaceIndex to the Uri */
 1031|  4.76k|    UA_String nsUri = UA_STRING_NULL;
 1032|  4.76k|    if(id->namespaceIndex > 0 && nsMapping)
  ------------------
  |  Branch (1032:8): [True: 78, False: 4.68k]
  |  Branch (1032:34): [True: 0, False: 78]
  ------------------
 1033|      0|        UA_NamespaceMapping_index2Uri(nsMapping, id->namespaceIndex, &nsUri);
 1034|       |
 1035|       |    /* Compute the string length and print numerical identifiers. */
 1036|  4.76k|    u8 nsStr[7];
 1037|  4.76k|    u8 numIdStr[12];
 1038|  4.76k|    size_t idLen = nodeIdSize(id, nsStr, numIdStr, nsUri, idEsc);
 1039|  4.76k|    if(idLen == 0)
  ------------------
  |  Branch (1039:8): [True: 0, False: 4.76k]
  ------------------
 1040|      0|        return UA_STATUSCODE_BADINTERNALERROR;
  ------------------
  |  |   29|      0|#define UA_STATUSCODE_BADINTERNALERROR ((UA_StatusCode) 0x80020000)
  ------------------
 1041|       |
 1042|       |    /* Allocate memory if required */
 1043|  4.76k|    if(output->length == 0) {
  ------------------
  |  Branch (1043:8): [True: 1.28k, False: 3.48k]
  ------------------
 1044|  1.28k|        UA_StatusCode res = UA_ByteString_allocBuffer((UA_ByteString*)output, idLen);
 1045|  1.28k|        if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  1.28k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1045:12): [True: 0, False: 1.28k]
  ------------------
 1046|      0|            return res;
 1047|  3.48k|    } else {
 1048|  3.48k|        if(output->length < idLen)
  ------------------
  |  Branch (1048:12): [True: 1.28k, False: 2.20k]
  ------------------
 1049|  1.28k|            return UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED;
  ------------------
  |  |   47|  1.28k|#define UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED ((UA_StatusCode) 0x80080000)
  ------------------
 1050|  2.20k|        output->length = idLen;
 1051|  2.20k|    }
 1052|       |
 1053|       |    /* Print the NodeId */
 1054|  3.48k|    u8 *pos = printNodeIdBody(id, nsUri, nsStr, numIdStr, output->data, nsMapping, idEsc);
 1055|  3.48k|    output->length = (size_t)(pos - output->data);
 1056|  3.48k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  3.48k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1057|  4.76k|}
UA_NodeId_printEx:
 1061|  4.63k|                  const UA_NamespaceMapping *nsMapping) {
 1062|  4.63k|    return nodeId_printEscape(id, output, nsMapping, UA_ESCAPING_NONE);
 1063|  4.63k|}
UA_NodeId_print:
 1066|  4.63k|UA_NodeId_print(const UA_NodeId *id, UA_String *output) {
 1067|       |    return UA_NodeId_printEx(id, output, NULL);
 1068|  4.63k|}
UA_copy:
 2104|  9.70k|UA_copy(const void *src, void *dst, const UA_DataType *type) {
 2105|  9.70k|    memset(dst, 0, type->memSize); /* init */
 2106|  9.70k|    UA_StatusCode retval = copyJumpTable[type->typeKind](src, dst, type);
 2107|  9.70k|    if(retval != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  9.70k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2107:8): [True: 33, False: 9.67k]
  ------------------
 2108|     33|        UA_clear(dst, type);
 2109|  9.70k|    return retval;
 2110|  9.70k|}
UA_clear:
 2207|  8.37k|UA_clear(void *p, const UA_DataType *type) {
 2208|  8.37k|    clearJumpTable[type->typeKind](p, type);
 2209|  8.37k|    memset(p, 0, type->memSize); /* init */
 2210|  8.37k|}
UA_order:
 2681|  7.88k|UA_Order UA_order(const void *p1, const void *p2, const UA_DataType *type) {
 2682|  7.88k|    return orderJumpTable[type->typeKind](p1, p2, type);
 2683|  7.88k|}
UA_equal:
 2686|    135|UA_equal(const void *p1, const void *p2, const UA_DataType *type) {
 2687|    135|    return (UA_order(p1, p2, type) == UA_ORDER_EQ);
 2688|    135|}
UA_Array_copy:
 2707|  9.70k|              void **dst, const UA_DataType *type) {
 2708|  9.70k|    if(size == 0) {
  ------------------
  |  Branch (2708:8): [True: 4.50k, False: 5.20k]
  ------------------
 2709|  4.50k|        if(src == NULL)
  ------------------
  |  Branch (2709:12): [True: 0, False: 4.50k]
  ------------------
 2710|      0|            *dst = NULL;
 2711|  4.50k|        else
 2712|  4.50k|            *dst= UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|  4.50k|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
 2713|  4.50k|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  4.50k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2714|  4.50k|    }
 2715|       |
 2716|       |    /* Check the array consistency -- defensive programming in case the user
 2717|       |     * manually created an inconsistent array */
 2718|  5.20k|    if(UA_UNLIKELY(!type || !src))
  ------------------
  |  |  579|  10.4k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  ------------------
  |  |  |  Branch (579:25): [True: 0, False: 5.20k]
  |  |  |  Branch (579:43): [True: 0, False: 5.20k]
  |  |  |  Branch (579:43): [True: 0, False: 5.20k]
  |  |  ------------------
  ------------------
 2719|      0|        return UA_STATUSCODE_BADINTERNALERROR;
  ------------------
  |  |   29|      0|#define UA_STATUSCODE_BADINTERNALERROR ((UA_StatusCode) 0x80020000)
  ------------------
 2720|       |
 2721|  5.20k|    if(size > SIZE_MAX / type->memSize)
  ------------------
  |  Branch (2721:8): [True: 0, False: 5.20k]
  ------------------
 2722|      0|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 2723|  5.20k|    size_t byteSize = size * type->memSize;
 2724|       |
 2725|       |    /* calloc, so we don't have to check retval in every iteration of copying */
 2726|  5.20k|    *dst = UA_calloc(size, type->memSize);
  ------------------
  |  |   20|  5.20k|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
 2727|  5.20k|    if(!*dst)
  ------------------
  |  Branch (2727:8): [True: 33, False: 5.17k]
  ------------------
 2728|     33|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|     33|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 2729|       |
 2730|  5.17k|    if(type->pointerFree) {
  ------------------
  |  Branch (2730:8): [True: 5.17k, False: 0]
  ------------------
 2731|  5.17k|        memcpy(*dst, src, byteSize);
 2732|  5.17k|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  5.17k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2733|  5.17k|    }
 2734|       |
 2735|      0|    uintptr_t ptrs = (uintptr_t)src;
 2736|      0|    uintptr_t ptrd = (uintptr_t)*dst;
 2737|      0|    UA_StatusCode retval = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2738|      0|    for(size_t i = 0; i < size; ++i) {
  ------------------
  |  Branch (2738:23): [True: 0, False: 0]
  ------------------
 2739|      0|        retval |= UA_copy((void*)ptrs, (void*)ptrd, type);
 2740|      0|        ptrs += type->memSize;
 2741|      0|        ptrd += type->memSize;
 2742|      0|    }
 2743|      0|    if(retval != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2743:8): [True: 0, False: 0]
  ------------------
 2744|      0|        UA_Array_delete(*dst, size, type);
 2745|       |        *dst = NULL;
 2746|      0|    }
 2747|      0|    return retval;
 2748|  5.17k|}
UA_Array_delete:
 2850|  13.5k|UA_Array_delete(void *p, size_t size, const UA_DataType *type) {
 2851|  13.5k|    if(!type->pointerFree) {
  ------------------
  |  Branch (2851:8): [True: 395, False: 13.1k]
  ------------------
 2852|    395|        uintptr_t ptr = (uintptr_t)p;
 2853|  5.76k|        for(size_t i = 0; i < size; ++i) {
  ------------------
  |  Branch (2853:27): [True: 5.36k, False: 395]
  ------------------
 2854|  5.36k|            UA_clear((void*)ptr, type);
 2855|  5.36k|            ptr += type->memSize;
 2856|  5.36k|        }
 2857|    395|    }
 2858|  13.5k|    UA_free((void*)((uintptr_t)p & ~(uintptr_t)UA_EMPTY_ARRAY_SENTINEL));
  ------------------
  |  |   19|  13.5k|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 2859|  13.5k|}
ua_types.c:nodeIdSize:
  928|  4.76k|           UA_Escaping idEsc) {
  929|       |    /* Namespace length */
  930|  4.76k|    size_t len = 0;
  931|  4.76k|    if(nsUri.data != NULL) {
  ------------------
  |  Branch (931:8): [True: 0, False: 4.76k]
  ------------------
  932|      0|        len += 5; /* nsu=; */
  933|      0|        len += UA_String_escapedSize(nsUri, UA_ESCAPING_PERCENT);
  934|  4.76k|    } else if(id->namespaceIndex > 0) {
  ------------------
  |  Branch (934:15): [True: 78, False: 4.68k]
  ------------------
  935|     78|        len += 4; /* ns=; */
  936|     78|        size_t nsStrSize = itoaUnsigned(id->namespaceIndex, (char*)nsStr, 10);
  937|     78|        nsStr[nsStrSize] = 0;
  938|     78|        len += nsStrSize;
  939|     78|    }
  940|       |
  941|  4.76k|    len += 2; /* ?= */
  942|       |
  943|  4.76k|    switch (id->identifierType) {
  944|    114|    case UA_NODEIDTYPE_NUMERIC: {
  ------------------
  |  Branch (944:5): [True: 114, False: 4.65k]
  ------------------
  945|    114|        size_t numIdStrSize = itoaUnsigned(id->identifier.numeric, (char*)numIdStr, 10);
  946|    114|        numIdStr[numIdStrSize] = 0;
  947|    114|        len += numIdStrSize;
  948|    114|        break;
  949|      0|    }
  950|  3.93k|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (950:5): [True: 3.93k, False: 834]
  ------------------
  951|  3.93k|        len += UA_String_escapedSize(id->identifier.string, idEsc);
  952|  3.93k|        break;
  953|      0|    case UA_NODEIDTYPE_GUID:
  ------------------
  |  Branch (953:5): [True: 0, False: 4.76k]
  ------------------
  954|      0|        len += 36;
  955|      0|        break;
  956|    720|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (956:5): [True: 720, False: 4.04k]
  ------------------
  957|    720|        len += 4 * ((id->identifier.byteString.length + 2) / 3);
  958|    720|        break;
  959|      0|    default:
  ------------------
  |  Branch (959:5): [True: 0, False: 4.76k]
  ------------------
  960|      0|        len = 0;
  961|  4.76k|    }
  962|  4.76k|    return len;
  963|  4.76k|}
ua_types.c:printNodeIdBody:
  967|  3.48k|                const UA_NamespaceMapping *nsMapping, UA_Escaping idEsc) {
  968|  3.48k|    size_t len;
  969|       |
  970|       |    /* Encode the namespace */
  971|  3.48k|    if(nsUri.data != NULL) {
  ------------------
  |  Branch (971:8): [True: 0, False: 3.48k]
  ------------------
  972|      0|        memcpy(pos, "nsu=", 4);
  973|      0|        pos += 4;
  974|      0|        pos += UA_String_escapeInsert(pos, nsUri, UA_ESCAPING_PERCENT);
  975|      0|        *pos++ = ';';
  976|  3.48k|    } else if(id->namespaceIndex > 0) {
  ------------------
  |  Branch (976:15): [True: 78, False: 3.40k]
  ------------------
  977|     78|        memcpy(pos, "ns=", 3);
  978|     78|        pos += 3;
  979|     78|        len = strlen((char*)nsStr);
  980|     78|        memcpy(pos, nsStr, len);
  981|     78|        pos += len;
  982|     78|        *pos++ = ';';
  983|     78|    }
  984|       |
  985|       |    /* Encode the identifier */
  986|  3.48k|    switch(id->identifierType) {
  ------------------
  |  Branch (986:12): [True: 3.48k, False: 0]
  ------------------
  987|    114|    case UA_NODEIDTYPE_NUMERIC:
  ------------------
  |  Branch (987:5): [True: 114, False: 3.37k]
  ------------------
  988|    114|        memcpy(pos, "i=", 2);
  989|    114|        pos += 2;
  990|    114|        len = strlen((char*)numIdStr);
  991|    114|        memcpy(pos, numIdStr, len);
  992|    114|        pos += len;
  993|    114|        break;
  994|  2.65k|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (994:5): [True: 2.65k, False: 834]
  ------------------
  995|  2.65k|        memcpy(pos, "s=", 2);
  996|  2.65k|        pos += 2;
  997|  2.65k|        pos += UA_String_escapeInsert(pos, id->identifier.string, idEsc);
  998|  2.65k|        break;
  999|      0|    case UA_NODEIDTYPE_GUID:
  ------------------
  |  Branch (999:5): [True: 0, False: 3.48k]
  ------------------
 1000|      0|        memcpy(pos, "g=", 2);
 1001|      0|        pos += 2;
 1002|      0|        UA_Guid_to_hex(&id->identifier.guid, pos, true);
 1003|      0|        pos += 36;
 1004|      0|        break;
 1005|    720|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (1005:5): [True: 720, False: 2.76k]
  ------------------
 1006|    720|        memcpy(pos, "b=", 2);
 1007|    720|        pos += 2;
 1008|       |        /* Use base64url encoding for percent-escaping.
 1009|       |         * Replace +/ with -_ and remove the padding. */
 1010|    720|        u8 *bpos = pos;
 1011|    720|        pos += UA_base64_buf(id->identifier.byteString.data,
 1012|    720|                             id->identifier.byteString.length, pos);
 1013|    720|        if(idEsc == UA_ESCAPING_PERCENT ||
  ------------------
  |  Branch (1013:12): [True: 0, False: 720]
  ------------------
 1014|    720|           idEsc == UA_ESCAPING_PERCENT_EXTENDED) {
  ------------------
  |  Branch (1014:12): [True: 0, False: 720]
  ------------------
 1015|      0|            while(pos > bpos && pos[-1] == '=')
  ------------------
  |  Branch (1015:19): [True: 0, False: 0]
  |  Branch (1015:33): [True: 0, False: 0]
  ------------------
 1016|      0|                pos--;
 1017|      0|            for(; bpos < pos; bpos++) {
  ------------------
  |  Branch (1017:19): [True: 0, False: 0]
  ------------------
 1018|      0|                if(*bpos == '+') *bpos = '-';
  ------------------
  |  Branch (1018:20): [True: 0, False: 0]
  ------------------
 1019|      0|                else if(*bpos == '/') *bpos = '_';
  ------------------
  |  Branch (1019:25): [True: 0, False: 0]
  ------------------
 1020|      0|            }
 1021|      0|        }
 1022|    720|        break;
 1023|  3.48k|    }
 1024|  3.48k|    return pos;
 1025|  3.48k|}
ua_types.c:String_copy:
  284|  9.70k|String_copy(const void *src, void *dst, const UA_DataType *_) {
  285|  9.70k|    const UA_String *srcS = (const UA_String*)src;
  286|  9.70k|    UA_String *dstS = (UA_String *)dst;
  287|  9.70k|    UA_StatusCode res =
  288|  9.70k|        UA_Array_copy(srcS->data, srcS->length, (void**)&dstS->data,
  289|  9.70k|                      &UA_TYPES[UA_TYPES_BYTE]);
  ------------------
  |  |   96|  9.70k|#define UA_TYPES_BYTE 2
  ------------------
  290|  9.70k|    if(res == UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  9.70k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (290:8): [True: 9.67k, False: 33]
  ------------------
  291|  9.67k|        dstS->length = srcS->length;
  292|  9.70k|    return res;
  293|  9.70k|}
ua_types.c:nopClear:
 2169|  11.2k|static void nopClear(void *p, const UA_DataType *type) { }
ua_types.c:String_clear:
  296|  13.1k|String_clear(void *p, const UA_DataType *_) {
  297|  13.1k|    UA_String *s = (UA_String*)p;
  298|  13.1k|    UA_Array_delete(s->data, s->length, &UA_TYPES[UA_TYPES_BYTE]);
  ------------------
  |  |   96|  13.1k|#define UA_TYPES_BYTE 2
  ------------------
  299|  13.1k|}
ua_types.c:NodeId_clear:
  777|  5.84k|NodeId_clear(void *p, const UA_DataType *_) {
  778|  5.84k|    UA_NodeId *id = (UA_NodeId*)p;
  779|  5.84k|    switch(id->identifierType) {
  780|  3.62k|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (780:5): [True: 3.62k, False: 2.22k]
  ------------------
  781|  4.36k|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (781:5): [True: 749, False: 5.09k]
  ------------------
  782|  4.36k|        String_clear(&id->identifier.string, NULL);
  783|  4.36k|        break;
  784|  1.47k|    default: break;
  ------------------
  |  Branch (784:5): [True: 1.47k, False: 4.36k]
  ------------------
  785|  5.84k|    }
  786|  5.84k|}
ua_types.c:QualifiedName_clear:
  402|  6.12k|QualifiedName_clear(void *p, const UA_DataType *_) {
  403|  6.12k|    UA_QualifiedName *qn = (UA_QualifiedName*)p;
  404|       |    String_clear(&qn->name, NULL);
  405|  6.12k|}
ua_types.c:clearStructure:
 2113|  6.23k|clearStructure(void *p, const UA_DataType *type) {
 2114|  6.23k|    uintptr_t ptr = (uintptr_t)p;
 2115|  30.3k|    for(size_t i = 0; i < type->membersSize; ++i) {
  ------------------
  |  Branch (2115:23): [True: 24.1k, False: 6.23k]
  ------------------
 2116|  24.1k|        const UA_DataTypeMember *m = &type->members[i];
 2117|  24.1k|        const UA_DataType *mt = m->memberType;
 2118|  24.1k|        ptr += m->padding;
 2119|  24.1k|        if(!m->isOptional) {
  ------------------
  |  Branch (2119:12): [True: 24.1k, False: 0]
  ------------------
 2120|  24.1k|            if(!m->isArray) {
  ------------------
  |  Branch (2120:16): [True: 23.7k, False: 395]
  ------------------
 2121|  23.7k|                clearJumpTable[mt->typeKind]((void*)ptr, mt);
 2122|  23.7k|                ptr += mt->memSize;
 2123|  23.7k|            } else {
 2124|    395|                size_t length = *(size_t*)ptr;
 2125|    395|                ptr += sizeof(size_t);
 2126|    395|                UA_Array_delete(*(void**)ptr, length, mt);
 2127|    395|                ptr += sizeof(void*);
 2128|    395|            }
 2129|  24.1k|        } else { /* field is optional */
 2130|      0|            if(!m->isArray) {
  ------------------
  |  Branch (2130:16): [True: 0, False: 0]
  ------------------
 2131|       |                /* optional scalar field is contained */
 2132|      0|                if((*(void *const *)ptr != NULL))
  ------------------
  |  Branch (2132:20): [True: 0, False: 0]
  ------------------
 2133|      0|                    UA_Array_delete(*(void **)ptr, 1, mt);
 2134|      0|                ptr += sizeof(void *);
 2135|      0|            } else {
 2136|       |                /* optional array field is contained */
 2137|      0|                if((*(void *const *)(ptr + sizeof(size_t)) != NULL)) {
  ------------------
  |  Branch (2137:20): [True: 0, False: 0]
  ------------------
 2138|      0|                    size_t length = *(size_t *)ptr;
 2139|      0|                    ptr += sizeof(size_t);
 2140|      0|                    UA_Array_delete(*(void **)ptr, length, mt);
 2141|      0|                    ptr += sizeof(void *);
 2142|      0|                } else { /* optional array field not contained */
 2143|      0|                    ptr += sizeof(size_t);
 2144|      0|                    ptr += sizeof(void *);
 2145|      0|                }
 2146|      0|            }
 2147|      0|        }
 2148|  24.1k|    }
 2149|  6.23k|}
ua_types.c:nodeIdOrder:
 2299|  6.61k|nodeIdOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2300|  6.61k|    const UA_NodeId *p1 = (const UA_NodeId*)p1_;
 2301|  6.61k|    const UA_NodeId *p2 = (const UA_NodeId*)p2_;
 2302|       |    /* Compare namespaceIndex */
 2303|  6.61k|    if(p1->namespaceIndex != p2->namespaceIndex)
  ------------------
  |  Branch (2303:8): [True: 78, False: 6.53k]
  ------------------
 2304|     78|        return (p1->namespaceIndex < p2->namespaceIndex) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2304:16): [True: 78, False: 0]
  ------------------
 2305|       |
 2306|       |    /* Compare identifierType */
 2307|  6.53k|    if(p1->identifierType != p2->identifierType)
  ------------------
  |  Branch (2307:8): [True: 3.37k, False: 3.16k]
  ------------------
 2308|  3.37k|        return (p1->identifierType < p2->identifierType) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2308:16): [True: 3.37k, False: 0]
  ------------------
 2309|       |
 2310|       |    /* Compare the identifier */
 2311|  3.16k|    switch(p1->identifierType) {
 2312|  1.47k|    case UA_NODEIDTYPE_NUMERIC:
  ------------------
  |  Branch (2312:5): [True: 1.47k, False: 1.68k]
  ------------------
 2313|  1.47k|    default:
  ------------------
  |  Branch (2313:5): [True: 0, False: 3.16k]
  ------------------
 2314|  1.47k|        if(p1->identifier.numeric != p2->identifier.numeric)
  ------------------
  |  Branch (2314:12): [True: 414, False: 1.06k]
  ------------------
 2315|    414|            return (p1->identifier.numeric < p2->identifier.numeric) ?
  ------------------
  |  Branch (2315:20): [True: 384, False: 30]
  ------------------
 2316|    384|                UA_ORDER_LESS : UA_ORDER_MORE;
 2317|  1.06k|        return UA_ORDER_EQ;
 2318|      0|    case UA_NODEIDTYPE_GUID:
  ------------------
  |  Branch (2318:5): [True: 0, False: 3.16k]
  ------------------
 2319|      0|        return guidOrder(&p1->identifier.guid, &p2->identifier.guid, NULL);
 2320|  1.32k|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (2320:5): [True: 1.32k, False: 1.83k]
  ------------------
 2321|  1.68k|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (2321:5): [True: 360, False: 2.80k]
  ------------------
 2322|       |        return stringOrder(&p1->identifier.string, &p2->identifier.string, NULL);
 2323|  3.16k|    }
 2324|  3.16k|}
ua_types.c:booleanOrder:
 2224|  4.13k|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2225|  4.13k|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2226|  4.13k|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2227|  4.13k|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2227:12): [True: 0, False: 4.13k]
  ------------------
 2228|  4.13k|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2228:20): [True: 0, False: 0]
  ------------------
 2229|  4.13k|        return UA_ORDER_EQ;                                               \
 2230|  4.13k|    }
ua_types.c:uInt32Order:
 2224|    135|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2225|    135|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2226|    135|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2227|    135|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2227:12): [True: 0, False: 135]
  ------------------
 2228|    135|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2228:20): [True: 0, False: 0]
  ------------------
 2229|    135|        return UA_ORDER_EQ;                                               \
 2230|    135|    }
ua_types.c:stringOrder:
 2282|  7.36k|stringOrder(const void *p1_, const void *p2_, const UA_DataType *type) {
 2283|  7.36k|    const UA_String *p1 = (const UA_String*)p1_;
 2284|  7.36k|    const UA_String *p2 = (const UA_String*)p2_;
 2285|  7.36k|    if(p1->length != p2->length)
  ------------------
  |  Branch (2285:8): [True: 2.59k, False: 4.77k]
  ------------------
 2286|  2.59k|        return (p1->length < p2->length) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2286:16): [True: 1.62k, False: 969]
  ------------------
 2287|       |    /* For zero-length arrays, every pointer not NULL is considered a
 2288|       |     * UA_EMPTY_ARRAY_SENTINEL. */
 2289|  4.77k|    if(p1->data == p2->data) return UA_ORDER_EQ;
  ------------------
  |  Branch (2289:8): [True: 2.33k, False: 2.43k]
  ------------------
 2290|  2.43k|    if(p1->data == NULL) return UA_ORDER_LESS;
  ------------------
  |  Branch (2290:8): [True: 0, False: 2.43k]
  ------------------
 2291|  2.43k|    if(p2->data == NULL) return UA_ORDER_MORE;
  ------------------
  |  Branch (2291:8): [True: 0, False: 2.43k]
  ------------------
 2292|  2.43k|    int cmp = memcmp((const char*)p1->data, (const char*)p2->data, p1->length);
 2293|  2.43k|    if(cmp != 0)
  ------------------
  |  Branch (2293:8): [True: 8, False: 2.43k]
  ------------------
 2294|      8|        return (cmp < 0) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2294:16): [True: 3, False: 5]
  ------------------
 2295|  2.43k|    return UA_ORDER_EQ;
 2296|  2.43k|}
ua_types.c:qualifiedNameOrder:
 2339|  2.06k|qualifiedNameOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2340|  2.06k|    const UA_QualifiedName *p1 = (const UA_QualifiedName*)p1_;
 2341|  2.06k|    const UA_QualifiedName *p2 = (const UA_QualifiedName*)p2_;
 2342|  2.06k|    if(p1->namespaceIndex != p2->namespaceIndex)
  ------------------
  |  Branch (2342:8): [True: 0, False: 2.06k]
  ------------------
 2343|      0|        return (p1->namespaceIndex < p2->namespaceIndex) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2343:16): [True: 0, False: 0]
  ------------------
 2344|  2.06k|    return stringOrder(&p1->name, &p2->name, NULL);
 2345|  2.06k|}
ua_types.c:arrayOrder:
 2408|    135|           const UA_DataType *type) {
 2409|    135|    if(p1Length != p2Length)
  ------------------
  |  Branch (2409:8): [True: 0, False: 135]
  ------------------
 2410|      0|        return (p1Length < p2Length) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2410:16): [True: 0, False: 0]
  ------------------
 2411|    135|    uintptr_t u1 = (uintptr_t)p1;
 2412|    135|    uintptr_t u2 = (uintptr_t)p2;
 2413|  2.20k|    for(size_t i = 0; i < p1Length; i++) {
  ------------------
  |  Branch (2413:23): [True: 2.06k, False: 135]
  ------------------
 2414|  2.06k|        UA_Order o = orderJumpTable[type->typeKind]((const void*)u1, (const void*)u2, type);
 2415|  2.06k|        if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2415:12): [True: 0, False: 2.06k]
  ------------------
 2416|      0|            return o;
 2417|  2.06k|        u1 += type->memSize;
 2418|  2.06k|        u2 += type->memSize;
 2419|  2.06k|    }
 2420|    135|    return UA_ORDER_EQ;
 2421|    135|}
ua_types.c:structureOrder:
 2562|  2.33k|structureOrder(const void *p1, const void *p2, const UA_DataType *type) {
 2563|  2.33k|    uintptr_t u1 = (uintptr_t)p1;
 2564|  2.33k|    uintptr_t u2 = (uintptr_t)p2;
 2565|  2.33k|    UA_Order o = UA_ORDER_EQ;
 2566|  11.4k|    for(size_t i = 0; i < type->membersSize; ++i) {
  ------------------
  |  Branch (2566:23): [True: 9.08k, False: 2.33k]
  ------------------
 2567|  9.08k|        const UA_DataTypeMember *m = &type->members[i];
 2568|  9.08k|        const UA_DataType *mt = m->memberType;
 2569|  9.08k|        u1 += m->padding;
 2570|  9.08k|        u2 += m->padding;
 2571|  9.08k|        if(!m->isOptional) {
  ------------------
  |  Branch (2571:12): [True: 9.08k, False: 0]
  ------------------
 2572|  9.08k|            if(!m->isArray) {
  ------------------
  |  Branch (2572:16): [True: 8.95k, False: 135]
  ------------------
 2573|  8.95k|                o = orderJumpTable[mt->typeKind]((const void *)u1, (const void *)u2, mt);
 2574|  8.95k|                u1 += mt->memSize;
 2575|  8.95k|                u2 += mt->memSize;
 2576|  8.95k|            } else {
 2577|    135|                size_t size1 = *(size_t*)u1;
 2578|    135|                size_t size2 = *(size_t*)u2;
 2579|    135|                u1 += sizeof(size_t);
 2580|    135|                u2 += sizeof(size_t);
 2581|    135|                o = arrayOrder(*(void* const*)u1, size1, *(void* const*)u2, size2, mt);
 2582|    135|                u1 += sizeof(void*);
 2583|    135|                u2 += sizeof(void*);
 2584|    135|            }
 2585|  9.08k|        } else {
 2586|      0|            if(!m->isArray) {
  ------------------
  |  Branch (2586:16): [True: 0, False: 0]
  ------------------
 2587|      0|                const void *pp1 = *(void* const*)u1;
 2588|      0|                const void *pp2 = *(void* const*)u2;
 2589|      0|                if(pp1 == pp2) {
  ------------------
  |  Branch (2589:20): [True: 0, False: 0]
  ------------------
 2590|      0|                    o = UA_ORDER_EQ;
 2591|      0|                } else if(pp1 == NULL) {
  ------------------
  |  Branch (2591:27): [True: 0, False: 0]
  ------------------
 2592|      0|                    o = UA_ORDER_LESS;
 2593|      0|                } else if(pp2 == NULL) {
  ------------------
  |  Branch (2593:27): [True: 0, False: 0]
  ------------------
 2594|      0|                    o = UA_ORDER_MORE;
 2595|      0|                } else {
 2596|      0|                    o = orderJumpTable[mt->typeKind](pp1, pp2, mt);
 2597|      0|                }
 2598|      0|            } else {
 2599|      0|                size_t sa1 = *(size_t*)u1;
 2600|      0|                size_t sa2 = *(size_t*)u2;
 2601|      0|                u1 += sizeof(size_t);
 2602|      0|                u2 += sizeof(size_t);
 2603|      0|                o = arrayOrder(*(void* const*)u1, sa1, *(void* const*)u2, sa2, mt);
 2604|      0|            }
 2605|      0|            u1 += sizeof(void*);
 2606|      0|            u2 += sizeof(void*);
 2607|      0|        }
 2608|       |
 2609|  9.08k|        if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2609:12): [True: 0, False: 9.08k]
  ------------------
 2610|      0|            break;
 2611|  9.08k|    }
 2612|  2.33k|    return o;
 2613|  2.33k|}

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

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

ua_util.c:isReservedPercent:
   95|  73.3M|isReservedPercent(u8 c) {
   96|  73.3M|    return (c == ';'  || c == '%' || c <= ' ' || c == 127);
  ------------------
  |  Branch (96:13): [True: 11.9k, False: 73.3M]
  |  Branch (96:26): [True: 4.12k, False: 73.3M]
  |  Branch (96:38): [True: 31.5M, False: 41.7M]
  |  Branch (96:50): [True: 200, False: 41.7M]
  ------------------
   97|  73.3M|}
ua_util.c:isReservedPercentExtended:
  100|  73.3M|isReservedPercentExtended(u8 c) {
  101|  73.3M|    return (isReservedPercent(c) || c == ':' || c == '#' || c == '[' || c == ']' ||
  ------------------
  |  Branch (101:13): [True: 31.6M, False: 41.7M]
  |  Branch (101:37): [True: 2.50k, False: 41.7M]
  |  Branch (101:49): [True: 3.46k, False: 41.7M]
  |  Branch (101:61): [True: 35.5M, False: 6.16M]
  |  Branch (101:73): [True: 16.4k, False: 6.14M]
  ------------------
  102|  6.14M|            c == '&' || c == '(' || c == ')' || c == ',' || c == '<' || c == '>' ||
  ------------------
  |  Branch (102:13): [True: 537k, False: 5.60M]
  |  Branch (102:25): [True: 173k, False: 5.43M]
  |  Branch (102:37): [True: 176k, False: 5.25M]
  |  Branch (102:49): [True: 43.8k, False: 5.21M]
  |  Branch (102:61): [True: 14.6k, False: 5.20M]
  |  Branch (102:73): [True: 0, False: 5.20M]
  ------------------
  103|  5.20M|            c == '`' || c == '/' || c == '\\' || c == '"' || c == '\'' );
  ------------------
  |  Branch (103:13): [True: 12.6k, False: 5.18M]
  |  Branch (103:25): [True: 28.6k, False: 5.15M]
  |  Branch (103:37): [True: 1.92k, False: 5.15M]
  |  Branch (103:50): [True: 12.9k, False: 5.14M]
  |  Branch (103:62): [True: 3.50k, False: 5.14M]
  ------------------
  104|  73.3M|}
ua_types_lex.c:isReservedPercentExtended:
  100|   289k|isReservedPercentExtended(u8 c) {
  101|   289k|    return (isReservedPercent(c) || c == ':' || c == '#' || c == '[' || c == ']' ||
  ------------------
  |  Branch (101:13): [True: 8, False: 289k]
  |  Branch (101:37): [True: 0, False: 289k]
  |  Branch (101:49): [True: 0, False: 289k]
  |  Branch (101:61): [True: 6, False: 289k]
  |  Branch (101:73): [True: 0, False: 289k]
  ------------------
  102|   289k|            c == '&' || c == '(' || c == ')' || c == ',' || c == '<' || c == '>' ||
  ------------------
  |  Branch (102:13): [True: 1, False: 289k]
  |  Branch (102:25): [True: 0, False: 289k]
  |  Branch (102:37): [True: 0, False: 289k]
  |  Branch (102:49): [True: 0, False: 289k]
  |  Branch (102:61): [True: 4.89k, False: 284k]
  |  Branch (102:73): [True: 0, False: 284k]
  ------------------
  103|   284k|            c == '`' || c == '/' || c == '\\' || c == '"' || c == '\'' );
  ------------------
  |  Branch (103:13): [True: 0, False: 284k]
  |  Branch (103:25): [True: 377, False: 284k]
  |  Branch (103:37): [True: 0, False: 284k]
  |  Branch (103:50): [True: 0, False: 284k]
  |  Branch (103:62): [True: 0, False: 284k]
  ------------------
  104|   289k|}
ua_types_lex.c:isReservedPercent:
   95|   289k|isReservedPercent(u8 c) {
   96|   289k|    return (c == ';'  || c == '%' || c <= ' ' || c == 127);
  ------------------
  |  Branch (96:13): [True: 0, False: 289k]
  |  Branch (96:26): [True: 0, False: 289k]
  |  Branch (96:38): [True: 8, False: 289k]
  |  Branch (96:50): [True: 0, False: 289k]
  ------------------
   97|   289k|}

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

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

fuzz_attributeoperand.cc:_ZL24UA_AttributeOperand_initP19UA_AttributeOperand:
  243|    260|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
fuzz_attributeoperand.cc:_ZL15UA_String_equalPK9UA_StringS1_:
  243|    135|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
fuzz_attributeoperand.cc:_ZL15UA_String_clearP9UA_String:
  243|    270|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
fuzz_attributeoperand.cc:_ZL25UA_AttributeOperand_clearP19UA_AttributeOperand:
  243|    270|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types.c:UA_ByteString_init:
  243|  1.28k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_util.c:UA_String_init:
  243|  1.28k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_util.c:UA_String_equal:
  243|  3.20k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_util.c:UA_String_clear:
  243|  1.55k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_util.c:UA_NodeId_equal:
  243|  4.40k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_String_copy:
  243|  9.70k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_QualifiedName_clear:
  243|    679|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_RelativePath_init:
  243|    382|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_RelativePathElement_init:
  243|  5.51k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_RelativePathElement_clear:
  243|     78|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_AttributeOperand_init:
  243|    395|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_QualifiedName_init:
  243|  6.04k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_AttributeOperand_clear:
  243|    125|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl

