UA_PubSubConnectionConfig_copy:
   34|  2.51k|                               UA_PubSubConnectionConfig *dst) {
   35|  2.51k|    memcpy(dst, src, sizeof(UA_PubSubConnectionConfig));
   36|  2.51k|    memset(&dst->publisherId, 0, sizeof(dst->publisherId));
   37|  2.51k|    dst->name = UA_STRING_NULL;
   38|  2.51k|    UA_Variant_init(&dst->address);
   39|  2.51k|    dst->transportProfileUri = UA_STRING_NULL;
   40|  2.51k|    UA_Variant_init(&dst->connectionTransportSettings);
   41|  2.51k|    dst->connectionProperties = UA_KEYVALUEMAP_NULL;
   42|  2.51k|    UA_StatusCode res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  2.51k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
   43|  2.51k|    res |= UA_PublisherId_copy(&src->publisherId, &dst->publisherId);
   44|  2.51k|    res |= UA_String_copy(&src->name, &dst->name);
   45|  2.51k|    res |= UA_Variant_copy(&src->address, &dst->address);
   46|  2.51k|    res |= UA_String_copy(&src->transportProfileUri, &dst->transportProfileUri);
   47|  2.51k|    res |= UA_Variant_copy(&src->connectionTransportSettings,
   48|  2.51k|                           &dst->connectionTransportSettings);
   49|  2.51k|    res |= UA_KeyValueMap_copy(&src->connectionProperties,
   50|  2.51k|                               &dst->connectionProperties);
   51|  2.51k|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  2.51k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (51:8): [True: 0, False: 2.51k]
  ------------------
   52|      0|        UA_PubSubConnectionConfig_clear(dst);
   53|  2.51k|    return res;
   54|  2.51k|}
UA_PubSubConnectionConfig_clear:
   69|  5.03k|UA_PubSubConnectionConfig_clear(UA_PubSubConnectionConfig *connectionConfig) {
   70|  5.03k|    UA_PublisherId_clear(&connectionConfig->publisherId);
   71|  5.03k|    UA_String_clear(&connectionConfig->name);
   72|  5.03k|    UA_String_clear(&connectionConfig->transportProfileUri);
   73|  5.03k|    UA_Variant_clear(&connectionConfig->connectionTransportSettings);
   74|  5.03k|    UA_Variant_clear(&connectionConfig->address);
   75|  5.03k|    UA_KeyValueMap_clear(&connectionConfig->connectionProperties);
   76|  5.03k|    memset(connectionConfig, 0, sizeof(UA_PubSubConnectionConfig));
   77|  5.03k|}

UA_PublisherId_copy:
  112|  2.51k|                    UA_PublisherId *dst) {
  113|  2.51k|    memcpy(dst, src, sizeof(UA_PublisherId));
  114|  2.51k|    if(src->idType == UA_PUBLISHERIDTYPE_STRING)
  ------------------
  |  Branch (114:8): [True: 0, False: 2.51k]
  ------------------
  115|      0|        return UA_String_copy(&src->id.string, &dst->id.string);
  116|  2.51k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  2.51k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  117|  2.51k|}
UA_PublisherId_clear:
  120|  5.03k|UA_PublisherId_clear(UA_PublisherId *p) {
  121|  5.03k|    if(p->idType == UA_PUBLISHERIDTYPE_STRING)
  ------------------
  |  Branch (121:8): [True: 0, False: 5.03k]
  ------------------
  122|      0|        UA_String_clear(&p->id.string);
  123|  5.03k|    memset(p, 0, sizeof(UA_PublisherId));
  124|  5.03k|}

UA_NodeId_isNull:
  814|  11.2k|UA_NodeId_isNull(const UA_NodeId *p) {
  815|  11.2k|    if(p->namespaceIndex != 0)
  ------------------
  |  Branch (815:8): [True: 1.37k, False: 9.88k]
  ------------------
  816|  1.37k|        return false;
  817|  9.88k|    switch (p->identifierType) {
  ------------------
  |  Branch (817:13): [True: 9.88k, False: 0]
  ------------------
  818|  7.93k|    case UA_NODEIDTYPE_NUMERIC:
  ------------------
  |  Branch (818:5): [True: 7.93k, False: 1.95k]
  ------------------
  819|  7.93k|        return (p->identifier.numeric == 0);
  820|    488|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (820:5): [True: 488, False: 9.40k]
  ------------------
  821|    806|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (821:5): [True: 318, False: 9.57k]
  ------------------
  822|    806|        return (p->identifier.string.length == 0); /* Null and empty string */
  823|  1.15k|    case UA_NODEIDTYPE_GUID:
  ------------------
  |  Branch (823:5): [True: 1.15k, False: 8.73k]
  ------------------
  824|  1.15k|        return (guidOrder(&p->identifier.guid, &UA_GUID_NULL, NULL) == UA_ORDER_EQ);
  825|  9.88k|    }
  826|      0|    return false;
  827|  9.88k|}
UA_Variant_isScalar:
 1363|  99.6k|UA_Variant_isScalar(const UA_Variant *v) {
 1364|  99.6k|    return (v->type != NULL && v->arrayLength == 0 &&
  ------------------
  |  Branch (1364:13): [True: 5.00k, False: 94.6k]
  |  Branch (1364:32): [True: 3.33k, False: 1.67k]
  ------------------
 1365|  3.33k|            v->data > UA_EMPTY_ARRAY_SENTINEL);
  ------------------
  |  |  756|  3.33k|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  |  Branch (1365:13): [True: 2.97k, False: 354]
  ------------------
 1366|  99.6k|}
UA_copy:
 2104|   191k|UA_copy(const void *src, void *dst, const UA_DataType *type) {
 2105|   191k|    memset(dst, 0, type->memSize); /* init */
 2106|   191k|    UA_StatusCode retval = copyJumpTable[type->typeKind](src, dst, type);
 2107|   191k|    if(retval != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|   191k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2107:8): [True: 0, False: 191k]
  ------------------
 2108|      0|        UA_clear(dst, type);
 2109|   191k|    return retval;
 2110|   191k|}
UA_clear:
 2207|  1.04M|UA_clear(void *p, const UA_DataType *type) {
 2208|  1.04M|    clearJumpTable[type->typeKind](p, type);
 2209|  1.04M|    memset(p, 0, type->memSize); /* init */
 2210|  1.04M|}
UA_delete:
 2213|  1.55k|UA_delete(void *p, const UA_DataType *type) {
 2214|  1.55k|    clearJumpTable[type->typeKind](p, type);
 2215|  1.55k|    UA_free(p);
  ------------------
  |  |   19|  1.55k|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 2216|  1.55k|}
UA_order:
 2681|  3.05k|UA_Order UA_order(const void *p1, const void *p2, const UA_DataType *type) {
 2682|  3.05k|    return orderJumpTable[type->typeKind](p1, p2, type);
 2683|  3.05k|}
UA_Array_copy:
 2707|   119k|              void **dst, const UA_DataType *type) {
 2708|   119k|    if(size == 0) {
  ------------------
  |  Branch (2708:8): [True: 113k, False: 5.67k]
  ------------------
 2709|   113k|        if(src == NULL)
  ------------------
  |  Branch (2709:12): [True: 109k, False: 3.73k]
  ------------------
 2710|   109k|            *dst = NULL;
 2711|  3.73k|        else
 2712|  3.73k|            *dst= UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|  3.73k|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
 2713|   113k|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|   113k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2714|   113k|    }
 2715|       |
 2716|       |    /* Check the array consistency -- defensive programming in case the user
 2717|       |     * manually created an inconsistent array */
 2718|  5.67k|    if(UA_UNLIKELY(!type || !src))
  ------------------
  |  |  579|  11.3k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  ------------------
  |  |  |  Branch (579:25): [True: 0, False: 5.67k]
  |  |  |  Branch (579:43): [True: 0, False: 5.67k]
  |  |  |  Branch (579:43): [True: 0, False: 5.67k]
  |  |  ------------------
  ------------------
 2719|      0|        return UA_STATUSCODE_BADINTERNALERROR;
  ------------------
  |  |   29|      0|#define UA_STATUSCODE_BADINTERNALERROR ((UA_StatusCode) 0x80020000)
  ------------------
 2720|       |
 2721|  5.67k|    if(size > SIZE_MAX / type->memSize)
  ------------------
  |  Branch (2721:8): [True: 0, False: 5.67k]
  ------------------
 2722|      0|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 2723|  5.67k|    size_t byteSize = size * type->memSize;
 2724|       |
 2725|       |    /* calloc, so we don't have to check retval in every iteration of copying */
 2726|  5.67k|    *dst = UA_calloc(size, type->memSize);
  ------------------
  |  |   20|  5.67k|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
 2727|  5.67k|    if(!*dst)
  ------------------
  |  Branch (2727:8): [True: 0, False: 5.67k]
  ------------------
 2728|      0|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 2729|       |
 2730|  5.67k|    if(type->pointerFree) {
  ------------------
  |  Branch (2730:8): [True: 1.91k, False: 3.76k]
  ------------------
 2731|  1.91k|        memcpy(*dst, src, byteSize);
 2732|  1.91k|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  1.91k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2733|  1.91k|    }
 2734|       |
 2735|  3.76k|    uintptr_t ptrs = (uintptr_t)src;
 2736|  3.76k|    uintptr_t ptrd = (uintptr_t)*dst;
 2737|  3.76k|    UA_StatusCode retval = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  3.76k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2738|   182k|    for(size_t i = 0; i < size; ++i) {
  ------------------
  |  Branch (2738:23): [True: 178k, False: 3.76k]
  ------------------
 2739|   178k|        retval |= UA_copy((void*)ptrs, (void*)ptrd, type);
 2740|   178k|        ptrs += type->memSize;
 2741|   178k|        ptrd += type->memSize;
 2742|   178k|    }
 2743|  3.76k|    if(retval != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|  3.76k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2743:8): [True: 0, False: 3.76k]
  ------------------
 2744|      0|        UA_Array_delete(*dst, size, type);
 2745|       |        *dst = NULL;
 2746|      0|    }
 2747|  3.76k|    return retval;
 2748|  5.67k|}
UA_Array_delete:
 2850|   829k|UA_Array_delete(void *p, size_t size, const UA_DataType *type) {
 2851|   829k|    if(!type->pointerFree) {
  ------------------
  |  Branch (2851:8): [True: 21.6k, False: 807k]
  ------------------
 2852|  21.6k|        uintptr_t ptr = (uintptr_t)p;
 2853|  1.04M|        for(size_t i = 0; i < size; ++i) {
  ------------------
  |  Branch (2853:27): [True: 1.02M, False: 21.6k]
  ------------------
 2854|  1.02M|            UA_clear((void*)ptr, type);
 2855|  1.02M|            ptr += type->memSize;
 2856|  1.02M|        }
 2857|  21.6k|    }
 2858|   829k|    UA_free((void*)((uintptr_t)p & ~(uintptr_t)UA_EMPTY_ARRAY_SENTINEL));
  ------------------
  |  |   19|   829k|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 2859|   829k|}
ua_types.c:Variant_clear:
 1384|   317k|Variant_clear(void *p, const UA_DataType *_) {
 1385|   317k|    UA_Variant *v = (UA_Variant *)p;
 1386|       |
 1387|       |    /* The content is "borrowed" */
 1388|   317k|    if(v->storageType == UA_VARIANT_DATA_NODELETE)
  ------------------
  |  Branch (1388:8): [True: 0, False: 317k]
  ------------------
 1389|      0|        return;
 1390|       |
 1391|       |    /* Delete the value */
 1392|   317k|    if(v->type && v->data > UA_EMPTY_ARRAY_SENTINEL) {
  ------------------
  |  |  756|  26.9k|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  |  Branch (1392:8): [True: 26.9k, False: 290k]
  |  Branch (1392:19): [True: 22.8k, False: 4.13k]
  ------------------
 1393|  22.8k|        if(v->arrayLength == 0)
  ------------------
  |  Branch (1393:12): [True: 16.6k, False: 6.23k]
  ------------------
 1394|  16.6k|            v->arrayLength = 1;
 1395|  22.8k|        UA_Array_delete(v->data, v->arrayLength, v->type);
 1396|  22.8k|        v->data = NULL;
 1397|  22.8k|    }
 1398|       |
 1399|       |    /* Delete the array dimensions */
 1400|   317k|    if((void*)v->arrayDimensions > UA_EMPTY_ARRAY_SENTINEL)
  ------------------
  |  |  756|   317k|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  |  Branch (1400:8): [True: 728, False: 317k]
  ------------------
 1401|    728|        UA_free(v->arrayDimensions);
  ------------------
  |  |   19|    728|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1402|   317k|}
ua_types.c:DataValue_clear:
 1858|  62.8k|DataValue_clear(void *p, const UA_DataType *_) {
 1859|  62.8k|    UA_DataValue *dv = (UA_DataValue *)p;
 1860|       |    Variant_clear(&dv->value, NULL);
 1861|  62.8k|}
ua_types.c:copyByte:
 1938|    809|copyByte(const void *src, void *dst, const UA_DataType *_) {
 1939|    809|    const u8 *src8 = (const u8 *)src;
 1940|    809|    u8 *dst8 = (u8 *)dst;
 1941|    809|    *dst8 = *src8;
 1942|    809|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    809|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1943|    809|}
ua_types.c:copy2Byte:
 1946|    202|copy2Byte(const void *src, void *dst, const UA_DataType *_) {
 1947|    202|    const u16 *src16 = (const u16 *)src;
 1948|    202|    u16 *dst16 = (u16 *)dst;
 1949|    202|    *dst16 = *src16;
 1950|    202|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    202|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1951|    202|}
ua_types.c:copy4Byte:
 1954|    759|copy4Byte(const void *src, void *dst, const UA_DataType *_) {
 1955|    759|    const u32 *src32 = (const u32 *)src;
 1956|    759|    u32 *dst32 = (u32 *)dst;
 1957|    759|    *dst32 = *src32;
 1958|    759|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    759|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1959|    759|}
ua_types.c:copy8Byte:
 1962|    460|copy8Byte(const void *src, void *dst, const UA_DataType *_) {
 1963|    460|    const u64 *src64 = (const u64 *)src;
 1964|    460|    u64 *dst64 = (u64 *)dst;
 1965|    460|    *dst64 = *src64;
 1966|    460|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    460|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1967|    460|}
ua_types.c:String_copy:
  284|  15.2k|String_copy(const void *src, void *dst, const UA_DataType *_) {
  285|  15.2k|    const UA_String *srcS = (const UA_String*)src;
  286|  15.2k|    UA_String *dstS = (UA_String *)dst;
  287|  15.2k|    UA_StatusCode res =
  288|  15.2k|        UA_Array_copy(srcS->data, srcS->length, (void**)&dstS->data,
  289|  15.2k|                      &UA_TYPES[UA_TYPES_BYTE]);
  ------------------
  |  |   96|  15.2k|#define UA_TYPES_BYTE 2
  ------------------
  290|  15.2k|    if(res == UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  15.2k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (290:8): [True: 15.2k, False: 0]
  ------------------
  291|  15.2k|        dstS->length = srcS->length;
  292|  15.2k|    return res;
  293|  15.2k|}
ua_types.c:copyGuid:
 1970|    194|copyGuid(const void *src, void *dst, const UA_DataType *_) {
 1971|    194|    const UA_Guid *srcG = (const UA_Guid*)src;
 1972|    194|    UA_Guid *dstG = (UA_Guid*)dst;
 1973|    194|    *dstG = *srcG;
 1974|    194|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    194|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1975|    194|}
ua_types.c:NodeId_copy:
  789|  8.65k|NodeId_copy(const void *src, void *dst, const UA_DataType *_) {
  790|  8.65k|    const UA_NodeId *srcN = (const UA_NodeId*)src;
  791|  8.65k|    UA_NodeId *dstN = (UA_NodeId *)dst;
  792|  8.65k|    UA_StatusCode retval = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  8.65k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  793|  8.65k|    switch(srcN->identifierType) {
  794|  5.20k|    case UA_NODEIDTYPE_NUMERIC:
  ------------------
  |  Branch (794:5): [True: 5.20k, False: 3.45k]
  ------------------
  795|  5.20k|        *dstN = *srcN;
  796|  5.20k|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  5.20k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  797|  1.12k|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (797:5): [True: 1.12k, False: 7.52k]
  ------------------
  798|  2.28k|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (798:5): [True: 1.16k, False: 7.49k]
  ------------------
  799|  2.28k|        retval |= String_copy(&srcN->identifier.string,
  800|  2.28k|                              &dstN->identifier.string, NULL);
  801|  2.28k|        break;
  802|  1.16k|    case UA_NODEIDTYPE_GUID:
  ------------------
  |  Branch (802:5): [True: 1.16k, False: 7.48k]
  ------------------
  803|  1.16k|        dstN->identifier.guid = srcN->identifier.guid;
  804|  1.16k|        break;
  805|      0|    default:
  ------------------
  |  Branch (805:5): [True: 0, False: 8.65k]
  ------------------
  806|      0|        return UA_STATUSCODE_BADINTERNALERROR;
  ------------------
  |  |   29|      0|#define UA_STATUSCODE_BADINTERNALERROR ((UA_StatusCode) 0x80020000)
  ------------------
  807|  8.65k|    }
  808|  3.45k|    dstN->namespaceIndex = srcN->namespaceIndex;
  809|  3.45k|    dstN->identifierType = srcN->identifierType;
  810|  3.45k|    return retval;
  811|  8.65k|}
ua_types.c:ExpandedNodeId_copy:
 1085|  1.54k|ExpandedNodeId_copy(const void *src, void *dst, const UA_DataType *_) {
 1086|  1.54k|    const UA_ExpandedNodeId *srcE = (const UA_ExpandedNodeId *)src;
 1087|  1.54k|    UA_ExpandedNodeId *dstE = (UA_ExpandedNodeId*)dst;
 1088|  1.54k|    UA_StatusCode retval = NodeId_copy(&srcE->nodeId, &dstE->nodeId, NULL);
 1089|       |    retval |= String_copy(&srcE->namespaceUri, &dstE->namespaceUri, NULL);
 1090|  1.54k|    dstE->serverIndex = srcE->serverIndex;
 1091|  1.54k|    return retval;
 1092|  1.54k|}
ua_types.c:QualifiedName_copy:
  394|    259|QualifiedName_copy(const void *src, void *dst, const UA_DataType *_) {
  395|    259|    const UA_QualifiedName *srcQ = (const UA_QualifiedName*)src;
  396|    259|    UA_QualifiedName *dstQ = (UA_QualifiedName*)dst;
  397|    259|    dstQ->namespaceIndex = srcQ->namespaceIndex;
  398|       |    return String_copy(&srcQ->name, &dstQ->name, NULL);
  399|    259|}
ua_types.c:LocalizedText_copy:
 1848|  1.14k|LocalizedText_copy(const void *src, void *dst, const UA_DataType *_) {
 1849|  1.14k|    const UA_LocalizedText *srcL = (const UA_LocalizedText *)src;
 1850|  1.14k|    UA_LocalizedText *dstL = (UA_LocalizedText *)dst;
 1851|  1.14k|    UA_StatusCode retval = String_copy(&srcL->locale, &dstL->locale, NULL);
 1852|       |    retval |= String_copy(&srcL->text, &dstL->text, NULL);
 1853|  1.14k|    return retval;
 1854|  1.14k|}
ua_types.c:ExtensionObject_copy:
 1271|  2.45k|ExtensionObject_copy(const void *src, void *dst, const UA_DataType *_) {
 1272|  2.45k|    const UA_ExtensionObject *srcE = (const UA_ExtensionObject *)src;
 1273|  2.45k|    UA_ExtensionObject *dstE = (UA_ExtensionObject *)dst;
 1274|  2.45k|    UA_StatusCode retval = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  2.45k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1275|  2.45k|    switch(srcE->encoding) {
 1276|  1.51k|    case UA_EXTENSIONOBJECT_ENCODED_NOBODY:
  ------------------
  |  Branch (1276:5): [True: 1.51k, False: 936]
  ------------------
 1277|  1.86k|    case UA_EXTENSIONOBJECT_ENCODED_BYTESTRING:
  ------------------
  |  Branch (1277:5): [True: 344, False: 2.10k]
  ------------------
 1278|  2.11k|    case UA_EXTENSIONOBJECT_ENCODED_XML:
  ------------------
  |  Branch (1278:5): [True: 259, False: 2.19k]
  ------------------
 1279|  2.11k|    case UA_EXTENSIONOBJECT_ENCODED_JSON:
  ------------------
  |  Branch (1279:5): [True: 0, False: 2.45k]
  ------------------
 1280|  2.11k|        dstE->encoding = srcE->encoding;
 1281|  2.11k|        retval = NodeId_copy(&srcE->content.encoded.typeId,
 1282|  2.11k|                             &dstE->content.encoded.typeId, NULL);
 1283|       |        /* ByteString -> copy as string */
 1284|  2.11k|        retval |= String_copy(&srcE->content.encoded.body,
 1285|  2.11k|                              &dstE->content.encoded.body, NULL);
 1286|  2.11k|        break;
 1287|    333|    case UA_EXTENSIONOBJECT_DECODED:
  ------------------
  |  Branch (1287:5): [True: 333, False: 2.11k]
  ------------------
 1288|    333|    case UA_EXTENSIONOBJECT_DECODED_NODELETE:
  ------------------
  |  Branch (1288:5): [True: 0, False: 2.45k]
  ------------------
 1289|    333|        if(!srcE->content.decoded.type || !srcE->content.decoded.data)
  ------------------
  |  Branch (1289:12): [True: 0, False: 333]
  |  Branch (1289:43): [True: 0, False: 333]
  ------------------
 1290|      0|            return UA_STATUSCODE_BADINTERNALERROR;
  ------------------
  |  |   29|      0|#define UA_STATUSCODE_BADINTERNALERROR ((UA_StatusCode) 0x80020000)
  ------------------
 1291|    333|        dstE->encoding = UA_EXTENSIONOBJECT_DECODED;
 1292|    333|        dstE->content.decoded.type = srcE->content.decoded.type;
 1293|    333|        retval = UA_Array_copy(srcE->content.decoded.data, 1,
 1294|    333|                               &dstE->content.decoded.data,
 1295|    333|                               srcE->content.decoded.type);
 1296|    333|        break;
 1297|      0|    default:
  ------------------
  |  Branch (1297:5): [True: 0, False: 2.45k]
  ------------------
 1298|      0|        break;
 1299|  2.45k|    }
 1300|  2.45k|    return retval;
 1301|  2.45k|}
ua_types.c:DataValue_copy:
 1864|  18.0k|DataValue_copy(const void *src, void *dst, const UA_DataType *_) {
 1865|  18.0k|    const UA_DataValue *srcD = (const UA_DataValue*)src;
 1866|  18.0k|    UA_DataValue *dstD = (UA_DataValue *)dst;
 1867|  18.0k|    memcpy(dstD, srcD, sizeof(UA_DataValue));
 1868|  18.0k|    UA_Variant_init(&dstD->value);
 1869|  18.0k|    UA_StatusCode retval = Variant_copy(&srcD->value, &dstD->value, NULL);
 1870|  18.0k|    if(retval != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  18.0k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1870:8): [True: 0, False: 18.0k]
  ------------------
 1871|      0|        DataValue_clear(dstD, NULL);
 1872|  18.0k|    return retval;
 1873|  18.0k|}
ua_types.c:Variant_copy:
 1405|  99.6k|Variant_copy(const void *src, void *dst, const UA_DataType *_) {
 1406|  99.6k|    const UA_Variant *srcV = (const UA_Variant *)src;
 1407|  99.6k|    UA_Variant *dstV = (UA_Variant *)dst;
 1408|  99.6k|    size_t length = srcV->arrayLength;
 1409|  99.6k|    if(UA_Variant_isScalar(srcV))
  ------------------
  |  Branch (1409:8): [True: 2.97k, False: 96.6k]
  ------------------
 1410|  2.97k|        length = 1;
 1411|  99.6k|    UA_StatusCode retval = UA_Array_copy(srcV->data, length,
 1412|  99.6k|                                         &dstV->data, srcV->type);
 1413|  99.6k|    if(retval != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  99.6k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1413:8): [True: 0, False: 99.6k]
  ------------------
 1414|      0|        return retval;
 1415|  99.6k|    dstV->arrayLength = srcV->arrayLength;
 1416|  99.6k|    dstV->type = srcV->type;
 1417|  99.6k|    if(srcV->arrayDimensions) {
  ------------------
  |  Branch (1417:8): [True: 582, False: 99.0k]
  ------------------
 1418|    582|        retval = UA_Array_copy(srcV->arrayDimensions, srcV->arrayDimensionsSize,
 1419|    582|            (void**)&dstV->arrayDimensions, &UA_TYPES[UA_TYPES_INT32]);
  ------------------
  |  |  198|    582|#define UA_TYPES_INT32 5
  ------------------
 1420|    582|        if(retval != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    582|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1420:12): [True: 0, False: 582]
  ------------------
 1421|      0|            return retval;
 1422|    582|        dstV->arrayDimensionsSize = srcV->arrayDimensionsSize;
 1423|    582|    }
 1424|  99.6k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  99.6k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1425|  99.6k|}
ua_types.c:DiagnosticInfo_copy:
 1899|  75.6k|DiagnosticInfo_copy(const void *src, void *dst, const UA_DataType *_) {
 1900|  75.6k|    const UA_DiagnosticInfo *srcD = (const UA_DiagnosticInfo *)src;
 1901|  75.6k|    UA_DiagnosticInfo *dstD = (UA_DiagnosticInfo *)dst;
 1902|  75.6k|    memcpy(dstD, srcD, sizeof(UA_DiagnosticInfo));
 1903|  75.6k|    UA_String_init(&dstD->additionalInfo);
 1904|  75.6k|    dstD->innerDiagnosticInfo = NULL;
 1905|  75.6k|    UA_StatusCode retval = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  75.6k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1906|  75.6k|    if(srcD->hasAdditionalInfo)
  ------------------
  |  Branch (1906:8): [True: 201, False: 75.4k]
  ------------------
 1907|    201|        retval = String_copy(&srcD->additionalInfo, &dstD->additionalInfo, NULL);
 1908|  75.6k|    if(srcD->hasInnerDiagnosticInfo && srcD->innerDiagnosticInfo) {
  ------------------
  |  Branch (1908:8): [True: 410, False: 75.2k]
  |  Branch (1908:40): [True: 410, False: 0]
  ------------------
 1909|    410|        dstD->innerDiagnosticInfo = (UA_DiagnosticInfo*)
 1910|    410|            UA_malloc(sizeof(UA_DiagnosticInfo));
  ------------------
  |  |   18|    410|#define UA_malloc(size) UA_mallocSingleton(size)
  ------------------
 1911|    410|        if(UA_LIKELY(dstD->innerDiagnosticInfo != NULL)) {
  ------------------
  |  |  578|    410|# define UA_LIKELY(x) __builtin_expect((x), 1)
  |  |  ------------------
  |  |  |  Branch (578:23): [True: 410, False: 0]
  |  |  ------------------
  ------------------
 1912|    410|            retval |= DiagnosticInfo_copy(srcD->innerDiagnosticInfo,
 1913|    410|                                          dstD->innerDiagnosticInfo, NULL);
 1914|    410|            dstD->hasInnerDiagnosticInfo = true;
 1915|    410|        } else {
 1916|      0|            dstD->hasInnerDiagnosticInfo = false;
 1917|      0|            retval |= UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 1918|      0|        }
 1919|    410|    }
 1920|  75.6k|    return retval;
 1921|  75.6k|}
ua_types.c:copyStructure:
 1978|  1.41k|copyStructure(const void *src, void *dst, const UA_DataType *type) {
 1979|  1.41k|    UA_StatusCode retval = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  1.41k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1980|  1.41k|    uintptr_t ptrs = (uintptr_t)src;
 1981|  1.41k|    uintptr_t ptrd = (uintptr_t)dst;
 1982|  5.99k|    for(size_t i = 0; i < type->membersSize; ++i) {
  ------------------
  |  Branch (1982:23): [True: 4.57k, False: 1.41k]
  ------------------
 1983|  4.57k|        const UA_DataTypeMember *m = &type->members[i];
 1984|  4.57k|        const UA_DataType *mt = m->memberType;
 1985|  4.57k|        ptrs += m->padding;
 1986|  4.57k|        ptrd += m->padding;
 1987|  4.57k|        if(!m->isOptional) {
  ------------------
  |  Branch (1987:12): [True: 4.57k, False: 0]
  ------------------
 1988|  4.57k|            if(!m->isArray) {
  ------------------
  |  Branch (1988:16): [True: 3.79k, False: 777]
  ------------------
 1989|  3.79k|                retval |= copyJumpTable[mt->typeKind]((const void *)ptrs, (void *)ptrd, mt);
 1990|  3.79k|                ptrs += mt->memSize;
 1991|  3.79k|                ptrd += mt->memSize;
 1992|  3.79k|            } else {
 1993|    777|                size_t *dst_size = (size_t*)ptrd;
 1994|    777|                const size_t size = *((const size_t*)ptrs);
 1995|    777|                ptrs += sizeof(size_t);
 1996|    777|                ptrd += sizeof(size_t);
 1997|    777|                retval |= UA_Array_copy(*(void* const*)ptrs, size, (void**)ptrd, mt);
 1998|    777|                if(retval == UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    777|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1998:20): [True: 777, False: 0]
  ------------------
 1999|    777|                    *dst_size = size;
 2000|      0|                else
 2001|      0|                    *dst_size = 0;
 2002|    777|                ptrs += sizeof(void*);
 2003|    777|                ptrd += sizeof(void*);
 2004|    777|            }
 2005|  4.57k|        } else {
 2006|      0|            if(!m->isArray) {
  ------------------
  |  Branch (2006:16): [True: 0, False: 0]
  ------------------
 2007|      0|                if(*(void* const*)ptrs != NULL)
  ------------------
  |  Branch (2007:20): [True: 0, False: 0]
  ------------------
 2008|      0|                    retval |= UA_Array_copy(*(void* const*)ptrs, 1, (void**)ptrd, mt);
 2009|      0|            } else {
 2010|      0|                if(*(void* const*)(ptrs+sizeof(size_t)) != NULL) {
  ------------------
  |  Branch (2010:20): [True: 0, False: 0]
  ------------------
 2011|      0|                    size_t *dst_size = (size_t*)ptrd;
 2012|      0|                    const size_t size = *((const size_t*)ptrs);
 2013|      0|                    ptrs += sizeof(size_t);
 2014|      0|                    ptrd += sizeof(size_t);
 2015|      0|                    retval |= UA_Array_copy(*(void* const*)ptrs, size, (void**)ptrd, mt);
 2016|      0|                    if(retval == UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2016:24): [True: 0, False: 0]
  ------------------
 2017|      0|                        *dst_size = size;
 2018|      0|                    else
 2019|      0|                        *dst_size = 0;
 2020|      0|                } else {
 2021|      0|                    ptrs += sizeof(size_t);
 2022|      0|                    ptrd += sizeof(size_t);
 2023|      0|                }
 2024|      0|            }
 2025|      0|            ptrs += sizeof(void*);
 2026|      0|            ptrd += sizeof(void*);
 2027|      0|        }
 2028|  4.57k|    }
 2029|  1.41k|    return retval;
 2030|  1.41k|}
ua_types.c:nopClear:
 2169|  8.90k|static void nopClear(void *p, const UA_DataType *type) { }
ua_types.c:String_clear:
  296|   800k|String_clear(void *p, const UA_DataType *_) {
  297|   800k|    UA_String *s = (UA_String*)p;
  298|   800k|    UA_Array_delete(s->data, s->length, &UA_TYPES[UA_TYPES_BYTE]);
  ------------------
  |  |   96|   800k|#define UA_TYPES_BYTE 2
  ------------------
  299|   800k|}
ua_types.c:NodeId_clear:
  777|  19.8k|NodeId_clear(void *p, const UA_DataType *_) {
  778|  19.8k|    UA_NodeId *id = (UA_NodeId*)p;
  779|  19.8k|    switch(id->identifierType) {
  780|  2.74k|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (780:5): [True: 2.74k, False: 17.0k]
  ------------------
  781|  5.21k|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (781:5): [True: 2.47k, False: 17.3k]
  ------------------
  782|  5.21k|        String_clear(&id->identifier.string, NULL);
  783|  5.21k|        break;
  784|  14.5k|    default: break;
  ------------------
  |  Branch (784:5): [True: 14.5k, False: 5.21k]
  ------------------
  785|  19.8k|    }
  786|  19.8k|}
ua_types.c:ExpandedNodeId_clear:
 1078|  4.02k|ExpandedNodeId_clear(void *p, const UA_DataType *_) {
 1079|  4.02k|    UA_ExpandedNodeId *id = (UA_ExpandedNodeId*)p;
 1080|  4.02k|    NodeId_clear(&id->nodeId, NULL);
 1081|       |    String_clear(&id->namespaceUri, NULL);
 1082|  4.02k|}
ua_types.c:QualifiedName_clear:
  402|    959|QualifiedName_clear(void *p, const UA_DataType *_) {
  403|    959|    UA_QualifiedName *qn = (UA_QualifiedName*)p;
  404|       |    String_clear(&qn->name, NULL);
  405|    959|}
ua_types.c:LocalizedText_clear:
 1841|  68.5k|LocalizedText_clear(void *p, const UA_DataType *_) {
 1842|  68.5k|    UA_LocalizedText *lt = (UA_LocalizedText *)p;
 1843|  68.5k|    String_clear(&lt->locale, NULL);
 1844|       |    String_clear(&lt->text, NULL);
 1845|  68.5k|}
ua_types.c:ExtensionObject_clear:
 1251|  13.4k|ExtensionObject_clear(void *p, const UA_DataType *_) {
 1252|  13.4k|    UA_ExtensionObject *eo = (UA_ExtensionObject *)p;
 1253|  13.4k|    switch(eo->encoding) {
 1254|  7.32k|    case UA_EXTENSIONOBJECT_ENCODED_NOBODY:
  ------------------
  |  Branch (1254:5): [True: 7.32k, False: 6.09k]
  ------------------
 1255|  11.1k|    case UA_EXTENSIONOBJECT_ENCODED_BYTESTRING:
  ------------------
  |  Branch (1255:5): [True: 3.83k, False: 9.58k]
  ------------------
 1256|  11.8k|    case UA_EXTENSIONOBJECT_ENCODED_XML:
  ------------------
  |  Branch (1256:5): [True: 705, False: 12.7k]
  ------------------
 1257|  11.8k|    case UA_EXTENSIONOBJECT_ENCODED_JSON:
  ------------------
  |  Branch (1257:5): [True: 0, False: 13.4k]
  ------------------
 1258|  11.8k|        NodeId_clear(&eo->content.encoded.typeId, NULL);
 1259|  11.8k|        String_clear(&eo->content.encoded.body, NULL);
 1260|  11.8k|        break;
 1261|  1.55k|    case UA_EXTENSIONOBJECT_DECODED:
  ------------------
  |  Branch (1261:5): [True: 1.55k, False: 11.8k]
  ------------------
 1262|  1.55k|        if(eo->content.decoded.data)
  ------------------
  |  Branch (1262:12): [True: 1.55k, False: 0]
  ------------------
 1263|  1.55k|            UA_delete(eo->content.decoded.data, eo->content.decoded.type);
 1264|  1.55k|        break;
 1265|      0|    default:
  ------------------
  |  Branch (1265:5): [True: 0, False: 13.4k]
  ------------------
 1266|      0|        break;
 1267|  13.4k|    }
 1268|  13.4k|}
ua_types.c:DiagnosticInfo_clear:
 1888|   625k|DiagnosticInfo_clear(void *p, const UA_DataType *_) {
 1889|   625k|    UA_DiagnosticInfo *di = (UA_DiagnosticInfo *)p;
 1890|       |
 1891|   625k|    String_clear(&di->additionalInfo, NULL);
 1892|   625k|    if(di->hasInnerDiagnosticInfo && di->innerDiagnosticInfo) {
  ------------------
  |  Branch (1892:8): [True: 2.76k, False: 622k]
  |  Branch (1892:38): [True: 2.76k, False: 0]
  ------------------
 1893|  2.76k|        DiagnosticInfo_clear(di->innerDiagnosticInfo, NULL);
 1894|  2.76k|        UA_free(di->innerDiagnosticInfo);
  ------------------
  |  |   19|  2.76k|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1895|  2.76k|    }
 1896|   625k|}
ua_types.c:clearStructure:
 2113|  6.71k|clearStructure(void *p, const UA_DataType *type) {
 2114|  6.71k|    uintptr_t ptr = (uintptr_t)p;
 2115|  25.4k|    for(size_t i = 0; i < type->membersSize; ++i) {
  ------------------
  |  Branch (2115:23): [True: 18.7k, False: 6.71k]
  ------------------
 2116|  18.7k|        const UA_DataTypeMember *m = &type->members[i];
 2117|  18.7k|        const UA_DataType *mt = m->memberType;
 2118|  18.7k|        ptr += m->padding;
 2119|  18.7k|        if(!m->isOptional) {
  ------------------
  |  Branch (2119:12): [True: 18.7k, False: 0]
  ------------------
 2120|  18.7k|            if(!m->isArray) {
  ------------------
  |  Branch (2120:16): [True: 15.2k, False: 3.50k]
  ------------------
 2121|  15.2k|                clearJumpTable[mt->typeKind]((void*)ptr, mt);
 2122|  15.2k|                ptr += mt->memSize;
 2123|  15.2k|            } else {
 2124|  3.50k|                size_t length = *(size_t*)ptr;
 2125|  3.50k|                ptr += sizeof(size_t);
 2126|  3.50k|                UA_Array_delete(*(void**)ptr, length, mt);
 2127|  3.50k|                ptr += sizeof(void*);
 2128|  3.50k|            }
 2129|  18.7k|        } 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|  18.7k|    }
 2149|  6.71k|}
ua_types.c:guidOrder:
 2266|  1.15k|guidOrder(const void *p1_, const void *p2_, const UA_DataType *type) {
 2267|  1.15k|    const UA_Guid *p1 = (const UA_Guid*)p1_;
 2268|  1.15k|    const UA_Guid *p2 = (const UA_Guid*)p2_;
 2269|  1.15k|    if(p1->data1 != p2->data1)
  ------------------
  |  Branch (2269:8): [True: 289, False: 862]
  ------------------
 2270|    289|        return (p1->data1 < p2->data1) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2270:16): [True: 0, False: 289]
  ------------------
 2271|    862|    if(p1->data2 != p2->data2)
  ------------------
  |  Branch (2271:8): [True: 221, False: 641]
  ------------------
 2272|    221|        return (p1->data2 < p2->data2) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2272:16): [True: 0, False: 221]
  ------------------
 2273|    641|    if(p1->data3 != p2->data3)
  ------------------
  |  Branch (2273:8): [True: 219, False: 422]
  ------------------
 2274|    219|        return (p1->data3 < p2->data3) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2274:16): [True: 0, False: 219]
  ------------------
 2275|    422|    int cmp = memcmp(p1->data4, p2->data4, 8);
 2276|    422|    if(cmp != 0)
  ------------------
  |  Branch (2276:8): [True: 227, False: 195]
  ------------------
 2277|    227|        return (cmp < 0) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2277:16): [True: 0, False: 227]
  ------------------
 2278|    195|    return UA_ORDER_EQ;
 2279|    422|}
ua_types.c:stringOrder:
 2282|  3.05k|stringOrder(const void *p1_, const void *p2_, const UA_DataType *type) {
 2283|  3.05k|    const UA_String *p1 = (const UA_String*)p1_;
 2284|  3.05k|    const UA_String *p2 = (const UA_String*)p2_;
 2285|  3.05k|    if(p1->length != p2->length)
  ------------------
  |  Branch (2285:8): [True: 0, False: 3.05k]
  ------------------
 2286|      0|        return (p1->length < p2->length) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2286:16): [True: 0, False: 0]
  ------------------
 2287|       |    /* For zero-length arrays, every pointer not NULL is considered a
 2288|       |     * UA_EMPTY_ARRAY_SENTINEL. */
 2289|  3.05k|    if(p1->data == p2->data) return UA_ORDER_EQ;
  ------------------
  |  Branch (2289:8): [True: 1.15k, False: 1.89k]
  ------------------
 2290|  1.89k|    if(p1->data == NULL) return UA_ORDER_LESS;
  ------------------
  |  Branch (2290:8): [True: 0, False: 1.89k]
  ------------------
 2291|  1.89k|    if(p2->data == NULL) return UA_ORDER_MORE;
  ------------------
  |  Branch (2291:8): [True: 0, False: 1.89k]
  ------------------
 2292|  1.89k|    int cmp = memcmp((const char*)p1->data, (const char*)p2->data, p1->length);
 2293|  1.89k|    if(cmp != 0)
  ------------------
  |  Branch (2293:8): [True: 733, False: 1.16k]
  ------------------
 2294|    733|        return (cmp < 0) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2294:16): [True: 135, False: 598]
  ------------------
 2295|  1.16k|    return UA_ORDER_EQ;
 2296|  1.89k|}

ctxCalloc:
   42|  28.1k|ctxCalloc(Ctx *ctx, size_t nelem, size_t elsize) {
   43|  28.1k|    if(ctx->opts.calloc)
  ------------------
  |  Branch (43:8): [True: 0, False: 28.1k]
  ------------------
   44|      0|        return ctx->opts.calloc(ctx->opts.callocContext, nelem, elsize);
   45|  28.1k|    return UA_calloc(nelem, elsize);
  ------------------
  |  |   20|  28.1k|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
   46|  28.1k|}
ctxFree:
   49|  1.07k|ctxFree(Ctx *ctx, void *p) {
   50|  1.07k|    if(ctx->opts.calloc)
  ------------------
  |  Branch (50:8): [True: 0, False: 1.07k]
  ------------------
   51|      0|        return;
   52|  1.07k|    UA_free(p);
  ------------------
  |  |   19|  1.07k|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
   53|  1.07k|}
ctxClear:
   56|  3.73k|ctxClear(Ctx *ctx, void *p, const UA_DataType *type) {
   57|  3.73k|    if(!ctx->opts.calloc)
  ------------------
  |  Branch (57:8): [True: 3.73k, False: 0]
  ------------------
   58|  3.73k|        UA_clear(p, type);
   59|      0|    else
   60|      0|        memset(p, 0, type->memSize);
   61|  3.73k|}
UA_decodeBinaryInternal:
 2010|  5.03k|                        UA_DecodeBinaryOptions *options) {
 2011|       |    /* Set up the context */
 2012|  5.03k|    Ctx ctx;
 2013|  5.03k|    ctx.pos = &src->data[*offset];
 2014|  5.03k|    ctx.end = &src->data[src->length];
 2015|  5.03k|    ctx.depth = 0;
 2016|  5.03k|    if(options)
  ------------------
  |  Branch (2016:8): [True: 0, False: 5.03k]
  ------------------
 2017|      0|        ctx.opts = *options;
 2018|  5.03k|    else
 2019|  5.03k|        memset(&ctx.opts, 0, sizeof(UA_DecodeBinaryOptions));
 2020|       |
 2021|       |    /* Decode */
 2022|  5.03k|    memset(dst, 0, type->memSize); /* Initialize the value */
 2023|  5.03k|    status ret = decodeBinaryJumpTable[type->typeKind](&ctx, dst, type);
 2024|       |
 2025|  5.03k|    if(UA_LIKELY(ret == UA_STATUSCODE_GOOD)) {
  ------------------
  |  |  578|  5.03k|# define UA_LIKELY(x) __builtin_expect((x), 1)
  |  |  ------------------
  |  |  |  Branch (578:23): [True: 1.30k, False: 3.73k]
  |  |  ------------------
  ------------------
 2026|       |        /* Set the new offset */
 2027|  1.30k|        *offset = (size_t)(ctx.pos - src->data) / sizeof(u8);
 2028|  1.30k|        if(options)
  ------------------
  |  Branch (2028:12): [True: 0, False: 1.30k]
  ------------------
 2029|      0|            options->decodedLength = *offset;
 2030|  3.73k|    } else {
 2031|       |        /* Clean up */
 2032|  3.73k|        ctxClear(&ctx, dst, type);
 2033|  3.73k|    }
 2034|       |
 2035|  5.03k|    return ret;
 2036|  5.03k|}
UA_decodeBinary:
 2041|  5.03k|                UA_DecodeBinaryOptions *options) {
 2042|  5.03k|    size_t offset = 0;
 2043|  5.03k|    return UA_decodeBinaryInternal(inBuf, &offset, p, type, options);
 2044|  5.03k|}
ua_types_encoding_binary.c:UA_findDataTypeByBinaryInternal:
  872|  11.2k|UA_findDataTypeByBinaryInternal(Ctx *ctx, const UA_NodeId *typeId) {
  873|       |    /* A null identifier means that the type has no binary encoding. */
  874|  11.2k|    if(UA_NodeId_isNull(typeId))
  ------------------
  |  Branch (874:8): [True: 1.49k, False: 9.77k]
  ------------------
  875|  1.49k|        return NULL;
  876|       |
  877|       |    /* Always look in the built-in types first. Assume that only numeric
  878|       |     * identifiers are used for the builtin types. (They may contain data types
  879|       |     * from all namespaces though.) */
  880|  9.77k|    if(typeId->identifierType == UA_NODEIDTYPE_NUMERIC) {
  ------------------
  |  Branch (880:8): [True: 7.34k, False: 2.42k]
  ------------------
  881|  2.39M|        for(size_t i = 0; i < UA_TYPES_COUNT; ++i) {
  ------------------
  |  |   17|  2.39M|#define UA_TYPES_COUNT 388
  ------------------
  |  Branch (881:27): [True: 2.39M, False: 3.82k]
  ------------------
  882|  2.39M|            if(UA_TYPES[i].binaryEncodingId.identifier.numeric == typeId->identifier.numeric &&
  ------------------
  |  Branch (882:16): [True: 10.7k, False: 2.38M]
  ------------------
  883|  10.7k|               UA_TYPES[i].binaryEncodingId.namespaceIndex == typeId->namespaceIndex)
  ------------------
  |  Branch (883:16): [True: 3.52k, False: 7.21k]
  ------------------
  884|  3.52k|                return &UA_TYPES[i];
  885|  2.39M|        }
  886|  7.34k|    }
  887|       |
  888|  6.25k|    const UA_DataTypeArray *customTypes = ctx->opts.customTypes;
  889|  6.25k|    while(customTypes) {
  ------------------
  |  Branch (889:11): [True: 0, False: 6.25k]
  ------------------
  890|      0|        for(size_t i = 0; i < customTypes->typesSize; ++i) {
  ------------------
  |  Branch (890:27): [True: 0, False: 0]
  ------------------
  891|      0|            if(UA_NodeId_equal(typeId, &customTypes->types[i].binaryEncodingId))
  ------------------
  |  Branch (891:16): [True: 0, False: 0]
  ------------------
  892|      0|                return &customTypes->types[i];
  893|      0|        }
  894|      0|        customTypes = customTypes->next;
  895|      0|    }
  896|       |
  897|  6.25k|    return NULL;
  898|  6.25k|}
ua_types_encoding_binary.c:Boolean_decodeBinary:
  192|  1.69M|FUNC_DECODE_BINARY(Boolean) {
  193|  1.69M|    UA_Boolean *dst = (UA_Boolean*)_dst;
  194|  1.69M|    UA_CHECK(ctx->pos + 1 <= ctx->end, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  172|  1.69M|    do {                                                                                 \
  |  |  173|  1.69M|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  579|  1.69M|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (579:25): [True: 14, False: 1.69M]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|     14|            EVAL_ON_ERROR;                                                               \
  |  |  175|     14|        }                                                                                \
  |  |  176|  1.69M|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 1.69M]
  |  |  ------------------
  ------------------
  195|  1.69M|    *dst = (*ctx->pos > 0) ? true : false;
  ------------------
  |  Branch (195:12): [True: 1.10M, False: 589k]
  ------------------
  196|  1.69M|    ++ctx->pos;
  197|  1.69M|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  1.69M|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  198|  1.69M|}
ua_types_encoding_binary.c:Byte_decodeBinary:
  210|   893k|FUNC_DECODE_BINARY(Byte) {
  211|   893k|    UA_Byte *dst = (UA_Byte*)_dst;
  212|   893k|    UA_CHECK(ctx->pos + sizeof(u8) <= ctx->end,
  ------------------
  |  |  172|   893k|    do {                                                                                 \
  |  |  173|   893k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  579|   893k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (579:25): [True: 534, False: 893k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|    534|            EVAL_ON_ERROR;                                                               \
  |  |  175|    534|        }                                                                                \
  |  |  176|   893k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 893k]
  |  |  ------------------
  ------------------
  213|   893k|             return UA_STATUSCODE_BADDECODINGERROR);
  214|   893k|    *dst = *ctx->pos;
  215|   893k|    ++ctx->pos;
  216|   893k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|   893k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  217|   893k|}
ua_types_encoding_binary.c:UInt16_decodeBinary:
  233|  23.6k|FUNC_DECODE_BINARY(UInt16) {
  234|  23.6k|    UA_UInt16 *dst = (UA_UInt16*)_dst;
  235|  23.6k|    UA_CHECK(ctx->pos + sizeof(u16) <= ctx->end,
  ------------------
  |  |  172|  23.6k|    do {                                                                                 \
  |  |  173|  23.6k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  579|  23.6k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (579:25): [True: 2.12k, False: 21.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|  2.12k|            EVAL_ON_ERROR;                                                               \
  |  |  175|  2.12k|        }                                                                                \
  |  |  176|  23.6k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 21.5k]
  |  |  ------------------
  ------------------
  236|  23.6k|             return UA_STATUSCODE_BADDECODINGERROR);
  237|  21.5k|#if UA_BINARY_OVERLAYABLE_INTEGER
  238|  21.5k|    memcpy(dst, ctx->pos, sizeof(u16));
  239|       |#else
  240|       |    UA_decode16(ctx->pos, dst);
  241|       |#endif
  242|  21.5k|    ctx->pos += 2;
  243|  21.5k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  21.5k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  244|  23.6k|}
ua_types_encoding_binary.c:UInt32_decodeBinary:
  260|  48.5k|FUNC_DECODE_BINARY(UInt32) {
  261|  48.5k|    UA_UInt32 *dst = (UA_UInt32*)_dst;
  262|  48.5k|    UA_CHECK(ctx->pos + sizeof(u32) <= ctx->end,
  ------------------
  |  |  172|  48.5k|    do {                                                                                 \
  |  |  173|  48.5k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  579|  48.5k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (579:25): [True: 3.39k, False: 45.1k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|  3.39k|            EVAL_ON_ERROR;                                                               \
  |  |  175|  3.39k|        }                                                                                \
  |  |  176|  48.5k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 45.1k]
  |  |  ------------------
  ------------------
  263|  48.5k|             return UA_STATUSCODE_BADDECODINGERROR);
  264|  45.1k|#if UA_BINARY_OVERLAYABLE_INTEGER
  265|  45.1k|    memcpy(dst, ctx->pos, sizeof(u32));
  266|       |#else
  267|       |    UA_decode32(ctx->pos, dst);
  268|       |#endif
  269|  45.1k|    ctx->pos += 4;
  270|  45.1k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  45.1k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  271|  48.5k|}
ua_types_encoding_binary.c:UInt64_decodeBinary:
  287|  4.71k|FUNC_DECODE_BINARY(UInt64) {
  288|  4.71k|    UA_UInt64 *dst = (UA_UInt64*)_dst;
  289|  4.71k|    UA_CHECK(ctx->pos + sizeof(u64) <= ctx->end,
  ------------------
  |  |  172|  4.71k|    do {                                                                                 \
  |  |  173|  4.71k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  579|  4.71k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (579:25): [True: 2.12k, False: 2.58k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|  2.12k|            EVAL_ON_ERROR;                                                               \
  |  |  175|  2.12k|        }                                                                                \
  |  |  176|  4.71k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 2.58k]
  |  |  ------------------
  ------------------
  290|  4.71k|             return UA_STATUSCODE_BADDECODINGERROR);
  291|  2.58k|#if UA_BINARY_OVERLAYABLE_INTEGER
  292|  2.58k|    memcpy(dst, ctx->pos, sizeof(u64));
  293|       |#else
  294|       |    UA_decode64(ctx->pos, dst);
  295|       |#endif
  296|  2.58k|    ctx->pos += 8;
  297|  2.58k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  2.58k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  298|  4.71k|}
ua_types_encoding_binary.c:Float_decodeBinary:
  371|    898|FUNC_DECODE_BINARY(Float) {
  372|    898|    UA_Float *dst = (UA_Float*)_dst;
  373|    898|    u32 decoded;
  374|    898|    status ret = DECODE_DIRECT(&decoded, UInt32);
  ------------------
  |  |   81|    898|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
  375|    898|    UA_CHECK_STATUS(ret, return ret);
  ------------------
  |  |  179|    898|    UA_CHECK(isGood(STATUSCODE), EVAL_ON_ERROR)
  |  |  ------------------
  |  |  |  |  172|    898|    do {                                                                                 \
  |  |  |  |  173|    898|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  579|    898|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (579:25): [True: 9, False: 889]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  174|      9|            EVAL_ON_ERROR;                                                               \
  |  |  |  |  175|      9|        }                                                                                \
  |  |  |  |  176|    898|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (176:13): [Folded, False: 889]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  376|    889|#ifndef UA_SLOW_IEEE754
  377|    889|    if(UA_UNLIKELY((decoded >= 0x7f800001 && decoded <= 0x7fffffff) ||
  ------------------
  |  |  579|  2.93k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  ------------------
  |  |  |  Branch (579:25): [True: 301, False: 588]
  |  |  |  Branch (579:43): [True: 462, False: 427]
  |  |  |  Branch (579:43): [True: 195, False: 267]
  |  |  |  Branch (579:43): [True: 106, False: 588]
  |  |  ------------------
  ------------------
  378|    889|                   (decoded >= 0xff800001))) decoded = FLOAT_NAN;
  ------------------
  |  |  351|    301|#define FLOAT_NAN 0xffc00000
  ------------------
  379|    889|    memcpy(dst, &decoded, sizeof(UA_Float));
  380|       |#else
  381|       |    if(decoded == 0) *dst = 0.0f;
  382|       |    else if(decoded == FLOAT_NEG_ZERO) *dst = -0.0f;
  383|       |    else if(decoded == FLOAT_INF) *dst = INFINITY;
  384|       |    else if(decoded == FLOAT_NEG_INF) *dst = -INFINITY;
  385|       |    else if((decoded >= 0x7f800001 && decoded <= 0x7fffffff) ||
  386|       |       (decoded >= 0xff800001)) *dst = NAN;
  387|       |    else *dst = (UA_Float)unpack754(decoded, 32, 8);
  388|       |#endif
  389|    889|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    889|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  390|    898|}
ua_types_encoding_binary.c:Double_decodeBinary:
  414|  1.17k|FUNC_DECODE_BINARY(Double) {
  415|  1.17k|    UA_Double *dst = (UA_Double*)_dst;
  416|  1.17k|    u64 decoded;
  417|  1.17k|    status ret = DECODE_DIRECT(&decoded, UInt64);
  ------------------
  |  |   81|  1.17k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
  418|  1.17k|    UA_CHECK_STATUS(ret, return ret);
  ------------------
  |  |  179|  1.17k|    UA_CHECK(isGood(STATUSCODE), EVAL_ON_ERROR)
  |  |  ------------------
  |  |  |  |  172|  1.17k|    do {                                                                                 \
  |  |  |  |  173|  1.17k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  579|  1.17k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (579:25): [True: 11, False: 1.16k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  174|     11|            EVAL_ON_ERROR;                                                               \
  |  |  |  |  175|     11|        }                                                                                \
  |  |  |  |  176|  1.17k|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (176:13): [Folded, False: 1.16k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  419|  1.16k|#ifndef UA_SLOW_IEEE754
  420|  1.16k|    if(UA_UNLIKELY((decoded >= 0x7ff0000000000001L && decoded <= 0x7fffffffffffffffL) ||
  ------------------
  |  |  579|  3.86k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  ------------------
  |  |  |  Branch (579:25): [True: 384, False: 779]
  |  |  |  Branch (579:43): [True: 571, False: 592]
  |  |  |  Branch (579:43): [True: 196, False: 375]
  |  |  |  Branch (579:43): [True: 188, False: 779]
  |  |  ------------------
  ------------------
  421|  1.16k|                   (decoded >= 0xfff0000000000001L))) decoded = DOUBLE_NAN;
  ------------------
  |  |  393|    384|#define DOUBLE_NAN 0xfff8000000000000L
  ------------------
  422|  1.16k|    memcpy(dst, &decoded, sizeof(UA_Double));
  423|       |#else
  424|       |    if(decoded == 0) *dst = 0.0;
  425|       |    else if(decoded == DOUBLE_NEG_ZERO) *dst = -0.0;
  426|       |    else if(decoded == DOUBLE_INF) *dst = INFINITY;
  427|       |    else if(decoded == DOUBLE_NEG_INF) *dst = -INFINITY;
  428|       |    else if((decoded >= 0x7ff0000000000001L && decoded <= 0x7fffffffffffffffL) ||
  429|       |       (decoded >= 0xfff0000000000001L)) *dst = NAN;
  430|       |    else *dst = (UA_Double)unpack754(decoded, 64, 11);
  431|       |#endif
  432|  1.16k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  1.16k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  433|  1.17k|}
ua_types_encoding_binary.c:String_decodeBinary:
  580|  16.9k|FUNC_DECODE_BINARY(String) {
  581|  16.9k|    UA_String *dst = (UA_String*)_dst;
  582|  16.9k|    return Array_decodeBinary(ctx, (void**)&dst->data, &dst->length, &UA_TYPES[UA_TYPES_BYTE]);
  ------------------
  |  |   96|  16.9k|#define UA_TYPES_BYTE 2
  ------------------
  583|  16.9k|}
ua_types_encoding_binary.c:Array_decodeBinary:
  507|  28.8k|                   size_t *out_length, const UA_DataType *type) {
  508|       |    /* Decode the length */
  509|  28.8k|    i32 signed_length;
  510|  28.8k|    status ret = DECODE_DIRECT(&signed_length, UInt32); /* Int32 */
  ------------------
  |  |   81|  28.8k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
  511|  28.8k|    UA_CHECK_STATUS(ret, return ret);
  ------------------
  |  |  179|  28.8k|    UA_CHECK(isGood(STATUSCODE), EVAL_ON_ERROR)
  |  |  ------------------
  |  |  |  |  172|  28.8k|    do {                                                                                 \
  |  |  |  |  173|  28.8k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  579|  28.8k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (579:25): [True: 1.45k, False: 27.3k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  174|  1.45k|            EVAL_ON_ERROR;                                                               \
  |  |  |  |  175|  1.45k|        }                                                                                \
  |  |  |  |  176|  28.8k|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (176:13): [Folded, False: 27.3k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  512|       |
  513|       |    /* Return early for empty arrays */
  514|  27.3k|    if(signed_length <= 0) {
  ------------------
  |  Branch (514:8): [True: 15.5k, False: 11.7k]
  ------------------
  515|  15.5k|        *out_length = 0;
  516|  15.5k|        if(signed_length < 0)
  ------------------
  |  Branch (516:12): [True: 5.17k, False: 10.3k]
  ------------------
  517|  5.17k|            *dst = NULL;
  518|  10.3k|        else
  519|  10.3k|            *dst = UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|  10.3k|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  520|  15.5k|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  15.5k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  521|  15.5k|    }
  522|       |
  523|       |    /* Filter out arrays that can obviously not be decoded, because the message
  524|       |     * is too small for the array length. This prevents the allocation of very
  525|       |     * long arrays for bogus messages.
  526|       |     *
  527|       |     * The worst known case (so far) is UA_DataValue. It has
  528|       |     * sizeof(UA_DataValue) == 80 and an empty DataValue is encoded with just
  529|       |     * one byte. We use 128 as the smallest power of 2 larger than 80. */
  530|  11.7k|    size_t length = (size_t)signed_length;
  531|  11.7k|    UA_CHECK(length <= SIZE_MAX / type->memSize,
  ------------------
  |  |  172|  11.7k|    do {                                                                                 \
  |  |  173|  11.7k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  579|  11.7k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (579:25): [True: 0, False: 11.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  175|      0|        }                                                                                \
  |  |  176|  11.7k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 11.7k]
  |  |  ------------------
  ------------------
  532|  11.7k|             return UA_STATUSCODE_BADDECODINGERROR);
  533|  11.7k|    size_t arraySize = length * type->memSize;
  534|  11.7k|    size_t remaining = (size_t)(ctx->end - ctx->pos);
  535|  11.7k|    UA_CHECK(length / 128 <= remaining / type->memSize,
  ------------------
  |  |  172|  11.7k|    do {                                                                                 \
  |  |  173|  11.7k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  579|  11.7k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (579:25): [True: 1.22k, False: 10.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|  1.22k|            EVAL_ON_ERROR;                                                               \
  |  |  175|  1.22k|        }                                                                                \
  |  |  176|  11.7k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 10.5k]
  |  |  ------------------
  ------------------
  536|  11.7k|             return UA_STATUSCODE_BADDECODINGERROR);
  537|       |
  538|       |    /* Allocate memory */
  539|  10.5k|    *dst = ctxCalloc(ctx, length, type->memSize);
  540|  10.5k|    UA_CHECK_MEM(*dst, return UA_STATUSCODE_BADOUTOFMEMORY);
  ------------------
  |  |  182|  10.5k|    UA_CHECK(isNonNull(STATUSCODE), EVAL_ON_ERROR)
  |  |  ------------------
  |  |  |  |  172|  10.5k|    do {                                                                                 \
  |  |  |  |  173|  10.5k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  579|  10.5k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (579:25): [True: 0, False: 10.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  |  |  175|      0|        }                                                                                \
  |  |  |  |  176|  10.5k|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (176:13): [Folded, False: 10.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  541|       |
  542|  10.5k|    if(type->overlayable) {
  ------------------
  |  Branch (542:8): [True: 3.75k, False: 6.81k]
  ------------------
  543|       |        /* memcpy overlayable array */
  544|  3.75k|        if(arraySize > remaining) {
  ------------------
  |  Branch (544:12): [True: 1.07k, False: 2.67k]
  ------------------
  545|  1.07k|            ctxFree(ctx, *dst);
  546|  1.07k|            *dst = NULL;
  547|  1.07k|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|  1.07k|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  548|  1.07k|        }
  549|  2.67k|        memcpy(*dst, ctx->pos, arraySize);
  550|  2.67k|        ctx->pos += arraySize;
  551|  6.81k|    } else {
  552|       |        /* Decode array members */
  553|  6.81k|        uintptr_t ptr = (uintptr_t)*dst;
  554|  2.53M|        for(size_t i = 0; i < length; ++i) {
  ------------------
  |  Branch (554:27): [True: 2.53M, False: 4.42k]
  ------------------
  555|  2.53M|            ret = decodeBinaryJumpTable[type->typeKind](ctx, (void*)ptr, type);
  556|  2.53M|            if(ret != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|  2.53M|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (556:16): [True: 2.38k, False: 2.52M]
  ------------------
  557|  2.38k|                if(!ctx->opts.calloc) {
  ------------------
  |  Branch (557:20): [True: 2.38k, False: 0]
  ------------------
  558|       |                    /* +1 because last element is also already initialized */
  559|  2.38k|                    UA_Array_delete(*dst, i + 1, type);
  560|  2.38k|                }
  561|  2.38k|                *dst = NULL;
  562|  2.38k|                return ret;
  563|  2.38k|            }
  564|  2.52M|            ptr += type->memSize;
  565|  2.52M|        }
  566|  6.81k|    }
  567|  7.10k|    *out_length = length;
  568|  7.10k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  7.10k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  569|  10.5k|}
ua_types_encoding_binary.c:Guid_decodeBinary:
  599|  3.45k|FUNC_DECODE_BINARY(Guid) {
  600|  3.45k|    UA_Guid *dst = (UA_Guid*)_dst;
  601|  3.45k|    status ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  3.45k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  602|  3.45k|    ret |= DECODE_DIRECT(&dst->data1, UInt32);
  ------------------
  |  |   81|  3.45k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
  603|  3.45k|    ret |= DECODE_DIRECT(&dst->data2, UInt16);
  ------------------
  |  |   81|  3.45k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
  604|  3.45k|    ret |= DECODE_DIRECT(&dst->data3, UInt16);
  ------------------
  |  |   81|  3.45k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
  605|  3.45k|    UA_CHECK(ctx->pos + (8*sizeof(u8)) <= ctx->end,
  ------------------
  |  |  172|  3.45k|    do {                                                                                 \
  |  |  173|  3.45k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  579|  3.45k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (579:25): [True: 39, False: 3.41k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|     39|            EVAL_ON_ERROR;                                                               \
  |  |  175|     39|        }                                                                                \
  |  |  176|  3.45k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 3.41k]
  |  |  ------------------
  ------------------
  606|  3.45k|             return UA_STATUSCODE_BADDECODINGERROR);
  607|  3.41k|    memcpy(dst->data4, ctx->pos, 8*sizeof(u8));
  608|  3.41k|    ctx->pos += 8;
  609|  3.41k|    return ret;
  610|  3.45k|}
ua_types_encoding_binary.c:NodeId_decodeBinary:
  687|  24.6k|FUNC_DECODE_BINARY(NodeId) {
  688|  24.6k|    UA_NodeId *dst = (UA_NodeId*)_dst;
  689|  24.6k|    u8 dstByte = 0, encodingByte = 0;
  690|  24.6k|    u16 dstUInt16 = 0;
  691|       |
  692|       |    /* Decode the encoding bitfield */
  693|  24.6k|    status ret = DECODE_DIRECT(&encodingByte, Byte);
  ------------------
  |  |   81|  24.6k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
  694|  24.6k|    UA_CHECK_STATUS(ret, return ret);
  ------------------
  |  |  179|  24.6k|    UA_CHECK(isGood(STATUSCODE), EVAL_ON_ERROR)
  |  |  ------------------
  |  |  |  |  172|  24.6k|    do {                                                                                 \
  |  |  |  |  173|  24.6k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  579|  24.6k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (579:25): [True: 42, False: 24.5k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  174|     42|            EVAL_ON_ERROR;                                                               \
  |  |  |  |  175|     42|        }                                                                                \
  |  |  |  |  176|  24.6k|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (176:13): [Folded, False: 24.5k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  695|       |
  696|       |    /* Filter out the bits used only for ExpandedNodeIds */
  697|  24.5k|    encodingByte &= (u8)~(u8)(UA_EXPANDEDNODEID_SERVERINDEX_FLAG |
  ------------------
  |  |  617|  24.5k|#define UA_EXPANDEDNODEID_SERVERINDEX_FLAG 0x40u
  ------------------
  698|  24.5k|                              UA_EXPANDEDNODEID_NAMESPACEURI_FLAG);
  ------------------
  |  |  618|  24.5k|#define UA_EXPANDEDNODEID_NAMESPACEURI_FLAG 0x80u
  ------------------
  699|       |
  700|       |    /* Decode the namespace and identifier */
  701|  24.5k|    switch(encodingByte) {
  702|  11.9k|    case UA_NODEIDTYPE_NUMERIC_TWOBYTE:
  ------------------
  |  |  613|  11.9k|#define UA_NODEIDTYPE_NUMERIC_TWOBYTE 0u
  ------------------
  |  Branch (702:5): [True: 11.9k, False: 12.6k]
  ------------------
  703|  11.9k|        dst->identifierType = UA_NODEIDTYPE_NUMERIC;
  704|  11.9k|        ret = DECODE_DIRECT(&dstByte, Byte);
  ------------------
  |  |   81|  11.9k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
  705|  11.9k|        dst->identifier.numeric = dstByte;
  706|  11.9k|        dst->namespaceIndex = 0;
  707|  11.9k|        break;
  708|  3.67k|    case UA_NODEIDTYPE_NUMERIC_FOURBYTE:
  ------------------
  |  |  614|  3.67k|#define UA_NODEIDTYPE_NUMERIC_FOURBYTE 1u
  ------------------
  |  Branch (708:5): [True: 3.67k, False: 20.8k]
  ------------------
  709|  3.67k|        dst->identifierType = UA_NODEIDTYPE_NUMERIC;
  710|  3.67k|        ret |= DECODE_DIRECT(&dstByte, Byte);
  ------------------
  |  |   81|  3.67k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
  711|  3.67k|        dst->namespaceIndex = dstByte;
  712|  3.67k|        ret |= DECODE_DIRECT(&dstUInt16, UInt16);
  ------------------
  |  |   81|  3.67k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
  713|  3.67k|        dst->identifier.numeric = dstUInt16;
  714|  3.67k|        break;
  715|    568|    case UA_NODEIDTYPE_NUMERIC_COMPLETE:
  ------------------
  |  |  615|    568|#define UA_NODEIDTYPE_NUMERIC_COMPLETE 2u
  ------------------
  |  Branch (715:5): [True: 568, False: 23.9k]
  ------------------
  716|    568|        dst->identifierType = UA_NODEIDTYPE_NUMERIC;
  717|    568|        ret |= DECODE_DIRECT(&dst->namespaceIndex, UInt16);
  ------------------
  |  |   81|    568|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
  718|    568|        ret |= DECODE_DIRECT(&dst->identifier.numeric, UInt32);
  ------------------
  |  |   81|    568|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
  719|    568|        break;
  720|  3.29k|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (720:5): [True: 3.29k, False: 21.2k]
  ------------------
  721|  3.29k|        dst->identifierType = UA_NODEIDTYPE_STRING;
  722|  3.29k|        ret |= DECODE_DIRECT(&dst->namespaceIndex, UInt16);
  ------------------
  |  |   81|  3.29k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
  723|  3.29k|        ret |= DECODE_DIRECT(&dst->identifier.string, String);
  ------------------
  |  |   81|  3.29k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
  724|  3.29k|        break;
  725|  2.25k|    case UA_NODEIDTYPE_GUID:
  ------------------
  |  Branch (725:5): [True: 2.25k, False: 22.3k]
  ------------------
  726|  2.25k|        dst->identifierType = UA_NODEIDTYPE_GUID;
  727|  2.25k|        ret |= DECODE_DIRECT(&dst->namespaceIndex, UInt16);
  ------------------
  |  |   81|  2.25k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
  728|  2.25k|        ret |= DECODE_DIRECT(&dst->identifier.guid, Guid);
  ------------------
  |  |   81|  2.25k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
  729|  2.25k|        break;
  730|  2.73k|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (730:5): [True: 2.73k, False: 21.8k]
  ------------------
  731|  2.73k|        dst->identifierType = UA_NODEIDTYPE_BYTESTRING;
  732|  2.73k|        ret |= DECODE_DIRECT(&dst->namespaceIndex, UInt16);
  ------------------
  |  |   81|  2.73k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
  733|  2.73k|        ret |= DECODE_DIRECT(&dst->identifier.byteString, String); /* ByteString */
  ------------------
  |  |   81|  2.73k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
  734|  2.73k|        break;
  735|     71|    default:
  ------------------
  |  Branch (735:5): [True: 71, False: 24.4k]
  ------------------
  736|     71|        ret |= UA_STATUSCODE_BADINTERNALERROR;
  ------------------
  |  |   29|     71|#define UA_STATUSCODE_BADINTERNALERROR ((UA_StatusCode) 0x80020000)
  ------------------
  737|     71|        break;
  738|  24.5k|    }
  739|       |
  740|       |    /* Mapping of the namespace index */
  741|  24.5k|    if(ctx->opts.namespaceMapping)
  ------------------
  |  Branch (741:8): [True: 0, False: 24.5k]
  ------------------
  742|      0|        dst->namespaceIndex =
  743|      0|            UA_NamespaceMapping_remote2Local(ctx->opts.namespaceMapping,
  744|      0|                                             dst->namespaceIndex);
  745|       |
  746|  24.5k|    return ret;
  747|  24.5k|}
ua_types_encoding_binary.c:ExpandedNodeId_decodeBinary:
  780|  2.48k|FUNC_DECODE_BINARY(ExpandedNodeId) {
  781|  2.48k|    UA_ExpandedNodeId *dst = (UA_ExpandedNodeId*)_dst;
  782|       |    /* Decode the encoding mask */
  783|  2.48k|    UA_CHECK(ctx->pos + 1 <= ctx->end, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  172|  2.48k|    do {                                                                                 \
  |  |  173|  2.48k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  579|  2.48k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (579:25): [True: 7, False: 2.47k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      7|            EVAL_ON_ERROR;                                                               \
  |  |  175|      7|        }                                                                                \
  |  |  176|  2.48k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 2.47k]
  |  |  ------------------
  ------------------
  784|  2.47k|    u8 encoding = *ctx->pos;
  785|       |
  786|       |    /* Decode the NodeId */
  787|  2.47k|    status ret = DECODE_DIRECT(&dst->nodeId, NodeId);
  ------------------
  |  |   81|  2.47k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
  788|       |
  789|       |    /* Decode the NamespaceUri */
  790|  2.47k|    if(encoding & UA_EXPANDEDNODEID_NAMESPACEURI_FLAG) {
  ------------------
  |  |  618|  2.47k|#define UA_EXPANDEDNODEID_NAMESPACEURI_FLAG 0x80u
  ------------------
  |  Branch (790:8): [True: 512, False: 1.96k]
  ------------------
  791|    512|        dst->nodeId.namespaceIndex = 0;
  792|    512|        ret |= DECODE_DIRECT(&dst->namespaceUri, String);
  ------------------
  |  |   81|    512|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
  793|       |        /* Try to resolve the namespace uri to a namespace index */
  794|    512|        if(ctx->opts.namespaceMapping) {
  ------------------
  |  Branch (794:12): [True: 0, False: 512]
  ------------------
  795|      0|            status foundNsUri =
  796|      0|                UA_NamespaceMapping_uri2Index(ctx->opts.namespaceMapping,
  797|      0|                                              dst->namespaceUri,
  798|      0|                                              &dst->nodeId.namespaceIndex);
  799|      0|            if(foundNsUri == UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (799:16): [True: 0, False: 0]
  ------------------
  800|      0|                UA_String_clear(&dst->namespaceUri);
  801|      0|        }
  802|    512|    }
  803|       |
  804|       |    /* Decode the ServerIndex */
  805|  2.47k|    if(encoding & UA_EXPANDEDNODEID_SERVERINDEX_FLAG)
  ------------------
  |  |  617|  2.47k|#define UA_EXPANDEDNODEID_SERVERINDEX_FLAG 0x40u
  ------------------
  |  Branch (805:8): [True: 241, False: 2.23k]
  ------------------
  806|    241|        ret |= DECODE_DIRECT(&dst->serverIndex, UInt32);
  ------------------
  |  |   81|    241|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
  807|  2.47k|    return ret;
  808|  2.48k|}
ua_types_encoding_binary.c:QualifiedName_decodeBinary:
  820|    675|FUNC_DECODE_BINARY(QualifiedName) {
  821|    675|    UA_QualifiedName *dst = (UA_QualifiedName*)_dst;
  822|    675|    status ret = DECODE_DIRECT(&dst->namespaceIndex, UInt16);
  ------------------
  |  |   81|    675|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
  823|       |    ret |= DECODE_DIRECT(&dst->name, String);
  ------------------
  |  |   81|    675|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
  824|    675|    return ret;
  825|    675|}
ua_types_encoding_binary.c:LocalizedText_decodeBinary:
  855|  67.3k|FUNC_DECODE_BINARY(LocalizedText) {
  856|  67.3k|    UA_LocalizedText *dst = (UA_LocalizedText*)_dst;
  857|       |    /* Decode the encoding mask */
  858|  67.3k|    u8 encoding = 0;
  859|  67.3k|    status ret = DECODE_DIRECT(&encoding, Byte);
  ------------------
  |  |   81|  67.3k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
  860|       |
  861|       |    /* Decode the content */
  862|  67.3k|    if(encoding & UA_LOCALIZEDTEXT_ENCODINGMASKTYPE_LOCALE)
  ------------------
  |  |  828|  67.3k|#define UA_LOCALIZEDTEXT_ENCODINGMASKTYPE_LOCALE 0x01u
  ------------------
  |  Branch (862:8): [True: 218, False: 67.1k]
  ------------------
  863|    218|        ret |= DECODE_DIRECT(&dst->locale, String);
  ------------------
  |  |   81|    218|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
  864|  67.3k|    if(encoding & UA_LOCALIZEDTEXT_ENCODINGMASKTYPE_TEXT)
  ------------------
  |  |  829|  67.3k|#define UA_LOCALIZEDTEXT_ENCODINGMASKTYPE_TEXT 0x02u
  ------------------
  |  Branch (864:8): [True: 212, False: 67.1k]
  ------------------
  865|    212|        ret |= DECODE_DIRECT(&dst->text, String);
  ------------------
  |  |   81|    212|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
  866|  67.3k|    return ret;
  867|  67.3k|}
ua_types_encoding_binary.c:ExtensionObject_decodeBinary:
 1013|  10.9k|FUNC_DECODE_BINARY(ExtensionObject) {
 1014|  10.9k|    UA_ExtensionObject *dst = (UA_ExtensionObject*)_dst;
 1015|  10.9k|    u8 encoding = 0;
 1016|  10.9k|    UA_NodeId binTypeId;
 1017|  10.9k|    UA_NodeId_init(&binTypeId);
 1018|       |
 1019|  10.9k|    status ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  10.9k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1020|  10.9k|    ret |= DECODE_DIRECT(&binTypeId, NodeId);
  ------------------
  |  |   81|  10.9k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
 1021|  10.9k|    ret |= DECODE_DIRECT(&encoding, Byte);
  ------------------
  |  |   81|  10.9k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
 1022|  10.9k|    UA_CHECK_STATUS(ret, ctxClearNodeId(ctx, &binTypeId); return ret);
  ------------------
  |  |  179|  10.9k|    UA_CHECK(isGood(STATUSCODE), EVAL_ON_ERROR)
  |  |  ------------------
  |  |  |  |  172|  10.9k|    do {                                                                                 \
  |  |  |  |  173|  10.9k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  579|  10.9k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (579:25): [True: 143, False: 10.7k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  174|    143|            EVAL_ON_ERROR;                                                               \
  |  |  |  |  175|    143|        }                                                                                \
  |  |  |  |  176|  10.9k|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (176:13): [Folded, False: 10.7k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1023|       |
 1024|  10.7k|    switch(encoding) {
 1025|  4.71k|    case UA_EXTENSIONOBJECT_ENCODED_BYTESTRING:
  ------------------
  |  Branch (1025:5): [True: 4.71k, False: 6.08k]
  ------------------
 1026|  4.71k|        ret = ExtensionObject_decodeBinaryContent(ctx, dst, &binTypeId);
 1027|  4.71k|        ctxClearNodeId(ctx, &binTypeId);
 1028|  4.71k|        break;
 1029|  5.58k|    case UA_EXTENSIONOBJECT_ENCODED_NOBODY:
  ------------------
  |  Branch (1029:5): [True: 5.58k, False: 5.21k]
  ------------------
 1030|  5.58k|        dst->encoding = (UA_ExtensionObjectEncoding)encoding;
 1031|  5.58k|        dst->content.encoded.typeId = binTypeId; /* move to dst */
 1032|  5.58k|        dst->content.encoded.body = UA_BYTESTRING_NULL;
 1033|  5.58k|        break;
 1034|    446|    case UA_EXTENSIONOBJECT_ENCODED_XML:
  ------------------
  |  Branch (1034:5): [True: 446, False: 10.3k]
  ------------------
 1035|    446|        dst->encoding = (UA_ExtensionObjectEncoding)encoding;
 1036|    446|        dst->content.encoded.typeId = binTypeId; /* move to dst */
 1037|    446|        ret = DECODE_DIRECT(&dst->content.encoded.body, String); /* ByteString */
  ------------------
  |  |   81|    446|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
 1038|    446|        UA_CHECK_STATUS(ret, ctxClearNodeId(ctx, &dst->content.encoded.typeId));
  ------------------
  |  |  179|    446|    UA_CHECK(isGood(STATUSCODE), EVAL_ON_ERROR)
  |  |  ------------------
  |  |  |  |  172|    446|    do {                                                                                 \
  |  |  |  |  173|    446|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  579|    446|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (579:25): [True: 8, False: 438]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  174|      8|            EVAL_ON_ERROR;                                                               \
  |  |  |  |  175|      8|        }                                                                                \
  |  |  |  |  176|    446|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (176:13): [Folded, False: 446]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1039|    446|        break;
 1040|     51|    default:
  ------------------
  |  Branch (1040:5): [True: 51, False: 10.7k]
  ------------------
 1041|     51|        ctxClearNodeId(ctx, &binTypeId);
 1042|     51|        ret = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     51|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1043|     51|        break;
 1044|  10.7k|    }
 1045|       |
 1046|  10.7k|    return ret;
 1047|  10.7k|}
ua_types_encoding_binary.c:ctxClearNodeId:
   64|  13.7k|ctxClearNodeId(Ctx *ctx, UA_NodeId *p) {
   65|  13.7k|    if((p->identifierType == UA_NODEIDTYPE_STRING ||
  ------------------
  |  Branch (65:9): [True: 1.68k, False: 12.0k]
  ------------------
   66|  12.0k|        p->identifierType == UA_NODEIDTYPE_BYTESTRING) &&
  ------------------
  |  Branch (66:9): [True: 1.42k, False: 10.6k]
  ------------------
   67|  3.10k|       !ctx->opts.calloc && p->identifier.string.data > (u8*)UA_EMPTY_ARRAY_SENTINEL)
  ------------------
  |  |  756|  3.10k|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  |  Branch (67:8): [True: 3.10k, False: 0]
  |  Branch (67:29): [True: 1.06k, False: 2.03k]
  ------------------
   68|  1.06k|        UA_free(p->identifier.string.data);
  ------------------
  |  |   19|  1.06k|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
   69|  13.7k|    memset(p, 0, sizeof(UA_NodeId));
   70|  13.7k|}
ua_types_encoding_binary.c:ExtensionObject_decodeBinaryContent:
  977|  4.71k|                                    const UA_NodeId *typeId) {
  978|       |    /* Lookup the datatype */
  979|  4.71k|    const UA_DataType *type = UA_findDataTypeByBinaryInternal(ctx, typeId);
  980|       |
  981|       |    /* Unknown type, just take the binary content */
  982|  4.71k|    if(!type) {
  ------------------
  |  Branch (982:8): [True: 3.49k, False: 1.22k]
  ------------------
  983|  3.49k|        dst->encoding = UA_EXTENSIONOBJECT_ENCODED_BYTESTRING;
  984|  3.49k|        UA_NodeId_copy(typeId, &dst->content.encoded.typeId);
  985|  3.49k|        return DECODE_DIRECT(&dst->content.encoded.body, String); /* ByteString */
  ------------------
  |  |   81|  3.49k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
  986|  3.49k|    }
  987|       |
  988|       |    /* Allocate memory */
  989|  1.22k|    dst->content.decoded.data = ctxCalloc(ctx, 1, type->memSize);
  990|  1.22k|    UA_CHECK_MEM(dst->content.decoded.data, return UA_STATUSCODE_BADOUTOFMEMORY);
  ------------------
  |  |  182|  1.22k|    UA_CHECK(isNonNull(STATUSCODE), EVAL_ON_ERROR)
  |  |  ------------------
  |  |  |  |  172|  1.22k|    do {                                                                                 \
  |  |  |  |  173|  1.22k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  579|  1.22k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (579:25): [True: 0, False: 1.22k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  |  |  175|      0|        }                                                                                \
  |  |  |  |  176|  1.22k|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (176:13): [Folded, False: 1.22k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  991|       |
  992|       |    /* Set the decoded state before any further operation can fail so the
  993|       |     * caller's error cleanup releases the allocated content. */
  994|  1.22k|    dst->encoding = UA_EXTENSIONOBJECT_DECODED;
  995|  1.22k|    dst->content.decoded.type = type;
  996|       |
  997|       |    /* Read the length field and validate that the inner decoder consumes exactly
  998|       |     * that many bytes, closing a decoder-vs-IDS split-view channel. */
  999|  1.22k|    u32 member_length = 0;
 1000|  1.22k|    status ret = DECODE_DIRECT(&member_length, UInt32);
  ------------------
  |  |   81|  1.22k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
 1001|  1.22k|    UA_CHECK_STATUS(ret, return ret);
  ------------------
  |  |  179|  1.22k|    UA_CHECK(isGood(STATUSCODE), EVAL_ON_ERROR)
  |  |  ------------------
  |  |  |  |  172|  1.22k|    do {                                                                                 \
  |  |  |  |  173|  1.22k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  579|  1.22k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (579:25): [True: 7, False: 1.21k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  174|      7|            EVAL_ON_ERROR;                                                               \
  |  |  |  |  175|      7|        }                                                                                \
  |  |  |  |  176|  1.22k|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (176:13): [Folded, False: 1.21k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1002|  1.21k|    UA_CHECK(member_length <= (size_t)(ctx->end - ctx->pos),
  ------------------
  |  |  172|  1.21k|    do {                                                                                 \
  |  |  173|  1.21k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  579|  1.21k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (579:25): [True: 30, False: 1.18k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|     30|            EVAL_ON_ERROR;                                                               \
  |  |  175|     30|        }                                                                                \
  |  |  176|  1.21k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 1.18k]
  |  |  ------------------
  ------------------
 1003|  1.21k|             return UA_STATUSCODE_BADDECODINGERROR);
 1004|  1.18k|    const u8 *expected_end = ctx->pos + member_length;
 1005|       |
 1006|       |    /* Decode */
 1007|  1.18k|    ret = decodeBinaryJumpTable[type->typeKind](ctx, dst->content.decoded.data, type);
 1008|  1.18k|    if(ret == UA_STATUSCODE_GOOD && ctx->pos != expected_end)
  ------------------
  |  |   17|  2.36k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1008:8): [True: 901, False: 282]
  |  Branch (1008:37): [True: 34, False: 867]
  ------------------
 1009|     34|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     34|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1010|  1.14k|    return ret;
 1011|  1.18k|}
ua_types_encoding_binary.c:DataValue_decodeBinary:
 1435|  44.6k|FUNC_DECODE_BINARY(DataValue) {
 1436|  44.6k|    UA_DataValue *dst = (UA_DataValue*)_dst;
 1437|       |
 1438|       |    /* Decode the encoding mask */
 1439|  44.6k|    u8 encodingMask;
 1440|  44.6k|    status ret = DECODE_DIRECT(&encodingMask, Byte);
  ------------------
  |  |   81|  44.6k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
 1441|  44.6k|    UA_CHECK_STATUS(ret, return ret);
  ------------------
  |  |  179|  44.6k|    UA_CHECK(isGood(STATUSCODE), EVAL_ON_ERROR)
  |  |  ------------------
  |  |  |  |  172|  44.6k|    do {                                                                                 \
  |  |  |  |  173|  44.6k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  579|  44.6k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (579:25): [True: 63, False: 44.6k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  174|     63|            EVAL_ON_ERROR;                                                               \
  |  |  |  |  175|     63|        }                                                                                \
  |  |  |  |  176|  44.6k|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (176:13): [Folded, False: 44.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1442|       |
 1443|       |    /* Check the recursion limit */
 1444|  44.6k|    UA_CHECK(ctx->depth <= UA_ENCODING_MAX_RECURSION, return UA_STATUSCODE_BADENCODINGERROR);
  ------------------
  |  |  172|  44.6k|    do {                                                                                 \
  |  |  173|  44.6k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  579|  44.6k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (579:25): [True: 1, False: 44.6k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      1|            EVAL_ON_ERROR;                                                               \
  |  |  175|      1|        }                                                                                \
  |  |  176|  44.6k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 44.6k]
  |  |  ------------------
  ------------------
 1445|  44.6k|    ctx->depth++;
 1446|       |
 1447|       |    /* Decode the content */
 1448|  44.6k|    if(encodingMask & 0x01u) {
  ------------------
  |  Branch (1448:8): [True: 3.40k, False: 41.1k]
  ------------------
 1449|  3.40k|        dst->hasValue = true;
 1450|  3.40k|        ret |= DECODE_DIRECT(&dst->value, Variant);
  ------------------
  |  |   81|  3.40k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
 1451|  3.40k|    }
 1452|  44.6k|    if(encodingMask & 0x02u) {
  ------------------
  |  Branch (1452:8): [True: 2.00k, False: 42.5k]
  ------------------
 1453|  2.00k|        dst->hasStatus = true;
 1454|  2.00k|        ret |= DECODE_DIRECT(&dst->status, UInt32); /* StatusCode */
  ------------------
  |  |   81|  2.00k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
 1455|  2.00k|    }
 1456|  44.6k|    if(encodingMask & 0x04u) {
  ------------------
  |  Branch (1456:8): [True: 1.95k, False: 42.6k]
  ------------------
 1457|  1.95k|        dst->hasSourceTimestamp = true;
 1458|  1.95k|        ret |= DECODE_DIRECT(&dst->sourceTimestamp, UInt64); /* DateTime */
  ------------------
  |  |   81|  1.95k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
 1459|  1.95k|    }
 1460|  44.6k|    if(encodingMask & 0x10u) {
  ------------------
  |  Branch (1460:8): [True: 2.06k, False: 42.5k]
  ------------------
 1461|  2.06k|        dst->hasSourcePicoseconds = true;
 1462|  2.06k|        ret |= DECODE_DIRECT(&dst->sourcePicoseconds, UInt16);
  ------------------
  |  |   81|  2.06k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
 1463|  2.06k|        if(dst->sourcePicoseconds > MAX_PICO_SECONDS)
  ------------------
  |  | 1433|  2.06k|#define MAX_PICO_SECONDS 9999
  ------------------
  |  Branch (1463:12): [True: 228, False: 1.83k]
  ------------------
 1464|    228|            dst->sourcePicoseconds = MAX_PICO_SECONDS;
  ------------------
  |  | 1433|    228|#define MAX_PICO_SECONDS 9999
  ------------------
 1465|  2.06k|    }
 1466|  44.6k|    if(encodingMask & 0x08u) {
  ------------------
  |  Branch (1466:8): [True: 705, False: 43.8k]
  ------------------
 1467|    705|        dst->hasServerTimestamp = true;
 1468|    705|        ret |= DECODE_DIRECT(&dst->serverTimestamp, UInt64); /* DateTime */
  ------------------
  |  |   81|    705|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
 1469|    705|    }
 1470|  44.6k|    if(encodingMask & 0x20u) {
  ------------------
  |  Branch (1470:8): [True: 812, False: 43.7k]
  ------------------
 1471|    812|        dst->hasServerPicoseconds = true;
 1472|    812|        ret |= DECODE_DIRECT(&dst->serverPicoseconds, UInt16);
  ------------------
  |  |   81|    812|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
 1473|    812|        if(dst->serverPicoseconds > MAX_PICO_SECONDS)
  ------------------
  |  | 1433|    812|#define MAX_PICO_SECONDS 9999
  ------------------
  |  Branch (1473:12): [True: 211, False: 601]
  ------------------
 1474|    211|            dst->serverPicoseconds = MAX_PICO_SECONDS;
  ------------------
  |  | 1433|    211|#define MAX_PICO_SECONDS 9999
  ------------------
 1475|    812|    }
 1476|       |
 1477|  44.6k|    ctx->depth--;
 1478|  44.6k|    return ret;
 1479|  44.6k|}
ua_types_encoding_binary.c:Variant_decodeBinary:
 1318|   172k|FUNC_DECODE_BINARY(Variant) {
 1319|   172k|    UA_Variant *dst = (UA_Variant*)_dst;
 1320|       |
 1321|       |    /* Decode the encoding byte */
 1322|   172k|    u8 encodingByte;
 1323|   172k|    status ret = DECODE_DIRECT(&encodingByte, Byte);
  ------------------
  |  |   81|   172k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
 1324|   172k|    UA_CHECK_STATUS(ret, return ret);
  ------------------
  |  |  179|   172k|    UA_CHECK(isGood(STATUSCODE), EVAL_ON_ERROR)
  |  |  ------------------
  |  |  |  |  172|   172k|    do {                                                                                 \
  |  |  |  |  173|   172k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  579|   172k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (579:25): [True: 201, False: 172k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  174|    201|            EVAL_ON_ERROR;                                                               \
  |  |  |  |  175|    201|        }                                                                                \
  |  |  |  |  176|   172k|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (176:13): [Folded, False: 172k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1325|       |
 1326|       |    /* Return early for an empty variant (was already _inited) */
 1327|   172k|    if(encodingByte == 0)
  ------------------
  |  Branch (1327:8): [True: 150k, False: 22.0k]
  ------------------
 1328|   150k|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|   150k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1329|       |
 1330|       |    /* Does the variant contain an array? */
 1331|  22.0k|    const UA_Boolean isArray = (encodingByte & (u8)UA_VARIANT_ENCODINGMASKTYPE_ARRAY) > 0;
 1332|  22.0k|    UA_CHECK(isArray || !(encodingByte & UA_VARIANT_ENCODINGMASKTYPE_DIMENSIONS),
  ------------------
  |  |  172|  22.0k|    do {                                                                                 \
  |  |  173|  22.0k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  579|  35.7k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (579:25): [True: 11, False: 22.0k]
  |  |  |  |  |  Branch (579:43): [True: 8.32k, False: 13.7k]
  |  |  |  |  |  Branch (579:43): [True: 13.7k, False: 11]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|     11|            EVAL_ON_ERROR;                                                               \
  |  |  175|     11|        }                                                                                \
  |  |  176|  22.0k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 22.0k]
  |  |  ------------------
  ------------------
 1333|  22.0k|             return UA_STATUSCODE_BADDECODINGERROR);
 1334|       |
 1335|       |    /* Get the datatype of the content. The type must be a builtin data type.
 1336|       |     * All not-builtin types are wrapped in an ExtensionObject. The "type kind"
 1337|       |     * for types up to DiagnsticInfo equals to the index in the encoding
 1338|       |     * byte. */
 1339|  22.0k|    size_t typeKind = (size_t)((encodingByte & (u8)UA_VARIANT_ENCODINGMASKTYPE_TYPEID_MASK) - 1);
 1340|       |    /* Reserved wire type ids 26..31 contain ByteStrings (Part 6, 5.2.2.16).
 1341|       |     * Normalize them to ByteString; the original reserved id is not retained. */
 1342|  22.0k|    if(typeKind >= 25 && typeKind <= 30)
  ------------------
  |  Branch (1342:8): [True: 252, False: 21.7k]
  |  Branch (1342:26): [True: 206, False: 46]
  ------------------
 1343|    206|        typeKind = UA_DATATYPEKIND_BYTESTRING;
 1344|  22.0k|    UA_CHECK(typeKind <= UA_DATATYPEKIND_DIAGNOSTICINFO, return UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  172|  22.0k|    do {                                                                                 \
  |  |  173|  22.0k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  579|  22.0k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (579:25): [True: 46, False: 21.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|     46|            EVAL_ON_ERROR;                                                               \
  |  |  175|     46|        }                                                                                \
  |  |  176|  22.0k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 21.9k]
  |  |  ------------------
  ------------------
 1345|       |
 1346|       |    /* A variant cannot contain a variant. But it can contain an array of
 1347|       |     * variants */
 1348|  21.9k|    UA_CHECK(typeKind != UA_DATATYPEKIND_VARIANT || isArray,
  ------------------
  |  |  172|  21.9k|    do {                                                                                 \
  |  |  173|  21.9k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  579|  25.2k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (579:25): [True: 1, False: 21.9k]
  |  |  |  |  |  Branch (579:43): [True: 18.6k, False: 3.28k]
  |  |  |  |  |  Branch (579:43): [True: 3.28k, False: 1]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      1|            EVAL_ON_ERROR;                                                               \
  |  |  175|      1|        }                                                                                \
  |  |  176|  21.9k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 21.9k]
  |  |  ------------------
  ------------------
 1349|  21.9k|             return UA_STATUSCODE_BADDECODINGERROR);
 1350|       |
 1351|       |    /* Check the recursion limit */
 1352|  21.9k|    UA_CHECK(ctx->depth <= UA_ENCODING_MAX_RECURSION, return UA_STATUSCODE_BADENCODINGERROR);
  ------------------
  |  |  172|  21.9k|    do {                                                                                 \
  |  |  173|  21.9k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  579|  21.9k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (579:25): [True: 1, False: 21.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      1|            EVAL_ON_ERROR;                                                               \
  |  |  175|      1|        }                                                                                \
  |  |  176|  21.9k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 21.9k]
  |  |  ------------------
  ------------------
 1353|  21.9k|    ctx->depth++;
 1354|       |
 1355|       |    /* Decode the content */
 1356|  21.9k|    dst->type = &UA_TYPES[typeKind];
 1357|  21.9k|    if(!isArray) {
  ------------------
  |  Branch (1357:8): [True: 13.6k, False: 8.29k]
  ------------------
 1358|       |        /* Decode scalar */
 1359|  13.6k|        if(typeKind != UA_DATATYPEKIND_EXTENSIONOBJECT) {
  ------------------
  |  Branch (1359:12): [True: 7.88k, False: 5.80k]
  ------------------
 1360|  7.88k|            dst->data = ctxCalloc(ctx, 2, dst->type->memSize);
 1361|  7.88k|            UA_CHECK_MEM(dst->data, ctx->depth--; return UA_STATUSCODE_BADOUTOFMEMORY);
  ------------------
  |  |  182|  7.88k|    UA_CHECK(isNonNull(STATUSCODE), EVAL_ON_ERROR)
  |  |  ------------------
  |  |  |  |  172|  7.88k|    do {                                                                                 \
  |  |  |  |  173|  7.88k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  579|  7.88k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (579:25): [True: 0, False: 7.88k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  |  |  175|      0|        }                                                                                \
  |  |  |  |  176|  7.88k|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (176:13): [Folded, False: 7.88k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1362|  7.88k|            ret = decodeBinaryJumpTable[typeKind](ctx, dst->data, dst->type);
 1363|  7.88k|        } else {
 1364|  5.80k|            ret = Variant_decodeBinaryUnwrapExtensionObject(ctx, dst);
 1365|  5.80k|        }
 1366|  13.6k|    } else {
 1367|       |        /* Decode array */
 1368|  8.29k|        if(typeKind != UA_DATATYPEKIND_EXTENSIONOBJECT) {
  ------------------
  |  Branch (1368:12): [True: 4.66k, False: 3.63k]
  ------------------
 1369|  4.66k|            ret = Array_decodeBinary(ctx, &dst->data, &dst->arrayLength, dst->type);
 1370|  4.66k|        } else {
 1371|  3.63k|            ret = Variant_decodeBinaryUnwrapExtensionObjectArray(ctx, &dst->data,
 1372|  3.63k|                                                                 &dst->arrayLength, &dst->type);
 1373|  3.63k|        }
 1374|       |
 1375|       |        /* Decode array dimensions */
 1376|  8.29k|        if((encodingByte & (u8)UA_VARIANT_ENCODINGMASKTYPE_DIMENSIONS) > 0) {
  ------------------
  |  Branch (1376:12): [True: 2.32k, False: 5.96k]
  ------------------
 1377|  2.32k|            ret |= Array_decodeBinary(ctx, (void **)&dst->arrayDimensions,
 1378|  2.32k|                                      &dst->arrayDimensionsSize, &UA_TYPES[UA_TYPES_INT32]);
  ------------------
  |  |  198|  2.32k|#define UA_TYPES_INT32 5
  ------------------
 1379|       |            /* Validate array length against array dimensions */
 1380|  2.32k|            size_t totalSize = 1;
 1381|   266k|            for(size_t i = 0; i < dst->arrayDimensionsSize; ++i) {
  ------------------
  |  Branch (1381:31): [True: 263k, False: 2.32k]
  ------------------
 1382|   263k|                if(dst->arrayDimensions[i] == 0)
  ------------------
  |  Branch (1382:20): [True: 87.5k, False: 176k]
  ------------------
 1383|  87.5k|                    ret = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|  87.5k|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1384|   176k|                else if(totalSize > SIZE_MAX / dst->arrayDimensions[i])
  ------------------
  |  Branch (1384:25): [True: 241, False: 176k]
  ------------------
 1385|    241|                    ret = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    241|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1386|   263k|                totalSize *= dst->arrayDimensions[i];
 1387|   263k|            }
 1388|  2.32k|            UA_CHECK(totalSize == dst->arrayLength, ret = UA_STATUSCODE_BADDECODINGERROR);
  ------------------
  |  |  172|  2.32k|    do {                                                                                 \
  |  |  173|  2.32k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  579|  2.32k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (579:25): [True: 1.35k, False: 971]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|  1.35k|            EVAL_ON_ERROR;                                                               \
  |  |  175|  1.35k|        }                                                                                \
  |  |  176|  2.32k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 2.32k]
  |  |  ------------------
  ------------------
 1389|  2.32k|        }
 1390|  8.29k|    }
 1391|       |
 1392|  21.9k|    ctx->depth--;
 1393|  21.9k|    return ret;
 1394|  21.9k|}
ua_types_encoding_binary.c:Variant_decodeBinaryUnwrapExtensionObject:
 1155|  5.80k|Variant_decodeBinaryUnwrapExtensionObject(Ctx *ctx, UA_Variant *dst) {
 1156|       |    /* Save the position in the ByteString. If unwrapping is not possible, start
 1157|       |     * from here to decode a normal ExtensionObject. */
 1158|  5.80k|    u8 *old_pos = ctx->pos;
 1159|       |
 1160|       |    /* Decode the DataType */
 1161|  5.80k|    UA_NodeId typeId;
 1162|  5.80k|    UA_NodeId_init(&typeId);
 1163|  5.80k|    status ret = DECODE_DIRECT(&typeId, NodeId);
  ------------------
  |  |   81|  5.80k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
 1164|  5.80k|    UA_CHECK_STATUS(ret, return ret);
  ------------------
  |  |  179|  5.80k|    UA_CHECK(isGood(STATUSCODE), EVAL_ON_ERROR)
  |  |  ------------------
  |  |  |  |  172|  5.80k|    do {                                                                                 \
  |  |  |  |  173|  5.80k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  579|  5.80k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (579:25): [True: 8, False: 5.79k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  174|      8|            EVAL_ON_ERROR;                                                               \
  |  |  |  |  175|      8|        }                                                                                \
  |  |  |  |  176|  5.80k|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (176:13): [Folded, False: 5.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1165|       |
 1166|       |    /* Decode the EncodingByte */
 1167|  5.79k|    u8 encoding;
 1168|  5.79k|    ret = DECODE_DIRECT(&encoding, Byte);
  ------------------
  |  |   81|  5.79k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
 1169|  5.79k|    UA_CHECK_STATUS(ret, ctxClearNodeId(ctx, &typeId); return ret);
  ------------------
  |  |  179|  5.79k|    UA_CHECK(isGood(STATUSCODE), EVAL_ON_ERROR)
  |  |  ------------------
  |  |  |  |  172|  5.79k|    do {                                                                                 \
  |  |  |  |  173|  5.79k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  579|  5.79k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (579:25): [True: 4, False: 5.79k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  174|      4|            EVAL_ON_ERROR;                                                               \
  |  |  |  |  175|      4|        }                                                                                \
  |  |  |  |  176|  5.79k|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (176:13): [Folded, False: 5.79k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1170|       |
 1171|       |    /* Search for the datatype. Default to ExtensionObject. */
 1172|  5.79k|    const u8 *expected_end = NULL;
 1173|  5.79k|    if(encoding == UA_EXTENSIONOBJECT_ENCODED_BYTESTRING &&
  ------------------
  |  Branch (1173:8): [True: 3.51k, False: 2.27k]
  ------------------
 1174|  3.51k|       (dst->type = UA_findDataTypeByBinaryInternal(ctx, &typeId)) != NULL) {
  ------------------
  |  Branch (1174:8): [True: 942, False: 2.57k]
  ------------------
 1175|       |        /* Read the length field and validate that the inner decoder consumes
 1176|       |         * exactly that many bytes, closing a decoder-vs-IDS split-view channel. */
 1177|    942|        u32 member_length = 0;
 1178|    942|        ret = DECODE_DIRECT(&member_length, UInt32);
  ------------------
  |  |   81|    942|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
 1179|    942|        UA_CHECK_STATUS(ret, ctxClearNodeId(ctx, &typeId); return ret);
  ------------------
  |  |  179|    942|    UA_CHECK(isGood(STATUSCODE), EVAL_ON_ERROR)
  |  |  ------------------
  |  |  |  |  172|    942|    do {                                                                                 \
  |  |  |  |  173|    942|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  579|    942|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (579:25): [True: 3, False: 939]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  174|      3|            EVAL_ON_ERROR;                                                               \
  |  |  |  |  175|      3|        }                                                                                \
  |  |  |  |  176|    942|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (176:13): [Folded, False: 939]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1180|    939|        UA_CHECK(member_length <= (size_t)(ctx->end - ctx->pos),
  ------------------
  |  |  172|    939|    do {                                                                                 \
  |  |  173|    939|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  579|    939|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (579:25): [True: 31, False: 908]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|     31|            EVAL_ON_ERROR;                                                               \
  |  |  175|     31|        }                                                                                \
  |  |  176|    939|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 908]
  |  |  ------------------
  ------------------
 1181|    939|                 ctxClearNodeId(ctx, &typeId); return UA_STATUSCODE_BADDECODINGERROR);
 1182|    908|        expected_end = ctx->pos + member_length;
 1183|  4.85k|    } else {
 1184|       |        /* Reset and decode as ExtensionObject */
 1185|  4.85k|        dst->type = &UA_TYPES[UA_TYPES_EXTENSIONOBJECT];
  ------------------
  |  |  742|  4.85k|#define UA_TYPES_EXTENSIONOBJECT 21
  ------------------
 1186|  4.85k|        ctx->pos = old_pos;
 1187|  4.85k|    }
 1188|  5.76k|    ctxClearNodeId(ctx, &typeId);
 1189|       |
 1190|       |    /* Allocate memory */
 1191|  5.76k|    dst->data = ctxCalloc(ctx, 1, dst->type->memSize);
 1192|  5.76k|    UA_CHECK_MEM(dst->data, return UA_STATUSCODE_BADOUTOFMEMORY);
  ------------------
  |  |  182|  5.76k|    UA_CHECK(isNonNull(STATUSCODE), EVAL_ON_ERROR)
  |  |  ------------------
  |  |  |  |  172|  5.76k|    do {                                                                                 \
  |  |  |  |  173|  5.76k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  579|  5.76k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (579:25): [True: 0, False: 5.76k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  |  |  175|      0|        }                                                                                \
  |  |  |  |  176|  5.76k|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (176:13): [Folded, False: 5.76k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1193|       |
 1194|       |    /* Decode the content */
 1195|  5.76k|    ret = decodeBinaryJumpTable[dst->type->typeKind](ctx, dst->data, dst->type);
 1196|  5.76k|    if(ret == UA_STATUSCODE_GOOD && expected_end != NULL && ctx->pos != expected_end)
  ------------------
  |  |   17|  11.5k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1196:8): [True: 5.33k, False: 430]
  |  Branch (1196:37): [True: 685, False: 4.64k]
  |  Branch (1196:61): [True: 23, False: 662]
  ------------------
 1197|     23|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     23|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1198|  5.73k|    return ret;
 1199|  5.76k|}
ua_types_encoding_binary.c:Variant_decodeBinaryUnwrapExtensionObjectArray:
 1205|  3.63k|                                               size_t *out_length, const UA_DataType **type) {
 1206|  3.63k|    u8 *orig_pos = ctx->pos;
 1207|       |
 1208|       |    /* Decode the length */
 1209|  3.63k|    i32 signed_length;
 1210|  3.63k|    status ret = DECODE_DIRECT(&signed_length, UInt32); /* Int32 */
  ------------------
  |  |   81|  3.63k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
 1211|  3.63k|    UA_CHECK_STATUS(ret, return ret);
  ------------------
  |  |  179|  3.63k|    UA_CHECK(isGood(STATUSCODE), EVAL_ON_ERROR)
  |  |  ------------------
  |  |  |  |  172|  3.63k|    do {                                                                                 \
  |  |  |  |  173|  3.63k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  579|  3.63k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (579:25): [True: 9, False: 3.62k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  174|      9|            EVAL_ON_ERROR;                                                               \
  |  |  |  |  175|      9|        }                                                                                \
  |  |  |  |  176|  3.63k|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (176:13): [Folded, False: 3.62k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1212|       |
 1213|       |    /* Return early for empty arrays */
 1214|  3.62k|    if(signed_length <= 0) {
  ------------------
  |  Branch (1214:8): [True: 517, False: 3.10k]
  ------------------
 1215|    517|        *out_length = 0;
 1216|    517|        if(signed_length < 0)
  ------------------
  |  Branch (1216:12): [True: 313, False: 204]
  ------------------
 1217|    313|            *dst = NULL;
 1218|    204|        else
 1219|    204|            *dst = UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|    204|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
 1220|       |        /* The *type field stays an ExtensionObject, as we did not decode any
 1221|       |         * member who's type is known. */
 1222|    517|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    517|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1223|    517|    }
 1224|       |
 1225|       |    /* Protect against memory exhaustion by unrealistic array lengths. An
 1226|       |     * ExtensionObject is at least 4 byte long (3 byte NodeId + 1 Byte encoding
 1227|       |     * field). */
 1228|  3.10k|    size_t length = (size_t)signed_length;
 1229|  3.10k|    size_t remaining = (size_t)(ctx->end - ctx->pos);
 1230|  3.10k|    UA_CHECK(length <= remaining / 4,
  ------------------
  |  |  172|  3.10k|    do {                                                                                 \
  |  |  173|  3.10k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  579|  3.10k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (579:25): [True: 70, False: 3.03k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|     70|            EVAL_ON_ERROR;                                                               \
  |  |  175|     70|        }                                                                                \
  |  |  176|  3.10k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 3.03k]
  |  |  ------------------
  ------------------
 1231|  3.10k|             return UA_STATUSCODE_BADDECODINGERROR);
 1232|       |
 1233|       |    /* Decode the type NodeId of the first member */
 1234|  3.03k|    UA_NodeId binTypeId;
 1235|  3.03k|    UA_NodeId_init(&binTypeId);
 1236|  3.03k|    ret |= DECODE_DIRECT(&binTypeId, NodeId);
  ------------------
  |  |   81|  3.03k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
 1237|  3.03k|    UA_CHECK_STATUS(ret, return ret);
  ------------------
  |  |  179|  3.03k|    UA_CHECK(isGood(STATUSCODE), EVAL_ON_ERROR)
  |  |  ------------------
  |  |  |  |  172|  3.03k|    do {                                                                                 \
  |  |  |  |  173|  3.03k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  579|  3.03k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (579:25): [True: 2, False: 3.03k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  174|      2|            EVAL_ON_ERROR;                                                               \
  |  |  |  |  175|      2|        }                                                                                \
  |  |  |  |  176|  3.03k|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (176:13): [Folded, False: 3.03k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1238|       |
 1239|       |    /* Lookup the data type */
 1240|  3.03k|    const UA_DataType *contentType = UA_findDataTypeByBinaryInternal(ctx, &binTypeId);
 1241|  3.03k|    ctxClearNodeId(ctx, &binTypeId);
 1242|  3.03k|    if(!contentType) {
  ------------------
  |  Branch (1242:8): [True: 1.67k, False: 1.36k]
  ------------------
 1243|       |        /* DataType unknown, decode as ExtensionObject array */
 1244|  1.67k|        ctx->pos = orig_pos;
 1245|  1.67k|        return Array_decodeBinary(ctx, dst, out_length, *type);
 1246|  1.67k|    }
 1247|       |
 1248|       |    /* Check that the encoding is binary */
 1249|  1.36k|    u8 encoding = 0;
 1250|  1.36k|    ret |= DECODE_DIRECT(&encoding, Byte);
  ------------------
  |  |   81|  1.36k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
 1251|  1.36k|    UA_CHECK_STATUS(ret, return ret);
  ------------------
  |  |  179|  1.36k|    UA_CHECK(isGood(STATUSCODE), EVAL_ON_ERROR)
  |  |  ------------------
  |  |  |  |  172|  1.36k|    do {                                                                                 \
  |  |  |  |  173|  1.36k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  579|  1.36k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (579:25): [True: 1, False: 1.36k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  174|      1|            EVAL_ON_ERROR;                                                               \
  |  |  |  |  175|      1|        }                                                                                \
  |  |  |  |  176|  1.36k|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (176:13): [Folded, False: 1.36k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1252|  1.36k|    if(encoding != UA_EXTENSIONOBJECT_ENCODED_BYTESTRING) {
  ------------------
  |  Branch (1252:8): [True: 205, False: 1.15k]
  ------------------
 1253|       |        /* Encoding format is not automatically decoded, decode as
 1254|       |         * ExtensionObject array */
 1255|    205|        ctx->pos = orig_pos;
 1256|    205|        return Array_decodeBinary(ctx, dst, out_length, *type);
 1257|    205|    }
 1258|       |
 1259|       |    /* The decoded representation must fit into size_t. */
 1260|  1.15k|    UA_CHECK(length <= SIZE_MAX / contentType->memSize,
  ------------------
  |  |  172|  1.15k|    do {                                                                                 \
  |  |  173|  1.15k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  579|  1.15k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (579:25): [True: 0, False: 1.15k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  175|      0|        }                                                                                \
  |  |  176|  1.15k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 1.15k]
  |  |  ------------------
  ------------------
 1261|  1.15k|             return UA_STATUSCODE_BADDECODINGERROR);
 1262|       |
 1263|       |    /* Compare the header of all array members if the array can be unwrapped */
 1264|  1.15k|    UA_ByteString header = {(uintptr_t)ctx->pos - (uintptr_t)orig_pos - 4, &orig_pos[4]};
 1265|  1.15k|    UA_ByteString compare_header = header;
 1266|  1.15k|    ctx->pos = &orig_pos[4];
 1267|       |
 1268|  3.43k|    for(size_t i = 0; i < length; i++) {
  ------------------
  |  Branch (1268:23): [True: 3.06k, False: 370]
  ------------------
 1269|  3.06k|        compare_header.data = ctx->pos;
 1270|  3.06k|        UA_CHECK(compare_header.data + compare_header.length <= ctx->end,
  ------------------
  |  |  172|  3.06k|    do {                                                                                 \
  |  |  173|  3.06k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  579|  3.06k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (579:25): [True: 13, False: 3.05k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|     13|            EVAL_ON_ERROR;                                                               \
  |  |  175|     13|        }                                                                                \
  |  |  176|  3.06k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 3.05k]
  |  |  ------------------
  ------------------
 1271|  3.06k|                 return UA_STATUSCODE_BADENCODINGLIMITSEXCEEDED);
 1272|  3.05k|        if(!UA_ByteString_equal(&header, &compare_header)) {
  ------------------
  |  Branch (1272:12): [True: 733, False: 2.32k]
  ------------------
 1273|       |            /* Different member types, decode as ExtensionObject array */
 1274|    733|            ctx->pos = orig_pos;
 1275|    733|            return Array_decodeBinary(ctx, dst, out_length, *type);
 1276|    733|        }
 1277|       |
 1278|       |        /* Decode the length field and jump to the next element */
 1279|  2.32k|        ctx->pos += header.length;
 1280|  2.32k|        u32 member_length = 0;
 1281|  2.32k|        ret = DECODE_DIRECT(&member_length, UInt32);
  ------------------
  |  |   81|  2.32k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
 1282|  2.32k|        UA_CHECK_STATUS(ret, return ret);
  ------------------
  |  |  179|  2.32k|    UA_CHECK(isGood(STATUSCODE), EVAL_ON_ERROR)
  |  |  ------------------
  |  |  |  |  172|  2.32k|    do {                                                                                 \
  |  |  |  |  173|  2.32k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  579|  2.32k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (579:25): [True: 7, False: 2.31k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  174|      7|            EVAL_ON_ERROR;                                                               \
  |  |  |  |  175|      7|        }                                                                                \
  |  |  |  |  176|  2.32k|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (176:13): [Folded, False: 2.31k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1283|  2.31k|        UA_CHECK(member_length <= (size_t)(ctx->end - ctx->pos),
  ------------------
  |  |  172|  2.31k|    do {                                                                                 \
  |  |  173|  2.31k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  579|  2.31k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (579:25): [True: 32, False: 2.28k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|     32|            EVAL_ON_ERROR;                                                               \
  |  |  175|     32|        }                                                                                \
  |  |  176|  2.31k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 2.28k]
  |  |  ------------------
  ------------------
 1284|  2.31k|                 return UA_STATUSCODE_BADDECODINGERROR);
 1285|  2.28k|        ctx->pos += member_length;
 1286|  2.28k|    }
 1287|       |
 1288|       |    /* Allocate memory for the unwrapped members */
 1289|    370|    *dst = ctxCalloc(ctx, length, contentType->memSize);
 1290|    370|    UA_CHECK_MEM(*dst, return UA_STATUSCODE_BADOUTOFMEMORY);
  ------------------
  |  |  182|    370|    UA_CHECK(isNonNull(STATUSCODE), EVAL_ON_ERROR)
  |  |  ------------------
  |  |  |  |  172|    370|    do {                                                                                 \
  |  |  |  |  173|    370|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  579|    370|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (579:25): [True: 0, False: 370]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  |  |  175|      0|        }                                                                                \
  |  |  |  |  176|    370|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (176:13): [Folded, False: 370]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1291|    370|    *out_length = length;
 1292|    370|    *type = contentType;
 1293|       |
 1294|       |    /* Decode unwrapped members */
 1295|    370|    uintptr_t array_pos = (uintptr_t)*dst;
 1296|    370|    ctx->pos = &orig_pos[4];
 1297|    953|    for(size_t i = 0; i < length && ret == UA_STATUSCODE_GOOD; i++) {
  ------------------
  |  |   17|    623|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1297:23): [True: 623, False: 330]
  |  Branch (1297:37): [True: 586, False: 37]
  ------------------
 1298|    586|        ctx->pos += header.length; /* Jump over the header */
 1299|       |        /* Read the per-element length and validate that the inner decoder
 1300|       |         * consumes exactly that many bytes, closing a decoder-vs-IDS
 1301|       |         * split-view channel. */
 1302|    586|        u32 member_length = 0;
 1303|    586|        ret = DECODE_DIRECT(&member_length, UInt32);
  ------------------
  |  |   81|    586|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
 1304|    586|        UA_CHECK_STATUS(ret, return ret);
  ------------------
  |  |  179|    586|    UA_CHECK(isGood(STATUSCODE), EVAL_ON_ERROR)
  |  |  ------------------
  |  |  |  |  172|    586|    do {                                                                                 \
  |  |  |  |  173|    586|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  579|    586|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (579:25): [True: 0, False: 586]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  |  |  175|      0|        }                                                                                \
  |  |  |  |  176|    586|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (176:13): [Folded, False: 586]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1305|    586|        UA_CHECK(member_length <= (size_t)(ctx->end - ctx->pos),
  ------------------
  |  |  172|    586|    do {                                                                                 \
  |  |  173|    586|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  579|    586|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (579:25): [True: 0, False: 586]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  175|      0|        }                                                                                \
  |  |  176|    586|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 586]
  |  |  ------------------
  ------------------
 1306|    586|                 return UA_STATUSCODE_BADDECODINGERROR);
 1307|    586|        const u8 *expected_end = ctx->pos + member_length;
 1308|    586|        ret = decodeBinaryJumpTable[contentType->typeKind]
 1309|    586|            (ctx, (void*)array_pos, contentType);
 1310|    586|        if(ret == UA_STATUSCODE_GOOD && ctx->pos != expected_end)
  ------------------
  |  |   17|  1.17k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1310:12): [True: 438, False: 148]
  |  Branch (1310:41): [True: 3, False: 435]
  ------------------
 1311|      3|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      3|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1312|    583|        array_pos += contentType->memSize;
 1313|    583|    }
 1314|    367|    return ret;
 1315|    370|}
ua_types_encoding_binary.c:DiagnosticInfo_decodeBinary:
 1531|   549k|FUNC_DECODE_BINARY(DiagnosticInfo) {
 1532|   549k|    UA_DiagnosticInfo *dst = (UA_DiagnosticInfo*)_dst;
 1533|       |
 1534|       |    /* Decode the encoding mask */
 1535|   549k|    u8 encodingMask;
 1536|   549k|    status ret = DECODE_DIRECT(&encodingMask, Byte);
  ------------------
  |  |   81|   549k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
 1537|   549k|    UA_CHECK_STATUS(ret, return ret);
  ------------------
  |  |  179|   549k|    UA_CHECK(isGood(STATUSCODE), EVAL_ON_ERROR)
  |  |  ------------------
  |  |  |  |  172|   549k|    do {                                                                                 \
  |  |  |  |  173|   549k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  579|   549k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (579:25): [True: 61, False: 549k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  174|     61|            EVAL_ON_ERROR;                                                               \
  |  |  |  |  175|     61|        }                                                                                \
  |  |  |  |  176|   549k|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (176:13): [Folded, False: 549k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1538|       |
 1539|       |    /* Decode the content */
 1540|   549k|    if(encodingMask & 0x01u) {
  ------------------
  |  Branch (1540:8): [True: 319, False: 549k]
  ------------------
 1541|    319|        dst->hasSymbolicId = true;
 1542|    319|        ret |= DECODE_DIRECT(&dst->symbolicId, UInt32); /* Int32 */
  ------------------
  |  |   81|    319|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
 1543|    319|    }
 1544|   549k|    if(encodingMask & 0x02u) {
  ------------------
  |  Branch (1544:8): [True: 330, False: 549k]
  ------------------
 1545|    330|        dst->hasNamespaceUri = true;
 1546|    330|        ret |= DECODE_DIRECT(&dst->namespaceUri, UInt32); /* Int32 */
  ------------------
  |  |   81|    330|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
 1547|    330|    }
 1548|   549k|    if(encodingMask & 0x08u) {
  ------------------
  |  Branch (1548:8): [True: 373, False: 549k]
  ------------------
 1549|    373|        dst->hasLocale = true;
 1550|    373|        ret |= DECODE_DIRECT(&dst->locale, UInt32); /* Int32 */
  ------------------
  |  |   81|    373|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
 1551|    373|    }
 1552|   549k|    if(encodingMask & 0x04u) {
  ------------------
  |  Branch (1552:8): [True: 369, False: 549k]
  ------------------
 1553|    369|        dst->hasLocalizedText = true;
 1554|    369|        ret |= DECODE_DIRECT(&dst->localizedText, UInt32); /* Int32 */
  ------------------
  |  |   81|    369|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
 1555|    369|    }
 1556|   549k|    if(encodingMask & 0x10u) {
  ------------------
  |  Branch (1556:8): [True: 579, False: 549k]
  ------------------
 1557|    579|        dst->hasAdditionalInfo = true;
 1558|    579|        ret |= DECODE_DIRECT(&dst->additionalInfo, String);
  ------------------
  |  |   81|    579|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
 1559|    579|    }
 1560|   549k|    if(encodingMask & 0x20u) {
  ------------------
  |  Branch (1560:8): [True: 307, False: 549k]
  ------------------
 1561|    307|        dst->hasInnerStatusCode = true;
 1562|    307|        ret |= DECODE_DIRECT(&dst->innerStatusCode, UInt32); /* StatusCode */
  ------------------
  |  |   81|    307|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
 1563|    307|    }
 1564|   549k|    if(encodingMask & 0x40u) {
  ------------------
  |  Branch (1564:8): [True: 2.35k, False: 547k]
  ------------------
 1565|       |        /* innerDiagnosticInfo is allocated on the heap */
 1566|  2.35k|        dst->innerDiagnosticInfo = (UA_DiagnosticInfo*)
 1567|  2.35k|            ctxCalloc(ctx, 1, sizeof(UA_DiagnosticInfo));
 1568|  2.35k|        UA_CHECK_MEM(dst->innerDiagnosticInfo, return UA_STATUSCODE_BADOUTOFMEMORY);
  ------------------
  |  |  182|  2.35k|    UA_CHECK(isNonNull(STATUSCODE), EVAL_ON_ERROR)
  |  |  ------------------
  |  |  |  |  172|  2.35k|    do {                                                                                 \
  |  |  |  |  173|  2.35k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  579|  2.35k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (579:25): [True: 0, False: 2.35k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  174|      0|            EVAL_ON_ERROR;                                                               \
  |  |  |  |  175|      0|        }                                                                                \
  |  |  |  |  176|  2.35k|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (176:13): [Folded, False: 2.35k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1569|  2.35k|        dst->hasInnerDiagnosticInfo = true;
 1570|       |
 1571|       |        /* Check the recursion limit */
 1572|  2.35k|        UA_CHECK(ctx->depth <= UA_ENCODING_MAX_RECURSION,
  ------------------
  |  |  172|  2.35k|    do {                                                                                 \
  |  |  173|  2.35k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  579|  2.35k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (579:25): [True: 2, False: 2.35k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      2|            EVAL_ON_ERROR;                                                               \
  |  |  175|      2|        }                                                                                \
  |  |  176|  2.35k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 2.35k]
  |  |  ------------------
  ------------------
 1573|  2.35k|                 return UA_STATUSCODE_BADENCODINGERROR);
 1574|       |
 1575|  2.35k|        ctx->depth++;
 1576|  2.35k|        ret |= DECODE_DIRECT(dst->innerDiagnosticInfo, DiagnosticInfo);
  ------------------
  |  |   81|  2.35k|#define DECODE_DIRECT(DST, TYPE) TYPE##_decodeBinary(ctx, (DST), NULL)
  ------------------
 1577|  2.35k|        ctx->depth--;
 1578|  2.35k|    }
 1579|   549k|    return ret;
 1580|   549k|}
ua_types_encoding_binary.c:decodeBinaryStructure:
 1847|  4.51k|                      const UA_DataType *type) {
 1848|       |    /* Check the recursion limit */
 1849|  4.51k|    UA_CHECK(ctx->depth <= UA_ENCODING_MAX_RECURSION,
  ------------------
  |  |  172|  4.51k|    do {                                                                                 \
  |  |  173|  4.51k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  ------------------
  |  |  |  |  579|  4.51k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (579:25): [True: 5, False: 4.51k]
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  174|      5|            EVAL_ON_ERROR;                                                               \
  |  |  175|      5|        }                                                                                \
  |  |  176|  4.51k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (176:13): [Folded, False: 4.51k]
  |  |  ------------------
  ------------------
 1850|  4.51k|             return UA_STATUSCODE_BADENCODINGERROR);
 1851|  4.51k|    ctx->depth++;
 1852|       |
 1853|  4.51k|    uintptr_t ptr = (uintptr_t)dst;
 1854|  4.51k|    status ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  4.51k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1855|  4.51k|    size_t membersSize = type->membersSize;
 1856|       |
 1857|       |    /* Loop over members */
 1858|  15.3k|    for(size_t i = 0; i < membersSize && ret == UA_STATUSCODE_GOOD; ++i) {
  ------------------
  |  |   17|  11.0k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1858:23): [True: 11.0k, False: 4.26k]
  |  Branch (1858:42): [True: 10.8k, False: 245]
  ------------------
 1859|  10.8k|        const UA_DataTypeMember *m = &type->members[i];
 1860|  10.8k|        const UA_DataType *mt = m->memberType;
 1861|  10.8k|        ptr += m->padding;
 1862|       |
 1863|       |        /* Array */
 1864|  10.8k|        if(m->isArray) {
  ------------------
  |  Branch (1864:12): [True: 2.30k, False: 8.54k]
  ------------------
 1865|  2.30k|            size_t *length = (size_t*)ptr;
 1866|  2.30k|            ptr += sizeof(size_t);
 1867|  2.30k|            ret = Array_decodeBinary(ctx, (void *UA_RESTRICT *UA_RESTRICT)ptr, length, mt);
 1868|  2.30k|            ptr += sizeof(void*);
 1869|  2.30k|            continue;
 1870|  2.30k|        }
 1871|       |
 1872|       |        /* Scalar */
 1873|  8.54k|        ret = decodeBinaryJumpTable[mt->typeKind](ctx, (void *UA_RESTRICT)ptr, mt);
 1874|  8.54k|        ptr += mt->memSize;
 1875|  8.54k|    }
 1876|       |
 1877|  4.51k|    ctx->depth--;
 1878|  4.51k|    return ret;
 1879|  4.51k|}

UA_KeyValueMap_clear:
  550|  5.03k|UA_KeyValueMap_clear(UA_KeyValueMap *map) {
  551|  5.03k|    if(!map)
  ------------------
  |  Branch (551:8): [True: 0, False: 5.03k]
  ------------------
  552|      0|        return;
  553|  5.03k|    if(map->mapSize > 0) {
  ------------------
  |  Branch (553:8): [True: 0, False: 5.03k]
  ------------------
  554|      0|        UA_Array_delete(map->map, map->mapSize, &UA_TYPES[UA_TYPES_KEYVALUEPAIR]);
  ------------------
  |  | 1254|      0|#define UA_TYPES_KEYVALUEPAIR 35
  ------------------
  555|      0|    }
  556|       |    map->map = NULL;
  557|  5.03k|    map->mapSize = 0;
  558|  5.03k|}
UA_KeyValueMap_copy:
  603|  2.51k|UA_KeyValueMap_copy(const UA_KeyValueMap *src, UA_KeyValueMap *dst) {
  604|  2.51k|    if(!dst)
  ------------------
  |  Branch (604:8): [True: 0, False: 2.51k]
  ------------------
  605|      0|        return UA_STATUSCODE_BADINVALIDARGUMENT;
  ------------------
  |  |  731|      0|#define UA_STATUSCODE_BADINVALIDARGUMENT ((UA_StatusCode) 0x80AB0000)
  ------------------
  606|  2.51k|    if(!src) {
  ------------------
  |  Branch (606:8): [True: 0, False: 2.51k]
  ------------------
  607|      0|        dst->map = NULL;
  608|      0|        dst->mapSize = 0;
  609|      0|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  610|      0|    }
  611|  2.51k|    UA_StatusCode res = UA_Array_copy(src->map, src->mapSize, (void**)&dst->map,
  612|  2.51k|                                      &UA_TYPES[UA_TYPES_KEYVALUEPAIR]);
  ------------------
  |  | 1254|  2.51k|#define UA_TYPES_KEYVALUEPAIR 35
  ------------------
  613|  2.51k|    if(res == UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  2.51k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (613:8): [True: 2.51k, False: 0]
  ------------------
  614|  2.51k|        dst->mapSize = src->mapSize;
  615|  2.51k|    return res;
  616|  2.51k|}

ua_types_encoding_binary.c:isTrue:
  167|  3.73M|isTrue(uint8_t expr) {
  168|  3.73M|    return expr;
  169|  3.73M|}
ua_types_encoding_binary.c:isGood:
  157|   858k|isGood(UA_StatusCode code) {
  158|   858k|    return code == UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|   858k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  159|   858k|}
ua_types_encoding_binary.c:isNonNull:
  162|  28.1k|isNonNull(const void *ptr) {
  163|       |    return ptr != NULL;
  164|  28.1k|}

LLVMFuzzerTestOneInput:
   10|  2.52k|extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
   11|  2.52k|    if(size < 10)
  ------------------
  |  Branch (11:8): [True: 6, False: 2.51k]
  ------------------
   12|      6|        return 0;
   13|       |
   14|  2.51k|    UA_ByteString msg = {size, (UA_Byte *) (void *) data};
   15|  2.51k|    UA_PubSubConnectionConfig config;
   16|  2.51k|    memset(&config, 0, sizeof(UA_PubSubConnectionConfig));
   17|       |
   18|       |    /* Decode some fields from the fuzzer input */
   19|  2.51k|    UA_decodeBinary(&msg, &config.name, &UA_TYPES[UA_TYPES_STRING], NULL);
  ------------------
  |  |  402|  2.51k|#define UA_TYPES_STRING 11
  ------------------
   20|  2.51k|    UA_decodeBinary(&msg, &config.address, &UA_TYPES[UA_TYPES_VARIANT], NULL);
  ------------------
  |  |  810|  2.51k|#define UA_TYPES_VARIANT 23
  ------------------
   21|       |
   22|  2.51k|    UA_PubSubConnectionConfig config2;
   23|  2.51k|    UA_StatusCode retval = UA_PubSubConnectionConfig_copy(&config, &config2);
   24|  2.51k|    if(retval == UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|  2.51k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (24:8): [True: 2.51k, False: 0]
  ------------------
   25|  2.51k|        UA_PubSubConnectionConfig_clear(&config2);
   26|  2.51k|    }
   27|  2.51k|    UA_PubSubConnectionConfig_clear(&config);
   28|       |
   29|  2.51k|    return 0;
   30|  2.52k|}

ua_types.c:UA_Variant_init:
  243|  18.0k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types.c:UA_String_init:
  243|  75.6k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_binary.c:UA_NodeId_init:
  243|  19.7k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_binary.c:UA_NodeId_copy:
  243|  3.49k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_binary.c:UA_ByteString_equal:
  243|  3.05k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_pubsub_connection.c:UA_Variant_init:
  243|  5.03k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_pubsub_connection.c:UA_String_copy:
  243|  5.03k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_pubsub_connection.c:UA_Variant_copy:
  243|  5.03k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_pubsub_connection.c:UA_String_clear:
  243|  10.0k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_pubsub_connection.c:UA_Variant_clear:
  243|  10.0k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl

