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: 20, False: 267]
  ------------------
   86|     20|        return NULL;
   87|       |
   88|       |    /* Iterate over the input */
   89|    267|    size_t pad = 0;
   90|    267|    unsigned char count = 0;
   91|    267|    unsigned char block[4];
   92|    267|    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: 3, False: 4.44k]
  ------------------
   98|      3|            goto error; /* Not an allowed character */
   99|  4.44k|        if(tmp == 0x7f)
  ------------------
  |  Branch (99:12): [True: 9, False: 4.43k]
  ------------------
  100|      9|            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|      9| error:
  139|      9|    UA_free(out);
  ------------------
  |  |   19|      9|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
  140|       |    return NULL;
  141|    258|}

itoaUnsigned:
   42|    200|UA_UInt16 itoaUnsigned(UA_UInt64 value, char* buffer, UA_Byte base) {
   43|       |    /* consider absolute value of number */
   44|    200|    UA_UInt64 n = value;
   45|       |
   46|    200|    UA_UInt16 i = 0;
   47|    694|    while (n) {
  ------------------
  |  Branch (47:12): [True: 494, False: 200]
  ------------------
   48|    494|        UA_UInt64 r = n % base;
   49|       |
   50|    494|        if (r >= 10)
  ------------------
  |  Branch (50:13): [True: 0, False: 494]
  ------------------
   51|      0|            buffer[i++] = (char)(65 + (r - 10));
   52|    494|        else
   53|    494|            buffer[i++] = (char)(48 + r);
   54|       |
   55|    494|        n = n / base;
   56|    494|    }
   57|       |    /* if number is 0 */
   58|    200|    if (i == 0)
  ------------------
  |  Branch (58:9): [True: 62, False: 138]
  ------------------
   59|     62|        buffer[i++] = '0';
   60|       |
   61|    200|    buffer[i] = '\0'; /* null terminate string */
   62|    200|    i--;
   63|       |    /* reverse the string */
   64|    200|    reverse(buffer, 0, i);
   65|    200|    i++;
   66|    200|    return i;
   67|    200|}
itoa.c:reverse:
   34|    200|static char* reverse(char *buffer, UA_UInt16 i, UA_UInt16 j) {
   35|    400|    while (i < j)
  ------------------
  |  Branch (35:12): [True: 200, False: 200]
  ------------------
   36|    200|        swap(&buffer[i++], &buffer[j--]);
   37|       |
   38|    200|    return buffer;
   39|    200|}
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.95k|UA_String_append(UA_String *s, const UA_String s2) {
  303|  8.95k|    if(s2.length == 0)
  ------------------
  |  Branch (303:8): [True: 34, False: 8.92k]
  ------------------
  304|     34|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     34|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  305|  8.92k|    UA_Byte *buf = (UA_Byte*)
  306|  8.92k|        UA_realloc((void*)((uintptr_t)s->data & ~(uintptr_t)UA_EMPTY_ARRAY_SENTINEL),
  ------------------
  |  |   21|  8.92k|#define UA_realloc(ptr, size) UA_reallocSingleton(ptr, size)
  ------------------
  307|  8.92k|                   s->length + s2.length);
  308|  8.92k|    if(!buf)
  ------------------
  |  Branch (308:8): [True: 0, False: 8.92k]
  ------------------
  309|      0|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
  310|  8.92k|    memcpy(buf + s->length, s2.data, s2.length);
  311|  8.92k|    s->data = buf;
  312|  8.92k|    s->length += s2.length;
  313|  8.92k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  8.92k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  314|  8.92k|}
UA_ByteString_allocBuffer:
  762|  1.27k|UA_ByteString_allocBuffer(UA_ByteString *bs, size_t length) {
  763|  1.27k|    UA_ByteString_init(bs);
  764|  1.27k|    if(length == 0) {
  ------------------
  |  Branch (764:8): [True: 0, False: 1.27k]
  ------------------
  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.27k|    bs->data = (u8*)UA_calloc(1,length);
  ------------------
  |  |   20|  1.27k|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
  769|  1.27k|    if(UA_UNLIKELY(!bs->data))
  ------------------
  |  |  579|  1.27k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  ------------------
  |  |  |  Branch (579:25): [True: 0, False: 1.27k]
  |  |  ------------------
  ------------------
  770|      0|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
  771|  1.27k|    bs->length = length;
  772|  1.27k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  1.27k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  773|  1.27k|}
UA_NODEID_NUMERIC:
  835|  1.38k|UA_NODEID_NUMERIC(UA_UInt16 nsIndex, UA_UInt32 identifier) {
  836|  1.38k|    UA_NodeId id;
  837|  1.38k|    memset(&id, 0, sizeof(UA_NodeId));
  838|  1.38k|    id.namespaceIndex = nsIndex;
  839|  1.38k|    id.identifierType = UA_NODEIDTYPE_NUMERIC;
  840|  1.38k|    id.identifier.numeric = identifier;
  841|  1.38k|    return id;
  842|  1.38k|}
nodeId_printEscape:
 1029|  4.75k|                   const UA_NamespaceMapping *nsMapping, UA_Escaping idEsc) {
 1030|       |    /* Try to map the NamespaceIndex to the Uri */
 1031|  4.75k|    UA_String nsUri = UA_STRING_NULL;
 1032|  4.75k|    if(id->namespaceIndex > 0 && nsMapping)
  ------------------
  |  Branch (1032:8): [True: 74, False: 4.68k]
  |  Branch (1032:34): [True: 0, False: 74]
  ------------------
 1033|      0|        UA_NamespaceMapping_index2Uri(nsMapping, id->namespaceIndex, &nsUri);
 1034|       |
 1035|       |    /* Compute the string length and print numerical identifiers. */
 1036|  4.75k|    u8 nsStr[7];
 1037|  4.75k|    u8 numIdStr[12];
 1038|  4.75k|    size_t idLen = nodeIdSize(id, nsStr, numIdStr, nsUri, idEsc);
 1039|  4.75k|    if(idLen == 0)
  ------------------
  |  Branch (1039:8): [True: 0, False: 4.75k]
  ------------------
 1040|      0|        return UA_STATUSCODE_BADINTERNALERROR;
  ------------------
  |  |   29|      0|#define UA_STATUSCODE_BADINTERNALERROR ((UA_StatusCode) 0x80020000)
  ------------------
 1041|       |
 1042|       |    /* Allocate memory if required */
 1043|  4.75k|    if(output->length == 0) {
  ------------------
  |  Branch (1043:8): [True: 1.27k, False: 3.47k]
  ------------------
 1044|  1.27k|        UA_StatusCode res = UA_ByteString_allocBuffer((UA_ByteString*)output, idLen);
 1045|  1.27k|        if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  1.27k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1045:12): [True: 0, False: 1.27k]
  ------------------
 1046|      0|            return res;
 1047|  3.47k|    } else {
 1048|  3.47k|        if(output->length < idLen)
  ------------------
  |  Branch (1048:12): [True: 1.27k, False: 2.20k]
  ------------------
 1049|  1.27k|            return UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED;
  ------------------
  |  |   47|  1.27k|#define UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED ((UA_StatusCode) 0x80080000)
  ------------------
 1050|  2.20k|        output->length = idLen;
 1051|  2.20k|    }
 1052|       |
 1053|       |    /* Print the NodeId */
 1054|  3.47k|    u8 *pos = printNodeIdBody(id, nsUri, nsStr, numIdStr, output->data, nsMapping, idEsc);
 1055|  3.47k|    output->length = (size_t)(pos - output->data);
 1056|  3.47k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  3.47k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1057|  4.75k|}
UA_NodeId_printEx:
 1061|  4.62k|                  const UA_NamespaceMapping *nsMapping) {
 1062|  4.62k|    return nodeId_printEscape(id, output, nsMapping, UA_ESCAPING_NONE);
 1063|  4.62k|}
UA_NodeId_print:
 1066|  4.62k|UA_NodeId_print(const UA_NodeId *id, UA_String *output) {
 1067|       |    return UA_NodeId_printEx(id, output, NULL);
 1068|  4.62k|}
UA_copy:
 2102|  9.68k|UA_copy(const void *src, void *dst, const UA_DataType *type) {
 2103|  9.68k|    memset(dst, 0, type->memSize); /* init */
 2104|  9.68k|    UA_StatusCode retval = copyJumpTable[type->typeKind](src, dst, type);
 2105|  9.68k|    if(retval != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  9.68k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2105:8): [True: 34, False: 9.65k]
  ------------------
 2106|     34|        UA_clear(dst, type);
 2107|  9.68k|    return retval;
 2108|  9.68k|}
UA_clear:
 2205|  8.34k|UA_clear(void *p, const UA_DataType *type) {
 2206|  8.34k|    clearJumpTable[type->typeKind](p, type);
 2207|  8.34k|    memset(p, 0, type->memSize); /* init */
 2208|  8.34k|}
UA_order:
 2679|  7.85k|UA_Order UA_order(const void *p1, const void *p2, const UA_DataType *type) {
 2680|  7.85k|    return orderJumpTable[type->typeKind](p1, p2, type);
 2681|  7.85k|}
UA_equal:
 2684|    134|UA_equal(const void *p1, const void *p2, const UA_DataType *type) {
 2685|    134|    return (UA_order(p1, p2, type) == UA_ORDER_EQ);
 2686|    134|}
UA_Array_copy:
 2705|  9.68k|              void **dst, const UA_DataType *type) {
 2706|  9.68k|    if(size == 0) {
  ------------------
  |  Branch (2706:8): [True: 4.49k, False: 5.19k]
  ------------------
 2707|  4.49k|        if(src == NULL)
  ------------------
  |  Branch (2707:12): [True: 0, False: 4.49k]
  ------------------
 2708|      0|            *dst = NULL;
 2709|  4.49k|        else
 2710|  4.49k|            *dst= UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|  4.49k|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
 2711|  4.49k|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  4.49k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2712|  4.49k|    }
 2713|       |
 2714|       |    /* Check the array consistency -- defensive programming in case the user
 2715|       |     * manually created an inconsistent array */
 2716|  5.19k|    if(UA_UNLIKELY(!type || !src))
  ------------------
  |  |  579|  10.3k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  ------------------
  |  |  |  Branch (579:25): [True: 0, False: 5.19k]
  |  |  |  Branch (579:43): [True: 0, False: 5.19k]
  |  |  |  Branch (579:43): [True: 0, False: 5.19k]
  |  |  ------------------
  ------------------
 2717|      0|        return UA_STATUSCODE_BADINTERNALERROR;
  ------------------
  |  |   29|      0|#define UA_STATUSCODE_BADINTERNALERROR ((UA_StatusCode) 0x80020000)
  ------------------
 2718|       |
 2719|  5.19k|    if(size > SIZE_MAX / type->memSize)
  ------------------
  |  Branch (2719:8): [True: 0, False: 5.19k]
  ------------------
 2720|      0|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 2721|  5.19k|    size_t byteSize = size * type->memSize;
 2722|       |
 2723|       |    /* calloc, so we don't have to check retval in every iteration of copying */
 2724|  5.19k|    *dst = UA_calloc(size, type->memSize);
  ------------------
  |  |   20|  5.19k|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
 2725|  5.19k|    if(!*dst)
  ------------------
  |  Branch (2725:8): [True: 34, False: 5.15k]
  ------------------
 2726|     34|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|     34|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 2727|       |
 2728|  5.15k|    if(type->pointerFree) {
  ------------------
  |  Branch (2728:8): [True: 5.15k, False: 0]
  ------------------
 2729|  5.15k|        memcpy(*dst, src, byteSize);
 2730|  5.15k|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  5.15k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2731|  5.15k|    }
 2732|       |
 2733|      0|    uintptr_t ptrs = (uintptr_t)src;
 2734|      0|    uintptr_t ptrd = (uintptr_t)*dst;
 2735|      0|    UA_StatusCode retval = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2736|      0|    for(size_t i = 0; i < size; ++i) {
  ------------------
  |  Branch (2736:23): [True: 0, False: 0]
  ------------------
 2737|      0|        retval |= UA_copy((void*)ptrs, (void*)ptrd, type);
 2738|      0|        ptrs += type->memSize;
 2739|      0|        ptrd += type->memSize;
 2740|      0|    }
 2741|      0|    if(retval != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2741:8): [True: 0, False: 0]
  ------------------
 2742|      0|        UA_Array_delete(*dst, size, type);
 2743|       |        *dst = NULL;
 2744|      0|    }
 2745|      0|    return retval;
 2746|  5.15k|}
UA_Array_delete:
 2848|  13.4k|UA_Array_delete(void *p, size_t size, const UA_DataType *type) {
 2849|  13.4k|    if(!type->pointerFree) {
  ------------------
  |  Branch (2849:8): [True: 391, False: 13.0k]
  ------------------
 2850|    391|        uintptr_t ptr = (uintptr_t)p;
 2851|  5.74k|        for(size_t i = 0; i < size; ++i) {
  ------------------
  |  Branch (2851:27): [True: 5.35k, False: 391]
  ------------------
 2852|  5.35k|            UA_clear((void*)ptr, type);
 2853|  5.35k|            ptr += type->memSize;
 2854|  5.35k|        }
 2855|    391|    }
 2856|  13.4k|    UA_free((void*)((uintptr_t)p & ~(uintptr_t)UA_EMPTY_ARRAY_SENTINEL));
  ------------------
  |  |   19|  13.4k|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 2857|  13.4k|}
ua_types.c:nodeIdSize:
  928|  4.75k|           UA_Escaping idEsc) {
  929|       |    /* Namespace length */
  930|  4.75k|    size_t len = 0;
  931|  4.75k|    if(nsUri.data != NULL) {
  ------------------
  |  Branch (931:8): [True: 0, False: 4.75k]
  ------------------
  932|      0|        len += 5; /* nsu=; */
  933|      0|        len += UA_String_escapedSize(nsUri, UA_ESCAPING_PERCENT);
  934|  4.75k|    } else if(id->namespaceIndex > 0) {
  ------------------
  |  Branch (934:15): [True: 74, False: 4.68k]
  ------------------
  935|     74|        len += 4; /* ns=; */
  936|     74|        size_t nsStrSize = itoaUnsigned(id->namespaceIndex, (char*)nsStr, 10);
  937|     74|        nsStr[nsStrSize] = 0;
  938|     74|        len += nsStrSize;
  939|     74|    }
  940|       |
  941|  4.75k|    len += 2; /* ?= */
  942|       |
  943|  4.75k|    switch (id->identifierType) {
  944|    110|    case UA_NODEIDTYPE_NUMERIC: {
  ------------------
  |  Branch (944:5): [True: 110, False: 4.64k]
  ------------------
  945|    110|        size_t numIdStrSize = itoaUnsigned(id->identifier.numeric, (char*)numIdStr, 10);
  946|    110|        numIdStr[numIdStrSize] = 0;
  947|    110|        len += numIdStrSize;
  948|    110|        break;
  949|      0|    }
  950|  3.92k|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (950:5): [True: 3.92k, False: 830]
  ------------------
  951|  3.92k|        len += UA_String_escapedSize(id->identifier.string, idEsc);
  952|  3.92k|        break;
  953|      0|    case UA_NODEIDTYPE_GUID:
  ------------------
  |  Branch (953:5): [True: 0, False: 4.75k]
  ------------------
  954|      0|        len += 36;
  955|      0|        break;
  956|    720|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (956:5): [True: 720, False: 4.03k]
  ------------------
  957|    720|        len += 4 * ((id->identifier.byteString.length + 2) / 3);
  958|    720|        break;
  959|      0|    default:
  ------------------
  |  Branch (959:5): [True: 0, False: 4.75k]
  ------------------
  960|      0|        len = 0;
  961|  4.75k|    }
  962|  4.75k|    return len;
  963|  4.75k|}
ua_types.c:printNodeIdBody:
  967|  3.47k|                const UA_NamespaceMapping *nsMapping, UA_Escaping idEsc) {
  968|  3.47k|    size_t len;
  969|       |
  970|       |    /* Encode the namespace */
  971|  3.47k|    if(nsUri.data != NULL) {
  ------------------
  |  Branch (971:8): [True: 0, False: 3.47k]
  ------------------
  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.47k|    } else if(id->namespaceIndex > 0) {
  ------------------
  |  Branch (976:15): [True: 74, False: 3.40k]
  ------------------
  977|     74|        memcpy(pos, "ns=", 3);
  978|     74|        pos += 3;
  979|     74|        len = strlen((char*)nsStr);
  980|     74|        memcpy(pos, nsStr, len);
  981|     74|        pos += len;
  982|     74|        *pos++ = ';';
  983|     74|    }
  984|       |
  985|       |    /* Encode the identifier */
  986|  3.47k|    switch(id->identifierType) {
  ------------------
  |  Branch (986:12): [True: 3.47k, False: 0]
  ------------------
  987|    110|    case UA_NODEIDTYPE_NUMERIC:
  ------------------
  |  Branch (987:5): [True: 110, False: 3.36k]
  ------------------
  988|    110|        memcpy(pos, "i=", 2);
  989|    110|        pos += 2;
  990|    110|        len = strlen((char*)numIdStr);
  991|    110|        memcpy(pos, numIdStr, len);
  992|    110|        pos += len;
  993|    110|        break;
  994|  2.64k|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (994:5): [True: 2.64k, False: 830]
  ------------------
  995|  2.64k|        memcpy(pos, "s=", 2);
  996|  2.64k|        pos += 2;
  997|  2.64k|        pos += UA_String_escapeInsert(pos, id->identifier.string, idEsc);
  998|  2.64k|        break;
  999|      0|    case UA_NODEIDTYPE_GUID:
  ------------------
  |  Branch (999:5): [True: 0, False: 3.47k]
  ------------------
 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.75k]
  ------------------
 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.47k|    }
 1024|  3.47k|    return pos;
 1025|  3.47k|}
ua_types.c:String_copy:
  284|  9.68k|String_copy(const void *src, void *dst, const UA_DataType *_) {
  285|  9.68k|    const UA_String *srcS = (const UA_String*)src;
  286|  9.68k|    UA_String *dstS = (UA_String *)dst;
  287|  9.68k|    UA_StatusCode res =
  288|  9.68k|        UA_Array_copy(srcS->data, srcS->length, (void**)&dstS->data,
  289|  9.68k|                      &UA_TYPES[UA_TYPES_BYTE]);
  ------------------
  |  |   96|  9.68k|#define UA_TYPES_BYTE 2
  ------------------
  290|  9.68k|    if(res == UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  9.68k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (290:8): [True: 9.65k, False: 34]
  ------------------
  291|  9.65k|        dstS->length = srcS->length;
  292|  9.68k|    return res;
  293|  9.68k|}
ua_types.c:nopClear:
 2167|  11.2k|static void nopClear(void *p, const UA_DataType *type) { }
ua_types.c:String_clear:
  296|  13.0k|String_clear(void *p, const UA_DataType *_) {
  297|  13.0k|    UA_String *s = (UA_String*)p;
  298|  13.0k|    UA_Array_delete(s->data, s->length, &UA_TYPES[UA_TYPES_BYTE]);
  ------------------
  |  |   96|  13.0k|#define UA_TYPES_BYTE 2
  ------------------
  299|  13.0k|}
ua_types.c:NodeId_clear:
  777|  5.82k|NodeId_clear(void *p, const UA_DataType *_) {
  778|  5.82k|    UA_NodeId *id = (UA_NodeId*)p;
  779|  5.82k|    switch(id->identifierType) {
  780|  3.61k|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (780:5): [True: 3.61k, False: 2.21k]
  ------------------
  781|  4.35k|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (781:5): [True: 749, False: 5.07k]
  ------------------
  782|  4.35k|        String_clear(&id->identifier.string, NULL);
  783|  4.35k|        break;
  784|  1.46k|    default: break;
  ------------------
  |  Branch (784:5): [True: 1.46k, False: 4.35k]
  ------------------
  785|  5.82k|    }
  786|  5.82k|}
ua_types.c:QualifiedName_clear:
  402|  6.11k|QualifiedName_clear(void *p, const UA_DataType *_) {
  403|  6.11k|    UA_QualifiedName *qn = (UA_QualifiedName*)p;
  404|       |    String_clear(&qn->name, NULL);
  405|  6.11k|}
ua_types.c:clearStructure:
 2111|  6.21k|clearStructure(void *p, const UA_DataType *type) {
 2112|  6.21k|    uintptr_t ptr = (uintptr_t)p;
 2113|  30.2k|    for(size_t i = 0; i < type->membersSize; ++i) {
  ------------------
  |  Branch (2113:23): [True: 24.0k, False: 6.21k]
  ------------------
 2114|  24.0k|        const UA_DataTypeMember *m = &type->members[i];
 2115|  24.0k|        const UA_DataType *mt = m->memberType;
 2116|  24.0k|        ptr += m->padding;
 2117|  24.0k|        if(!m->isOptional) {
  ------------------
  |  Branch (2117:12): [True: 24.0k, False: 0]
  ------------------
 2118|  24.0k|            if(!m->isArray) {
  ------------------
  |  Branch (2118:16): [True: 23.6k, False: 391]
  ------------------
 2119|  23.6k|                clearJumpTable[mt->typeKind]((void*)ptr, mt);
 2120|  23.6k|                ptr += mt->memSize;
 2121|  23.6k|            } else {
 2122|    391|                size_t length = *(size_t*)ptr;
 2123|    391|                ptr += sizeof(size_t);
 2124|    391|                UA_Array_delete(*(void**)ptr, length, mt);
 2125|    391|                ptr += sizeof(void*);
 2126|    391|            }
 2127|  24.0k|        } else { /* field is optional */
 2128|      0|            if(!m->isArray) {
  ------------------
  |  Branch (2128:16): [True: 0, False: 0]
  ------------------
 2129|       |                /* optional scalar field is contained */
 2130|      0|                if((*(void *const *)ptr != NULL))
  ------------------
  |  Branch (2130:20): [True: 0, False: 0]
  ------------------
 2131|      0|                    UA_Array_delete(*(void **)ptr, 1, mt);
 2132|      0|                ptr += sizeof(void *);
 2133|      0|            } else {
 2134|       |                /* optional array field is contained */
 2135|      0|                if((*(void *const *)(ptr + sizeof(size_t)) != NULL)) {
  ------------------
  |  Branch (2135:20): [True: 0, False: 0]
  ------------------
 2136|      0|                    size_t length = *(size_t *)ptr;
 2137|      0|                    ptr += sizeof(size_t);
 2138|      0|                    UA_Array_delete(*(void **)ptr, length, mt);
 2139|      0|                    ptr += sizeof(void *);
 2140|      0|                } else { /* optional array field not contained */
 2141|      0|                    ptr += sizeof(size_t);
 2142|      0|                    ptr += sizeof(void *);
 2143|      0|                }
 2144|      0|            }
 2145|      0|        }
 2146|  24.0k|    }
 2147|  6.21k|}
ua_types.c:nodeIdOrder:
 2297|  6.60k|nodeIdOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2298|  6.60k|    const UA_NodeId *p1 = (const UA_NodeId*)p1_;
 2299|  6.60k|    const UA_NodeId *p2 = (const UA_NodeId*)p2_;
 2300|       |    /* Compare namespaceIndex */
 2301|  6.60k|    if(p1->namespaceIndex != p2->namespaceIndex)
  ------------------
  |  Branch (2301:8): [True: 74, False: 6.52k]
  ------------------
 2302|     74|        return (p1->namespaceIndex < p2->namespaceIndex) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2302:16): [True: 74, False: 0]
  ------------------
 2303|       |
 2304|       |    /* Compare identifierType */
 2305|  6.52k|    if(p1->identifierType != p2->identifierType)
  ------------------
  |  Branch (2305:8): [True: 3.36k, False: 3.15k]
  ------------------
 2306|  3.36k|        return (p1->identifierType < p2->identifierType) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2306:16): [True: 3.36k, False: 0]
  ------------------
 2307|       |
 2308|       |    /* Compare the identifier */
 2309|  3.15k|    switch(p1->identifierType) {
 2310|  1.47k|    case UA_NODEIDTYPE_NUMERIC:
  ------------------
  |  Branch (2310:5): [True: 1.47k, False: 1.68k]
  ------------------
 2311|  1.47k|    default:
  ------------------
  |  Branch (2311:5): [True: 0, False: 3.15k]
  ------------------
 2312|  1.47k|        if(p1->identifier.numeric != p2->identifier.numeric)
  ------------------
  |  Branch (2312:12): [True: 414, False: 1.06k]
  ------------------
 2313|    414|            return (p1->identifier.numeric < p2->identifier.numeric) ?
  ------------------
  |  Branch (2313:20): [True: 384, False: 30]
  ------------------
 2314|    384|                UA_ORDER_LESS : UA_ORDER_MORE;
 2315|  1.06k|        return UA_ORDER_EQ;
 2316|      0|    case UA_NODEIDTYPE_GUID:
  ------------------
  |  Branch (2316:5): [True: 0, False: 3.15k]
  ------------------
 2317|      0|        return guidOrder(&p1->identifier.guid, &p2->identifier.guid, NULL);
 2318|  1.32k|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (2318:5): [True: 1.32k, False: 1.83k]
  ------------------
 2319|  1.68k|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (2319:5): [True: 360, False: 2.79k]
  ------------------
 2320|       |        return stringOrder(&p1->identifier.string, &p2->identifier.string, NULL);
 2321|  3.15k|    }
 2322|  3.15k|}
ua_types.c:booleanOrder:
 2222|  4.13k|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2223|  4.13k|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2224|  4.13k|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2225|  4.13k|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2225:12): [True: 0, False: 4.13k]
  ------------------
 2226|  4.13k|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2226:20): [True: 0, False: 0]
  ------------------
 2227|  4.13k|        return UA_ORDER_EQ;                                               \
 2228|  4.13k|    }
ua_types.c:uInt32Order:
 2222|    134|    NAME(const void *p1_, const void *p2_, const UA_DataType *type) {     \
 2223|    134|        const TYPE *p1 = (const TYPE*)p1_;                                \
 2224|    134|        const TYPE *p2 = (const TYPE*)p2_;                                \
 2225|    134|        if(*p1 != *p2)                                                    \
  ------------------
  |  Branch (2225:12): [True: 0, False: 134]
  ------------------
 2226|    134|            return (*p1 < *p2) ? UA_ORDER_LESS : UA_ORDER_MORE;           \
  ------------------
  |  Branch (2226:20): [True: 0, False: 0]
  ------------------
 2227|    134|        return UA_ORDER_EQ;                                               \
 2228|    134|    }
ua_types.c:stringOrder:
 2280|  7.34k|stringOrder(const void *p1_, const void *p2_, const UA_DataType *type) {
 2281|  7.34k|    const UA_String *p1 = (const UA_String*)p1_;
 2282|  7.34k|    const UA_String *p2 = (const UA_String*)p2_;
 2283|  7.34k|    if(p1->length != p2->length)
  ------------------
  |  Branch (2283:8): [True: 2.57k, False: 4.76k]
  ------------------
 2284|  2.57k|        return (p1->length < p2->length) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2284:16): [True: 1.63k, False: 935]
  ------------------
 2285|       |    /* For zero-length arrays, every pointer not NULL is considered a
 2286|       |     * UA_EMPTY_ARRAY_SENTINEL. */
 2287|  4.76k|    if(p1->data == p2->data) return UA_ORDER_EQ;
  ------------------
  |  Branch (2287:8): [True: 2.33k, False: 2.43k]
  ------------------
 2288|  2.43k|    if(p1->data == NULL) return UA_ORDER_LESS;
  ------------------
  |  Branch (2288:8): [True: 0, False: 2.43k]
  ------------------
 2289|  2.43k|    if(p2->data == NULL) return UA_ORDER_MORE;
  ------------------
  |  Branch (2289:8): [True: 0, False: 2.43k]
  ------------------
 2290|  2.43k|    int cmp = memcmp((const char*)p1->data, (const char*)p2->data, p1->length);
 2291|  2.43k|    if(cmp != 0)
  ------------------
  |  Branch (2291:8): [True: 8, False: 2.42k]
  ------------------
 2292|      8|        return (cmp < 0) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2292:16): [True: 3, False: 5]
  ------------------
 2293|  2.42k|    return UA_ORDER_EQ;
 2294|  2.43k|}
ua_types.c:qualifiedNameOrder:
 2337|  2.06k|qualifiedNameOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2338|  2.06k|    const UA_QualifiedName *p1 = (const UA_QualifiedName*)p1_;
 2339|  2.06k|    const UA_QualifiedName *p2 = (const UA_QualifiedName*)p2_;
 2340|  2.06k|    if(p1->namespaceIndex != p2->namespaceIndex)
  ------------------
  |  Branch (2340:8): [True: 0, False: 2.06k]
  ------------------
 2341|      0|        return (p1->namespaceIndex < p2->namespaceIndex) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2341:16): [True: 0, False: 0]
  ------------------
 2342|  2.06k|    return stringOrder(&p1->name, &p2->name, NULL);
 2343|  2.06k|}
ua_types.c:arrayOrder:
 2406|    134|           const UA_DataType *type) {
 2407|    134|    if(p1Length != p2Length)
  ------------------
  |  Branch (2407:8): [True: 0, False: 134]
  ------------------
 2408|      0|        return (p1Length < p2Length) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2408:16): [True: 0, False: 0]
  ------------------
 2409|    134|    uintptr_t u1 = (uintptr_t)p1;
 2410|    134|    uintptr_t u2 = (uintptr_t)p2;
 2411|  2.20k|    for(size_t i = 0; i < p1Length; i++) {
  ------------------
  |  Branch (2411:23): [True: 2.06k, False: 134]
  ------------------
 2412|  2.06k|        UA_Order o = orderJumpTable[type->typeKind]((const void*)u1, (const void*)u2, type);
 2413|  2.06k|        if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2413:12): [True: 0, False: 2.06k]
  ------------------
 2414|      0|            return o;
 2415|  2.06k|        u1 += type->memSize;
 2416|  2.06k|        u2 += type->memSize;
 2417|  2.06k|    }
 2418|    134|    return UA_ORDER_EQ;
 2419|    134|}
ua_types.c:structureOrder:
 2560|  2.33k|structureOrder(const void *p1, const void *p2, const UA_DataType *type) {
 2561|  2.33k|    uintptr_t u1 = (uintptr_t)p1;
 2562|  2.33k|    uintptr_t u2 = (uintptr_t)p2;
 2563|  2.33k|    UA_Order o = UA_ORDER_EQ;
 2564|  11.4k|    for(size_t i = 0; i < type->membersSize; ++i) {
  ------------------
  |  Branch (2564:23): [True: 9.06k, False: 2.33k]
  ------------------
 2565|  9.06k|        const UA_DataTypeMember *m = &type->members[i];
 2566|  9.06k|        const UA_DataType *mt = m->memberType;
 2567|  9.06k|        u1 += m->padding;
 2568|  9.06k|        u2 += m->padding;
 2569|  9.06k|        if(!m->isOptional) {
  ------------------
  |  Branch (2569:12): [True: 9.06k, False: 0]
  ------------------
 2570|  9.06k|            if(!m->isArray) {
  ------------------
  |  Branch (2570:16): [True: 8.93k, False: 134]
  ------------------
 2571|  8.93k|                o = orderJumpTable[mt->typeKind]((const void *)u1, (const void *)u2, mt);
 2572|  8.93k|                u1 += mt->memSize;
 2573|  8.93k|                u2 += mt->memSize;
 2574|  8.93k|            } else {
 2575|    134|                size_t size1 = *(size_t*)u1;
 2576|    134|                size_t size2 = *(size_t*)u2;
 2577|    134|                u1 += sizeof(size_t);
 2578|    134|                u2 += sizeof(size_t);
 2579|    134|                o = arrayOrder(*(void* const*)u1, size1, *(void* const*)u2, size2, mt);
 2580|    134|                u1 += sizeof(void*);
 2581|    134|                u2 += sizeof(void*);
 2582|    134|            }
 2583|  9.06k|        } else {
 2584|      0|            if(!m->isArray) {
  ------------------
  |  Branch (2584:16): [True: 0, False: 0]
  ------------------
 2585|      0|                const void *pp1 = *(void* const*)u1;
 2586|      0|                const void *pp2 = *(void* const*)u2;
 2587|      0|                if(pp1 == pp2) {
  ------------------
  |  Branch (2587:20): [True: 0, False: 0]
  ------------------
 2588|      0|                    o = UA_ORDER_EQ;
 2589|      0|                } else if(pp1 == NULL) {
  ------------------
  |  Branch (2589:27): [True: 0, False: 0]
  ------------------
 2590|      0|                    o = UA_ORDER_LESS;
 2591|      0|                } else if(pp2 == NULL) {
  ------------------
  |  Branch (2591:27): [True: 0, False: 0]
  ------------------
 2592|      0|                    o = UA_ORDER_MORE;
 2593|      0|                } else {
 2594|      0|                    o = orderJumpTable[mt->typeKind](pp1, pp2, mt);
 2595|      0|                }
 2596|      0|            } else {
 2597|      0|                size_t sa1 = *(size_t*)u1;
 2598|      0|                size_t sa2 = *(size_t*)u2;
 2599|      0|                u1 += sizeof(size_t);
 2600|      0|                u2 += sizeof(size_t);
 2601|      0|                o = arrayOrder(*(void* const*)u1, sa1, *(void* const*)u2, sa2, mt);
 2602|      0|            }
 2603|      0|            u1 += sizeof(void*);
 2604|      0|            u2 += sizeof(void*);
 2605|      0|        }
 2606|       |
 2607|  9.06k|        if(o != UA_ORDER_EQ)
  ------------------
  |  Branch (2607:12): [True: 0, False: 9.06k]
  ------------------
 2608|      0|            break;
 2609|  9.06k|    }
 2610|  2.33k|    return o;
 2611|  2.33k|}

UA_AttributeOperand_parse:
 1223|    391|UA_AttributeOperand_parse(UA_AttributeOperand *ao, const UA_String str) {
 1224|       |    /* Objects folder is the default */
 1225|    391|    return parseAttributeOperand(ao, str, UA_NS0ID(OBJECTSFOLDER), 0);
  ------------------
  |  |  458|    391|#define UA_NS0ID(ID) UA_NODEID_NUMERIC(0, UA_NS0ID_##ID)
  |  |  ------------------
  |  |  |  |   81|    391|#define UA_NS0ID_OBJECTSFOLDER 85 /* Object */
  |  |  ------------------
  ------------------
 1226|    391|}
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.18k|             UA_Escaping idEsc, const UA_NamespaceMapping *nsMapping) {
  149|  5.18k|    *id = UA_NODEID_NULL; /* Reset the NodeId */
  150|  5.18k|    LexContext context;
  151|  5.18k|    memset(&context, 0, sizeof(LexContext));
  152|  5.18k|    UA_Byte *begin = (UA_Byte*)(uintptr_t)pos;
  153|  5.18k|    const u8 *ns = NULL, *nsu = NULL, *body = NULL;
  154|       |
  155|       |    
  156|  5.18k|{
  157|  5.18k|	u8 yych;
  158|  5.18k|	yych = YYPEEK();
  ------------------
  |  |   33|  5.18k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  5.18k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  5.18k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 5.18k, False: 0]
  |  |  ------------------
  ------------------
  159|  5.18k|	switch (yych) {
  160|    749|		case 'b':
  ------------------
  |  Branch (160:3): [True: 749, False: 4.44k]
  ------------------
  161|    759|		case 'g':
  ------------------
  |  Branch (161:3): [True: 10, False: 5.17k]
  ------------------
  162|    882|		case 'i':
  ------------------
  |  Branch (162:3): [True: 123, False: 5.06k]
  ------------------
  163|  3.52k|		case 's':
  ------------------
  |  Branch (163:3): [True: 2.63k, False: 2.55k]
  ------------------
  164|  3.52k|			YYSTAGN(context.yyt1);
  ------------------
  |  |   39|  3.52k|#define YYSTAGN(t) t = NULL
  ------------------
  165|  3.52k|			YYSTAGN(context.yyt2);
  ------------------
  |  |   39|  3.52k|#define YYSTAGN(t) t = NULL
  ------------------
  166|  3.52k|			goto yy3;
  167|  1.05k|		case 'n': goto yy4;
  ------------------
  |  Branch (167:3): [True: 1.05k, False: 4.13k]
  ------------------
  168|    616|		default: goto yy1;
  ------------------
  |  Branch (168:3): [True: 616, False: 4.57k]
  ------------------
  169|  5.18k|	}
  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.52k|yy3:
  175|  3.52k|	YYSKIP();
  ------------------
  |  |   35|  3.52k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  3.52k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  176|  3.52k|	yych = YYPEEK();
  ------------------
  |  |   33|  3.52k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  3.52k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  3.52k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 3.52k, False: 0]
  |  |  ------------------
  ------------------
  177|  3.52k|	switch (yych) {
  178|  3.52k|		case '=': goto yy5;
  ------------------
  |  Branch (178:3): [True: 3.52k, False: 0]
  ------------------
  179|      0|		default: goto yy2;
  ------------------
  |  Branch (179:3): [True: 0, False: 3.52k]
  ------------------
  180|  3.52k|	}
  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.56k|yy5:
  190|  4.56k|	YYSKIP();
  ------------------
  |  |   35|  4.56k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  4.56k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  191|  4.56k|	nsu = context.yyt2;
  192|  4.56k|	ns = context.yyt1;
  193|  4.56k|	YYSTAGP(body);
  ------------------
  |  |   38|  4.56k|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|  4.56k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  194|  4.56k|	YYSHIFTSTAG(body, -2);
  ------------------
  |  |   40|  4.56k|#define YYSHIFTSTAG(t, shift) t += shift
  ------------------
  195|  4.56k|	{ 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|    332|		case '=': goto yy8;
  ------------------
  |  Branch (200:3): [True: 332, False: 720]
  ------------------
  201|    720|		case 'u': goto yy9;
  ------------------
  |  Branch (201:3): [True: 720, False: 332]
  ------------------
  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|    332|yy8:
  208|    332|	YYSKIP();
  ------------------
  |  |   35|    332|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    332|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  209|    332|	yych = YYPEEK();
  ------------------
  |  |   33|    332|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    332|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    332|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 332, False: 0]
  |  |  ------------------
  ------------------
  210|    332|	switch (yych) {
  211|    124|		case '0':
  ------------------
  |  Branch (211:3): [True: 124, False: 208]
  ------------------
  212|    133|		case '1':
  ------------------
  |  Branch (212:3): [True: 9, False: 323]
  ------------------
  213|    272|		case '2':
  ------------------
  |  Branch (213:3): [True: 139, False: 193]
  ------------------
  214|    331|		case '3':
  ------------------
  |  Branch (214:3): [True: 59, False: 273]
  ------------------
  215|    331|		case '4':
  ------------------
  |  Branch (215:3): [True: 0, False: 332]
  ------------------
  216|    331|		case '5':
  ------------------
  |  Branch (216:3): [True: 0, False: 332]
  ------------------
  217|    332|		case '6':
  ------------------
  |  Branch (217:3): [True: 1, False: 331]
  ------------------
  218|    332|		case '7':
  ------------------
  |  Branch (218:3): [True: 0, False: 332]
  ------------------
  219|    332|		case '8':
  ------------------
  |  Branch (219:3): [True: 0, False: 332]
  ------------------
  220|    332|		case '9':
  ------------------
  |  Branch (220:3): [True: 0, False: 332]
  ------------------
  221|    332|			YYSTAGP(context.yyt1);
  ------------------
  |  |   38|    332|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|    332|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  222|    332|			goto yy10;
  223|      0|		default: goto yy7;
  ------------------
  |  Branch (223:3): [True: 0, False: 332]
  ------------------
  224|    332|	}
  225|    720|yy9:
  226|    720|	YYSKIP();
  ------------------
  |  |   35|    720|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    720|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  227|    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]
  |  |  ------------------
  ------------------
  228|    720|	switch (yych) {
  229|    719|		case '=': goto yy11;
  ------------------
  |  Branch (229:3): [True: 719, False: 1]
  ------------------
  230|      1|		default: goto yy7;
  ------------------
  |  Branch (230:3): [True: 1, False: 719]
  ------------------
  231|    720|	}
  232|    376|yy10:
  233|    376|	YYSKIP();
  ------------------
  |  |   35|    376|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    376|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  234|    376|	yych = YYPEEK();
  ------------------
  |  |   33|    376|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    376|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    376|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 376, False: 0]
  |  |  ------------------
  ------------------
  235|    376|	switch (yych) {
  236|      0|		case '0':
  ------------------
  |  Branch (236:3): [True: 0, False: 376]
  ------------------
  237|      0|		case '1':
  ------------------
  |  Branch (237:3): [True: 0, False: 376]
  ------------------
  238|      2|		case '2':
  ------------------
  |  Branch (238:3): [True: 2, False: 374]
  ------------------
  239|      2|		case '3':
  ------------------
  |  Branch (239:3): [True: 0, False: 376]
  ------------------
  240|      2|		case '4':
  ------------------
  |  Branch (240:3): [True: 0, False: 376]
  ------------------
  241|     20|		case '5':
  ------------------
  |  Branch (241:3): [True: 18, False: 358]
  ------------------
  242|     22|		case '6':
  ------------------
  |  Branch (242:3): [True: 2, False: 374]
  ------------------
  243|     44|		case '7':
  ------------------
  |  Branch (243:3): [True: 22, False: 354]
  ------------------
  244|     44|		case '8':
  ------------------
  |  Branch (244:3): [True: 0, False: 376]
  ------------------
  245|     44|		case '9': goto yy10;
  ------------------
  |  Branch (245:3): [True: 0, False: 376]
  ------------------
  246|    332|		case ';':
  ------------------
  |  Branch (246:3): [True: 332, False: 44]
  ------------------
  247|    332|			YYSTAGN(context.yyt2);
  ------------------
  |  |   39|    332|#define YYSTAGN(t) t = NULL
  ------------------
  248|    332|			goto yy12;
  249|      0|		default: goto yy7;
  ------------------
  |  Branch (249:3): [True: 0, False: 376]
  ------------------
  250|    376|	}
  251|    719|yy11:
  252|    719|	YYSKIP();
  ------------------
  |  |   35|    719|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    719|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  253|    719|	yych = YYPEEK();
  ------------------
  |  |   33|    719|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    719|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    719|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 719, False: 0]
  |  |  ------------------
  ------------------
  254|    719|	switch (yych) {
  255|      0|		case 0x00: goto yy7;
  ------------------
  |  Branch (255:3): [True: 0, False: 719]
  ------------------
  256|    242|		case ';':
  ------------------
  |  Branch (256:3): [True: 242, False: 477]
  ------------------
  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|    477|		default:
  ------------------
  |  Branch (260:3): [True: 477, False: 242]
  ------------------
  261|    477|			YYSTAGP(context.yyt2);
  ------------------
  |  |   38|    477|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|    477|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  262|    477|			goto yy13;
  263|    719|	}
  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: 788]
  ------------------
  269|    391|		case 'g':
  ------------------
  |  Branch (269:3): [True: 128, False: 923]
  ------------------
  270|    664|		case 'i':
  ------------------
  |  Branch (270:3): [True: 273, False: 778]
  ------------------
  271|  1.04k|		case 's': goto yy14;
  ------------------
  |  Branch (271:3): [True: 383, False: 668]
  ------------------
  272|      4|		default: goto yy7;
  ------------------
  |  Branch (272:3): [True: 4, False: 1.04k]
  ------------------
  273|  1.05k|	}
  274|  4.53k|yy13:
  275|  4.53k|	YYSKIP();
  ------------------
  |  |   35|  4.53k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  4.53k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  276|  4.53k|	yych = YYPEEK();
  ------------------
  |  |   33|  4.53k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  4.53k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  4.53k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 4.53k, False: 0]
  |  |  ------------------
  ------------------
  277|  4.53k|	switch (yych) {
  278|      0|		case 0x00: goto yy7;
  ------------------
  |  Branch (278:3): [True: 0, False: 4.53k]
  ------------------
  279|    477|		case ';':
  ------------------
  |  Branch (279:3): [True: 477, False: 4.05k]
  ------------------
  280|    477|			YYSTAGN(context.yyt1);
  ------------------
  |  |   39|    477|#define YYSTAGN(t) t = NULL
  ------------------
  281|    477|			goto yy12;
  282|  4.05k|		default: goto yy13;
  ------------------
  |  Branch (282:3): [True: 4.05k, False: 477]
  ------------------
  283|  4.53k|	}
  284|  1.04k|yy14:
  285|  1.04k|	YYSKIP();
  ------------------
  |  |   35|  1.04k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.04k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  286|  1.04k|	yych = YYPEEK();
  ------------------
  |  |   33|  1.04k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.04k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.04k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.04k, False: 1]
  |  |  ------------------
  ------------------
  287|  1.04k|	switch (yych) {
  288|  1.04k|		case '=': goto yy5;
  ------------------
  |  Branch (288:3): [True: 1.04k, False: 1]
  ------------------
  289|      1|		default: goto yy7;
  ------------------
  |  Branch (289:3): [True: 1, False: 1.04k]
  ------------------
  290|  1.04k|	}
  291|  1.04k|}
  292|       |
  293|       |
  294|  4.56k| match:
  295|  4.56k|    if(nsu) {
  ------------------
  |  Branch (295:8): [True: 716, False: 3.85k]
  ------------------
  296|       |        /* NamespaceUri */
  297|    716|        UA_String nsUri = {(size_t)(body - 1 - nsu), (UA_Byte*)(uintptr_t)nsu};
  298|    716|        UA_StatusCode res = escapedUri2Index(nsUri, &id->namespaceIndex, nsMapping);
  299|    716|        if(res != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|    716|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (299:12): [True: 716, False: 0]
  ------------------
  300|       |            /* Return the entire NodeId string s=... */
  301|    716|            UA_String total = {(size_t)((const UA_Byte*)end - begin), begin};
  302|    716|            id->identifierType = UA_NODEIDTYPE_STRING;
  303|    716|            return UA_String_copy(&total, &id->identifier.string);
  304|    716|        }
  305|  3.85k|    } else if(ns) {
  ------------------
  |  Branch (305:15): [True: 330, False: 3.52k]
  ------------------
  306|       |        /* NamespaceIndex */
  307|    330|        UA_UInt32 tmp;
  308|    330|        size_t len = (size_t)(body - 1 - ns);
  309|    330|        if(UA_readNumber((const UA_Byte*)ns, len, &tmp) != len)
  ------------------
  |  Branch (309:12): [True: 0, False: 330]
  ------------------
  310|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  311|    330|        id->namespaceIndex = (UA_UInt16)tmp;
  312|    330|        if(nsMapping)
  ------------------
  |  Branch (312:12): [True: 0, False: 330]
  ------------------
  313|      0|            id->namespaceIndex =
  314|      0|                UA_NamespaceMapping_remote2Local(nsMapping, id->namespaceIndex);
  315|    330|    }
  316|       |
  317|       |    /* From the current position until the end */
  318|  3.85k|    return parse_nodeid_body(id, body, end, idEsc);
  319|  4.56k|}
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.85k|parse_nodeid_body(UA_NodeId *id, const u8 *body, const u8 *end, UA_Escaping esc) {
  110|  3.85k|    UA_StatusCode res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  3.85k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  111|  3.85k|    UA_String str = {(size_t)(end - (body+2)), (UA_Byte*)(uintptr_t)body + 2};
  112|  3.85k|    switch(*body) {
  113|    198|    case 'i':
  ------------------
  |  Branch (113:5): [True: 198, False: 3.65k]
  ------------------
  114|    198|        id->identifierType = UA_NODEIDTYPE_NUMERIC;
  115|    198|        if(UA_readNumber(str.data, str.length, &id->identifier.numeric) != str.length)
  ------------------
  |  Branch (115:12): [True: 20, False: 178]
  ------------------
  116|     20|            res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     20|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  117|    198|        break;
  118|  2.89k|    case 's':
  ------------------
  |  Branch (118:5): [True: 2.89k, False: 957]
  ------------------
  119|  2.89k|        id->identifierType = UA_NODEIDTYPE_STRING;
  120|  2.89k|        res |= UA_String_copy(&str, &id->identifier.string);
  121|  2.89k|        res |= UA_String_unescape(&id->identifier.string, false, esc);
  122|  2.89k|        break;
  123|     10|    case 'g':
  ------------------
  |  Branch (123:5): [True: 10, False: 3.84k]
  ------------------
  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.10k]
  ------------------
  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.85k]
  ------------------
  140|      0|        res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  141|      0|        break;
  142|  3.85k|    }
  143|  3.85k|    return res;
  144|  3.85k|}
ua_types_lex.c:parse_qn:
  707|  6.03k|         UA_UInt16 defaultNamespaceIndex) {
  708|  6.03k|    size_t len;
  709|  6.03k|    UA_UInt32 tmp;
  710|  6.03k|    UA_String str;
  711|  6.03k|    UA_StatusCode res;
  712|       |
  713|  6.03k|    LexContext context;
  714|  6.03k|    memset(&context, 0, sizeof(LexContext));
  715|       |
  716|  6.03k|    const u8 *begin = pos;
  717|  6.03k|    UA_QualifiedName_init(qn);
  718|  6.03k|    qn->namespaceIndex = defaultNamespaceIndex;
  719|       |
  720|       |    
  721|  6.03k|{
  722|  6.03k|	u8 yych;
  723|  6.03k|	yych = YYPEEK();
  ------------------
  |  |   33|  6.03k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  6.03k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.70k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.70k, False: 4.33k]
  |  |  ------------------
  ------------------
  724|  6.03k|	switch (yych) {
  725|  4.33k|		case 0x00:
  ------------------
  |  Branch (725:3): [True: 4.33k, False: 1.70k]
  ------------------
  726|  4.33k|		case ';': goto yy41;
  ------------------
  |  Branch (726:3): [True: 0, False: 6.03k]
  ------------------
  727|    141|		case '0':
  ------------------
  |  Branch (727:3): [True: 141, False: 5.89k]
  ------------------
  728|    266|		case '1':
  ------------------
  |  Branch (728:3): [True: 125, False: 5.91k]
  ------------------
  729|    339|		case '2':
  ------------------
  |  Branch (729:3): [True: 73, False: 5.96k]
  ------------------
  730|    363|		case '3':
  ------------------
  |  Branch (730:3): [True: 24, False: 6.01k]
  ------------------
  731|    394|		case '4':
  ------------------
  |  Branch (731:3): [True: 31, False: 6.00k]
  ------------------
  732|    395|		case '5':
  ------------------
  |  Branch (732:3): [True: 1, False: 6.03k]
  ------------------
  733|    542|		case '6':
  ------------------
  |  Branch (733:3): [True: 147, False: 5.88k]
  ------------------
  734|    550|		case '7':
  ------------------
  |  Branch (734:3): [True: 8, False: 6.02k]
  ------------------
  735|    550|		case '8':
  ------------------
  |  Branch (735:3): [True: 0, False: 6.03k]
  ------------------
  736|    554|		case '9': goto yy44;
  ------------------
  |  Branch (736:3): [True: 4, False: 6.03k]
  ------------------
  737|  1.15k|		default: goto yy43;
  ------------------
  |  Branch (737:3): [True: 1.15k, False: 4.88k]
  ------------------
  738|  6.03k|	}
  739|  4.33k|yy41:
  740|  4.33k|	YYSKIP();
  ------------------
  |  |   35|  4.33k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  4.33k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  741|  6.00k|yy42:
  742|  6.00k|	{ 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|    554|	YYSKIP();
  ------------------
  |  |   35|    554|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    554|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  751|    554|	YYBACKUP();
  ------------------
  |  |   36|    554|#define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   32|    554|#define YYMARKER context.marker
  |  |  ------------------
  |  |               #define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|    554|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  752|    554|	yych = YYPEEK();
  ------------------
  |  |   33|    554|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    554|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    377|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 377, False: 177]
  |  |  ------------------
  ------------------
  753|    554|	switch (yych) {
  754|      1|		case '0':
  ------------------
  |  Branch (754:3): [True: 1, False: 553]
  ------------------
  755|     28|		case '1':
  ------------------
  |  Branch (755:3): [True: 27, False: 527]
  ------------------
  756|     74|		case '2':
  ------------------
  |  Branch (756:3): [True: 46, False: 508]
  ------------------
  757|     75|		case '3':
  ------------------
  |  Branch (757:3): [True: 1, False: 553]
  ------------------
  758|     77|		case '4':
  ------------------
  |  Branch (758:3): [True: 2, False: 552]
  ------------------
  759|     79|		case '5':
  ------------------
  |  Branch (759:3): [True: 2, False: 552]
  ------------------
  760|     83|		case '6':
  ------------------
  |  Branch (760:3): [True: 4, False: 550]
  ------------------
  761|    168|		case '7':
  ------------------
  |  Branch (761:3): [True: 85, False: 469]
  ------------------
  762|    198|		case '8':
  ------------------
  |  Branch (762:3): [True: 30, False: 524]
  ------------------
  763|    208|		case '9':
  ------------------
  |  Branch (763:3): [True: 10, False: 544]
  ------------------
  764|    211|		case ':': goto yy50;
  ------------------
  |  Branch (764:3): [True: 3, False: 551]
  ------------------
  765|    343|		default: goto yy42;
  ------------------
  |  Branch (765:3): [True: 343, False: 211]
  ------------------
  766|    554|	}
  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.8k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 15.8k, 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|     13|		case ';': goto yy48;
  ------------------
  |  Branch (773:3): [True: 13, 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|     13|yy48:
  780|     13|	YYSKIP();
  ------------------
  |  |   35|     13|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|     13|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  781|     13|	{ 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: 132]
  |  |  ------------------
  ------------------
  785|  1.19M|yy50:
  786|  1.19M|	switch (yych) {
  787|  1.16M|		case '0':
  ------------------
  |  Branch (787:3): [True: 1.16M, False: 27.2k]
  ------------------
  788|  1.16M|		case '1':
  ------------------
  |  Branch (788:3): [True: 690, 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.44k, False: 1.18M]
  ------------------
  791|  1.18M|		case '4':
  ------------------
  |  Branch (791:3): [True: 5.54k, False: 1.18M]
  ------------------
  792|  1.18M|		case '5':
  ------------------
  |  Branch (792:3): [True: 490, 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: 779, False: 1.19M]
  ------------------
  795|  1.18M|		case '8':
  ------------------
  |  Branch (795:3): [True: 5.90k, 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|    194|		default: goto yy47;
  ------------------
  |  Branch (798:3): [True: 194, 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|     13| match_uri:
  817|     13|    str.length = (size_t)(pos - 1 - begin);
  818|     13|    str.data = (UA_Byte*)(uintptr_t)begin;
  819|     13|    res = escapedUri2Index(str, &qn->namespaceIndex, nsMapping);
  820|     13|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|     13|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (820:8): [True: 13, False: 0]
  ------------------
  821|     13|        pos = begin; /* Use the entire string for the name */
  822|       |
  823|  6.03k| match_name:
  824|  6.03k|    str.length = (size_t)(end - pos);
  825|  6.03k|    str.data = (UA_Byte*)(uintptr_t)pos;
  826|  6.03k|    res = UA_String_copy(&str, &qn->name);
  827|  6.03k|    if(UA_LIKELY(res == UA_STATUSCODE_GOOD))
  ------------------
  |  |  578|  6.03k|# define UA_LIKELY(x) __builtin_expect((x), 1)
  |  |  ------------------
  |  |  |  Branch (578:23): [True: 6.00k, False: 28]
  |  |  ------------------
  ------------------
  828|  6.00k|        res = UA_String_unescape(&qn->name, false, escName);
  829|  6.03k|    return res;
  830|     13|}
ua_types_lex.c:parse_relativepath:
  982|    379|                   UA_UInt16 defaultNamespaceIndex) {
  983|    379|    UA_RelativePath_init(rp);
  984|    379|    UA_Boolean done = false;
  985|    379|    UA_StatusCode res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    379|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  986|  5.73k|    do {
  987|  5.73k|        res = parse_relativepathElement(rp, ppos, end, server, esc,
  988|  5.73k|                                        defaultNamespaceIndex, &done);
  989|  5.73k|    } while(!done);
  ------------------
  |  Branch (989:13): [True: 5.35k, False: 379]
  ------------------
  990|    379|    return res;
  991|    379|}
ua_types_lex.c:parse_relativepathElement:
  852|  5.73k|                          UA_UInt16 defaultTargetNamespaceIndex, UA_Boolean *done) {
  853|  5.73k|    const u8 *pos = *ppos;
  854|  5.73k|    if(pos == end) {
  ------------------
  |  Branch (854:8): [True: 230, False: 5.50k]
  ------------------
  855|    230|        *done = true;
  856|    230|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    230|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  857|    230|    }
  858|       |
  859|       |    /* Create the element on the stack.
  860|       |     * Moved into the rp upon successful parsing. */
  861|  5.50k|    UA_RelativePathElement current;
  862|  5.50k|    UA_RelativePathElement_init(&current);
  863|  5.50k|    current.includeSubtypes = true; /* Follow subtypes by default */
  864|       |
  865|       |    /* Which ReferenceType? */
  866|  5.50k|    const u8 *begin;
  867|  5.50k|    UA_StatusCode res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  5.50k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  868|  5.50k|    switch(*pos) {
  869|    390|    case '/':
  ------------------
  |  Branch (869:5): [True: 390, False: 5.11k]
  ------------------
  870|    390|        current.referenceTypeId = UA_NODEID_NUMERIC(0, UA_NS0ID_HIERARCHICALREFERENCES);
  ------------------
  |  |   46|    390|#define UA_NS0ID_HIERARCHICALREFERENCES 33 /* ReferenceType */
  ------------------
  871|    390|        goto reftype_target;
  872|      0|    case '.':
  ------------------
  |  Branch (872:5): [True: 0, False: 5.50k]
  ------------------
  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.04k|    case '<':
  ------------------
  |  Branch (881:5): [True: 5.04k, False: 462]
  ------------------
  882|  5.04k|        break;
  883|     72|    default:
  ------------------
  |  Branch (883:5): [True: 72, False: 5.43k]
  ------------------
  884|     72|        *done = true;
  885|     72|        goto out;
  886|  5.50k|    }
  887|       |
  888|       |    /* ReferenceType with modifiers wrapped in angle brackets */
  889|  5.04k|    begin = ++pos;
  890|  26.3M|    for(; pos < end; pos++) {
  ------------------
  |  Branch (890:11): [True: 26.3M, False: 61]
  ------------------
  891|  26.3M|        if((esc == UA_ESCAPING_AND || esc == UA_ESCAPING_AND_EXTENDED) && *pos == '&') {
  ------------------
  |  Branch (891:13): [True: 0, False: 26.3M]
  |  Branch (891:39): [True: 0, False: 26.3M]
  |  Branch (891:75): [True: 0, False: 0]
  ------------------
  892|      0|            pos++;
  893|      0|            continue;
  894|      0|        }
  895|  26.3M|        if((esc == UA_ESCAPING_PERCENT || esc == UA_ESCAPING_PERCENT_EXTENDED) && *pos == '%') {
  ------------------
  |  Branch (895:13): [True: 0, False: 26.3M]
  |  Branch (895:43): [True: 26.3M, False: 0]
  |  Branch (895:83): [True: 8.09M, False: 18.2M]
  ------------------
  896|  8.09M|            pos += 2;
  897|  8.09M|            continue;
  898|  8.09M|        }
  899|  18.2M|        if(*pos == '>')
  ------------------
  |  Branch (899:12): [True: 4.98k, False: 18.2M]
  ------------------
  900|  4.98k|            break;
  901|  18.2M|    }
  902|  5.04k|    if(pos > end) {
  ------------------
  |  Branch (902:8): [True: 0, False: 5.04k]
  ------------------
  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.78k|    for(; begin < pos; begin++) {
  ------------------
  |  Branch (908:11): [True: 5.78k, False: 0]
  ------------------
  909|  5.78k|        if(*begin == '#')
  ------------------
  |  Branch (909:12): [True: 576, False: 5.20k]
  ------------------
  910|    576|            current.includeSubtypes = false;
  911|  5.20k|        else if(*begin == '!')
  ------------------
  |  Branch (911:17): [True: 164, False: 5.04k]
  ------------------
  912|    164|            current.isInverse = true;
  913|  5.04k|        else
  914|  5.04k|            break;
  915|  5.78k|    }
  916|       |
  917|       |    /* Try to parse a NodeId for the ReferenceType (non-standard!) */
  918|  5.04k|    res = parse_nodeid(&current.referenceTypeId, begin, pos, esc, NULL);
  919|  5.04k|    if(res != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|  5.04k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (919:8): [True: 678, False: 4.36k]
  ------------------
  920|       |        /* Parse the the ReferenceType from its BrowseName (default) */
  921|    678|        UA_QualifiedName refqn;
  922|    678|        res = parse_qn(&refqn, begin, pos, esc, NULL, defaultTargetNamespaceIndex);
  923|    678|        res |= lookupRefType(server, &refqn, &current.referenceTypeId);
  924|    678|        UA_QualifiedName_clear(&refqn);
  925|    678|        if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    678|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (925:12): [True: 71, False: 607]
  ------------------
  926|     71|            goto out;
  927|    678|    }
  928|       |
  929|  5.36k| reftype_target:
  930|       |    /* Move pos to the end of the TargetName based on the escaping */
  931|  5.36k|    begin = ++pos;
  932|  1.19M|    while(pos < end && *pos >= '0' && *pos <= '9')
  ------------------
  |  Branch (932:11): [True: 1.19M, False: 186]
  |  Branch (932:24): [True: 1.19M, False: 327]
  |  Branch (932:39): [True: 1.19M, False: 4.84k]
  ------------------
  933|  1.19M|        pos++;
  934|  5.36k|    if(pos < end && *pos == ':')
  ------------------
  |  Branch (934:8): [True: 5.17k, False: 186]
  |  Branch (934:21): [True: 17, False: 5.15k]
  ------------------
  935|     17|        pos++;
  936|  8.27k|    for(; pos < end; pos++) {
  ------------------
  |  Branch (936:11): [True: 8.04k, False: 233]
  ------------------
  937|  8.04k|        if((esc == UA_ESCAPING_AND || esc == UA_ESCAPING_AND_EXTENDED) && *pos == '&') {
  ------------------
  |  Branch (937:13): [True: 0, False: 8.04k]
  |  Branch (937:39): [True: 0, False: 8.04k]
  |  Branch (937:75): [True: 0, False: 0]
  ------------------
  938|      0|            pos++;
  939|      0|            continue;
  940|      0|        }
  941|  8.04k|        if((esc == UA_ESCAPING_PERCENT || esc == UA_ESCAPING_PERCENT_EXTENDED) && *pos == '%') {
  ------------------
  |  Branch (941:13): [True: 0, False: 8.04k]
  |  Branch (941:43): [True: 8.04k, False: 0]
  |  Branch (941:83): [True: 0, False: 8.04k]
  ------------------
  942|      0|            pos += 2;
  943|      0|            continue;
  944|      0|        }
  945|  8.04k|        if(esc == UA_ESCAPING_PERCENT || esc == UA_ESCAPING_PERCENT_EXTENDED) {
  ------------------
  |  Branch (945:12): [True: 0, False: 8.04k]
  |  Branch (945:42): [True: 8.04k, False: 0]
  ------------------
  946|  8.04k|            if(isReservedPercentExtended(*pos))
  ------------------
  |  Branch (946:16): [True: 5.12k, False: 2.91k]
  ------------------
  947|  5.12k|                break;
  948|  8.04k|        } else {
  949|      0|            if(isReservedAnd(*pos))
  ------------------
  |  Branch (949:16): [True: 0, False: 0]
  ------------------
  950|      0|                break;
  951|      0|        }
  952|  8.04k|    }
  953|  5.36k|    if(pos > end) {
  ------------------
  |  Branch (953:8): [True: 3, False: 5.35k]
  ------------------
  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.35k|    res = parse_qn(&current.targetName, begin, pos, esc,
  960|  5.35k|                   NULL, defaultTargetNamespaceIndex);
  961|  5.35k|    if(res != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|  5.35k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (961:8): [True: 0, False: 5.35k]
  ------------------
  962|      0|        UA_RelativePathElement_clear(&current);
  963|      0|        goto out;
  964|      0|    }
  965|       |
  966|       |    /* Add current to the rp */
  967|  5.35k|    res |= relativepath_addelem(rp, &current);
  968|       |
  969|  5.50k| out:
  970|  5.50k|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  5.50k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (970:8): [True: 77, False: 5.42k]
  ------------------
  971|     77|        UA_RelativePathElement_clear(&current);
  972|       |
  973|       |    /* Return the status */
  974|  5.50k|    *ppos = pos;
  975|  5.50k|    *done |= (res != UA_STATUSCODE_GOOD);
  ------------------
  |  |   17|  5.50k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  976|  5.50k|    return res;
  977|  5.35k|}
ua_types_lex.c:relativepath_addelem:
  686|  5.35k|relativepath_addelem(UA_RelativePath *rp, UA_RelativePathElement *el) {
  687|       |    /* Check for unrealistic path lengths */
  688|  5.35k|    if(rp->elementsSize >= UA_MAXPATHLENGTH)
  ------------------
  |  |   29|  5.35k|#define UA_MAXPATHLENGTH 128 /* Maximum relative path depth */
  ------------------
  |  Branch (688:8): [True: 3, False: 5.35k]
  ------------------
  689|      3|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      3|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  690|       |
  691|       |    /* Allocate memory */
  692|  5.35k|    UA_RelativePathElement *newArray = (UA_RelativePathElement*)
  693|  5.35k|        UA_realloc(rp->elements, sizeof(UA_RelativePathElement) * (rp->elementsSize + 1));
  ------------------
  |  |   21|  5.35k|#define UA_realloc(ptr, size) UA_reallocSingleton(ptr, size)
  ------------------
  694|  5.35k|    if(!newArray)
  ------------------
  |  Branch (694:8): [True: 0, False: 5.35k]
  ------------------
  695|      0|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
  696|  5.35k|    rp->elements = newArray;
  697|       |
  698|       |    /* Move to the target */
  699|  5.35k|    rp->elements[rp->elementsSize] = *el;
  700|  5.35k|    rp->elementsSize++;
  701|  5.35k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  5.35k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  702|  5.35k|}
ua_types_lex.c:parseAttributeOperand:
 1025|    391|                      UA_NodeId defaultId, UA_UInt16 defaultNamespaceIndex) {
 1026|       |    /* Initialize and set the default values */
 1027|    391|    UA_AttributeOperand_init(ao);
 1028|    391|    ao->nodeId = defaultId;
 1029|    391|    ao->attributeId = UA_ATTRIBUTEID_VALUE;
 1030|       |
 1031|       |    /* Nothing to parse */
 1032|    391|    if(str.length == 0)
  ------------------
  |  Branch (1032:8): [True: 0, False: 391]
  ------------------
 1033|      0|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1034|       |
 1035|    391|    const u8 *pos = str.data;
 1036|    391|    const u8 *end = pos + str.length;
 1037|    391|    UA_StatusCode res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    391|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1038|       |
 1039|       |    /* Initial NodeId before the BrowsePath */
 1040|    391|    LexContext context;
 1041|    391|    memset(&context, 0, sizeof(LexContext));
 1042|       |    
 1043|    391|{
 1044|    391|	u8 yych;
 1045|    391|	yych = YYPEEK();
  ------------------
  |  |   33|    391|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    391|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    391|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 391, False: 0]
  |  |  ------------------
  ------------------
 1046|    391|	switch (yych) {
 1047|      1|		case 'b':
  ------------------
  |  Branch (1047:3): [True: 1, False: 390]
  ------------------
 1048|      9|		case 'g':
  ------------------
  |  Branch (1048:3): [True: 8, False: 383]
  ------------------
 1049|     14|		case 'i':
  ------------------
  |  Branch (1049:3): [True: 5, False: 386]
  ------------------
 1050|     71|		case 's': goto yy55;
  ------------------
  |  Branch (1050:3): [True: 57, False: 334]
  ------------------
 1051|     89|		case 'n': goto yy56;
  ------------------
  |  Branch (1051:3): [True: 89, False: 302]
  ------------------
 1052|    231|		default: goto yy53;
  ------------------
  |  Branch (1052:3): [True: 231, False: 160]
  ------------------
 1053|    391|	}
 1054|    231|yy53:
 1055|    231|	YYSKIP();
  ------------------
  |  |   35|    231|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    231|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1056|    244|yy54:
 1057|    244|	{ pos = str.data; goto parse_path; }
 1058|     71|yy55:
 1059|     71|	YYSKIP();
  ------------------
  |  |   35|     71|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|     71|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1060|     71|	yych = YYPEEK();
  ------------------
  |  |   33|     71|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     71|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     71|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 71, False: 0]
  |  |  ------------------
  ------------------
 1061|     71|	switch (yych) {
 1062|     70|		case '=': goto yy57;
  ------------------
  |  Branch (1062:3): [True: 70, False: 1]
  ------------------
 1063|      1|		default: goto yy54;
  ------------------
  |  Branch (1063:3): [True: 1, False: 70]
  ------------------
 1064|     71|	}
 1065|     89|yy56:
 1066|     89|	YYSKIP();
  ------------------
  |  |   35|     89|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|     89|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1067|     89|	YYBACKUP();
  ------------------
  |  |   36|     89|#define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   32|     89|#define YYMARKER context.marker
  |  |  ------------------
  |  |               #define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|     89|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1068|     89|	yych = YYPEEK();
  ------------------
  |  |   33|     89|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     89|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     89|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 89, False: 0]
  |  |  ------------------
  ------------------
 1069|     89|	switch (yych) {
 1070|     88|		case 's': goto yy58;
  ------------------
  |  Branch (1070:3): [True: 88, False: 1]
  ------------------
 1071|      1|		default: goto yy54;
  ------------------
  |  Branch (1071:3): [True: 1, False: 88]
  ------------------
 1072|     89|	}
 1073|    147|yy57:
 1074|    147|	YYSKIP();
  ------------------
  |  |   35|    147|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    147|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1075|    147|	{
 1076|       |        // Find the end position of the NodeId body and parse
 1077|   280k|        for(; pos < end; pos++) {
  ------------------
  |  Branch (1077:15): [True: 280k, False: 5]
  ------------------
 1078|   280k|            if(*pos == '%') {
  ------------------
  |  Branch (1078:16): [True: 2, False: 280k]
  ------------------
 1079|      2|                pos += 2;
 1080|      2|                continue;
 1081|      2|            }
 1082|   280k|            if(isReservedPercentExtended(*pos))
  ------------------
  |  Branch (1082:16): [True: 142, False: 280k]
  ------------------
 1083|    142|                break;
 1084|   280k|        }
 1085|    147|        if(pos > end) {
  ------------------
  |  Branch (1085:12): [True: 0, False: 147]
  ------------------
 1086|      0|            res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1087|      0|            goto cleanup;
 1088|      0|        }
 1089|    147|        res = parse_nodeid(&ao->nodeId, str.data, pos, UA_ESCAPING_PERCENT, NULL);
 1090|    147|        if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    147|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1090:12): [True: 12, False: 135]
  ------------------
 1091|     12|            goto cleanup;
 1092|    135|        goto parse_path;
 1093|    147|    }
 1094|    135|yy58:
 1095|     88|	YYSKIP();
  ------------------
  |  |   35|     88|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|     88|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1096|     88|	yych = YYPEEK();
  ------------------
  |  |   33|     88|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     88|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     88|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 88, False: 0]
  |  |  ------------------
  ------------------
 1097|     88|	switch (yych) {
 1098|     76|		case '=': goto yy60;
  ------------------
  |  Branch (1098:3): [True: 76, False: 12]
  ------------------
 1099|     12|		case 'u': goto yy61;
  ------------------
  |  Branch (1099:3): [True: 12, False: 76]
  ------------------
 1100|      0|		default: goto yy59;
  ------------------
  |  Branch (1100:3): [True: 0, False: 88]
  ------------------
 1101|     88|	}
 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|     76|yy60:
 1106|     76|	YYSKIP();
  ------------------
  |  |   35|     76|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|     76|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1107|     76|	yych = YYPEEK();
  ------------------
  |  |   33|     76|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     76|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     76|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 76, False: 0]
  |  |  ------------------
  ------------------
 1108|     76|	switch (yych) {
 1109|      0|		case '0':
  ------------------
  |  Branch (1109:3): [True: 0, False: 76]
  ------------------
 1110|      0|		case '1':
  ------------------
  |  Branch (1110:3): [True: 0, False: 76]
  ------------------
 1111|     18|		case '2':
  ------------------
  |  Branch (1111:3): [True: 18, False: 58]
  ------------------
 1112|     75|		case '3':
  ------------------
  |  Branch (1112:3): [True: 57, False: 19]
  ------------------
 1113|     75|		case '4':
  ------------------
  |  Branch (1113:3): [True: 0, False: 76]
  ------------------
 1114|     75|		case '5':
  ------------------
  |  Branch (1114:3): [True: 0, False: 76]
  ------------------
 1115|     75|		case '6':
  ------------------
  |  Branch (1115:3): [True: 0, False: 76]
  ------------------
 1116|     75|		case '7':
  ------------------
  |  Branch (1116:3): [True: 0, False: 76]
  ------------------
 1117|     76|		case '8':
  ------------------
  |  Branch (1117:3): [True: 1, False: 75]
  ------------------
 1118|     76|		case '9': goto yy62;
  ------------------
  |  Branch (1118:3): [True: 0, False: 76]
  ------------------
 1119|      0|		default: goto yy59;
  ------------------
  |  Branch (1119:3): [True: 0, False: 76]
  ------------------
 1120|     76|	}
 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|    112|yy62:
 1129|    112|	YYSKIP();
  ------------------
  |  |   35|    112|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    112|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1130|    112|	yych = YYPEEK();
  ------------------
  |  |   33|    112|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    112|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    112|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 112, False: 0]
  |  |  ------------------
  ------------------
 1131|    112|	switch (yych) {
 1132|      0|		case '0':
  ------------------
  |  Branch (1132:3): [True: 0, False: 112]
  ------------------
 1133|      0|		case '1':
  ------------------
  |  Branch (1133:3): [True: 0, False: 112]
  ------------------
 1134|      0|		case '2':
  ------------------
  |  Branch (1134:3): [True: 0, False: 112]
  ------------------
 1135|      0|		case '3':
  ------------------
  |  Branch (1135:3): [True: 0, False: 112]
  ------------------
 1136|      0|		case '4':
  ------------------
  |  Branch (1136:3): [True: 0, False: 112]
  ------------------
 1137|     18|		case '5':
  ------------------
  |  Branch (1137:3): [True: 18, False: 94]
  ------------------
 1138|     18|		case '6':
  ------------------
  |  Branch (1138:3): [True: 0, False: 112]
  ------------------
 1139|     36|		case '7':
  ------------------
  |  Branch (1139:3): [True: 18, False: 94]
  ------------------
 1140|     36|		case '8':
  ------------------
  |  Branch (1140:3): [True: 0, False: 112]
  ------------------
 1141|     36|		case '9': goto yy62;
  ------------------
  |  Branch (1141:3): [True: 0, False: 112]
  ------------------
 1142|     75|		case ';': goto yy64;
  ------------------
  |  Branch (1142:3): [True: 75, False: 37]
  ------------------
 1143|      1|		default: goto yy59;
  ------------------
  |  Branch (1143:3): [True: 1, False: 111]
  ------------------
 1144|    112|	}
 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|     79|yy64:
 1154|     79|	YYSKIP();
  ------------------
  |  |   35|     79|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|     79|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1155|     79|	yych = YYPEEK();
  ------------------
  |  |   33|     79|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     79|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     79|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 79, False: 0]
  |  |  ------------------
  ------------------
 1156|     79|	switch (yych) {
 1157|      2|		case 'b':
  ------------------
  |  Branch (1157:3): [True: 2, False: 77]
  ------------------
 1158|      2|		case 'g':
  ------------------
  |  Branch (1158:3): [True: 0, False: 79]
  ------------------
 1159|     77|		case 'i':
  ------------------
  |  Branch (1159:3): [True: 75, False: 4]
  ------------------
 1160|     77|		case 's': goto yy65;
  ------------------
  |  Branch (1160:3): [True: 0, False: 79]
  ------------------
 1161|      2|		default: goto yy59;
  ------------------
  |  Branch (1161:3): [True: 2, False: 77]
  ------------------
 1162|     79|	}
 1163|     77|yy65:
 1164|     77|	YYSKIP();
  ------------------
  |  |   35|     77|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|     77|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1165|     77|	yych = YYPEEK();
  ------------------
  |  |   33|     77|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     77|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     77|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 77, False: 0]
  |  |  ------------------
  ------------------
 1166|     77|	switch (yych) {
 1167|     77|		case '=': goto yy57;
  ------------------
  |  Branch (1167:3): [True: 77, False: 0]
  ------------------
 1168|      0|		default: goto yy59;
  ------------------
  |  Branch (1168:3): [True: 0, False: 77]
  ------------------
 1169|     77|	}
 1170|     77|}
 1171|       |
 1172|       |
 1173|       |    /* Parse the BrowsePath */
 1174|    379| parse_path:
 1175|    379|    res = parse_relativepath(&ao->browsePath, &pos, end, NULL,
 1176|    379|                             UA_ESCAPING_PERCENT_EXTENDED, defaultNamespaceIndex);
 1177|    379|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    379|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1177:8): [True: 77, False: 302]
  ------------------
 1178|     77|        goto cleanup;
 1179|       |
 1180|       |    /* Parse the AttributeId */
 1181|    302|    if(pos < end && *pos == '#') {
  ------------------
  |  Branch (1181:8): [True: 72, False: 230]
  |  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|    289|    if(pos < end && *pos == '[') {
  ------------------
  |  Branch (1196:8): [True: 59, False: 230]
  |  Branch (1196:21): [True: 39, False: 20]
  ------------------
 1197|     39|        const u8 *range_pos = ++pos;
 1198|  8.19M|        while(pos < end && *pos != ']') {
  ------------------
  |  Branch (1198:15): [True: 8.19M, False: 0]
  |  Branch (1198:28): [True: 8.19M, False: 39]
  ------------------
 1199|  8.19M|            pos++;
 1200|  8.19M|        }
 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|    289|    if(pos != end)
  ------------------
  |  Branch (1212:8): [True: 21, False: 268]
  ------------------
 1213|     21|        res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     21|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1214|       |
 1215|       |
 1216|    391| cleanup:
 1217|    391|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    391|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1217:8): [True: 123, False: 268]
  ------------------
 1218|    123|        UA_AttributeOperand_clear(ao);
 1219|    391|    return res;
 1220|    289|}

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|    545|UA_readNumberWithBase(const UA_Byte *buf, size_t buflen, UA_UInt32 *number, UA_Byte base) {
  112|    545|    UA_assert(buf);
  ------------------
  |  |  399|    545|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (112:5): [True: 545, False: 0]
  ------------------
  113|    545|    UA_assert(number);
  ------------------
  |  |  399|    545|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (113:5): [True: 545, False: 0]
  ------------------
  114|    545|    u32 n = 0;
  115|    545|    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: 525]
  ------------------
  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: 16]
  |  Branch (119:36): [True: 1.19M, False: 0]
  ------------------
  120|  1.19M|           n = (n * base) + c - '0';
  121|     20|        else if(base > 9 && c >= 'a' && c <= 'z' && c <= 'a' + (base-11))
  ------------------
  |  Branch (121:17): [True: 20, False: 0]
  |  Branch (121:29): [True: 16, False: 4]
  |  Branch (121:41): [True: 4, False: 12]
  |  Branch (121:53): [True: 0, False: 4]
  ------------------
  122|      0|           n = (n * base) + c-'a' + 10;
  123|     20|        else if(base > 9 && c >= 'A' && c <= 'Z' && c <= 'A' + (base-11))
  ------------------
  |  Branch (123:17): [True: 20, False: 0]
  |  Branch (123:29): [True: 16, False: 4]
  |  Branch (123:41): [True: 0, False: 16]
  |  Branch (123:53): [True: 0, False: 0]
  ------------------
  124|      0|           n = (n * base) + c-'A' + 10;
  125|     20|        else
  126|     20|           break;
  127|  1.19M|        ++progress;
  128|  1.19M|    }
  129|    545|    *number = n;
  130|    545|    return progress;
  131|    545|}
UA_readNumber:
  134|    545|UA_readNumber(const UA_Byte *buf, size_t buflen, UA_UInt32 *number) {
  135|    545|    return UA_readNumberWithBase(buf, buflen, number, 10);
  136|    545|}
lookupRefType:
  727|    678|lookupRefType(UA_Server *server, UA_QualifiedName *qn, UA_NodeId *outRefTypeId) {
  728|       |    /* Check well-known ReferenceTypes first */
  729|    678|    if(qn->namespaceIndex == 0) {
  ------------------
  |  Branch (729:8): [True: 678, False: 0]
  ------------------
  730|  3.25k|        for(size_t i = 0; i < KNOWNREFTYPES; i++) {
  ------------------
  |  |  705|  3.25k|#define KNOWNREFTYPES 17
  ------------------
  |  Branch (730:27): [True: 3.18k, False: 71]
  ------------------
  731|  3.18k|            if(UA_String_equal(&qn->name, &knownRefTypes[i].browseName)) {
  ------------------
  |  Branch (731:16): [True: 607, False: 2.58k]
  ------------------
  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.18k|        }
  736|    678|    }
  737|       |
  738|       |    /* Browse the information model. Return the first results if the browse name
  739|       |     * in the hierarchy is ambiguous. */
  740|     71|    if(server) {
  ------------------
  |  Branch (740:8): [True: 0, False: 71]
  ------------------
  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|     71|    return UA_STATUSCODE_BADNOTFOUND;
  ------------------
  |  |  233|     71|#define UA_STATUSCODE_BADNOTFOUND ((UA_StatusCode) 0x803E0000)
  ------------------
  771|     71|}
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.62k|    return UA_NodeId_print(refTypeId, outBN);
  789|  5.26k|}
UA_String_unescape:
  803|  8.90k|UA_String_unescape(UA_String *str, UA_Boolean copyEscape, UA_Escaping esc) {
  804|  8.90k|    if(esc == UA_ESCAPING_NONE)
  ------------------
  |  Branch (804:8): [True: 0, False: 8.90k]
  ------------------
  805|      0|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  806|       |
  807|       |    /* Does the string need escaping? */
  808|  8.90k|    UA_String tmp;
  809|  8.90k|    status res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  8.90k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  810|  8.90k|    u8 *pos = str->data;
  811|  8.90k|    u8 *end = str->data + str->length;
  812|  8.90k|    u8 escape_char = (esc == UA_ESCAPING_PERCENT ||
  ------------------
  |  Branch (812:23): [True: 57, False: 8.84k]
  ------------------
  813|  8.90k|                      esc == UA_ESCAPING_PERCENT_EXTENDED) ? '%' : '&';
  ------------------
  |  Branch (813:23): [True: 8.84k, False: 0]
  ------------------
  814|  5.55M|    for(; pos < end; pos++) {
  ------------------
  |  Branch (814:11): [True: 5.54M, False: 7.98k]
  ------------------
  815|  5.54M|        if(*pos == escape_char)
  ------------------
  |  Branch (815:12): [True: 914, False: 5.54M]
  ------------------
  816|    914|            goto escape;
  817|  5.54M|    }
  818|       |
  819|  7.98k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  7.98k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  820|       |
  821|    914| escape:
  822|    914|    if(copyEscape) {
  ------------------
  |  Branch (822:8): [True: 0, False: 914]
  ------------------
  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|    914|    u8 byte = 0;
  831|    914|    u8 *writepos = pos;
  832|       |
  833|    914|    res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    914|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  834|    914|    if(esc == UA_ESCAPING_PERCENT ||
  ------------------
  |  Branch (834:8): [True: 0, False: 914]
  ------------------
  835|    914|       esc == UA_ESCAPING_PERCENT_EXTENDED) {
  ------------------
  |  Branch (835:8): [True: 914, False: 0]
  ------------------
  836|       |        /* Percent-Escaping */
  837|  9.32M|        for(; pos < end; pos++) {
  ------------------
  |  Branch (837:15): [True: 9.32M, False: 882]
  ------------------
  838|  9.32M|            if(*pos == '%') {
  ------------------
  |  Branch (838:16): [True: 8.09M, False: 1.23M]
  ------------------
  839|  8.09M|                if(pos + 2 >= end || !isHex(pos[1]) || !isHex(pos[2]))
  ------------------
  |  Branch (839:20): [True: 0, False: 8.09M]
  |  Branch (839:38): [True: 30, False: 8.08M]
  |  Branch (839:56): [True: 2, False: 8.08M]
  ------------------
  840|     32|                    goto out;
  841|  8.08M|                if(pos[1] >= 'a')
  ------------------
  |  Branch (841:20): [True: 231, False: 8.08M]
  ------------------
  842|    231|                    byte = pos[1] - ('a' - 10);
  843|  8.08M|                else if(pos[1] >= 'A')
  ------------------
  |  Branch (843:25): [True: 3, False: 8.08M]
  ------------------
  844|      3|                    byte = pos[1] - ('A' - 10);
  845|  8.08M|                else
  846|  8.08M|                    byte = pos[1] - '0';
  847|  8.08M|                byte <<= 4;
  848|       |
  849|  8.08M|                if(pos[2] >= 'a')
  ------------------
  |  Branch (849:20): [True: 4.02M, False: 4.06M]
  ------------------
  850|  4.02M|                    byte += (u8)(pos[2] - ('a' - 10));
  851|  4.06M|                else if(pos[2] >= 'A')
  ------------------
  |  Branch (851:25): [True: 99, False: 4.06M]
  ------------------
  852|     99|                    byte += (u8)(pos[2] - ('A' - 10));
  853|  4.06M|                else
  854|  4.06M|                    byte += (u8)(pos[2] - '0');
  855|       |
  856|  8.08M|                pos += 2;
  857|  8.08M|                *writepos++ = byte;
  858|  8.08M|                continue;
  859|  8.09M|            }
  860|  1.23M|            *writepos++ = *pos;
  861|  1.23M|        }
  862|    914|    } 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|    882|    res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    882|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  874|       |
  875|    914| out:
  876|    914|    if(copyEscape) {
  ------------------
  |  Branch (876:8): [True: 0, False: 914]
  ------------------
  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|    914|    } else if(res == UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|    914|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (884:15): [True: 882, False: 32]
  ------------------
  885|    882|        str->length = (size_t)(writepos - str->data);
  886|    882|    }
  887|    914|    return res;
  888|    882|}
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|  52.3M|    for(size_t j = 0; j < s.length; j++) {
  ------------------
  |  Branch (897:23): [True: 52.3M, False: 12.0k]
  ------------------
  898|  52.3M|        if(esc == UA_ESCAPING_AND_EXTENDED)
  ------------------
  |  Branch (898:12): [True: 0, False: 52.3M]
  ------------------
  899|      0|            overhead += isReservedAndExtended(s.data[j]);
  900|  52.3M|        else if(esc == UA_ESCAPING_AND)
  ------------------
  |  Branch (900:17): [True: 0, False: 52.3M]
  ------------------
  901|      0|            overhead += isReservedAnd(s.data[j]);
  902|  52.3M|        else if(esc == UA_ESCAPING_PERCENT)
  ------------------
  |  Branch (902:17): [True: 0, False: 52.3M]
  ------------------
  903|      0|            overhead += (isReservedPercent(s.data[j]) ? 2 : 0);
  ------------------
  |  Branch (903:26): [True: 0, False: 0]
  ------------------
  904|  52.3M|        else /* if(esc == UA_ESCAPING_PERCENT_EXTENDED) */
  905|  52.3M|            overhead += (isReservedPercentExtended(s.data[j]) ? 2 : 0);
  ------------------
  |  Branch (905:26): [True: 48.5M, False: 3.83M]
  ------------------
  906|  52.3M|    }
  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.17k]
  ------------------
  916|  17.4M|        for(size_t j = 0; j < s2.length; j++)
  ------------------
  |  Branch (916:27): [True: 17.4M, False: 2.59k]
  ------------------
  917|  17.4M|            *pos++ = s2.data[j];
  918|  8.17k|    } else if(esc == UA_ESCAPING_PERCENT || esc == UA_ESCAPING_PERCENT_EXTENDED) {
  ------------------
  |  Branch (918:15): [True: 0, False: 8.17k]
  |  Branch (918:45): [True: 8.17k, False: 0]
  ------------------
  919|  17.4M|        for(size_t j = 0; j < s2.length; j++) {
  ------------------
  |  Branch (919:27): [True: 17.4M, False: 8.17k]
  ------------------
  920|  17.4M|            UA_Boolean reserved = (esc == UA_ESCAPING_PERCENT_EXTENDED) ?
  ------------------
  |  Branch (920:35): [True: 17.4M, False: 0]
  ------------------
  921|  17.4M|                isReservedPercentExtended(s2.data[j]) : isReservedPercent(s2.data[j]);
  922|  17.4M|            if(UA_LIKELY(!reserved)) {
  ------------------
  |  |  578|  17.4M|# define UA_LIKELY(x) __builtin_expect((x), 1)
  |  |  ------------------
  |  |  |  Branch (578:23): [True: 1.29M, False: 16.1M]
  |  |  ------------------
  ------------------
  923|  1.29M|                *pos++ = s2.data[j];
  924|  16.1M|            } else {
  925|  16.1M|                *pos++ = '%';
  926|  16.1M|                *pos++ = hexchars[s2.data[j] >> 4];
  927|  16.1M|                *pos++ = hexchars[s2.data[j] & 0x0f];
  928|  16.1M|            }
  929|  17.4M|        }
  930|  8.17k|    } 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.11k|UA_String_escapeAppend(UA_String *s, const UA_String s2, UA_Escaping esc) {
  945|  8.11k|    if(esc == UA_ESCAPING_NONE)
  ------------------
  |  Branch (945:8): [True: 0, False: 8.11k]
  ------------------
  946|      0|        return UA_String_append(s, s2);
  947|       |
  948|       |    /* Allocate memory for the additional escaped string */
  949|  8.11k|    size_t escapedLength = UA_String_escapedSize(s2, esc);
  950|  8.11k|    UA_Byte *buf = (UA_Byte*)
  951|  8.11k|        UA_realloc((void*)((uintptr_t)s->data & ~(uintptr_t)UA_EMPTY_ARRAY_SENTINEL),
  ------------------
  |  |   21|  8.11k|#define UA_realloc(ptr, size) UA_reallocSingleton(ptr, size)
  ------------------
  952|  8.11k|                   s->length + s2.length + escapedLength);
  953|  8.11k|    if(!buf)
  ------------------
  |  Branch (953:8): [True: 0, False: 8.11k]
  ------------------
  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.11k|    s->data = buf;
  958|  8.11k|    UA_String_escapeInsert(s->data + s->length, s2, esc);
  959|  8.11k|    s->length += escapedLength;
  960|  8.11k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  8.11k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  961|  8.11k|}
UA_AttributeOperand_print:
 1125|    268|                          UA_String *out) {
 1126|    268|    UA_String tmp = UA_STRING_NULL;
 1127|    268|    UA_StatusCode res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    268|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1128|       |
 1129|       |    /* Print the TypeDefinitionId */
 1130|    268|    if(!UA_NodeId_equal(&objectsFolder, &ao->nodeId)) {
  ------------------
  |  Branch (1130:8): [True: 128, False: 140]
  ------------------
 1131|    128|        UA_Byte nodeIdBuf[512];
 1132|    128|        UA_String nodeIdBufStr = {512, nodeIdBuf};
 1133|    128|        res |= nodeId_printEscape(&ao->nodeId, &nodeIdBufStr,
 1134|    128|                                  NULL, UA_ESCAPING_PERCENT_EXTENDED);
 1135|    128|        res |= UA_String_append(&tmp, nodeIdBufStr);
 1136|    128|    }
 1137|       |
 1138|       |    /* Print the BrowsePath */
 1139|    268|    UA_String rpstr = UA_STRING_NULL;
 1140|    268|    UA_assert(rpstr.data == NULL && rpstr.length == 0); /* pacify clang scan-build */
  ------------------
  |  |  399|    268|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (1140:5): [True: 268, False: 0]
  |  Branch (1140:5): [True: 268, False: 0]
  ------------------
 1141|    268|    res |= printRelativePath(&ao->browsePath, &rpstr, UA_ESCAPING_PERCENT_EXTENDED);
 1142|    268|    res |= UA_String_append(&tmp, rpstr);
 1143|    268|    UA_String_clear(&rpstr);
 1144|       |
 1145|       |    /* Print the attribute name */
 1146|    268|    if(ao->attributeId != UA_ATTRIBUTEID_VALUE) {
  ------------------
  |  Branch (1146:8): [True: 0, False: 268]
  ------------------
 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|    268|    if(ao->indexRange.length > 0) {
  ------------------
  |  Branch (1153:8): [True: 38, False: 230]
  ------------------
 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|    268|    if(res != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|    268|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1160:8): [True: 0, False: 268]
  ------------------
 1161|      0|        UA_String_clear(&tmp);
 1162|      0|        return res;
 1163|      0|    }
 1164|       |
 1165|    268|    return moveTmpToOut(&tmp, out);
 1166|    268|}
ua_util.c:isHex:
  796|  16.1M|isHex(u8 c) {
  797|  16.1M|    return ((c >= 'a' && c <= 'f') ||
  ------------------
  |  Branch (797:14): [True: 4.02M, False: 12.1M]
  |  Branch (797:26): [True: 4.02M, False: 13]
  ------------------
  798|  12.1M|            (c >= 'A' && c <= 'F') ||
  ------------------
  |  Branch (798:14): [True: 116, False: 12.1M]
  |  Branch (798:26): [True: 102, False: 14]
  ------------------
  799|  12.1M|            (c >= '0' && c <= '9'));
  ------------------
  |  Branch (799:14): [True: 12.1M, False: 18]
  |  Branch (799:26): [True: 12.1M, False: 14]
  ------------------
  800|  16.1M|}
ua_util.c:printRelativePath:
 1001|    268|printRelativePath(const UA_RelativePath *rp, UA_String *out, UA_Escaping esc) {
 1002|    268|    UA_String tmp = UA_STRING_NULL;
 1003|    268|    UA_StatusCode res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    268|#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: 268]
  |  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: 404, False: 3.72k]
  ------------------
 1008|    404|           !elm->isInverse && elm->includeSubtypes) {
  ------------------
  |  Branch (1008:12): [True: 276, False: 128]
  |  Branch (1008:31): [True: 146, False: 130]
  ------------------
 1009|    146|            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.27k, False: 2.70k]
  ------------------
 1027|  1.27k|                UA_String_init(&bnBufStr);
 1028|  1.27k|                res = getRefTypeBrowseName(&elm->referenceTypeId, &bnBufStr);
 1029|  1.27k|                if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  1.27k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1029:20): [True: 0, False: 1.27k]
  ------------------
 1030|      0|                    break;
 1031|  1.27k|            }
 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.27k, False: 2.70k]
  ------------------
 1035|  1.27k|                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.11k]
  ------------------
 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|    268|    if(res != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|    268|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1050:8): [True: 0, False: 268]
  ------------------
 1051|      0|        UA_String_clear(&tmp);
 1052|      0|        return res;
 1053|      0|    }
 1054|       |
 1055|    268|    return moveTmpToOut(&tmp, out);
 1056|    268|}
ua_util.c:moveTmpToOut:
  964|    536|moveTmpToOut(UA_String *tmp, UA_String *out) {
  965|       |    /* Output has zero length */
  966|    536|    if(tmp->length == 0) {
  ------------------
  |  Branch (966:8): [True: 34, False: 502]
  ------------------
  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|    502|    if(out->length == 0) {
  ------------------
  |  Branch (975:8): [True: 502, False: 0]
  ------------------
  976|    502|        *out = *tmp;
  977|    502|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    502|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  978|    502|    }
  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|  69.8M|isReservedPercent(u8 c) {
   96|  69.8M|    return (c == ';'  || c == '%' || c <= ' ' || c == 127);
  ------------------
  |  Branch (96:13): [True: 11.6k, False: 69.8M]
  |  Branch (96:26): [True: 4.13k, False: 69.8M]
  |  Branch (96:38): [True: 31.5M, False: 38.2M]
  |  Branch (96:50): [True: 192, False: 38.2M]
  ------------------
   97|  69.8M|}
ua_util.c:isReservedPercentExtended:
  100|  69.8M|isReservedPercentExtended(u8 c) {
  101|  69.8M|    return (isReservedPercent(c) || c == ':' || c == '#' || c == '[' || c == ']' ||
  ------------------
  |  Branch (101:13): [True: 31.5M, False: 38.2M]
  |  Branch (101:37): [True: 2.49k, False: 38.2M]
  |  Branch (101:49): [True: 3.45k, False: 38.2M]
  |  Branch (101:61): [True: 32.0M, False: 6.15M]
  |  Branch (101:73): [True: 16.3k, False: 6.13M]
  ------------------
  102|  6.13M|            c == '&' || c == '(' || c == ')' || c == ',' || c == '<' || c == '>' ||
  ------------------
  |  Branch (102:13): [True: 536k, False: 5.59M]
  |  Branch (102:25): [True: 173k, False: 5.42M]
  |  Branch (102:37): [True: 176k, False: 5.25M]
  |  Branch (102:49): [True: 43.7k, False: 5.20M]
  |  Branch (102:61): [True: 14.4k, False: 5.19M]
  |  Branch (102:73): [True: 0, False: 5.19M]
  ------------------
  103|  5.19M|            c == '`' || c == '/' || c == '\\' || c == '"' || c == '\'' );
  ------------------
  |  Branch (103:13): [True: 12.6k, False: 5.17M]
  |  Branch (103:25): [True: 28.1k, False: 5.15M]
  |  Branch (103:37): [True: 1.72k, False: 5.14M]
  |  Branch (103:50): [True: 12.3k, False: 5.13M]
  |  Branch (103:62): [True: 3.51k, False: 5.13M]
  ------------------
  104|  69.8M|}
ua_types_lex.c:isReservedPercentExtended:
  100|   288k|isReservedPercentExtended(u8 c) {
  101|   288k|    return (isReservedPercent(c) || c == ':' || c == '#' || c == '[' || c == ']' ||
  ------------------
  |  Branch (101:13): [True: 8, False: 288k]
  |  Branch (101:37): [True: 0, False: 288k]
  |  Branch (101:49): [True: 0, False: 288k]
  |  Branch (101:61): [True: 6, False: 288k]
  |  Branch (101:73): [True: 0, False: 288k]
  ------------------
  102|   288k|            c == '&' || c == '(' || c == ')' || c == ',' || c == '<' || c == '>' ||
  ------------------
  |  Branch (102:13): [True: 0, False: 288k]
  |  Branch (102:25): [True: 0, False: 288k]
  |  Branch (102:37): [True: 0, False: 288k]
  |  Branch (102:49): [True: 0, False: 288k]
  |  Branch (102:61): [True: 4.88k, 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: 373, False: 283k]
  |  Branch (103:37): [True: 0, False: 283k]
  |  Branch (103:50): [True: 0, False: 283k]
  |  Branch (103:62): [True: 0, False: 283k]
  ------------------
  104|   288k|}
ua_types_lex.c:isReservedPercent:
   95|   288k|isReservedPercent(u8 c) {
   96|   288k|    return (c == ';'  || c == '%' || c <= ' ' || c == 127);
  ------------------
  |  Branch (96:13): [True: 0, False: 288k]
  |  Branch (96:26): [True: 0, False: 288k]
  |  Branch (96:38): [True: 8, False: 288k]
  |  Branch (96:50): [True: 0, False: 288k]
  ------------------
   97|   288k|}

UA_memoryManager_setLimitFromLast4Bytes:
  161|    257|int UA_memoryManager_setLimitFromLast4Bytes(const uint8_t *data, size_t size) {
  162|    257|    UA_mallocSingleton = UA_memoryManager_malloc;
  163|    257|    UA_freeSingleton = UA_memoryManager_free;
  164|    257|    UA_callocSingleton = UA_memoryManager_calloc;
  165|    257|    UA_reallocSingleton = UA_memoryManager_realloc;
  166|    257|    if(size <4)
  ------------------
  |  Branch (166:8): [True: 0, False: 257]
  ------------------
  167|      0|        return 0;
  168|       |    // just cast the last 4 bytes to uint32
  169|    257|    uint32_t limit;
  170|    257|    memcpy(&limit, &data[size-4], sizeof(uint32_t));
  171|    257|    memoryLimit = limit;
  172|    257|    return 1;
  173|    257|}
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: 20, False: 267]
  ------------------
  116|     20|        return NULL;
  117|    267|    void *addr = malloc(size);
  118|    267|    if(!addr)
  ------------------
  |  Branch (118:8): [True: 0, False: 267]
  ------------------
  119|      0|        return NULL;
  120|    267|    addToMap(size, addr);
  121|    267|    return addr;
  122|    267|}
custom_memory_manager.c:addToMap:
   52|  29.0k|static int addToMap(size_t size, void *addr) {
   53|  29.0k|    struct UA_mm_entry *newEntry = (struct UA_mm_entry*)malloc(sizeof(struct UA_mm_entry));
   54|  29.0k|    if(!newEntry) {
  ------------------
  |  Branch (54:8): [True: 0, False: 29.0k]
  ------------------
   55|       |        //printf("MemoryManager: Could not allocate memory");
   56|      0|        return 0;
   57|      0|    }
   58|  29.0k|    newEntry->size = size;
   59|  29.0k|    newEntry->address = addr;
   60|  29.0k|    newEntry->next = NULL;
   61|  29.0k|    pthread_mutex_lock(&mutex);
   62|  29.0k|    newEntry->prev = address_map_last;
   63|  29.0k|    if(address_map_last)
  ------------------
  |  Branch (63:8): [True: 28.6k, False: 448]
  ------------------
   64|  28.6k|        address_map_last->next = newEntry;
   65|  29.0k|    address_map_last = newEntry;
   66|  29.0k|    totalMemorySize += size;
   67|  29.0k|    if(address_map_first == NULL)
  ------------------
  |  Branch (67:8): [True: 448, False: 28.6k]
  ------------------
   68|    448|        address_map_first = newEntry;
   69|  29.0k|    pthread_mutex_unlock(&mutex);
   70|       |    //printf("Total size (malloc): %lld And new address: %p Entry %p\n", totalMemorySize, addr, (void*)newEntry);
   71|       |
   72|  29.0k|    return 1;
   73|  29.0k|}
custom_memory_manager.c:UA_memoryManager_free:
  146|  13.4k|static void UA_memoryManager_free(void* ptr) {
  147|  13.4k|    removeFromMap(ptr);
  148|  13.4k|    free(ptr);
  149|  13.4k|}
custom_memory_manager.c:removeFromMap:
   82|  35.8k|static int removeFromMap(void *addr) {
   83|  35.8k|    if(addr == NULL)
  ------------------
  |  Branch (83:8): [True: 6.79k, False: 29.0k]
  ------------------
   84|  6.79k|        return 1;
   85|       |
   86|  29.0k|    pthread_mutex_lock(&mutex);
   87|       |
   88|  29.0k|    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.0k, False: 415k]
  ------------------
   92|  29.0k|            if(e == address_map_first)
  ------------------
  |  Branch (92:16): [True: 5.31k, False: 23.7k]
  ------------------
   93|  5.31k|                address_map_first = e->next;
   94|  29.0k|            if(e == address_map_last)
  ------------------
  |  Branch (94:16): [True: 17.2k, False: 11.8k]
  ------------------
   95|  17.2k|                address_map_last = e->prev;
   96|  29.0k|            if(e->prev)
  ------------------
  |  Branch (96:16): [True: 23.7k, False: 5.31k]
  ------------------
   97|  23.7k|                e->prev->next = e->next;
   98|  29.0k|            if(e->next)
  ------------------
  |  Branch (98:16): [True: 11.8k, False: 17.2k]
  ------------------
   99|  11.8k|                e->next->prev = e->prev;
  100|  29.0k|            totalMemorySize -= e->size;
  101|       |
  102|       |            //printf("Total size (free): %lld after addr %p and deleting %p\n", totalMemorySize, addr, (void*)e);
  103|  29.0k|            free(e);
  104|  29.0k|            pthread_mutex_unlock(&mutex);
  105|  29.0k|            return 1;
  106|  29.0k|        }
  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.0k|}
custom_memory_manager.c:UA_memoryManager_calloc:
  124|  6.46k|static void *UA_memoryManager_calloc(size_t num, size_t size) {
  125|  6.46k|    if(totalMemorySize + (size * num) > memoryLimit)
  ------------------
  |  Branch (125:8): [True: 34, False: 6.43k]
  ------------------
  126|     34|        return NULL;
  127|  6.43k|    void *addr = calloc(num, size);
  128|  6.43k|    if(!addr)
  ------------------
  |  Branch (128:8): [True: 0, False: 6.43k]
  ------------------
  129|      0|        return NULL;
  130|  6.43k|    addToMap(size*num, addr);
  131|  6.43k|    return addr;
  132|  6.43k|}
custom_memory_manager.c:UA_memoryManager_realloc:
  134|  22.3k|static void *UA_memoryManager_realloc(void *ptr, size_t new_size) {
  135|  22.3k|    removeFromMap(ptr);
  136|  22.3k|    if(totalMemorySize + new_size > memoryLimit)
  ------------------
  |  Branch (136:8): [True: 0, False: 22.3k]
  ------------------
  137|      0|        return NULL;
  138|  22.3k|    void *addr = realloc(ptr, new_size);
  139|  22.3k|    if(!addr)
  ------------------
  |  Branch (139:8): [True: 0, False: 22.3k]
  ------------------
  140|      0|        return NULL;
  141|  22.3k|    addToMap(new_size, addr);
  142|  22.3k|    return addr;
  143|       |
  144|  22.3k|}

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

fuzz_attributeoperand.cc:_ZL24UA_AttributeOperand_initP19UA_AttributeOperand:
  243|    257|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
fuzz_attributeoperand.cc:_ZL15UA_String_equalPK9UA_StringS1_:
  243|    134|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
fuzz_attributeoperand.cc:_ZL15UA_String_clearP9UA_String:
  243|    268|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
fuzz_attributeoperand.cc:_ZL25UA_AttributeOperand_clearP19UA_AttributeOperand:
  243|    268|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types.c:UA_ByteString_init:
  243|  1.27k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_util.c:UA_String_init:
  243|  1.27k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_util.c:UA_String_equal:
  243|  3.18k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_util.c:UA_String_clear:
  243|  1.54k|# 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.68k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_QualifiedName_clear:
  243|    678|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_RelativePath_init:
  243|    379|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_RelativePathElement_init:
  243|  5.50k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_RelativePathElement_clear:
  243|     77|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_AttributeOperand_init:
  243|    391|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_QualifiedName_init:
  243|  6.03k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_AttributeOperand_clear:
  243|    123|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl

