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|    753|UA_unbase64(const unsigned char *src, size_t len, size_t *out_len) {
   76|       |    /* Empty base64 results in an empty byte-string */
   77|    753|    if(len == 0) {
  ------------------
  |  Branch (77:8): [True: 462, False: 291]
  ------------------
   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|    291|    size_t olen = (len / 4 * 3) + 4;
   84|    291|    unsigned char *out = (unsigned char*)UA_malloc(olen);
  ------------------
  |  |   18|    291|#define UA_malloc(size) UA_mallocSingleton(size)
  ------------------
   85|    291|    if(!out)
  ------------------
  |  Branch (85:8): [True: 22, False: 269]
  ------------------
   86|     22|        return NULL;
   87|       |
   88|       |    /* Iterate over the input */
   89|    269|    size_t pad = 0;
   90|    269|    unsigned char count = 0;
   91|    269|    unsigned char block[4];
   92|    269|    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: 9, False: 4.44k]
  ------------------
   95|      9|            goto error; /* Non-ASCII input */
   96|  4.44k|        unsigned char tmp = dtable[src[i]];
   97|  4.44k|        if(tmp == 0x80)
  ------------------
  |  Branch (97:12): [True: 2, False: 4.43k]
  ------------------
   98|      2|            goto error; /* Not an allowed character */
   99|  4.43k|        if(tmp == 0x7f)
  ------------------
  |  Branch (99:12): [True: 8, False: 4.43k]
  ------------------
  100|      8|            continue; /* Whitespace is ignored to accomodate RFC 2045, used in
  101|       |                       * XML for xs:base64Binary. */
  102|  4.43k|        block[count++] = tmp;
  103|       |
  104|       |        /* Padding */
  105|  4.43k|        if(src[i] == '=') {
  ------------------
  |  Branch (105:12): [True: 386, False: 4.04k]
  ------------------
  106|    386|            if(count < 3) /* Padding can only be the last two bytes of a block */
  ------------------
  |  Branch (106:16): [True: 0, False: 386]
  ------------------
  107|      0|                goto error;
  108|    386|            block[count-1] = 0;
  109|    386|            pad++;
  110|  4.04k|        } else if(pad > 0) {
  ------------------
  |  Branch (110:19): [True: 0, False: 4.04k]
  ------------------
  111|      0|            goto error; /* Padding not terminated correctly */
  112|      0|        }
  113|       |
  114|       |        /* Write three output characters for four characters of input */
  115|  4.43k|        if(count == 4) {
  ------------------
  |  Branch (115:12): [True: 1.10k, False: 3.32k]
  ------------------
  116|  1.10k|            if(pad > 2)
  ------------------
  |  Branch (116:16): [True: 0, False: 1.10k]
  ------------------
  117|      0|                goto error; /* Invalid padding */
  118|  1.10k|            *pos++ = (block[0] << 2) | (block[1] >> 4);
  119|  1.10k|            *pos++ = (block[1] << 4) | (block[2] >> 2);
  120|  1.10k|            *pos++ = (block[2] << 6) | block[3];
  121|  1.10k|            count = 0;
  122|  1.10k|            pos -= pad;
  123|  1.10k|            pad = 0;
  124|  1.10k|        }
  125|  4.43k|    }
  126|       |
  127|       |    /* Input length not a multiple of four */
  128|    258|    if(count > 0)
  ------------------
  |  Branch (128:8): [True: 0, False: 258]
  ------------------
  129|      0|        goto error;
  130|       |
  131|    258|    *out_len = (size_t)(pos - out);
  132|    258|    if(*out_len == 0) {
  ------------------
  |  Branch (132:8): [True: 0, False: 258]
  ------------------
  133|      0|        UA_free(out);
  ------------------
  |  |   19|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
  134|      0|        return (unsigned char*)UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|      0|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  135|      0|    }
  136|    258|    return out;
  137|       |
  138|     11| error:
  139|     11|    UA_free(out);
  ------------------
  |  |   19|     11|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
  140|       |    return NULL;
  141|    258|}

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

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

UA_AttributeOperand_parse:
 1223|    400|UA_AttributeOperand_parse(UA_AttributeOperand *ao, const UA_String str) {
 1224|       |    /* Objects folder is the default */
 1225|    400|    return parseAttributeOperand(ao, str, UA_NS0ID(OBJECTSFOLDER), 0);
  ------------------
  |  |  458|    400|#define UA_NS0ID(ID) UA_NODEID_NUMERIC(0, UA_NS0ID_##ID)
  |  |  ------------------
  |  |  |  |   81|    400|#define UA_NS0ID_OBJECTSFOLDER 85 /* Object */
  |  |  ------------------
  ------------------
 1226|    400|}
ua_types_lex.c:parse_guid:
   50|      9|parse_guid(UA_Guid *guid, const UA_Byte *s, const UA_Byte *e) {
   51|      9|    size_t len = (size_t)(e - s);
   52|      9|    if(len != 36 || s[8] != '-' || s[13] != '-' || s[23] != '-')
  ------------------
  |  Branch (52:8): [True: 9, False: 0]
  |  Branch (52:21): [True: 0, False: 0]
  |  Branch (52:36): [True: 0, False: 0]
  |  Branch (52:52): [True: 0, False: 0]
  ------------------
   53|      9|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      9|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   54|       |
   55|      0|    UA_UInt32 tmp;
   56|      0|    if(UA_readNumberWithBase(s, 8, &tmp, 16) != 8)
  ------------------
  |  Branch (56:8): [True: 0, False: 0]
  ------------------
   57|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   58|      0|    guid->data1 = tmp;
   59|       |
   60|      0|    if(UA_readNumberWithBase(&s[9], 4, &tmp, 16) != 4)
  ------------------
  |  Branch (60:8): [True: 0, False: 0]
  ------------------
   61|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   62|      0|    guid->data2 = (UA_UInt16)tmp;
   63|       |
   64|      0|    if(UA_readNumberWithBase(&s[14], 4, &tmp, 16) != 4)
  ------------------
  |  Branch (64:8): [True: 0, False: 0]
  ------------------
   65|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   66|      0|    guid->data3 = (UA_UInt16)tmp;
   67|       |
   68|      0|    if(UA_readNumberWithBase(&s[19], 2, &tmp, 16) != 2)
  ------------------
  |  Branch (68:8): [True: 0, False: 0]
  ------------------
   69|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   70|      0|    guid->data4[0] = (UA_Byte)tmp;
   71|       |
   72|      0|    if(UA_readNumberWithBase(&s[21], 2, &tmp, 16) != 2)
  ------------------
  |  Branch (72:8): [True: 0, False: 0]
  ------------------
   73|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   74|      0|    guid->data4[1] = (UA_Byte)tmp;
   75|       |
   76|      0|    for(size_t pos = 2, spos = 24; pos < 8; pos++, spos += 2) {
  ------------------
  |  Branch (76:36): [True: 0, False: 0]
  ------------------
   77|      0|        if(UA_readNumberWithBase(&s[spos], 2, &tmp, 16) != 2)
  ------------------
  |  Branch (77:12): [True: 0, False: 0]
  ------------------
   78|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   79|      0|        guid->data4[pos] = (UA_Byte)tmp;
   80|      0|    }
   81|       |
   82|      0|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
   83|      0|}
ua_types_lex.c:parse_nodeid:
  148|  5.23k|             UA_Escaping idEsc, const UA_NamespaceMapping *nsMapping) {
  149|  5.23k|    *id = UA_NODEID_NULL; /* Reset the NodeId */
  150|  5.23k|    LexContext context;
  151|  5.23k|    memset(&context, 0, sizeof(LexContext));
  152|  5.23k|    UA_Byte *begin = (UA_Byte*)(uintptr_t)pos;
  153|  5.23k|    const u8 *ns = NULL, *nsu = NULL, *body = NULL;
  154|       |
  155|       |    
  156|  5.23k|{
  157|  5.23k|	u8 yych;
  158|  5.23k|	yych = YYPEEK();
  ------------------
  |  |   33|  5.23k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  5.23k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  5.23k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 5.23k, False: 0]
  |  |  ------------------
  ------------------
  159|  5.23k|	switch (yych) {
  160|    753|		case 'b':
  ------------------
  |  Branch (160:3): [True: 753, False: 4.47k]
  ------------------
  161|    762|		case 'g':
  ------------------
  |  Branch (161:3): [True: 9, False: 5.22k]
  ------------------
  162|    886|		case 'i':
  ------------------
  |  Branch (162:3): [True: 124, False: 5.10k]
  ------------------
  163|  3.59k|		case 's':
  ------------------
  |  Branch (163:3): [True: 2.70k, False: 2.52k]
  ------------------
  164|  3.59k|			YYSTAGN(context.yyt1);
  ------------------
  |  |   39|  3.59k|#define YYSTAGN(t) t = NULL
  ------------------
  165|  3.59k|			YYSTAGN(context.yyt2);
  ------------------
  |  |   39|  3.59k|#define YYSTAGN(t) t = NULL
  ------------------
  166|  3.59k|			goto yy3;
  167|  1.05k|		case 'n': goto yy4;
  ------------------
  |  Branch (167:3): [True: 1.05k, False: 4.17k]
  ------------------
  168|    583|		default: goto yy1;
  ------------------
  |  Branch (168:3): [True: 583, False: 4.64k]
  ------------------
  169|  5.23k|	}
  170|    583|yy1:
  171|    583|	YYSKIP();
  ------------------
  |  |   35|    583|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    583|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  172|    588|yy2:
  173|    588|	{ (void)pos; return UA_STATUSCODE_BADDECODINGERROR; }
  ------------------
  |  |   44|    588|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  174|  3.59k|yy3:
  175|  3.59k|	YYSKIP();
  ------------------
  |  |   35|  3.59k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  3.59k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  176|  3.59k|	yych = YYPEEK();
  ------------------
  |  |   33|  3.59k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  3.59k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  3.59k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 3.59k, False: 0]
  |  |  ------------------
  ------------------
  177|  3.59k|	switch (yych) {
  178|  3.59k|		case '=': goto yy5;
  ------------------
  |  Branch (178:3): [True: 3.59k, False: 0]
  ------------------
  179|      0|		default: goto yy2;
  ------------------
  |  Branch (179:3): [True: 0, False: 3.59k]
  ------------------
  180|  3.59k|	}
  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.64k|yy5:
  190|  4.64k|	YYSKIP();
  ------------------
  |  |   35|  4.64k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  4.64k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  191|  4.64k|	nsu = context.yyt2;
  192|  4.64k|	ns = context.yyt1;
  193|  4.64k|	YYSTAGP(body);
  ------------------
  |  |   38|  4.64k|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|  4.64k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  194|  4.64k|	YYSHIFTSTAG(body, -2);
  ------------------
  |  |   40|  4.64k|#define YYSHIFTSTAG(t, shift) t += shift
  ------------------
  195|  4.64k|	{ 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|    335|		case '=': goto yy8;
  ------------------
  |  Branch (200:3): [True: 335, False: 721]
  ------------------
  201|    721|		case 'u': goto yy9;
  ------------------
  |  Branch (201:3): [True: 721, False: 335]
  ------------------
  202|      0|		default: goto yy7;
  ------------------
  |  Branch (202:3): [True: 0, False: 1.05k]
  ------------------
  203|  1.05k|	}
  204|      5|yy7:
  205|      5|	YYRESTORE();
  ------------------
  |  |   37|      5|#define YYRESTORE() YYCURSOR = YYMARKER
  |  |  ------------------
  |  |  |  |   31|      5|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYRESTORE() YYCURSOR = YYMARKER
  |  |  ------------------
  |  |  |  |   32|      5|#define YYMARKER context.marker
  |  |  ------------------
  ------------------
  206|      5|	goto yy2;
  207|    335|yy8:
  208|    335|	YYSKIP();
  ------------------
  |  |   35|    335|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    335|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  209|    335|	yych = YYPEEK();
  ------------------
  |  |   33|    335|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    335|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    335|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 335, False: 0]
  |  |  ------------------
  ------------------
  210|    335|	switch (yych) {
  211|    124|		case '0':
  ------------------
  |  Branch (211:3): [True: 124, False: 211]
  ------------------
  212|    133|		case '1':
  ------------------
  |  Branch (212:3): [True: 9, False: 326]
  ------------------
  213|    278|		case '2':
  ------------------
  |  Branch (213:3): [True: 145, False: 190]
  ------------------
  214|    334|		case '3':
  ------------------
  |  Branch (214:3): [True: 56, False: 279]
  ------------------
  215|    334|		case '4':
  ------------------
  |  Branch (215:3): [True: 0, False: 335]
  ------------------
  216|    334|		case '5':
  ------------------
  |  Branch (216:3): [True: 0, False: 335]
  ------------------
  217|    335|		case '6':
  ------------------
  |  Branch (217:3): [True: 1, False: 334]
  ------------------
  218|    335|		case '7':
  ------------------
  |  Branch (218:3): [True: 0, False: 335]
  ------------------
  219|    335|		case '8':
  ------------------
  |  Branch (219:3): [True: 0, False: 335]
  ------------------
  220|    335|		case '9':
  ------------------
  |  Branch (220:3): [True: 0, False: 335]
  ------------------
  221|    335|			YYSTAGP(context.yyt1);
  ------------------
  |  |   38|    335|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|    335|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  222|    335|			goto yy10;
  223|      0|		default: goto yy7;
  ------------------
  |  Branch (223:3): [True: 0, False: 335]
  ------------------
  224|    335|	}
  225|    721|yy9:
  226|    721|	YYSKIP();
  ------------------
  |  |   35|    721|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    721|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  227|    721|	yych = YYPEEK();
  ------------------
  |  |   33|    721|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    721|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    721|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 721, False: 0]
  |  |  ------------------
  ------------------
  228|    721|	switch (yych) {
  229|    720|		case '=': goto yy11;
  ------------------
  |  Branch (229:3): [True: 720, False: 1]
  ------------------
  230|      1|		default: goto yy7;
  ------------------
  |  Branch (230:3): [True: 1, False: 720]
  ------------------
  231|    721|	}
  232|    391|yy10:
  233|    391|	YYSKIP();
  ------------------
  |  |   35|    391|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    391|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  234|    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]
  |  |  ------------------
  ------------------
  235|    391|	switch (yych) {
  236|      0|		case '0':
  ------------------
  |  Branch (236:3): [True: 0, False: 391]
  ------------------
  237|      0|		case '1':
  ------------------
  |  Branch (237:3): [True: 0, False: 391]
  ------------------
  238|      2|		case '2':
  ------------------
  |  Branch (238:3): [True: 2, False: 389]
  ------------------
  239|      2|		case '3':
  ------------------
  |  Branch (239:3): [True: 0, False: 391]
  ------------------
  240|      2|		case '4':
  ------------------
  |  Branch (240:3): [True: 0, False: 391]
  ------------------
  241|     26|		case '5':
  ------------------
  |  Branch (241:3): [True: 24, False: 367]
  ------------------
  242|     28|		case '6':
  ------------------
  |  Branch (242:3): [True: 2, False: 389]
  ------------------
  243|     56|		case '7':
  ------------------
  |  Branch (243:3): [True: 28, False: 363]
  ------------------
  244|     56|		case '8':
  ------------------
  |  Branch (244:3): [True: 0, False: 391]
  ------------------
  245|     56|		case '9': goto yy10;
  ------------------
  |  Branch (245:3): [True: 0, False: 391]
  ------------------
  246|    335|		case ';':
  ------------------
  |  Branch (246:3): [True: 335, False: 56]
  ------------------
  247|    335|			YYSTAGN(context.yyt2);
  ------------------
  |  |   39|    335|#define YYSTAGN(t) t = NULL
  ------------------
  248|    335|			goto yy12;
  249|      0|		default: goto yy7;
  ------------------
  |  Branch (249:3): [True: 0, False: 391]
  ------------------
  250|    391|	}
  251|    720|yy11:
  252|    720|	YYSKIP();
  ------------------
  |  |   35|    720|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    720|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  253|    720|	yych = YYPEEK();
  ------------------
  |  |   33|    720|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    720|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    720|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 720, False: 0]
  |  |  ------------------
  ------------------
  254|    720|	switch (yych) {
  255|      0|		case 0x00: goto yy7;
  ------------------
  |  Branch (255:3): [True: 0, False: 720]
  ------------------
  256|    242|		case ';':
  ------------------
  |  Branch (256:3): [True: 242, False: 478]
  ------------------
  257|    242|			YYSTAGN(context.yyt1);
  ------------------
  |  |   39|    242|#define YYSTAGN(t) t = NULL
  ------------------
  258|    242|			YYSTAGP(context.yyt2);
  ------------------
  |  |   38|    242|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|    242|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  259|    242|			goto yy12;
  260|    478|		default:
  ------------------
  |  Branch (260:3): [True: 478, False: 242]
  ------------------
  261|    478|			YYSTAGP(context.yyt2);
  ------------------
  |  |   38|    478|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|    478|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  262|    478|			goto yy13;
  263|    720|	}
  264|  1.05k|yy12:
  265|  1.05k|	YYSKIP();
  ------------------
  |  |   35|  1.05k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.05k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  266|  1.05k|	yych = YYPEEK();
  ------------------
  |  |   33|  1.05k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.05k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.05k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.05k, False: 0]
  |  |  ------------------
  ------------------
  267|  1.05k|	switch (yych) {
  268|    263|		case 'b':
  ------------------
  |  Branch (268:3): [True: 263, False: 792]
  ------------------
  269|    391|		case 'g':
  ------------------
  |  Branch (269:3): [True: 128, False: 927]
  ------------------
  270|    669|		case 'i':
  ------------------
  |  Branch (270:3): [True: 278, False: 777]
  ------------------
  271|  1.05k|		case 's': goto yy14;
  ------------------
  |  Branch (271:3): [True: 383, False: 672]
  ------------------
  272|      3|		default: goto yy7;
  ------------------
  |  Branch (272:3): [True: 3, False: 1.05k]
  ------------------
  273|  1.05k|	}
  274|  4.56k|yy13:
  275|  4.56k|	YYSKIP();
  ------------------
  |  |   35|  4.56k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  4.56k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  276|  4.56k|	yych = YYPEEK();
  ------------------
  |  |   33|  4.56k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  4.56k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  4.56k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 4.56k, False: 0]
  |  |  ------------------
  ------------------
  277|  4.56k|	switch (yych) {
  278|      0|		case 0x00: goto yy7;
  ------------------
  |  Branch (278:3): [True: 0, False: 4.56k]
  ------------------
  279|    478|		case ';':
  ------------------
  |  Branch (279:3): [True: 478, False: 4.08k]
  ------------------
  280|    478|			YYSTAGN(context.yyt1);
  ------------------
  |  |   39|    478|#define YYSTAGN(t) t = NULL
  ------------------
  281|    478|			goto yy12;
  282|  4.08k|		default: goto yy13;
  ------------------
  |  Branch (282:3): [True: 4.08k, False: 478]
  ------------------
  283|  4.56k|	}
  284|  1.05k|yy14:
  285|  1.05k|	YYSKIP();
  ------------------
  |  |   35|  1.05k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.05k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  286|  1.05k|	yych = YYPEEK();
  ------------------
  |  |   33|  1.05k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.05k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.05k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.05k, False: 1]
  |  |  ------------------
  ------------------
  287|  1.05k|	switch (yych) {
  288|  1.05k|		case '=': goto yy5;
  ------------------
  |  Branch (288:3): [True: 1.05k, False: 1]
  ------------------
  289|      1|		default: goto yy7;
  ------------------
  |  Branch (289:3): [True: 1, False: 1.05k]
  ------------------
  290|  1.05k|	}
  291|  1.05k|}
  292|       |
  293|       |
  294|  4.64k| match:
  295|  4.64k|    if(nsu) {
  ------------------
  |  Branch (295:8): [True: 718, False: 3.92k]
  ------------------
  296|       |        /* NamespaceUri */
  297|    718|        UA_String nsUri = {(size_t)(body - 1 - nsu), (UA_Byte*)(uintptr_t)nsu};
  298|    718|        UA_StatusCode res = escapedUri2Index(nsUri, &id->namespaceIndex, nsMapping);
  299|    718|        if(res != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|    718|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (299:12): [True: 718, False: 0]
  ------------------
  300|       |            /* Return the entire NodeId string s=... */
  301|    718|            UA_String total = {(size_t)((const UA_Byte*)end - begin), begin};
  302|    718|            id->identifierType = UA_NODEIDTYPE_STRING;
  303|    718|            return UA_String_copy(&total, &id->identifier.string);
  304|    718|        }
  305|  3.92k|    } else if(ns) {
  ------------------
  |  Branch (305:15): [True: 333, False: 3.59k]
  ------------------
  306|       |        /* NamespaceIndex */
  307|    333|        UA_UInt32 tmp;
  308|    333|        size_t len = (size_t)(body - 1 - ns);
  309|    333|        if(UA_readNumber((const UA_Byte*)ns, len, &tmp) != len)
  ------------------
  |  Branch (309:12): [True: 0, False: 333]
  ------------------
  310|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  311|    333|        id->namespaceIndex = (UA_UInt16)tmp;
  312|    333|        if(nsMapping)
  ------------------
  |  Branch (312:12): [True: 0, False: 333]
  ------------------
  313|      0|            id->namespaceIndex =
  314|      0|                UA_NamespaceMapping_remote2Local(nsMapping, id->namespaceIndex);
  315|    333|    }
  316|       |
  317|       |    /* From the current position until the end */
  318|  3.92k|    return parse_nodeid_body(id, body, end, idEsc);
  319|  4.64k|}
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.92k|parse_nodeid_body(UA_NodeId *id, const u8 *body, const u8 *end, UA_Escaping esc) {
  110|  3.92k|    UA_StatusCode res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  3.92k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  111|  3.92k|    UA_String str = {(size_t)(end - (body+2)), (UA_Byte*)(uintptr_t)body + 2};
  112|  3.92k|    switch(*body) {
  113|    202|    case 'i':
  ------------------
  |  Branch (113:5): [True: 202, False: 3.72k]
  ------------------
  114|    202|        id->identifierType = UA_NODEIDTYPE_NUMERIC;
  115|    202|        if(UA_readNumber(str.data, str.length, &id->identifier.numeric) != str.length)
  ------------------
  |  Branch (115:12): [True: 21, False: 181]
  ------------------
  116|     21|            res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     21|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  117|    202|        break;
  118|  2.96k|    case 's':
  ------------------
  |  Branch (118:5): [True: 2.96k, False: 964]
  ------------------
  119|  2.96k|        id->identifierType = UA_NODEIDTYPE_STRING;
  120|  2.96k|        res |= UA_String_copy(&str, &id->identifier.string);
  121|  2.96k|        res |= UA_String_unescape(&id->identifier.string, false, esc);
  122|  2.96k|        break;
  123|      9|    case 'g':
  ------------------
  |  Branch (123:5): [True: 9, False: 3.91k]
  ------------------
  124|      9|        id->identifierType = UA_NODEIDTYPE_GUID;
  125|      9|        res = parse_guid(&id->identifier.guid, str.data, end);
  126|      9|        break;
  127|    753|    case 'b':
  ------------------
  |  Branch (127:5): [True: 753, False: 3.17k]
  ------------------
  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|    753|        id->identifierType = UA_NODEIDTYPE_BYTESTRING;
  132|    753|        id->identifier.byteString.data =
  133|    753|            UA_unbase64(str.data, str.length, &id->identifier.byteString.length);
  134|    753|        if(!id->identifier.byteString.data) {
  ------------------
  |  Branch (134:12): [True: 33, False: 720]
  ------------------
  135|     33|            UA_assert(id->identifier.byteString.length == 0);
  ------------------
  |  |  399|     33|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (135:13): [True: 33, False: 0]
  ------------------
  136|     33|            res = UA_STATUSCODE_BADDECODINGERROR; /* Returned on error by UA_unbase64 */
  ------------------
  |  |   44|     33|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  137|     33|        }
  138|    753|        break;
  139|    753|    default:
  ------------------
  |  Branch (139:5): [True: 0, False: 3.92k]
  ------------------
  140|      0|        res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  141|      0|        break;
  142|  3.92k|    }
  143|  3.92k|    return res;
  144|  3.92k|}
ua_types_lex.c:parse_qn:
  707|  5.94k|         UA_UInt16 defaultNamespaceIndex) {
  708|  5.94k|    size_t len;
  709|  5.94k|    UA_UInt32 tmp;
  710|  5.94k|    UA_String str;
  711|  5.94k|    UA_StatusCode res;
  712|       |
  713|  5.94k|    LexContext context;
  714|  5.94k|    memset(&context, 0, sizeof(LexContext));
  715|       |
  716|  5.94k|    const u8 *begin = pos;
  717|  5.94k|    UA_QualifiedName_init(qn);
  718|  5.94k|    qn->namespaceIndex = defaultNamespaceIndex;
  719|       |
  720|       |    
  721|  5.94k|{
  722|  5.94k|	u8 yych;
  723|  5.94k|	yych = YYPEEK();
  ------------------
  |  |   33|  5.94k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  5.94k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.66k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.66k, False: 4.28k]
  |  |  ------------------
  ------------------
  724|  5.94k|	switch (yych) {
  725|  4.28k|		case 0x00:
  ------------------
  |  Branch (725:3): [True: 4.28k, False: 1.66k]
  ------------------
  726|  4.28k|		case ';': goto yy41;
  ------------------
  |  Branch (726:3): [True: 0, False: 5.94k]
  ------------------
  727|    140|		case '0':
  ------------------
  |  Branch (727:3): [True: 140, False: 5.80k]
  ------------------
  728|    253|		case '1':
  ------------------
  |  Branch (728:3): [True: 113, False: 5.83k]
  ------------------
  729|    324|		case '2':
  ------------------
  |  Branch (729:3): [True: 71, False: 5.87k]
  ------------------
  730|    344|		case '3':
  ------------------
  |  Branch (730:3): [True: 20, False: 5.92k]
  ------------------
  731|    378|		case '4':
  ------------------
  |  Branch (731:3): [True: 34, False: 5.91k]
  ------------------
  732|    379|		case '5':
  ------------------
  |  Branch (732:3): [True: 1, False: 5.94k]
  ------------------
  733|    529|		case '6':
  ------------------
  |  Branch (733:3): [True: 150, False: 5.79k]
  ------------------
  734|    535|		case '7':
  ------------------
  |  Branch (734:3): [True: 6, False: 5.94k]
  ------------------
  735|    535|		case '8':
  ------------------
  |  Branch (735:3): [True: 0, False: 5.94k]
  ------------------
  736|    538|		case '9': goto yy44;
  ------------------
  |  Branch (736:3): [True: 3, False: 5.94k]
  ------------------
  737|  1.12k|		default: goto yy43;
  ------------------
  |  Branch (737:3): [True: 1.12k, False: 4.82k]
  ------------------
  738|  5.94k|	}
  739|  4.28k|yy41:
  740|  4.28k|	YYSKIP();
  ------------------
  |  |   35|  4.28k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  4.28k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  741|  5.92k|yy42:
  742|  5.92k|	{ pos = begin; goto match_name; }
  743|  1.12k|yy43:
  744|  1.12k|	YYSKIP();
  ------------------
  |  |   35|  1.12k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.12k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  745|  1.12k|	YYBACKUP();
  ------------------
  |  |   36|  1.12k|#define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   32|  1.12k|#define YYMARKER context.marker
  |  |  ------------------
  |  |               #define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|  1.12k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  746|  1.12k|	yych = YYPEEK();
  ------------------
  |  |   33|  1.12k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.12k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.07k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.07k, False: 51]
  |  |  ------------------
  ------------------
  747|  1.12k|	if (yych <= 0x00) goto yy42;
  ------------------
  |  Branch (747:6): [True: 53, False: 1.07k]
  ------------------
  748|  1.07k|	goto yy46;
  749|  1.07k|yy44:
  750|    538|	YYSKIP();
  ------------------
  |  |   35|    538|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    538|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  751|    538|	YYBACKUP();
  ------------------
  |  |   36|    538|#define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   32|    538|#define YYMARKER context.marker
  |  |  ------------------
  |  |               #define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|    538|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  752|    538|	yych = YYPEEK();
  ------------------
  |  |   33|    538|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    538|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    361|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 361, False: 177]
  |  |  ------------------
  ------------------
  753|    538|	switch (yych) {
  754|      1|		case '0':
  ------------------
  |  Branch (754:3): [True: 1, False: 537]
  ------------------
  755|     31|		case '1':
  ------------------
  |  Branch (755:3): [True: 30, False: 508]
  ------------------
  756|     69|		case '2':
  ------------------
  |  Branch (756:3): [True: 38, False: 500]
  ------------------
  757|     70|		case '3':
  ------------------
  |  Branch (757:3): [True: 1, False: 537]
  ------------------
  758|     72|		case '4':
  ------------------
  |  Branch (758:3): [True: 2, False: 536]
  ------------------
  759|     74|		case '5':
  ------------------
  |  Branch (759:3): [True: 2, False: 536]
  ------------------
  760|     78|		case '6':
  ------------------
  |  Branch (760:3): [True: 4, False: 534]
  ------------------
  761|    162|		case '7':
  ------------------
  |  Branch (761:3): [True: 84, False: 454]
  ------------------
  762|    186|		case '8':
  ------------------
  |  Branch (762:3): [True: 24, False: 514]
  ------------------
  763|    194|		case '9':
  ------------------
  |  Branch (763:3): [True: 8, False: 530]
  ------------------
  764|    196|		case ':': goto yy50;
  ------------------
  |  Branch (764:3): [True: 2, False: 536]
  ------------------
  765|    342|		default: goto yy42;
  ------------------
  |  Branch (765:3): [True: 342, False: 196]
  ------------------
  766|    538|	}
  767|  16.1k|yy45:
  768|  16.1k|	YYSKIP();
  ------------------
  |  |   35|  16.1k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  16.1k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  769|  16.1k|	yych = YYPEEK();
  ------------------
  |  |   33|  16.1k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  16.1k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  15.1k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 15.1k, False: 1.00k]
  |  |  ------------------
  ------------------
  770|  17.2k|yy46:
  771|  17.2k|	switch (yych) {
  772|  1.06k|		case 0x00: goto yy47;
  ------------------
  |  Branch (772:3): [True: 1.06k, False: 16.1k]
  ------------------
  773|     11|		case ';': goto yy48;
  ------------------
  |  Branch (773:3): [True: 11, False: 17.2k]
  ------------------
  774|  16.1k|		default: goto yy45;
  ------------------
  |  Branch (774:3): [True: 16.1k, False: 1.07k]
  ------------------
  775|  17.2k|	}
  776|  1.24k|yy47:
  777|  1.24k|	YYRESTORE();
  ------------------
  |  |   37|  1.24k|#define YYRESTORE() YYCURSOR = YYMARKER
  |  |  ------------------
  |  |  |  |   31|  1.24k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYRESTORE() YYCURSOR = YYMARKER
  |  |  ------------------
  |  |  |  |   32|  1.24k|#define YYMARKER context.marker
  |  |  ------------------
  ------------------
  778|  1.24k|	goto yy42;
  779|     11|yy48:
  780|     11|	YYSKIP();
  ------------------
  |  |   35|     11|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|     11|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  781|     11|	{ goto match_uri; }
  782|  1.18M|yy49:
  783|  1.18M|	YYSKIP();
  ------------------
  |  |   35|  1.18M|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.18M|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  784|  1.18M|	yych = YYPEEK();
  ------------------
  |  |   33|  1.18M|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.18M|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.18M|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.18M, False: 112]
  |  |  ------------------
  ------------------
  785|  1.18M|yy50:
  786|  1.18M|	switch (yych) {
  787|  1.15M|		case '0':
  ------------------
  |  Branch (787:3): [True: 1.15M, False: 27.0k]
  ------------------
  788|  1.15M|		case '1':
  ------------------
  |  Branch (788:3): [True: 678, False: 1.18M]
  ------------------
  789|  1.16M|		case '2':
  ------------------
  |  Branch (789:3): [True: 5.29k, False: 1.17M]
  ------------------
  790|  1.16M|		case '3':
  ------------------
  |  Branch (790:3): [True: 5.43k, False: 1.17M]
  ------------------
  791|  1.17M|		case '4':
  ------------------
  |  Branch (791:3): [True: 5.50k, False: 1.17M]
  ------------------
  792|  1.17M|		case '5':
  ------------------
  |  Branch (792:3): [True: 474, False: 1.18M]
  ------------------
  793|  1.17M|		case '6':
  ------------------
  |  Branch (793:3): [True: 632, False: 1.18M]
  ------------------
  794|  1.17M|		case '7':
  ------------------
  |  Branch (794:3): [True: 751, False: 1.18M]
  ------------------
  795|  1.18M|		case '8':
  ------------------
  |  Branch (795:3): [True: 5.88k, False: 1.17M]
  ------------------
  796|  1.18M|		case '9': goto yy49;
  ------------------
  |  Branch (796:3): [True: 2.18k, False: 1.18M]
  ------------------
  797|     16|		case ':': goto yy51;
  ------------------
  |  Branch (797:3): [True: 16, False: 1.18M]
  ------------------
  798|    180|		default: goto yy47;
  ------------------
  |  Branch (798:3): [True: 180, False: 1.18M]
  ------------------
  799|  1.18M|	}
  800|     16|yy51:
  801|     16|	YYSKIP();
  ------------------
  |  |   35|     16|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|     16|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  802|     16|	{ goto match_index; }
  803|  1.18M|}
  804|       |
  805|       |
  806|     16| match_index:
  807|     16|    len = (size_t)(pos - 1 - begin);
  808|     16|    if(UA_readNumber((const UA_Byte*)begin, len, &tmp) != len)
  ------------------
  |  Branch (808:8): [True: 0, False: 16]
  ------------------
  809|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  810|     16|    qn->namespaceIndex = (UA_UInt16)tmp;
  811|     16|    if(nsMapping)
  ------------------
  |  Branch (811:8): [True: 0, False: 16]
  ------------------
  812|      0|        qn->namespaceIndex =
  813|      0|            UA_NamespaceMapping_remote2Local(nsMapping, qn->namespaceIndex);
  814|     16|    goto match_name;
  815|       |
  816|     11| match_uri:
  817|     11|    str.length = (size_t)(pos - 1 - begin);
  818|     11|    str.data = (UA_Byte*)(uintptr_t)begin;
  819|     11|    res = escapedUri2Index(str, &qn->namespaceIndex, nsMapping);
  820|     11|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|     11|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (820:8): [True: 11, False: 0]
  ------------------
  821|     11|        pos = begin; /* Use the entire string for the name */
  822|       |
  823|  5.94k| match_name:
  824|  5.94k|    str.length = (size_t)(end - pos);
  825|  5.94k|    str.data = (UA_Byte*)(uintptr_t)pos;
  826|  5.94k|    res = UA_String_copy(&str, &qn->name);
  827|  5.94k|    if(UA_LIKELY(res == UA_STATUSCODE_GOOD))
  ------------------
  |  |  578|  5.94k|# define UA_LIKELY(x) __builtin_expect((x), 1)
  |  |  ------------------
  |  |  |  Branch (578:23): [True: 5.92k, False: 27]
  |  |  ------------------
  ------------------
  828|  5.92k|        res = UA_String_unescape(&qn->name, false, escName);
  829|  5.94k|    return res;
  830|     11|}
ua_types_lex.c:parse_relativepath:
  982|    388|                   UA_UInt16 defaultNamespaceIndex) {
  983|    388|    UA_RelativePath_init(rp);
  984|    388|    UA_Boolean done = false;
  985|    388|    UA_StatusCode res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    388|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  986|  5.68k|    do {
  987|  5.68k|        res = parse_relativepathElement(rp, ppos, end, server, esc,
  988|  5.68k|                                        defaultNamespaceIndex, &done);
  989|  5.68k|    } while(!done);
  ------------------
  |  Branch (989:13): [True: 5.29k, False: 388]
  ------------------
  990|    388|    return res;
  991|    388|}
ua_types_lex.c:parse_relativepathElement:
  852|  5.68k|                          UA_UInt16 defaultTargetNamespaceIndex, UA_Boolean *done) {
  853|  5.68k|    const u8 *pos = *ppos;
  854|  5.68k|    if(pos == end) {
  ------------------
  |  Branch (854:8): [True: 242, False: 5.44k]
  ------------------
  855|    242|        *done = true;
  856|    242|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    242|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  857|    242|    }
  858|       |
  859|       |    /* Create the element on the stack.
  860|       |     * Moved into the rp upon successful parsing. */
  861|  5.44k|    UA_RelativePathElement current;
  862|  5.44k|    UA_RelativePathElement_init(&current);
  863|  5.44k|    current.includeSubtypes = true; /* Follow subtypes by default */
  864|       |
  865|       |    /* Which ReferenceType? */
  866|  5.44k|    const u8 *begin;
  867|  5.44k|    UA_StatusCode res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  5.44k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  868|  5.44k|    switch(*pos) {
  869|    296|    case '/':
  ------------------
  |  Branch (869:5): [True: 296, False: 5.14k]
  ------------------
  870|    296|        current.referenceTypeId = UA_NODEID_NUMERIC(0, UA_NS0ID_HIERARCHICALREFERENCES);
  ------------------
  |  |   46|    296|#define UA_NS0ID_HIERARCHICALREFERENCES 33 /* ReferenceType */
  ------------------
  871|    296|        goto reftype_target;
  872|      0|    case '.':
  ------------------
  |  Branch (872:5): [True: 0, False: 5.44k]
  ------------------
  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.07k|    case '<':
  ------------------
  |  Branch (881:5): [True: 5.07k, False: 366]
  ------------------
  882|  5.07k|        break;
  883|     70|    default:
  ------------------
  |  Branch (883:5): [True: 70, False: 5.37k]
  ------------------
  884|     70|        *done = true;
  885|     70|        goto out;
  886|  5.44k|    }
  887|       |
  888|       |    /* ReferenceType with modifiers wrapped in angle brackets */
  889|  5.07k|    begin = ++pos;
  890|  26.8M|    for(; pos < end; pos++) {
  ------------------
  |  Branch (890:11): [True: 26.8M, False: 58]
  ------------------
  891|  26.8M|        if((esc == UA_ESCAPING_AND || esc == UA_ESCAPING_AND_EXTENDED) && *pos == '&') {
  ------------------
  |  Branch (891:13): [True: 0, False: 26.8M]
  |  Branch (891:39): [True: 0, False: 26.8M]
  |  Branch (891:75): [True: 0, False: 0]
  ------------------
  892|      0|            pos++;
  893|      0|            continue;
  894|      0|        }
  895|  26.8M|        if((esc == UA_ESCAPING_PERCENT || esc == UA_ESCAPING_PERCENT_EXTENDED) && *pos == '%') {
  ------------------
  |  Branch (895:13): [True: 0, False: 26.8M]
  |  Branch (895:43): [True: 26.8M, False: 0]
  |  Branch (895:83): [True: 8.11M, False: 18.7M]
  ------------------
  896|  8.11M|            pos += 2;
  897|  8.11M|            continue;
  898|  8.11M|        }
  899|  18.7M|        if(*pos == '>')
  ------------------
  |  Branch (899:12): [True: 5.01k, False: 18.7M]
  ------------------
  900|  5.01k|            break;
  901|  18.7M|    }
  902|  5.07k|    if(pos > end) {
  ------------------
  |  Branch (902:8): [True: 0, False: 5.07k]
  ------------------
  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.76k|    for(; begin < pos; begin++) {
  ------------------
  |  Branch (908:11): [True: 5.76k, False: 0]
  ------------------
  909|  5.76k|        if(*begin == '#')
  ------------------
  |  Branch (909:12): [True: 520, False: 5.24k]
  ------------------
  910|    520|            current.includeSubtypes = false;
  911|  5.24k|        else if(*begin == '!')
  ------------------
  |  Branch (911:17): [True: 164, False: 5.07k]
  ------------------
  912|    164|            current.isInverse = true;
  913|  5.07k|        else
  914|  5.07k|            break;
  915|  5.76k|    }
  916|       |
  917|       |    /* Try to parse a NodeId for the ReferenceType (non-standard!) */
  918|  5.07k|    res = parse_nodeid(&current.referenceTypeId, begin, pos, esc, NULL);
  919|  5.07k|    if(res != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|  5.07k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (919:8): [True: 649, False: 4.42k]
  ------------------
  920|       |        /* Parse the the ReferenceType from its BrowseName (default) */
  921|    649|        UA_QualifiedName refqn;
  922|    649|        res = parse_qn(&refqn, begin, pos, esc, NULL, defaultTargetNamespaceIndex);
  923|    649|        res |= lookupRefType(server, &refqn, &current.referenceTypeId);
  924|    649|        UA_QualifiedName_clear(&refqn);
  925|    649|        if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    649|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (925:12): [True: 71, False: 578]
  ------------------
  926|     71|            goto out;
  927|    649|    }
  928|       |
  929|  5.30k| reftype_target:
  930|       |    /* Move pos to the end of the TargetName based on the escaping */
  931|  5.30k|    begin = ++pos;
  932|  1.18M|    while(pos < end && *pos >= '0' && *pos <= '9')
  ------------------
  |  Branch (932:11): [True: 1.18M, False: 192]
  |  Branch (932:24): [True: 1.18M, False: 220]
  |  Branch (932:39): [True: 1.18M, False: 4.89k]
  ------------------
  933|  1.18M|        pos++;
  934|  5.30k|    if(pos < end && *pos == ':')
  ------------------
  |  Branch (934:8): [True: 5.11k, False: 192]
  |  Branch (934:21): [True: 16, False: 5.09k]
  ------------------
  935|     16|        pos++;
  936|  8.16k|    for(; pos < end; pos++) {
  ------------------
  |  Branch (936:11): [True: 7.91k, False: 245]
  ------------------
  937|  7.91k|        if((esc == UA_ESCAPING_AND || esc == UA_ESCAPING_AND_EXTENDED) && *pos == '&') {
  ------------------
  |  Branch (937:13): [True: 0, False: 7.91k]
  |  Branch (937:39): [True: 0, False: 7.91k]
  |  Branch (937:75): [True: 0, False: 0]
  ------------------
  938|      0|            pos++;
  939|      0|            continue;
  940|      0|        }
  941|  7.91k|        if((esc == UA_ESCAPING_PERCENT || esc == UA_ESCAPING_PERCENT_EXTENDED) && *pos == '%') {
  ------------------
  |  Branch (941:13): [True: 0, False: 7.91k]
  |  Branch (941:43): [True: 7.91k, False: 0]
  |  Branch (941:83): [True: 0, False: 7.91k]
  ------------------
  942|      0|            pos += 2;
  943|      0|            continue;
  944|      0|        }
  945|  7.91k|        if(esc == UA_ESCAPING_PERCENT || esc == UA_ESCAPING_PERCENT_EXTENDED) {
  ------------------
  |  Branch (945:12): [True: 0, False: 7.91k]
  |  Branch (945:42): [True: 7.91k, False: 0]
  ------------------
  946|  7.91k|            if(isReservedPercentExtended(*pos))
  ------------------
  |  Branch (946:16): [True: 5.05k, False: 2.85k]
  ------------------
  947|  5.05k|                break;
  948|  7.91k|        } else {
  949|      0|            if(isReservedAnd(*pos))
  ------------------
  |  Branch (949:16): [True: 0, False: 0]
  ------------------
  950|      0|                break;
  951|      0|        }
  952|  7.91k|    }
  953|  5.30k|    if(pos > end) {
  ------------------
  |  Branch (953:8): [True: 3, False: 5.29k]
  ------------------
  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.29k|    res = parse_qn(&current.targetName, begin, pos, esc,
  960|  5.29k|                   NULL, defaultTargetNamespaceIndex);
  961|  5.29k|    if(res != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|  5.29k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (961:8): [True: 0, False: 5.29k]
  ------------------
  962|      0|        UA_RelativePathElement_clear(&current);
  963|      0|        goto out;
  964|      0|    }
  965|       |
  966|       |    /* Add current to the rp */
  967|  5.29k|    res |= relativepath_addelem(rp, &current);
  968|       |
  969|  5.44k| out:
  970|  5.44k|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  5.44k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (970:8): [True: 76, False: 5.36k]
  ------------------
  971|     76|        UA_RelativePathElement_clear(&current);
  972|       |
  973|       |    /* Return the status */
  974|  5.44k|    *ppos = pos;
  975|  5.44k|    *done |= (res != UA_STATUSCODE_GOOD);
  ------------------
  |  |   17|  5.44k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  976|  5.44k|    return res;
  977|  5.29k|}
ua_types_lex.c:relativepath_addelem:
  686|  5.29k|relativepath_addelem(UA_RelativePath *rp, UA_RelativePathElement *el) {
  687|       |    /* Check for unrealistic path lengths */
  688|  5.29k|    if(rp->elementsSize >= UA_MAXPATHLENGTH)
  ------------------
  |  |   29|  5.29k|#define UA_MAXPATHLENGTH 128 /* Maximum relative path depth */
  ------------------
  |  Branch (688:8): [True: 2, False: 5.29k]
  ------------------
  689|      2|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      2|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  690|       |
  691|       |    /* Allocate memory */
  692|  5.29k|    UA_RelativePathElement *newArray = (UA_RelativePathElement*)
  693|  5.29k|        UA_realloc(rp->elements, sizeof(UA_RelativePathElement) * (rp->elementsSize + 1));
  ------------------
  |  |   21|  5.29k|#define UA_realloc(ptr, size) UA_reallocSingleton(ptr, size)
  ------------------
  694|  5.29k|    if(!newArray)
  ------------------
  |  Branch (694:8): [True: 0, False: 5.29k]
  ------------------
  695|      0|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
  696|  5.29k|    rp->elements = newArray;
  697|       |
  698|       |    /* Move to the target */
  699|  5.29k|    rp->elements[rp->elementsSize] = *el;
  700|  5.29k|    rp->elementsSize++;
  701|  5.29k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  5.29k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  702|  5.29k|}
ua_types_lex.c:parseAttributeOperand:
 1025|    400|                      UA_NodeId defaultId, UA_UInt16 defaultNamespaceIndex) {
 1026|       |    /* Initialize and set the default values */
 1027|    400|    UA_AttributeOperand_init(ao);
 1028|    400|    ao->nodeId = defaultId;
 1029|    400|    ao->attributeId = UA_ATTRIBUTEID_VALUE;
 1030|       |
 1031|       |    /* Nothing to parse */
 1032|    400|    if(str.length == 0)
  ------------------
  |  Branch (1032:8): [True: 0, False: 400]
  ------------------
 1033|      0|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1034|       |
 1035|    400|    const u8 *pos = str.data;
 1036|    400|    const u8 *end = pos + str.length;
 1037|    400|    UA_StatusCode res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    400|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1038|       |
 1039|       |    /* Initial NodeId before the BrowsePath */
 1040|    400|    LexContext context;
 1041|    400|    memset(&context, 0, sizeof(LexContext));
 1042|       |    
 1043|    400|{
 1044|    400|	u8 yych;
 1045|    400|	yych = YYPEEK();
  ------------------
  |  |   33|    400|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    400|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    400|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 400, False: 0]
  |  |  ------------------
  ------------------
 1046|    400|	switch (yych) {
 1047|      2|		case 'b':
  ------------------
  |  Branch (1047:3): [True: 2, False: 398]
  ------------------
 1048|      9|		case 'g':
  ------------------
  |  Branch (1048:3): [True: 7, False: 393]
  ------------------
 1049|     14|		case 'i':
  ------------------
  |  Branch (1049:3): [True: 5, False: 395]
  ------------------
 1050|     74|		case 's': goto yy55;
  ------------------
  |  Branch (1050:3): [True: 60, False: 340]
  ------------------
 1051|     91|		case 'n': goto yy56;
  ------------------
  |  Branch (1051:3): [True: 91, False: 309]
  ------------------
 1052|    235|		default: goto yy53;
  ------------------
  |  Branch (1052:3): [True: 235, False: 165]
  ------------------
 1053|    400|	}
 1054|    235|yy53:
 1055|    235|	YYSKIP();
  ------------------
  |  |   35|    235|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    235|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1056|    247|yy54:
 1057|    247|	{ pos = str.data; goto parse_path; }
 1058|     74|yy55:
 1059|     74|	YYSKIP();
  ------------------
  |  |   35|     74|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|     74|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1060|     74|	yych = YYPEEK();
  ------------------
  |  |   33|     74|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     74|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     74|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 74, False: 0]
  |  |  ------------------
  ------------------
 1061|     74|	switch (yych) {
 1062|     73|		case '=': goto yy57;
  ------------------
  |  Branch (1062:3): [True: 73, False: 1]
  ------------------
 1063|      1|		default: goto yy54;
  ------------------
  |  Branch (1063:3): [True: 1, False: 73]
  ------------------
 1064|     74|	}
 1065|     91|yy56:
 1066|     91|	YYSKIP();
  ------------------
  |  |   35|     91|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|     91|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1067|     91|	YYBACKUP();
  ------------------
  |  |   36|     91|#define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   32|     91|#define YYMARKER context.marker
  |  |  ------------------
  |  |               #define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|     91|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1068|     91|	yych = YYPEEK();
  ------------------
  |  |   33|     91|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     91|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     91|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 91, False: 0]
  |  |  ------------------
  ------------------
 1069|     91|	switch (yych) {
 1070|     90|		case 's': goto yy58;
  ------------------
  |  Branch (1070:3): [True: 90, False: 1]
  ------------------
 1071|      1|		default: goto yy54;
  ------------------
  |  Branch (1071:3): [True: 1, False: 90]
  ------------------
 1072|     91|	}
 1073|    153|yy57:
 1074|    153|	YYSKIP();
  ------------------
  |  |   35|    153|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    153|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1075|    153|	{
 1076|       |        // Find the end position of the NodeId body and parse
 1077|   281k|        for(; pos < end; pos++) {
  ------------------
  |  Branch (1077:15): [True: 281k, False: 5]
  ------------------
 1078|   281k|            if(*pos == '%') {
  ------------------
  |  Branch (1078:16): [True: 2, False: 281k]
  ------------------
 1079|      2|                pos += 2;
 1080|      2|                continue;
 1081|      2|            }
 1082|   281k|            if(isReservedPercentExtended(*pos))
  ------------------
  |  Branch (1082:16): [True: 148, False: 281k]
  ------------------
 1083|    148|                break;
 1084|   281k|        }
 1085|    153|        if(pos > end) {
  ------------------
  |  Branch (1085:12): [True: 0, False: 153]
  ------------------
 1086|      0|            res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1087|      0|            goto cleanup;
 1088|      0|        }
 1089|    153|        res = parse_nodeid(&ao->nodeId, str.data, pos, UA_ESCAPING_PERCENT, NULL);
 1090|    153|        if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    153|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1090:12): [True: 12, False: 141]
  ------------------
 1091|     12|            goto cleanup;
 1092|    141|        goto parse_path;
 1093|    153|    }
 1094|    141|yy58:
 1095|     90|	YYSKIP();
  ------------------
  |  |   35|     90|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|     90|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1096|     90|	yych = YYPEEK();
  ------------------
  |  |   33|     90|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     90|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     90|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 90, False: 0]
  |  |  ------------------
  ------------------
 1097|     90|	switch (yych) {
 1098|     78|		case '=': goto yy60;
  ------------------
  |  Branch (1098:3): [True: 78, False: 12]
  ------------------
 1099|     12|		case 'u': goto yy61;
  ------------------
  |  Branch (1099:3): [True: 12, False: 78]
  ------------------
 1100|      0|		default: goto yy59;
  ------------------
  |  Branch (1100:3): [True: 0, False: 90]
  ------------------
 1101|     90|	}
 1102|     10|yy59:
 1103|     10|	YYRESTORE();
  ------------------
  |  |   37|     10|#define YYRESTORE() YYCURSOR = YYMARKER
  |  |  ------------------
  |  |  |  |   31|     10|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYRESTORE() YYCURSOR = YYMARKER
  |  |  ------------------
  |  |  |  |   32|     10|#define YYMARKER context.marker
  |  |  ------------------
  ------------------
 1104|     10|	goto yy54;
 1105|     78|yy60:
 1106|     78|	YYSKIP();
  ------------------
  |  |   35|     78|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|     78|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1107|     78|	yych = YYPEEK();
  ------------------
  |  |   33|     78|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     78|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     78|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 78, False: 0]
  |  |  ------------------
  ------------------
 1108|     78|	switch (yych) {
 1109|      0|		case '0':
  ------------------
  |  Branch (1109:3): [True: 0, False: 78]
  ------------------
 1110|      0|		case '1':
  ------------------
  |  Branch (1110:3): [True: 0, False: 78]
  ------------------
 1111|     24|		case '2':
  ------------------
  |  Branch (1111:3): [True: 24, False: 54]
  ------------------
 1112|     78|		case '3':
  ------------------
  |  Branch (1112:3): [True: 54, False: 24]
  ------------------
 1113|     78|		case '4':
  ------------------
  |  Branch (1113:3): [True: 0, False: 78]
  ------------------
 1114|     78|		case '5':
  ------------------
  |  Branch (1114:3): [True: 0, False: 78]
  ------------------
 1115|     78|		case '6':
  ------------------
  |  Branch (1115:3): [True: 0, False: 78]
  ------------------
 1116|     78|		case '7':
  ------------------
  |  Branch (1116:3): [True: 0, False: 78]
  ------------------
 1117|     78|		case '8':
  ------------------
  |  Branch (1117:3): [True: 0, False: 78]
  ------------------
 1118|     78|		case '9': goto yy62;
  ------------------
  |  Branch (1118:3): [True: 0, False: 78]
  ------------------
 1119|      0|		default: goto yy59;
  ------------------
  |  Branch (1119:3): [True: 0, False: 78]
  ------------------
 1120|     78|	}
 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|    126|yy62:
 1129|    126|	YYSKIP();
  ------------------
  |  |   35|    126|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    126|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1130|    126|	yych = YYPEEK();
  ------------------
  |  |   33|    126|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    126|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    126|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 126, False: 0]
  |  |  ------------------
  ------------------
 1131|    126|	switch (yych) {
 1132|      0|		case '0':
  ------------------
  |  Branch (1132:3): [True: 0, False: 126]
  ------------------
 1133|      0|		case '1':
  ------------------
  |  Branch (1133:3): [True: 0, False: 126]
  ------------------
 1134|      0|		case '2':
  ------------------
  |  Branch (1134:3): [True: 0, False: 126]
  ------------------
 1135|      0|		case '3':
  ------------------
  |  Branch (1135:3): [True: 0, False: 126]
  ------------------
 1136|      0|		case '4':
  ------------------
  |  Branch (1136:3): [True: 0, False: 126]
  ------------------
 1137|     24|		case '5':
  ------------------
  |  Branch (1137:3): [True: 24, False: 102]
  ------------------
 1138|     24|		case '6':
  ------------------
  |  Branch (1138:3): [True: 0, False: 126]
  ------------------
 1139|     48|		case '7':
  ------------------
  |  Branch (1139:3): [True: 24, False: 102]
  ------------------
 1140|     48|		case '8':
  ------------------
  |  Branch (1140:3): [True: 0, False: 126]
  ------------------
 1141|     48|		case '9': goto yy62;
  ------------------
  |  Branch (1141:3): [True: 0, False: 126]
  ------------------
 1142|     78|		case ';': goto yy64;
  ------------------
  |  Branch (1142:3): [True: 78, False: 48]
  ------------------
 1143|      0|		default: goto yy59;
  ------------------
  |  Branch (1143:3): [True: 0, False: 126]
  ------------------
 1144|    126|	}
 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|     82|yy64:
 1154|     82|	YYSKIP();
  ------------------
  |  |   35|     82|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|     82|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1155|     82|	yych = YYPEEK();
  ------------------
  |  |   33|     82|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     82|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     82|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 82, False: 0]
  |  |  ------------------
  ------------------
 1156|     82|	switch (yych) {
 1157|      2|		case 'b':
  ------------------
  |  Branch (1157:3): [True: 2, False: 80]
  ------------------
 1158|      2|		case 'g':
  ------------------
  |  Branch (1158:3): [True: 0, False: 82]
  ------------------
 1159|     80|		case 'i':
  ------------------
  |  Branch (1159:3): [True: 78, False: 4]
  ------------------
 1160|     80|		case 's': goto yy65;
  ------------------
  |  Branch (1160:3): [True: 0, False: 82]
  ------------------
 1161|      2|		default: goto yy59;
  ------------------
  |  Branch (1161:3): [True: 2, False: 80]
  ------------------
 1162|     82|	}
 1163|     80|yy65:
 1164|     80|	YYSKIP();
  ------------------
  |  |   35|     80|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|     80|#define YYCURSOR pos
  |  |  ------------------
  ------------------
 1165|     80|	yych = YYPEEK();
  ------------------
  |  |   33|     80|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     80|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|     80|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 80, False: 0]
  |  |  ------------------
  ------------------
 1166|     80|	switch (yych) {
 1167|     80|		case '=': goto yy57;
  ------------------
  |  Branch (1167:3): [True: 80, False: 0]
  ------------------
 1168|      0|		default: goto yy59;
  ------------------
  |  Branch (1168:3): [True: 0, False: 80]
  ------------------
 1169|     80|	}
 1170|     80|}
 1171|       |
 1172|       |
 1173|       |    /* Parse the BrowsePath */
 1174|    388| parse_path:
 1175|    388|    res = parse_relativepath(&ao->browsePath, &pos, end, NULL,
 1176|    388|                             UA_ESCAPING_PERCENT_EXTENDED, defaultNamespaceIndex);
 1177|    388|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    388|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1177:8): [True: 76, False: 312]
  ------------------
 1178|     76|        goto cleanup;
 1179|       |
 1180|       |    /* Parse the AttributeId */
 1181|    312|    if(pos < end && *pos == '#') {
  ------------------
  |  Branch (1181:8): [True: 70, False: 242]
  |  Branch (1181:21): [True: 13, False: 57]
  ------------------
 1182|     13|        const u8 *attr_pos = ++pos;
 1183|   244k|        while(pos < end && ((*pos >= 'a' && *pos <= 'z') ||
  ------------------
  |  Branch (1183:15): [True: 244k, False: 5]
  |  Branch (1183:30): [True: 237k, False: 7.31k]
  |  Branch (1183:45): [True: 237k, False: 1]
  ------------------
 1184|   244k|                            (*pos >= 'A' && *pos <= 'Z'))) {
  ------------------
  |  Branch (1184:30): [True: 7.30k, False: 7]
  |  Branch (1184:45): [True: 7.30k, False: 1]
  ------------------
 1185|   244k|            pos++;
 1186|   244k|        }
 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|    299|    if(pos < end && *pos == '[') {
  ------------------
  |  Branch (1196:8): [True: 57, False: 242]
  |  Branch (1196:21): [True: 38, False: 19]
  ------------------
 1197|     38|        const u8 *range_pos = ++pos;
 1198|  6.97M|        while(pos < end && *pos != ']') {
  ------------------
  |  Branch (1198:15): [True: 6.97M, False: 0]
  |  Branch (1198:28): [True: 6.97M, False: 38]
  ------------------
 1199|  6.97M|            pos++;
 1200|  6.97M|        }
 1201|     38|        if(pos == end) {
  ------------------
  |  Branch (1201:12): [True: 0, False: 38]
  ------------------
 1202|      0|            res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1203|      0|            goto cleanup;
 1204|      0|        }
 1205|     38|        UA_String rangeString = {(size_t)(pos - range_pos), (UA_Byte*)(uintptr_t)range_pos};
 1206|     38|        if(rangeString.length > 0)
  ------------------
  |  Branch (1206:12): [True: 38, False: 0]
  ------------------
 1207|     38|            res = UA_String_copy(&rangeString, &ao->indexRange);
 1208|     38|        pos++;
 1209|     38|    }
 1210|       |
 1211|       |    /* Check that we have parsed the entire string */
 1212|    299|    if(pos != end)
  ------------------
  |  Branch (1212:8): [True: 23, False: 276]
  ------------------
 1213|     23|        res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     23|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1214|       |
 1215|       |
 1216|    400| cleanup:
 1217|    400|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    400|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1217:8): [True: 124, False: 276]
  ------------------
 1218|    124|        UA_AttributeOperand_clear(ao);
 1219|    400|    return res;
 1220|    299|}

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|    551|UA_readNumberWithBase(const UA_Byte *buf, size_t buflen, UA_UInt32 *number, UA_Byte base) {
  112|    551|    UA_assert(buf);
  ------------------
  |  |  399|    551|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (112:5): [True: 551, False: 0]
  ------------------
  113|    551|    UA_assert(number);
  ------------------
  |  |  399|    551|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (113:5): [True: 551, False: 0]
  ------------------
  114|    551|    u32 n = 0;
  115|    551|    size_t progress = 0;
  116|       |    /* read numbers until the end or a non-number character appears */
  117|  1.18M|    while(progress < buflen) {
  ------------------
  |  Branch (117:11): [True: 1.18M, False: 530]
  ------------------
  118|  1.18M|        u8 c = buf[progress];
  119|  1.18M|        if(c >= '0' && c <= '9' && c <= '0' + (base-1))
  ------------------
  |  Branch (119:12): [True: 1.18M, False: 4]
  |  Branch (119:24): [True: 1.18M, False: 17]
  |  Branch (119:36): [True: 1.18M, False: 0]
  ------------------
  120|  1.18M|           n = (n * base) + c - '0';
  121|     21|        else if(base > 9 && c >= 'a' && c <= 'z' && c <= 'a' + (base-11))
  ------------------
  |  Branch (121:17): [True: 21, False: 0]
  |  Branch (121:29): [True: 17, False: 4]
  |  Branch (121:41): [True: 4, False: 13]
  |  Branch (121:53): [True: 0, False: 4]
  ------------------
  122|      0|           n = (n * base) + c-'a' + 10;
  123|     21|        else if(base > 9 && c >= 'A' && c <= 'Z' && c <= 'A' + (base-11))
  ------------------
  |  Branch (123:17): [True: 21, False: 0]
  |  Branch (123:29): [True: 17, False: 4]
  |  Branch (123:41): [True: 0, False: 17]
  |  Branch (123:53): [True: 0, False: 0]
  ------------------
  124|      0|           n = (n * base) + c-'A' + 10;
  125|     21|        else
  126|     21|           break;
  127|  1.18M|        ++progress;
  128|  1.18M|    }
  129|    551|    *number = n;
  130|    551|    return progress;
  131|    551|}
UA_readNumber:
  134|    551|UA_readNumber(const UA_Byte *buf, size_t buflen, UA_UInt32 *number) {
  135|    551|    return UA_readNumberWithBase(buf, buflen, number, 10);
  136|    551|}
lookupRefType:
  727|    649|lookupRefType(UA_Server *server, UA_QualifiedName *qn, UA_NodeId *outRefTypeId) {
  728|       |    /* Check well-known ReferenceTypes first */
  729|    649|    if(qn->namespaceIndex == 0) {
  ------------------
  |  Branch (729:8): [True: 649, False: 0]
  ------------------
  730|  3.18k|        for(size_t i = 0; i < KNOWNREFTYPES; i++) {
  ------------------
  |  |  705|  3.18k|#define KNOWNREFTYPES 17
  ------------------
  |  Branch (730:27): [True: 3.11k, False: 71]
  ------------------
  731|  3.11k|            if(UA_String_equal(&qn->name, &knownRefTypes[i].browseName)) {
  ------------------
  |  Branch (731:16): [True: 578, False: 2.53k]
  ------------------
  732|    578|                *outRefTypeId = UA_NODEID_NUMERIC(0, knownRefTypes[i].identifier);
  733|    578|                return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    578|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  734|    578|            }
  735|  3.11k|        }
  736|    649|    }
  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.35k|getRefTypeBrowseName(const UA_NodeId *refTypeId, UA_String *outBN) {
  775|       |    /* Canonical name known? */
  776|  5.35k|    if(refTypeId->namespaceIndex == 0 &&
  ------------------
  |  Branch (776:8): [True: 5.35k, False: 0]
  ------------------
  777|  5.35k|       refTypeId->identifierType == UA_NODEIDTYPE_NUMERIC) {
  ------------------
  |  Branch (777:8): [True: 672, False: 4.68k]
  ------------------
  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.71k|    return UA_NodeId_print(refTypeId, outBN);
  789|  5.35k|}
UA_String_unescape:
  803|  8.88k|UA_String_unescape(UA_String *str, UA_Boolean copyEscape, UA_Escaping esc) {
  804|  8.88k|    if(esc == UA_ESCAPING_NONE)
  ------------------
  |  Branch (804:8): [True: 0, False: 8.88k]
  ------------------
  805|      0|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  806|       |
  807|       |    /* Does the string need escaping? */
  808|  8.88k|    UA_String tmp;
  809|  8.88k|    status res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  8.88k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  810|  8.88k|    u8 *pos = str->data;
  811|  8.88k|    u8 *end = str->data + str->length;
  812|  8.88k|    u8 escape_char = (esc == UA_ESCAPING_PERCENT ||
  ------------------
  |  Branch (812:23): [True: 60, False: 8.82k]
  ------------------
  813|  8.88k|                      esc == UA_ESCAPING_PERCENT_EXTENDED) ? '%' : '&';
  ------------------
  |  Branch (813:23): [True: 8.82k, False: 0]
  ------------------
  814|  6.22M|    for(; pos < end; pos++) {
  ------------------
  |  Branch (814:11): [True: 6.21M, False: 7.95k]
  ------------------
  815|  6.21M|        if(*pos == escape_char)
  ------------------
  |  Branch (815:12): [True: 931, False: 6.21M]
  ------------------
  816|    931|            goto escape;
  817|  6.21M|    }
  818|       |
  819|  7.95k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  7.95k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  820|       |
  821|    931| escape:
  822|    931|    if(copyEscape) {
  ------------------
  |  Branch (822:8): [True: 0, False: 931]
  ------------------
  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|    931|    u8 byte = 0;
  831|    931|    u8 *writepos = pos;
  832|       |
  833|    931|    res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    931|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  834|    931|    if(esc == UA_ESCAPING_PERCENT ||
  ------------------
  |  Branch (834:8): [True: 0, False: 931]
  ------------------
  835|    931|       esc == UA_ESCAPING_PERCENT_EXTENDED) {
  ------------------
  |  Branch (835:8): [True: 931, False: 0]
  ------------------
  836|       |        /* Percent-Escaping */
  837|  9.55M|        for(; pos < end; pos++) {
  ------------------
  |  Branch (837:15): [True: 9.55M, False: 896]
  ------------------
  838|  9.55M|            if(*pos == '%') {
  ------------------
  |  Branch (838:16): [True: 8.10M, False: 1.44M]
  ------------------
  839|  8.10M|                if(pos + 2 >= end || !isHex(pos[1]) || !isHex(pos[2]))
  ------------------
  |  Branch (839:20): [True: 0, False: 8.10M]
  |  Branch (839:38): [True: 34, False: 8.10M]
  |  Branch (839:56): [True: 1, False: 8.10M]
  ------------------
  840|     35|                    goto out;
  841|  8.10M|                if(pos[1] >= 'a')
  ------------------
  |  Branch (841:20): [True: 208, False: 8.10M]
  ------------------
  842|    208|                    byte = pos[1] - ('a' - 10);
  843|  8.10M|                else if(pos[1] >= 'A')
  ------------------
  |  Branch (843:25): [True: 0, False: 8.10M]
  ------------------
  844|      0|                    byte = pos[1] - ('A' - 10);
  845|  8.10M|                else
  846|  8.10M|                    byte = pos[1] - '0';
  847|  8.10M|                byte <<= 4;
  848|       |
  849|  8.10M|                if(pos[2] >= 'a')
  ------------------
  |  Branch (849:20): [True: 4.10M, False: 3.99M]
  ------------------
  850|  4.10M|                    byte += (u8)(pos[2] - ('a' - 10));
  851|  3.99M|                else if(pos[2] >= 'A')
  ------------------
  |  Branch (851:25): [True: 73, False: 3.99M]
  ------------------
  852|     73|                    byte += (u8)(pos[2] - ('A' - 10));
  853|  3.99M|                else
  854|  3.99M|                    byte += (u8)(pos[2] - '0');
  855|       |
  856|  8.10M|                pos += 2;
  857|  8.10M|                *writepos++ = byte;
  858|  8.10M|                continue;
  859|  8.10M|            }
  860|  1.44M|            *writepos++ = *pos;
  861|  1.44M|        }
  862|    931|    } 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|    896|    res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    896|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  874|       |
  875|    931| out:
  876|    931|    if(copyEscape) {
  ------------------
  |  Branch (876:8): [True: 0, False: 931]
  ------------------
  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|    931|    } else if(res == UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|    931|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (884:15): [True: 896, False: 35]
  ------------------
  885|    896|        str->length = (size_t)(writepos - str->data);
  886|    896|    }
  887|    931|    return res;
  888|    896|}
UA_String_escapedSize:
  894|  12.3k|UA_String_escapedSize(const UA_String s, UA_Escaping esc) {
  895|       |    /* Find out the overhead from escaping */
  896|  12.3k|    size_t overhead = 0;
  897|  52.7M|    for(size_t j = 0; j < s.length; j++) {
  ------------------
  |  Branch (897:23): [True: 52.7M, False: 12.3k]
  ------------------
  898|  52.7M|        if(esc == UA_ESCAPING_AND_EXTENDED)
  ------------------
  |  Branch (898:12): [True: 0, False: 52.7M]
  ------------------
  899|      0|            overhead += isReservedAndExtended(s.data[j]);
  900|  52.7M|        else if(esc == UA_ESCAPING_AND)
  ------------------
  |  Branch (900:17): [True: 0, False: 52.7M]
  ------------------
  901|      0|            overhead += isReservedAnd(s.data[j]);
  902|  52.7M|        else if(esc == UA_ESCAPING_PERCENT)
  ------------------
  |  Branch (902:17): [True: 0, False: 52.7M]
  ------------------
  903|      0|            overhead += (isReservedPercent(s.data[j]) ? 2 : 0);
  ------------------
  |  Branch (903:26): [True: 0, False: 0]
  ------------------
  904|  52.7M|        else /* if(esc == UA_ESCAPING_PERCENT_EXTENDED) */
  905|  52.7M|            overhead += (isReservedPercentExtended(s.data[j]) ? 2 : 0);
  ------------------
  |  Branch (905:26): [True: 48.6M, False: 4.13M]
  ------------------
  906|  52.7M|    }
  907|       |
  908|  12.3k|    return s.length + overhead;
  909|  12.3k|}
UA_String_escapeInsert:
  912|  11.0k|UA_String_escapeInsert(u8 *pos, const UA_String s2, UA_Escaping esc) {
  913|  11.0k|    u8 *begin = pos;
  914|       |
  915|  11.0k|    if(esc == UA_ESCAPING_NONE) {
  ------------------
  |  Branch (915:8): [True: 2.66k, False: 8.34k]
  ------------------
  916|  17.5M|        for(size_t j = 0; j < s2.length; j++)
  ------------------
  |  Branch (916:27): [True: 17.5M, False: 2.66k]
  ------------------
  917|  17.5M|            *pos++ = s2.data[j];
  918|  8.34k|    } else if(esc == UA_ESCAPING_PERCENT || esc == UA_ESCAPING_PERCENT_EXTENDED) {
  ------------------
  |  Branch (918:15): [True: 0, False: 8.34k]
  |  Branch (918:45): [True: 8.34k, False: 0]
  ------------------
  919|  17.6M|        for(size_t j = 0; j < s2.length; j++) {
  ------------------
  |  Branch (919:27): [True: 17.6M, False: 8.34k]
  ------------------
  920|  17.6M|            UA_Boolean reserved = (esc == UA_ESCAPING_PERCENT_EXTENDED) ?
  ------------------
  |  Branch (920:35): [True: 17.6M, False: 0]
  ------------------
  921|  17.6M|                isReservedPercentExtended(s2.data[j]) : isReservedPercent(s2.data[j]);
  922|  17.6M|            if(UA_LIKELY(!reserved)) {
  ------------------
  |  |  578|  17.6M|# define UA_LIKELY(x) __builtin_expect((x), 1)
  |  |  ------------------
  |  |  |  Branch (578:23): [True: 1.39M, False: 16.2M]
  |  |  ------------------
  ------------------
  923|  1.39M|                *pos++ = s2.data[j];
  924|  16.2M|            } else {
  925|  16.2M|                *pos++ = '%';
  926|  16.2M|                *pos++ = hexchars[s2.data[j] >> 4];
  927|  16.2M|                *pos++ = hexchars[s2.data[j] & 0x0f];
  928|  16.2M|            }
  929|  17.6M|        }
  930|  8.34k|    } 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|  11.0k|    return (size_t)(pos - begin);
  941|  11.0k|}
UA_String_escapeAppend:
  944|  8.28k|UA_String_escapeAppend(UA_String *s, const UA_String s2, UA_Escaping esc) {
  945|  8.28k|    if(esc == UA_ESCAPING_NONE)
  ------------------
  |  Branch (945:8): [True: 0, False: 8.28k]
  ------------------
  946|      0|        return UA_String_append(s, s2);
  947|       |
  948|       |    /* Allocate memory for the additional escaped string */
  949|  8.28k|    size_t escapedLength = UA_String_escapedSize(s2, esc);
  950|  8.28k|    UA_Byte *buf = (UA_Byte*)
  951|  8.28k|        UA_realloc((void*)((uintptr_t)s->data & ~(uintptr_t)UA_EMPTY_ARRAY_SENTINEL),
  ------------------
  |  |   21|  8.28k|#define UA_realloc(ptr, size) UA_reallocSingleton(ptr, size)
  ------------------
  952|  8.28k|                   s->length + s2.length + escapedLength);
  953|  8.28k|    if(!buf)
  ------------------
  |  Branch (953:8): [True: 0, False: 8.28k]
  ------------------
  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.28k|    s->data = buf;
  958|  8.28k|    UA_String_escapeInsert(s->data + s->length, s2, esc);
  959|  8.28k|    s->length += escapedLength;
  960|  8.28k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  8.28k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  961|  8.28k|}
UA_AttributeOperand_print:
 1125|    276|                          UA_String *out) {
 1126|    276|    UA_String tmp = UA_STRING_NULL;
 1127|    276|    UA_StatusCode res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    276|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1128|       |
 1129|       |    /* Print the TypeDefinitionId */
 1130|    276|    if(!UA_NodeId_equal(&objectsFolder, &ao->nodeId)) {
  ------------------
  |  Branch (1130:8): [True: 134, False: 142]
  ------------------
 1131|    134|        UA_Byte nodeIdBuf[512];
 1132|    134|        UA_String nodeIdBufStr = {512, nodeIdBuf};
 1133|    134|        res |= nodeId_printEscape(&ao->nodeId, &nodeIdBufStr,
 1134|    134|                                  NULL, UA_ESCAPING_PERCENT_EXTENDED);
 1135|    134|        res |= UA_String_append(&tmp, nodeIdBufStr);
 1136|    134|    }
 1137|       |
 1138|       |    /* Print the BrowsePath */
 1139|    276|    UA_String rpstr = UA_STRING_NULL;
 1140|    276|    UA_assert(rpstr.data == NULL && rpstr.length == 0); /* pacify clang scan-build */
  ------------------
  |  |  399|    276|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (1140:5): [True: 276, False: 0]
  |  Branch (1140:5): [True: 276, False: 0]
  ------------------
 1141|    276|    res |= printRelativePath(&ao->browsePath, &rpstr, UA_ESCAPING_PERCENT_EXTENDED);
 1142|    276|    res |= UA_String_append(&tmp, rpstr);
 1143|    276|    UA_String_clear(&rpstr);
 1144|       |
 1145|       |    /* Print the attribute name */
 1146|    276|    if(ao->attributeId != UA_ATTRIBUTEID_VALUE) {
  ------------------
  |  Branch (1146:8): [True: 0, False: 276]
  ------------------
 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|    276|    if(ao->indexRange.length > 0) {
  ------------------
  |  Branch (1153:8): [True: 34, False: 242]
  ------------------
 1154|     34|        res |= UA_String_append(&tmp, UA_STRING("["));
 1155|     34|        res |= UA_String_append(&tmp, ao->indexRange);
 1156|     34|        res |= UA_String_append(&tmp, UA_STRING("]"));
 1157|     34|    }
 1158|       |
 1159|       |    /* Encoding failed, clean up */
 1160|    276|    if(res != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|    276|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1160:8): [True: 0, False: 276]
  ------------------
 1161|      0|        UA_String_clear(&tmp);
 1162|      0|        return res;
 1163|      0|    }
 1164|       |
 1165|    276|    return moveTmpToOut(&tmp, out);
 1166|    276|}
ua_util.c:isHex:
  796|  16.2M|isHex(u8 c) {
  797|  16.2M|    return ((c >= 'a' && c <= 'f') ||
  ------------------
  |  Branch (797:14): [True: 4.10M, False: 12.1M]
  |  Branch (797:26): [True: 4.10M, False: 14]
  ------------------
  798|  12.1M|            (c >= 'A' && c <= 'F') ||
  ------------------
  |  Branch (798:14): [True: 88, False: 12.1M]
  |  Branch (798:26): [True: 73, False: 15]
  ------------------
  799|  12.1M|            (c >= '0' && c <= '9'));
  ------------------
  |  Branch (799:14): [True: 12.1M, False: 20]
  |  Branch (799:26): [True: 12.1M, False: 15]
  ------------------
  800|  16.2M|}
ua_util.c:printRelativePath:
 1001|    276|printRelativePath(const UA_RelativePath *rp, UA_String *out, UA_Escaping esc) {
 1002|    276|    UA_String tmp = UA_STRING_NULL;
 1003|    276|    UA_StatusCode res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    276|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1004|  4.50k|    for(size_t i = 0; i < rp->elementsSize && res == UA_STATUSCODE_GOOD; i++) {
  ------------------
  |  |   17|  4.22k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1004:23): [True: 4.22k, False: 276]
  |  Branch (1004:47): [True: 4.22k, False: 0]
  ------------------
 1005|       |        /* Print the reference type */
 1006|  4.22k|        UA_RelativePathElement *elm = &rp->elements[i];
 1007|  4.22k|        if(UA_NodeId_equal(&hierarchicalRefs, &elm->referenceTypeId) &&
  ------------------
  |  Branch (1007:12): [True: 424, False: 3.80k]
  ------------------
 1008|    424|           !elm->isInverse && elm->includeSubtypes) {
  ------------------
  |  Branch (1008:12): [True: 296, False: 128]
  |  Branch (1008:31): [True: 166, False: 130]
  ------------------
 1009|    166|            res |= UA_String_append(&tmp, UA_STRING("/"));
 1010|  4.06k|        } else if(esc == UA_ESCAPING_AND &&
  ------------------
  |  Branch (1010:19): [True: 0, False: 4.06k]
  ------------------
 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|  4.06k|        } else {
 1015|  4.06k|            res |= UA_String_append(&tmp, UA_STRING("<"));
 1016|  4.06k|            if(!elm->includeSubtypes)
  ------------------
  |  Branch (1016:16): [True: 130, False: 3.93k]
  ------------------
 1017|    130|                res |= UA_String_append(&tmp, UA_STRING("#"));
 1018|  4.06k|            if(elm->isInverse)
  ------------------
  |  Branch (1018:16): [True: 164, False: 3.89k]
  ------------------
 1019|    164|                res |= UA_String_append(&tmp, UA_STRING("!"));
 1020|  4.06k|            if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  4.06k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1020:16): [True: 0, False: 4.06k]
  ------------------
 1021|      0|                break;
 1022|       |
 1023|  4.06k|            UA_Byte bnBuf[512];
 1024|  4.06k|            UA_String bnBufStr = {512, bnBuf};
 1025|  4.06k|            res = getRefTypeBrowseName(&elm->referenceTypeId, &bnBufStr);
 1026|  4.06k|            if(res != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|  4.06k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1026:16): [True: 1.29k, False: 2.76k]
  ------------------
 1027|  1.29k|                UA_String_init(&bnBufStr);
 1028|  1.29k|                res = getRefTypeBrowseName(&elm->referenceTypeId, &bnBufStr);
 1029|  1.29k|                if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  1.29k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1029:20): [True: 0, False: 1.29k]
  ------------------
 1030|      0|                    break;
 1031|  1.29k|            }
 1032|  4.06k|            res |= UA_String_escapeAppend(&tmp, bnBufStr, esc);
 1033|  4.06k|            res |= UA_String_append(&tmp, UA_STRING(">"));
 1034|  4.06k|            if(bnBufStr.data != bnBuf)
  ------------------
  |  Branch (1034:16): [True: 1.29k, False: 2.76k]
  ------------------
 1035|  1.29k|                UA_String_clear(&bnBufStr);
 1036|  4.06k|        }
 1037|       |
 1038|       |        /* Print the qualified name */
 1039|  4.22k|        UA_QualifiedName *qn = &elm->targetName;
 1040|  4.22k|        if(qn->namespaceIndex > 0) {
  ------------------
  |  Branch (1040:12): [True: 14, False: 4.21k]
  ------------------
 1041|     14|            char nsStr[8]; /* Enough for a uint16 */
 1042|     14|            itoaUnsigned(qn->namespaceIndex, nsStr, 10);
 1043|     14|            res |= UA_String_append(&tmp, UA_STRING(nsStr));
 1044|     14|            res |= UA_String_append(&tmp, UA_STRING(":"));
 1045|     14|        }
 1046|  4.22k|        res |= UA_String_escapeAppend(&tmp, qn->name, esc);
 1047|  4.22k|    }
 1048|       |
 1049|       |    /* Encoding failed, clean up */
 1050|    276|    if(res != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|    276|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1050:8): [True: 0, False: 276]
  ------------------
 1051|      0|        UA_String_clear(&tmp);
 1052|      0|        return res;
 1053|      0|    }
 1054|       |
 1055|    276|    return moveTmpToOut(&tmp, out);
 1056|    276|}
ua_util.c:moveTmpToOut:
  964|    552|moveTmpToOut(UA_String *tmp, UA_String *out) {
  965|       |    /* Output has zero length */
  966|    552|    if(tmp->length == 0) {
  ------------------
  |  Branch (966:8): [True: 30, False: 522]
  ------------------
  967|     30|        UA_assert(tmp->data == NULL);
  ------------------
  |  |  399|     30|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (967:9): [True: 30, False: 0]
  ------------------
  968|     30|        if(out->data == NULL)
  ------------------
  |  Branch (968:12): [True: 30, False: 0]
  ------------------
  969|     30|            out->data = (UA_Byte*)UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|     30|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  970|     30|        out->length = 0;
  971|     30|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     30|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  972|     30|    }
  973|       |
  974|       |    /* No output buffer provided, return the tmp buffer */
  975|    522|    if(out->length == 0) {
  ------------------
  |  Branch (975:8): [True: 522, False: 0]
  ------------------
  976|    522|        *out = *tmp;
  977|    522|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    522|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  978|    522|    }
  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|  70.3M|isReservedPercent(u8 c) {
   96|  70.3M|    return (c == ';'  || c == '%' || c <= ' ' || c == 127);
  ------------------
  |  Branch (96:13): [True: 11.4k, False: 70.3M]
  |  Branch (96:26): [True: 4.16k, False: 70.3M]
  |  Branch (96:38): [True: 31.0M, False: 39.2M]
  |  Branch (96:50): [True: 200, False: 39.2M]
  ------------------
   97|  70.3M|}
ua_util.c:isReservedPercentExtended:
  100|  70.3M|isReservedPercentExtended(u8 c) {
  101|  70.3M|    return (isReservedPercent(c) || c == ':' || c == '#' || c == '[' || c == ']' ||
  ------------------
  |  Branch (101:13): [True: 31.0M, False: 39.2M]
  |  Branch (101:37): [True: 2.77k, False: 39.2M]
  |  Branch (101:49): [True: 5.53k, False: 39.2M]
  |  Branch (101:61): [True: 32.4M, False: 6.85M]
  |  Branch (101:73): [True: 16.5k, False: 6.83M]
  ------------------
  102|  6.83M|            c == '&' || c == '(' || c == ')' || c == ',' || c == '<' || c == '>' ||
  ------------------
  |  Branch (102:13): [True: 520k, False: 6.31M]
  |  Branch (102:25): [True: 174k, False: 6.14M]
  |  Branch (102:37): [True: 176k, False: 5.96M]
  |  Branch (102:49): [True: 43.7k, False: 5.92M]
  |  Branch (102:61): [True: 14.3k, False: 5.90M]
  |  Branch (102:73): [True: 0, False: 5.90M]
  ------------------
  103|  5.90M|            c == '`' || c == '/' || c == '\\' || c == '"' || c == '\'' );
  ------------------
  |  Branch (103:13): [True: 12.6k, False: 5.89M]
  |  Branch (103:25): [True: 31.8k, False: 5.86M]
  |  Branch (103:37): [True: 310k, False: 5.55M]
  |  Branch (103:50): [True: 12.8k, False: 5.53M]
  |  Branch (103:62): [True: 3.51k, False: 5.53M]
  ------------------
  104|  70.3M|}
ua_types_lex.c:isReservedPercentExtended:
  100|   289k|isReservedPercentExtended(u8 c) {
  101|   289k|    return (isReservedPercent(c) || c == ':' || c == '#' || c == '[' || c == ']' ||
  ------------------
  |  Branch (101:13): [True: 8, False: 289k]
  |  Branch (101:37): [True: 0, False: 289k]
  |  Branch (101:49): [True: 0, False: 289k]
  |  Branch (101:61): [True: 6, False: 289k]
  |  Branch (101:73): [True: 0, False: 289k]
  ------------------
  102|   289k|            c == '&' || c == '(' || c == ')' || c == ',' || c == '<' || c == '>' ||
  ------------------
  |  Branch (102:13): [True: 1, False: 289k]
  |  Branch (102:25): [True: 0, False: 289k]
  |  Branch (102:37): [True: 0, False: 289k]
  |  Branch (102:49): [True: 0, False: 289k]
  |  Branch (102:61): [True: 4.91k, 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: 279, False: 284k]
  |  Branch (103:37): [True: 0, False: 284k]
  |  Branch (103:50): [True: 0, False: 284k]
  |  Branch (103:62): [True: 0, False: 284k]
  ------------------
  104|   289k|}
ua_types_lex.c:isReservedPercent:
   95|   289k|isReservedPercent(u8 c) {
   96|   289k|    return (c == ';'  || c == '%' || c <= ' ' || c == 127);
  ------------------
  |  Branch (96:13): [True: 0, False: 289k]
  |  Branch (96:26): [True: 0, False: 289k]
  |  Branch (96:38): [True: 8, False: 289k]
  |  Branch (96:50): [True: 0, False: 289k]
  ------------------
   97|   289k|}

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

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

fuzz_attributeoperand.cc:_ZL24UA_AttributeOperand_initP19UA_AttributeOperand:
  243|    262|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
fuzz_attributeoperand.cc:_ZL15UA_String_equalPK9UA_StringS1_:
  243|    138|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
fuzz_attributeoperand.cc:_ZL15UA_String_clearP9UA_String:
  243|    276|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
fuzz_attributeoperand.cc:_ZL25UA_AttributeOperand_clearP19UA_AttributeOperand:
  243|    276|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types.c:UA_ByteString_init:
  243|  1.29k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_util.c:UA_String_init:
  243|  1.29k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_util.c:UA_String_equal:
  243|  3.11k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_util.c:UA_String_clear:
  243|  1.56k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_util.c:UA_NodeId_equal:
  243|  4.50k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_String_copy:
  243|  9.66k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_QualifiedName_clear:
  243|    649|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_RelativePath_init:
  243|    388|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_RelativePathElement_init:
  243|  5.44k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_RelativePathElement_clear:
  243|     76|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_AttributeOperand_init:
  243|    400|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_QualifiedName_init:
  243|  5.94k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_AttributeOperand_clear:
  243|    124|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl

