UA_unbase64:
   75|  8.96k|UA_unbase64(const unsigned char *src, size_t len, size_t *out_len) {
   76|       |    /* Empty base64 results in an empty byte-string */
   77|  8.96k|    if(len == 0) {
  ------------------
  |  Branch (77:8): [True: 941, False: 8.02k]
  ------------------
   78|    941|        *out_len = 0;
   79|    941|        return (unsigned char*)UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|    941|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
   80|    941|    }
   81|       |
   82|       |    /* Allocate the output string. Append four bytes to allow missing padding */
   83|  8.02k|    size_t olen = (len / 4 * 3) + 4;
   84|  8.02k|    unsigned char *out = (unsigned char*)UA_malloc(olen);
  ------------------
  |  |   18|  8.02k|#define UA_malloc(size) UA_mallocSingleton(size)
  ------------------
   85|  8.02k|    if(!out)
  ------------------
  |  Branch (85:8): [True: 2, False: 8.02k]
  ------------------
   86|      2|        return NULL;
   87|       |
   88|       |    /* Iterate over the input */
   89|  8.02k|    size_t pad = 0;
   90|  8.02k|    unsigned char count = 0;
   91|  8.02k|    unsigned char block[4];
   92|  8.02k|    unsigned char *pos = out;
   93|  44.0k|    for(size_t i = 0; i < len; i++) {
  ------------------
  |  Branch (93:23): [True: 36.1k, False: 7.97k]
  ------------------
   94|  36.1k|        if(src[i] & 0x80)
  ------------------
  |  Branch (94:12): [True: 23, False: 36.0k]
  ------------------
   95|     23|            goto error; /* Non-ASCII input */
   96|  36.0k|        unsigned char tmp = dtable[src[i]];
   97|  36.0k|        if(tmp == 0x80)
  ------------------
  |  Branch (97:12): [True: 21, False: 36.0k]
  ------------------
   98|     21|            goto error; /* Not an allowed character */
   99|  36.0k|        if(tmp == 0x7f)
  ------------------
  |  Branch (99:12): [True: 22.7k, False: 13.3k]
  ------------------
  100|  22.7k|            continue; /* Whitespace is ignored to accomodate RFC 2045, used in
  101|       |                       * XML for xs:base64Binary. */
  102|  13.3k|        block[count++] = tmp;
  103|       |
  104|       |        /* Padding */
  105|  13.3k|        if(src[i] == '=') {
  ------------------
  |  Branch (105:12): [True: 213, False: 13.1k]
  ------------------
  106|    213|            if(count < 3) /* Padding can only be the last two bytes of a block */
  ------------------
  |  Branch (106:16): [True: 6, False: 207]
  ------------------
  107|      6|                goto error;
  108|    207|            block[count-1] = 0;
  109|    207|            pad++;
  110|  13.1k|        } else if(pad > 0) {
  ------------------
  |  Branch (110:19): [True: 5, False: 13.1k]
  ------------------
  111|      5|            goto error; /* Padding not terminated correctly */
  112|      5|        }
  113|       |
  114|       |        /* Write three output characters for four characters of input */
  115|  13.3k|        if(count == 4) {
  ------------------
  |  Branch (115:12): [True: 3.30k, False: 10.0k]
  ------------------
  116|  3.30k|            if(pad > 2)
  ------------------
  |  Branch (116:16): [True: 0, False: 3.30k]
  ------------------
  117|      0|                goto error; /* Invalid padding */
  118|  3.30k|            *pos++ = (block[0] << 2) | (block[1] >> 4);
  119|  3.30k|            *pos++ = (block[1] << 4) | (block[2] >> 2);
  120|  3.30k|            *pos++ = (block[2] << 6) | block[3];
  121|  3.30k|            count = 0;
  122|  3.30k|            pos -= pad;
  123|  3.30k|            pad = 0;
  124|  3.30k|        }
  125|  13.3k|    }
  126|       |
  127|       |    /* Input length not a multiple of four */
  128|  7.97k|    if(count > 0)
  ------------------
  |  Branch (128:8): [True: 33, False: 7.93k]
  ------------------
  129|     33|        goto error;
  130|       |
  131|  7.93k|    *out_len = (size_t)(pos - out);
  132|  7.93k|    if(*out_len == 0) {
  ------------------
  |  Branch (132:8): [True: 7.62k, False: 316]
  ------------------
  133|  7.62k|        UA_free(out);
  ------------------
  |  |   19|  7.62k|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
  134|  7.62k|        return (unsigned char*)UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|  7.62k|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  135|  7.62k|    }
  136|    316|    return out;
  137|       |
  138|     88| error:
  139|     88|    UA_free(out);
  ------------------
  |  |   19|     88|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
  140|       |    return NULL;
  141|  7.93k|}

cj5_parse:
  306|  8.22k|          cj5_options *options) {
  307|  8.22k|    cj5_result r;
  308|  8.22k|    cj5__parser parser;
  309|  8.22k|    memset(&parser, 0x0, sizeof(parser));
  310|  8.22k|    parser.curr_tok_idx = 0;
  311|  8.22k|    parser.json5 = json5;
  312|  8.22k|    parser.len = len;
  313|  8.22k|    parser.tokens = tokens;
  314|  8.22k|    parser.max_tokens = max_tokens;
  315|       |
  316|  8.22k|    if(options)
  ------------------
  |  Branch (316:8): [True: 8.22k, False: 0]
  ------------------
  317|  8.22k|        parser.stop_early = options->stop_early;
  318|       |
  319|  8.22k|    unsigned short depth = 0; // Nesting depth zero means "outside the root object"
  320|  8.22k|    char nesting[CJ5_MAX_NESTING]; // Contains either '\0', '{' or '[' for the
  321|       |                                   // type of nesting at each depth. '\0'
  322|       |                                   // indicates we are out of the root object.
  323|  8.22k|    char next[CJ5_MAX_NESTING];    // Next content to parse: 'k' (key), ':', 'v'
  324|       |                                   // (value) or ',' (comma).
  325|  8.22k|    next[0] = 'v';  // The root is a "value" (object, array or primitive). If we
  326|       |                    // detect a colon after the first value then everything is
  327|       |                    // wrapped into a "virtual root object" and the parsing is
  328|       |                    // restarted.
  329|  8.22k|    nesting[0] = 0; // Becomes '{' if there is a virtual root object
  330|       |
  331|  8.22k|    cj5_token *token = NULL; // The current token
  332|       |
  333|  9.72k| start_parsing:
  334|  79.3M|    for(; parser.pos < len; parser.pos++) {
  ------------------
  |  Branch (334:11): [True: 79.3M, False: 7.77k]
  ------------------
  335|  79.3M|        char c = json5[parser.pos];
  336|  79.3M|        switch(c) {
  337|   535k|        case '\n': // Skip newline and whitespace
  ------------------
  |  Branch (337:9): [True: 535k, False: 78.8M]
  ------------------
  338|  1.64M|        case '\r':
  ------------------
  |  Branch (338:9): [True: 1.11M, False: 78.2M]
  ------------------
  339|  1.86M|        case '\t':
  ------------------
  |  Branch (339:9): [True: 214k, False: 79.1M]
  ------------------
  340|  2.06M|        case ' ':
  ------------------
  |  Branch (340:9): [True: 208k, False: 79.1M]
  ------------------
  341|  2.06M|            break;
  342|       |
  343|    506|        case '#': // Skip comment
  ------------------
  |  Branch (343:9): [True: 506, False: 79.3M]
  ------------------
  344|  4.32k|        case '/':
  ------------------
  |  Branch (344:9): [True: 3.82k, False: 79.3M]
  ------------------
  345|  4.32k|            cj5__skip_comment(&parser);
  346|  4.32k|            if(parser.error != CJ5_ERROR_NONE &&
  ------------------
  |  Branch (346:16): [True: 829, False: 3.49k]
  ------------------
  347|    829|               parser.error != CJ5_ERROR_OVERFLOW)
  ------------------
  |  Branch (347:16): [True: 160, False: 669]
  ------------------
  348|    160|                goto finish;
  349|  4.16k|            break;
  350|       |
  351|   188k|        case '{': // Open an object or array
  ------------------
  |  Branch (351:9): [True: 188k, False: 79.1M]
  ------------------
  352|   263k|        case '[':
  ------------------
  |  Branch (352:9): [True: 75.2k, False: 79.2M]
  ------------------
  353|       |            // Check the nesting depth
  354|   263k|            if(depth + 1 >= CJ5_MAX_NESTING) {
  ------------------
  |  |   53|   263k|#define CJ5_MAX_NESTING 256
  ------------------
  |  Branch (354:16): [True: 2, False: 263k]
  ------------------
  355|      2|                parser.error = CJ5_ERROR_INVALID;
  356|      2|                goto finish;
  357|      2|            }
  358|       |
  359|       |            // Correct next?
  360|   263k|            if(next[depth] != 'v') {
  ------------------
  |  Branch (360:16): [True: 35, False: 263k]
  ------------------
  361|     35|                parser.error = CJ5_ERROR_INVALID;
  362|     35|                goto finish;
  363|     35|            }
  364|       |
  365|   263k|            depth++; // Increase the nesting depth
  366|   263k|            nesting[depth] = c; // Set the nesting type
  367|   263k|            next[depth] = (c == '{') ? 'k' : 'v'; // next is either a key or a value
  ------------------
  |  Branch (367:27): [True: 188k, False: 75.2k]
  ------------------
  368|       |
  369|       |            // Create a token for the object or array
  370|   263k|            token = cj5__alloc_token(&parser);
  371|   263k|            if(token) {
  ------------------
  |  Branch (371:16): [True: 175k, False: 87.5k]
  ------------------
  372|   175k|                token->parent_id = parser.curr_tok_idx;
  373|   175k|                token->type = (c == '{') ? CJ5_TOKEN_OBJECT : CJ5_TOKEN_ARRAY;
  ------------------
  |  Branch (373:31): [True: 121k, False: 54.6k]
  ------------------
  374|   175k|                token->start = parser.pos;
  375|   175k|                token->size = 0;
  376|   175k|                parser.curr_tok_idx = parser.token_count - 1; // The new curr_tok_idx
  377|       |                                                              // is for this token
  378|   175k|            }
  379|   263k|            break;
  380|       |
  381|   186k|        case '}': // Close an object or array
  ------------------
  |  Branch (381:9): [True: 186k, False: 79.1M]
  ------------------
  382|   240k|        case ']':
  ------------------
  |  Branch (382:9): [True: 53.4k, False: 79.3M]
  ------------------
  383|       |            // Check the nesting depth. Note that a "virtual root object" at
  384|       |            // depth zero must not be closed.
  385|   240k|            if(depth == 0) {
  ------------------
  |  Branch (385:16): [True: 22, False: 239k]
  ------------------
  386|     22|                parser.error = CJ5_ERROR_INVALID;
  387|     22|                goto finish;
  388|     22|            }
  389|       |
  390|       |            // Check and adjust the nesting. Note that ']' - '[' == 2 and '}' -
  391|       |            // '{' == 2. Arrays can always be closed. Objects can only close
  392|       |            // when a key or a comma is expected.
  393|   239k|            if(c - nesting[depth] != 2 ||
  ------------------
  |  Branch (393:16): [True: 12, False: 239k]
  ------------------
  394|   239k|               (c == '}' && next[depth] != 'k' && next[depth] != ',')) {
  ------------------
  |  Branch (394:17): [True: 186k, False: 53.4k]
  |  Branch (394:29): [True: 153k, False: 32.9k]
  |  Branch (394:51): [True: 7, False: 153k]
  ------------------
  395|     19|                parser.error = CJ5_ERROR_INVALID;
  396|     19|                goto finish;
  397|     19|            }
  398|       |
  399|   239k|            if(token) {
  ------------------
  |  Branch (399:16): [True: 149k, False: 90.4k]
  ------------------
  400|       |                // Finalize the current token
  401|   149k|                token->end = parser.pos;
  402|       |
  403|       |                // Move to the parent and increase the parent size. Omit this
  404|       |                // when we leave the root (parent the same as the current
  405|       |                // token).
  406|   149k|                if(parser.curr_tok_idx != token->parent_id) {
  ------------------
  |  Branch (406:20): [True: 143k, False: 5.97k]
  ------------------
  407|   143k|                    parser.curr_tok_idx = token->parent_id;
  408|   143k|                    token = &tokens[token->parent_id];
  409|   143k|                    token->size++;
  410|   143k|                }
  411|   149k|            }
  412|       |
  413|       |            // Step one level up
  414|   239k|            depth--;
  415|   239k|            next[depth] = (depth == 0) ? 0 : ','; // zero if we step out the root
  ------------------
  |  Branch (415:27): [True: 6.38k, False: 233k]
  ------------------
  416|       |                                                  // object. then we do not look for
  417|       |                                                  // another element.
  418|       |
  419|       |            // The first element was successfully parsed. Stop early or try to
  420|       |            // parse the full input string?
  421|   239k|            if(depth == 0 && parser.stop_early)
  ------------------
  |  Branch (421:16): [True: 6.38k, False: 233k]
  |  Branch (421:30): [True: 0, False: 6.38k]
  ------------------
  422|      0|                goto finish;
  423|       |
  424|   239k|            break;
  425|       |
  426|  6.35M|        case ':': // Colon (between key and value)
  ------------------
  |  Branch (426:9): [True: 6.35M, False: 73.0M]
  ------------------
  427|  6.35M|            if(next[depth] != ':') {
  ------------------
  |  Branch (427:16): [True: 1.14k, False: 6.35M]
  ------------------
  428|  1.14k|                parser.error = CJ5_ERROR_INVALID;
  429|  1.14k|                goto finish;
  430|  1.14k|            }
  431|  6.35M|            next[depth] = 'v';
  432|  6.35M|            break;
  433|       |
  434|  32.0M|        case ',': // Comma
  ------------------
  |  Branch (434:9): [True: 32.0M, False: 47.3M]
  ------------------
  435|  32.0M|            if(next[depth] != ',') {
  ------------------
  |  Branch (435:16): [True: 29, False: 32.0M]
  ------------------
  436|     29|                parser.error = CJ5_ERROR_INVALID;
  437|     29|                goto finish;
  438|     29|            }
  439|  32.0M|            next[depth] = (nesting[depth] == '{') ? 'k' : 'v';
  ------------------
  |  Branch (439:27): [True: 6.20M, False: 25.8M]
  ------------------
  440|  32.0M|            break;
  441|       |
  442|  38.3M|        default: // Value or key
  ------------------
  |  Branch (442:9): [True: 38.3M, False: 40.9M]
  ------------------
  443|  38.3M|            if(next[depth] == 'v') {
  ------------------
  |  Branch (443:16): [True: 32.0M, False: 6.35M]
  ------------------
  444|  32.0M|                cj5__parse_primitive(&parser); // Parse primitive value
  445|  32.0M|                if(nesting[depth] != 0) {
  ------------------
  |  Branch (445:20): [True: 32.0M, False: 1.50k]
  ------------------
  446|       |                    // Parent is object or array
  447|  32.0M|                    if(token)
  ------------------
  |  Branch (447:24): [True: 30.5M, False: 1.48M]
  ------------------
  448|  30.5M|                        token->size++;
  449|  32.0M|                    next[depth] = ',';
  450|  32.0M|                } else {
  451|       |                    // The current value was the root element. Don't look for
  452|       |                    // any next element.
  453|  1.50k|                    next[depth] = 0;
  454|       |
  455|       |                    // The first element was successfully parsed. Stop early or try to
  456|       |                    // parse the full input string?
  457|  1.50k|                    if(parser.stop_early)
  ------------------
  |  Branch (457:24): [True: 0, False: 1.50k]
  ------------------
  458|      0|                        goto finish;
  459|  1.50k|                }
  460|  32.0M|            } else if(next[depth] == 'k') {
  ------------------
  |  Branch (460:23): [True: 6.35M, False: 243]
  ------------------
  461|  6.35M|                cj5__parse_key(&parser);
  462|  6.35M|                if(token)
  ------------------
  |  Branch (462:20): [True: 5.13M, False: 1.22M]
  ------------------
  463|  5.13M|                    token->size++; // Keys count towards the length
  464|  6.35M|                next[depth] = ':';
  465|  6.35M|            } else {
  466|    243|                parser.error = CJ5_ERROR_INVALID;
  467|    243|            }
  468|       |
  469|  38.3M|            if(parser.error && parser.error != CJ5_ERROR_OVERFLOW)
  ------------------
  |  Branch (469:16): [True: 20.0M, False: 18.3M]
  |  Branch (469:32): [True: 533, False: 20.0M]
  ------------------
  470|    533|                goto finish;
  471|       |
  472|  38.3M|            break;
  473|  79.3M|        }
  474|  79.3M|    }
  475|       |
  476|       |    // Are we back to the initial nesting depth?
  477|  7.77k|    if(depth != 0) {
  ------------------
  |  Branch (477:8): [True: 198, False: 7.57k]
  ------------------
  478|    198|        parser.error = CJ5_ERROR_INCOMPLETE;
  479|    198|        goto finish;
  480|    198|    }
  481|       |
  482|       |    // Close the virtual root object if there is one
  483|  7.57k|    if(nesting[0] == '{' && parser.error != CJ5_ERROR_OVERFLOW) {
  ------------------
  |  Branch (483:8): [True: 1.10k, False: 6.47k]
  |  Branch (483:29): [True: 1.07k, False: 26]
  ------------------
  484|       |        // Check the we end after a complete key-value pair (or dangling comma)
  485|  1.07k|        if(next[0] != 'k' && next[0] != ',')
  ------------------
  |  Branch (485:12): [True: 1.06k, False: 9]
  |  Branch (485:30): [True: 76, False: 989]
  ------------------
  486|     76|            parser.error = CJ5_ERROR_INVALID;
  487|  1.07k|        tokens[0].end = parser.pos - 1;
  488|  1.07k|    }
  489|       |
  490|  9.72k| finish:
  491|       |    // If parsing failed at the initial nesting depth, create a virtual root object
  492|       |    // and restart parsing.
  493|  9.72k|    if(parser.error != CJ5_ERROR_NONE &&
  ------------------
  |  Branch (493:8): [True: 2.76k, False: 6.96k]
  ------------------
  494|  2.76k|       parser.error != CJ5_ERROR_OVERFLOW &&
  ------------------
  |  Branch (494:8): [True: 2.22k, False: 541]
  ------------------
  495|  2.22k|       depth == 0 && nesting[0] != '{') {
  ------------------
  |  Branch (495:8): [True: 1.90k, False: 317]
  |  Branch (495:22): [True: 1.50k, False: 403]
  ------------------
  496|  1.50k|        parser.token_count = 0;
  497|  1.50k|        token = cj5__alloc_token(&parser);
  498|  1.50k|        if(token) {
  ------------------
  |  Branch (498:12): [True: 1.50k, False: 0]
  ------------------
  499|  1.50k|            token->parent_id = 0;
  500|  1.50k|            token->type = CJ5_TOKEN_OBJECT;
  501|  1.50k|            token->start = 0;
  502|  1.50k|            token->size = 0;
  503|       |
  504|  1.50k|            nesting[0] = '{';
  505|  1.50k|            next[0] = 'k';
  506|       |
  507|  1.50k|            parser.curr_tok_idx = 0;
  508|  1.50k|            parser.pos = 0;
  509|  1.50k|            parser.error = CJ5_ERROR_NONE;
  510|  1.50k|            goto start_parsing;
  511|  1.50k|        }
  512|  1.50k|    }
  513|       |
  514|  8.22k|    memset(&r, 0x0, sizeof(r));
  515|  8.22k|    r.error = parser.error;
  516|  8.22k|    r.error_pos = parser.pos;
  517|  8.22k|    r.num_tokens = parser.token_count; // How many tokens (would) have been
  518|       |                                       // consumed by the parser?
  519|       |
  520|       |    // Not a single token was parsed -> return an error
  521|  8.22k|    if(r.num_tokens == 0)
  ------------------
  |  Branch (521:8): [True: 28, False: 8.19k]
  ------------------
  522|     28|        r.error = CJ5_ERROR_INCOMPLETE;
  523|       |
  524|       |    // Set the tokens and original string only if successfully parsed
  525|  8.22k|    if(r.error == CJ5_ERROR_NONE) {
  ------------------
  |  Branch (525:8): [True: 6.93k, False: 1.28k]
  ------------------
  526|  6.93k|        r.tokens = tokens;
  527|  6.93k|        r.json5 = json5;
  528|  6.93k|    }
  529|       |
  530|  8.22k|    return r;
  531|  9.72k|}
cj5_get_str:
  629|  88.5k|            char *buf, unsigned int *buflen) {
  630|  88.5k|    const cj5_token *token = &r->tokens[tok_index];
  631|  88.5k|    if(token->type != CJ5_TOKEN_STRING) {
  ------------------
  |  Branch (631:8): [True: 0, False: 88.5k]
  ------------------
  632|      0|        buf[0] = 0;
  633|      0|        if(buflen)
  ------------------
  |  Branch (633:12): [True: 0, False: 0]
  ------------------
  634|      0|            *buflen = 0;
  635|      0|        return CJ5_ERROR_INVALID;
  636|      0|    }
  637|       |
  638|  88.5k|    const char *pos = &r->json5[token->start];
  639|  88.5k|    const char *end = &r->json5[token->end + 1];
  640|  88.5k|    unsigned int outpos = 0;
  641|  88.5k|    cj5_error_code error = CJ5_ERROR_NONE;
  642|  19.0M|    for(; pos < end; pos++) {
  ------------------
  |  Branch (642:11): [True: 18.9M, False: 88.3k]
  ------------------
  643|  18.9M|        uint8_t c = (uint8_t)*pos;
  644|       |        // Unprintable ascii characters must be escaped
  645|  18.9M|        if(c < ' ' || c == 127) {
  ------------------
  |  Branch (645:12): [True: 71, False: 18.9M]
  |  Branch (645:23): [True: 3, False: 18.9M]
  ------------------
  646|     74|            error = CJ5_ERROR_INVALID;
  647|     74|            goto done;
  648|     74|        }
  649|       |
  650|       |        // Unescaped Ascii character or utf8 byte
  651|  18.9M|        if(c != '\\') {
  ------------------
  |  Branch (651:12): [True: 18.9M, False: 11.7k]
  ------------------
  652|  18.9M|            buf[outpos++] = (char)c;
  653|  18.9M|            continue;
  654|  18.9M|        }
  655|       |
  656|       |        // End of input before the escaped character
  657|  11.7k|        if(pos + 1 >= end) {
  ------------------
  |  Branch (657:12): [True: 0, False: 11.7k]
  ------------------
  658|      0|            error = CJ5_ERROR_INCOMPLETE;
  659|      0|            goto done;
  660|      0|        }
  661|       |
  662|       |        // Process escaped character
  663|  11.7k|        pos++;
  664|  11.7k|        c = (uint8_t)*pos;
  665|  11.7k|        switch(c) {
  666|    237|        case 'b': buf[outpos++] = '\b'; break;
  ------------------
  |  Branch (666:9): [True: 237, False: 11.5k]
  ------------------
  667|    345|        case 'f': buf[outpos++] = '\f'; break;
  ------------------
  |  Branch (667:9): [True: 345, False: 11.4k]
  ------------------
  668|    194|        case 'r': buf[outpos++] = '\r'; break;
  ------------------
  |  Branch (668:9): [True: 194, False: 11.5k]
  ------------------
  669|    413|        case 'n': buf[outpos++] = '\n'; break;
  ------------------
  |  Branch (669:9): [True: 413, False: 11.3k]
  ------------------
  670|    845|        case 't': buf[outpos++] = '\t'; break;
  ------------------
  |  Branch (670:9): [True: 845, False: 10.9k]
  ------------------
  671|  6.35k|        default:  buf[outpos++] = (char)c; break;
  ------------------
  |  Branch (671:9): [True: 6.35k, False: 5.43k]
  ------------------
  672|  3.39k|        case 'u': {
  ------------------
  |  Branch (672:9): [True: 3.39k, False: 8.39k]
  ------------------
  673|       |            // Parse a unicode code point
  674|  3.39k|            if(pos + 4 >= end) {
  ------------------
  |  Branch (674:16): [True: 3, False: 3.39k]
  ------------------
  675|      3|                error = CJ5_ERROR_INCOMPLETE;
  676|      3|                goto done;
  677|      3|            }
  678|  3.39k|            pos++;
  679|  3.39k|            uint32_t utf;
  680|  3.39k|            error = parse_codepoint(pos, &utf);
  681|  3.39k|            if(error != CJ5_ERROR_NONE)
  ------------------
  |  Branch (681:16): [True: 18, False: 3.37k]
  ------------------
  682|     18|                goto done;
  683|  3.37k|            pos += 3;
  684|       |
  685|       |            // Parse a surrogate pair
  686|  3.37k|            if(0xd800 <= utf && utf <= 0xdfff) {
  ------------------
  |  Branch (686:16): [True: 1.65k, False: 1.72k]
  |  Branch (686:33): [True: 1.26k, False: 396]
  ------------------
  687|  1.26k|                if(pos + 6 >= end) {
  ------------------
  |  Branch (687:20): [True: 16, False: 1.24k]
  ------------------
  688|     16|                    error = CJ5_ERROR_INVALID;
  689|     16|                    goto done;
  690|     16|                }
  691|  1.24k|                if(pos[1] != '\\' && pos[2] != 'u') {
  ------------------
  |  Branch (691:20): [True: 503, False: 743]
  |  Branch (691:38): [True: 12, False: 491]
  ------------------
  692|     12|                    error = CJ5_ERROR_INVALID;
  693|     12|                    goto done;
  694|     12|                }
  695|  1.23k|                pos += 3;
  696|  1.23k|                uint32_t utf2;
  697|  1.23k|                error = parse_codepoint(pos, &utf2);
  698|  1.23k|                if(error != CJ5_ERROR_NONE)
  ------------------
  |  Branch (698:20): [True: 17, False: 1.21k]
  ------------------
  699|     17|                    goto done;
  700|  1.21k|                pos += 3;
  701|       |                // High or low surrogate pair
  702|  1.21k|                utf = (utf <= 0xdbff) ?
  ------------------
  |  Branch (702:23): [True: 843, False: 374]
  ------------------
  703|    843|                    (utf << 10) + utf2 + SURROGATE_OFFSET :
  704|  1.21k|                    (utf2 << 10) + utf + SURROGATE_OFFSET;
  705|  1.21k|            }
  706|       |
  707|       |            // Write the utf8 bytes of the code point
  708|  3.33k|            unsigned len = utf8_from_codepoint((unsigned char*)buf + outpos, utf);
  709|  3.33k|            if(len == 0) {
  ------------------
  |  Branch (709:16): [True: 43, False: 3.29k]
  ------------------
  710|     43|                error = CJ5_ERROR_INVALID; // Not a utf8 string
  711|     43|                goto done;
  712|     43|            }
  713|  3.29k|            outpos += len;
  714|  3.29k|            break;
  715|  3.33k|        }
  716|  11.7k|        }
  717|  11.7k|    }
  718|       |
  719|  88.5k| done:
  720|       |    // Always leave buf as a valid, NUL-terminated string, even when decoding
  721|       |    // fails midway. Callers still must check the returned error code.
  722|  88.5k|    buf[outpos] = 0;
  723|       |
  724|       |    // Set the output length
  725|  88.5k|    if(buflen)
  ------------------
  |  Branch (725:8): [True: 88.5k, False: 0]
  ------------------
  726|  88.5k|        *buflen = outpos;
  727|  88.5k|    return error;
  728|  88.5k|}
cj5.c:cj5__skip_comment:
  261|  4.32k|cj5__skip_comment(cj5__parser* parser) {
  262|  4.32k|    const char* json5 = parser->json5;
  263|       |
  264|       |    // Single-line comment
  265|  4.32k|    if(json5[parser->pos] == '#') {
  ------------------
  |  Branch (265:8): [True: 506, False: 3.82k]
  ------------------
  266|    814|    skip_line:
  267|  2.35M|        while(parser->pos < parser->len) {
  ------------------
  |  Branch (267:15): [True: 2.35M, False: 56]
  ------------------
  268|  2.35M|            if(json5[parser->pos] == '\n') {
  ------------------
  |  Branch (268:16): [True: 758, False: 2.35M]
  ------------------
  269|    758|                parser->pos--; // Reparse the newline in the main parse loop
  270|    758|                return;
  271|    758|            }
  272|  2.35M|            parser->pos++;
  273|  2.35M|        }
  274|     56|        return;
  275|    814|    }
  276|       |
  277|       |    // Comment begins with '/' but not enough space for another character
  278|  3.82k|    if(parser->pos + 1 >= parser->len) {
  ------------------
  |  Branch (278:8): [True: 27, False: 3.79k]
  ------------------
  279|     27|        parser->error = CJ5_ERROR_INVALID;
  280|     27|        return;
  281|     27|    }
  282|  3.79k|    parser->pos++;
  283|       |
  284|       |    // Comment begins with '//' -> single-line comment
  285|  3.79k|    if(json5[parser->pos] == '/')
  ------------------
  |  Branch (285:8): [True: 308, False: 3.48k]
  ------------------
  286|    308|        goto skip_line;
  287|       |
  288|       |    // Multi-line comments begin with '/*' and end with '*/'
  289|  3.48k|    if(json5[parser->pos] == '*') {
  ------------------
  |  Branch (289:8): [True: 3.45k, False: 35]
  ------------------
  290|  3.45k|        parser->pos++;
  291|  1.35M|        for(; parser->pos + 1 < parser->len; parser->pos++) {
  ------------------
  |  Branch (291:15): [True: 1.35M, False: 98]
  ------------------
  292|  1.35M|            if(json5[parser->pos] == '*' && json5[parser->pos + 1] == '/') {
  ------------------
  |  Branch (292:16): [True: 8.30k, False: 1.34M]
  |  Branch (292:45): [True: 3.35k, False: 4.94k]
  ------------------
  293|  3.35k|                parser->pos++;
  294|  3.35k|                return;
  295|  3.35k|            }
  296|  1.35M|        }
  297|  3.45k|    }
  298|       |
  299|       |    // Unknown comment type or the multi-line comment is not terminated
  300|    133|    parser->error = CJ5_ERROR_INCOMPLETE;
  301|    133|}
cj5.c:cj5__alloc_token:
   89|  38.6M|cj5__alloc_token(cj5__parser *parser) {
   90|  38.6M|    cj5_token* token = NULL;
   91|  38.6M|    if(parser->token_count < parser->max_tokens) {
  ------------------
  |  Branch (91:8): [True: 18.5M, False: 20.1M]
  ------------------
   92|  18.5M|        token = &parser->tokens[parser->token_count];
   93|  18.5M|        memset(token, 0x0, sizeof(cj5_token));
   94|  20.1M|    } else {
   95|  20.1M|        parser->error = CJ5_ERROR_OVERFLOW;
   96|  20.1M|    }
   97|       |
   98|       |    // Always increase the index. So we know eventually how many token would be
   99|       |    // required (if there are not enough).
  100|  38.6M|    parser->token_count++;
  101|  38.6M|    return token;
  102|  38.6M|}
cj5.c:cj5__parse_primitive:
  153|  32.0M|cj5__parse_primitive(cj5__parser* parser) {
  154|  32.0M|    const char* json5 = parser->json5;
  155|  32.0M|    unsigned int len = parser->len;
  156|  32.0M|    unsigned int start = parser->pos;
  157|       |
  158|       |    // String value
  159|  32.0M|    if(json5[start] == '\"' ||
  ------------------
  |  Branch (159:8): [True: 1.95M, False: 30.0M]
  ------------------
  160|  30.0M|       json5[start] == '\'') {
  ------------------
  |  Branch (160:8): [True: 821, False: 30.0M]
  ------------------
  161|  1.95M|        cj5__parse_string(parser);
  162|  1.95M|        return;
  163|  1.95M|    }
  164|       |
  165|       |    // Fast comparison of bool, and null.
  166|       |    // Make the comparison case-insensitive.
  167|  30.0M|    uint32_t fourcc = 0;
  168|  30.0M|    if(start + 3 < len) {
  ------------------
  |  Branch (168:8): [True: 30.0M, False: 669]
  ------------------
  169|  30.0M|        fourcc += (unsigned char)json5[start] | 32U;
  170|  30.0M|        fourcc += ((unsigned char)json5[start+1] | 32U) << 8;
  171|  30.0M|        fourcc += ((unsigned char)json5[start+2] | 32U) << 16;
  172|  30.0M|        fourcc += ((unsigned char)json5[start+3] | 32U) << 24;
  173|  30.0M|    }
  174|       |    
  175|  30.0M|    cj5_token_type type;
  176|  30.0M|    if(fourcc == CJ5__NULL_FOURCC) {
  ------------------
  |  Branch (176:8): [True: 10.2k, False: 30.0M]
  ------------------
  177|  10.2k|        type = CJ5_TOKEN_NULL;
  178|  10.2k|        parser->pos += 3;
  179|  30.0M|    } else if(fourcc == CJ5__TRUE_FOURCC) {
  ------------------
  |  Branch (179:15): [True: 387, False: 30.0M]
  ------------------
  180|    387|        type = CJ5_TOKEN_BOOL;
  181|    387|        parser->pos += 3;
  182|  30.0M|    } else if(fourcc == CJ5__FALSE_FOURCC) {
  ------------------
  |  Branch (182:15): [True: 597, False: 30.0M]
  ------------------
  183|       |        // "false" has five characters
  184|    597|        type = CJ5_TOKEN_BOOL;
  185|    597|        if(start + 4 >= len || (json5[start+4] | 32) != 'e') {
  ------------------
  |  Branch (185:12): [True: 1, False: 596]
  |  Branch (185:32): [True: 21, False: 575]
  ------------------
  186|     22|            parser->error = CJ5_ERROR_INVALID;
  187|     22|            return;
  188|     22|        }
  189|    575|        parser->pos += 4;
  190|  30.0M|    } else {
  191|       |        // Numbers are checked for basic compatibility.
  192|       |        // But they are fully parsed only in the cj5_get_XXX functions.
  193|  30.0M|        type = CJ5_TOKEN_NUMBER;
  194|  74.7M|        for(; parser->pos < len; parser->pos++) {
  ------------------
  |  Branch (194:15): [True: 74.7M, False: 1.06k]
  ------------------
  195|  74.7M|            if(!cj5__isnum(json5[parser->pos]) &&
  ------------------
  |  |   86|   149M|#define cj5__isnum(ch)       cj5__isrange(ch, '0', '9')
  ------------------
  |  Branch (195:16): [True: 38.7M, False: 35.9M]
  ------------------
  196|  38.7M|               !(json5[parser->pos] == '.') &&
  ------------------
  |  Branch (196:16): [True: 38.7M, False: 2.69k]
  ------------------
  197|  38.7M|               !cj5__islowerchar(json5[parser->pos]) && 
  ------------------
  |  |   85|   113M|#define cj5__islowerchar(ch) cj5__isrange(ch, 'a', 'z')
  ------------------
  |  Branch (197:16): [True: 34.8M, False: 3.83M]
  ------------------
  198|  34.8M|               !cj5__isupperchar(json5[parser->pos]) &&
  ------------------
  |  |   84|   109M|#define cj5__isupperchar(ch) cj5__isrange(ch, 'A', 'Z')
  ------------------
  |  Branch (198:16): [True: 30.6M, False: 4.26M]
  ------------------
  199|  30.6M|               !(json5[parser->pos] == '+') && !(json5[parser->pos] == '-')) {
  ------------------
  |  Branch (199:16): [True: 30.6M, False: 953]
  |  Branch (199:48): [True: 30.0M, False: 581k]
  ------------------
  200|  30.0M|                break;
  201|  30.0M|            }
  202|  74.7M|        }
  203|  30.0M|        parser->pos--; // Point to the last character that is still inside the
  204|       |                       // primitive value
  205|  30.0M|    }
  206|       |
  207|  30.0M|    cj5_token *token = cj5__alloc_token(parser);
  208|  30.0M|    if(token) {
  ------------------
  |  Branch (208:8): [True: 14.1M, False: 15.9M]
  ------------------
  209|  14.1M|        token->type = type;
  210|  14.1M|        token->start = start;
  211|  14.1M|        token->end = parser->pos;
  212|  14.1M|        token->size = parser->pos - start + 1;
  213|  14.1M|        token->parent_id = parser->curr_tok_idx;
  214|  14.1M|    }
  215|  30.0M|}
cj5.c:cj5__parse_string:
  105|  4.66M|cj5__parse_string(cj5__parser *parser) {
  106|  4.66M|    const char *json5 = parser->json5;
  107|  4.66M|    unsigned int len = parser->len;
  108|  4.66M|    unsigned int start = parser->pos;
  109|  4.66M|    char str_open = json5[start];
  110|       |
  111|  4.66M|    parser->pos++;
  112|  56.6M|    for(; parser->pos < len; parser->pos++) {
  ------------------
  |  Branch (112:11): [True: 56.6M, False: 144]
  ------------------
  113|  56.6M|        char c = json5[parser->pos];
  114|       |
  115|       |        // End of string
  116|  56.6M|        if(str_open == c) {
  ------------------
  |  Branch (116:12): [True: 4.66M, False: 52.0M]
  ------------------
  117|  4.66M|            cj5_token *token = cj5__alloc_token(parser);
  118|  4.66M|            if(token) {
  ------------------
  |  Branch (118:16): [True: 2.35M, False: 2.31M]
  ------------------
  119|  2.35M|                token->type = CJ5_TOKEN_STRING;
  120|  2.35M|                token->start = start + 1;
  121|  2.35M|                token->end = parser->pos - 1;
  122|  2.35M|                token->size = token->end - token->start + 1;
  123|  2.35M|                token->parent_id = parser->curr_tok_idx;
  124|  2.35M|            } 
  125|  4.66M|            return;
  126|  4.66M|        }
  127|       |
  128|       |        // Unescaped newlines are forbidden
  129|  52.0M|        if(c == '\n') {
  ------------------
  |  Branch (129:12): [True: 4, False: 52.0M]
  ------------------
  130|      4|            parser->error = CJ5_ERROR_INVALID;
  131|      4|            return;
  132|      4|        }
  133|       |
  134|       |        // Skip escape character
  135|  52.0M|        if(c == '\\') {
  ------------------
  |  Branch (135:12): [True: 431k, False: 51.5M]
  ------------------
  136|   431k|            if(parser->pos + 1 >= len) {
  ------------------
  |  Branch (136:16): [True: 3, False: 431k]
  ------------------
  137|      3|                parser->error = CJ5_ERROR_INCOMPLETE;
  138|      3|                return;
  139|      3|            }
  140|   431k|            parser->pos++;
  141|   431k|        }
  142|  52.0M|    }
  143|       |
  144|       |    // The file has ended before the string terminates
  145|    144|    parser->error = CJ5_ERROR_INCOMPLETE;
  146|    144|}
cj5.c:cj5__isrange:
   80|   178M|cj5__isrange(char ch, char from, char to) {
   81|   178M|    return (uint8_t)(ch - from) <= (uint8_t)(to - from);
   82|   178M|}
cj5.c:cj5__parse_key:
  218|  6.35M|cj5__parse_key(cj5__parser* parser) {
  219|  6.35M|    const char* json5 = parser->json5;
  220|  6.35M|    unsigned int start = parser->pos;
  221|  6.35M|    cj5_token* token;
  222|       |
  223|       |    // Key is a a normal string
  224|  6.35M|    if(json5[start] == '\"' || json5[start] == '\'') {
  ------------------
  |  Branch (224:8): [True: 2.70M, False: 3.65M]
  |  Branch (224:32): [True: 3.29k, False: 3.64M]
  ------------------
  225|  2.71M|        cj5__parse_string(parser);
  226|  2.71M|        return;
  227|  2.71M|    }
  228|       |
  229|       |    // An unquoted key. Must start with a-ZA-Z_$. Can contain numbers later on.
  230|  3.64M|    unsigned int len = parser->len;
  231|  13.3M|    for(; parser->pos < len; parser->pos++) {
  ------------------
  |  Branch (231:11): [True: 13.3M, False: 74]
  ------------------
  232|  13.3M|        if(cj5__islowerchar(json5[parser->pos]) ||
  ------------------
  |  |   85|  26.7M|#define cj5__islowerchar(ch) cj5__isrange(ch, 'a', 'z')
  |  |  ------------------
  |  |  |  Branch (85:30): [True: 2.87M, False: 10.5M]
  |  |  ------------------
  ------------------
  233|  10.5M|           cj5__isupperchar(json5[parser->pos]) ||
  ------------------
  |  |   84|  23.9M|#define cj5__isupperchar(ch) cj5__isrange(ch, 'A', 'Z')
  |  |  ------------------
  |  |  |  Branch (84:30): [True: 4.66M, False: 5.84M]
  |  |  ------------------
  ------------------
  234|  5.84M|           json5[parser->pos] == '_' || json5[parser->pos] == '$')
  ------------------
  |  Branch (234:12): [True: 1.45k, False: 5.84M]
  |  Branch (234:41): [True: 3.68k, False: 5.84M]
  ------------------
  235|  7.54M|            continue;
  236|  5.84M|        if(cj5__isnum(json5[parser->pos]) && parser->pos != start)
  ------------------
  |  |   86|  11.6M|#define cj5__isnum(ch)       cj5__isrange(ch, '0', '9')
  |  |  ------------------
  |  |  |  Branch (86:30): [True: 2.19M, False: 3.64M]
  |  |  ------------------
  ------------------
  |  Branch (236:46): [True: 2.19M, False: 9]
  ------------------
  237|  2.19M|            continue;
  238|  3.64M|        break;
  239|  5.84M|    }
  240|       |
  241|       |    // An empty key is not allowed
  242|  3.64M|    if(parser->pos <= start) {
  ------------------
  |  Branch (242:8): [True: 117, False: 3.64M]
  ------------------
  243|    117|        parser->error = CJ5_ERROR_INVALID;
  244|    117|        return;
  245|    117|    }
  246|       |
  247|       |    // Move pos to the last character within the unquoted key
  248|  3.64M|    parser->pos--;
  249|       |
  250|  3.64M|    token = cj5__alloc_token(parser);
  251|  3.64M|    if(token) {
  ------------------
  |  Branch (251:8): [True: 1.87M, False: 1.77M]
  ------------------
  252|  1.87M|        token->type = CJ5_TOKEN_STRING;
  253|  1.87M|        token->start = start;
  254|  1.87M|        token->end = parser->pos;
  255|  1.87M|        token->size = parser->pos - start + 1;
  256|  1.87M|        token->parent_id = parser->curr_tok_idx;
  257|  1.87M|    }
  258|  3.64M|}
cj5.c:parse_codepoint:
  608|  4.63k|parse_codepoint(const char *pos, uint32_t *out_utf) {
  609|  4.63k|    uint32_t utf = 0;
  610|  23.0k|    for(unsigned int i = 0; i < 4; i++) {
  ------------------
  |  Branch (610:29): [True: 18.4k, False: 4.59k]
  ------------------
  611|  18.4k|        char byte = pos[i];
  612|  18.4k|        if(cj5__isnum(byte)) {
  ------------------
  |  |   86|  18.4k|#define cj5__isnum(ch)       cj5__isrange(ch, '0', '9')
  |  |  ------------------
  |  |  |  Branch (86:30): [True: 6.00k, False: 12.4k]
  |  |  ------------------
  ------------------
  613|  6.00k|            byte = (char)(byte - '0');
  614|  12.4k|        } else if(cj5__isrange(byte, 'a', 'f')) {
  ------------------
  |  Branch (614:19): [True: 9.47k, False: 2.97k]
  ------------------
  615|  9.47k|            byte = (char)(byte - ('a' - 10));
  616|  9.47k|        } else if(cj5__isrange(byte, 'A', 'F')) {
  ------------------
  |  Branch (616:19): [True: 2.93k, False: 35]
  ------------------
  617|  2.93k|            byte = (char)(byte - ('A' - 10));
  618|  2.93k|        } else {
  619|     35|            return CJ5_ERROR_INVALID;
  620|     35|        }
  621|  18.4k|        utf = (utf << 4) | ((uint8_t)byte & 0xF);
  622|  18.4k|    }
  623|  4.59k|    *out_utf = utf;
  624|  4.59k|    return CJ5_ERROR_NONE;
  625|  4.63k|}

musl_tm_to_secs:
  149|     87|musl_tm_to_secs(const struct musl_tm *tm) {
  150|     87|    int is_leap;
  151|     87|    long long year = tm->tm_year;
  152|     87|    int month = tm->tm_mon;
  153|     87|    if (month >= 12 || month < 0) {
  ------------------
  |  Branch (153:9): [True: 0, False: 87]
  |  Branch (153:24): [True: 0, False: 87]
  ------------------
  154|      0|        int adj = month / 12;
  155|      0|        month %= 12;
  156|      0|        if (month < 0) {
  ------------------
  |  Branch (156:13): [True: 0, False: 0]
  ------------------
  157|      0|            adj--;
  158|      0|            month += 12;
  159|      0|        }
  160|      0|        year += adj;
  161|      0|    }
  162|     87|    long long t = musl_year_to_secs(year, &is_leap);
  163|     87|    t += musl_month_to_secs(month, is_leap);
  164|     87|    t += 86400LL * (tm->tm_mday-1);
  165|     87|    t += 3600LL * tm->tm_hour;
  166|     87|    t += 60LL * tm->tm_min;
  167|     87|    t += tm->tm_sec;
  168|     87|    return t;
  169|     87|}
libc_time.c:musl_year_to_secs:
  101|     87|musl_year_to_secs(const long long year, int *is_leap) {
  102|     87|    if (year-2ULL <= 136) {
  ------------------
  |  Branch (102:9): [True: 5, False: 82]
  ------------------
  103|      5|        int y = (int)year;
  104|      5|        int leaps = (y-68)>>2;
  105|      5|        if (!((y-68)&3)) {
  ------------------
  |  Branch (105:13): [True: 2, False: 3]
  ------------------
  106|      2|            leaps--;
  107|      2|            if (is_leap) *is_leap = 1;
  ------------------
  |  Branch (107:17): [True: 2, False: 0]
  ------------------
  108|      3|        } else if (is_leap) *is_leap = 0;
  ------------------
  |  Branch (108:20): [True: 3, False: 0]
  ------------------
  109|      5|        return 31536000*(y-70) + 86400*leaps;
  110|      5|    }
  111|       |
  112|     82|    int cycles, centuries, leaps, rem, dummy;
  113|       |
  114|     82|    if (!is_leap) is_leap = &dummy;
  ------------------
  |  Branch (114:9): [True: 0, False: 82]
  ------------------
  115|     82|    cycles = (int)((year-100) / 400);
  116|     82|    rem = (int)((year-100) % 400);
  117|     82|    if (rem < 0) {
  ------------------
  |  Branch (117:9): [True: 42, False: 40]
  ------------------
  118|     42|        cycles--;
  119|     42|        rem += 400;
  120|     42|    }
  121|     82|    if (!rem) {
  ------------------
  |  Branch (121:9): [True: 1, False: 81]
  ------------------
  122|      1|        *is_leap = 1;
  123|      1|        centuries = 0;
  124|      1|        leaps = 0;
  125|     81|    } else {
  126|     81|        if (rem >= 200) {
  ------------------
  |  Branch (126:13): [True: 42, False: 39]
  ------------------
  127|     42|            if (rem >= 300) centuries = 3, rem -= 300;
  ------------------
  |  Branch (127:17): [True: 21, False: 21]
  ------------------
  128|     21|            else centuries = 2, rem -= 200;
  129|     42|        } else {
  130|     39|            if (rem >= 100) centuries = 1, rem -= 100;
  ------------------
  |  Branch (130:17): [True: 14, False: 25]
  ------------------
  131|     25|            else centuries = 0;
  132|     39|        }
  133|     81|        if (!rem) {
  ------------------
  |  Branch (133:13): [True: 4, False: 77]
  ------------------
  134|      4|            *is_leap = 0;
  135|      4|            leaps = 0;
  136|     77|        } else {
  137|     77|            leaps = rem / 4;
  138|     77|            rem %= 4;
  139|     77|            *is_leap = !rem;
  140|     77|        }
  141|     81|    }
  142|       |
  143|     82|    leaps += 97*cycles + 24*centuries - *is_leap;
  144|       |
  145|     82|    return (year-100) * 31536000LL + leaps * 86400LL + 946684800 + 86400;
  146|     87|}
libc_time.c:musl_month_to_secs:
   93|     87|musl_month_to_secs(int month, int is_leap) {
   94|     87|    int t = secs_through_month[month];
   95|     87|    if (is_leap && month >= 2)
  ------------------
  |  Branch (95:9): [True: 21, False: 66]
  |  Branch (95:20): [True: 12, False: 9]
  ------------------
   96|     12|        t+=86400;
   97|     87|    return t;
   98|     87|}

parseUInt64:
   30|  4.22M|parseUInt64(const char *str, size_t size, uint64_t *result) {
   31|  4.22M|    size_t i = 0;
   32|  4.22M|    uint64_t n = 0, prev = 0;
   33|       |
   34|       |    /* Hex */
   35|  4.22M|    if(size > 2 && str[0] == '0' && (str[1] | 32) == 'x') {
  ------------------
  |  Branch (35:8): [True: 191k, False: 4.02M]
  |  Branch (35:20): [True: 179k, False: 12.2k]
  |  Branch (35:37): [True: 10.1k, False: 169k]
  ------------------
   36|  10.1k|        i = 2;
   37|   291k|        for(; i < size; i++) {
  ------------------
  |  Branch (37:15): [True: 282k, False: 9.48k]
  ------------------
   38|   282k|            uint8_t c = (uint8_t)str[i] | 32;
   39|   282k|            if(c >= '0' && c <= '9')
  ------------------
  |  Branch (39:16): [True: 281k, False: 200]
  |  Branch (39:28): [True: 263k, False: 18.9k]
  ------------------
   40|   263k|                c = (uint8_t)(c - '0');
   41|  19.1k|            else if(c >= 'a' && c <='f')
  ------------------
  |  Branch (41:21): [True: 18.9k, False: 206]
  |  Branch (41:33): [True: 18.4k, False: 469]
  ------------------
   42|  18.4k|                c = (uint8_t)(c - 'a' + 10);
   43|    675|            else if(c >= 'A' && c <='F')
  ------------------
  |  Branch (43:21): [True: 470, False: 205]
  |  Branch (43:33): [True: 0, False: 470]
  ------------------
   44|      0|                c = (uint8_t)(c - 'A' + 10);
   45|    675|            else
   46|    675|                break;
   47|   281k|            n = (n << 4) | (c & 0xF);
   48|   281k|            if(n < prev) /* Check for overflow */
  ------------------
  |  Branch (48:16): [True: 7, False: 281k]
  ------------------
   49|      7|                return 0;
   50|   281k|            prev = n;
   51|   281k|        }
   52|  10.1k|        *result = n;
   53|  10.1k|        return (i > 2) ? i : 0; /* 2 -> No digit was parsed */
  ------------------
  |  Branch (53:16): [True: 10.1k, False: 28]
  ------------------
   54|  10.1k|    }
   55|       |
   56|       |    /* Decimal */
   57|  13.1M|    for(; i < size; i++) {
  ------------------
  |  Branch (57:11): [True: 8.94M, False: 4.19M]
  ------------------
   58|  8.94M|        if(str[i] < '0' || str[i] > '9')
  ------------------
  |  Branch (58:12): [True: 10.6k, False: 8.93M]
  |  Branch (58:28): [True: 1.91k, False: 8.93M]
  ------------------
   59|  12.5k|            break;
   60|       |        /* Fast multiplication: n*10 == (n*8) + (n*2) */
   61|  8.93M|        n = (n << 3) + (n << 1) + (uint8_t)(str[i] - '0');
   62|  8.93M|        if(n < prev) /* Check for overflow */
  ------------------
  |  Branch (62:12): [True: 8, False: 8.93M]
  ------------------
   63|      8|            return 0;
   64|  8.93M|        prev = n;
   65|  8.93M|    }
   66|  4.21M|    *result = n;
   67|  4.21M|    return i;
   68|  4.21M|}
parseInt64:
   71|  1.07M|parseInt64(const char *str, size_t size, int64_t *result) {
   72|       |    /* Negative value? */
   73|  1.07M|    size_t i = 0;
   74|  1.07M|    bool neg = false;
   75|  1.07M|    if(*str == '-' || *str == '+') {
  ------------------
  |  Branch (75:8): [True: 1.30k, False: 1.07M]
  |  Branch (75:23): [True: 289, False: 1.07M]
  ------------------
   76|  1.59k|        neg = (*str == '-');
   77|  1.59k|        i++;
   78|  1.59k|    }
   79|       |
   80|       |    /* Parse as unsigned */
   81|  1.07M|    uint64_t n = 0;
   82|  1.07M|    size_t len = parseUInt64(&str[i], size - i, &n);
   83|  1.07M|    if(len == 0)
  ------------------
  |  Branch (83:8): [True: 123, False: 1.07M]
  ------------------
   84|    123|        return 0;
   85|       |
   86|       |    /* Check for overflow, adjust and return */
   87|  1.07M|    if(!neg) {
  ------------------
  |  Branch (87:8): [True: 1.07M, False: 1.29k]
  ------------------
   88|  1.07M|        if(n > 9223372036854775807UL)
  ------------------
  |  Branch (88:12): [True: 48, False: 1.07M]
  ------------------
   89|     48|            return 0;
   90|  1.07M|        *result = (int64_t)n;
   91|  1.07M|    } else {
   92|       |        /* n is unsigned, so 9223372036854775808UL == 2^63 fits without
   93|       |         * overflow. (int64_t)n would also fit for n in [0, 2^63], but
   94|       |         * the negation -(int64_t)(2^63) is undefined because the result
   95|       |         * (which is +2^63) cannot be represented. Use the unsigned
   96|       |         * representation and reinterpret as int64_t instead. */
   97|  1.29k|        if(n > 9223372036854775808UL)
  ------------------
  |  Branch (97:12): [True: 1, False: 1.29k]
  ------------------
   98|      1|            return 0;
   99|  1.29k|        *result = (n == 9223372036854775808UL)
  ------------------
  |  Branch (99:19): [True: 198, False: 1.09k]
  ------------------
  100|  1.29k|            ? (int64_t)(-9223372036854775807LL - 1)
  101|  1.29k|            : -(int64_t)n;
  102|  1.29k|    }
  103|  1.07M|    return len + i;
  104|  1.07M|}
parseDouble:
  106|   652k|size_t parseDouble(const char *str, size_t size, double *result) {
  107|   652k|    char buf[2000];
  108|   652k|    if(size >= 2000)
  ------------------
  |  Branch (108:8): [True: 1, False: 652k]
  ------------------
  109|      1|        return 0;
  110|   652k|    memcpy(buf, str, size);
  111|   652k|    buf[size] = 0;
  112|   652k|    errno = 0;
  113|   652k|    char *endptr;
  114|   652k|    *result = strtod(buf, &endptr);
  115|   652k|    if(errno != 0 && errno != ERANGE)
  ------------------
  |  Branch (115:8): [True: 201, False: 652k]
  |  Branch (115:22): [True: 0, False: 201]
  ------------------
  116|      0|        return 0;
  117|   652k|    return (uintptr_t)endptr - (uintptr_t)buf;
  118|   652k|}

cj5.c:utf8_from_codepoint:
   39|  3.33k|utf8_from_codepoint(unsigned char *str, unsigned codepoint) {
   40|  3.33k|    if(UTF_LIKELY(codepoint <= 0x7F)) { /* Plain ASCII */
  ------------------
  |  |   24|  3.33k|# define UTF_LIKELY(x) __builtin_expect((x), 1)
  |  |  ------------------
  |  |  |  Branch (24:24): [True: 314, False: 3.01k]
  |  |  ------------------
  ------------------
   41|    314|        str[0] = (unsigned char)codepoint;
   42|    314|        return 1;
   43|    314|    }
   44|  3.01k|    if(UTF_LIKELY(codepoint <= 0x07FF)) { /* 2-byte unicode */
  ------------------
  |  |   24|  3.01k|# define UTF_LIKELY(x) __builtin_expect((x), 1)
  |  |  ------------------
  |  |  |  Branch (24:24): [True: 619, False: 2.40k]
  |  |  ------------------
  ------------------
   45|    619|        str[0] = (unsigned char)(((codepoint >> 6) & 0x1F) | 0xC0);
   46|    619|        str[1] = (unsigned char)(((codepoint >> 0) & 0x3F) | 0x80);
   47|    619|        return 2;
   48|    619|    }
   49|  2.40k|    if(UTF_LIKELY(codepoint <= 0xFFFF)) { /* 3-byte unicode */
  ------------------
  |  |   24|  2.40k|# define UTF_LIKELY(x) __builtin_expect((x), 1)
  |  |  ------------------
  |  |  |  Branch (24:24): [True: 1.18k, False: 1.21k]
  |  |  ------------------
  ------------------
   50|  1.18k|        str[0] = (unsigned char)(((codepoint >> 12) & 0x0F) | 0xE0);
   51|  1.18k|        str[1] = (unsigned char)(((codepoint >>  6) & 0x3F) | 0x80);
   52|  1.18k|        str[2] = (unsigned char)(((codepoint >>  0) & 0x3F) | 0x80);
   53|  1.18k|        return 3;
   54|  1.18k|    }
   55|  1.21k|    if(UTF_LIKELY(codepoint <= 0x10FFFF)) { /* 4-byte unicode */
  ------------------
  |  |   24|  1.21k|# define UTF_LIKELY(x) __builtin_expect((x), 1)
  |  |  ------------------
  |  |  |  Branch (24:24): [True: 1.17k, False: 43]
  |  |  ------------------
  ------------------
   56|  1.17k|        str[0] = (unsigned char)(((codepoint >> 18) & 0x07) | 0xF0);
   57|  1.17k|        str[1] = (unsigned char)(((codepoint >> 12) & 0x3F) | 0x80);
   58|  1.17k|        str[2] = (unsigned char)(((codepoint >>  6) & 0x3F) | 0x80);
   59|  1.17k|        str[3] = (unsigned char)(((codepoint >>  0) & 0x3F) | 0x80);
   60|  1.17k|        return 4;
   61|  1.17k|    }
   62|     43|    return 0; /* Not a unicode codepoint */
   63|  1.21k|}

findEncodingMetaData:
  277|  5.08k|                     UA_UInt16 dsWriterId) {
  278|  5.08k|    if(!eo)
  ------------------
  |  Branch (278:8): [True: 0, False: 5.08k]
  ------------------
  279|      0|        return NULL;
  280|  5.08k|    for(size_t i = 0; i < eo->metaDataSize; i++) {
  ------------------
  |  Branch (280:23): [True: 0, False: 5.08k]
  ------------------
  281|      0|        if(eo->metaData[i].dataSetWriterId == dsWriterId)
  ------------------
  |  Branch (281:12): [True: 0, False: 0]
  ------------------
  282|      0|            return &eo->metaData[i];
  283|      0|    }
  284|  5.08k|    return NULL;
  285|  5.08k|}
UA_NetworkMessage_clear:
 1052|  6.93k|UA_NetworkMessage_clear(UA_NetworkMessage* p) {
 1053|  6.93k|    if(p->promotedFieldsEnabled) {
  ------------------
  |  Branch (1053:8): [True: 0, False: 6.93k]
  ------------------
 1054|      0|        UA_Array_delete(p->promotedFields, p->promotedFieldsSize,
 1055|      0|                        &UA_TYPES[UA_TYPES_VARIANT]);
  ------------------
  |  |  803|      0|#define UA_TYPES_VARIANT 23
  ------------------
 1056|      0|    }
 1057|       |
 1058|  6.93k|    if(p->networkMessageType == UA_NETWORKMESSAGE_DATASET) {
  ------------------
  |  Branch (1058:8): [True: 6.93k, False: 0]
  ------------------
 1059|  6.93k|        if(p->payload.dataSetMessages) {
  ------------------
  |  Branch (1059:12): [True: 6.42k, False: 510]
  ------------------
 1060|  12.9k|            for(size_t i = 0; i < p->messageCount; i++)
  ------------------
  |  Branch (1060:31): [True: 6.55k, False: 6.42k]
  ------------------
 1061|  6.55k|                UA_DataSetMessage_clear(&p->payload.dataSetMessages[i]);
 1062|  6.42k|            UA_free(p->payload.dataSetMessages);
  ------------------
  |  |   19|  6.42k|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1063|  6.42k|        }
 1064|  6.93k|    }
 1065|       |
 1066|  6.93k|    UA_ByteString_clear(&p->securityFooter);
 1067|  6.93k|    UA_String_clear(&p->messageId);
 1068|       |
 1069|  6.93k|    if(p->publisherIdEnabled &&
  ------------------
  |  Branch (1069:8): [True: 4, False: 6.92k]
  ------------------
 1070|      4|       p->publisherId.idType == UA_PUBLISHERIDTYPE_STRING)
  ------------------
  |  Branch (1070:8): [True: 1, False: 3]
  ------------------
 1071|      1|       UA_String_clear(&p->publisherId.id.string);
 1072|       |
 1073|  6.93k|    memset(p, 0, sizeof(UA_NetworkMessage));
 1074|  6.93k|}
UA_DataSetMessage_clear:
 1916|  6.55k|UA_DataSetMessage_clear(UA_DataSetMessage* p) {
 1917|  6.55k|    if(p->header.dataSetMessageType == UA_DATASETMESSAGE_DATAKEYFRAME) {
  ------------------
  |  Branch (1917:8): [True: 6.55k, False: 0]
  ------------------
 1918|  6.55k|        if(p->data.keyFrameFields)
  ------------------
  |  Branch (1918:12): [True: 5.08k, False: 1.47k]
  ------------------
 1919|  5.08k|            UA_Array_delete(p->data.keyFrameFields, p->fieldCount,
 1920|  5.08k|                            &UA_TYPES[UA_TYPES_DATAVALUE]);
  ------------------
  |  |  769|  5.08k|#define UA_TYPES_DATAVALUE 22
  ------------------
 1921|  6.55k|    } else if(p->header.dataSetMessageType == UA_DATASETMESSAGE_DATADELTAFRAME) {
  ------------------
  |  Branch (1921:15): [True: 0, False: 0]
  ------------------
 1922|      0|        if(p->data.deltaFrameFields) {
  ------------------
  |  Branch (1922:12): [True: 0, False: 0]
  ------------------
 1923|      0|            for(UA_UInt16 i = 0; i < p->fieldCount; i++)
  ------------------
  |  Branch (1923:34): [True: 0, False: 0]
  ------------------
 1924|      0|                UA_DataValue_clear(&p->data.deltaFrameFields[i].value);
 1925|      0|            UA_free(p->data.deltaFrameFields);
  ------------------
  |  |   19|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1926|      0|        }
 1927|      0|    }
 1928|       |
 1929|  6.55k|    memset(p, 0, sizeof(UA_DataSetMessage));
 1930|  6.55k|}

UA_NetworkMessage_decodeJson:
  543|  7.69k|                             const UA_DecodeJsonOptions *jo) {
  544|       |    /* Set up the context */
  545|  7.69k|    cj5_token tokens[UA_JSON_MAXTOKENCOUNT];
  546|  7.69k|    PubSubDecodeJsonCtx ctx;
  547|  7.69k|    memset(&ctx, 0, sizeof(PubSubDecodeJsonCtx));
  548|  7.69k|    ctx.ctx.tokens = tokens;
  549|  7.69k|    if(eo)
  ------------------
  |  Branch (549:8): [True: 0, False: 7.69k]
  ------------------
  550|      0|        ctx.eo = *eo;
  551|  7.69k|    if(jo) {
  ------------------
  |  Branch (551:8): [True: 0, False: 7.69k]
  ------------------
  552|      0|        ctx.ctx.namespaceMapping = jo->namespaceMapping;
  553|      0|        ctx.ctx.serverUrisSize = jo->serverUrisSize;
  554|      0|        ctx.ctx.serverUris = jo->serverUris;
  555|      0|        ctx.ctx.customTypes = jo->customTypes;
  556|      0|    }
  557|       |
  558|  7.69k|    status ret = tokenize(&ctx.ctx, src, UA_JSON_MAXTOKENCOUNT, NULL);
  ------------------
  |  |   21|  7.69k|#define UA_JSON_MAXTOKENCOUNT 256
  ------------------
  559|  7.69k|    if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  7.69k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (559:8): [True: 761, False: 6.93k]
  ------------------
  560|    761|        goto cleanup;
  561|       |
  562|  6.93k|    ret = NetworkMessage_decodeJsonInternal(&ctx, dst);
  563|  6.93k|    if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  6.93k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (563:8): [True: 6.92k, False: 8]
  ------------------
  564|  6.92k|        UA_NetworkMessage_clear(dst);
  565|       |
  566|  7.69k| cleanup:
  567|       |    /* Free token array on the heap */
  568|  7.69k|    if(ctx.ctx.tokens != tokens)
  ------------------
  |  Branch (568:8): [True: 541, False: 7.15k]
  ------------------
  569|    541|        UA_free((void*)(uintptr_t)ctx.ctx.tokens);
  ------------------
  |  |   19|    541|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
  570|  7.69k|    return ret;
  571|  6.93k|}
ua_pubsub_networkmessage_json.c:NetworkMessage_decodeJsonInternal:
  461|  6.93k|                                  UA_NetworkMessage *dst) {
  462|  6.93k|    memset(dst, 0, sizeof(UA_NetworkMessage));
  463|  6.93k|    dst->chunkMessage = false;
  464|  6.93k|    dst->groupHeaderEnabled = false;
  465|  6.93k|    dst->payloadHeaderEnabled = false;
  466|  6.93k|    dst->picosecondsEnabled = false;
  467|  6.93k|    dst->promotedFieldsEnabled = false;
  468|       |
  469|       |    /* The NetworkMessage must be a JSON object */
  470|  6.93k|    if(currentTokenType(&ctx->ctx) != CJ5_TOKEN_OBJECT)
  ------------------
  |  Branch (470:8): [True: 97, False: 6.83k]
  ------------------
  471|     97|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     97|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  472|       |
  473|       |    /* Is Messages an Array? How big? */
  474|  6.83k|    size_t searchResultMessages = 0;
  475|  6.83k|    status found = lookAheadForKey(&ctx->ctx, UA_DECODEKEY_MESSAGES, &searchResultMessages);
  476|  6.83k|    if(found != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  6.83k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (476:8): [True: 157, False: 6.67k]
  ------------------
  477|    157|        return UA_STATUSCODE_BADNOTIMPLEMENTED;
  ------------------
  |  |  239|    157|#define UA_STATUSCODE_BADNOTIMPLEMENTED ((UA_StatusCode) 0x80400000)
  ------------------
  478|  6.67k|    const cj5_token *bodyToken = &ctx->ctx.tokens[searchResultMessages];
  479|  6.67k|    size_t messageCount = 1;
  480|  6.67k|    if(bodyToken->type == CJ5_TOKEN_ARRAY)
  ------------------
  |  Branch (480:8): [True: 2.46k, False: 4.21k]
  ------------------
  481|  2.46k|        messageCount = (size_t)bodyToken->size;
  482|       |
  483|       |    /* Too many DataSetMessages */
  484|  6.67k|    if(messageCount > UA_NETWORKMESSAGE_MAXMESSAGECOUNT)
  ------------------
  |  |  136|  6.67k|#define UA_NETWORKMESSAGE_MAXMESSAGECOUNT 32
  ------------------
  |  Branch (484:8): [True: 15, False: 6.66k]
  ------------------
  485|     15|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     15|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  486|       |
  487|       |    /* MessageType */
  488|  6.66k|    UA_Boolean isUaData = true;
  489|  6.66k|    size_t searchResultMessageType = 0;
  490|  6.66k|    found = lookAheadForKey(&ctx->ctx, UA_DECODEKEY_MESSAGETYPE, &searchResultMessageType);
  491|  6.66k|    if(found != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  6.66k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (491:8): [True: 54, False: 6.60k]
  ------------------
  492|     54|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     54|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  493|  6.60k|    size_t size = getTokenLength(&ctx->ctx.tokens[searchResultMessageType]);
  494|  6.60k|    const char* msgType = &ctx->ctx.json5[ctx->ctx.tokens[searchResultMessageType].start];
  495|  6.60k|    if(size == 7) { //ua-data
  ------------------
  |  Branch (495:8): [True: 6.49k, False: 113]
  ------------------
  496|  6.49k|        if(strncmp(msgType, "ua-data", size) != 0)
  ------------------
  |  Branch (496:12): [True: 62, False: 6.43k]
  ------------------
  497|     62|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     62|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  498|  6.43k|        isUaData = true;
  499|  6.43k|    } else if(size == 11) { //ua-metadata
  ------------------
  |  Branch (499:15): [True: 86, False: 27]
  ------------------
  500|     86|        if(strncmp(msgType, "ua-metadata", size) != 0)
  ------------------
  |  Branch (500:12): [True: 85, False: 1]
  ------------------
  501|     85|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     85|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  502|      1|        isUaData = false;
  503|     27|    } else {
  504|     27|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     27|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  505|     27|    }
  506|       |
  507|       |    //TODO: MetaData
  508|  6.43k|    if(!isUaData)
  ------------------
  |  Branch (508:8): [True: 1, False: 6.43k]
  ------------------
  509|      1|        return UA_STATUSCODE_BADNOTIMPLEMENTED;
  ------------------
  |  |  239|      1|#define UA_STATUSCODE_BADNOTIMPLEMENTED ((UA_StatusCode) 0x80400000)
  ------------------
  510|       |
  511|  6.43k|    dst->payload.dataSetMessages = (UA_DataSetMessage*)
  512|  6.43k|        UA_calloc(messageCount, sizeof(UA_DataSetMessage));
  ------------------
  |  |   20|  6.43k|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
  513|  6.43k|    if(!dst->payload.dataSetMessages)
  ------------------
  |  Branch (513:8): [True: 12, False: 6.42k]
  ------------------
  514|     12|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|     12|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
  515|  6.42k|    dst->messageCount = (UA_Byte)messageCount;
  516|       |
  517|       |    /* Network Message */
  518|  6.42k|    UA_String messageType;
  519|  6.42k|    DecodeEntry entries[5] = {
  520|  6.42k|        {UA_DECODEKEY_MESSAGEID, &dst->messageId, NULL, false, &UA_TYPES[UA_TYPES_STRING]},
  ------------------
  |  |  395|  6.42k|#define UA_TYPES_STRING 11
  ------------------
  521|  6.42k|        {UA_DECODEKEY_MESSAGETYPE, &messageType, NULL, false, NULL},
  522|  6.42k|        {UA_DECODEKEY_PUBLISHERID, &dst->publisherId, decodePublisherIdJsonInternal, false, NULL},
  523|  6.42k|        {UA_DECODEKEY_DATASETCLASSID, &dst->dataSetClassId, NULL, false, &UA_TYPES[UA_TYPES_GUID]},
  ------------------
  |  |  463|  6.42k|#define UA_TYPES_GUID 13
  ------------------
  524|  6.42k|        {UA_DECODEKEY_MESSAGES, dst, DatasetMessage_Array_decodeJsonInternal, false, NULL}
  525|  6.42k|    };
  526|       |
  527|  6.42k|    status ret = decodeFields(&ctx->ctx, entries, 5);
  528|  6.42k|    if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  6.42k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (528:8): [True: 6.41k, False: 8]
  ------------------
  529|  6.41k|        return ret;
  530|       |
  531|      8|    dst->messageIdEnabled = entries[0].found;
  532|      8|    dst->publisherIdEnabled = entries[2].found;
  533|      8|    dst->dataSetClassIdEnabled = entries[3].found;
  534|      8|    dst->payloadHeaderEnabled = true;
  535|       |
  536|      8|    return ret;
  537|  6.42k|}
ua_pubsub_networkmessage_json.c:decodePublisherIdJsonInternal:
  444|    200|                              const UA_DataType *type) {
  445|    200|    UA_PublisherId *p = (UA_PublisherId*)dst;
  446|    200|    if(currentTokenType(ctx) == CJ5_TOKEN_NUMBER) {
  ------------------
  |  Branch (446:8): [True: 171, False: 29]
  ------------------
  447|       |        /* Store in biggest possible integer. The problem is that with a UInt64
  448|       |         * is that a string is expected for it in JSON. Therefore, the maximum
  449|       |         * value is set to UInt32. */
  450|    171|        p->idType = UA_PUBLISHERIDTYPE_UINT32;
  451|    171|        return decodeJsonJumpTable[UA_DATATYPEKIND_UINT32](ctx, &p->id.uint32, NULL);
  452|    171|    } else if(currentTokenType(ctx) == CJ5_TOKEN_STRING) {
  ------------------
  |  Branch (452:15): [True: 25, False: 4]
  ------------------
  453|     25|        p->idType = UA_PUBLISHERIDTYPE_STRING;
  454|     25|        return decodeJsonJumpTable[UA_DATATYPEKIND_STRING](ctx, &p->id.string, NULL);
  455|     25|    }
  456|      4|    return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      4|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  457|    200|}
ua_pubsub_networkmessage_json.c:DatasetMessage_Array_decodeJsonInternal:
  413|  6.05k|                                        const UA_DataType *_) {
  414|  6.05k|    PubSubDecodeJsonCtx *ctx = (PubSubDecodeJsonCtx*)ctx_;
  415|       |
  416|       |    /* Array or object */
  417|  6.05k|    size_t length = 1;
  418|  6.05k|    if(currentTokenType(&ctx->ctx) == CJ5_TOKEN_ARRAY) {
  ------------------
  |  Branch (418:8): [True: 2.42k, False: 3.62k]
  ------------------
  419|  2.42k|        length = (size_t)ctx->ctx.tokens[ctx->ctx.index].size;
  420|       |
  421|       |        /* Go to the first array member */
  422|  2.42k|        ctx->ctx.index++;
  423|       |
  424|       |        /* Return early for empty arrays */
  425|  2.42k|        if(length == 0)
  ------------------
  |  Branch (425:12): [True: 10, False: 2.41k]
  ------------------
  426|     10|            return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     10|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  427|  3.62k|    } else if(currentTokenType(&ctx->ctx) != CJ5_TOKEN_OBJECT) {
  ------------------
  |  Branch (427:15): [True: 288, False: 3.33k]
  ------------------
  428|    288|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    288|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  429|    288|    }
  430|       |
  431|       |    /* Decode array members */
  432|  5.75k|    UA_NetworkMessage *nm = (UA_NetworkMessage*)dst;
  433|  5.75k|    for(size_t i = 0; i < length; ++i) {
  ------------------
  |  Branch (433:23): [True: 5.75k, False: 1]
  ------------------
  434|  5.75k|        status ret = DatasetMessage_Payload_decodeJsonInternal(ctx, nm, i);
  435|  5.75k|        if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  5.75k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (435:12): [True: 5.75k, False: 1]
  ------------------
  436|  5.75k|            return ret;
  437|  5.75k|    }
  438|       |
  439|      1|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      1|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  440|  5.75k|}
ua_pubsub_networkmessage_json.c:DatasetMessage_Payload_decodeJsonInternal:
  372|  5.75k|                                          size_t dsmIndex) {
  373|  5.75k|    UA_DataSetMessage *dsm = &nm->payload.dataSetMessages[dsmIndex];
  374|  5.75k|    UA_ConfigurationVersionDataType cvd;
  375|  5.75k|    struct PayloadData pd;
  376|  5.75k|    pd.nm = nm;
  377|  5.75k|    pd.dsmIndex = dsmIndex;
  378|       |
  379|  5.75k|    DecodeEntry entries[7] = {
  380|  5.75k|        {UA_DECODEKEY_DATASETWRITERID, &nm->dataSetWriterIds[dsmIndex], NULL, false, &UA_TYPES[UA_TYPES_UINT16]},
  ------------------
  |  |  157|  5.75k|#define UA_TYPES_UINT16 4
  ------------------
  381|  5.75k|        {UA_DECODEKEY_SEQUENCENUMBER, &dsm->header.dataSetMessageSequenceNr, NULL, false, &UA_TYPES[UA_TYPES_UINT16]},
  ------------------
  |  |  157|  5.75k|#define UA_TYPES_UINT16 4
  ------------------
  382|  5.75k|        {UA_DECODEKEY_METADATAVERSION, &cvd, &MetaDataVersion_decodeJsonInternal, false, NULL},
  383|  5.75k|        {UA_DECODEKEY_TIMESTAMP, &dsm->header.timestamp, NULL, false, &UA_TYPES[UA_TYPES_DATETIME]},
  ------------------
  |  |  429|  5.75k|#define UA_TYPES_DATETIME 12
  ------------------
  384|  5.75k|        {UA_DECODEKEY_DSM_STATUS, &dsm->header.status, NULL, false, &UA_TYPES[UA_TYPES_UINT16]},
  ------------------
  |  |  157|  5.75k|#define UA_TYPES_UINT16 4
  ------------------
  385|  5.75k|        {UA_DECODEKEY_MESSAGETYPE, NULL, NULL, false, NULL},
  386|  5.75k|        {UA_DECODEKEY_PAYLOAD, &pd, DataSetPayload_decodeJsonInternal, false, NULL}
  387|  5.75k|    };
  388|  5.75k|    status ret = decodeFields(&ctx->ctx, entries, 7);
  389|       |
  390|       |    /* Error or no DatasetWriterId found or no payload found */
  391|  5.75k|    if(ret != UA_STATUSCODE_GOOD || !entries[0].found || !entries[6].found)
  ------------------
  |  |   17|  11.5k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (391:8): [True: 3.97k, False: 1.77k]
  |  Branch (391:37): [True: 1.77k, False: 5]
  |  Branch (391:58): [True: 4, False: 1]
  ------------------
  392|  5.75k|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|  5.75k|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  393|       |
  394|       |    /* TODO: Check FieldEncoding1 and FieldEncoding2 to determine the field encoding */
  395|      1|    dsm->header.fieldEncoding = UA_FIELDENCODING_DATAVALUE;
  396|      1|    dsm->header.dataSetMessageSequenceNrEnabled = entries[1].found;
  397|      1|    dsm->header.configVersionMajorVersion = cvd.majorVersion;
  398|      1|    dsm->header.configVersionMinorVersion = cvd.minorVersion;
  399|      1|    dsm->header.configVersionMajorVersionEnabled = entries[2].found;
  400|      1|    dsm->header.configVersionMinorVersionEnabled = entries[2].found;
  401|      1|    dsm->header.timestampEnabled = entries[3].found;
  402|      1|    dsm->header.statusEnabled = entries[4].found;
  403|       |
  404|      1|    dsm->header.dataSetMessageType = UA_DATASETMESSAGE_DATAKEYFRAME;
  405|      1|    dsm->header.picoSecondsIncluded = false;
  406|      1|    dsm->header.dataSetMessageValid = true;
  407|      1|    dsm->header.fieldEncoding = UA_FIELDENCODING_VARIANT;
  408|      1|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      1|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  409|  5.75k|}
ua_pubsub_networkmessage_json.c:MetaDataVersion_decodeJsonInternal:
  289|      3|MetaDataVersion_decodeJsonInternal(ParseCtx *ctx, void* cvd, const UA_DataType *_) {
  290|      3|    return decodeJsonJumpTable[UA_DATATYPEKIND_STRUCTURE]
  291|      3|        (ctx, cvd, &UA_TYPES[UA_TYPES_CONFIGURATIONVERSIONDATATYPE]);
  ------------------
  |  | 2146|      3|#define UA_TYPES_CONFIGURATIONVERSIONDATATYPE 57
  ------------------
  292|      3|}
ua_pubsub_networkmessage_json.c:DataSetPayload_decodeJsonInternal:
  312|  5.09k|DataSetPayload_decodeJsonInternal(ParseCtx *ctx_, void *data, const UA_DataType *_) {
  313|  5.09k|    PubSubDecodeJsonCtx *ctx = (PubSubDecodeJsonCtx*)ctx_;
  314|  5.09k|    struct PayloadData *pd = (struct PayloadData*)data;
  315|  5.09k|    UA_NetworkMessage *nm = pd->nm;
  316|  5.09k|    UA_DataSetMessage *dsm = &nm->payload.dataSetMessages[pd->dsmIndex];
  317|       |
  318|  5.09k|    dsm->header.dataSetMessageValid = true;
  319|       |
  320|  5.09k|    if(currentTokenType(&ctx->ctx) == CJ5_TOKEN_NULL) {
  ------------------
  |  Branch (320:8): [True: 1, False: 5.09k]
  ------------------
  321|      1|        ctx->ctx.index++;
  322|      1|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      1|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  323|      1|    }
  324|       |
  325|  5.09k|    if(currentTokenType(&ctx->ctx) != CJ5_TOKEN_OBJECT)
  ------------------
  |  Branch (325:8): [True: 4, False: 5.09k]
  ------------------
  326|      4|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      4|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  327|       |
  328|       |    /* The number of key-value pairs */
  329|  5.09k|    UA_assert(ctx->ctx.tokens[ctx->ctx.index].size % 2 == 0);
  ------------------
  |  |  400|  5.09k|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (329:5): [True: 5.09k, False: 0]
  ------------------
  330|  5.09k|    size_t length = (size_t)(ctx->ctx.tokens[ctx->ctx.index].size) / 2;
  331|       |
  332|  5.09k|    if(length > UA_UINT16_MAX)
  ------------------
  |  |   92|  5.09k|#define UA_UINT16_MAX 65535
  ------------------
  |  Branch (332:8): [True: 1, False: 5.09k]
  ------------------
  333|      1|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      1|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  334|       |
  335|  5.09k|    dsm->data.keyFrameFields = (UA_DataValue *)
  336|  5.09k|        UA_Array_new(length, &UA_TYPES[UA_TYPES_DATAVALUE]);
  ------------------
  |  |  769|  5.09k|#define UA_TYPES_DATAVALUE 22
  ------------------
  337|  5.09k|    if(!dsm->data.keyFrameFields)
  ------------------
  |  Branch (337:8): [True: 7, False: 5.08k]
  ------------------
  338|      7|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      7|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
  339|  5.08k|    dsm->fieldCount = (UA_UInt16)length;
  340|       |
  341|  5.08k|    dsm->header.fieldEncoding = UA_FIELDENCODING_DATAVALUE;
  342|       |
  343|  5.08k|    const UA_DataSetMessage_EncodingMetaData *emd =
  344|  5.08k|            findEncodingMetaData(&ctx->eo, nm->dataSetWriterIds[pd->dsmIndex]);
  345|       |
  346|       |    /* Iterate over the key/value pairs in the object. Keys are stored in fieldnames. */
  347|  5.08k|    ctx->ctx.index++; /* Go to the first key */
  348|  5.08k|    status ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  5.08k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  349|  32.0k|    for(size_t i = 0; i < length; ++i) {
  ------------------
  |  Branch (349:23): [True: 30.4k, False: 1.60k]
  ------------------
  350|  30.4k|        UA_assert(currentTokenType(&ctx->ctx) == CJ5_TOKEN_STRING);
  ------------------
  |  |  400|  30.4k|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (350:9): [True: 30.4k, False: 0]
  ------------------
  351|  30.4k|        UA_String fieldName = UA_STRING_NULL;
  352|  30.4k|        ret = decodeJsonJumpTable[UA_DATATYPEKIND_STRING](&ctx->ctx, &fieldName, NULL);
  353|  30.4k|        UA_CHECK_STATUS(ret, return ret);
  ------------------
  |  |  179|  30.4k|    UA_CHECK(isGood(STATUSCODE), EVAL_ON_ERROR)
  |  |  ------------------
  |  |  |  |  172|  30.4k|    do {                                                                                 \
  |  |  |  |  173|  30.4k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  580|  30.4k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (580:25): [True: 1, False: 30.4k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  174|      1|            EVAL_ON_ERROR;                                                               \
  |  |  |  |  175|      1|        }                                                                                \
  |  |  |  |  176|  30.4k|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (176:13): [Folded, False: 30.4k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  354|       |
  355|  30.4k|        size_t index = decodingFieldIndex(emd, fieldName, i);
  356|  30.4k|        if(index >= length) {
  ------------------
  |  Branch (356:12): [True: 0, False: 30.4k]
  ------------------
  357|      0|            UA_String_clear(&fieldName);
  358|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  359|      0|        }
  360|  30.4k|        UA_DataValue_clear(&dsm->data.keyFrameFields[index]);
  361|  30.4k|        UA_String_clear(&fieldName);
  362|  30.4k|        ret = decodeJsonJumpTable[UA_DATATYPEKIND_DATAVALUE]
  363|  30.4k|            (&ctx->ctx, &dsm->data.keyFrameFields[index], NULL);
  364|  30.4k|        UA_CHECK_STATUS(ret, return ret);
  ------------------
  |  |  179|  30.4k|    UA_CHECK(isGood(STATUSCODE), EVAL_ON_ERROR)
  |  |  ------------------
  |  |  |  |  172|  30.4k|    do {                                                                                 \
  |  |  |  |  173|  30.4k|        if(UA_UNLIKELY(!isTrue(A))) {                                                    \
  |  |  |  |  ------------------
  |  |  |  |  |  |  580|  30.4k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  Branch (580:25): [True: 3.48k, False: 26.9k]
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |  174|  3.48k|            EVAL_ON_ERROR;                                                               \
  |  |  |  |  175|  3.48k|        }                                                                                \
  |  |  |  |  176|  30.4k|    } while(0)
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (176:13): [Folded, False: 26.9k]
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  365|  30.4k|    }
  366|       |
  367|  1.60k|    return ret;
  368|  5.08k|}
ua_pubsub_networkmessage_json.c:decodingFieldIndex:
  296|  30.4k|                   UA_String name, size_t origIndex) {
  297|  30.4k|    if(!emd)
  ------------------
  |  Branch (297:8): [True: 30.4k, False: 0]
  ------------------
  298|  30.4k|        return origIndex;
  299|      0|    for(size_t i = 0; i < emd->fieldsSize; i++) {
  ------------------
  |  Branch (299:23): [True: 0, False: 0]
  ------------------
  300|      0|        if(UA_String_equal(&name, &emd->fields[i].name))
  ------------------
  |  Branch (300:12): [True: 0, False: 0]
  ------------------
  301|      0|            return i;
  302|      0|    }
  303|      0|    return origIndex;
  304|      0|}

UA_findDataTypeWithCustom:
   66|  27.3k|                          const UA_DataTypeArray *customTypes) {
   67|       |    /* Always look in built-in types first (may contain data types from all
   68|       |     * namespaces).
   69|       |     *
   70|       |     * TODO: The standard-defined types are ordered. See if binary search is
   71|       |     * more efficient. */
   72|  5.67M|    for(size_t i = 0; i < UA_TYPES_COUNT; ++i) {
  ------------------
  |  |   17|  5.67M|#define UA_TYPES_COUNT 388
  ------------------
  |  Branch (72:23): [True: 5.66M, False: 13.4k]
  ------------------
   73|  5.66M|        if(nodeIdOrder(&UA_TYPES[i].typeId, typeId, NULL) == UA_ORDER_EQ)
  ------------------
  |  Branch (73:12): [True: 13.9k, False: 5.64M]
  ------------------
   74|  13.9k|            return &UA_TYPES[i];
   75|  5.66M|    }
   76|       |
   77|       |    /* Search in the customTypes */
   78|  13.4k|    while(customTypes) {
  ------------------
  |  Branch (78:11): [True: 0, False: 13.4k]
  ------------------
   79|      0|        for(size_t i = 0; i < customTypes->typesSize; ++i) {
  ------------------
  |  Branch (79:27): [True: 0, False: 0]
  ------------------
   80|      0|            if(nodeIdOrder(&customTypes->types[i].typeId, typeId, NULL) == UA_ORDER_EQ)
  ------------------
  |  Branch (80:16): [True: 0, False: 0]
  ------------------
   81|      0|                return &customTypes->types[i];
   82|      0|        }
   83|      0|        customTypes = customTypes->next;
   84|      0|    }
   85|       |
   86|  13.4k|    return NULL;
   87|  13.4k|}
UA_DateTime_fromStruct:
  510|     87|UA_DateTime_fromStruct(UA_DateTimeStruct ts) {
  511|       |    /* Seconds since the Unix epoch */
  512|     87|    struct musl_tm tm;
  513|     87|    memset(&tm, 0, sizeof(struct musl_tm));
  514|     87|    tm.tm_year = ts.year - 1900;
  515|     87|    tm.tm_mon = ts.month - 1;
  516|     87|    tm.tm_mday = ts.day;
  517|     87|    tm.tm_hour = ts.hour;
  518|     87|    tm.tm_min = ts.min;
  519|     87|    tm.tm_sec = ts.sec;
  520|     87|    long long sec_epoch = musl_tm_to_secs(&tm);
  521|       |
  522|     87|    UA_DateTime t = UA_DATETIME_UNIX_EPOCH;
  ------------------
  |  |  328|     87|#define UA_DATETIME_UNIX_EPOCH (11644473600LL * UA_DATETIME_SEC)
  |  |  ------------------
  |  |  |  |  286|     87|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  285|     87|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  284|     87|#define UA_DATETIME_USEC 10LL
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  523|     87|    t += sec_epoch * UA_DATETIME_SEC;
  ------------------
  |  |  286|     87|#define UA_DATETIME_SEC (UA_DATETIME_MSEC * 1000LL)
  |  |  ------------------
  |  |  |  |  285|     87|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  |  |  ------------------
  |  |  |  |  |  |  284|     87|#define UA_DATETIME_USEC 10LL
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  524|     87|    t += ts.milliSec * UA_DATETIME_MSEC;
  ------------------
  |  |  285|     87|#define UA_DATETIME_MSEC (UA_DATETIME_USEC * 1000LL)
  |  |  ------------------
  |  |  |  |  284|     87|#define UA_DATETIME_USEC 10LL
  |  |  ------------------
  ------------------
  525|     87|    t += ts.microSec * UA_DATETIME_USEC;
  ------------------
  |  |  284|     87|#define UA_DATETIME_USEC 10LL
  ------------------
  526|     87|    t += ts.nanoSec / 100;
  527|     87|    return t;
  528|     87|}
UA_ByteString_allocBuffer:
  757|  13.1k|UA_ByteString_allocBuffer(UA_ByteString *bs, size_t length) {
  758|  13.1k|    UA_ByteString_init(bs);
  759|  13.1k|    if(length == 0) {
  ------------------
  |  Branch (759:8): [True: 0, False: 13.1k]
  ------------------
  760|      0|        bs->data = (u8*)UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|      0|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  761|      0|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  762|      0|    }
  763|  13.1k|    bs->data = (u8*)UA_calloc(1,length);
  ------------------
  |  |   20|  13.1k|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
  764|  13.1k|    if(UA_UNLIKELY(!bs->data))
  ------------------
  |  |  580|  13.1k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  ------------------
  |  |  |  Branch (580:25): [True: 3, False: 13.1k]
  |  |  ------------------
  ------------------
  765|      3|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      3|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
  766|  13.1k|    bs->length = length;
  767|  13.1k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  13.1k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  768|  13.1k|}
UA_new:
 1921|  36.6k|UA_new(const UA_DataType *type) {
 1922|  36.6k|    void *p = UA_calloc(1, type->memSize);
  ------------------
  |  |   20|  36.6k|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
 1923|  36.6k|    return p;
 1924|  36.6k|}
UA_copy:
 2097|  36.9k|UA_copy(const void *src, void *dst, const UA_DataType *type) {
 2098|  36.9k|    memset(dst, 0, type->memSize); /* init */
 2099|  36.9k|    UA_StatusCode retval = copyJumpTable[type->typeKind](src, dst, type);
 2100|  36.9k|    if(retval != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  36.9k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2100:8): [True: 5, False: 36.9k]
  ------------------
 2101|      5|        UA_clear(dst, type);
 2102|  36.9k|    return retval;
 2103|  36.9k|}
UA_clear:
 2200|  1.43M|UA_clear(void *p, const UA_DataType *type) {
 2201|  1.43M|    clearJumpTable[type->typeKind](p, type);
 2202|  1.43M|    memset(p, 0, type->memSize); /* init */
 2203|  1.43M|}
UA_delete:
 2206|  9.79k|UA_delete(void *p, const UA_DataType *type) {
 2207|  9.79k|    clearJumpTable[type->typeKind](p, type);
 2208|  9.79k|    UA_free(p);
  ------------------
  |  |   19|  9.79k|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 2209|  9.79k|}
UA_Array_new:
 2688|  5.09k|UA_Array_new(size_t size, const UA_DataType *type) {
 2689|  5.09k|    if(size > UA_INT32_MAX)
  ------------------
  |  |  101|  5.09k|#define UA_INT32_MAX 2147483647L
  ------------------
  |  Branch (2689:8): [True: 0, False: 5.09k]
  ------------------
 2690|      0|        return NULL;
 2691|  5.09k|    if(size == 0)
  ------------------
  |  Branch (2691:8): [True: 4, False: 5.08k]
  ------------------
 2692|      4|        return UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|      4|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
 2693|  5.08k|    return UA_calloc(size, type->memSize);
  ------------------
  |  |   20|  5.08k|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
 2694|  5.09k|}
UA_Array_copy:
 2698|  36.9k|              void **dst, const UA_DataType *type) {
 2699|  36.9k|    if(size == 0) {
  ------------------
  |  Branch (2699:8): [True: 6.27k, False: 30.7k]
  ------------------
 2700|  6.27k|        if(src == NULL)
  ------------------
  |  Branch (2700:12): [True: 0, False: 6.27k]
  ------------------
 2701|      0|            *dst = NULL;
 2702|  6.27k|        else
 2703|  6.27k|            *dst= UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|  6.27k|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
 2704|  6.27k|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  6.27k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2705|  6.27k|    }
 2706|       |
 2707|       |    /* Check the array consistency -- defensive programming in case the user
 2708|       |     * manually created an inconsistent array */
 2709|  30.7k|    if(UA_UNLIKELY(!type || !src))
  ------------------
  |  |  580|  61.4k|# define UA_UNLIKELY(x) __builtin_expect((x), 0)
  |  |  ------------------
  |  |  |  Branch (580:25): [True: 0, False: 30.7k]
  |  |  |  Branch (580:43): [True: 0, False: 30.7k]
  |  |  |  Branch (580:43): [True: 0, False: 30.7k]
  |  |  ------------------
  ------------------
 2710|      0|        return UA_STATUSCODE_BADINTERNALERROR;
  ------------------
  |  |   29|      0|#define UA_STATUSCODE_BADINTERNALERROR ((UA_StatusCode) 0x80020000)
  ------------------
 2711|       |
 2712|       |    /* calloc, so we don't have to check retval in every iteration of copying */
 2713|  30.7k|    *dst = UA_calloc(size, type->memSize);
  ------------------
  |  |   20|  30.7k|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
 2714|  30.7k|    if(!*dst)
  ------------------
  |  Branch (2714:8): [True: 5, False: 30.7k]
  ------------------
 2715|      5|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      5|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 2716|       |
 2717|  30.7k|    if(type->pointerFree) {
  ------------------
  |  Branch (2717:8): [True: 30.7k, False: 0]
  ------------------
 2718|  30.7k|        memcpy(*dst, src, type->memSize * size);
 2719|  30.7k|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  30.7k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2720|  30.7k|    }
 2721|       |
 2722|      0|    uintptr_t ptrs = (uintptr_t)src;
 2723|      0|    uintptr_t ptrd = (uintptr_t)*dst;
 2724|      0|    UA_StatusCode retval = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2725|      0|    for(size_t i = 0; i < size; ++i) {
  ------------------
  |  Branch (2725:23): [True: 0, False: 0]
  ------------------
 2726|      0|        retval |= UA_copy((void*)ptrs, (void*)ptrd, type);
 2727|      0|        ptrs += type->memSize;
 2728|      0|        ptrd += type->memSize;
 2729|      0|    }
 2730|      0|    if(retval != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2730:8): [True: 0, False: 0]
  ------------------
 2731|      0|        UA_Array_delete(*dst, size, type);
 2732|       |        *dst = NULL;
 2733|      0|    }
 2734|      0|    return retval;
 2735|  30.7k|}
UA_Array_delete:
 2826|   230k|UA_Array_delete(void *p, size_t size, const UA_DataType *type) {
 2827|   230k|    if(!type->pointerFree) {
  ------------------
  |  Branch (2827:8): [True: 34.3k, False: 196k]
  ------------------
 2828|  34.3k|        uintptr_t ptr = (uintptr_t)p;
 2829|  1.30M|        for(size_t i = 0; i < size; ++i) {
  ------------------
  |  Branch (2829:27): [True: 1.27M, False: 34.3k]
  ------------------
 2830|  1.27M|            UA_clear((void*)ptr, type);
 2831|  1.27M|            ptr += type->memSize;
 2832|  1.27M|        }
 2833|  34.3k|    }
 2834|   230k|    UA_free((void*)((uintptr_t)p & ~(uintptr_t)UA_EMPTY_ARRAY_SENTINEL));
  ------------------
  |  |   19|   230k|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 2835|   230k|}
ua_types.c:Variant_clear:
 1379|  1.23M|Variant_clear(void *p, const UA_DataType *_) {
 1380|  1.23M|    UA_Variant *v = (UA_Variant *)p;
 1381|       |
 1382|       |    /* The content is "borrowed" */
 1383|  1.23M|    if(v->storageType == UA_VARIANT_DATA_NODELETE)
  ------------------
  |  Branch (1383:8): [True: 0, False: 1.23M]
  ------------------
 1384|      0|        return;
 1385|       |
 1386|       |    /* Delete the value */
 1387|  1.23M|    if(v->type && v->data > UA_EMPTY_ARRAY_SENTINEL) {
  ------------------
  |  |  756|  39.6k|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  |  Branch (1387:8): [True: 39.6k, False: 1.19M]
  |  Branch (1387:19): [True: 36.8k, False: 2.80k]
  ------------------
 1388|  36.8k|        if(v->arrayLength == 0)
  ------------------
  |  Branch (1388:12): [True: 26.8k, False: 9.93k]
  ------------------
 1389|  26.8k|            v->arrayLength = 1;
 1390|  36.8k|        UA_Array_delete(v->data, v->arrayLength, v->type);
 1391|  36.8k|        v->data = NULL;
 1392|  36.8k|    }
 1393|       |
 1394|       |    /* Delete the array dimensions */
 1395|  1.23M|    if((void*)v->arrayDimensions > UA_EMPTY_ARRAY_SENTINEL)
  ------------------
  |  |  756|  1.23M|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
  |  Branch (1395:8): [True: 67, False: 1.23M]
  ------------------
 1396|     67|        UA_free(v->arrayDimensions);
  ------------------
  |  |   19|     67|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1397|  1.23M|}
ua_types.c:DataValue_clear:
 1851|  1.22M|DataValue_clear(void *p, const UA_DataType *_) {
 1852|  1.22M|    UA_DataValue *dv = (UA_DataValue *)p;
 1853|       |    Variant_clear(&dv->value, NULL);
 1854|  1.22M|}
ua_types.c:String_copy:
  281|  36.9k|String_copy(const void *src, void *dst, const UA_DataType *_) {
  282|  36.9k|    const UA_String *srcS = (const UA_String*)src;
  283|  36.9k|    UA_String *dstS = (UA_String *)dst;
  284|  36.9k|    UA_StatusCode res =
  285|  36.9k|        UA_Array_copy(srcS->data, srcS->length, (void**)&dstS->data,
  286|  36.9k|                      &UA_TYPES[UA_TYPES_BYTE]);
  ------------------
  |  |   89|  36.9k|#define UA_TYPES_BYTE 2
  ------------------
  287|  36.9k|    if(res == UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  36.9k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (287:8): [True: 36.9k, False: 5]
  ------------------
  288|  36.9k|        dstS->length = srcS->length;
  289|  36.9k|    return res;
  290|  36.9k|}
ua_types.c:nopClear:
 2162|  12.0k|static void nopClear(void *p, const UA_DataType *type) { }
ua_types.c:String_clear:
  293|   184k|String_clear(void *p, const UA_DataType *_) {
  294|   184k|    UA_String *s = (UA_String*)p;
  295|   184k|    UA_Array_delete(s->data, s->length, &UA_TYPES[UA_TYPES_BYTE]);
  ------------------
  |  |   89|   184k|#define UA_TYPES_BYTE 2
  ------------------
  296|   184k|}
ua_types.c:NodeId_clear:
  772|  45.7k|NodeId_clear(void *p, const UA_DataType *_) {
  773|  45.7k|    UA_NodeId *id = (UA_NodeId*)p;
  774|  45.7k|    switch(id->identifierType) {
  775|  11.0k|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (775:5): [True: 11.0k, False: 34.7k]
  ------------------
  776|  12.1k|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (776:5): [True: 1.08k, False: 44.6k]
  ------------------
  777|  12.1k|        String_clear(&id->identifier.string, NULL);
  778|  12.1k|        break;
  779|  33.6k|    default: break;
  ------------------
  |  Branch (779:5): [True: 33.6k, False: 12.1k]
  ------------------
  780|  45.7k|    }
  781|  45.7k|}
ua_types.c:ExpandedNodeId_clear:
 1073|  4.39k|ExpandedNodeId_clear(void *p, const UA_DataType *_) {
 1074|  4.39k|    UA_ExpandedNodeId *id = (UA_ExpandedNodeId*)p;
 1075|  4.39k|    NodeId_clear(&id->nodeId, NULL);
 1076|       |    String_clear(&id->namespaceUri, NULL);
 1077|  4.39k|}
ua_types.c:QualifiedName_clear:
  397|  25.3k|QualifiedName_clear(void *p, const UA_DataType *_) {
  398|  25.3k|    UA_QualifiedName *qn = (UA_QualifiedName*)p;
  399|       |    String_clear(&qn->name, NULL);
  400|  25.3k|}
ua_types.c:LocalizedText_clear:
 1834|  2.50k|LocalizedText_clear(void *p, const UA_DataType *_) {
 1835|  2.50k|    UA_LocalizedText *lt = (UA_LocalizedText *)p;
 1836|  2.50k|    String_clear(&lt->locale, NULL);
 1837|       |    String_clear(&lt->text, NULL);
 1838|  2.50k|}
ua_types.c:ExtensionObject_clear:
 1246|  30.0k|ExtensionObject_clear(void *p, const UA_DataType *_) {
 1247|  30.0k|    UA_ExtensionObject *eo = (UA_ExtensionObject *)p;
 1248|  30.0k|    switch(eo->encoding) {
 1249|  5.63k|    case UA_EXTENSIONOBJECT_ENCODED_NOBODY:
  ------------------
  |  Branch (1249:5): [True: 5.63k, False: 24.4k]
  ------------------
 1250|  6.64k|    case UA_EXTENSIONOBJECT_ENCODED_BYTESTRING:
  ------------------
  |  Branch (1250:5): [True: 1.00k, False: 29.0k]
  ------------------
 1251|  7.13k|    case UA_EXTENSIONOBJECT_ENCODED_XML:
  ------------------
  |  Branch (1251:5): [True: 488, False: 29.5k]
  ------------------
 1252|  20.2k|    case UA_EXTENSIONOBJECT_ENCODED_JSON:
  ------------------
  |  Branch (1252:5): [True: 13.1k, False: 16.9k]
  ------------------
 1253|  20.2k|        NodeId_clear(&eo->content.encoded.typeId, NULL);
 1254|  20.2k|        String_clear(&eo->content.encoded.body, NULL);
 1255|  20.2k|        break;
 1256|  9.79k|    case UA_EXTENSIONOBJECT_DECODED:
  ------------------
  |  Branch (1256:5): [True: 9.79k, False: 20.2k]
  ------------------
 1257|  9.79k|        if(eo->content.decoded.data)
  ------------------
  |  Branch (1257:12): [True: 9.79k, False: 0]
  ------------------
 1258|  9.79k|            UA_delete(eo->content.decoded.data, eo->content.decoded.type);
 1259|  9.79k|        break;
 1260|      0|    default:
  ------------------
  |  Branch (1260:5): [True: 0, False: 30.0k]
  ------------------
 1261|      0|        break;
 1262|  30.0k|    }
 1263|  30.0k|}
ua_types.c:DiagnosticInfo_clear:
 1881|  1.52k|DiagnosticInfo_clear(void *p, const UA_DataType *_) {
 1882|  1.52k|    UA_DiagnosticInfo *di = (UA_DiagnosticInfo *)p;
 1883|       |
 1884|  1.52k|    String_clear(&di->additionalInfo, NULL);
 1885|  1.52k|    if(di->hasInnerDiagnosticInfo && di->innerDiagnosticInfo) {
  ------------------
  |  Branch (1885:8): [True: 0, False: 1.52k]
  |  Branch (1885:38): [True: 0, False: 0]
  ------------------
 1886|      0|        DiagnosticInfo_clear(di->innerDiagnosticInfo, NULL);
 1887|      0|        UA_free(di->innerDiagnosticInfo);
  ------------------
  |  |   19|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1888|      0|    }
 1889|  1.52k|}
ua_types.c:clearStructure:
 2106|  2.65k|clearStructure(void *p, const UA_DataType *type) {
 2107|  2.65k|    uintptr_t ptr = (uintptr_t)p;
 2108|  15.4k|    for(size_t i = 0; i < type->membersSize; ++i) {
  ------------------
  |  Branch (2108:23): [True: 12.7k, False: 2.65k]
  ------------------
 2109|  12.7k|        const UA_DataTypeMember *m = &type->members[i];
 2110|  12.7k|        const UA_DataType *mt = m->memberType;
 2111|  12.7k|        ptr += m->padding;
 2112|  12.7k|        if(!m->isOptional) {
  ------------------
  |  Branch (2112:12): [True: 12.7k, False: 0]
  ------------------
 2113|  12.7k|            if(!m->isArray) {
  ------------------
  |  Branch (2113:16): [True: 10.7k, False: 2.01k]
  ------------------
 2114|  10.7k|                clearJumpTable[mt->typeKind]((void*)ptr, mt);
 2115|  10.7k|                ptr += mt->memSize;
 2116|  10.7k|            } else {
 2117|  2.01k|                size_t length = *(size_t*)ptr;
 2118|  2.01k|                ptr += sizeof(size_t);
 2119|  2.01k|                UA_Array_delete(*(void**)ptr, length, mt);
 2120|  2.01k|                ptr += sizeof(void*);
 2121|  2.01k|            }
 2122|  12.7k|        } else { /* field is optional */
 2123|      0|            if(!m->isArray) {
  ------------------
  |  Branch (2123:16): [True: 0, False: 0]
  ------------------
 2124|       |                /* optional scalar field is contained */
 2125|      0|                if((*(void *const *)ptr != NULL))
  ------------------
  |  Branch (2125:20): [True: 0, False: 0]
  ------------------
 2126|      0|                    UA_Array_delete(*(void **)ptr, 1, mt);
 2127|      0|                ptr += sizeof(void *);
 2128|      0|            } else {
 2129|       |                /* optional array field is contained */
 2130|      0|                if((*(void *const *)(ptr + sizeof(size_t)) != NULL)) {
  ------------------
  |  Branch (2130:20): [True: 0, False: 0]
  ------------------
 2131|      0|                    size_t length = *(size_t *)ptr;
 2132|      0|                    ptr += sizeof(size_t);
 2133|      0|                    UA_Array_delete(*(void **)ptr, length, mt);
 2134|      0|                    ptr += sizeof(void *);
 2135|      0|                } else { /* optional array field not contained */
 2136|      0|                    ptr += sizeof(size_t);
 2137|      0|                    ptr += sizeof(void *);
 2138|      0|                }
 2139|      0|            }
 2140|      0|        }
 2141|  12.7k|    }
 2142|  2.65k|}
ua_types.c:nodeIdOrder:
 2292|  5.66M|nodeIdOrder(const void *p1_, const void *p2_, const UA_DataType *_) {
 2293|  5.66M|    const UA_NodeId *p1 = (const UA_NodeId*)p1_;
 2294|  5.66M|    const UA_NodeId *p2 = (const UA_NodeId*)p2_;
 2295|       |    /* Compare namespaceIndex */
 2296|  5.66M|    if(p1->namespaceIndex != p2->namespaceIndex)
  ------------------
  |  Branch (2296:8): [True: 159k, False: 5.50M]
  ------------------
 2297|   159k|        return (p1->namespaceIndex < p2->namespaceIndex) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2297:16): [True: 159k, False: 0]
  ------------------
 2298|       |
 2299|       |    /* Compare identifierType */
 2300|  5.50M|    if(p1->identifierType != p2->identifierType)
  ------------------
  |  Branch (2300:8): [True: 2.72M, False: 2.77M]
  ------------------
 2301|  2.72M|        return (p1->identifierType < p2->identifierType) ? UA_ORDER_LESS : UA_ORDER_MORE;
  ------------------
  |  Branch (2301:16): [True: 2.72M, False: 0]
  ------------------
 2302|       |
 2303|       |    /* Compare the identifier */
 2304|  2.77M|    switch(p1->identifierType) {
 2305|  2.77M|    case UA_NODEIDTYPE_NUMERIC:
  ------------------
  |  Branch (2305:5): [True: 2.77M, False: 0]
  ------------------
 2306|  2.77M|    default:
  ------------------
  |  Branch (2306:5): [True: 0, False: 2.77M]
  ------------------
 2307|  2.77M|        if(p1->identifier.numeric != p2->identifier.numeric)
  ------------------
  |  Branch (2307:12): [True: 2.75M, False: 13.9k]
  ------------------
 2308|  2.75M|            return (p1->identifier.numeric < p2->identifier.numeric) ?
  ------------------
  |  Branch (2308:20): [True: 282k, False: 2.47M]
  ------------------
 2309|  2.47M|                UA_ORDER_LESS : UA_ORDER_MORE;
 2310|  13.9k|        return UA_ORDER_EQ;
 2311|      0|    case UA_NODEIDTYPE_GUID:
  ------------------
  |  Branch (2311:5): [True: 0, False: 2.77M]
  ------------------
 2312|      0|        return guidOrder(&p1->identifier.guid, &p2->identifier.guid, NULL);
 2313|      0|    case UA_NODEIDTYPE_STRING:
  ------------------
  |  Branch (2313:5): [True: 0, False: 2.77M]
  ------------------
 2314|      0|    case UA_NODEIDTYPE_BYTESTRING:
  ------------------
  |  Branch (2314:5): [True: 0, False: 2.77M]
  ------------------
 2315|       |        return stringOrder(&p1->identifier.string, &p2->identifier.string, NULL);
 2316|  2.77M|    }
 2317|  2.77M|}

lookAheadForKey:
 1789|   161k|lookAheadForKey(ParseCtx *ctx, const char *key, size_t *resultIndex) {
 1790|       |    /* The current index must point to the beginning of an object.
 1791|       |     * This has to be ensured by the caller. */
 1792|   161k|    UA_assert(currentTokenType(ctx) == CJ5_TOKEN_OBJECT);
  ------------------
  |  |  400|   161k|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (1792:5): [True: 161k, False: 0]
  ------------------
 1793|       |
 1794|   161k|    status ret = UA_STATUSCODE_BADNOTFOUND;
  ------------------
  |  |  233|   161k|#define UA_STATUSCODE_BADNOTFOUND ((UA_StatusCode) 0x803E0000)
  ------------------
 1795|   161k|    size_t oldIndex = ctx->index; /* Save index for later restore */
 1796|   161k|    unsigned int end = ctx->tokens[ctx->index].end;
 1797|   161k|    ctx->index++; /* Move to the first key */
 1798|  1.20M|    while(ctx->index < ctx->tokensSize &&
  ------------------
  |  Branch (1798:11): [True: 1.20M, False: 5.10k]
  ------------------
 1799|  1.20M|          ctx->tokens[ctx->index].start < end) {
  ------------------
  |  Branch (1799:11): [True: 1.15M, False: 44.7k]
  ------------------
 1800|       |        /* Key must be a string */
 1801|  1.15M|        UA_assert(currentTokenType(ctx) == CJ5_TOKEN_STRING);
  ------------------
  |  |  400|  1.15M|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (1801:9): [True: 1.15M, False: 0]
  ------------------
 1802|       |
 1803|       |        /* Move index to the value */
 1804|  1.15M|        ctx->index++;
 1805|       |
 1806|       |        /* Value for the key must exist */
 1807|  1.15M|        UA_assert(ctx->index < ctx->tokensSize);
  ------------------
  |  |  400|  1.15M|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (1807:9): [True: 1.15M, False: 0]
  ------------------
 1808|       |
 1809|       |        /* Compare the key (previous index) */
 1810|  1.15M|        if(jsoneq(ctx->json5, &ctx->tokens[ctx->index-1], key) == 0) {
  ------------------
  |  Branch (1810:12): [True: 111k, False: 1.04M]
  ------------------
 1811|   111k|            *resultIndex = ctx->index; /* Point result to the current index */
 1812|   111k|            ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|   111k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1813|   111k|            break;
 1814|   111k|        }
 1815|       |
 1816|  1.04M|        skipObject(ctx); /* Jump over the value (can also be an array or object) */
 1817|  1.04M|    }
 1818|   161k|    ctx->index = oldIndex; /* Restore the old index */
 1819|   161k|    return ret;
 1820|   161k|}
decodeFields:
 2503|  44.2k|decodeFields(ParseCtx *ctx, DecodeEntry *entries, size_t entryCount) {
 2504|  44.2k|    CHECK_TOKEN_BOUNDS;
  ------------------
  |  | 1285|  44.2k|#define CHECK_TOKEN_BOUNDS do {                   \
  |  | 1286|  44.2k|    if(ctx->index >= ctx->tokensSize)             \
  |  |  ------------------
  |  |  |  Branch (1286:8): [True: 0, False: 44.2k]
  |  |  ------------------
  |  | 1287|  44.2k|        return UA_STATUSCODE_BADDECODINGERROR;    \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1288|  44.2k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (1288:13): [Folded, False: 44.2k]
  |  |  ------------------
  ------------------
 2505|  44.2k|    CHECK_NULL_SKIP; /* null is treated like an empty object */
  ------------------
  |  | 1310|  44.2k|#define CHECK_NULL_SKIP do {                         \
  |  | 1311|  44.2k|    if(currentTokenType(ctx) == CJ5_TOKEN_NULL) {    \
  |  |  ------------------
  |  |  |  Branch (1311:8): [True: 333, False: 43.9k]
  |  |  ------------------
  |  | 1312|    333|        ctx->index++;                                \
  |  | 1313|    333|        return UA_STATUSCODE_GOOD;                   \
  |  |  ------------------
  |  |  |  |   17|    333|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  |  |  ------------------
  |  | 1314|  43.9k|    }} while(0)
  |  |  ------------------
  |  |  |  Branch (1314:14): [Folded, False: 43.9k]
  |  |  ------------------
  ------------------
 2506|       |
 2507|  43.9k|    if(ctx->depth >= UA_JSON_ENCODING_MAX_RECURSION)
  ------------------
  |  |   22|  43.9k|#define UA_JSON_ENCODING_MAX_RECURSION 100
  ------------------
  |  Branch (2507:8): [True: 1, False: 43.9k]
  ------------------
 2508|      1|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      1|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2509|       |
 2510|       |    /* Keys and values are counted separately */
 2511|  43.9k|    CHECK_OBJECT;
  ------------------
  |  | 1305|  43.9k|#define CHECK_OBJECT do {                                \
  |  | 1306|  43.9k|    if(currentTokenType(ctx) != CJ5_TOKEN_OBJECT) {      \
  |  |  ------------------
  |  |  |  Branch (1306:8): [True: 23, False: 43.9k]
  |  |  ------------------
  |  | 1307|     23|        return UA_STATUSCODE_BADDECODINGERROR;           \
  |  |  ------------------
  |  |  |  |   44|     23|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1308|  43.9k|    }} while(0)
  |  |  ------------------
  |  |  |  Branch (1308:14): [Folded, False: 43.9k]
  |  |  ------------------
  ------------------
 2512|  43.9k|    UA_assert(ctx->tokens[ctx->index].size % 2 == 0);
  ------------------
  |  |  400|  43.9k|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (2512:5): [True: 43.9k, False: 0]
  ------------------
 2513|  43.9k|    size_t keyCount = (size_t)(ctx->tokens[ctx->index].size) / 2;
 2514|       |
 2515|  43.9k|    ctx->index++; /* Go to first key - or jump after the empty object */
 2516|  43.9k|    ctx->depth++;
 2517|       |
 2518|  43.9k|    status ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  43.9k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2519|   102k|    for(size_t key = 0; key < keyCount; key++) {
  ------------------
  |  Branch (2519:25): [True: 69.0k, False: 33.4k]
  ------------------
 2520|       |        /* Key must be a string */
 2521|  69.0k|        UA_assert(ctx->index < ctx->tokensSize);
  ------------------
  |  |  400|  69.0k|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (2521:9): [True: 69.0k, False: 0]
  ------------------
 2522|  69.0k|        UA_assert(currentTokenType(ctx) == CJ5_TOKEN_STRING);
  ------------------
  |  |  400|  69.0k|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (2522:9): [True: 69.0k, False: 0]
  ------------------
 2523|       |
 2524|       |        /* Search for the decoding entry matching the key. Start at the key
 2525|       |         * index to speed-up the case where they key-order is the same as the
 2526|       |         * entry-order. */
 2527|  69.0k|        DecodeEntry *entry = NULL;
 2528|   155k|        for(size_t i = key; i < key + entryCount; i++) {
  ------------------
  |  Branch (2528:29): [True: 155k, False: 259]
  ------------------
 2529|   155k|            size_t ii = i;
 2530|   159k|            while(ii >= entryCount)
  ------------------
  |  Branch (2530:19): [True: 3.61k, False: 155k]
  ------------------
 2531|  3.61k|                ii -= entryCount;
 2532|       |
 2533|       |            /* Compare the key */
 2534|   155k|            if(jsoneq(ctx->json5, &ctx->tokens[ctx->index],
  ------------------
  |  Branch (2534:16): [True: 86.7k, False: 68.8k]
  ------------------
 2535|   155k|                      entries[ii].fieldName) != 0)
 2536|  86.7k|                continue;
 2537|       |
 2538|       |            /* Key was already used -> duplicate, abort */
 2539|  68.8k|            if(entries[ii].found) {
  ------------------
  |  Branch (2539:16): [True: 5, False: 68.8k]
  ------------------
 2540|      5|                ctx->depth--;
 2541|      5|                return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      5|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2542|      5|            }
 2543|       |
 2544|       |            /* Found the key */
 2545|  68.8k|            entries[ii].found = true;
 2546|  68.8k|            entry = &entries[ii];
 2547|  68.8k|            break;
 2548|  68.8k|        }
 2549|       |
 2550|       |        /* The key is unknown */
 2551|  69.0k|        if(!entry) {
  ------------------
  |  Branch (2551:12): [True: 259, False: 68.8k]
  ------------------
 2552|    259|            ret = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    259|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2553|    259|            break;
 2554|    259|        }
 2555|       |
 2556|       |        /* Go from key to value */
 2557|  68.8k|        ctx->index++;
 2558|  68.8k|        UA_assert(ctx->index < ctx->tokensSize);
  ------------------
  |  |  400|  68.8k|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (2558:9): [True: 68.8k, False: 0]
  ------------------
 2559|       |
 2560|       |        /* An entry that was expected but shall not be decoded.
 2561|       |         * Jump over the value. */
 2562|  68.8k|        if(!entry->function && !entry->type) {
  ------------------
  |  Branch (2562:12): [True: 57.3k, False: 11.4k]
  |  Branch (2562:32): [True: 55.7k, False: 1.56k]
  ------------------
 2563|  55.7k|            skipObject(ctx);
 2564|  55.7k|            continue;
 2565|  55.7k|        }
 2566|       |
 2567|       |        /* A null-value is only valid for nullable fields. */
 2568|  13.0k|        if(currentTokenType(ctx) == CJ5_TOKEN_NULL && !entry->function) {
  ------------------
  |  Branch (2568:12): [True: 169, False: 12.8k]
  |  Branch (2568:55): [True: 50, False: 119]
  ------------------
 2569|     50|            if(!entry->type || !isJsonNullable(entry->type)) {
  ------------------
  |  Branch (2569:16): [True: 0, False: 50]
  |  Branch (2569:32): [True: 6, False: 44]
  ------------------
 2570|      6|                ctx->depth--;
 2571|      6|                return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      6|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2572|      6|            }
 2573|     44|            ctx->index++; /* skip null value */
 2574|     44|            continue;
 2575|     50|        }
 2576|       |
 2577|       |        /* Decode. This also moves to the next key or right after the object for
 2578|       |         * the last value. */
 2579|  12.9k|        decodeJsonSignature decodeFunc = (entry->function) ?
  ------------------
  |  Branch (2579:42): [True: 11.4k, False: 1.51k]
  ------------------
 2580|  11.4k|            entry->function : decodeJsonJumpTable[entry->type->typeKind];
 2581|  12.9k|        ret = decodeFunc(ctx, entry->fieldPointer, entry->type);
 2582|  12.9k|        if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  12.9k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2582:12): [True: 10.2k, False: 2.74k]
  ------------------
 2583|  10.2k|            break;
 2584|  12.9k|    }
 2585|       |
 2586|  43.9k|    ctx->depth--;
 2587|  43.9k|    return ret;
 2588|  43.9k|}
tokenize:
 2913|  8.22k|         size_t *decodedLength) {
 2914|       |    /* Tokenize */
 2915|  8.22k|    cj5_options options;
 2916|  8.22k|    options.stop_early = (decodedLength != NULL);
 2917|  8.22k|    cj5_result r = cj5_parse((char*)src->data, (unsigned int)src->length,
 2918|  8.22k|                             ctx->tokens, (unsigned int)tokensSize, &options);
 2919|       |
 2920|       |    /* Handle overflow error by allocating the number of tokens the parser would
 2921|       |     * have needed */
 2922|  8.22k|    if(r.error == CJ5_ERROR_OVERFLOW &&
  ------------------
  |  Branch (2922:8): [True: 541, False: 7.68k]
  ------------------
 2923|    541|       tokensSize != r.num_tokens) {
  ------------------
  |  Branch (2923:8): [True: 541, False: 0]
  ------------------
 2924|    541|        ctx->tokens = (cj5_token*)
 2925|    541|            UA_malloc(sizeof(cj5_token) * r.num_tokens);
  ------------------
  |  |   18|    541|#define UA_malloc(size) UA_mallocSingleton(size)
  ------------------
 2926|    541|        if(!ctx->tokens)
  ------------------
  |  Branch (2926:12): [True: 13, False: 528]
  ------------------
 2927|     13|            return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|     13|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 2928|    528|        return tokenize(ctx, src, r.num_tokens, decodedLength);
 2929|    541|    }
 2930|       |
 2931|       |    /* Cannot recover from other errors */
 2932|  7.68k|    if(r.error != CJ5_ERROR_NONE)
  ------------------
  |  Branch (2932:8): [True: 748, False: 6.93k]
  ------------------
 2933|    748|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    748|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2934|       |
 2935|  6.93k|    if(decodedLength)
  ------------------
  |  Branch (2935:8): [True: 0, False: 6.93k]
  ------------------
 2936|      0|        *decodedLength = ctx->tokens[0].end + 1;
 2937|       |
 2938|       |    /* Set up the context */
 2939|  6.93k|    ctx->json5 = (char*)src->data;
 2940|  6.93k|    ctx->depth = 0;
 2941|  6.93k|    ctx->tokensSize = r.num_tokens;
 2942|  6.93k|    ctx->index = 0;
 2943|  6.93k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  6.93k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2944|  7.68k|}
ua_types_encoding_json.c:variantDimensionsValid:
  787|  2.33k|                       const UA_UInt32 *dimensions) {
  788|  2.33k|    if(dimensionsSize == 0 || !dimensions)
  ------------------
  |  Branch (788:8): [True: 3, False: 2.33k]
  |  Branch (788:31): [True: 0, False: 2.33k]
  ------------------
  789|      3|        return false;
  790|       |
  791|  2.33k|    size_t total = 1;
  792|  4.79k|    for(size_t i = 0; i < dimensionsSize; i++) {
  ------------------
  |  Branch (792:23): [True: 2.47k, False: 2.32k]
  ------------------
  793|  2.47k|        UA_UInt32 dimension = dimensions[i];
  794|  2.47k|        if(dimension == 0 || total > SIZE_MAX / dimension)
  ------------------
  |  Branch (794:12): [True: 14, False: 2.45k]
  |  Branch (794:30): [True: 1, False: 2.45k]
  ------------------
  795|     15|            return false;
  796|  2.45k|        total *= dimension;
  797|  2.45k|    }
  798|  2.32k|    return total == arrayLength;
  799|  2.33k|}
ua_types_encoding_json.c:jsoneq:
 1341|  1.47M|jsoneq(const char *json, const cj5_token *tok, const char *searchKey) {
 1342|       |    /* TODO: necessary?
 1343|       |       if(json == NULL
 1344|       |            || tok == NULL
 1345|       |            || searchKey == NULL) {
 1346|       |        return -1;
 1347|       |    } */
 1348|       |
 1349|  1.47M|    size_t len = getTokenLength(tok);
 1350|  1.47M|    if(tok->type == CJ5_TOKEN_STRING &&
  ------------------
  |  Branch (1350:8): [True: 1.47M, False: 0]
  ------------------
 1351|  1.47M|       strlen(searchKey) ==  len &&
  ------------------
  |  Branch (1351:8): [True: 232k, False: 1.24M]
  ------------------
 1352|   232k|       strncmp(json + tok->start, (const char*)searchKey, len) == 0)
  ------------------
  |  Branch (1352:8): [True: 222k, False: 10.1k]
  ------------------
 1353|   222k|        return 0;
 1354|       |
 1355|  1.25M|    return -1;
 1356|  1.47M|}
ua_types_encoding_json.c:skipObject:
 1325|  1.23M|skipObject(ParseCtx *ctx) {
 1326|  1.23M|    unsigned int end = ctx->tokens[ctx->index].end;
 1327|  61.2M|    do {
 1328|  61.2M|        ctx->index++;
 1329|  61.2M|    } while(ctx->index < ctx->tokensSize &&
  ------------------
  |  Branch (1329:13): [True: 61.2M, False: 11.3k]
  ------------------
 1330|  61.2M|            ctx->tokens[ctx->index].start < end);
  ------------------
  |  Branch (1330:13): [True: 60.0M, False: 1.22M]
  ------------------
 1331|  1.23M|}
ua_types_encoding_json.c:DiagnosticInfo_decodeJson:
 2458|  1.12k|DECODE_JSON(DiagnosticInfo) {
 2459|  1.12k|    UA_DiagnosticInfo *dst = (UA_DiagnosticInfo*)p;
 2460|  1.12k|    CHECK_NULL_SKIP; /* Treat a null value as an empty DiagnosticInfo */
  ------------------
  |  | 1310|  1.12k|#define CHECK_NULL_SKIP do {                         \
  |  | 1311|  1.12k|    if(currentTokenType(ctx) == CJ5_TOKEN_NULL) {    \
  |  |  ------------------
  |  |  |  Branch (1311:8): [True: 382, False: 741]
  |  |  ------------------
  |  | 1312|    382|        ctx->index++;                                \
  |  | 1313|    382|        return UA_STATUSCODE_GOOD;                   \
  |  |  ------------------
  |  |  |  |   17|    382|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  |  |  ------------------
  |  | 1314|    741|    }} while(0)
  |  |  ------------------
  |  |  |  Branch (1314:14): [Folded, False: 741]
  |  |  ------------------
  ------------------
 2461|    741|    CHECK_OBJECT;
  ------------------
  |  | 1305|    741|#define CHECK_OBJECT do {                                \
  |  | 1306|    741|    if(currentTokenType(ctx) != CJ5_TOKEN_OBJECT) {      \
  |  |  ------------------
  |  |  |  Branch (1306:8): [True: 3, False: 738]
  |  |  ------------------
  |  | 1307|      3|        return UA_STATUSCODE_BADDECODINGERROR;           \
  |  |  ------------------
  |  |  |  |   44|      3|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1308|    738|    }} while(0)
  |  |  ------------------
  |  |  |  Branch (1308:14): [Folded, False: 738]
  |  |  ------------------
  ------------------
 2462|       |
 2463|    738|    DecodeEntry entries[7] = {
 2464|    738|        {UA_JSONKEY_SYMBOLICID, &dst->symbolicId, NULL,
 2465|    738|         false, &UA_TYPES[UA_TYPES_INT32]},
  ------------------
  |  |  191|    738|#define UA_TYPES_INT32 5
  ------------------
 2466|    738|        {UA_JSONKEY_NAMESPACEURI, &dst->namespaceUri, NULL,
 2467|    738|         false, &UA_TYPES[UA_TYPES_INT32]},
  ------------------
  |  |  191|    738|#define UA_TYPES_INT32 5
  ------------------
 2468|    738|        {UA_JSONKEY_LOCALIZEDTEXT, &dst->localizedText, NULL,
 2469|    738|         false, &UA_TYPES[UA_TYPES_INT32]},
  ------------------
  |  |  191|    738|#define UA_TYPES_INT32 5
  ------------------
 2470|    738|        {UA_JSONKEY_LOCALE, &dst->locale, NULL,
 2471|    738|         false, &UA_TYPES[UA_TYPES_INT32]},
  ------------------
  |  |  191|    738|#define UA_TYPES_INT32 5
  ------------------
 2472|    738|        {UA_JSONKEY_ADDITIONALINFO, &dst->additionalInfo, NULL,
 2473|    738|         false, &UA_TYPES[UA_TYPES_STRING]},
  ------------------
  |  |  395|    738|#define UA_TYPES_STRING 11
  ------------------
 2474|    738|        {UA_JSONKEY_INNERSTATUSCODE, &dst->innerStatusCode, NULL,
 2475|    738|         false, &UA_TYPES[UA_TYPES_STATUSCODE]},
  ------------------
  |  |  633|    738|#define UA_TYPES_STATUSCODE 18
  ------------------
 2476|    738|        {UA_JSONKEY_INNERDIAGNOSTICINFO, &dst->innerDiagnosticInfo,
 2477|    738|         DiagnosticInfoInner_decodeJson, false, NULL}
 2478|    738|    };
 2479|    738|    status ret = decodeFields(ctx, entries, 7);
 2480|       |
 2481|    738|    dst->hasSymbolicId = entries[0].found;
 2482|    738|    dst->hasNamespaceUri = entries[1].found;
 2483|    738|    dst->hasLocalizedText = entries[2].found;
 2484|    738|    dst->hasLocale = entries[3].found;
 2485|    738|    dst->hasAdditionalInfo = entries[4].found;
 2486|    738|    dst->hasInnerStatusCode = entries[5].found;
 2487|    738|    dst->hasInnerDiagnosticInfo = entries[6].found;
 2488|    738|    return ret;
 2489|    741|}
ua_types_encoding_json.c:isJsonNullable:
  240|  3.47k|isJsonNullable(const UA_DataType *type) {
  241|  3.47k|    return (type->typeKind >= UA_DATATYPEKIND_STRING &&
  ------------------
  |  Branch (241:13): [True: 3.42k, False: 53]
  ------------------
  242|  3.42k|            type->typeKind <= UA_DATATYPEKIND_DIAGNOSTICINFO &&
  ------------------
  |  Branch (242:13): [True: 3.41k, False: 2]
  ------------------
  243|  3.41k|            type->typeKind != UA_DATATYPEKIND_STATUSCODE);
  ------------------
  |  Branch (243:13): [True: 3.41k, False: 4]
  ------------------
  244|  3.47k|}
ua_types_encoding_json.c:Boolean_decodeJson:
 1406|    182|DECODE_JSON(Boolean) {
 1407|    182|    UA_Boolean *dst = (UA_Boolean*)p;
 1408|    182|    CHECK_TOKEN_BOUNDS;
  ------------------
  |  | 1285|    182|#define CHECK_TOKEN_BOUNDS do {                   \
  |  | 1286|    182|    if(ctx->index >= ctx->tokensSize)             \
  |  |  ------------------
  |  |  |  Branch (1286:8): [True: 0, False: 182]
  |  |  ------------------
  |  | 1287|    182|        return UA_STATUSCODE_BADDECODINGERROR;    \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1288|    182|    } while(0)
  |  |  ------------------
  |  |  |  Branch (1288:13): [Folded, False: 182]
  |  |  ------------------
  ------------------
 1409|    182|    CHECK_BOOL;
  ------------------
  |  | 1295|    182|#define CHECK_BOOL do {                                \
  |  | 1296|    182|    if(currentTokenType(ctx) != CJ5_TOKEN_BOOL) {      \
  |  |  ------------------
  |  |  |  Branch (1296:8): [True: 41, False: 141]
  |  |  ------------------
  |  | 1297|     41|        return UA_STATUSCODE_BADDECODINGERROR;         \
  |  |  ------------------
  |  |  |  |   44|     41|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1298|    141|    }} while(0)
  |  |  ------------------
  |  |  |  Branch (1298:14): [Folded, False: 141]
  |  |  ------------------
  ------------------
 1410|    141|    GET_TOKEN;
  ------------------
  |  | 1281|    141|    size_t tokenSize = getTokenLength(&ctx->tokens[ctx->index]);        \
  |  | 1282|    141|    const char* tokenData = &ctx->json5[ctx->tokens[ctx->index].start]; \
  |  | 1283|    141|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (1283:17): [Folded, False: 141]
  |  |  ------------------
  ------------------
 1411|       |
 1412|    141|    if(tokenSize == 4 &&
  ------------------
  |  Branch (1412:8): [True: 75, False: 66]
  ------------------
 1413|     75|       (tokenData[0] | 32) == 't' && (tokenData[1] | 32) == 'r' &&
  ------------------
  |  Branch (1413:8): [True: 75, False: 0]
  |  Branch (1413:38): [True: 75, False: 0]
  ------------------
 1414|     75|       (tokenData[2] | 32) == 'u' && (tokenData[3] | 32) == 'e') {
  ------------------
  |  Branch (1414:8): [True: 75, False: 0]
  |  Branch (1414:38): [True: 75, False: 0]
  ------------------
 1415|     75|        *dst = true;
 1416|     75|    } else if(tokenSize == 5 &&
  ------------------
  |  Branch (1416:15): [True: 66, False: 0]
  ------------------
 1417|     66|              (tokenData[0] | 32) == 'f' && (tokenData[1] | 32) == 'a' &&
  ------------------
  |  Branch (1417:15): [True: 66, False: 0]
  |  Branch (1417:45): [True: 66, False: 0]
  ------------------
 1418|     66|              (tokenData[2] | 32) == 'l' && (tokenData[3] | 32) == 's' &&
  ------------------
  |  Branch (1418:15): [True: 66, False: 0]
  |  Branch (1418:45): [True: 66, False: 0]
  ------------------
 1419|     66|              (tokenData[4] | 32) == 'e') {
  ------------------
  |  Branch (1419:15): [True: 66, False: 0]
  ------------------
 1420|     66|        *dst = false;
 1421|     66|    } else {
 1422|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1423|      0|    }
 1424|       |
 1425|    141|    ctx->index++;
 1426|    141|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    141|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1427|    141|}
ua_types_encoding_json.c:SByte_decodeJson:
 1514|   577k|DECODE_JSON(SByte) {
 1515|   577k|    UA_SByte *dst = (UA_SByte*)p;
 1516|   577k|    CHECK_TOKEN_BOUNDS;
  ------------------
  |  | 1285|   577k|#define CHECK_TOKEN_BOUNDS do {                   \
  |  | 1286|   577k|    if(ctx->index >= ctx->tokensSize)             \
  |  |  ------------------
  |  |  |  Branch (1286:8): [True: 0, False: 577k]
  |  |  ------------------
  |  | 1287|   577k|        return UA_STATUSCODE_BADDECODINGERROR;    \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1288|   577k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (1288:13): [Folded, False: 577k]
  |  |  ------------------
  ------------------
 1517|   577k|    CHECK_NUMBER;
  ------------------
  |  | 1290|   577k|#define CHECK_NUMBER do {                                \
  |  | 1291|   577k|    if(currentTokenType(ctx) != CJ5_TOKEN_NUMBER) {      \
  |  |  ------------------
  |  |  |  Branch (1291:8): [True: 15, False: 577k]
  |  |  ------------------
  |  | 1292|     15|        return UA_STATUSCODE_BADDECODINGERROR;           \
  |  |  ------------------
  |  |  |  |   44|     15|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1293|   577k|    }} while(0)
  |  |  ------------------
  |  |  |  Branch (1293:14): [Folded, False: 577k]
  |  |  ------------------
  ------------------
 1518|   577k|    GET_TOKEN;
  ------------------
  |  | 1281|   577k|    size_t tokenSize = getTokenLength(&ctx->tokens[ctx->index]);        \
  |  | 1282|   577k|    const char* tokenData = &ctx->json5[ctx->tokens[ctx->index].start]; \
  |  | 1283|   577k|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (1283:17): [Folded, False: 577k]
  |  |  ------------------
  ------------------
 1519|   577k|    UA_Int64 out = 0;
 1520|   577k|    UA_StatusCode s = parseSignedInteger(tokenData, tokenSize, &out);
 1521|   577k|    if(s != UA_STATUSCODE_GOOD || out < UA_SBYTE_MIN || out > UA_SBYTE_MAX)
  ------------------
  |  |   17|  1.15M|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out < UA_SBYTE_MIN || out > UA_SBYTE_MAX)
  ------------------
  |  |   64|  1.15M|#define UA_SBYTE_MIN (-128)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out < UA_SBYTE_MIN || out > UA_SBYTE_MAX)
  ------------------
  |  |   65|   576k|#define UA_SBYTE_MAX 127
  ------------------
  |  Branch (1521:8): [True: 61, False: 577k]
  |  Branch (1521:35): [True: 114, False: 576k]
  |  Branch (1521:57): [True: 53, False: 576k]
  ------------------
 1522|    228|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    228|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1523|   576k|    *dst = (UA_SByte)out;
 1524|   576k|    ctx->index++;
 1525|   576k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|   576k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1526|   577k|}
ua_types_encoding_json.c:parseSignedInteger:
 1446|  1.07M|parseSignedInteger(const char *tokenData, size_t tokenSize, UA_Int64 *dst) {
 1447|  1.07M|    size_t len = parseInt64(tokenData, tokenSize, dst);
 1448|  1.07M|    if(len == 0)
  ------------------
  |  Branch (1448:8): [True: 139, False: 1.07M]
  ------------------
 1449|    139|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    139|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1450|       |
 1451|       |    /* There must only be whitespace between the end of the parsed number and
 1452|       |     * the end of the token */
 1453|  2.03M|    for(size_t i = len; i < tokenSize; i++) {
  ------------------
  |  Branch (1453:25): [True: 954k, False: 1.07M]
  ------------------
 1454|   954k|        if(tokenData[i] != ' ' && tokenData[i] -'\t' >= 5)
  ------------------
  |  Branch (1454:12): [True: 611k, False: 342k]
  |  Branch (1454:35): [True: 122, False: 611k]
  ------------------
 1455|    122|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    122|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1456|   954k|    }
 1457|       |
 1458|  1.07M|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  1.07M|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1459|  1.07M|}
ua_types_encoding_json.c:Byte_decodeJson:
 1461|   525k|DECODE_JSON(Byte) {
 1462|   525k|    UA_Byte *dst = (UA_Byte*)p;
 1463|   525k|    CHECK_TOKEN_BOUNDS;
  ------------------
  |  | 1285|   525k|#define CHECK_TOKEN_BOUNDS do {                   \
  |  | 1286|   525k|    if(ctx->index >= ctx->tokensSize)             \
  |  |  ------------------
  |  |  |  Branch (1286:8): [True: 0, False: 525k]
  |  |  ------------------
  |  | 1287|   525k|        return UA_STATUSCODE_BADDECODINGERROR;    \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1288|   525k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (1288:13): [Folded, False: 525k]
  |  |  ------------------
  ------------------
 1464|   525k|    CHECK_NUMBER;
  ------------------
  |  | 1290|   525k|#define CHECK_NUMBER do {                                \
  |  | 1291|   525k|    if(currentTokenType(ctx) != CJ5_TOKEN_NUMBER) {      \
  |  |  ------------------
  |  |  |  Branch (1291:8): [True: 8, False: 525k]
  |  |  ------------------
  |  | 1292|      8|        return UA_STATUSCODE_BADDECODINGERROR;           \
  |  |  ------------------
  |  |  |  |   44|      8|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1293|   525k|    }} while(0)
  |  |  ------------------
  |  |  |  Branch (1293:14): [Folded, False: 525k]
  |  |  ------------------
  ------------------
 1465|   525k|    GET_TOKEN;
  ------------------
  |  | 1281|   525k|    size_t tokenSize = getTokenLength(&ctx->tokens[ctx->index]);        \
  |  | 1282|   525k|    const char* tokenData = &ctx->json5[ctx->tokens[ctx->index].start]; \
  |  | 1283|   525k|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (1283:17): [Folded, False: 525k]
  |  |  ------------------
  ------------------
 1466|   525k|    UA_UInt64 out = 0;
 1467|   525k|    UA_StatusCode s = parseUnsignedInteger(tokenData, tokenSize, &out);
 1468|   525k|    if(s != UA_STATUSCODE_GOOD || out > UA_BYTE_MAX)
  ------------------
  |  |   17|  1.05M|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out > UA_BYTE_MAX)
  ------------------
  |  |   74|   525k|#define UA_BYTE_MAX 255
  ------------------
  |  Branch (1468:8): [True: 31, False: 525k]
  |  Branch (1468:35): [True: 112, False: 525k]
  ------------------
 1469|    143|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    143|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1470|   525k|    *dst = (UA_Byte)out;
 1471|   525k|    ctx->index++;
 1472|   525k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|   525k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1473|   525k|}
ua_types_encoding_json.c:parseUnsignedInteger:
 1430|  3.09M|parseUnsignedInteger(const char *tokenData, size_t tokenSize, UA_UInt64 *dst) {
 1431|  3.09M|    size_t len = parseUInt64(tokenData, tokenSize, dst);
 1432|  3.09M|    if(len == 0)
  ------------------
  |  Branch (1432:8): [True: 81, False: 3.09M]
  ------------------
 1433|     81|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     81|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1434|       |
 1435|       |    /* There must only be whitespace between the end of the parsed number and
 1436|       |     * the end of the token */
 1437|  3.69M|    for(size_t i = len; i < tokenSize; i++) {
  ------------------
  |  Branch (1437:25): [True: 603k, False: 3.09M]
  ------------------
 1438|   603k|        if(tokenData[i] != ' ' && tokenData[i] -'\t' >= 5)
  ------------------
  |  Branch (1438:12): [True: 41.5k, False: 562k]
  |  Branch (1438:35): [True: 130, False: 41.4k]
  ------------------
 1439|    130|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    130|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1440|   603k|    }
 1441|       |
 1442|  3.09M|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  3.09M|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1443|  3.09M|}
ua_types_encoding_json.c:Int16_decodeJson:
 1528|  3.71k|DECODE_JSON(Int16) {
 1529|  3.71k|    UA_Int16 *dst = (UA_Int16*)p;
 1530|  3.71k|    CHECK_TOKEN_BOUNDS;
  ------------------
  |  | 1285|  3.71k|#define CHECK_TOKEN_BOUNDS do {                   \
  |  | 1286|  3.71k|    if(ctx->index >= ctx->tokensSize)             \
  |  |  ------------------
  |  |  |  Branch (1286:8): [True: 0, False: 3.71k]
  |  |  ------------------
  |  | 1287|  3.71k|        return UA_STATUSCODE_BADDECODINGERROR;    \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1288|  3.71k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (1288:13): [Folded, False: 3.71k]
  |  |  ------------------
  ------------------
 1531|  3.71k|    CHECK_NUMBER;
  ------------------
  |  | 1290|  3.71k|#define CHECK_NUMBER do {                                \
  |  | 1291|  3.71k|    if(currentTokenType(ctx) != CJ5_TOKEN_NUMBER) {      \
  |  |  ------------------
  |  |  |  Branch (1291:8): [True: 13, False: 3.70k]
  |  |  ------------------
  |  | 1292|     13|        return UA_STATUSCODE_BADDECODINGERROR;           \
  |  |  ------------------
  |  |  |  |   44|     13|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1293|  3.70k|    }} while(0)
  |  |  ------------------
  |  |  |  Branch (1293:14): [Folded, False: 3.70k]
  |  |  ------------------
  ------------------
 1532|  3.70k|    GET_TOKEN;
  ------------------
  |  | 1281|  3.70k|    size_t tokenSize = getTokenLength(&ctx->tokens[ctx->index]);        \
  |  | 1282|  3.70k|    const char* tokenData = &ctx->json5[ctx->tokens[ctx->index].start]; \
  |  | 1283|  3.70k|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (1283:17): [Folded, False: 3.70k]
  |  |  ------------------
  ------------------
 1533|  3.70k|    UA_Int64 out = 0;
 1534|  3.70k|    UA_StatusCode s = parseSignedInteger(tokenData, tokenSize, &out);
 1535|  3.70k|    if(s != UA_STATUSCODE_GOOD || out < UA_INT16_MIN || out > UA_INT16_MAX)
  ------------------
  |  |   17|  7.41k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out < UA_INT16_MIN || out > UA_INT16_MAX)
  ------------------
  |  |   82|  7.38k|#define UA_INT16_MIN (-32768)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out < UA_INT16_MIN || out > UA_INT16_MAX)
  ------------------
  |  |   83|  3.59k|#define UA_INT16_MAX 32767
  ------------------
  |  Branch (1535:8): [True: 24, False: 3.68k]
  |  Branch (1535:35): [True: 85, False: 3.59k]
  |  Branch (1535:57): [True: 20, False: 3.57k]
  ------------------
 1536|    129|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    129|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1537|  3.57k|    *dst = (UA_Int16)out;
 1538|  3.57k|    ctx->index++;
 1539|  3.57k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  3.57k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1540|  3.70k|}
ua_types_encoding_json.c:UInt16_decodeJson:
 1475|   642k|DECODE_JSON(UInt16) {
 1476|   642k|    UA_UInt16 *dst = (UA_UInt16*)p;
 1477|   642k|    CHECK_TOKEN_BOUNDS;
  ------------------
  |  | 1285|   642k|#define CHECK_TOKEN_BOUNDS do {                   \
  |  | 1286|   642k|    if(ctx->index >= ctx->tokensSize)             \
  |  |  ------------------
  |  |  |  Branch (1286:8): [True: 0, False: 642k]
  |  |  ------------------
  |  | 1287|   642k|        return UA_STATUSCODE_BADDECODINGERROR;    \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1288|   642k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (1288:13): [Folded, False: 642k]
  |  |  ------------------
  ------------------
 1478|   642k|    CHECK_NUMBER;
  ------------------
  |  | 1290|   642k|#define CHECK_NUMBER do {                                \
  |  | 1291|   642k|    if(currentTokenType(ctx) != CJ5_TOKEN_NUMBER) {      \
  |  |  ------------------
  |  |  |  Branch (1291:8): [True: 14, False: 642k]
  |  |  ------------------
  |  | 1292|     14|        return UA_STATUSCODE_BADDECODINGERROR;           \
  |  |  ------------------
  |  |  |  |   44|     14|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1293|   642k|    }} while(0)
  |  |  ------------------
  |  |  |  Branch (1293:14): [Folded, False: 642k]
  |  |  ------------------
  ------------------
 1479|   642k|    GET_TOKEN;
  ------------------
  |  | 1281|   642k|    size_t tokenSize = getTokenLength(&ctx->tokens[ctx->index]);        \
  |  | 1282|   642k|    const char* tokenData = &ctx->json5[ctx->tokens[ctx->index].start]; \
  |  | 1283|   642k|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (1283:17): [Folded, False: 642k]
  |  |  ------------------
  ------------------
 1480|   642k|    UA_UInt64 out = 0;
 1481|   642k|    UA_StatusCode s = parseUnsignedInteger(tokenData, tokenSize, &out);
 1482|   642k|    if(s != UA_STATUSCODE_GOOD || out > UA_UINT16_MAX)
  ------------------
  |  |   17|  1.28M|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out > UA_UINT16_MAX)
  ------------------
  |  |   92|   642k|#define UA_UINT16_MAX 65535
  ------------------
  |  Branch (1482:8): [True: 60, False: 642k]
  |  Branch (1482:35): [True: 233, False: 642k]
  ------------------
 1483|    293|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    293|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1484|   642k|    *dst = (UA_UInt16)out;
 1485|   642k|    ctx->index++;
 1486|   642k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|   642k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1487|   642k|}
ua_types_encoding_json.c:Int32_decodeJson:
 1542|  21.0k|DECODE_JSON(Int32) {
 1543|  21.0k|    UA_Int32 *dst = (UA_Int32*)p;
 1544|  21.0k|    CHECK_TOKEN_BOUNDS;
  ------------------
  |  | 1285|  21.0k|#define CHECK_TOKEN_BOUNDS do {                   \
  |  | 1286|  21.0k|    if(ctx->index >= ctx->tokensSize)             \
  |  |  ------------------
  |  |  |  Branch (1286:8): [True: 0, False: 21.0k]
  |  |  ------------------
  |  | 1287|  21.0k|        return UA_STATUSCODE_BADDECODINGERROR;    \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1288|  21.0k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (1288:13): [Folded, False: 21.0k]
  |  |  ------------------
  ------------------
 1545|  21.0k|    CHECK_NUMBER;
  ------------------
  |  | 1290|  21.0k|#define CHECK_NUMBER do {                                \
  |  | 1291|  21.0k|    if(currentTokenType(ctx) != CJ5_TOKEN_NUMBER) {      \
  |  |  ------------------
  |  |  |  Branch (1291:8): [True: 15, False: 21.0k]
  |  |  ------------------
  |  | 1292|     15|        return UA_STATUSCODE_BADDECODINGERROR;           \
  |  |  ------------------
  |  |  |  |   44|     15|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1293|  21.0k|    }} while(0)
  |  |  ------------------
  |  |  |  Branch (1293:14): [Folded, False: 21.0k]
  |  |  ------------------
  ------------------
 1546|  21.0k|    GET_TOKEN;
  ------------------
  |  | 1281|  21.0k|    size_t tokenSize = getTokenLength(&ctx->tokens[ctx->index]);        \
  |  | 1282|  21.0k|    const char* tokenData = &ctx->json5[ctx->tokens[ctx->index].start]; \
  |  | 1283|  21.0k|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (1283:17): [Folded, False: 21.0k]
  |  |  ------------------
  ------------------
 1547|  21.0k|    UA_Int64 out = 0;
 1548|  21.0k|    UA_StatusCode s = parseSignedInteger(tokenData, tokenSize, &out);
 1549|  21.0k|    if(s != UA_STATUSCODE_GOOD || out < UA_INT32_MIN || out > UA_INT32_MAX)
  ------------------
  |  |   17|  42.1k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out < UA_INT32_MIN || out > UA_INT32_MAX)
  ------------------
  |  |  100|  42.0k|#define UA_INT32_MIN ((int32_t)-2147483648LL)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out < UA_INT32_MIN || out > UA_INT32_MAX)
  ------------------
  |  |  101|  20.8k|#define UA_INT32_MAX 2147483647L
  ------------------
  |  Branch (1549:8): [True: 64, False: 20.9k]
  |  Branch (1549:35): [True: 130, False: 20.8k]
  |  Branch (1549:57): [True: 6, False: 20.8k]
  ------------------
 1550|    200|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    200|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1551|  20.8k|    *dst = (UA_Int32)out;
 1552|  20.8k|    ctx->index++;
 1553|  20.8k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  20.8k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1554|  21.0k|}
ua_types_encoding_json.c:UInt32_decodeJson:
 1489|  1.40M|DECODE_JSON(UInt32) {
 1490|  1.40M|    UA_UInt32 *dst = (UA_UInt32*)p;
 1491|  1.40M|    CHECK_TOKEN_BOUNDS;
  ------------------
  |  | 1285|  1.40M|#define CHECK_TOKEN_BOUNDS do {                   \
  |  | 1286|  1.40M|    if(ctx->index >= ctx->tokensSize)             \
  |  |  ------------------
  |  |  |  Branch (1286:8): [True: 0, False: 1.40M]
  |  |  ------------------
  |  | 1287|  1.40M|        return UA_STATUSCODE_BADDECODINGERROR;    \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1288|  1.40M|    } while(0)
  |  |  ------------------
  |  |  |  Branch (1288:13): [Folded, False: 1.40M]
  |  |  ------------------
  ------------------
 1492|  1.40M|    CHECK_NUMBER;
  ------------------
  |  | 1290|  1.40M|#define CHECK_NUMBER do {                                \
  |  | 1291|  1.40M|    if(currentTokenType(ctx) != CJ5_TOKEN_NUMBER) {      \
  |  |  ------------------
  |  |  |  Branch (1291:8): [True: 34, False: 1.40M]
  |  |  ------------------
  |  | 1292|     34|        return UA_STATUSCODE_BADDECODINGERROR;           \
  |  |  ------------------
  |  |  |  |   44|     34|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1293|  1.40M|    }} while(0)
  |  |  ------------------
  |  |  |  Branch (1293:14): [Folded, False: 1.40M]
  |  |  ------------------
  ------------------
 1493|  1.40M|    GET_TOKEN;
  ------------------
  |  | 1281|  1.40M|    size_t tokenSize = getTokenLength(&ctx->tokens[ctx->index]);        \
  |  | 1282|  1.40M|    const char* tokenData = &ctx->json5[ctx->tokens[ctx->index].start]; \
  |  | 1283|  1.40M|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (1283:17): [Folded, False: 1.40M]
  |  |  ------------------
  ------------------
 1494|  1.40M|    UA_UInt64 out = 0;
 1495|  1.40M|    UA_StatusCode s = parseUnsignedInteger(tokenData, tokenSize, &out);
 1496|  1.40M|    if(s != UA_STATUSCODE_GOOD || out > UA_UINT32_MAX)
  ------------------
  |  |   17|  2.80M|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
                  if(s != UA_STATUSCODE_GOOD || out > UA_UINT32_MAX)
  ------------------
  |  |  110|  1.40M|#define UA_UINT32_MAX 4294967295UL
  ------------------
  |  Branch (1496:8): [True: 67, False: 1.40M]
  |  Branch (1496:35): [True: 78, False: 1.40M]
  ------------------
 1497|    145|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    145|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1498|  1.40M|    *dst = (UA_UInt32)out;
 1499|  1.40M|    ctx->index++;
 1500|  1.40M|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  1.40M|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1501|  1.40M|}
ua_types_encoding_json.c:Int64_decodeJson:
 1556|   476k|DECODE_JSON(Int64) {
 1557|   476k|    UA_Int64 *dst = (UA_Int64*)p;
 1558|   476k|    CHECK_TOKEN_BOUNDS;
  ------------------
  |  | 1285|   476k|#define CHECK_TOKEN_BOUNDS do {                   \
  |  | 1286|   476k|    if(ctx->index >= ctx->tokensSize)             \
  |  |  ------------------
  |  |  |  Branch (1286:8): [True: 0, False: 476k]
  |  |  ------------------
  |  | 1287|   476k|        return UA_STATUSCODE_BADDECODINGERROR;    \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1288|   476k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (1288:13): [Folded, False: 476k]
  |  |  ------------------
  ------------------
 1559|   476k|    GET_TOKEN;
  ------------------
  |  | 1281|   476k|    size_t tokenSize = getTokenLength(&ctx->tokens[ctx->index]);        \
  |  | 1282|   476k|    const char* tokenData = &ctx->json5[ctx->tokens[ctx->index].start]; \
  |  | 1283|   476k|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (1283:17): [Folded, False: 476k]
  |  |  ------------------
  ------------------
 1560|   476k|    UA_StatusCode s = parseSignedInteger(tokenData, tokenSize, dst);
 1561|   476k|    if(s != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|   476k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1561:8): [True: 112, False: 476k]
  ------------------
 1562|    112|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    112|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1563|   476k|    ctx->index++;
 1564|   476k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|   476k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1565|   476k|}
ua_types_encoding_json.c:UInt64_decodeJson:
 1503|   526k|DECODE_JSON(UInt64) {
 1504|   526k|    UA_UInt64 *dst = (UA_UInt64*)p;
 1505|   526k|    CHECK_TOKEN_BOUNDS;
  ------------------
  |  | 1285|   526k|#define CHECK_TOKEN_BOUNDS do {                   \
  |  | 1286|   526k|    if(ctx->index >= ctx->tokensSize)             \
  |  |  ------------------
  |  |  |  Branch (1286:8): [True: 0, False: 526k]
  |  |  ------------------
  |  | 1287|   526k|        return UA_STATUSCODE_BADDECODINGERROR;    \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1288|   526k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (1288:13): [Folded, False: 526k]
  |  |  ------------------
  ------------------
 1506|   526k|    GET_TOKEN;
  ------------------
  |  | 1281|   526k|    size_t tokenSize = getTokenLength(&ctx->tokens[ctx->index]);        \
  |  | 1282|   526k|    const char* tokenData = &ctx->json5[ctx->tokens[ctx->index].start]; \
  |  | 1283|   526k|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (1283:17): [Folded, False: 526k]
  |  |  ------------------
  ------------------
 1507|   526k|    UA_StatusCode s = parseUnsignedInteger(tokenData, tokenSize, dst);
 1508|   526k|    if(s != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|   526k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1508:8): [True: 53, False: 526k]
  ------------------
 1509|     53|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     53|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1510|   526k|    ctx->index++;
 1511|   526k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|   526k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1512|   526k|}
ua_types_encoding_json.c:Float_decodeJson:
 1628|   514k|DECODE_JSON(Float) {
 1629|   514k|    UA_Float *dst = (UA_Float*)p;
 1630|   514k|    UA_Double v = 0.0;
 1631|       |    UA_StatusCode res = Double_decodeJson(ctx, &v, NULL);
 1632|   514k|    *dst = (UA_Float)v;
 1633|   514k|    return res;
 1634|   514k|}
ua_types_encoding_json.c:Double_decodeJson:
 1568|   653k|DECODE_JSON(Double) {
 1569|   653k|    UA_Double *dst = (UA_Double*)p;
 1570|   653k|    CHECK_TOKEN_BOUNDS;
  ------------------
  |  | 1285|   653k|#define CHECK_TOKEN_BOUNDS do {                   \
  |  | 1286|   653k|    if(ctx->index >= ctx->tokensSize)             \
  |  |  ------------------
  |  |  |  Branch (1286:8): [True: 0, False: 653k]
  |  |  ------------------
  |  | 1287|   653k|        return UA_STATUSCODE_BADDECODINGERROR;    \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1288|   653k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (1288:13): [Folded, False: 653k]
  |  |  ------------------
  ------------------
 1571|   653k|    GET_TOKEN;
  ------------------
  |  | 1281|   653k|    size_t tokenSize = getTokenLength(&ctx->tokens[ctx->index]);        \
  |  | 1282|   653k|    const char* tokenData = &ctx->json5[ctx->tokens[ctx->index].start]; \
  |  | 1283|   653k|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (1283:17): [Folded, False: 653k]
  |  |  ------------------
  ------------------
 1572|       |
 1573|       |    /* https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/
 1574|       |     * Maximum digit counts for select IEEE floating-point formats: 1074
 1575|       |     * Sanity check.
 1576|       |     */
 1577|   653k|    if(tokenSize > 2000)
  ------------------
  |  Branch (1577:8): [True: 2, False: 653k]
  ------------------
 1578|      2|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      2|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1579|       |
 1580|   653k|    cj5_token_type tokenType = currentTokenType(ctx);
 1581|       |
 1582|       |    /* It could be a String with Nan, Infinity */
 1583|   653k|    if(tokenType == CJ5_TOKEN_STRING) {
  ------------------
  |  Branch (1583:8): [True: 979, False: 652k]
  ------------------
 1584|    979|        ctx->index++;
 1585|       |
 1586|    979|        if(tokenSize == 8 && memcmp(tokenData, "Infinity", 8) == 0) {
  ------------------
  |  Branch (1586:12): [True: 228, False: 751]
  |  Branch (1586:30): [True: 195, False: 33]
  ------------------
 1587|    195|            *dst = INFINITY;
 1588|    195|            return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    195|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1589|    195|        }
 1590|       |
 1591|    784|        if(tokenSize == 9 && memcmp(tokenData, "-Infinity", 9) == 0) {
  ------------------
  |  Branch (1591:12): [True: 258, False: 526]
  |  Branch (1591:30): [True: 234, False: 24]
  ------------------
 1592|       |            /* workaround an MSVC 2013 issue */
 1593|    234|            *dst = -INFINITY;
 1594|    234|            return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    234|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1595|    234|        }
 1596|       |
 1597|    550|        if(tokenSize == 3 && memcmp(tokenData, "NaN", 3) == 0) {
  ------------------
  |  Branch (1597:12): [True: 231, False: 319]
  |  Branch (1597:30): [True: 211, False: 20]
  ------------------
 1598|    211|            *dst = NAN;
 1599|    211|            return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    211|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1600|    211|        }
 1601|       |
 1602|    339|        if(tokenSize == 4 && memcmp(tokenData, "-NaN", 4) == 0) {
  ------------------
  |  Branch (1602:12): [True: 225, False: 114]
  |  Branch (1602:30): [True: 209, False: 16]
  ------------------
 1603|    209|            *dst = NAN;
 1604|    209|            return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    209|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1605|    209|        }
 1606|       |
 1607|    130|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    130|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1608|    339|    }
 1609|       |
 1610|   652k|    if(tokenType != CJ5_TOKEN_NUMBER)
  ------------------
  |  Branch (1610:8): [True: 4, False: 652k]
  ------------------
 1611|      4|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      4|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1612|       |
 1613|   652k|    size_t len = parseDouble(tokenData, tokenSize, dst);
 1614|   652k|    if(len == 0)
  ------------------
  |  Branch (1614:8): [True: 2, False: 652k]
  ------------------
 1615|      2|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      2|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1616|       |
 1617|       |    /* There must only be whitespace between the end of the parsed number and
 1618|       |     * the end of the token */
 1619|   652k|    for(size_t i = len; i < tokenSize; i++) {
  ------------------
  |  Branch (1619:25): [True: 32, False: 652k]
  ------------------
 1620|     32|        if(tokenData[i] != ' ' && tokenData[i] -'\t' >= 5)
  ------------------
  |  Branch (1620:12): [True: 32, False: 0]
  |  Branch (1620:35): [True: 32, False: 0]
  ------------------
 1621|     32|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     32|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1622|     32|    }
 1623|       |
 1624|   652k|    ctx->index++;
 1625|   652k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|   652k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1626|   652k|}
ua_types_encoding_json.c:String_decodeJson:
 1646|  92.7k|DECODE_JSON(String) {
 1647|  92.7k|    UA_String *dst = (UA_String*)p;
 1648|  92.7k|    CHECK_TOKEN_BOUNDS;
  ------------------
  |  | 1285|  92.7k|#define CHECK_TOKEN_BOUNDS do {                   \
  |  | 1286|  92.7k|    if(ctx->index >= ctx->tokensSize)             \
  |  |  ------------------
  |  |  |  Branch (1286:8): [True: 0, False: 92.7k]
  |  |  ------------------
  |  | 1287|  92.7k|        return UA_STATUSCODE_BADDECODINGERROR;    \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1288|  92.7k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (1288:13): [Folded, False: 92.7k]
  |  |  ------------------
  ------------------
 1649|  92.7k|    CHECK_NULL_SKIP;
  ------------------
  |  | 1310|  92.7k|#define CHECK_NULL_SKIP do {                         \
  |  | 1311|  92.7k|    if(currentTokenType(ctx) == CJ5_TOKEN_NULL) {    \
  |  |  ------------------
  |  |  |  Branch (1311:8): [True: 656, False: 92.0k]
  |  |  ------------------
  |  | 1312|    656|        ctx->index++;                                \
  |  | 1313|    656|        return UA_STATUSCODE_GOOD;                   \
  |  |  ------------------
  |  |  |  |   17|    656|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  |  |  ------------------
  |  | 1314|  92.0k|    }} while(0)
  |  |  ------------------
  |  |  |  Branch (1314:14): [Folded, False: 92.0k]
  |  |  ------------------
  ------------------
 1650|  92.0k|    CHECK_STRING;
  ------------------
  |  | 1300|  92.0k|#define CHECK_STRING do {                                \
  |  | 1301|  92.0k|    if(currentTokenType(ctx) != CJ5_TOKEN_STRING) {      \
  |  |  ------------------
  |  |  |  Branch (1301:8): [True: 946, False: 91.1k]
  |  |  ------------------
  |  | 1302|    946|        return UA_STATUSCODE_BADDECODINGERROR;           \
  |  |  ------------------
  |  |  |  |   44|    946|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1303|  91.1k|    }} while(0)
  |  |  ------------------
  |  |  |  Branch (1303:14): [Folded, False: 91.1k]
  |  |  ------------------
  ------------------
 1651|  91.1k|    GET_TOKEN;
  ------------------
  |  | 1281|  91.1k|    size_t tokenSize = getTokenLength(&ctx->tokens[ctx->index]);        \
  |  | 1282|  91.1k|    const char* tokenData = &ctx->json5[ctx->tokens[ctx->index].start]; \
  |  | 1283|  91.1k|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (1283:17): [Folded, False: 91.1k]
  |  |  ------------------
  ------------------
 1652|  91.1k|    (void)tokenData;
 1653|       |
 1654|       |    /* Empty string? */
 1655|  91.1k|    if(tokenSize == 0) {
  ------------------
  |  Branch (1655:8): [True: 2.57k, False: 88.5k]
  ------------------
 1656|  2.57k|        dst->data = (UA_Byte*)UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|  2.57k|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
 1657|  2.57k|        dst->length = 0;
 1658|  2.57k|        ctx->index++;
 1659|  2.57k|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  2.57k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1660|  2.57k|    }
 1661|       |
 1662|       |    /* The decoded utf8 is at most of the same length as the source string */
 1663|  88.5k|    char *outBuf = (char*)UA_malloc(tokenSize+1);
  ------------------
  |  |   18|  88.5k|#define UA_malloc(size) UA_mallocSingleton(size)
  ------------------
 1664|  88.5k|    if(!outBuf)
  ------------------
  |  Branch (1664:8): [True: 13, False: 88.5k]
  ------------------
 1665|     13|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|     13|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 1666|       |
 1667|       |    /* Decode the string */
 1668|  88.5k|    cj5_result r;
 1669|  88.5k|    r.tokens = ctx->tokens;
 1670|  88.5k|    r.num_tokens = (unsigned int)ctx->tokensSize;
 1671|  88.5k|    r.json5 = ctx->json5;
 1672|  88.5k|    unsigned int len = 0;
 1673|  88.5k|    cj5_error_code err = cj5_get_str(&r, (unsigned int)ctx->index, outBuf, &len);
 1674|  88.5k|    if(err != CJ5_ERROR_NONE) {
  ------------------
  |  Branch (1674:8): [True: 183, False: 88.3k]
  ------------------
 1675|    183|        UA_free(outBuf);
  ------------------
  |  |   19|    183|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1676|    183|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    183|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1677|    183|    }
 1678|       |
 1679|       |    /* Set the output */
 1680|  88.3k|    dst->length = len;
 1681|  88.3k|    if(dst->length > 0) {
  ------------------
  |  Branch (1681:8): [True: 88.3k, False: 0]
  ------------------
 1682|  88.3k|        dst->data = (UA_Byte*)outBuf;
 1683|  88.3k|    } else {
 1684|      0|        dst->data = (UA_Byte*)UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|      0|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
 1685|      0|        UA_free(outBuf);
  ------------------
  |  |   19|      0|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 1686|      0|    }
 1687|       |
 1688|  88.3k|    ctx->index++;
 1689|  88.3k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  88.3k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1690|  88.5k|}
ua_types_encoding_json.c:DateTime_decodeJson:
 1845|    678|DECODE_JSON(DateTime) {
 1846|    678|    UA_DateTime *dst = (UA_DateTime*)p;
 1847|    678|    CHECK_TOKEN_BOUNDS;
  ------------------
  |  | 1285|    678|#define CHECK_TOKEN_BOUNDS do {                   \
  |  | 1286|    678|    if(ctx->index >= ctx->tokensSize)             \
  |  |  ------------------
  |  |  |  Branch (1286:8): [True: 0, False: 678]
  |  |  ------------------
  |  | 1287|    678|        return UA_STATUSCODE_BADDECODINGERROR;    \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1288|    678|    } while(0)
  |  |  ------------------
  |  |  |  Branch (1288:13): [Folded, False: 678]
  |  |  ------------------
  ------------------
 1848|    678|    CHECK_NULL_SKIP;
  ------------------
  |  | 1310|    678|#define CHECK_NULL_SKIP do {                         \
  |  | 1311|    678|    if(currentTokenType(ctx) == CJ5_TOKEN_NULL) {    \
  |  |  ------------------
  |  |  |  Branch (1311:8): [True: 434, False: 244]
  |  |  ------------------
  |  | 1312|    434|        ctx->index++;                                \
  |  | 1313|    434|        return UA_STATUSCODE_GOOD;                   \
  |  |  ------------------
  |  |  |  |   17|    434|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  |  |  ------------------
  |  | 1314|    434|    }} while(0)
  |  |  ------------------
  |  |  |  Branch (1314:14): [Folded, False: 244]
  |  |  ------------------
  ------------------
 1849|    244|    CHECK_STRING;
  ------------------
  |  | 1300|    244|#define CHECK_STRING do {                                \
  |  | 1301|    244|    if(currentTokenType(ctx) != CJ5_TOKEN_STRING) {      \
  |  |  ------------------
  |  |  |  Branch (1301:8): [True: 10, False: 234]
  |  |  ------------------
  |  | 1302|     10|        return UA_STATUSCODE_BADDECODINGERROR;           \
  |  |  ------------------
  |  |  |  |   44|     10|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1303|    234|    }} while(0)
  |  |  ------------------
  |  |  |  Branch (1303:14): [Folded, False: 234]
  |  |  ------------------
  ------------------
 1850|    234|    GET_TOKEN;
  ------------------
  |  | 1281|    234|    size_t tokenSize = getTokenLength(&ctx->tokens[ctx->index]);        \
  |  | 1282|    234|    const char* tokenData = &ctx->json5[ctx->tokens[ctx->index].start]; \
  |  | 1283|    234|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (1283:17): [Folded, False: 234]
  |  |  ------------------
  ------------------
 1851|       |
 1852|       |    /* YYYY-MM-DDTHH:MM:SS[.fffffff]Z */
 1853|    234|    if(tokenSize < 20 || tokenData[tokenSize-1] != 'Z' ||
  ------------------
  |  Branch (1853:8): [True: 14, False: 220]
  |  Branch (1853:26): [True: 16, False: 204]
  ------------------
 1854|    204|       tokenData[4] != '-' || tokenData[7] != '-' ||
  ------------------
  |  Branch (1854:8): [True: 13, False: 191]
  |  Branch (1854:31): [True: 8, False: 183]
  ------------------
 1855|    183|       tokenData[10] != 'T' || tokenData[13] != ':' ||
  ------------------
  |  Branch (1855:8): [True: 2, False: 181]
  |  Branch (1855:32): [True: 11, False: 170]
  ------------------
 1856|    170|       tokenData[16] != ':')
  ------------------
  |  Branch (1856:8): [True: 10, False: 160]
  ------------------
 1857|     74|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     74|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1858|       |
 1859|    160|    const size_t positions[6] = {0, 5, 8, 11, 14, 17};
 1860|    160|    UA_UInt16 values[6];
 1861|  1.07k|    for(size_t i = 0; i < 6; i++) {
  ------------------
  |  Branch (1861:23): [True: 921, False: 151]
  ------------------
 1862|    921|        UA_UInt64 value = 0;
 1863|    921|        size_t digits = (i == 0) ? 4 : 2;
  ------------------
  |  Branch (1863:25): [True: 160, False: 761]
  ------------------
 1864|    921|        if(parseUInt64(&tokenData[positions[i]], digits, &value) != digits)
  ------------------
  |  Branch (1864:12): [True: 9, False: 912]
  ------------------
 1865|      9|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      9|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1866|    912|        values[i] = (UA_UInt16)value;
 1867|    912|    }
 1868|       |
 1869|    151|    UA_UInt16 daysInMonth = 31;
 1870|    151|    switch(values[1]) {
 1871|     29|    case 2:
  ------------------
  |  Branch (1871:5): [True: 29, False: 122]
  ------------------
 1872|     29|        daysInMonth = (UA_UInt16)
 1873|     29|            (((values[0] % 4 == 0 && values[0] % 100 != 0) ||
  ------------------
  |  Branch (1873:16): [True: 10, False: 19]
  |  Branch (1873:38): [True: 8, False: 2]
  ------------------
 1874|     21|              values[0] % 400 == 0) ? 29 : 28);
  ------------------
  |  Branch (1874:15): [True: 1, False: 20]
  ------------------
 1875|     29|        break;
 1876|     33|    case 4: case 6: case 9: case 11:
  ------------------
  |  Branch (1876:5): [True: 3, False: 148]
  |  Branch (1876:13): [True: 21, False: 130]
  |  Branch (1876:21): [True: 3, False: 148]
  |  Branch (1876:29): [True: 6, False: 145]
  ------------------
 1877|     33|        daysInMonth = 30;
 1878|     33|        break;
 1879|     89|    default:
  ------------------
  |  Branch (1879:5): [True: 89, False: 62]
  ------------------
 1880|     89|        break;
 1881|    151|    }
 1882|    151|    if(values[0] < 1 || values[1] < 1 || values[1] > 12 ||
  ------------------
  |  Branch (1882:8): [True: 2, False: 149]
  |  Branch (1882:25): [True: 1, False: 148]
  |  Branch (1882:42): [True: 4, False: 144]
  ------------------
 1883|    144|       values[2] < 1 || values[2] > daysInMonth || values[3] > 23 ||
  ------------------
  |  Branch (1883:8): [True: 1, False: 143]
  |  Branch (1883:25): [True: 3, False: 140]
  |  Branch (1883:52): [True: 1, False: 139]
  ------------------
 1884|    139|       values[4] > 59 || values[5] > 59)
  ------------------
  |  Branch (1884:8): [True: 1, False: 138]
  |  Branch (1884:26): [True: 1, False: 137]
  ------------------
 1885|     14|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     14|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1886|       |
 1887|    137|    size_t pos = 19;
 1888|    137|    UA_UInt32 fraction = 0;
 1889|    137|    size_t fractionDigits = 0;
 1890|    137|    if(pos < tokenSize - 1 &&
  ------------------
  |  Branch (1890:8): [True: 74, False: 63]
  ------------------
 1891|     74|       (tokenData[pos] == '.' || tokenData[pos] == ',')) {
  ------------------
  |  Branch (1891:9): [True: 6, False: 68]
  |  Branch (1891:34): [True: 56, False: 12]
  ------------------
 1892|     62|        pos++;
 1893|  1.19M|        while(pos < tokenSize - 1 && tokenData[pos] >= '0' &&
  ------------------
  |  Branch (1893:15): [True: 1.19M, False: 27]
  |  Branch (1893:38): [True: 1.19M, False: 17]
  ------------------
 1894|  1.19M|              tokenData[pos] <= '9') {
  ------------------
  |  Branch (1894:15): [True: 1.19M, False: 18]
  ------------------
 1895|  1.19M|            if(fractionDigits < 7)
  ------------------
  |  Branch (1895:16): [True: 288, False: 1.19M]
  ------------------
 1896|    288|                fraction = fraction * 10 + (UA_UInt32)(tokenData[pos] - '0');
 1897|  1.19M|            fractionDigits++;
 1898|  1.19M|            pos++;
 1899|  1.19M|        }
 1900|     62|        if(fractionDigits == 0)
  ------------------
  |  Branch (1900:12): [True: 13, False: 49]
  ------------------
 1901|     13|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     13|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1902|    104|        while(fractionDigits < 7) {
  ------------------
  |  Branch (1902:15): [True: 55, False: 49]
  ------------------
 1903|     55|            fraction *= 10;
 1904|     55|            fractionDigits++;
 1905|     55|        }
 1906|     49|    }
 1907|    124|    if(pos != tokenSize - 1)
  ------------------
  |  Branch (1907:8): [True: 36, False: 88]
  ------------------
 1908|     36|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     36|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1909|       |
 1910|       |    /* The minimum JSON DateTime is the null value. */
 1911|     88|    if(values[0] == 1 && values[1] == 1 && values[2] == 1 &&
  ------------------
  |  Branch (1911:8): [True: 17, False: 71]
  |  Branch (1911:26): [True: 14, False: 3]
  |  Branch (1911:44): [True: 11, False: 3]
  ------------------
 1912|     11|       values[3] == 0 && values[4] == 0 && values[5] == 0 && fraction == 0) {
  ------------------
  |  Branch (1912:8): [True: 7, False: 4]
  |  Branch (1912:26): [True: 6, False: 1]
  |  Branch (1912:44): [True: 1, False: 5]
  |  Branch (1912:62): [True: 1, False: 0]
  ------------------
 1913|      1|        *dst = 0;
 1914|     87|    } else {
 1915|     87|        UA_DateTimeStruct date;
 1916|     87|        memset(&date, 0, sizeof(date));
 1917|     87|        date.year = (UA_Int16)values[0];
 1918|     87|        date.month = values[1];
 1919|     87|        date.day = values[2];
 1920|     87|        date.hour = values[3];
 1921|     87|        date.min = values[4];
 1922|     87|        date.sec = values[5];
 1923|     87|        date.milliSec = (UA_UInt16)(fraction / 10000);
 1924|     87|        date.microSec = (UA_UInt16)((fraction % 10000) / 10);
 1925|     87|        date.nanoSec = (UA_UInt16)((fraction % 10) * 100);
 1926|     87|        *dst = UA_DateTime_fromStruct(date);
 1927|     87|    }
 1928|       |
 1929|     88|    ctx->index++;
 1930|     88|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     88|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1931|    124|}
ua_types_encoding_json.c:Guid_decodeJson:
 1636|     77|DECODE_JSON(Guid) {
 1637|     77|    UA_Guid *dst = (UA_Guid*)p;
 1638|     77|    CHECK_TOKEN_BOUNDS;
  ------------------
  |  | 1285|     77|#define CHECK_TOKEN_BOUNDS do {                   \
  |  | 1286|     77|    if(ctx->index >= ctx->tokensSize)             \
  |  |  ------------------
  |  |  |  Branch (1286:8): [True: 0, False: 77]
  |  |  ------------------
  |  | 1287|     77|        return UA_STATUSCODE_BADDECODINGERROR;    \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1288|     77|    } while(0)
  |  |  ------------------
  |  |  |  Branch (1288:13): [Folded, False: 77]
  |  |  ------------------
  ------------------
 1639|     77|    CHECK_STRING;
  ------------------
  |  | 1300|     77|#define CHECK_STRING do {                                \
  |  | 1301|     77|    if(currentTokenType(ctx) != CJ5_TOKEN_STRING) {      \
  |  |  ------------------
  |  |  |  Branch (1301:8): [True: 16, False: 61]
  |  |  ------------------
  |  | 1302|     16|        return UA_STATUSCODE_BADDECODINGERROR;           \
  |  |  ------------------
  |  |  |  |   44|     16|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1303|     61|    }} while(0)
  |  |  ------------------
  |  |  |  Branch (1303:14): [Folded, False: 61]
  |  |  ------------------
  ------------------
 1640|     61|    GET_TOKEN;
  ------------------
  |  | 1281|     61|    size_t tokenSize = getTokenLength(&ctx->tokens[ctx->index]);        \
  |  | 1282|     61|    const char* tokenData = &ctx->json5[ctx->tokens[ctx->index].start]; \
  |  | 1283|     61|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (1283:17): [Folded, False: 61]
  |  |  ------------------
  ------------------
 1641|     61|    UA_String str = {tokenSize, (UA_Byte*)(uintptr_t)tokenData};
 1642|     61|    ctx->index++;
 1643|     61|    return UA_Guid_parse(dst, str);
 1644|     77|}
ua_types_encoding_json.c:ByteString_decodeJson:
 1741|  10.1k|DECODE_JSON(ByteString) {
 1742|  10.1k|    UA_ByteString *dst = (UA_ByteString*)p;
 1743|  10.1k|    CHECK_TOKEN_BOUNDS;
  ------------------
  |  | 1285|  10.1k|#define CHECK_TOKEN_BOUNDS do {                   \
  |  | 1286|  10.1k|    if(ctx->index >= ctx->tokensSize)             \
  |  |  ------------------
  |  |  |  Branch (1286:8): [True: 0, False: 10.1k]
  |  |  ------------------
  |  | 1287|  10.1k|        return UA_STATUSCODE_BADDECODINGERROR;    \
  |  |  ------------------
  |  |  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1288|  10.1k|    } while(0)
  |  |  ------------------
  |  |  |  Branch (1288:13): [Folded, False: 10.1k]
  |  |  ------------------
  ------------------
 1744|  10.1k|    CHECK_NULL_SKIP;
  ------------------
  |  | 1310|  10.1k|#define CHECK_NULL_SKIP do {                         \
  |  | 1311|  10.1k|    if(currentTokenType(ctx) == CJ5_TOKEN_NULL) {    \
  |  |  ------------------
  |  |  |  Branch (1311:8): [True: 394, False: 9.75k]
  |  |  ------------------
  |  | 1312|    394|        ctx->index++;                                \
  |  | 1313|    394|        return UA_STATUSCODE_GOOD;                   \
  |  |  ------------------
  |  |  |  |   17|    394|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  |  |  ------------------
  |  | 1314|  9.75k|    }} while(0)
  |  |  ------------------
  |  |  |  Branch (1314:14): [Folded, False: 9.75k]
  |  |  ------------------
  ------------------
 1745|  9.75k|    CHECK_STRING;
  ------------------
  |  | 1300|  9.75k|#define CHECK_STRING do {                                \
  |  | 1301|  9.75k|    if(currentTokenType(ctx) != CJ5_TOKEN_STRING) {      \
  |  |  ------------------
  |  |  |  Branch (1301:8): [True: 14, False: 9.74k]
  |  |  ------------------
  |  | 1302|     14|        return UA_STATUSCODE_BADDECODINGERROR;           \
  |  |  ------------------
  |  |  |  |   44|     14|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1303|  9.74k|    }} while(0)
  |  |  ------------------
  |  |  |  Branch (1303:14): [Folded, False: 9.74k]
  |  |  ------------------
  ------------------
 1746|  9.74k|    GET_TOKEN;
  ------------------
  |  | 1281|  9.74k|    size_t tokenSize = getTokenLength(&ctx->tokens[ctx->index]);        \
  |  | 1282|  9.74k|    const char* tokenData = &ctx->json5[ctx->tokens[ctx->index].start]; \
  |  | 1283|  9.74k|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (1283:17): [Folded, False: 9.74k]
  |  |  ------------------
  ------------------
 1747|       |
 1748|       |    /* Empty bytestring? */
 1749|  9.74k|    if(tokenSize == 0) {
  ------------------
  |  Branch (1749:8): [True: 1.85k, False: 7.88k]
  ------------------
 1750|  1.85k|        dst->data = (UA_Byte*)UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|  1.85k|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
 1751|  1.85k|        dst->length = 0;
 1752|  7.88k|    } else {
 1753|  7.88k|        size_t flen = 0;
 1754|  7.88k|        unsigned char* unB64 =
 1755|  7.88k|            UA_unbase64((const unsigned char*)tokenData, tokenSize, &flen);
 1756|  7.88k|        if(unB64 == 0)
  ------------------
  |  Branch (1756:12): [True: 67, False: 7.82k]
  ------------------
 1757|     67|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     67|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1758|  7.82k|        dst->data = (u8*)unB64;
 1759|  7.82k|        dst->length = flen;
 1760|  7.82k|    }
 1761|       |
 1762|  9.67k|    ctx->index++;
 1763|  9.67k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  9.67k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1764|  9.74k|}
ua_types_encoding_json.c:NodeId_decodeJson:
 1822|  32.4k|DECODE_JSON(NodeId) {
 1823|  32.4k|    UA_NodeId *dst = (UA_NodeId*)p;
 1824|  32.4k|    UA_String str;
 1825|  32.4k|    UA_String_init(&str);
 1826|  32.4k|    status res = String_decodeJson(ctx, &str, NULL);
 1827|  32.4k|    if(res == UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  32.4k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1827:8): [True: 31.4k, False: 993]
  ------------------
 1828|  31.4k|        res = UA_NodeId_parseEx(dst, str, ctx->namespaceMapping);
 1829|  32.4k|    UA_String_clear(&str);
 1830|  32.4k|    return res;
 1831|  32.4k|}
ua_types_encoding_json.c:ExpandedNodeId_decodeJson:
 1833|  3.58k|DECODE_JSON(ExpandedNodeId) {
 1834|  3.58k|    UA_ExpandedNodeId *dst = (UA_ExpandedNodeId*)p;
 1835|  3.58k|    UA_String str;
 1836|  3.58k|    UA_String_init(&str);
 1837|  3.58k|    status res = String_decodeJson(ctx, &str, NULL);
 1838|  3.58k|    if(res == UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  3.58k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1838:8): [True: 3.57k, False: 12]
  ------------------
 1839|  3.57k|        res = UA_ExpandedNodeId_parseEx(dst, str, ctx->namespaceMapping,
 1840|  3.57k|                                        ctx->serverUrisSize, ctx->serverUris);
 1841|  3.58k|    UA_String_clear(&str);
 1842|  3.58k|    return res;
 1843|  3.58k|}
ua_types_encoding_json.c:StatusCode_decodeJson:
 1933|    272|DECODE_JSON(StatusCode) {
 1934|    272|    UA_StatusCode *dst = (UA_StatusCode*)p;
 1935|    272|    CHECK_OBJECT;
  ------------------
  |  | 1305|    272|#define CHECK_OBJECT do {                                \
  |  | 1306|    272|    if(currentTokenType(ctx) != CJ5_TOKEN_OBJECT) {      \
  |  |  ------------------
  |  |  |  Branch (1306:8): [True: 9, False: 263]
  |  |  ------------------
  |  | 1307|      9|        return UA_STATUSCODE_BADDECODINGERROR;           \
  |  |  ------------------
  |  |  |  |   44|      9|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1308|    263|    }} while(0)
  |  |  ------------------
  |  |  |  Branch (1308:14): [Folded, False: 263]
  |  |  ------------------
  ------------------
 1936|    263|    DecodeEntry entries[2] = {
 1937|    263|        {UA_JSONKEY_CODE, dst, NULL, false, &UA_TYPES[UA_TYPES_UINT32]},
  ------------------
  |  |  225|    263|#define UA_TYPES_UINT32 6
  ------------------
 1938|    263|        {UA_JSONKEY_SYMBOL, NULL, NULL, false, NULL}
 1939|    263|    };
 1940|    263|    return decodeFields(ctx, entries, 2);
 1941|    272|}
ua_types_encoding_json.c:QualifiedName_decodeJson:
 1776|  25.0k|DECODE_JSON(QualifiedName) {
 1777|  25.0k|    UA_QualifiedName *dst = (UA_QualifiedName*)p;
 1778|  25.0k|    CHECK_NULL_SKIP;
  ------------------
  |  | 1310|  25.0k|#define CHECK_NULL_SKIP do {                         \
  |  | 1311|  25.0k|    if(currentTokenType(ctx) == CJ5_TOKEN_NULL) {    \
  |  |  ------------------
  |  |  |  Branch (1311:8): [True: 66, False: 24.9k]
  |  |  ------------------
  |  | 1312|     66|        ctx->index++;                                \
  |  | 1313|     66|        return UA_STATUSCODE_GOOD;                   \
  |  |  ------------------
  |  |  |  |   17|     66|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  |  |  ------------------
  |  | 1314|  24.9k|    }} while(0)
  |  |  ------------------
  |  |  |  Branch (1314:14): [Folded, False: 24.9k]
  |  |  ------------------
  ------------------
 1779|  24.9k|    UA_String str;
 1780|  24.9k|    UA_String_init(&str);
 1781|  24.9k|    status res = String_decodeJson(ctx, &str, NULL);
 1782|  24.9k|    if(res == UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  24.9k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1782:8): [True: 24.9k, False: 20]
  ------------------
 1783|  24.9k|        res = UA_QualifiedName_parseEx(dst, str, ctx->namespaceMapping);
 1784|  24.9k|    UA_String_clear(&str);
 1785|  24.9k|    return res;
 1786|  25.0k|}
ua_types_encoding_json.c:LocalizedText_decodeJson:
 1766|  1.65k|DECODE_JSON(LocalizedText) {
 1767|  1.65k|    UA_LocalizedText *dst = (UA_LocalizedText*)p;
 1768|  1.65k|    CHECK_OBJECT;
  ------------------
  |  | 1305|  1.65k|#define CHECK_OBJECT do {                                \
  |  | 1306|  1.65k|    if(currentTokenType(ctx) != CJ5_TOKEN_OBJECT) {      \
  |  |  ------------------
  |  |  |  Branch (1306:8): [True: 9, False: 1.64k]
  |  |  ------------------
  |  | 1307|      9|        return UA_STATUSCODE_BADDECODINGERROR;           \
  |  |  ------------------
  |  |  |  |   44|      9|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1308|  1.64k|    }} while(0)
  |  |  ------------------
  |  |  |  Branch (1308:14): [Folded, False: 1.64k]
  |  |  ------------------
  ------------------
 1769|  1.64k|    DecodeEntry entries[2] = {
 1770|  1.64k|        {UA_JSONKEY_LOCALE, &dst->locale, NULL, false, &UA_TYPES[UA_TYPES_STRING]},
  ------------------
  |  |  395|  1.64k|#define UA_TYPES_STRING 11
  ------------------
 1771|  1.64k|        {UA_JSONKEY_TEXT, &dst->text, NULL, false, &UA_TYPES[UA_TYPES_STRING]}
  ------------------
  |  |  395|  1.64k|#define UA_TYPES_STRING 11
  ------------------
 1772|  1.64k|    };
 1773|  1.64k|    return decodeFields(ctx, entries, 2);
 1774|  1.65k|}
ua_types_encoding_json.c:ExtensionObject_decodeJson:
 2295|  27.7k|DECODE_JSON(ExtensionObject) {
 2296|  27.7k|    UA_ExtensionObject *dst = (UA_ExtensionObject*)p;
 2297|  27.7k|    CHECK_NULL_SKIP; /* Treat a null value as an empty DataValue */
  ------------------
  |  | 1310|  27.7k|#define CHECK_NULL_SKIP do {                         \
  |  | 1311|  27.7k|    if(currentTokenType(ctx) == CJ5_TOKEN_NULL) {    \
  |  |  ------------------
  |  |  |  Branch (1311:8): [True: 0, False: 27.7k]
  |  |  ------------------
  |  | 1312|      0|        ctx->index++;                                \
  |  | 1313|      0|        return UA_STATUSCODE_GOOD;                   \
  |  |  ------------------
  |  |  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  |  |  ------------------
  |  | 1314|  27.7k|    }} while(0)
  |  |  ------------------
  |  |  |  Branch (1314:14): [Folded, False: 27.7k]
  |  |  ------------------
  ------------------
 2298|  27.7k|    CHECK_OBJECT;
  ------------------
  |  | 1305|  27.7k|#define CHECK_OBJECT do {                                \
  |  | 1306|  27.7k|    if(currentTokenType(ctx) != CJ5_TOKEN_OBJECT) {      \
  |  |  ------------------
  |  |  |  Branch (1306:8): [True: 58, False: 27.6k]
  |  |  ------------------
  |  | 1307|     58|        return UA_STATUSCODE_BADDECODINGERROR;           \
  |  |  ------------------
  |  |  |  |   44|     58|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1308|  27.6k|    }} while(0)
  |  |  ------------------
  |  |  |  Branch (1308:14): [Folded, False: 27.6k]
  |  |  ------------------
  ------------------
 2299|       |
 2300|       |    /* Empty object -> Null ExtensionObject */
 2301|  27.6k|    if(ctx->tokens[ctx->index].size == 0) {
  ------------------
  |  Branch (2301:8): [True: 2.13k, False: 25.5k]
  ------------------
 2302|  2.13k|        ctx->index++; /* Skip the empty ExtensionObject */
 2303|  2.13k|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  2.13k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2304|  2.13k|    }
 2305|       |
 2306|       |    /* Scan the object once for metadata and duplicate keys. */
 2307|  25.5k|    size_t beginIndex = ctx->index;
 2308|  25.5k|    JsonFieldIndex fields[3] = {
 2309|  25.5k|        {UA_JSONKEY_TYPEID, SIZE_MAX},
 2310|  25.5k|        {UA_JSONKEY_ENCODING, SIZE_MAX},
 2311|  25.5k|        {UA_JSONKEY_BODY, SIZE_MAX}
 2312|  25.5k|    };
 2313|  25.5k|    status ret = scanObjectFields(ctx, fields, 3);
 2314|  25.5k|    if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  25.5k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2314:8): [True: 62, False: 25.4k]
  ------------------
 2315|     62|        return ret;
 2316|       |
 2317|       |    /* Decode the optional non-JSON encoding. */
 2318|  25.4k|    UA_UInt64 encoding = 0;
 2319|  25.4k|    size_t encIndex = fields[1].valueIndex;
 2320|  25.4k|    if(encIndex != SIZE_MAX) {
  ------------------
  |  Branch (2320:8): [True: 4.57k, False: 20.9k]
  ------------------
 2321|  4.57k|        const char *extObjEncoding = &ctx->json5[ctx->tokens[encIndex].start];
 2322|  4.57k|        size_t len = parseUInt64(extObjEncoding,
 2323|  4.57k|                                 getTokenLength(&ctx->tokens[encIndex]),
 2324|  4.57k|                                 &encoding);
 2325|  4.57k|        if(len == 0 || encoding > 2)
  ------------------
  |  Branch (2325:12): [True: 3, False: 4.57k]
  |  Branch (2325:24): [True: 130, False: 4.44k]
  ------------------
 2326|    133|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    133|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2327|  4.57k|    }
 2328|       |
 2329|       |    /* Decode the type NodeId. */
 2330|  25.3k|    size_t typeIdIndex = fields[0].valueIndex;
 2331|  25.3k|    if(typeIdIndex == SIZE_MAX)
  ------------------
  |  Branch (2331:8): [True: 236, False: 25.1k]
  ------------------
 2332|    236|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    236|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2333|       |
 2334|  25.1k|    UA_NodeId typeId;
 2335|  25.1k|    UA_NodeId_init(&typeId);
 2336|  25.1k|    ParseCtx decodeCtx = *ctx;
 2337|  25.1k|    decodeCtx.index = typeIdIndex;
 2338|  25.1k|    ret = NodeId_decodeJson(&decodeCtx, &typeId, &UA_TYPES[UA_TYPES_NODEID]);
  ------------------
  |  |  565|  25.1k|#define UA_TYPES_NODEID 16
  ------------------
 2339|  25.1k|    if(ret != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|  25.1k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2339:8): [True: 210, False: 24.9k]
  ------------------
 2340|    210|        UA_NodeId_clear(&typeId); /* We don't have the global cleanup */
 2341|    210|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    210|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2342|    210|    }
 2343|       |
 2344|  24.9k|    size_t bodyIndex = fields[2].valueIndex;
 2345|       |
 2346|       |    /* Binary and XML bodies stay encoded even if the datatype is known. */
 2347|  24.9k|    if(encoding != 0) {
  ------------------
  |  Branch (2347:8): [True: 1.49k, False: 23.4k]
  ------------------
 2348|  1.49k|        dst->encoding = (encoding == 1) ?
  ------------------
  |  Branch (2348:25): [True: 1.00k, False: 488]
  ------------------
 2349|  1.00k|            UA_EXTENSIONOBJECT_ENCODED_BYTESTRING :
 2350|  1.49k|            UA_EXTENSIONOBJECT_ENCODED_XML;
 2351|  1.49k|        dst->content.encoded.typeId = typeId;
 2352|  1.49k|        if(bodyIndex == SIZE_MAX)
  ------------------
  |  Branch (2352:12): [True: 15, False: 1.48k]
  ------------------
 2353|     15|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     15|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2354|  1.48k|        decodeCtx.index = bodyIndex;
 2355|  1.48k|        return ByteString_decodeJson(&decodeCtx,
 2356|  1.48k|                                     &dst->content.encoded.body, NULL);
 2357|  1.49k|    }
 2358|       |
 2359|       |    /* Lookup the JSON datatype. */
 2360|  23.4k|    type = UA_findDataTypeWithCustom(&typeId, ctx->customTypes);
 2361|  23.4k|    if(!type) {
  ------------------
  |  Branch (2361:8): [True: 13.1k, False: 10.2k]
  ------------------
 2362|  13.1k|        dst->encoding = UA_EXTENSIONOBJECT_ENCODED_JSON;
 2363|  13.1k|        dst->content.encoded.typeId = typeId;
 2364|  13.1k|        decodeCtx.index = beginIndex;
 2365|  13.1k|        return tokenToByteString(&decodeCtx, &dst->content.encoded.body);
 2366|  13.1k|    }
 2367|       |
 2368|       |    /* No need to keep the TypeId */
 2369|  10.2k|    UA_NodeId_clear(&typeId);
 2370|       |
 2371|       |    /* Disallow directly nested ExtensionObjects */
 2372|  10.2k|    if(type == &UA_TYPES[UA_TYPES_EXTENSIONOBJECT])
  ------------------
  |  |  735|  10.2k|#define UA_TYPES_EXTENSIONOBJECT 21
  ------------------
  |  Branch (2372:8): [True: 2, False: 10.2k]
  ------------------
 2373|      2|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      2|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2374|       |
 2375|       |    /* Allocate memory for the decoded data */
 2376|  10.2k|    dst->content.decoded.data = UA_new(type);
 2377|  10.2k|    if(!dst->content.decoded.data)
  ------------------
  |  Branch (2377:8): [True: 1, False: 10.2k]
  ------------------
 2378|      1|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      1|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 2379|  10.2k|    dst->content.decoded.type = type;
 2380|  10.2k|    dst->encoding = UA_EXTENSIONOBJECT_DECODED;
 2381|       |
 2382|  10.2k|    decodeJsonSignature decodeType = decodeJsonJumpTable[type->typeKind];
 2383|  10.2k|    if(bodyIndex != SIZE_MAX) {
  ------------------
  |  Branch (2383:8): [True: 9.54k, False: 736]
  ------------------
 2384|  9.54k|        decodeCtx.index = bodyIndex;
 2385|  9.54k|        return decodeType(&decodeCtx, dst->content.decoded.data, type);
 2386|  9.54k|    }
 2387|       |
 2388|       |    /* Only JSON structures without an explicit encoding can be in-situ. */
 2389|    736|    if(encoding != 0)
  ------------------
  |  Branch (2389:8): [True: 0, False: 736]
  ------------------
 2390|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2391|       |
 2392|    736|    decodeCtx.index = beginIndex;
 2393|    736|    if(type->typeKind == UA_DATATYPEKIND_STRUCTURE ||
  ------------------
  |  Branch (2393:8): [True: 605, False: 131]
  ------------------
 2394|    131|       type->typeKind == UA_DATATYPEKIND_OPTSTRUCT)
  ------------------
  |  Branch (2394:8): [True: 0, False: 131]
  ------------------
 2395|    605|        return decodeJsonStructureExtensionObject(
 2396|    605|            &decodeCtx, dst->content.decoded.data, type);
 2397|    131|    if(type->typeKind == UA_DATATYPEKIND_UNION)
  ------------------
  |  Branch (2397:8): [True: 0, False: 131]
  ------------------
 2398|      0|        return decodeJsonUnionExtensionObject(
 2399|      0|            &decodeCtx, dst->content.decoded.data, type);
 2400|    131|    return decodeType(&decodeCtx, dst->content.decoded.data, type);
 2401|    131|}
ua_types_encoding_json.c:scanObjectFields:
 1369|  25.5k|scanObjectFields(ParseCtx *ctx, JsonFieldIndex *fields, size_t fieldsSize) {
 1370|  25.5k|    UA_assert(currentTokenType(ctx) == CJ5_TOKEN_OBJECT);
  ------------------
  |  |  400|  25.5k|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (1370:5): [True: 25.5k, False: 0]
  ------------------
 1371|  25.5k|    size_t keyCount = (size_t)ctx->tokens[ctx->index].size / 2;
 1372|  25.5k|    UA_STACKARRAY(size_t, keys, keyCount);
  ------------------
  |  |  376|  25.5k|#  define UA_STACKARRAY(TYPE, NAME, SIZE) TYPE NAME[SIZE]
  ------------------
 1373|  25.5k|    ctx->index++;
 1374|       |
 1375|  97.5k|    for(size_t i = 0; i < keyCount; i++) {
  ------------------
  |  Branch (1375:23): [True: 72.0k, False: 25.4k]
  ------------------
 1376|  72.0k|        UA_assert(currentTokenType(ctx) == CJ5_TOKEN_STRING);
  ------------------
  |  |  400|  72.0k|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (1376:9): [True: 72.0k, False: 0]
  ------------------
 1377|  72.0k|        const cj5_token *key = &ctx->tokens[ctx->index];
 1378|  72.0k|        size_t keyLength = getTokenLength(key);
 1379|       |
 1380|       |        /* Duplicate names are invalid, including unknown in-situ Structure
 1381|       |         * fields of an ExtensionObject. */
 1382|   159k|        for(size_t j = 0; j < i; j++) {
  ------------------
  |  Branch (1382:27): [True: 87.3k, False: 71.9k]
  ------------------
 1383|  87.3k|            const cj5_token *previous = &ctx->tokens[keys[j]];
 1384|  87.3k|            if(keyLength == getTokenLength(previous) &&
  ------------------
  |  Branch (1384:16): [True: 4.77k, False: 82.5k]
  ------------------
 1385|  4.77k|               memcmp(&ctx->json5[key->start], &ctx->json5[previous->start],
  ------------------
  |  Branch (1385:16): [True: 62, False: 4.71k]
  ------------------
 1386|  4.77k|                      keyLength) == 0)
 1387|     62|                return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     62|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1388|  87.3k|        }
 1389|  71.9k|        keys[i] = ctx->index;
 1390|       |
 1391|       |        /* Record the value position of interesting fields. */
 1392|  71.9k|        ctx->index++;
 1393|  71.9k|        UA_assert(ctx->index < ctx->tokensSize);
  ------------------
  |  |  400|  71.9k|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (1393:9): [True: 71.9k, False: 0]
  ------------------
 1394|   190k|        for(size_t j = 0; j < fieldsSize; j++) {
  ------------------
  |  Branch (1394:27): [True: 161k, False: 29.7k]
  ------------------
 1395|   161k|            if(jsoneq(ctx->json5, key, fields[j].fieldName) == 0) {
  ------------------
  |  Branch (1395:16): [True: 42.1k, False: 118k]
  ------------------
 1396|  42.1k|                fields[j].valueIndex = ctx->index;
 1397|  42.1k|                break;
 1398|  42.1k|            }
 1399|   161k|        }
 1400|       |
 1401|  71.9k|        skipObject(ctx);
 1402|  71.9k|    }
 1403|  25.4k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  25.4k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 1404|  25.5k|}
ua_types_encoding_json.c:tokenToByteString:
 2285|  13.1k|tokenToByteString(ParseCtx *ctx, UA_ByteString *p) {
 2286|  13.1k|    GET_TOKEN;
  ------------------
  |  | 1281|  13.1k|    size_t tokenSize = getTokenLength(&ctx->tokens[ctx->index]);        \
  |  | 1282|  13.1k|    const char* tokenData = &ctx->json5[ctx->tokens[ctx->index].start]; \
  |  | 1283|  13.1k|    do {} while(0)
  |  |  ------------------
  |  |  |  Branch (1283:17): [Folded, False: 13.1k]
  |  |  ------------------
  ------------------
 2287|  13.1k|    UA_StatusCode res = UA_ByteString_allocBuffer(p, tokenSize);
 2288|  13.1k|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  13.1k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2288:8): [True: 3, False: 13.1k]
  ------------------
 2289|      3|        return res;
 2290|  13.1k|    memcpy(p->data, tokenData, tokenSize);
 2291|  13.1k|    skipObject(ctx);
 2292|  13.1k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  13.1k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2293|  13.1k|}
ua_types_encoding_json.c:decodeJsonStructureExtensionObject:
 2776|    711|                                   const UA_DataType *type) {
 2777|       |    return decodeJsonStructureInternal(ctx, dst, type, true);
 2778|    711|}
ua_types_encoding_json.c:decodeJsonStructureInternal:
 2682|  1.49k|                            UA_Boolean extensionObject) {
 2683|  1.49k|    uintptr_t ptr = (uintptr_t)dst;
 2684|  1.49k|    status ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  1.49k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2685|  1.49k|    const UA_Boolean optional = (type->typeKind == UA_DATATYPEKIND_OPTSTRUCT);
 2686|  1.49k|    size_t offset = (extensionObject ? 1 : 0) + (optional ? 1 : 0);
  ------------------
  |  Branch (2686:22): [True: 711, False: 779]
  |  Branch (2686:50): [True: 0, False: 1.49k]
  ------------------
 2687|  1.49k|    size_t membersSize = type->membersSize + offset;
 2688|  1.49k|    UA_STACKARRAY(DecodeEntry, entries, membersSize);
  ------------------
  |  |  376|  1.49k|#  define UA_STACKARRAY(TYPE, NAME, SIZE) TYPE NAME[SIZE]
  ------------------
 2689|  1.49k|    memset(entries, 0, sizeof(DecodeEntry) * membersSize);
 2690|  1.49k|    size_t entryIndex = 0;
 2691|  1.49k|    if(extensionObject) {
  ------------------
  |  Branch (2691:8): [True: 711, False: 779]
  ------------------
 2692|    711|        entries[entryIndex++] =
 2693|    711|            (DecodeEntry){UA_JSONKEY_TYPEID, NULL, NULL, false, NULL};
 2694|    711|    }
 2695|  1.49k|    UA_UInt32 encodingMask = 0;
 2696|  1.49k|    size_t encodingMaskIndex = SIZE_MAX;
 2697|  1.49k|    if(optional) {
  ------------------
  |  Branch (2697:8): [True: 0, False: 1.49k]
  ------------------
 2698|      0|        encodingMaskIndex = entryIndex;
 2699|      0|        entries[entryIndex++] =
 2700|      0|            (DecodeEntry){UA_JSONKEY_ENCODINGMASK, &encodingMask, NULL, false,
 2701|      0|                          &UA_TYPES[UA_TYPES_UINT32]};
  ------------------
  |  |  225|      0|#define UA_TYPES_UINT32 6
  ------------------
 2702|      0|    }
 2703|  9.48k|    for(size_t i = 0; i < type->membersSize; ++i, ++entryIndex) {
  ------------------
  |  Branch (2703:23): [True: 7.99k, False: 1.49k]
  ------------------
 2704|  7.99k|        const UA_DataTypeMember *m = &type->members[i];
 2705|  7.99k|        const UA_DataType *mt = m->memberType;
 2706|  7.99k|        entries[entryIndex].type = mt;
 2707|  7.99k|        entries[entryIndex].fieldName = m->memberName;
 2708|  7.99k|        if(!m->isArray) {
  ------------------
  |  Branch (2708:12): [True: 6.52k, False: 1.46k]
  ------------------
 2709|  6.52k|            ptr += m->padding;
 2710|  6.52k|            entries[entryIndex].fieldPointer = (void*)ptr;
 2711|  6.52k|            if(m->isOptional)
  ------------------
  |  Branch (2711:16): [True: 0, False: 6.52k]
  ------------------
 2712|      0|                entries[entryIndex].function = OptionalScalar_decodeJson;
 2713|  6.52k|            ptr += m->isOptional ? sizeof(void*) : mt->memSize;
  ------------------
  |  Branch (2713:20): [True: 0, False: 6.52k]
  ------------------
 2714|  6.52k|        } else {
 2715|  1.46k|            ptr += m->padding;
 2716|  1.46k|            ptr += sizeof(size_t);
 2717|  1.46k|            entries[entryIndex].fieldPointer = (void*)ptr;
 2718|  1.46k|            entries[entryIndex].function = m->isOptional ?
  ------------------
  |  Branch (2718:44): [True: 0, False: 1.46k]
  ------------------
 2719|  1.46k|                OptionalArray_decodeJson : Array_decodeJson;
 2720|  1.46k|            ptr += sizeof(void*);
 2721|  1.46k|        }
 2722|  7.99k|    }
 2723|       |
 2724|  1.49k|    ret = decodeFields(ctx, entries, membersSize);
 2725|       |
 2726|       |    /* Compact JSON uses EncodingMask. Materialize optional fields whose bit is
 2727|       |     * set even when their default value was omitted from the object. */
 2728|  1.49k|    if(ret == UA_STATUSCODE_GOOD && optional &&
  ------------------
  |  |   17|  2.98k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2728:8): [True: 1.45k, False: 34]
  |  Branch (2728:37): [True: 0, False: 1.45k]
  ------------------
 2729|      0|       entries[encodingMaskIndex].found) {
  ------------------
  |  Branch (2729:8): [True: 0, False: 0]
  ------------------
 2730|      0|        size_t optionalIndex = 0;
 2731|      0|        entryIndex = offset;
 2732|      0|        for(size_t i = 0; i < type->membersSize; i++, entryIndex++) {
  ------------------
  |  Branch (2732:27): [True: 0, False: 0]
  ------------------
 2733|      0|            const UA_DataTypeMember *m = &type->members[i];
 2734|      0|            if(!m->isOptional)
  ------------------
  |  Branch (2734:16): [True: 0, False: 0]
  ------------------
 2735|      0|                continue;
 2736|      0|            if(optionalIndex >= 32) {
  ------------------
  |  Branch (2736:16): [True: 0, False: 0]
  ------------------
 2737|      0|                ret = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2738|      0|                break;
 2739|      0|            }
 2740|      0|            UA_Boolean inMask =
 2741|      0|                (encodingMask & ((UA_UInt32)1 << optionalIndex)) != 0;
 2742|      0|            if(entries[entryIndex].found != inMask) {
  ------------------
  |  Branch (2742:16): [True: 0, False: 0]
  ------------------
 2743|      0|                if(entries[entryIndex].found) {
  ------------------
  |  Branch (2743:20): [True: 0, False: 0]
  ------------------
 2744|      0|                    ret = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2745|      0|                    break;
 2746|      0|                }
 2747|      0|                if(m->isArray) {
  ------------------
  |  Branch (2747:20): [True: 0, False: 0]
  ------------------
 2748|      0|                    *(void**)entries[entryIndex].fieldPointer =
 2749|      0|                        UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|      0|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
 2750|      0|                } else {
 2751|      0|                    void *value = UA_calloc(1, m->memberType->memSize);
  ------------------
  |  |   20|      0|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
 2752|      0|                    if(!value) {
  ------------------
  |  Branch (2752:24): [True: 0, False: 0]
  ------------------
 2753|      0|                        ret = UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      0|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 2754|      0|                        break;
 2755|      0|                    }
 2756|      0|                    *(void**)entries[entryIndex].fieldPointer = value;
 2757|      0|                }
 2758|      0|            }
 2759|      0|            optionalIndex++;
 2760|      0|        }
 2761|      0|        if(optionalIndex < 32 &&
  ------------------
  |  Branch (2761:12): [True: 0, False: 0]
  ------------------
 2762|      0|           (encodingMask >> optionalIndex) != 0)
  ------------------
  |  Branch (2762:12): [True: 0, False: 0]
  ------------------
 2763|      0|            ret = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2764|      0|    }
 2765|       |
 2766|  1.49k|    return ret;
 2767|  1.49k|}
ua_types_encoding_json.c:Array_decodeJson:
 2591|  14.5k|Array_decodeJson(ParseCtx *ctx, void *dst_, const UA_DataType *type) {
 2592|  14.5k|    void **dst = (void**)dst_;
 2593|       |
 2594|       |    /* Save the length of the array */
 2595|  14.5k|    size_t *size_ptr = (size_t*) dst - 1;
 2596|       |
 2597|       |    /* A null JSON array represents a null OPC UA array. */
 2598|  14.5k|    if(currentTokenType(ctx) == CJ5_TOKEN_NULL) {
  ------------------
  |  Branch (2598:8): [True: 117, False: 14.4k]
  ------------------
 2599|    117|        *size_ptr = 0;
 2600|    117|        *dst = NULL;
 2601|    117|        ctx->index++;
 2602|    117|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    117|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2603|    117|    }
 2604|       |
 2605|  14.4k|    if(currentTokenType(ctx) != CJ5_TOKEN_ARRAY)
  ------------------
  |  Branch (2605:8): [True: 15, False: 14.4k]
  ------------------
 2606|     15|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     15|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2607|       |
 2608|  14.4k|    size_t length = (size_t)ctx->tokens[ctx->index].size;
 2609|       |
 2610|  14.4k|    ctx->index++; /* Go to first array member or to the first element after
 2611|       |                   * the array (if empty) */
 2612|       |
 2613|       |    /* Return early for empty arrays */
 2614|  14.4k|    if(length == 0) {
  ------------------
  |  Branch (2614:8): [True: 551, False: 13.9k]
  ------------------
 2615|    551|        *size_ptr = length;
 2616|    551|        *dst = UA_EMPTY_ARRAY_SENTINEL;
  ------------------
  |  |  756|    551|#define UA_EMPTY_ARRAY_SENTINEL ((void*)0x01)
  ------------------
 2617|    551|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    551|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2618|    551|    }
 2619|       |
 2620|       |    /* Allocate memory */
 2621|  13.9k|    *dst = UA_calloc(length, type->memSize);
  ------------------
  |  |   20|  13.9k|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
 2622|  13.9k|    if(*dst == NULL)
  ------------------
  |  Branch (2622:8): [True: 5, False: 13.8k]
  ------------------
 2623|      5|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      5|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 2624|       |
 2625|       |    /* Decode array members */
 2626|  13.8k|    decodeJsonSignature decodeFunc = decodeJsonJumpTable[type->typeKind];
 2627|  13.8k|    uintptr_t ptr = (uintptr_t)*dst;
 2628|  4.89M|    for(size_t i = 0; i < length; ++i) {
  ------------------
  |  Branch (2628:23): [True: 4.87M, False: 11.6k]
  ------------------
 2629|  4.87M|        if(ctx->tokens[ctx->index].type == CJ5_TOKEN_NULL) {
  ------------------
  |  Branch (2629:12): [True: 767, False: 4.87M]
  ------------------
 2630|    767|            if(!isJsonNullable(type)) {
  ------------------
  |  Branch (2630:16): [True: 8, False: 759]
  ------------------
 2631|      8|                UA_Array_delete(*dst, i, type);
 2632|      8|                *dst = NULL;
 2633|      8|                return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      8|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2634|      8|            }
 2635|    759|            ptr += type->memSize;
 2636|    759|            ctx->index++;
 2637|    759|            continue;
 2638|    767|        }
 2639|       |
 2640|  4.87M|        status ret = decodeFunc(ctx, (void*)ptr, type);
 2641|  4.87M|        ptr += type->memSize;
 2642|  4.87M|        if(ret != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|  4.87M|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2642:12): [True: 2.24k, False: 4.87M]
  ------------------
 2643|  2.24k|            UA_Array_delete(*dst, i+1, type);
 2644|  2.24k|            *dst = NULL;
 2645|  2.24k|            return ret;
 2646|  2.24k|        }
 2647|  4.87M|    }
 2648|       |
 2649|  11.6k|    *size_ptr = length; /* All good, set the size */
 2650|  11.6k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  11.6k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2651|  13.8k|}
ua_types_encoding_json.c:DataValue_decodeJson:
 2245|  31.1k|DECODE_JSON(DataValue) {
 2246|  31.1k|    UA_DataValue *dst = (UA_DataValue*)p;
 2247|  31.1k|    CHECK_NULL_SKIP; /* Treat a null value as an empty DataValue */
  ------------------
  |  | 1310|  31.1k|#define CHECK_NULL_SKIP do {                         \
  |  | 1311|  31.1k|    if(currentTokenType(ctx) == CJ5_TOKEN_NULL) {    \
  |  |  ------------------
  |  |  |  Branch (1311:8): [True: 426, False: 30.7k]
  |  |  ------------------
  |  | 1312|    426|        ctx->index++;                                \
  |  | 1313|    426|        return UA_STATUSCODE_GOOD;                   \
  |  |  ------------------
  |  |  |  |   17|    426|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  |  |  ------------------
  |  | 1314|  30.7k|    }} while(0)
  |  |  ------------------
  |  |  |  Branch (1314:14): [Folded, False: 30.7k]
  |  |  ------------------
  ------------------
 2248|  30.7k|    CHECK_OBJECT;
  ------------------
  |  | 1305|  30.7k|#define CHECK_OBJECT do {                                \
  |  | 1306|  30.7k|    if(currentTokenType(ctx) != CJ5_TOKEN_OBJECT) {      \
  |  |  ------------------
  |  |  |  Branch (1306:8): [True: 56, False: 30.6k]
  |  |  ------------------
  |  | 1307|     56|        return UA_STATUSCODE_BADDECODINGERROR;           \
  |  |  ------------------
  |  |  |  |   44|     56|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1308|  30.6k|    }} while(0)
  |  |  ------------------
  |  |  |  Branch (1308:14): [Folded, False: 30.6k]
  |  |  ------------------
  ------------------
 2249|       |
 2250|       |    /* Decode the Variant in-situ */
 2251|  30.6k|    size_t beginIndex = ctx->index;
 2252|  30.6k|    status ret = decodeJSONVariant(ctx, &dst->value, true);
 2253|  30.6k|    ctx->index = beginIndex;
 2254|  30.6k|    dst->hasValue = (dst->value.type != NULL);
 2255|  30.6k|    if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  30.6k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2255:8): [True: 3.58k, False: 27.0k]
  ------------------
 2256|  3.58k|        return ret;
 2257|       |
 2258|       |    /* Decode the other members (skip the Variant members) */
 2259|  27.0k|    DecodeEntry entries[8] = {
 2260|  27.0k|        {UA_JSONKEY_TYPE, NULL, NULL, false, NULL},
 2261|  27.0k|        {UA_JSONKEY_VALUE, NULL, NULL, false, NULL},
 2262|  27.0k|        {UA_JSONKEY_DIMENSIONS, NULL, NULL, false, NULL},
 2263|  27.0k|        {UA_JSONKEY_STATUS, &dst->status, NULL, false, &UA_TYPES[UA_TYPES_STATUSCODE]},
  ------------------
  |  |  633|  27.0k|#define UA_TYPES_STATUSCODE 18
  ------------------
 2264|  27.0k|        {UA_JSONKEY_SOURCETIMESTAMP, &dst->sourceTimestamp, NULL,
 2265|  27.0k|         false, &UA_TYPES[UA_TYPES_DATETIME]},
  ------------------
  |  |  429|  27.0k|#define UA_TYPES_DATETIME 12
  ------------------
 2266|  27.0k|        {UA_JSONKEY_SOURCEPICOSECONDS, &dst->sourcePicoseconds, NULL,
 2267|  27.0k|         false, &UA_TYPES[UA_TYPES_UINT16]},
  ------------------
  |  |  157|  27.0k|#define UA_TYPES_UINT16 4
  ------------------
 2268|  27.0k|        {UA_JSONKEY_SERVERTIMESTAMP, &dst->serverTimestamp, NULL,
 2269|  27.0k|         false, &UA_TYPES[UA_TYPES_DATETIME]},
  ------------------
  |  |  429|  27.0k|#define UA_TYPES_DATETIME 12
  ------------------
 2270|  27.0k|        {UA_JSONKEY_SERVERPICOSECONDS, &dst->serverPicoseconds, NULL,
 2271|  27.0k|         false, &UA_TYPES[UA_TYPES_UINT16]}
  ------------------
  |  |  157|  27.0k|#define UA_TYPES_UINT16 4
  ------------------
 2272|  27.0k|    };
 2273|       |
 2274|  27.0k|    ret = decodeFields(ctx, entries, 8);
 2275|  27.0k|    dst->hasStatus = entries[3].found;
 2276|  27.0k|    dst->hasSourceTimestamp = entries[4].found;
 2277|  27.0k|    dst->hasSourcePicoseconds = entries[5].found;
 2278|  27.0k|    dst->hasServerTimestamp = entries[6].found;
 2279|  27.0k|    dst->hasServerPicoseconds = entries[7].found;
 2280|  27.0k|    return ret;
 2281|  30.6k|}
ua_types_encoding_json.c:decodeJSONVariant:
 2102|  44.1k|                  UA_Boolean insideDataValue) {
 2103|       |    /* Empty variant == null */
 2104|  44.1k|    if(ctx->tokens[ctx->index].size == 0) {
  ------------------
  |  Branch (2104:8): [True: 3.73k, False: 40.3k]
  ------------------
 2105|  3.73k|        ctx->index++;
 2106|  3.73k|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  3.73k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2107|  3.73k|    }
 2108|       |
 2109|       |    /* Search the value field */
 2110|  40.3k|    size_t valueIndex = 0;
 2111|  40.3k|    lookAheadForKey(ctx, UA_JSONKEY_VALUE, &valueIndex);
 2112|       |
 2113|       |    /* Search for the dimensions field */
 2114|  40.3k|    size_t dimIndex = 0;
 2115|  40.3k|    lookAheadForKey(ctx, UA_JSONKEY_DIMENSIONS, &dimIndex);
 2116|       |
 2117|       |    /* Parse the type kind */
 2118|  40.3k|    size_t typeIndex = 0;
 2119|  40.3k|    lookAheadForKey(ctx, UA_JSONKEY_TYPE, &typeIndex);
 2120|  40.3k|    if(typeIndex == 0 || ctx->tokens[typeIndex].type != CJ5_TOKEN_NUMBER)
  ------------------
  |  Branch (2120:8): [True: 70, False: 40.3k]
  |  Branch (2120:26): [True: 4, False: 40.3k]
  ------------------
 2121|     74|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     74|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2122|  40.3k|    UA_UInt64 typeKind = 0;
 2123|  40.3k|    size_t len = parseUInt64(&ctx->json5[ctx->tokens[typeIndex].start],
 2124|  40.3k|                             getTokenLength(&ctx->tokens[typeIndex]), &typeKind);
 2125|  40.3k|    if(len == 0)
  ------------------
  |  Branch (2125:8): [True: 4, False: 40.3k]
  ------------------
 2126|      4|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      4|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2127|       |
 2128|       |    /* Shift to get the datatype index. The type must be a builtin data type.
 2129|       |     * All not-builtin types are wrapped in an ExtensionObject. */
 2130|  40.3k|    typeKind--;
 2131|  40.3k|    if(typeKind > UA_DATATYPEKIND_DIAGNOSTICINFO)
  ------------------
  |  Branch (2131:8): [True: 130, False: 40.1k]
  ------------------
 2132|    130|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    130|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2133|  40.1k|    const UA_DataType *type = &UA_TYPES[typeKind];
 2134|       |
 2135|       |    /* These combinations are excluded by the Variant definition. */
 2136|  40.1k|    if(type->typeKind == UA_DATATYPEKIND_DIAGNOSTICINFO ||
  ------------------
  |  Branch (2136:8): [True: 1, False: 40.1k]
  ------------------
 2137|  40.1k|       (insideDataValue && type->typeKind == UA_DATATYPEKIND_DATAVALUE))
  ------------------
  |  Branch (2137:9): [True: 27.8k, False: 12.2k]
  |  Branch (2137:28): [True: 2, False: 27.8k]
  ------------------
 2138|      3|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      3|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2139|       |
 2140|       |    /* Value is an array? */
 2141|  40.1k|    UA_Boolean isArray =
 2142|  40.1k|        (valueIndex > 0 && ctx->tokens[valueIndex].type == CJ5_TOKEN_ARRAY);
  ------------------
  |  Branch (2142:10): [True: 37.7k, False: 2.40k]
  |  Branch (2142:28): [True: 12.7k, False: 25.0k]
  ------------------
 2143|  40.1k|    if(type->typeKind == UA_DATATYPEKIND_VARIANT && !isArray)
  ------------------
  |  Branch (2143:8): [True: 1.78k, False: 38.3k]
  |  Branch (2143:53): [True: 3, False: 1.78k]
  ------------------
 2144|      3|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      3|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2145|       |
 2146|       |    /* Adjust the depth and set the value index as current */
 2147|  40.1k|    if(ctx->depth >= UA_JSON_ENCODING_MAX_RECURSION)
  ------------------
  |  |   22|  40.1k|#define UA_JSON_ENCODING_MAX_RECURSION 100
  ------------------
  |  Branch (2147:8): [True: 1, False: 40.1k]
  ------------------
 2148|      1|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      1|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2149|  40.1k|    size_t beginIndex = ctx->index;
 2150|  40.1k|    ctx->index = valueIndex;
 2151|  40.1k|    ctx->depth++;
 2152|       |
 2153|       |    /* Decode the value */
 2154|  40.1k|    status res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  40.1k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2155|  40.1k|    if(!isArray) {
  ------------------
  |  Branch (2155:8): [True: 27.4k, False: 12.7k]
  ------------------
 2156|       |        /* Scalar with dimensions -> error */
 2157|  27.4k|        if(dimIndex > 0) {
  ------------------
  |  Branch (2157:12): [True: 17, False: 27.4k]
  ------------------
 2158|     17|            res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     17|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2159|     17|            goto out;
 2160|     17|        }
 2161|       |
 2162|       |        /* Missing values are only valid for nullable types. */
 2163|  27.4k|        if(valueIndex == 0 && !isJsonNullable(type)) {
  ------------------
  |  Branch (2163:12): [True: 2.38k, False: 25.0k]
  |  Branch (2163:31): [True: 41, False: 2.34k]
  ------------------
 2164|     41|            res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     41|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2165|     41|            goto out;
 2166|     41|        }
 2167|       |
 2168|       |        /* JSON null is only valid for nullable types. */
 2169|  27.3k|        if(valueIndex > 0 && ctx->tokens[valueIndex].type == CJ5_TOKEN_NULL &&
  ------------------
  |  Branch (2169:12): [True: 25.0k, False: 2.34k]
  |  Branch (2169:30): [True: 275, False: 24.7k]
  ------------------
 2170|    275|           !isJsonNullable(type)) {
  ------------------
  |  Branch (2170:12): [True: 4, False: 271]
  ------------------
 2171|      4|            res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      4|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2172|      4|            goto out;
 2173|      4|        }
 2174|       |
 2175|       |        /* Decode a value wrapped in an ExtensionObject */
 2176|  27.3k|        if(valueIndex > 0 && type->typeKind == UA_DATATYPEKIND_EXTENSIONOBJECT) {
  ------------------
  |  Branch (2176:12): [True: 25.0k, False: 2.34k]
  |  Branch (2176:30): [True: 2.21k, False: 22.8k]
  ------------------
 2177|  2.21k|            res = Variant_decodeJsonUnwrapExtensionObject(ctx, dst, NULL);
 2178|  2.21k|            goto out;
 2179|  2.21k|        }
 2180|       |
 2181|       |        /* Allocate memory for the value */
 2182|  25.1k|        dst->data = UA_new(type);
 2183|  25.1k|        if(!dst->data) {
  ------------------
  |  Branch (2183:12): [True: 1, False: 25.1k]
  ------------------
 2184|      1|            res = UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      1|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 2185|      1|            goto out;
 2186|      1|        }
 2187|  25.1k|        dst->type = type;
 2188|       |
 2189|       |        /* Decode the value */
 2190|  25.1k|        if(valueIndex > 0 && ctx->tokens[valueIndex].type != CJ5_TOKEN_NULL)
  ------------------
  |  Branch (2190:12): [True: 22.8k, False: 2.33k]
  |  Branch (2190:30): [True: 22.6k, False: 205]
  ------------------
 2191|  22.6k|            res = decodeJsonJumpTable[type->typeKind](ctx, dst->data, type);
 2192|  25.1k|    } else {
 2193|       |        /* Decode an array. Try to unwrap ExtensionObjects in the array. The
 2194|       |         * members must all have the same type. */
 2195|  12.7k|        const UA_DataType *unwrapType = NULL;
 2196|  12.7k|        if(type == &UA_TYPES[UA_TYPES_EXTENSIONOBJECT])
  ------------------
  |  |  735|  12.7k|#define UA_TYPES_EXTENSIONOBJECT 21
  ------------------
  |  Branch (2196:12): [True: 8.34k, False: 4.39k]
  ------------------
 2197|  8.34k|            unwrapType = getArrayUnwrapType(ctx);
 2198|  12.7k|        if(unwrapType) {
  ------------------
  |  Branch (2198:12): [True: 709, False: 12.0k]
  ------------------
 2199|    709|            dst->type = unwrapType;
 2200|    709|            res = Array_decodeJsonUnwrapExtensionObject(ctx, &dst->data, unwrapType);
 2201|  12.0k|        } else {
 2202|  12.0k|            dst->type = type;
 2203|  12.0k|            res = Array_decodeJson(ctx, &dst->data, type);
 2204|  12.0k|        }
 2205|       |
 2206|       |        /* Decode array dimensions */
 2207|  12.7k|        if(dimIndex > 0) {
  ------------------
  |  Branch (2207:12): [True: 2.42k, False: 10.3k]
  ------------------
 2208|  2.42k|            ctx->index = dimIndex;
 2209|  2.42k|            res |= Array_decodeJson(ctx, (void**)&dst->arrayDimensions,
 2210|  2.42k|                                    &UA_TYPES[UA_TYPES_UINT32]);
  ------------------
  |  |  225|  2.42k|#define UA_TYPES_UINT32 6
  ------------------
 2211|       |
 2212|       |            /* Help clang-analyzer */
 2213|  2.42k|            UA_assert(dst->arrayDimensionsSize == 0 || dst->arrayDimensions);
  ------------------
  |  |  400|  2.42k|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (2213:13): [True: 78, False: 2.34k]
  |  Branch (2213:13): [True: 2.34k, False: 0]
  ------------------
 2214|       |
 2215|       |            /* Validate the dimensions */
 2216|  2.42k|            if(res == UA_STATUSCODE_GOOD &&
  ------------------
  |  |   17|  4.84k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2216:16): [True: 2.33k, False: 85]
  ------------------
 2217|  2.33k|               !variantDimensionsValid(dst->arrayLength,
  ------------------
  |  Branch (2217:16): [True: 141, False: 2.19k]
  ------------------
 2218|  2.33k|                                       dst->arrayDimensionsSize,
 2219|  2.33k|                                       dst->arrayDimensions))
 2220|    141|                res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    141|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 2221|       |
 2222|       |            /* Only keep >= 2 dimensions */
 2223|  2.42k|            if(dst->arrayDimensionsSize == 1) {
  ------------------
  |  Branch (2223:16): [True: 2.27k, False: 145]
  ------------------
 2224|  2.27k|                UA_free(dst->arrayDimensions);
  ------------------
  |  |   19|  2.27k|#define UA_free(ptr) UA_freeSingleton(ptr)
  ------------------
 2225|  2.27k|                dst->arrayDimensions = NULL;
 2226|  2.27k|                dst->arrayDimensionsSize = 0;
 2227|  2.27k|            }
 2228|  2.42k|        }
 2229|  12.7k|    }
 2230|       |
 2231|  40.1k| out:
 2232|  40.1k|    ctx->index = beginIndex;
 2233|  40.1k|    skipObject(ctx);
 2234|  40.1k|    ctx->depth--;
 2235|  40.1k|    return res;
 2236|  40.1k|}
ua_types_encoding_json.c:Variant_decodeJsonUnwrapExtensionObject:
 2405|  2.21k|                                        const UA_DataType *type) {
 2406|  2.21k|    (void) type;
 2407|  2.21k|    UA_Variant *dst = (UA_Variant*)p;
 2408|       |
 2409|       |    /* ExtensionObject with null body */
 2410|  2.21k|    if(currentTokenType(ctx) == CJ5_TOKEN_NULL) {
  ------------------
  |  Branch (2410:8): [True: 66, False: 2.15k]
  ------------------
 2411|     66|        dst->data = UA_ExtensionObject_new();
 2412|     66|        dst->type = &UA_TYPES[UA_TYPES_EXTENSIONOBJECT];
  ------------------
  |  |  735|     66|#define UA_TYPES_EXTENSIONOBJECT 21
  ------------------
 2413|     66|        ctx->index++;
 2414|     66|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     66|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2415|     66|    }
 2416|       |
 2417|       |    /* Decode the ExtensionObject */
 2418|  2.15k|    UA_ExtensionObject eo;
 2419|  2.15k|    UA_ExtensionObject_init(&eo);
 2420|  2.15k|    UA_StatusCode ret = ExtensionObject_decodeJson(ctx, &eo, NULL);
 2421|  2.15k|    if(ret != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|  2.15k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2421:8): [True: 482, False: 1.67k]
  ------------------
 2422|    482|        UA_ExtensionObject_clear(&eo); /* We don't have the global cleanup */
 2423|    482|        return ret;
 2424|    482|    }
 2425|       |
 2426|       |    /* The content is still encoded, cannot unwrap */
 2427|  1.67k|    if(eo.encoding != UA_EXTENSIONOBJECT_DECODED)
  ------------------
  |  Branch (2427:8): [True: 429, False: 1.24k]
  ------------------
 2428|    429|        goto use_eo;
 2429|       |
 2430|       |    /* The content is a builtin type that could have been directly encoded in
 2431|       |     * the Variant, there was no need to wrap in an ExtensionObject. But this
 2432|       |     * means for us, that somebody made an extra effort to explicitly get an
 2433|       |     * ExtensionObject. So we keep it. As an added advantage we will generate
 2434|       |     * the same JSON again when encoding again. */
 2435|  1.24k|    if(eo.content.decoded.type->typeKind <= UA_DATATYPEKIND_DIAGNOSTICINFO)
  ------------------
  |  Branch (2435:8): [True: 758, False: 484]
  ------------------
 2436|    758|        goto use_eo;
 2437|       |
 2438|       |    /* Unwrap the ExtensionObject */
 2439|    484|    dst->data = eo.content.decoded.data;
 2440|    484|    dst->type = eo.content.decoded.type;
 2441|    484|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    484|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2442|       |
 2443|  1.18k| use_eo:
 2444|       |    /* Don't unwrap */
 2445|  1.18k|    dst->data = UA_new(&UA_TYPES[UA_TYPES_EXTENSIONOBJECT]);
  ------------------
  |  |  735|  1.18k|#define UA_TYPES_EXTENSIONOBJECT 21
  ------------------
 2446|  1.18k|    if(!dst->data) {
  ------------------
  |  Branch (2446:8): [True: 1, False: 1.18k]
  ------------------
 2447|      1|        UA_ExtensionObject_clear(&eo);
 2448|      1|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      1|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 2449|      1|    }
 2450|  1.18k|    dst->type = &UA_TYPES[UA_TYPES_EXTENSIONOBJECT];
  ------------------
  |  |  735|  1.18k|#define UA_TYPES_EXTENSIONOBJECT 21
  ------------------
 2451|  1.18k|    *(UA_ExtensionObject*)dst->data = eo;
 2452|  1.18k|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  1.18k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2453|  1.18k|}
ua_types_encoding_json.c:getArrayUnwrapType:
 1978|  8.34k|getArrayUnwrapType(ParseCtx *ctx) {
 1979|  8.34k|    UA_assert(ctx->tokens[ctx->index].type == CJ5_TOKEN_ARRAY);
  ------------------
  |  |  400|  8.34k|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (1979:5): [True: 8.34k, False: 0]
  ------------------
 1980|       |
 1981|       |    /* Return early for empty arrays */
 1982|  8.34k|    size_t length = (size_t)ctx->tokens[ctx->index].size;
 1983|  8.34k|    if(length == 0)
  ------------------
  |  Branch (1983:8): [True: 261, False: 8.08k]
  ------------------
 1984|    261|        return NULL;
 1985|       |
 1986|       |    /* Save the original index and go to the first array member */
 1987|  8.08k|    size_t oldIndex = ctx->index;
 1988|  8.08k|    ctx->index++;
 1989|       |
 1990|       |    /* Lookup the type for the first array member */
 1991|  8.08k|    UA_NodeId typeId;
 1992|  8.08k|    UA_NodeId_init(&typeId);
 1993|  8.08k|    const UA_DataType *typeOfBody = getExtensionObjectType(ctx);
 1994|  8.08k|    if(!typeOfBody) {
  ------------------
  |  Branch (1994:8): [True: 4.40k, False: 3.67k]
  ------------------
 1995|  4.40k|        ctx->index = oldIndex; /* Restore the index */
 1996|  4.40k|        return NULL;
 1997|  4.40k|    }
 1998|       |
 1999|       |    /* Get the TypeId encoding for faster comparison below.
 2000|       |     * Cannot fail as getExtensionObjectType already looked this up. */
 2001|  3.67k|    size_t typeIdIndex = 0;
 2002|  3.67k|    UA_StatusCode ret = lookAheadForKey(ctx, UA_JSONKEY_TYPEID, &typeIdIndex);
 2003|  3.67k|    (void)ret;
 2004|  3.67k|    UA_assert(ret == UA_STATUSCODE_GOOD);
  ------------------
  |  |  400|  3.67k|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (2004:5): [True: 3.67k, False: 0]
  ------------------
 2005|  3.67k|    const char* typeIdData = &ctx->json5[ctx->tokens[typeIdIndex].start];
 2006|  3.67k|    size_t typeIdSize = getTokenLength(&ctx->tokens[typeIdIndex]);
 2007|       |
 2008|       |    /* Loop over all members and check whether they can be unwrapped. Don't skip
 2009|       |     * the first member. We still haven't checked the encoding type. */
 2010|  8.30k|    for(size_t i = 0; i < length; i++) {
  ------------------
  |  Branch (2010:23): [True: 7.59k, False: 709]
  ------------------
 2011|       |        /* Array element must be an object */
 2012|  7.59k|        if(currentTokenType(ctx) != CJ5_TOKEN_OBJECT) {
  ------------------
  |  Branch (2012:12): [True: 23, False: 7.57k]
  ------------------
 2013|     23|            ctx->index = oldIndex; /* Restore the index */
 2014|     23|            return NULL;
 2015|     23|        }
 2016|       |
 2017|       |        /* Check for non-JSON encoding */
 2018|  7.57k|        size_t encIndex = 0;
 2019|  7.57k|        ret = lookAheadForKey(ctx, UA_JSONKEY_ENCODING, &encIndex);
 2020|  7.57k|        if(ret == UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|  7.57k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2020:12): [True: 12, False: 7.56k]
  ------------------
 2021|     12|            ctx->index = oldIndex; /* Restore the index */
 2022|     12|            return NULL;
 2023|     12|        }
 2024|       |
 2025|       |        /* Get the type NodeId index */
 2026|  7.56k|        size_t memberTypeIdIndex = 0;
 2027|  7.56k|        ret = lookAheadForKey(ctx, UA_JSONKEY_TYPEID, &memberTypeIdIndex);
 2028|  7.56k|        if(ret != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|  7.56k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2028:12): [True: 129, False: 7.43k]
  ------------------
 2029|    129|            ctx->index = oldIndex; /* Restore the index */
 2030|    129|            return NULL;
 2031|    129|        }
 2032|       |
 2033|       |        /* Is it the same type? Compare raw NodeId string */
 2034|  7.43k|        const char* memberTypeIdData = &ctx->json5[ctx->tokens[memberTypeIdIndex].start];
 2035|  7.43k|        size_t memberTypeIdSize = getTokenLength(&ctx->tokens[memberTypeIdIndex]);
 2036|  7.43k|        if(typeIdSize != memberTypeIdSize ||
  ------------------
  |  Branch (2036:12): [True: 2.54k, False: 4.88k]
  ------------------
 2037|  4.88k|           memcmp(typeIdData, memberTypeIdData, typeIdSize) != 0) {
  ------------------
  |  Branch (2037:12): [True: 259, False: 4.63k]
  ------------------
 2038|  2.80k|            ctx->index = oldIndex; /* Restore the index */
 2039|  2.80k|            return NULL;
 2040|  2.80k|        }
 2041|       |
 2042|       |        /* Skip to the next array member */
 2043|  4.63k|        skipObject(ctx);
 2044|  4.63k|    }
 2045|       |
 2046|    709|    ctx->index = oldIndex; /* Restore the index */
 2047|    709|    return typeOfBody;
 2048|  3.67k|}
ua_types_encoding_json.c:getExtensionObjectType:
 1946|  8.08k|getExtensionObjectType(ParseCtx *ctx) {
 1947|  8.08k|    if(currentTokenType(ctx) != CJ5_TOKEN_OBJECT)
  ------------------
  |  Branch (1947:8): [True: 198, False: 7.88k]
  ------------------
 1948|    198|        return NULL;
 1949|       |
 1950|       |    /* Get the type NodeId index */
 1951|  7.88k|    size_t typeIdIndex = 0;
 1952|  7.88k|    UA_StatusCode ret = lookAheadForKey(ctx, UA_JSONKEY_TYPEID, &typeIdIndex);
 1953|  7.88k|    if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  7.88k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1953:8): [True: 1.35k, False: 6.53k]
  ------------------
 1954|  1.35k|        return NULL;
 1955|       |
 1956|  6.53k|    size_t oldIndex = ctx->index;
 1957|  6.53k|    ctx->index = (UA_UInt16)typeIdIndex;
 1958|       |
 1959|       |    /* Decode the type NodeId */
 1960|  6.53k|    UA_NodeId typeId;
 1961|  6.53k|    UA_NodeId_init(&typeId);
 1962|  6.53k|    ret = NodeId_decodeJson(ctx, &typeId, &UA_TYPES[UA_TYPES_NODEID]);
  ------------------
  |  |  565|  6.53k|#define UA_TYPES_NODEID 16
  ------------------
 1963|  6.53k|    ctx->index = oldIndex;
 1964|  6.53k|    if(ret != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|  6.53k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1964:8): [True: 2.55k, False: 3.98k]
  ------------------
 1965|  2.55k|        UA_NodeId_clear(&typeId); /* We don't have the global cleanup */
 1966|  2.55k|        return NULL;
 1967|  2.55k|    }
 1968|       |
 1969|       |    /* Lookup an return */
 1970|  3.98k|    const UA_DataType *type = UA_findDataTypeWithCustom(&typeId, ctx->customTypes);
 1971|  3.98k|    UA_NodeId_clear(&typeId);
 1972|  3.98k|    return type;
 1973|  6.53k|}
ua_types_encoding_json.c:Array_decodeJsonUnwrapExtensionObject:
 2052|    709|                                      const UA_DataType *type) {
 2053|    709|    size_t *size_ptr = (size_t*) dst - 1; /* Save the length pointer of the array */
 2054|    709|    size_t length = (size_t)ctx->tokens[ctx->index].size;
 2055|       |
 2056|       |    /* Known from the previous unwrapping-check */
 2057|    709|    UA_assert(currentTokenType(ctx) == CJ5_TOKEN_ARRAY);
  ------------------
  |  |  400|    709|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (2057:5): [True: 709, False: 0]
  ------------------
 2058|    709|    UA_assert(length > 0);
  ------------------
  |  |  400|    709|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (2058:5): [True: 709, False: 0]
  ------------------
 2059|       |
 2060|    709|    ctx->index++; /* Go to first array member */
 2061|       |
 2062|       |    /* Allocate memory */
 2063|    709|    *dst = UA_calloc(length, type->memSize);
  ------------------
  |  |   20|    709|#define UA_calloc(num, size) UA_callocSingleton(num, size)
  ------------------
 2064|    709|    if(*dst == NULL)
  ------------------
  |  Branch (2064:8): [True: 1, False: 708]
  ------------------
 2065|      1|        return UA_STATUSCODE_BADOUTOFMEMORY;
  ------------------
  |  |   32|      1|#define UA_STATUSCODE_BADOUTOFMEMORY ((UA_StatusCode) 0x80030000)
  ------------------
 2066|       |
 2067|       |    /* Decode array members */
 2068|    708|    status ret = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    708|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2069|    708|    uintptr_t ptr = (uintptr_t)*dst;
 2070|  1.65k|    for(size_t i = 0; i < length; i++) {
  ------------------
  |  Branch (2070:23): [True: 1.01k, False: 644]
  ------------------
 2071|  1.01k|        UA_assert(ctx->tokens[ctx->index].type == CJ5_TOKEN_OBJECT);
  ------------------
  |  |  400|  1.01k|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (2071:9): [True: 1.01k, False: 0]
  ------------------
 2072|  1.01k|        if(type->typeKind == UA_DATATYPEKIND_STRUCTURE ||
  ------------------
  |  Branch (2072:12): [True: 106, False: 905]
  ------------------
 2073|    905|           type->typeKind == UA_DATATYPEKIND_OPTSTRUCT) {
  ------------------
  |  Branch (2073:12): [True: 0, False: 905]
  ------------------
 2074|       |            /* Decode structure in-situ in the ExtensionObject */
 2075|    106|            ret = decodeJsonStructureExtensionObject(ctx, (void*)ptr, type);
 2076|    905|        } else if(type->typeKind == UA_DATATYPEKIND_UNION) {
  ------------------
  |  Branch (2076:19): [True: 0, False: 905]
  ------------------
 2077|       |            /* Decode union in-situ in the ExtensionObject */
 2078|      0|            ret = decodeJsonUnionExtensionObject(ctx, (void*)ptr, type);
 2079|    905|        } else {
 2080|       |            /* Get the body field and decode it */
 2081|    905|            DecodeEntry entries[3] = {
 2082|    905|                {UA_JSONKEY_TYPEID, NULL, NULL, false, NULL},
 2083|    905|                {UA_JSONKEY_BODY, (void*)ptr, NULL, false, type},
 2084|    905|                {UA_JSONKEY_ENCODING, NULL, NULL, false, NULL}
 2085|    905|            };
 2086|    905|            ret = decodeFields(ctx, entries, 3);
 2087|    905|        }
 2088|  1.01k|        if(ret != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|  1.01k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (2088:12): [True: 64, False: 947]
  ------------------
 2089|     64|            UA_Array_delete(*dst, i+1, type);
 2090|     64|            *dst = NULL;
 2091|     64|            return ret;
 2092|     64|        }
 2093|    947|        ptr += type->memSize;
 2094|    947|    }
 2095|       |
 2096|    644|    *size_ptr = length; /* All good, set the size */
 2097|    644|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|    644|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
 2098|    708|}
ua_types_encoding_json.c:Variant_decodeJson:
 2238|  13.6k|DECODE_JSON(Variant) {
 2239|  13.6k|    UA_Variant *dst = (UA_Variant*)p;
 2240|  13.6k|    CHECK_NULL_SKIP; /* Treat null as an empty variant */
  ------------------
  |  | 1310|  13.6k|#define CHECK_NULL_SKIP do {                         \
  |  | 1311|  13.6k|    if(currentTokenType(ctx) == CJ5_TOKEN_NULL) {    \
  |  |  ------------------
  |  |  |  Branch (1311:8): [True: 206, False: 13.4k]
  |  |  ------------------
  |  | 1312|    206|        ctx->index++;                                \
  |  | 1313|    206|        return UA_STATUSCODE_GOOD;                   \
  |  |  ------------------
  |  |  |  |   17|    206|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  |  |  ------------------
  |  | 1314|  13.4k|    }} while(0)
  |  |  ------------------
  |  |  |  Branch (1314:14): [Folded, False: 13.4k]
  |  |  ------------------
  ------------------
 2241|  13.4k|    CHECK_OBJECT;
  ------------------
  |  | 1305|  13.4k|#define CHECK_OBJECT do {                                \
  |  | 1306|  13.4k|    if(currentTokenType(ctx) != CJ5_TOKEN_OBJECT) {      \
  |  |  ------------------
  |  |  |  Branch (1306:8): [True: 12, False: 13.4k]
  |  |  ------------------
  |  | 1307|     12|        return UA_STATUSCODE_BADDECODINGERROR;           \
  |  |  ------------------
  |  |  |  |   44|     12|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  |  |  ------------------
  |  | 1308|  13.4k|    }} while(0)
  |  |  ------------------
  |  |  |  Branch (1308:14): [Folded, False: 13.4k]
  |  |  ------------------
  ------------------
 2242|  13.4k|    return decodeJSONVariant(ctx, dst, false);
 2243|  13.4k|}
ua_types_encoding_json.c:Enum_decodeJson:
 1696|    640|DECODE_JSON(Enum) {
 1697|    640|    if(currentTokenType(ctx) == CJ5_TOKEN_NUMBER)
  ------------------
  |  Branch (1697:8): [True: 406, False: 234]
  ------------------
 1698|    406|        return Int32_decodeJson(ctx, p, type);
 1699|    234|    if(currentTokenType(ctx) != CJ5_TOKEN_STRING)
  ------------------
  |  Branch (1699:8): [True: 15, False: 219]
  ------------------
 1700|     15|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     15|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1701|       |
 1702|    219|    UA_String encoded = UA_STRING_NULL;
 1703|    219|    status ret = String_decodeJson(ctx, &encoded, &UA_TYPES[UA_TYPES_STRING]);
  ------------------
  |  |  395|    219|#define UA_TYPES_STRING 11
  ------------------
 1704|    219|    if(ret != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    219|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (1704:8): [True: 5, False: 214]
  ------------------
 1705|      5|        return ret;
 1706|       |
 1707|       |    /* Use the suffix after the final underscore, if present. Enumeration
 1708|       |     * names can themselves contain underscores. */
 1709|    214|    size_t numberStart = 0;
 1710|  2.77M|    for(size_t i = encoded.length; i > 0; i--) {
  ------------------
  |  Branch (1710:36): [True: 2.77M, False: 155]
  ------------------
 1711|  2.77M|        if(encoded.data[i - 1] != '_')
  ------------------
  |  Branch (1711:12): [True: 2.77M, False: 59]
  ------------------
 1712|  2.77M|            continue;
 1713|     59|        if(i == 1 || i == encoded.length) {
  ------------------
  |  Branch (1713:12): [True: 1, False: 58]
  |  Branch (1713:22): [True: 3, False: 55]
  ------------------
 1714|      4|            ret = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      4|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1715|      4|            goto cleanup;
 1716|      4|        }
 1717|     55|        numberStart = i;
 1718|     55|        break;
 1719|     59|    }
 1720|       |
 1721|    210|    size_t numberLength = encoded.length - numberStart;
 1722|    210|    if(numberLength == 0) {
  ------------------
  |  Branch (1722:8): [True: 1, False: 209]
  ------------------
 1723|      1|        ret = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      1|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1724|      1|        goto cleanup;
 1725|      1|    }
 1726|       |
 1727|    209|    UA_Int64 value = 0;
 1728|    209|    size_t parsed = parseInt64((const char*)&encoded.data[numberStart],
 1729|    209|                               numberLength, &value);
 1730|    209|    if(parsed != numberLength || value < UA_INT32_MIN || value > UA_INT32_MAX) {
  ------------------
  |  |  100|    358|#define UA_INT32_MIN ((int32_t)-2147483648LL)
  ------------------
                  if(parsed != numberLength || value < UA_INT32_MIN || value > UA_INT32_MAX) {
  ------------------
  |  |  101|     95|#define UA_INT32_MAX 2147483647L
  ------------------
  |  Branch (1730:8): [True: 60, False: 149]
  |  Branch (1730:34): [True: 54, False: 95]
  |  Branch (1730:58): [True: 3, False: 92]
  ------------------
 1731|    117|        ret = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    117|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
 1732|    117|        goto cleanup;
 1733|    117|    }
 1734|     92|    *(UA_Int32*)p = (UA_Int32)value;
 1735|       |
 1736|    214| cleanup:
 1737|    214|    UA_String_clear(&encoded);
 1738|    214|    return ret;
 1739|     92|}
ua_types_encoding_json.c:decodeJsonStructure:
 2770|    779|decodeJsonStructure(ParseCtx *ctx, void *dst, const UA_DataType *type) {
 2771|       |    return decodeJsonStructureInternal(ctx, dst, type, false);
 2772|    779|}

ua_types_encoding_json.c:currentTokenType:
  104|  5.83M|cj5_token_type currentTokenType(const ParseCtx *ctx) {
  105|  5.83M|    return ctx->tokens[ctx->index].type;
  106|  5.83M|}
ua_types_encoding_json.c:getTokenLength:
  109|  6.63M|size_t getTokenLength(const cj5_token *t) {
  110|  6.63M|    return (size_t)(1u + t->end - t->start);
  111|  6.63M|}
ua_pubsub_networkmessage_json.c:currentTokenType:
  104|  57.4k|cj5_token_type currentTokenType(const ParseCtx *ctx) {
  105|  57.4k|    return ctx->tokens[ctx->index].type;
  106|  57.4k|}
ua_pubsub_networkmessage_json.c:getTokenLength:
  109|  6.60k|size_t getTokenLength(const cj5_token *t) {
  110|  6.60k|    return (size_t)(1u + t->end - t->start);
  111|  6.60k|}

UA_Guid_parse:
   86|     61|UA_Guid_parse(UA_Guid *guid, const UA_String str) {
   87|     61|    UA_StatusCode res = parse_guid(guid, str.data, str.data + str.length);
   88|     61|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|     61|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (88:8): [True: 54, False: 7]
  ------------------
   89|     54|        *guid = UA_GUID_NULL;
   90|     61|    return res;
   91|     61|}
UA_NodeId_parseEx:
  323|  31.4k|                  const UA_NamespaceMapping *nsMapping) {
  324|  31.4k|    UA_StatusCode res =
  325|  31.4k|        parse_nodeid(id, str.data, str.data+str.length, UA_ESCAPING_NONE, nsMapping);
  326|  31.4k|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  31.4k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (326:8): [True: 1.91k, False: 29.5k]
  ------------------
  327|  1.91k|        UA_NodeId_clear(id);
  328|  31.4k|    return res;
  329|  31.4k|}
UA_ExpandedNodeId_parseEx:
  671|  3.57k|                          size_t serverUrisSize, const UA_String *serverUris) {
  672|  3.57k|    UA_StatusCode res =
  673|  3.57k|        parse_expandednodeid(id, str.data, str.data + str.length, UA_ESCAPING_NONE,
  674|  3.57k|                             nsMapping, serverUrisSize, serverUris);
  675|  3.57k|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  3.57k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (675:8): [True: 489, False: 3.08k]
  ------------------
  676|    489|        UA_ExpandedNodeId_clear(id);
  677|  3.57k|    return res;
  678|  3.57k|}
UA_QualifiedName_parseEx:
  831|  24.9k|                         const UA_NamespaceMapping *nsMapping) {
  832|  24.9k|    const u8 *pos = str.data;
  833|  24.9k|    const u8 *end = str.data + str.length;
  834|  24.9k|    UA_StatusCode res = parse_qn(qn, pos, end, UA_ESCAPING_NONE, nsMapping, 0);
  835|  24.9k|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|  24.9k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (835:8): [True: 1, False: 24.9k]
  ------------------
  836|      1|        UA_QualifiedName_clear(qn);
  837|  24.9k|    return res;
  838|  24.9k|}
ua_types_lex.c:parse_guid:
   50|     96|parse_guid(UA_Guid *guid, const UA_Byte *s, const UA_Byte *e) {
   51|     96|    size_t len = (size_t)(e - s);
   52|     96|    if(len != 36 || s[8] != '-' || s[13] != '-' || s[23] != '-')
  ------------------
  |  Branch (52:8): [True: 18, False: 78]
  |  Branch (52:21): [True: 11, False: 67]
  |  Branch (52:36): [True: 4, False: 63]
  |  Branch (52:52): [True: 12, False: 51]
  ------------------
   53|     45|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     45|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   54|       |
   55|     51|    UA_UInt32 tmp;
   56|     51|    if(UA_readNumberWithBase(s, 8, &tmp, 16) != 8)
  ------------------
  |  Branch (56:8): [True: 10, False: 41]
  ------------------
   57|     10|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     10|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   58|     41|    guid->data1 = tmp;
   59|       |
   60|     41|    if(UA_readNumberWithBase(&s[9], 4, &tmp, 16) != 4)
  ------------------
  |  Branch (60:8): [True: 4, False: 37]
  ------------------
   61|      4|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      4|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   62|     37|    guid->data2 = (UA_UInt16)tmp;
   63|       |
   64|     37|    if(UA_readNumberWithBase(&s[14], 4, &tmp, 16) != 4)
  ------------------
  |  Branch (64:8): [True: 5, False: 32]
  ------------------
   65|      5|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      5|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   66|     32|    guid->data3 = (UA_UInt16)tmp;
   67|       |
   68|     32|    if(UA_readNumberWithBase(&s[19], 2, &tmp, 16) != 2)
  ------------------
  |  Branch (68:8): [True: 5, False: 27]
  ------------------
   69|      5|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      5|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   70|     27|    guid->data4[0] = (UA_Byte)tmp;
   71|       |
   72|     27|    if(UA_readNumberWithBase(&s[21], 2, &tmp, 16) != 2)
  ------------------
  |  Branch (72:8): [True: 5, False: 22]
  ------------------
   73|      5|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      5|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   74|     22|    guid->data4[1] = (UA_Byte)tmp;
   75|       |
   76|    113|    for(size_t pos = 2, spos = 24; pos < 8; pos++, spos += 2) {
  ------------------
  |  Branch (76:36): [True: 102, False: 11]
  ------------------
   77|    102|        if(UA_readNumberWithBase(&s[spos], 2, &tmp, 16) != 2)
  ------------------
  |  Branch (77:12): [True: 11, False: 91]
  ------------------
   78|     11|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     11|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   79|     91|        guid->data4[pos] = (UA_Byte)tmp;
   80|     91|    }
   81|       |
   82|     11|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|     11|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
   83|     22|}
ua_types_lex.c:parse_nodeid:
  148|  31.4k|             UA_Escaping idEsc, const UA_NamespaceMapping *nsMapping) {
  149|  31.4k|    *id = UA_NODEID_NULL; /* Reset the NodeId */
  150|  31.4k|    LexContext context;
  151|  31.4k|    memset(&context, 0, sizeof(LexContext));
  152|  31.4k|    UA_Byte *begin = (UA_Byte*)(uintptr_t)pos;
  153|  31.4k|    const u8 *ns = NULL, *nsu = NULL, *body = NULL;
  154|       |
  155|       |    
  156|  31.4k|{
  157|  31.4k|	u8 yych;
  158|  31.4k|	yych = YYPEEK();
  ------------------
  |  |   33|  31.4k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  31.4k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  30.6k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 30.6k, False: 807]
  |  |  ------------------
  ------------------
  159|  31.4k|	switch (yych) {
  160|    522|		case 'b':
  ------------------
  |  Branch (160:3): [True: 522, False: 30.9k]
  ------------------
  161|    560|		case 'g':
  ------------------
  |  Branch (161:3): [True: 38, False: 31.4k]
  ------------------
  162|  20.5k|		case 'i':
  ------------------
  |  Branch (162:3): [True: 20.0k, False: 11.4k]
  ------------------
  163|  28.1k|		case 's':
  ------------------
  |  Branch (163:3): [True: 7.59k, False: 23.8k]
  ------------------
  164|  28.1k|			YYSTAGN(context.yyt1);
  ------------------
  |  |   39|  28.1k|#define YYSTAGN(t) t = NULL
  ------------------
  165|  28.1k|			YYSTAGN(context.yyt2);
  ------------------
  |  |   39|  28.1k|#define YYSTAGN(t) t = NULL
  ------------------
  166|  28.1k|			goto yy3;
  167|  1.71k|		case 'n': goto yy4;
  ------------------
  |  Branch (167:3): [True: 1.71k, False: 29.7k]
  ------------------
  168|  1.56k|		default: goto yy1;
  ------------------
  |  Branch (168:3): [True: 1.56k, False: 29.8k]
  ------------------
  169|  31.4k|	}
  170|  1.56k|yy1:
  171|  1.56k|	YYSKIP();
  ------------------
  |  |   35|  1.56k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.56k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  172|  1.81k|yy2:
  173|  1.81k|	{ (void)pos; return UA_STATUSCODE_BADDECODINGERROR; }
  ------------------
  |  |   44|  1.81k|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  174|  28.1k|yy3:
  175|  28.1k|	YYSKIP();
  ------------------
  |  |   35|  28.1k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  28.1k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  176|  28.1k|	yych = YYPEEK();
  ------------------
  |  |   33|  28.1k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  28.1k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  28.1k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 28.1k, False: 12]
  |  |  ------------------
  ------------------
  177|  28.1k|	switch (yych) {
  178|  28.1k|		case '=': goto yy5;
  ------------------
  |  Branch (178:3): [True: 28.1k, False: 27]
  ------------------
  179|     27|		default: goto yy2;
  ------------------
  |  Branch (179:3): [True: 27, False: 28.1k]
  ------------------
  180|  28.1k|	}
  181|  1.71k|yy4:
  182|  1.71k|	YYSKIP();
  ------------------
  |  |   35|  1.71k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.71k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  183|  1.71k|	YYBACKUP();
  ------------------
  |  |   36|  1.71k|#define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   32|  1.71k|#define YYMARKER context.marker
  |  |  ------------------
  |  |               #define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|  1.71k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  184|  1.71k|	yych = YYPEEK();
  ------------------
  |  |   33|  1.71k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.71k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.71k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.71k, False: 3]
  |  |  ------------------
  ------------------
  185|  1.71k|	switch (yych) {
  186|  1.70k|		case 's': goto yy6;
  ------------------
  |  Branch (186:3): [True: 1.70k, False: 10]
  ------------------
  187|     10|		default: goto yy2;
  ------------------
  |  Branch (187:3): [True: 10, False: 1.70k]
  ------------------
  188|  1.71k|	}
  189|  29.6k|yy5:
  190|  29.6k|	YYSKIP();
  ------------------
  |  |   35|  29.6k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  29.6k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  191|  29.6k|	nsu = context.yyt2;
  192|  29.6k|	ns = context.yyt1;
  193|  29.6k|	YYSTAGP(body);
  ------------------
  |  |   38|  29.6k|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|  29.6k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  194|  29.6k|	YYSHIFTSTAG(body, -2);
  ------------------
  |  |   40|  29.6k|#define YYSHIFTSTAG(t, shift) t += shift
  ------------------
  195|  29.6k|	{ goto match; }
  196|  1.70k|yy6:
  197|  1.70k|	YYSKIP();
  ------------------
  |  |   35|  1.70k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.70k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  198|  1.70k|	yych = YYPEEK();
  ------------------
  |  |   33|  1.70k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.70k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.70k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.70k, False: 5]
  |  |  ------------------
  ------------------
  199|  1.70k|	switch (yych) {
  200|    791|		case '=': goto yy8;
  ------------------
  |  Branch (200:3): [True: 791, False: 915]
  ------------------
  201|    910|		case 'u': goto yy9;
  ------------------
  |  Branch (201:3): [True: 910, False: 796]
  ------------------
  202|      5|		default: goto yy7;
  ------------------
  |  Branch (202:3): [True: 5, False: 1.70k]
  ------------------
  203|  1.70k|	}
  204|    208|yy7:
  205|    208|	YYRESTORE();
  ------------------
  |  |   37|    208|#define YYRESTORE() YYCURSOR = YYMARKER
  |  |  ------------------
  |  |  |  |   31|    208|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYRESTORE() YYCURSOR = YYMARKER
  |  |  ------------------
  |  |  |  |   32|    208|#define YYMARKER context.marker
  |  |  ------------------
  ------------------
  206|    208|	goto yy2;
  207|    791|yy8:
  208|    791|	YYSKIP();
  ------------------
  |  |   35|    791|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    791|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  209|    791|	yych = YYPEEK();
  ------------------
  |  |   33|    791|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    791|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    788|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 788, False: 3]
  |  |  ------------------
  ------------------
  210|    791|	switch (yych) {
  211|    241|		case '0':
  ------------------
  |  Branch (211:3): [True: 241, False: 550]
  ------------------
  212|    398|		case '1':
  ------------------
  |  Branch (212:3): [True: 157, False: 634]
  ------------------
  213|    524|		case '2':
  ------------------
  |  Branch (213:3): [True: 126, False: 665]
  ------------------
  214|    543|		case '3':
  ------------------
  |  Branch (214:3): [True: 19, False: 772]
  ------------------
  215|    568|		case '4':
  ------------------
  |  Branch (215:3): [True: 25, False: 766]
  ------------------
  216|    623|		case '5':
  ------------------
  |  Branch (216:3): [True: 55, False: 736]
  ------------------
  217|    701|		case '6':
  ------------------
  |  Branch (217:3): [True: 78, False: 713]
  ------------------
  218|    733|		case '7':
  ------------------
  |  Branch (218:3): [True: 32, False: 759]
  ------------------
  219|    770|		case '8':
  ------------------
  |  Branch (219:3): [True: 37, False: 754]
  ------------------
  220|    780|		case '9':
  ------------------
  |  Branch (220:3): [True: 10, False: 781]
  ------------------
  221|    780|			YYSTAGP(context.yyt1);
  ------------------
  |  |   38|    780|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|    780|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  222|    780|			goto yy10;
  223|     11|		default: goto yy7;
  ------------------
  |  Branch (223:3): [True: 11, False: 780]
  ------------------
  224|    791|	}
  225|    910|yy9:
  226|    910|	YYSKIP();
  ------------------
  |  |   35|    910|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    910|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  227|    910|	yych = YYPEEK();
  ------------------
  |  |   33|    910|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    910|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    906|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 906, False: 4]
  |  |  ------------------
  ------------------
  228|    910|	switch (yych) {
  229|    897|		case '=': goto yy11;
  ------------------
  |  Branch (229:3): [True: 897, False: 13]
  ------------------
  230|     13|		default: goto yy7;
  ------------------
  |  Branch (230:3): [True: 13, False: 897]
  ------------------
  231|    910|	}
  232|  4.06k|yy10:
  233|  4.06k|	YYSKIP();
  ------------------
  |  |   35|  4.06k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  4.06k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  234|  4.06k|	yych = YYPEEK();
  ------------------
  |  |   33|  4.06k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  4.06k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  3.96k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 3.96k, False: 105]
  |  |  ------------------
  ------------------
  235|  4.06k|	switch (yych) {
  236|    616|		case '0':
  ------------------
  |  Branch (236:3): [True: 616, False: 3.45k]
  ------------------
  237|    904|		case '1':
  ------------------
  |  Branch (237:3): [True: 288, False: 3.78k]
  ------------------
  238|  1.22k|		case '2':
  ------------------
  |  Branch (238:3): [True: 324, False: 3.74k]
  ------------------
  239|  1.53k|		case '3':
  ------------------
  |  Branch (239:3): [True: 307, False: 3.76k]
  ------------------
  240|  1.77k|		case '4':
  ------------------
  |  Branch (240:3): [True: 240, False: 3.82k]
  ------------------
  241|  1.99k|		case '5':
  ------------------
  |  Branch (241:3): [True: 223, False: 3.84k]
  ------------------
  242|  2.33k|		case '6':
  ------------------
  |  Branch (242:3): [True: 336, False: 3.73k]
  ------------------
  243|  2.59k|		case '7':
  ------------------
  |  Branch (243:3): [True: 258, False: 3.81k]
  ------------------
  244|  2.94k|		case '8':
  ------------------
  |  Branch (244:3): [True: 355, False: 3.71k]
  ------------------
  245|  3.28k|		case '9': goto yy10;
  ------------------
  |  Branch (245:3): [True: 341, False: 3.72k]
  ------------------
  246|    675|		case ';':
  ------------------
  |  Branch (246:3): [True: 675, False: 3.39k]
  ------------------
  247|    675|			YYSTAGN(context.yyt2);
  ------------------
  |  |   39|    675|#define YYSTAGN(t) t = NULL
  ------------------
  248|    675|			goto yy12;
  249|    105|		default: goto yy7;
  ------------------
  |  Branch (249:3): [True: 105, False: 3.96k]
  ------------------
  250|  4.06k|	}
  251|    897|yy11:
  252|    897|	YYSKIP();
  ------------------
  |  |   35|    897|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    897|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  253|    897|	yych = YYPEEK();
  ------------------
  |  |   33|    897|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    897|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    893|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 893, False: 4]
  |  |  ------------------
  ------------------
  254|    897|	switch (yych) {
  255|      4|		case 0x00: goto yy7;
  ------------------
  |  Branch (255:3): [True: 4, False: 893]
  ------------------
  256|    534|		case ';':
  ------------------
  |  Branch (256:3): [True: 534, False: 363]
  ------------------
  257|    534|			YYSTAGN(context.yyt1);
  ------------------
  |  |   39|    534|#define YYSTAGN(t) t = NULL
  ------------------
  258|    534|			YYSTAGP(context.yyt2);
  ------------------
  |  |   38|    534|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|    534|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  259|    534|			goto yy12;
  260|    359|		default:
  ------------------
  |  Branch (260:3): [True: 359, False: 538]
  ------------------
  261|    359|			YYSTAGP(context.yyt2);
  ------------------
  |  |   38|    359|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|    359|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  262|    359|			goto yy13;
  263|    897|	}
  264|  1.55k|yy12:
  265|  1.55k|	YYSKIP();
  ------------------
  |  |   35|  1.55k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.55k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  266|  1.55k|	yych = YYPEEK();
  ------------------
  |  |   33|  1.55k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.55k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.53k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.53k, False: 17]
  |  |  ------------------
  ------------------
  267|  1.55k|	switch (yych) {
  268|    200|		case 'b':
  ------------------
  |  Branch (268:3): [True: 200, False: 1.35k]
  ------------------
  269|    401|		case 'g':
  ------------------
  |  Branch (269:3): [True: 201, False: 1.35k]
  ------------------
  270|    607|		case 'i':
  ------------------
  |  Branch (270:3): [True: 206, False: 1.34k]
  ------------------
  271|  1.53k|		case 's': goto yy14;
  ------------------
  |  Branch (271:3): [True: 930, False: 625]
  ------------------
  272|     18|		default: goto yy7;
  ------------------
  |  Branch (272:3): [True: 18, False: 1.53k]
  ------------------
  273|  1.55k|	}
  274|  1.87k|yy13:
  275|  1.87k|	YYSKIP();
  ------------------
  |  |   35|  1.87k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.87k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  276|  1.87k|	yych = YYPEEK();
  ------------------
  |  |   33|  1.87k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.87k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.86k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.86k, False: 13]
  |  |  ------------------
  ------------------
  277|  1.87k|	switch (yych) {
  278|     13|		case 0x00: goto yy7;
  ------------------
  |  Branch (278:3): [True: 13, False: 1.86k]
  ------------------
  279|    346|		case ';':
  ------------------
  |  Branch (279:3): [True: 346, False: 1.53k]
  ------------------
  280|    346|			YYSTAGN(context.yyt1);
  ------------------
  |  |   39|    346|#define YYSTAGN(t) t = NULL
  ------------------
  281|    346|			goto yy12;
  282|  1.52k|		default: goto yy13;
  ------------------
  |  Branch (282:3): [True: 1.52k, False: 359]
  ------------------
  283|  1.87k|	}
  284|  1.53k|yy14:
  285|  1.53k|	YYSKIP();
  ------------------
  |  |   35|  1.53k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.53k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  286|  1.53k|	yych = YYPEEK();
  ------------------
  |  |   33|  1.53k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.53k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.51k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.51k, False: 27]
  |  |  ------------------
  ------------------
  287|  1.53k|	switch (yych) {
  288|  1.49k|		case '=': goto yy5;
  ------------------
  |  Branch (288:3): [True: 1.49k, False: 39]
  ------------------
  289|     39|		default: goto yy7;
  ------------------
  |  Branch (289:3): [True: 39, False: 1.49k]
  ------------------
  290|  1.53k|	}
  291|  1.53k|}
  292|       |
  293|       |
  294|  29.6k| match:
  295|  29.6k|    if(nsu) {
  ------------------
  |  Branch (295:8): [True: 842, False: 28.7k]
  ------------------
  296|       |        /* NamespaceUri */
  297|    842|        UA_String nsUri = {(size_t)(body - 1 - nsu), (UA_Byte*)(uintptr_t)nsu};
  298|    842|        UA_StatusCode res = escapedUri2Index(nsUri, &id->namespaceIndex, nsMapping);
  299|    842|        if(res != UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|    842|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (299:12): [True: 842, False: 0]
  ------------------
  300|       |            /* Return the entire NodeId string s=... */
  301|    842|            UA_String total = {(size_t)((const UA_Byte*)end - begin), begin};
  302|    842|            id->identifierType = UA_NODEIDTYPE_STRING;
  303|    842|            return UA_String_copy(&total, &id->identifier.string);
  304|    842|        }
  305|  28.7k|    } else if(ns) {
  ------------------
  |  Branch (305:15): [True: 656, False: 28.1k]
  ------------------
  306|       |        /* NamespaceIndex */
  307|    656|        UA_UInt32 tmp;
  308|    656|        size_t len = (size_t)(body - 1 - ns);
  309|    656|        if(UA_readNumber((const UA_Byte*)ns, len, &tmp) != len)
  ------------------
  |  Branch (309:12): [True: 0, False: 656]
  ------------------
  310|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  311|    656|        id->namespaceIndex = (UA_UInt16)tmp;
  312|    656|        if(nsMapping)
  ------------------
  |  Branch (312:12): [True: 0, False: 656]
  ------------------
  313|      0|            id->namespaceIndex =
  314|      0|                UA_NamespaceMapping_remote2Local(nsMapping, id->namespaceIndex);
  315|    656|    }
  316|       |
  317|       |    /* From the current position until the end */
  318|  28.7k|    return parse_nodeid_body(id, body, end, idEsc);
  319|  29.6k|}
ua_types_lex.c:escapedUri2Index:
   95|  1.84k|                 const UA_NamespaceMapping *nsMapping) {
   96|  1.84k|    if(!nsMapping)
  ------------------
  |  Branch (96:8): [True: 1.84k, False: 0]
  ------------------
   97|  1.84k|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|  1.84k|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
   98|      0|    UA_String tmp = uri; 
   99|      0|    status res = UA_String_unescape(&uri, true, UA_ESCAPING_PERCENT);
  100|      0|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (100:8): [True: 0, False: 0]
  ------------------
  101|      0|        return res;
  102|      0|    res = UA_NamespaceMapping_uri2Index(nsMapping, uri, nsIndex);
  103|      0|    if(tmp.data != uri.data)
  ------------------
  |  Branch (103:8): [True: 0, False: 0]
  ------------------
  104|      0|        UA_String_clear(&uri);
  105|      0|    return res;
  106|      0|}
ua_types_lex.c:parse_nodeid_body:
  109|  30.9k|parse_nodeid_body(UA_NodeId *id, const u8 *body, const u8 *end, UA_Escaping esc) {
  110|  30.9k|    UA_StatusCode res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  30.9k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  111|  30.9k|    UA_String str = {(size_t)(end - (body+2)), (UA_Byte*)(uintptr_t)body + 2};
  112|  30.9k|    switch(*body) {
  113|  20.6k|    case 'i':
  ------------------
  |  Branch (113:5): [True: 20.6k, False: 10.3k]
  ------------------
  114|  20.6k|        id->identifierType = UA_NODEIDTYPE_NUMERIC;
  115|  20.6k|        if(UA_readNumber(str.data, str.length, &id->identifier.numeric) != str.length)
  ------------------
  |  Branch (115:12): [True: 70, False: 20.5k]
  ------------------
  116|     70|            res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|     70|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  117|  20.6k|        break;
  118|  9.18k|    case 's':
  ------------------
  |  Branch (118:5): [True: 9.18k, False: 21.7k]
  ------------------
  119|  9.18k|        id->identifierType = UA_NODEIDTYPE_STRING;
  120|  9.18k|        res |= UA_String_copy(&str, &id->identifier.string);
  121|  9.18k|        res |= UA_String_unescape(&id->identifier.string, false, esc);
  122|  9.18k|        break;
  123|     35|    case 'g':
  ------------------
  |  Branch (123:5): [True: 35, False: 30.8k]
  ------------------
  124|     35|        id->identifierType = UA_NODEIDTYPE_GUID;
  125|     35|        res = parse_guid(&id->identifier.guid, str.data, end);
  126|     35|        break;
  127|  1.08k|    case 'b':
  ------------------
  |  Branch (127:5): [True: 1.08k, False: 29.8k]
  ------------------
  128|       |        /* For percent-escaping, base64url bytestring encoding is used. That
  129|       |         * doesn't need to be escaped here. The and-escaping is not applied to
  130|       |         * the NodeId identifier part. */
  131|  1.08k|        id->identifierType = UA_NODEIDTYPE_BYTESTRING;
  132|  1.08k|        id->identifier.byteString.data =
  133|  1.08k|            UA_unbase64(str.data, str.length, &id->identifier.byteString.length);
  134|  1.08k|        if(!id->identifier.byteString.data) {
  ------------------
  |  Branch (134:12): [True: 23, False: 1.05k]
  ------------------
  135|     23|            UA_assert(id->identifier.byteString.length == 0);
  ------------------
  |  |  400|     23|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (135:13): [True: 23, False: 0]
  ------------------
  136|     23|            res = UA_STATUSCODE_BADDECODINGERROR; /* Returned on error by UA_unbase64 */
  ------------------
  |  |   44|     23|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  137|     23|        }
  138|  1.08k|        break;
  139|  1.08k|    default:
  ------------------
  |  Branch (139:5): [True: 0, False: 30.9k]
  ------------------
  140|      0|        res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  141|      0|        break;
  142|  30.9k|    }
  143|  30.9k|    return res;
  144|  30.9k|}
ua_types_lex.c:parse_expandednodeid:
  339|  3.57k|                     size_t serverUrisSize, const UA_String *serverUris) {
  340|  3.57k|    *id = UA_EXPANDEDNODEID_NULL; /* Reset the NodeId */
  341|  3.57k|    LexContext context;
  342|  3.57k|    memset(&context, 0, sizeof(LexContext));
  343|  3.57k|    const u8 *svr = NULL, *sve = NULL, *svu = NULL,
  344|  3.57k|        *nsu = NULL, *ns = NULL, *body = NULL, *begin = pos;
  345|       |
  346|       |    
  347|  3.57k|{
  348|  3.57k|	u8 yych;
  349|  3.57k|	yych = YYPEEK();
  ------------------
  |  |   33|  3.57k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  3.57k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  3.57k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 3.57k, False: 5]
  |  |  ------------------
  ------------------
  350|  3.57k|	switch (yych) {
  351|    218|		case 'b':
  ------------------
  |  Branch (351:3): [True: 218, False: 3.35k]
  ------------------
  352|    223|		case 'g':
  ------------------
  |  Branch (352:3): [True: 5, False: 3.57k]
  ------------------
  353|    452|		case 'i':
  ------------------
  |  Branch (353:3): [True: 229, False: 3.34k]
  ------------------
  354|    452|			YYSTAGN(context.yyt1);
  ------------------
  |  |   39|    452|#define YYSTAGN(t) t = NULL
  ------------------
  355|    452|			YYSTAGN(context.yyt2);
  ------------------
  |  |   39|    452|#define YYSTAGN(t) t = NULL
  ------------------
  356|    452|			YYSTAGN(context.yyt3);
  ------------------
  |  |   39|    452|#define YYSTAGN(t) t = NULL
  ------------------
  357|    452|			YYSTAGN(context.yyt4);
  ------------------
  |  |   39|    452|#define YYSTAGN(t) t = NULL
  ------------------
  358|    452|			YYSTAGN(context.yyt5);
  ------------------
  |  |   39|    452|#define YYSTAGN(t) t = NULL
  ------------------
  359|    452|			goto yy18;
  360|  1.17k|		case 'n':
  ------------------
  |  Branch (360:3): [True: 1.17k, False: 2.40k]
  ------------------
  361|  1.17k|			YYSTAGN(context.yyt1);
  ------------------
  |  |   39|  1.17k|#define YYSTAGN(t) t = NULL
  ------------------
  362|  1.17k|			YYSTAGN(context.yyt2);
  ------------------
  |  |   39|  1.17k|#define YYSTAGN(t) t = NULL
  ------------------
  363|  1.17k|			YYSTAGN(context.yyt5);
  ------------------
  |  |   39|  1.17k|#define YYSTAGN(t) t = NULL
  ------------------
  364|  1.17k|			goto yy19;
  365|  1.94k|		case 's':
  ------------------
  |  Branch (365:3): [True: 1.94k, False: 1.62k]
  ------------------
  366|  1.94k|			YYSTAGN(context.yyt1);
  ------------------
  |  |   39|  1.94k|#define YYSTAGN(t) t = NULL
  ------------------
  367|  1.94k|			YYSTAGN(context.yyt2);
  ------------------
  |  |   39|  1.94k|#define YYSTAGN(t) t = NULL
  ------------------
  368|  1.94k|			YYSTAGN(context.yyt3);
  ------------------
  |  |   39|  1.94k|#define YYSTAGN(t) t = NULL
  ------------------
  369|  1.94k|			YYSTAGN(context.yyt4);
  ------------------
  |  |   39|  1.94k|#define YYSTAGN(t) t = NULL
  ------------------
  370|  1.94k|			YYSTAGN(context.yyt5);
  ------------------
  |  |   39|  1.94k|#define YYSTAGN(t) t = NULL
  ------------------
  371|  1.94k|			goto yy20;
  372|      6|		default: goto yy16;
  ------------------
  |  Branch (372:3): [True: 6, False: 3.56k]
  ------------------
  373|  3.57k|	}
  374|      6|yy16:
  375|      6|	YYSKIP();
  ------------------
  |  |   35|      6|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|      6|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  376|    457|yy17:
  377|    457|	{ (void)pos; return UA_STATUSCODE_BADDECODINGERROR; }
  ------------------
  |  |   44|    457|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  378|    452|yy18:
  379|    452|	YYSKIP();
  ------------------
  |  |   35|    452|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    452|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  380|    452|	yych = YYPEEK();
  ------------------
  |  |   33|    452|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    452|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    442|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 442, False: 10]
  |  |  ------------------
  ------------------
  381|    452|	switch (yych) {
  382|    427|		case '=': goto yy21;
  ------------------
  |  Branch (382:3): [True: 427, False: 25]
  ------------------
  383|     25|		default: goto yy17;
  ------------------
  |  Branch (383:3): [True: 25, False: 427]
  ------------------
  384|    452|	}
  385|  1.17k|yy19:
  386|  1.17k|	YYSKIP();
  ------------------
  |  |   35|  1.17k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.17k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  387|  1.17k|	YYBACKUP();
  ------------------
  |  |   36|  1.17k|#define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   32|  1.17k|#define YYMARKER context.marker
  |  |  ------------------
  |  |               #define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|  1.17k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  388|  1.17k|	yych = YYPEEK();
  ------------------
  |  |   33|  1.17k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.17k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.17k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.17k, False: 1]
  |  |  ------------------
  ------------------
  389|  1.17k|	switch (yych) {
  390|  1.15k|		case 's': goto yy22;
  ------------------
  |  Branch (390:3): [True: 1.15k, False: 12]
  ------------------
  391|     12|		default: goto yy17;
  ------------------
  |  Branch (391:3): [True: 12, False: 1.15k]
  ------------------
  392|  1.17k|	}
  393|  1.94k|yy20:
  394|  1.94k|	YYSKIP();
  ------------------
  |  |   35|  1.94k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.94k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  395|  1.94k|	YYBACKUP();
  ------------------
  |  |   36|  1.94k|#define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   32|  1.94k|#define YYMARKER context.marker
  |  |  ------------------
  |  |               #define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|  1.94k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  396|  1.94k|	yych = YYPEEK();
  ------------------
  |  |   33|  1.94k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.94k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.94k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.94k, False: 2]
  |  |  ------------------
  ------------------
  397|  1.94k|	switch (yych) {
  398|    205|		case '=': goto yy21;
  ------------------
  |  Branch (398:3): [True: 205, False: 1.74k]
  ------------------
  399|  1.73k|		case 'v': goto yy24;
  ------------------
  |  Branch (399:3): [True: 1.73k, False: 207]
  ------------------
  400|      2|		default: goto yy17;
  ------------------
  |  Branch (400:3): [True: 2, False: 1.94k]
  ------------------
  401|  1.94k|	}
  402|  3.11k|yy21:
  403|  3.11k|	YYSKIP();
  ------------------
  |  |   35|  3.11k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  3.11k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  404|  3.11k|	svr = context.yyt5;
  405|  3.11k|	svu = context.yyt1;
  406|  3.11k|	sve = context.yyt2;
  407|  3.11k|	ns = context.yyt3;
  408|  3.11k|	nsu = context.yyt4;
  409|  3.11k|	YYSTAGP(body);
  ------------------
  |  |   38|  3.11k|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|  3.11k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  410|  3.11k|	YYSHIFTSTAG(body, -2);
  ------------------
  |  |   40|  3.11k|#define YYSHIFTSTAG(t, shift) t += shift
  ------------------
  411|  3.11k|	{ goto match; }
  412|  1.63k|yy22:
  413|  1.63k|	YYSKIP();
  ------------------
  |  |   35|  1.63k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.63k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  414|  1.63k|	yych = YYPEEK();
  ------------------
  |  |   33|  1.63k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.63k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.62k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.62k, False: 7]
  |  |  ------------------
  ------------------
  415|  1.63k|	switch (yych) {
  416|    382|		case '=': goto yy25;
  ------------------
  |  Branch (416:3): [True: 382, False: 1.25k]
  ------------------
  417|  1.24k|		case 'u': goto yy26;
  ------------------
  |  Branch (417:3): [True: 1.24k, False: 391]
  ------------------
  418|      9|		default: goto yy23;
  ------------------
  |  Branch (418:3): [True: 9, False: 1.62k]
  ------------------
  419|  1.63k|	}
  420|    412|yy23:
  421|    412|	YYRESTORE();
  ------------------
  |  |   37|    412|#define YYRESTORE() YYCURSOR = YYMARKER
  |  |  ------------------
  |  |  |  |   31|    412|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYRESTORE() YYCURSOR = YYMARKER
  |  |  ------------------
  |  |  |  |   32|    412|#define YYMARKER context.marker
  |  |  ------------------
  ------------------
  422|    412|	goto yy17;
  423|  1.73k|yy24:
  424|  1.73k|	YYSKIP();
  ------------------
  |  |   35|  1.73k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.73k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  425|  1.73k|	yych = YYPEEK();
  ------------------
  |  |   33|  1.73k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.73k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.73k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.73k, False: 1]
  |  |  ------------------
  ------------------
  426|  1.73k|	switch (yych) {
  427|    626|		case 'r': goto yy27;
  ------------------
  |  Branch (427:3): [True: 626, False: 1.11k]
  ------------------
  428|  1.10k|		case 'u': goto yy28;
  ------------------
  |  Branch (428:3): [True: 1.10k, False: 631]
  ------------------
  429|      5|		default: goto yy23;
  ------------------
  |  Branch (429:3): [True: 5, False: 1.73k]
  ------------------
  430|  1.73k|	}
  431|    382|yy25:
  432|    382|	YYSKIP();
  ------------------
  |  |   35|    382|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    382|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  433|    382|	yych = YYPEEK();
  ------------------
  |  |   33|    382|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    382|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    381|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 381, False: 1]
  |  |  ------------------
  ------------------
  434|    382|	switch (yych) {
  435|    154|		case '0':
  ------------------
  |  Branch (435:3): [True: 154, False: 228]
  ------------------
  436|    191|		case '1':
  ------------------
  |  Branch (436:3): [True: 37, False: 345]
  ------------------
  437|    209|		case '2':
  ------------------
  |  Branch (437:3): [True: 18, False: 364]
  ------------------
  438|    234|		case '3':
  ------------------
  |  Branch (438:3): [True: 25, False: 357]
  ------------------
  439|    250|		case '4':
  ------------------
  |  Branch (439:3): [True: 16, False: 366]
  ------------------
  440|    267|		case '5':
  ------------------
  |  Branch (440:3): [True: 17, False: 365]
  ------------------
  441|    358|		case '6':
  ------------------
  |  Branch (441:3): [True: 91, False: 291]
  ------------------
  442|    368|		case '7':
  ------------------
  |  Branch (442:3): [True: 10, False: 372]
  ------------------
  443|    376|		case '8':
  ------------------
  |  Branch (443:3): [True: 8, False: 374]
  ------------------
  444|    380|		case '9':
  ------------------
  |  Branch (444:3): [True: 4, False: 378]
  ------------------
  445|    380|			YYSTAGP(context.yyt3);
  ------------------
  |  |   38|    380|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|    380|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  446|    380|			goto yy29;
  447|      2|		default: goto yy23;
  ------------------
  |  Branch (447:3): [True: 2, False: 380]
  ------------------
  448|    382|	}
  449|  1.24k|yy26:
  450|  1.24k|	YYSKIP();
  ------------------
  |  |   35|  1.24k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.24k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  451|  1.24k|	yych = YYPEEK();
  ------------------
  |  |   33|  1.24k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.24k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.24k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.24k, False: 1]
  |  |  ------------------
  ------------------
  452|  1.24k|	switch (yych) {
  453|  1.23k|		case '=': goto yy30;
  ------------------
  |  Branch (453:3): [True: 1.23k, False: 9]
  ------------------
  454|      9|		default: goto yy23;
  ------------------
  |  Branch (454:3): [True: 9, False: 1.23k]
  ------------------
  455|  1.24k|	}
  456|    626|yy27:
  457|    626|	YYSKIP();
  ------------------
  |  |   35|    626|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    626|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  458|    626|	yych = YYPEEK();
  ------------------
  |  |   33|    626|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    626|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    625|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 625, False: 1]
  |  |  ------------------
  ------------------
  459|    626|	switch (yych) {
  460|    613|		case '=': goto yy31;
  ------------------
  |  Branch (460:3): [True: 613, False: 13]
  ------------------
  461|     13|		default: goto yy23;
  ------------------
  |  Branch (461:3): [True: 13, False: 613]
  ------------------
  462|    626|	}
  463|  1.10k|yy28:
  464|  1.10k|	YYSKIP();
  ------------------
  |  |   35|  1.10k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.10k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  465|  1.10k|	yych = YYPEEK();
  ------------------
  |  |   33|  1.10k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.10k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.10k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.10k, False: 2]
  |  |  ------------------
  ------------------
  466|  1.10k|	switch (yych) {
  467|  1.09k|		case '=': goto yy32;
  ------------------
  |  Branch (467:3): [True: 1.09k, False: 17]
  ------------------
  468|     17|		default: goto yy23;
  ------------------
  |  Branch (468:3): [True: 17, False: 1.09k]
  ------------------
  469|  1.10k|	}
  470|  8.26k|yy29:
  471|  8.26k|	YYSKIP();
  ------------------
  |  |   35|  8.26k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  8.26k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  472|  8.26k|	yych = YYPEEK();
  ------------------
  |  |   33|  8.26k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  8.26k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  8.18k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 8.18k, False: 85]
  |  |  ------------------
  ------------------
  473|  8.26k|	switch (yych) {
  474|  5.25k|		case '0':
  ------------------
  |  Branch (474:3): [True: 5.25k, False: 3.01k]
  ------------------
  475|  5.49k|		case '1':
  ------------------
  |  Branch (475:3): [True: 243, False: 8.02k]
  ------------------
  476|  5.73k|		case '2':
  ------------------
  |  Branch (476:3): [True: 242, False: 8.02k]
  ------------------
  477|  6.03k|		case '3':
  ------------------
  |  Branch (477:3): [True: 300, False: 7.96k]
  ------------------
  478|  6.30k|		case '4':
  ------------------
  |  Branch (478:3): [True: 266, False: 8.00k]
  ------------------
  479|  6.54k|		case '5':
  ------------------
  |  Branch (479:3): [True: 235, False: 8.03k]
  ------------------
  480|  6.82k|		case '6':
  ------------------
  |  Branch (480:3): [True: 289, False: 7.97k]
  ------------------
  481|  7.09k|		case '7':
  ------------------
  |  Branch (481:3): [True: 261, False: 8.00k]
  ------------------
  482|  7.37k|		case '8':
  ------------------
  |  Branch (482:3): [True: 283, False: 7.98k]
  ------------------
  483|  7.88k|		case '9': goto yy29;
  ------------------
  |  Branch (483:3): [True: 514, False: 7.75k]
  ------------------
  484|    293|		case ';':
  ------------------
  |  Branch (484:3): [True: 293, False: 7.97k]
  ------------------
  485|    293|			YYSTAGN(context.yyt4);
  ------------------
  |  |   39|    293|#define YYSTAGN(t) t = NULL
  ------------------
  486|    293|			goto yy33;
  487|     87|		default: goto yy23;
  ------------------
  |  Branch (487:3): [True: 87, False: 8.18k]
  ------------------
  488|  8.26k|	}
  489|  1.23k|yy30:
  490|  1.23k|	YYSKIP();
  ------------------
  |  |   35|  1.23k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.23k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  491|  1.23k|	yych = YYPEEK();
  ------------------
  |  |   33|  1.23k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.23k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.23k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.23k, False: 1]
  |  |  ------------------
  ------------------
  492|  1.23k|	switch (yych) {
  493|      1|		case 0x00: goto yy23;
  ------------------
  |  Branch (493:3): [True: 1, False: 1.23k]
  ------------------
  494|    522|		case ';':
  ------------------
  |  Branch (494:3): [True: 522, False: 712]
  ------------------
  495|    522|			YYSTAGN(context.yyt3);
  ------------------
  |  |   39|    522|#define YYSTAGN(t) t = NULL
  ------------------
  496|    522|			YYSTAGP(context.yyt4);
  ------------------
  |  |   38|    522|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|    522|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  497|    522|			goto yy33;
  498|    711|		default:
  ------------------
  |  Branch (498:3): [True: 711, False: 523]
  ------------------
  499|    711|			YYSTAGP(context.yyt4);
  ------------------
  |  |   38|    711|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|    711|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  500|    711|			goto yy34;
  501|  1.23k|	}
  502|    613|yy31:
  503|    613|	YYSKIP();
  ------------------
  |  |   35|    613|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    613|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  504|    613|	yych = YYPEEK();
  ------------------
  |  |   33|    613|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    613|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    612|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 612, False: 1]
  |  |  ------------------
  ------------------
  505|    613|	switch (yych) {
  506|    309|		case '0':
  ------------------
  |  Branch (506:3): [True: 309, False: 304]
  ------------------
  507|    362|		case '1':
  ------------------
  |  Branch (507:3): [True: 53, False: 560]
  ------------------
  508|    387|		case '2':
  ------------------
  |  Branch (508:3): [True: 25, False: 588]
  ------------------
  509|    424|		case '3':
  ------------------
  |  Branch (509:3): [True: 37, False: 576]
  ------------------
  510|    435|		case '4':
  ------------------
  |  Branch (510:3): [True: 11, False: 602]
  ------------------
  511|    526|		case '5':
  ------------------
  |  Branch (511:3): [True: 91, False: 522]
  ------------------
  512|    558|		case '6':
  ------------------
  |  Branch (512:3): [True: 32, False: 581]
  ------------------
  513|    587|		case '7':
  ------------------
  |  Branch (513:3): [True: 29, False: 584]
  ------------------
  514|    597|		case '8':
  ------------------
  |  Branch (514:3): [True: 10, False: 603]
  ------------------
  515|    598|		case '9':
  ------------------
  |  Branch (515:3): [True: 1, False: 612]
  ------------------
  516|    598|			YYSTAGP(context.yyt5);
  ------------------
  |  |   38|    598|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|    598|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  517|    598|			goto yy35;
  518|     15|		default: goto yy23;
  ------------------
  |  Branch (518:3): [True: 15, False: 598]
  ------------------
  519|    613|	}
  520|  1.09k|yy32:
  521|  1.09k|	YYSKIP();
  ------------------
  |  |   35|  1.09k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.09k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  522|  1.09k|	yych = YYPEEK();
  ------------------
  |  |   33|  1.09k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.09k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.09k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.09k, False: 1]
  |  |  ------------------
  ------------------
  523|  1.09k|	switch (yych) {
  524|      1|		case 0x00: goto yy23;
  ------------------
  |  Branch (524:3): [True: 1, False: 1.09k]
  ------------------
  525|    642|		case ';':
  ------------------
  |  Branch (525:3): [True: 642, False: 449]
  ------------------
  526|    642|			YYSTAGP(context.yyt1);
  ------------------
  |  |   38|    642|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|    642|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  527|    642|			YYSTAGP(context.yyt2);
  ------------------
  |  |   38|    642|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|    642|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  528|    642|			YYSTAGN(context.yyt5);
  ------------------
  |  |   39|    642|#define YYSTAGN(t) t = NULL
  ------------------
  529|    642|			goto yy37;
  530|    448|		default:
  ------------------
  |  Branch (530:3): [True: 448, False: 643]
  ------------------
  531|    448|			YYSTAGP(context.yyt1);
  ------------------
  |  |   38|    448|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|    448|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  532|    448|			goto yy36;
  533|  1.09k|	}
  534|  1.51k|yy33:
  535|  1.51k|	YYSKIP();
  ------------------
  |  |   35|  1.51k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.51k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  536|  1.51k|	yych = YYPEEK();
  ------------------
  |  |   33|  1.51k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.51k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.50k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.50k, False: 12]
  |  |  ------------------
  ------------------
  537|  1.51k|	switch (yych) {
  538|    219|		case 'b':
  ------------------
  |  Branch (538:3): [True: 219, False: 1.29k]
  ------------------
  539|    442|		case 'g':
  ------------------
  |  Branch (539:3): [True: 223, False: 1.29k]
  ------------------
  540|    820|		case 'i':
  ------------------
  |  Branch (540:3): [True: 378, False: 1.13k]
  ------------------
  541|  1.50k|		case 's': goto yy38;
  ------------------
  |  Branch (541:3): [True: 682, False: 835]
  ------------------
  542|     15|		default: goto yy23;
  ------------------
  |  Branch (542:3): [True: 15, False: 1.50k]
  ------------------
  543|  1.51k|	}
  544|  1.72k|yy34:
  545|  1.72k|	YYSKIP();
  ------------------
  |  |   35|  1.72k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.72k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  546|  1.72k|	yych = YYPEEK();
  ------------------
  |  |   33|  1.72k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.72k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.71k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.71k, False: 9]
  |  |  ------------------
  ------------------
  547|  1.72k|	switch (yych) {
  548|      9|		case 0x00: goto yy23;
  ------------------
  |  Branch (548:3): [True: 9, False: 1.71k]
  ------------------
  549|    702|		case ';':
  ------------------
  |  Branch (549:3): [True: 702, False: 1.02k]
  ------------------
  550|    702|			YYSTAGN(context.yyt3);
  ------------------
  |  |   39|    702|#define YYSTAGN(t) t = NULL
  ------------------
  551|    702|			goto yy33;
  552|  1.01k|		default: goto yy34;
  ------------------
  |  Branch (552:3): [True: 1.01k, False: 711]
  ------------------
  553|  1.72k|	}
  554|  68.5k|yy35:
  555|  68.5k|	YYSKIP();
  ------------------
  |  |   35|  68.5k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  68.5k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  556|  68.5k|	yych = YYPEEK();
  ------------------
  |  |   33|  68.5k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  68.5k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  68.5k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 68.5k, False: 84]
  |  |  ------------------
  ------------------
  557|  68.5k|	switch (yych) {
  558|  64.7k|		case '0':
  ------------------
  |  Branch (558:3): [True: 64.7k, False: 3.82k]
  ------------------
  559|  65.0k|		case '1':
  ------------------
  |  Branch (559:3): [True: 321, False: 68.2k]
  ------------------
  560|  65.3k|		case '2':
  ------------------
  |  Branch (560:3): [True: 265, False: 68.3k]
  ------------------
  561|  65.7k|		case '3':
  ------------------
  |  Branch (561:3): [True: 372, False: 68.2k]
  ------------------
  562|  66.0k|		case '4':
  ------------------
  |  Branch (562:3): [True: 311, False: 68.2k]
  ------------------
  563|  66.6k|		case '5':
  ------------------
  |  Branch (563:3): [True: 607, False: 67.9k]
  ------------------
  564|  66.9k|		case '6':
  ------------------
  |  Branch (564:3): [True: 319, False: 68.2k]
  ------------------
  565|  67.3k|		case '7':
  ------------------
  |  Branch (565:3): [True: 440, False: 68.1k]
  ------------------
  566|  67.6k|		case '8':
  ------------------
  |  Branch (566:3): [True: 289, False: 68.2k]
  ------------------
  567|  67.9k|		case '9': goto yy35;
  ------------------
  |  Branch (567:3): [True: 304, False: 68.2k]
  ------------------
  568|    481|		case ';':
  ------------------
  |  Branch (568:3): [True: 481, False: 68.1k]
  ------------------
  569|    481|			YYSTAGN(context.yyt1);
  ------------------
  |  |   39|    481|#define YYSTAGN(t) t = NULL
  ------------------
  570|    481|			YYSTAGP(context.yyt2);
  ------------------
  |  |   38|    481|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|    481|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  571|    481|			goto yy37;
  572|    117|		default: goto yy23;
  ------------------
  |  Branch (572:3): [True: 117, False: 68.4k]
  ------------------
  573|  68.5k|	}
  574|  3.57M|yy36:
  575|  3.57M|	YYSKIP();
  ------------------
  |  |   35|  3.57M|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  3.57M|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  576|  3.57M|	yych = YYPEEK();
  ------------------
  |  |   33|  3.57M|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  3.57M|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  3.57M|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 3.57M, False: 28]
  |  |  ------------------
  ------------------
  577|  3.57M|	switch (yych) {
  578|     28|		case 0x00: goto yy23;
  ------------------
  |  Branch (578:3): [True: 28, False: 3.57M]
  ------------------
  579|    420|		case ';':
  ------------------
  |  Branch (579:3): [True: 420, False: 3.57M]
  ------------------
  580|    420|			YYSTAGP(context.yyt2);
  ------------------
  |  |   38|    420|#define YYSTAGP(t) t = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|    420|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  581|    420|			YYSTAGN(context.yyt5);
  ------------------
  |  |   39|    420|#define YYSTAGN(t) t = NULL
  ------------------
  582|    420|			goto yy37;
  583|  3.57M|		default: goto yy36;
  ------------------
  |  Branch (583:3): [True: 3.57M, False: 448]
  ------------------
  584|  3.57M|	}
  585|  1.54k|yy37:
  586|  1.54k|	YYSKIP();
  ------------------
  |  |   35|  1.54k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.54k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  587|  1.54k|	yych = YYPEEK();
  ------------------
  |  |   33|  1.54k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.54k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.53k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.53k, False: 12]
  |  |  ------------------
  ------------------
  588|  1.54k|	switch (yych) {
  589|    198|		case 'b':
  ------------------
  |  Branch (589:3): [True: 198, False: 1.34k]
  ------------------
  590|    446|		case 'g':
  ------------------
  |  Branch (590:3): [True: 248, False: 1.29k]
  ------------------
  591|    656|		case 'i':
  ------------------
  |  Branch (591:3): [True: 210, False: 1.33k]
  ------------------
  592|  1.04k|		case 's':
  ------------------
  |  Branch (592:3): [True: 386, False: 1.15k]
  ------------------
  593|  1.04k|			YYSTAGN(context.yyt3);
  ------------------
  |  |   39|  1.04k|#define YYSTAGN(t) t = NULL
  ------------------
  594|  1.04k|			YYSTAGN(context.yyt4);
  ------------------
  |  |   39|  1.04k|#define YYSTAGN(t) t = NULL
  ------------------
  595|  1.04k|			goto yy38;
  596|    488|		case 'n': goto yy39;
  ------------------
  |  Branch (596:3): [True: 488, False: 1.05k]
  ------------------
  597|     13|		default: goto yy23;
  ------------------
  |  Branch (597:3): [True: 13, False: 1.53k]
  ------------------
  598|  1.54k|	}
  599|  2.54k|yy38:
  600|  2.54k|	YYSKIP();
  ------------------
  |  |   35|  2.54k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  2.54k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  601|  2.54k|	yych = YYPEEK();
  ------------------
  |  |   33|  2.54k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  2.54k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  2.50k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 2.50k, False: 43]
  |  |  ------------------
  ------------------
  602|  2.54k|	switch (yych) {
  603|  2.48k|		case '=': goto yy21;
  ------------------
  |  Branch (603:3): [True: 2.48k, False: 58]
  ------------------
  604|     58|		default: goto yy23;
  ------------------
  |  Branch (604:3): [True: 58, False: 2.48k]
  ------------------
  605|  2.54k|	}
  606|    488|yy39:
  607|    488|	YYSKIP();
  ------------------
  |  |   35|    488|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    488|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  608|    488|	yych = YYPEEK();
  ------------------
  |  |   33|    488|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    488|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|    487|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 487, False: 1]
  |  |  ------------------
  ------------------
  609|    488|	switch (yych) {
  610|    475|		case 's': goto yy22;
  ------------------
  |  Branch (610:3): [True: 475, False: 13]
  ------------------
  611|     13|		default: goto yy23;
  ------------------
  |  Branch (611:3): [True: 13, False: 475]
  ------------------
  612|    488|	}
  613|    488|}
  614|       |
  615|       |
  616|  3.11k| match:
  617|  3.11k|    if(svu) {
  ------------------
  |  Branch (617:8): [True: 1.01k, False: 2.10k]
  ------------------
  618|       |        /* ServerUri */
  619|  1.01k|        UA_String serverUri = {(size_t)(sve - svu), (UA_Byte*)(uintptr_t)svu};
  620|  1.01k|        size_t i = 0;
  621|  1.01k|        for(; i < serverUrisSize; i++) {
  ------------------
  |  Branch (621:15): [True: 0, False: 1.01k]
  ------------------
  622|      0|            if(UA_String_equal(&serverUri, &serverUris[i]))
  ------------------
  |  Branch (622:16): [True: 0, False: 0]
  ------------------
  623|      0|                break;
  624|      0|        }
  625|  1.01k|        if(i == serverUrisSize) {
  ------------------
  |  Branch (625:12): [True: 1.01k, False: 0]
  ------------------
  626|       |            /* The ServerUri cannot be mapped. Return the entire input as a
  627|       |             * string NodeId. */
  628|  1.01k|            UA_String total = {(size_t)(end - begin), (UA_Byte*)(uintptr_t)begin};
  629|  1.01k|            id->nodeId.identifierType = UA_NODEIDTYPE_STRING;
  630|  1.01k|            return UA_String_copy(&total, &id->nodeId.identifier.string);
  631|  1.01k|        }
  632|      0|        id->serverIndex = (UA_UInt32)i;
  633|  2.10k|    } else if(svr) {
  ------------------
  |  Branch (633:15): [True: 467, False: 1.64k]
  ------------------
  634|       |        /* ServerIndex */
  635|    467|        size_t len = (size_t)(sve - svr);
  636|    467|        if(UA_readNumber((const UA_Byte*)svr, len, &id->serverIndex) != len)
  ------------------
  |  Branch (636:12): [True: 0, False: 467]
  ------------------
  637|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  638|    467|    }
  639|       |
  640|  2.10k|    if(nsu) {
  ------------------
  |  Branch (640:8): [True: 980, False: 1.12k]
  ------------------
  641|       |        /* NamespaceUri */
  642|    980|        UA_String nsuri = {(size_t)(body - 1 - nsu), (UA_Byte*)(uintptr_t)nsu};
  643|    980|        UA_StatusCode res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|    980|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  644|       |        /* Try to map the NamespaceUri to its NamespaceIndex for ServerIndex == 0.
  645|       |         * If this fails, keep the full NamespaceUri. */
  646|    980|        if(id->serverIndex == 0)
  ------------------
  |  Branch (646:12): [True: 729, False: 251]
  ------------------
  647|    729|            res = escapedUri2Index(nsuri, &id->nodeId.namespaceIndex, nsMapping);
  648|    980|        if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    980|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (648:12): [True: 980, False: 0]
  ------------------
  649|    980|            res = UA_String_copy(&nsuri, &id->namespaceUri); /* Keep the Uri without mapping */
  650|    980|        if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    980|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (650:12): [True: 0, False: 980]
  ------------------
  651|      0|            return res;
  652|  1.12k|    } else if(ns) {
  ------------------
  |  Branch (652:15): [True: 280, False: 848]
  ------------------
  653|       |        /* NamespaceIndex */
  654|    280|        UA_UInt32 tmp;
  655|    280|        size_t len = (size_t)(body - 1 - ns);
  656|    280|        if(UA_readNumber((const UA_Byte*)ns, len, &tmp) != len)
  ------------------
  |  Branch (656:12): [True: 0, False: 280]
  ------------------
  657|      0|            return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  658|    280|        id->nodeId.namespaceIndex = (UA_UInt16)tmp;
  659|    280|        if(nsMapping)
  ------------------
  |  Branch (659:12): [True: 0, False: 280]
  ------------------
  660|      0|            id->nodeId.namespaceIndex =
  661|      0|                UA_NamespaceMapping_remote2Local(nsMapping, id->nodeId.namespaceIndex);
  662|    280|    }
  663|       |
  664|       |    /* From the current position until the end */
  665|  2.10k|    return parse_nodeid_body(&id->nodeId, body, end, idEsc);
  666|  2.10k|}
ua_types_lex.c:parse_qn:
  707|  24.9k|         UA_UInt16 defaultNamespaceIndex) {
  708|  24.9k|    size_t len;
  709|  24.9k|    UA_UInt32 tmp;
  710|  24.9k|    UA_String str;
  711|  24.9k|    UA_StatusCode res;
  712|       |
  713|  24.9k|    LexContext context;
  714|  24.9k|    memset(&context, 0, sizeof(LexContext));
  715|       |
  716|  24.9k|    const u8 *begin = pos;
  717|  24.9k|    UA_QualifiedName_init(qn);
  718|  24.9k|    qn->namespaceIndex = defaultNamespaceIndex;
  719|       |
  720|       |    
  721|  24.9k|{
  722|  24.9k|	u8 yych;
  723|  24.9k|	yych = YYPEEK();
  ------------------
  |  |   33|  24.9k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  24.9k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  23.3k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 23.3k, False: 1.63k]
  |  |  ------------------
  ------------------
  724|  24.9k|	switch (yych) {
  725|  1.63k|		case 0x00:
  ------------------
  |  Branch (725:3): [True: 1.63k, False: 23.3k]
  ------------------
  726|  1.83k|		case ';': goto yy41;
  ------------------
  |  Branch (726:3): [True: 202, False: 24.7k]
  ------------------
  727|    456|		case '0':
  ------------------
  |  Branch (727:3): [True: 456, False: 24.5k]
  ------------------
  728|  1.82k|		case '1':
  ------------------
  |  Branch (728:3): [True: 1.36k, False: 23.5k]
  ------------------
  729|  3.27k|		case '2':
  ------------------
  |  Branch (729:3): [True: 1.44k, False: 23.5k]
  ------------------
  730|  3.53k|		case '3':
  ------------------
  |  Branch (730:3): [True: 262, False: 24.6k]
  ------------------
  731|  6.91k|		case '4':
  ------------------
  |  Branch (731:3): [True: 3.38k, False: 21.5k]
  ------------------
  732|  8.16k|		case '5':
  ------------------
  |  Branch (732:3): [True: 1.24k, False: 23.7k]
  ------------------
  733|  18.5k|		case '6':
  ------------------
  |  Branch (733:3): [True: 10.4k, False: 14.5k]
  ------------------
  734|  19.4k|		case '7':
  ------------------
  |  Branch (734:3): [True: 851, False: 24.1k]
  ------------------
  735|  20.6k|		case '8':
  ------------------
  |  Branch (735:3): [True: 1.22k, False: 23.7k]
  ------------------
  736|  21.0k|		case '9': goto yy44;
  ------------------
  |  Branch (736:3): [True: 364, False: 24.5k]
  ------------------
  737|  2.11k|		default: goto yy43;
  ------------------
  |  Branch (737:3): [True: 2.11k, False: 22.8k]
  ------------------
  738|  24.9k|	}
  739|  1.83k|yy41:
  740|  1.83k|	YYSKIP();
  ------------------
  |  |   35|  1.83k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  1.83k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  741|  24.2k|yy42:
  742|  24.2k|	{ pos = begin; goto match_name; }
  743|  2.11k|yy43:
  744|  2.11k|	YYSKIP();
  ------------------
  |  |   35|  2.11k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  2.11k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  745|  2.11k|	YYBACKUP();
  ------------------
  |  |   36|  2.11k|#define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   32|  2.11k|#define YYMARKER context.marker
  |  |  ------------------
  |  |               #define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|  2.11k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  746|  2.11k|	yych = YYPEEK();
  ------------------
  |  |   33|  2.11k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  2.11k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  1.60k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 1.60k, False: 504]
  |  |  ------------------
  ------------------
  747|  2.11k|	if (yych <= 0x00) goto yy42;
  ------------------
  |  Branch (747:6): [True: 504, False: 1.60k]
  ------------------
  748|  1.60k|	goto yy46;
  749|  21.0k|yy44:
  750|  21.0k|	YYSKIP();
  ------------------
  |  |   35|  21.0k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  21.0k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  751|  21.0k|	YYBACKUP();
  ------------------
  |  |   36|  21.0k|#define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   32|  21.0k|#define YYMARKER context.marker
  |  |  ------------------
  |  |               #define YYBACKUP() YYMARKER = YYCURSOR
  |  |  ------------------
  |  |  |  |   31|  21.0k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  752|  21.0k|	yych = YYPEEK();
  ------------------
  |  |   33|  21.0k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  21.0k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  2.48k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 2.48k, False: 18.5k]
  |  |  ------------------
  ------------------
  753|  21.0k|	switch (yych) {
  754|    172|		case '0':
  ------------------
  |  Branch (754:3): [True: 172, False: 20.8k]
  ------------------
  755|    500|		case '1':
  ------------------
  |  Branch (755:3): [True: 328, False: 20.6k]
  ------------------
  756|    552|		case '2':
  ------------------
  |  Branch (756:3): [True: 52, False: 20.9k]
  ------------------
  757|    577|		case '3':
  ------------------
  |  Branch (757:3): [True: 25, False: 20.9k]
  ------------------
  758|    734|		case '4':
  ------------------
  |  Branch (758:3): [True: 157, False: 20.8k]
  ------------------
  759|    932|		case '5':
  ------------------
  |  Branch (759:3): [True: 198, False: 20.8k]
  ------------------
  760|    999|		case '6':
  ------------------
  |  Branch (760:3): [True: 67, False: 20.9k]
  ------------------
  761|  1.06k|		case '7':
  ------------------
  |  Branch (761:3): [True: 61, False: 20.9k]
  ------------------
  762|  1.23k|		case '8':
  ------------------
  |  Branch (762:3): [True: 177, False: 20.8k]
  ------------------
  763|  1.29k|		case '9':
  ------------------
  |  Branch (763:3): [True: 54, False: 20.9k]
  ------------------
  764|  1.51k|		case ':': goto yy50;
  ------------------
  |  Branch (764:3): [True: 223, False: 20.7k]
  ------------------
  765|  19.4k|		default: goto yy42;
  ------------------
  |  Branch (765:3): [True: 19.4k, False: 1.51k]
  ------------------
  766|  21.0k|	}
  767|  19.8k|yy45:
  768|  19.8k|	YYSKIP();
  ------------------
  |  |   35|  19.8k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|  19.8k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  769|  19.8k|	yych = YYPEEK();
  ------------------
  |  |   33|  19.8k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  19.8k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|  18.5k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 18.5k, False: 1.33k]
  |  |  ------------------
  ------------------
  770|  21.4k|yy46:
  771|  21.4k|	switch (yych) {
  772|  1.33k|		case 0x00: goto yy47;
  ------------------
  |  Branch (772:3): [True: 1.33k, False: 20.1k]
  ------------------
  773|    271|		case ';': goto yy48;
  ------------------
  |  Branch (773:3): [True: 271, False: 21.2k]
  ------------------
  774|  19.8k|		default: goto yy45;
  ------------------
  |  Branch (774:3): [True: 19.8k, False: 1.60k]
  ------------------
  775|  21.4k|	}
  776|  2.45k|yy47:
  777|  2.45k|	YYRESTORE();
  ------------------
  |  |   37|  2.45k|#define YYRESTORE() YYCURSOR = YYMARKER
  |  |  ------------------
  |  |  |  |   31|  2.45k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYRESTORE() YYCURSOR = YYMARKER
  |  |  ------------------
  |  |  |  |   32|  2.45k|#define YYMARKER context.marker
  |  |  ------------------
  ------------------
  778|  2.45k|	goto yy42;
  779|    271|yy48:
  780|    271|	YYSKIP();
  ------------------
  |  |   35|    271|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    271|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  781|    271|	{ goto match_uri; }
  782|   112k|yy49:
  783|   112k|	YYSKIP();
  ------------------
  |  |   35|   112k|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|   112k|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  784|   112k|	yych = YYPEEK();
  ------------------
  |  |   33|   112k|#define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|   112k|#define YYCURSOR pos
  |  |  ------------------
  |  |               #define YYPEEK() (YYCURSOR < end) ? *YYCURSOR : 0 /* The lexer sees a stream of
  |  |  ------------------
  |  |  |  |   31|   112k|#define YYCURSOR pos
  |  |  ------------------
  |  |  |  Branch (33:18): [True: 112k, False: 854]
  |  |  ------------------
  ------------------
  785|   114k|yy50:
  786|   114k|	switch (yych) {
  787|  72.5k|		case '0':
  ------------------
  |  Branch (787:3): [True: 72.5k, False: 41.8k]
  ------------------
  788|  89.7k|		case '1':
  ------------------
  |  Branch (788:3): [True: 17.2k, False: 97.1k]
  ------------------
  789|   104k|		case '2':
  ------------------
  |  Branch (789:3): [True: 14.3k, False: 100k]
  ------------------
  790|   104k|		case '3':
  ------------------
  |  Branch (790:3): [True: 277, False: 114k]
  ------------------
  791|   104k|		case '4':
  ------------------
  |  Branch (791:3): [True: 414, False: 113k]
  ------------------
  792|   110k|		case '5':
  ------------------
  |  Branch (792:3): [True: 5.95k, False: 108k]
  ------------------
  793|   111k|		case '6':
  ------------------
  |  Branch (793:3): [True: 479, False: 113k]
  ------------------
  794|   111k|		case '7':
  ------------------
  |  Branch (794:3): [True: 314, False: 114k]
  ------------------
  795|   112k|		case '8':
  ------------------
  |  Branch (795:3): [True: 828, False: 113k]
  ------------------
  796|   112k|		case '9': goto yy49;
  ------------------
  |  Branch (796:3): [True: 560, False: 113k]
  ------------------
  797|    391|		case ':': goto yy51;
  ------------------
  |  Branch (797:3): [True: 391, False: 114k]
  ------------------
  798|  1.12k|		default: goto yy47;
  ------------------
  |  Branch (798:3): [True: 1.12k, False: 113k]
  ------------------
  799|   114k|	}
  800|    391|yy51:
  801|    391|	YYSKIP();
  ------------------
  |  |   35|    391|#define YYSKIP() ++YYCURSOR;
  |  |  ------------------
  |  |  |  |   31|    391|#define YYCURSOR pos
  |  |  ------------------
  ------------------
  802|    391|	{ goto match_index; }
  803|   114k|}
  804|       |
  805|       |
  806|    391| match_index:
  807|    391|    len = (size_t)(pos - 1 - begin);
  808|    391|    if(UA_readNumber((const UA_Byte*)begin, len, &tmp) != len)
  ------------------
  |  Branch (808:8): [True: 0, False: 391]
  ------------------
  809|      0|        return UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  810|    391|    qn->namespaceIndex = (UA_UInt16)tmp;
  811|    391|    goto match_name;
  812|       |
  813|    271| match_uri:
  814|    271|    str.length = (size_t)(pos - 1 - begin);
  815|    271|    str.data = (UA_Byte*)(uintptr_t)begin;
  816|    271|    res = escapedUri2Index(str, &qn->namespaceIndex, nsMapping);
  817|    271|    if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|    271|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (817:8): [True: 271, False: 0]
  ------------------
  818|    271|        pos = begin; /* Use the entire string for the name */
  819|       |
  820|  24.9k| match_name:
  821|  24.9k|    str.length = (size_t)(end - pos);
  822|  24.9k|    str.data = (UA_Byte*)(uintptr_t)pos;
  823|  24.9k|    res = UA_String_copy(&str, &qn->name);
  824|  24.9k|    if(UA_LIKELY(res == UA_STATUSCODE_GOOD))
  ------------------
  |  |  579|  24.9k|# define UA_LIKELY(x) __builtin_expect((x), 1)
  |  |  ------------------
  |  |  |  Branch (579:23): [True: 24.9k, False: 1]
  |  |  ------------------
  ------------------
  825|  24.9k|        res = UA_String_unescape(&qn->name, false, escName);
  826|  24.9k|    return res;
  827|    271|}

UA_readNumberWithBase:
  111|  22.6k|UA_readNumberWithBase(const UA_Byte *buf, size_t buflen, UA_UInt32 *number, UA_Byte base) {
  112|  22.6k|    UA_assert(buf);
  ------------------
  |  |  400|  22.6k|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (112:5): [True: 22.6k, False: 0]
  ------------------
  113|  22.6k|    UA_assert(number);
  ------------------
  |  |  400|  22.6k|# define UA_assert(ignore) assert(ignore)
  ------------------
  |  Branch (113:5): [True: 22.6k, False: 0]
  ------------------
  114|  22.6k|    u32 n = 0;
  115|  22.6k|    size_t progress = 0;
  116|       |    /* read numbers until the end or a non-number character appears */
  117|  2.59M|    while(progress < buflen) {
  ------------------
  |  Branch (117:11): [True: 2.57M, False: 22.5k]
  ------------------
  118|  2.57M|        u8 c = buf[progress];
  119|  2.57M|        if(c >= '0' && c <= '9' && c <= '0' + (base-1))
  ------------------
  |  Branch (119:12): [True: 2.57M, False: 31]
  |  Branch (119:24): [True: 2.57M, False: 805]
  |  Branch (119:36): [True: 2.57M, False: 0]
  ------------------
  120|  2.57M|           n = (n * base) + c - '0';
  121|    836|        else if(base > 9 && c >= 'a' && c <= 'z' && c <= 'a' + (base-11))
  ------------------
  |  Branch (121:17): [True: 836, False: 0]
  |  Branch (121:29): [True: 470, False: 366]
  |  Branch (121:41): [True: 439, False: 31]
  |  Branch (121:53): [True: 419, False: 20]
  ------------------
  122|    419|           n = (n * base) + c-'a' + 10;
  123|    417|        else if(base > 9 && c >= 'A' && c <= 'Z' && c <= 'A' + (base-11))
  ------------------
  |  Branch (123:17): [True: 417, False: 0]
  |  Branch (123:29): [True: 374, False: 43]
  |  Branch (123:41): [True: 317, False: 57]
  |  Branch (123:53): [True: 307, False: 10]
  ------------------
  124|    307|           n = (n * base) + c-'A' + 10;
  125|    110|        else
  126|    110|           break;
  127|  2.57M|        ++progress;
  128|  2.57M|    }
  129|  22.6k|    *number = n;
  130|  22.6k|    return progress;
  131|  22.6k|}
UA_readNumber:
  134|  22.4k|UA_readNumber(const UA_Byte *buf, size_t buflen, UA_UInt32 *number) {
  135|  22.4k|    return UA_readNumberWithBase(buf, buflen, number, 10);
  136|  22.4k|}
UA_String_unescape:
  803|  34.1k|UA_String_unescape(UA_String *str, UA_Boolean copyEscape, UA_Escaping esc) {
  804|  34.1k|    if(esc == UA_ESCAPING_NONE)
  ------------------
  |  Branch (804:8): [True: 34.1k, False: 0]
  ------------------
  805|  34.1k|        return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  34.1k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  806|       |
  807|       |    /* Does the string need escaping? */
  808|      0|    UA_String tmp;
  809|      0|    status res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  810|      0|    u8 *pos = str->data;
  811|      0|    u8 *end = str->data + str->length;
  812|      0|    u8 escape_char = (esc == UA_ESCAPING_PERCENT ||
  ------------------
  |  Branch (812:23): [True: 0, False: 0]
  ------------------
  813|      0|                      esc == UA_ESCAPING_PERCENT_EXTENDED) ? '%' : '&';
  ------------------
  |  Branch (813:23): [True: 0, False: 0]
  ------------------
  814|      0|    for(; pos < end; pos++) {
  ------------------
  |  Branch (814:11): [True: 0, False: 0]
  ------------------
  815|      0|        if(*pos == escape_char)
  ------------------
  |  Branch (815:12): [True: 0, False: 0]
  ------------------
  816|      0|            goto escape;
  817|      0|    }
  818|       |
  819|      0|    return UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  820|       |
  821|      0| escape:
  822|      0|    if(copyEscape) {
  ------------------
  |  Branch (822:8): [True: 0, False: 0]
  ------------------
  823|      0|        res = UA_String_copy(str, &tmp);
  824|      0|        if(res != UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (824:12): [True: 0, False: 0]
  ------------------
  825|      0|            return res;
  826|      0|        pos = tmp.data;
  827|      0|        end = tmp.data + tmp.length;
  828|      0|    }
  829|       |
  830|      0|    u8 byte = 0;
  831|      0|    u8 *writepos = pos;
  832|       |
  833|      0|    res = UA_STATUSCODE_BADDECODINGERROR;
  ------------------
  |  |   44|      0|#define UA_STATUSCODE_BADDECODINGERROR ((UA_StatusCode) 0x80070000)
  ------------------
  834|      0|    if(esc == UA_ESCAPING_PERCENT ||
  ------------------
  |  Branch (834:8): [True: 0, False: 0]
  ------------------
  835|      0|       esc == UA_ESCAPING_PERCENT_EXTENDED) {
  ------------------
  |  Branch (835:8): [True: 0, False: 0]
  ------------------
  836|       |        /* Percent-Escaping */
  837|      0|        for(; pos < end; pos++) {
  ------------------
  |  Branch (837:15): [True: 0, False: 0]
  ------------------
  838|      0|            if(*pos == '%') {
  ------------------
  |  Branch (838:16): [True: 0, False: 0]
  ------------------
  839|      0|                if(pos + 2 >= end || !isHex(pos[1]) || !isHex(pos[2]))
  ------------------
  |  Branch (839:20): [True: 0, False: 0]
  |  Branch (839:38): [True: 0, False: 0]
  |  Branch (839:56): [True: 0, False: 0]
  ------------------
  840|      0|                    goto out;
  841|      0|                if(pos[1] >= 'a')
  ------------------
  |  Branch (841:20): [True: 0, False: 0]
  ------------------
  842|      0|                    byte = pos[1] - ('a' - 10);
  843|      0|                else if(pos[1] >= 'A')
  ------------------
  |  Branch (843:25): [True: 0, False: 0]
  ------------------
  844|      0|                    byte = pos[1] - ('A' - 10);
  845|      0|                else
  846|      0|                    byte = pos[1] - '0';
  847|      0|                byte <<= 4;
  848|       |
  849|      0|                if(pos[2] >= 'a')
  ------------------
  |  Branch (849:20): [True: 0, False: 0]
  ------------------
  850|      0|                    byte += (u8)(pos[2] - ('a' - 10));
  851|      0|                else if(pos[2] >= 'A')
  ------------------
  |  Branch (851:25): [True: 0, False: 0]
  ------------------
  852|      0|                    byte += (u8)(pos[2] - ('A' - 10));
  853|      0|                else
  854|      0|                    byte += (u8)(pos[2] - '0');
  855|       |
  856|      0|                pos += 2;
  857|      0|                *writepos++ = byte;
  858|      0|                continue;
  859|      0|            }
  860|      0|            *writepos++ = *pos;
  861|      0|        }
  862|      0|    } else {
  863|       |        /* And-Escaping */
  864|      0|        for(; pos < end; pos++) {
  ------------------
  |  Branch (864:15): [True: 0, False: 0]
  ------------------
  865|      0|            if(*pos == '&') {
  ------------------
  |  Branch (865:16): [True: 0, False: 0]
  ------------------
  866|      0|                pos++;
  867|      0|                if(pos == end)
  ------------------
  |  Branch (867:20): [True: 0, False: 0]
  ------------------
  868|      0|                    goto out;
  869|      0|            }
  870|      0|            *writepos++ = *pos;
  871|      0|        }
  872|      0|    }
  873|      0|    res = UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  874|       |
  875|      0| out:
  876|      0|    if(copyEscape) {
  ------------------
  |  Branch (876:8): [True: 0, False: 0]
  ------------------
  877|      0|        tmp.length = (size_t)(writepos - tmp.data);
  878|      0|        if(tmp.length == 0)
  ------------------
  |  Branch (878:12): [True: 0, False: 0]
  ------------------
  879|      0|            UA_String_clear(&tmp);
  880|      0|        if(res == UA_STATUSCODE_GOOD)
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (880:12): [True: 0, False: 0]
  ------------------
  881|      0|            *str = tmp;
  882|      0|        else
  883|      0|            UA_String_clear(&tmp);
  884|      0|    } else if(res == UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|      0|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (884:15): [True: 0, False: 0]
  ------------------
  885|      0|        str->length = (size_t)(writepos - str->data);
  886|      0|    }
  887|      0|    return res;
  888|      0|}

ua_pubsub_networkmessage_json.c:isTrue:
  167|  60.8k|isTrue(uint8_t expr) {
  168|  60.8k|    return expr;
  169|  60.8k|}
ua_pubsub_networkmessage_json.c:isGood:
  157|  60.8k|isGood(UA_StatusCode code) {
  158|  60.8k|    return code == UA_STATUSCODE_GOOD;
  ------------------
  |  |   17|  60.8k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  159|  60.8k|}

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

LLVMFuzzerTestOneInput:
   13|  7.69k|LLVMFuzzerTestOneInput(uint8_t *data, size_t size) {
   14|  7.69k|    if(size < 4)
  ------------------
  |  Branch (14:8): [True: 2, False: 7.69k]
  ------------------
   15|      2|        return 0;
   16|       |
   17|       |    /* Set memory limit from last 4 bytes to test OOM handling */
   18|  7.69k|    if(!UA_memoryManager_setLimitFromLast4Bytes(data, size))
  ------------------
  |  Branch (18:8): [True: 0, False: 7.69k]
  ------------------
   19|      0|        return 0;
   20|  7.69k|    size -= 4;
   21|       |
   22|       |    /* Create ByteString from fuzz input */
   23|  7.69k|    UA_ByteString buf;
   24|  7.69k|    buf.data = (UA_Byte*)(void*)data;
   25|  7.69k|    buf.length = size;
   26|       |
   27|       |    /* Decode the NetworkMessage from JSON */
   28|  7.69k|    UA_NetworkMessage nm;
   29|  7.69k|    memset(&nm, 0, sizeof(UA_NetworkMessage));
   30|       |
   31|  7.69k|    UA_StatusCode rv = UA_NetworkMessage_decodeJson(&buf, &nm, NULL, NULL);
   32|  7.69k|    if(rv == UA_STATUSCODE_GOOD) {
  ------------------
  |  |   17|  7.69k|#define UA_STATUSCODE_GOOD ((UA_StatusCode) 0x00000000)
  ------------------
  |  Branch (32:8): [True: 8, False: 7.68k]
  ------------------
   33|      8|        UA_NetworkMessage_clear(&nm);
   34|      8|    }
   35|       |
   36|  7.69k|    return 0;
   37|  7.69k|}

ua_types.c:UA_ByteString_init:
  244|  13.1k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_String_copy:
  244|  36.9k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_NodeId_clear:
  244|  1.91k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_ExpandedNodeId_clear:
  244|    489|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_QualifiedName_clear:
  244|      1|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_lex.c:UA_QualifiedName_init:
  244|  24.9k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_json.c:UA_String_clear:
  244|  61.2k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_json.c:UA_ExtensionObject_init:
  244|  2.15k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_json.c:UA_String_init:
  244|  61.0k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_json.c:UA_NodeId_init:
  244|  39.7k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_json.c:UA_NodeId_clear:
  244|  17.0k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_json.c:UA_ExtensionObject_new:
  244|     66|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_types_encoding_json.c:UA_ExtensionObject_clear:
  244|    483|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_pubsub_networkmessage_json.c:UA_String_clear:
  244|  30.4k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_pubsub_networkmessage_json.c:UA_DataValue_clear:
  244|  30.4k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_pubsub_networkmessage_binary.c:UA_ByteString_clear:
  244|  6.93k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl
ua_pubsub_networkmessage_binary.c:UA_String_clear:
  244|  6.93k|# define UA_INLINABLE(decl, impl) static UA_INLINE decl impl

